From 6f1ddbf6db18ed7aaa2aa7a4f2a556ff32bb5d5d Mon Sep 17 00:00:00 2001 From: Greg Lewis Date: Sat, 7 Jun 2014 23:37:24 +0000 Subject: Update to 7u60. --- java/openjdk7/files/patch-set | 137065 +++++++++++++++++++++++++++------------ 1 file changed, 94411 insertions(+), 42654 deletions(-) (limited to 'java/openjdk7/files/patch-set') diff --git a/java/openjdk7/files/patch-set b/java/openjdk7/files/patch-set index 068d8d47f2cc..94f5403ab834 100644 --- a/java/openjdk7/files/patch-set +++ b/java/openjdk7/files/patch-set @@ -1,5 +1,5 @@ ---- .hgtags 2013-09-06 11:20:33.000000000 -0700 -+++ .hgtags 2014-04-20 12:39:52.000000000 -0700 +--- ./.hgtags 2013-09-06 11:20:33.000000000 -0700 ++++ ./.hgtags 2014-06-06 19:56:10.000000000 -0700 @@ -123,6 +123,7 @@ 2d38c2a79c144c30cd04d143d83ee7ec6af40771 jdk7-b146 3ac30b3852876ccad6bd61697b5f9efa91ca7bc6 jdk7u1-b01 @@ -40,10 +40,11 @@ da376fd5e4d68f8a45003a6e175267dc840711cc jdk7u40-b32 3fdfe7f1b06354e11e8af51b7c653c8a0adb3987 jdk7u40-b33 a1ae13479e8767329fa20774b5cea5976aaeb37b jdk7u40-b34 -@@ -341,3 +358,59 @@ +@@ -341,3 +358,83 @@ 3af81bfe320c12758234233da6fa27c3c0ffcdc4 jdk7u40-b42 1d53bd8fd2a62bcf336727ebec377ef7498dd4a6 jdk7u40-b43 dc1e099cd62d250b4a997ce694b47fe2f50d2905 jdk7u40-b60 ++11147a12bd8c6b02f98016a8d1151e56f42a43b6 jdk7u60-b00 +6359fa34199c9619dfec0f41d2eb22a4083ce610 jdk7u40-b61 +a2605cf03226ce2fef7a899ce41521c654300975 jdk7u40-b62 +07e41ff8674c9438cb1124cf78eed8636ed5d4fa jdk7u45-b02 @@ -84,6 +85,8 @@ +6c778574d87336a2e55156544af92ce2de799696 jdk7u51-b13 +d2eeac0235eda77d0a6c72c7235a6e96bc9ad4fb jdk7u51-b30 +626e76f127a44ba0118a545d37410f80000db8fb jdk7u51-b31 ++472d67871307433bf3e2687c48237c48ffbf068e jdk7u51-b33 ++503f1d094a1bbbd94386f5c3342130dc5f4ba6ee jdk7u51-b34 +df53ec7eb789e7dec375a685dce1fa5cf63618b4 jdk7u55-b00 +15bc13cd7f5d0bb06ab59935e25944fa7cb15bc8 jdk7u55-b01 +b829c5947c6cd473f42cadfe2c61399fb67c2da6 jdk7u55-b02 @@ -100,8 +103,29 @@ +de268da51b54a4f36bcc1a9af60faea285e94330 jdk7u55-b12 +d972a2d9e4f3f864d26c33ccfdacd8269e0f29a8 jdk7u55-b13 +0820b4707cfa75f8211b88b0daa67bba8475f498 jdk7u55-b30 ---- Makefile 2013-09-06 11:20:33.000000000 -0700 -+++ Makefile 2014-04-20 12:39:52.000000000 -0700 ++997ab3897d6ede80b0decdda94b569e57dd7dd90 jdk7u55-b14 ++1f52edec29fd44c8bacce11ba7440287b37d04d1 jdk7u55-b31 ++11147a12bd8c6b02f98016a8d1151e56f42a43b6 jdk7u60-b00 ++88113cabda386320a087b288d43e792f523cc0ba jdk7u60-b01 ++6bdacebbc97f0a03be45be48a6d5b5cf2f7fe77d jdk7u60-b02 ++87f2193da40d3a2eedca95108ae78403c7bdcd49 jdk7u60-b03 ++d4397128f8b65eb96287128575dd1a3da6a7825b jdk7u60-b04 ++ea798405286d97f643ef809abcb1e13024b4f951 jdk7u60-b05 ++b0940b205cab942512b5bca1338ab96a45a67832 jdk7u60-b06 ++cae7bacaa13bb8c42a42fa35b156a7660874e907 jdk7u60-b07 ++1af0560611469ad2a068a03774ecd0d7790db7b7 jdk7u60-b08 ++662dc3b6467488b8c175a4423ba7a4991ad87d94 jdk7u60-b09 ++023f8eb40d371d5cb761f7e60ba7b396b3fdf886 jdk7u60-b10 ++798468b91bcbb81684aea8620dbb31eaceb24c6c jdk7u60-b11 ++e40360c10b2ce5b24b1eea63160b78e112aa5d3f jdk7u60-b12 ++5e540a4d55916519f5604a422bfbb7a0967d0594 jdk7u60-b13 ++1ca6a368aec38ee91a41dc03899d7dc1037de44d jdk7u60-b14 ++a95b821a2627295b90fb4ae8f3b8bc2ff9c64acc jdk7u60-b15 ++19a3f6f48c541a8cf144eedffa0e52e108052e82 jdk7u60-b16 ++472f5930e6cc8f307b5508995ee2edcf9913a852 jdk7u60-b18 ++472f5930e6cc8f307b5508995ee2edcf9913a852 jdk7u60-b17 +--- ./Makefile 2013-09-06 11:20:33.000000000 -0700 ++++ ./Makefile 2013-12-01 11:13:37.000000000 -0800 @@ -264,7 +264,7 @@ DEBUG_NAME=$(DEBUG_NAME) \ GENERATE_DOCS=false \ @@ -111,8 +135,8 @@ $(BOOT_CYCLE_DEBUG_SETTINGS) \ generic_build_repo_series ---- corba/.hgtags 2013-09-06 11:20:46.000000000 -0700 -+++ corba/.hgtags 2014-04-20 12:39:46.000000000 -0700 +--- ./corba/.hgtags 2013-09-06 11:20:46.000000000 -0700 ++++ ./corba/.hgtags 2014-06-06 19:56:11.000000000 -0700 @@ -123,6 +123,7 @@ 770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146 36f0efbc66ef8ace3cca8aa8d0c88f3334080f8a jdk7u1-b01 @@ -144,7 +168,7 @@ ef8e6f8305d524f3b448a85f901aadf1adc81fc0 jdk7u25-b12 eca480919c71072a31f62a61cb3aad30677007e3 jdk7u25-b13 577c4dd1a6e9bc1bb2c2e5d5ecbab8eacb4121af jdk7u25-b14 -@@ -343,3 +360,60 @@ +@@ -343,3 +360,83 @@ b4a480a039bc19b27bfb5fcbbbf75e651d2718b7 jdk7u40-b42 e29ea0b297e519010e661603a07bb8d48fa904a2 jdk7u40-b43 08737d863a7aa5eb39374b26c9585e1770affe92 jdk7u40-b60 @@ -189,6 +213,8 @@ +e2f0036f712aa636cfd55334ac21ea7ca2587a7b jdk7u51-b13 +6563d12c48c92af39a27ca46b4515fad8e994667 jdk7u51-b30 +0ad990211737fe1b1e2737a3498ab266146d2c53 jdk7u51-b31 ++ee7d9f5d18fb67564e88a10f1bd682660db60aa2 jdk7u51-b33 ++65ef96a075a43e9201866d1c9b8ee3138ebcc424 jdk7u51-b34 +55a509ccc0e4ed49e311c7ecf2ed29a908bc1d6b jdk7u55-b00 +aabfdc799c0799837dcbbf9ea8d6df1511978b1f jdk7u55-b01 +db2e6d87bade9d2061646ff9a6b39b5159fba0ec jdk7u55-b02 @@ -205,8 +231,29 @@ +3cce2a49d18d93dfca2634db32368486ebbb1590 jdk7u55-b12 +8efa6e66c13a5329c312d1a521ffab75d9a330e3 jdk7u55-b13 +e041c52fe69128ec3439d26afef9b0fcba00684c jdk7u55-b30 ---- corba/make/Makefile 2013-09-06 11:20:46.000000000 -0700 -+++ corba/make/Makefile 2014-04-20 12:39:43.000000000 -0700 ++a0bfd0e80ae0ae6e3a29bf527b5911c83163b3f5 jdk7u55-b14 ++55ff6957449cf6c79f5d5bb159df27f51ece1659 jdk7u55-b31 ++c5b5886004e6446b8b27ccdc1fd073354c1dc614 jdk7u60-b00 ++a531112cc6d0b0a1e7d4ffdaa3ba53addcd25cf4 jdk7u60-b01 ++d81370c5b863acc19e8fb07315b1ec687ac1136a jdk7u60-b02 ++d7e98ed925a3885380226f8375fe109a9a25397f jdk7u60-b03 ++1a3aa4637b80fabbd069ae88c241efcb3520fc49 jdk7u60-b04 ++753698a910167cc29c01490648a2adbcea1314cc jdk7u60-b05 ++9852efe6d6b992b73fdbf59e36fb3547a9535051 jdk7u60-b06 ++84a18429f247774fc7f1bc81de271da20b40845b jdk7u60-b07 ++8469bc00ddca4de366b20b32d42548c882656cd8 jdk7u60-b08 ++7abca119f9543489280d560dc11256d439004f0f jdk7u60-b09 ++1861f1f599728c4f15a85a5980edef916552747b jdk7u60-b10 ++a429ff635395688ded6c52cd21c0b4ce75e62168 jdk7u60-b11 ++d581875525aaf618afe901da31d679195ee35f4b jdk7u60-b12 ++2c8ba5f9487b0ac085874afd38f4c10a4127f62c jdk7u60-b13 ++02bdeb33754315f589bd650dde656d2c9947976d jdk7u60-b14 ++e5946b2cf82bdea3a4b85917e903168e65a543a7 jdk7u60-b15 ++e424fb8452851b56db202488a4e9a283934c4887 jdk7u60-b16 ++b96d90694be873372cc417b38b01afed6ac1b239 jdk7u60-b18 ++b96d90694be873372cc417b38b01afed6ac1b239 jdk7u60-b17 +--- ./corba/make/Makefile 2013-09-06 11:20:46.000000000 -0700 ++++ ./corba/make/Makefile 2014-01-18 12:16:05.000000000 -0800 @@ -160,7 +160,7 @@ # # CORBA @@ -216,8 +263,977 @@ build: $(SUBDIRS-loop) ---- corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java 2013-09-06 11:20:47.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/copyobject/JavaInputStream.sjava 2013-09-06 11:20:47.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/copyobject/JavaInputStream.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,528 +0,0 @@ +-/* +- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +- * 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.corba.se.impl.encoding; +- +-import java.io.IOException; +-import java.io.Serializable; +-import java.math.BigDecimal; +-import java.nio.ByteBuffer; +- +-import org.omg.CORBA.TypeCode; +-import org.omg.CORBA.Principal; +-import org.omg.CORBA.Any; +- +-import com.sun.org.omg.SendingContext.CodeBase; +- +-import com.sun.corba.se.pept.protocol.MessageMediator; +- +-import com.sun.corba.se.spi.logging.CORBALogDomains; +-import com.sun.corba.se.spi.orb.ORB; +-import com.sun.corba.se.spi.ior.iiop.GIOPVersion; +-import com.sun.corba.se.spi.protocol.CorbaMessageMediator; +- +-import com.sun.corba.se.impl.logging.ORBUtilSystemException; +-import com.sun.corba.se.impl.encoding.CodeSetConversion; +-import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry; +- +-/** +- * This is delegates to the real implementation. +- * +- * NOTE: +- * +- * Before using the stream for valuetype unmarshaling, one must call +- * performORBVersionSpecificInit(). +- */ +-public abstract class CDRInputStream +- extends org.omg.CORBA_2_3.portable.InputStream +- implements com.sun.corba.se.impl.encoding.MarshalInputStream, +- org.omg.CORBA.DataInputStream, org.omg.CORBA.portable.ValueInputStream +-{ +- protected CorbaMessageMediator messageMediator; +- private CDRInputStreamBase impl; +- +- // We can move this out somewhere later. For now, it serves its purpose +- // to create a concrete CDR delegate based on the GIOP version. +- private static class InputStreamFactory { +- +- public static CDRInputStreamBase newInputStream(ORB orb, GIOPVersion version) +- { +- switch(version.intValue()) { +- case GIOPVersion.VERSION_1_0: +- return new CDRInputStream_1_0(); +- case GIOPVersion.VERSION_1_1: +- return new CDRInputStream_1_1(); +- case GIOPVersion.VERSION_1_2: +- return new CDRInputStream_1_2(); +- default: +- ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb, +- CORBALogDomains.RPC_ENCODING ) ; +- throw wrapper.unsupportedGiopVersion( version ) ; +- } +- } +- } +- +- // Required for the case when a ClientResponseImpl is +- // created with a SystemException due to a dead server/closed +- // connection with no warning. Note that the stream will +- // not be initialized in this case. +- // +- // Probably also required by ServerRequestImpl. +- // +- // REVISIT. +- public CDRInputStream() { +- } +- +- public CDRInputStream(CDRInputStream is) { +- impl = is.impl.dup(); +- impl.setParent(this); +- } +- +- public CDRInputStream(org.omg.CORBA.ORB orb, +- ByteBuffer byteBuffer, +- int size, +- boolean littleEndian, +- GIOPVersion version, +- BufferManagerRead bufMgr) +- { +- impl = InputStreamFactory.newInputStream( (ORB)orb, version); +- +- impl.init(orb, byteBuffer, size, littleEndian, bufMgr); +- +- impl.setParent(this); +- } +- +- // org.omg.CORBA.portable.InputStream +- public final boolean read_boolean() { +- return impl.read_boolean(); +- } +- +- public final char read_char() { +- return impl.read_char(); +- } +- +- public final char read_wchar() { +- return impl.read_wchar(); +- } +- +- public final byte read_octet() { +- return impl.read_octet(); +- } +- +- public final short read_short() { +- return impl.read_short(); +- } +- +- public final short read_ushort() { +- return impl.read_ushort(); +- } +- +- public final int read_long() { +- return impl.read_long(); +- } +- +- public final int read_ulong() { +- return impl.read_ulong(); +- } +- +- public final long read_longlong() { +- return impl.read_longlong(); +- } +- +- public final long read_ulonglong() { +- return impl.read_ulonglong(); +- } +- +- public final float read_float() { +- return impl.read_float(); +- } +- +- public final double read_double() { +- return impl.read_double(); +- } +- +- public final String read_string() { +- return impl.read_string(); +- } +- +- public final String read_wstring() { +- return impl.read_wstring(); +- } +- +- public final void read_boolean_array(boolean[] value, int offset, int length) { +- impl.read_boolean_array(value, offset, length); +- } +- +- public final void read_char_array(char[] value, int offset, int length) { +- impl.read_char_array(value, offset, length); +- } +- +- public final void read_wchar_array(char[] value, int offset, int length) { +- impl.read_wchar_array(value, offset, length); +- } +- +- public final void read_octet_array(byte[] value, int offset, int length) { +- impl.read_octet_array(value, offset, length); +- } +- +- public final void read_short_array(short[] value, int offset, int length) { +- impl.read_short_array(value, offset, length); +- } +- +- public final void read_ushort_array(short[] value, int offset, int length) { +- impl.read_ushort_array(value, offset, length); +- } +- +- public final void read_long_array(int[] value, int offset, int length) { +- impl.read_long_array(value, offset, length); +- } +- +- public final void read_ulong_array(int[] value, int offset, int length) { +- impl.read_ulong_array(value, offset, length); +- } +- +- public final void read_longlong_array(long[] value, int offset, int length) { +- impl.read_longlong_array(value, offset, length); +- } +- +- public final void read_ulonglong_array(long[] value, int offset, int length) { +- impl.read_ulonglong_array(value, offset, length); +- } +- +- public final void read_float_array(float[] value, int offset, int length) { +- impl.read_float_array(value, offset, length); +- } +- +- public final void read_double_array(double[] value, int offset, int length) { +- impl.read_double_array(value, offset, length); +- } +- +- public final org.omg.CORBA.Object read_Object() { +- return impl.read_Object(); +- } +- +- public final TypeCode read_TypeCode() { +- return impl.read_TypeCode(); +- } +- public final Any read_any() { +- return impl.read_any(); +- } +- +- public final Principal read_Principal() { +- return impl.read_Principal(); +- } +- +- public final int read() throws java.io.IOException { +- return impl.read(); +- } +- +- public final java.math.BigDecimal read_fixed() { +- return impl.read_fixed(); +- } +- +- public final org.omg.CORBA.Context read_Context() { +- return impl.read_Context(); +- } +- +- public final org.omg.CORBA.Object read_Object(java.lang.Class clz) { +- return impl.read_Object(clz); +- } +- +- public final org.omg.CORBA.ORB orb() { +- return impl.orb(); +- } +- +- // org.omg.CORBA_2_3.portable.InputStream +- public final java.io.Serializable read_value() { +- return impl.read_value(); +- } +- +- public final java.io.Serializable read_value(java.lang.Class clz) { +- return impl.read_value(clz); +- } +- +- public final java.io.Serializable read_value(org.omg.CORBA.portable.BoxedValueHelper factory) { +- return impl.read_value(factory); +- } +- +- public final java.io.Serializable read_value(java.lang.String rep_id) { +- return impl.read_value(rep_id); +- } +- +- public final java.io.Serializable read_value(java.io.Serializable value) { +- return impl.read_value(value); +- } +- +- public final java.lang.Object read_abstract_interface() { +- return impl.read_abstract_interface(); +- } +- +- public final java.lang.Object read_abstract_interface(java.lang.Class clz) { +- return impl.read_abstract_interface(clz); +- } +- // com.sun.corba.se.impl.encoding.MarshalInputStream +- +- public final void consumeEndian() { +- impl.consumeEndian(); +- } +- +- public final int getPosition() { +- return impl.getPosition(); +- } +- +- // org.omg.CORBA.DataInputStream +- +- public final java.lang.Object read_Abstract () { +- return impl.read_Abstract(); +- } +- +- public final java.io.Serializable read_Value () { +- return impl.read_Value(); +- } +- +- public final void read_any_array (org.omg.CORBA.AnySeqHolder seq, int offset, int length) { +- impl.read_any_array(seq, offset, length); +- } +- +- public final void read_boolean_array (org.omg.CORBA.BooleanSeqHolder seq, int offset, int length) { +- impl.read_boolean_array(seq, offset, length); +- } +- +- public final void read_char_array (org.omg.CORBA.CharSeqHolder seq, int offset, int length) { +- impl.read_char_array(seq, offset, length); +- } +- +- public final void read_wchar_array (org.omg.CORBA.WCharSeqHolder seq, int offset, int length) { +- impl.read_wchar_array(seq, offset, length); +- } +- +- public final void read_octet_array (org.omg.CORBA.OctetSeqHolder seq, int offset, int length) { +- impl.read_octet_array(seq, offset, length); +- } +- +- public final void read_short_array (org.omg.CORBA.ShortSeqHolder seq, int offset, int length) { +- impl.read_short_array(seq, offset, length); +- } +- +- public final void read_ushort_array (org.omg.CORBA.UShortSeqHolder seq, int offset, int length) { +- impl.read_ushort_array(seq, offset, length); +- } +- +- public final void read_long_array (org.omg.CORBA.LongSeqHolder seq, int offset, int length) { +- impl.read_long_array(seq, offset, length); +- } +- +- public final void read_ulong_array (org.omg.CORBA.ULongSeqHolder seq, int offset, int length) { +- impl.read_ulong_array(seq, offset, length); +- } +- +- public final void read_ulonglong_array (org.omg.CORBA.ULongLongSeqHolder seq, int offset, int length) { +- impl.read_ulonglong_array(seq, offset, length); +- } +- +- public final void read_longlong_array (org.omg.CORBA.LongLongSeqHolder seq, int offset, int length) { +- impl.read_longlong_array(seq, offset, length); +- } +- +- public final void read_float_array (org.omg.CORBA.FloatSeqHolder seq, int offset, int length) { +- impl.read_float_array(seq, offset, length); +- } +- +- public final void read_double_array (org.omg.CORBA.DoubleSeqHolder seq, int offset, int length) { +- impl.read_double_array(seq, offset, length); +- } +- +- // org.omg.CORBA.portable.ValueBase +- public final String[] _truncatable_ids() { +- return impl._truncatable_ids(); +- } +- +- // java.io.InputStream +- public final int read(byte b[]) throws IOException { +- return impl.read(b); +- } +- +- public final int read(byte b[], int off, int len) throws IOException { +- return impl.read(b, off, len); +- } +- +- public final long skip(long n) throws IOException { +- return impl.skip(n); +- } +- +- public final int available() throws IOException { +- return impl.available(); +- } +- +- public final void close() throws IOException { +- impl.close(); +- } +- +- public final void mark(int readlimit) { +- impl.mark(readlimit); +- } +- +- public final void reset() { +- impl.reset(); +- } +- +- public final boolean markSupported() { +- return impl.markSupported(); +- } +- +- public abstract CDRInputStream dup(); +- +- // Needed by TCUtility +- public final java.math.BigDecimal read_fixed(short digits, short scale) { +- return impl.read_fixed(digits, scale); +- } +- +- public final boolean isLittleEndian() { +- return impl.isLittleEndian(); +- } +- +- protected final ByteBuffer getByteBuffer() { +- return impl.getByteBuffer(); +- } +- +- protected final void setByteBuffer(ByteBuffer byteBuffer) { +- impl.setByteBuffer(byteBuffer); +- } +- +- protected final void setByteBufferWithInfo(ByteBufferWithInfo bbwi) { +- impl.setByteBufferWithInfo(bbwi); +- } +- +- public final int getBufferLength() { +- return impl.getBufferLength(); +- } +- +- protected final void setBufferLength(int value) { +- impl.setBufferLength(value); +- } +- +- protected final int getIndex() { +- return impl.getIndex(); +- } +- +- protected final void setIndex(int value) { +- impl.setIndex(value); +- } +- +- public final void orb(org.omg.CORBA.ORB orb) { +- impl.orb(orb); +- } +- +- public final GIOPVersion getGIOPVersion() { +- return impl.getGIOPVersion(); +- } +- +- public final BufferManagerRead getBufferManager() { +- return impl.getBufferManager(); +- } +- +- // This should be overridden by any stream (ex: IIOPInputStream) +- // which wants to read values. Thus, TypeCodeInputStream doesn't +- // have to do this. +- public CodeBase getCodeBase() { +- return null; +- } +- +- // Use Latin-1 for GIOP 1.0 or when code set negotiation was not +- // performed. +- protected CodeSetConversion.BTCConverter createCharBTCConverter() { +- return CodeSetConversion.impl().getBTCConverter(OSFCodeSetRegistry.ISO_8859_1, +- impl.isLittleEndian()); +- } +- +- // Subclasses must decide what to do here. It's inconvenient to +- // make the class and this method abstract because of dup(). +- protected abstract CodeSetConversion.BTCConverter createWCharBTCConverter(); +- +- // Prints the current buffer in a human readable form +- void printBuffer() { +- impl.printBuffer(); +- } +- +- /** +- * Aligns the current position on the given octet boundary +- * if there are enough bytes available to do so. Otherwise, +- * it just returns. This is used for some (but not all) +- * GIOP 1.2 message headers. +- */ +- public void alignOnBoundary(int octetBoundary) { +- impl.alignOnBoundary(octetBoundary); +- } +- +- // Needed by request and reply messages for GIOP versions >= 1.2 only. +- public void setHeaderPadding(boolean headerPadding) { +- impl.setHeaderPadding(headerPadding); +- } +- +- /** +- * This must be called after determining the proper ORB version, +- * and setting it on the stream's ORB instance. It can be called +- * after reading the service contexts, since that is the only place +- * we can get the ORB version info. +- * +- * Trying to unmarshal things requiring repository IDs before calling +- * this will result in NullPtrExceptions. +- */ +- public void performORBVersionSpecificInit() { +- // In the case of SystemExceptions, a stream is created +- // with its default constructor (and thus no impl is set). +- if (impl != null) +- impl.performORBVersionSpecificInit(); +- } +- +- /** +- * Resets any internal references to code set converters. +- * This is useful for forcing the CDR stream to reacquire +- * converters (probably from its subclasses) when state +- * has changed. +- */ +- public void resetCodeSetConverters() { +- impl.resetCodeSetConverters(); +- } +- +- public void setMessageMediator(MessageMediator messageMediator) +- { +- this.messageMediator = (CorbaMessageMediator) messageMediator; +- } +- +- public MessageMediator getMessageMediator() +- { +- return messageMediator; +- } +- +- // ValueInputStream ----------------------------- +- +- public void start_value() { +- impl.start_value(); +- } +- +- public void end_value() { +- impl.end_value(); +- } +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/copyobject/JavaOutputStream.sjava 2013-09-06 11:20:47.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/copyobject/JavaOutputStream.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,435 +0,0 @@ +-/* +- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +- * 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.corba.se.impl.encoding; +- +-import java.io.IOException; +-import java.io.Serializable; +-import java.math.BigDecimal; +-import java.nio.ByteBuffer; +- +-import org.omg.CORBA.TypeCode; +-import org.omg.CORBA.Principal; +-import org.omg.CORBA.Any; +- +-import com.sun.corba.se.pept.protocol.MessageMediator; +- +-import com.sun.corba.se.spi.orb.ORB; +-import com.sun.corba.se.spi.logging.CORBALogDomains; +-import com.sun.corba.se.spi.ior.iiop.GIOPVersion; +-import com.sun.corba.se.spi.protocol.CorbaMessageMediator; +- +-import com.sun.corba.se.impl.encoding.CodeSetConversion; +-import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry; +-import com.sun.corba.se.impl.orbutil.ORBConstants; +-import com.sun.corba.se.impl.logging.ORBUtilSystemException; +- +-/** +- * This is delegates to the real implementation. +- */ +-public abstract class CDROutputStream +- extends org.omg.CORBA_2_3.portable.OutputStream +- implements com.sun.corba.se.impl.encoding.MarshalOutputStream, +- org.omg.CORBA.DataOutputStream, org.omg.CORBA.portable.ValueOutputStream +-{ +-/* +- private CDROutputStreamBase impl; +- protected ORB orb ; +- protected ORBUtilSystemException wrapper ; +- protected CorbaMessageMediator corbaMessageMediator; +- +- +- // We can move this out somewhere later. For now, it serves its purpose +- // to create a concrete CDR delegate based on the GIOP version. +- private static class OutputStreamFactory { +- +- public static CDROutputStreamBase newOutputStream(ORB orb, GIOPVersion version) +- { +- switch(version.intValue()) { +- case GIOPVersion.VERSION_1_0: +- return new CDROutputStream_1_0(); +- case GIOPVersion.VERSION_1_1: +- return new CDROutputStream_1_1(); +- case GIOPVersion.VERSION_1_2: +- return new CDROutputStream_1_2(); +- default: +- ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb, +- CORBALogDomains.RPC_ENCODING ) ; +- // REVISIT - what is appropriate? INTERNAL exceptions +- // are really hard to track later. +- throw wrapper.unsupportedGiopVersion( version ) ; +- } +- } +- } +- +- // REVISIT - These two constructors should be re-factored to better hide +- // the fact that someone extending this class 'can' construct a CDROutputStream +- // that does not use pooled ByteBuffers. Right now, only EncapsOutputStream +- // does _not_ use pooled ByteBuffers, see EncapsOutputStream. +- +- // NOTE: When a stream is constructed for non-channel-backed sockets +- // it notifies the constructor not to use pooled (i.e, direct) +- // ByteBuffers. +- +- public CDROutputStream(ORB orb, +- GIOPVersion version, +- boolean littleEndian, +- BufferManagerWrite bufferManager, +- byte streamFormatVersion, +- boolean usePooledByteBuffers) +- { +- impl = OutputStreamFactory.newOutputStream(orb, version); +- impl.init(orb, littleEndian, bufferManager, streamFormatVersion, usePooledByteBuffers); +- +- impl.setParent(this); +- this.orb = orb ; +- this.wrapper = ORBUtilSystemException.get( orb, +- CORBALogDomains.RPC_ENCODING ) ; +- } +- +- public CDROutputStream(ORB orb, +- GIOPVersion version, +- boolean littleEndian, +- BufferManagerWrite bufferManager, +- byte streamFormatVersion) +- { +- this(orb, version, littleEndian, bufferManager, streamFormatVersion, true); +- } +-*/ +- +- private ByteArrayOutputStream bos ; +- private ObjectOutputStream oos ; +- +- public JavaOutputStream() +- { +- bos = new ByteArrayOutputStream() ; +- oos = new ObjectOutputStream( bos ) ; +- } +- +- // Provided by IIOPOutputStream and EncapsOutputStream +- public org.omg.CORBA.portable.InputStream create_input_stream() +- { +- ObjectInputStream ois = new ByteArrayInputStream( bos.toByteArray() ) ; +- +- return new JavaInputStream( ois ) ; +- } +- +- public final void write_boolean(boolean value) { +- impl.write_boolean(value); +- } +- public final void write_char(char value) { +- impl.write_char(value); +- } +- public final void write_wchar(char value) { +- impl.write_wchar(value); +- } +- public final void write_octet(byte value) { +- impl.write_octet(value); +- } +- public final void write_short(short value) { +- impl.write_short(value); +- } +- public final void write_ushort(short value) { +- impl.write_ushort(value); +- } +- public final void write_long(int value) { +- impl.write_long(value); +- } +- public final void write_ulong(int value) { +- impl.write_ulong(value); +- } +- public final void write_longlong(long value) { +- impl.write_longlong(value); +- } +- public final void write_ulonglong(long value) { +- impl.write_ulonglong(value); +- } +- public final void write_float(float value) { +- impl.write_float(value); +- } +- public final void write_double(double value) { +- impl.write_double(value); +- } +- public final void write_string(String value) { +- impl.write_string(value); +- } +- public final void write_wstring(String value) { +- impl.write_wstring(value); +- } +- +- public final void write_boolean_array(boolean[] value, int offset, int length) { +- impl.write_boolean_array(value, offset, length); +- } +- public final void write_char_array(char[] value, int offset, int length) { +- impl.write_char_array(value, offset, length); +- } +- public final void write_wchar_array(char[] value, int offset, int length) { +- impl.write_wchar_array(value, offset, length); +- } +- public final void write_octet_array(byte[] value, int offset, int length) { +- impl.write_octet_array(value, offset, length); +- } +- public final void write_short_array(short[] value, int offset, int length) { +- impl.write_short_array(value, offset, length); +- } +- public final void write_ushort_array(short[] value, int offset, int length){ +- impl.write_ushort_array(value, offset, length); +- } +- public final void write_long_array(int[] value, int offset, int length) { +- impl.write_long_array(value, offset, length); +- } +- public final void write_ulong_array(int[] value, int offset, int length) { +- impl.write_ulong_array(value, offset, length); +- } +- public final void write_longlong_array(long[] value, int offset, int length) { +- impl.write_longlong_array(value, offset, length); +- } +- public final void write_ulonglong_array(long[] value, int offset,int length) { +- impl.write_ulonglong_array(value, offset, length); +- } +- public final void write_float_array(float[] value, int offset, int length) { +- impl.write_float_array(value, offset, length); +- } +- public final void write_double_array(double[] value, int offset, int length) { +- impl.write_double_array(value, offset, length); +- } +- public final void write_Object(org.omg.CORBA.Object value) { +- impl.write_Object(value); +- } +- public final void write_TypeCode(TypeCode value) { +- impl.write_TypeCode(value); +- } +- public final void write_any(Any value) { +- impl.write_any(value); +- } +- +- public final void write_Principal(Principal value) { +- impl.write_Principal(value); +- } +- +- public final void write(int b) throws java.io.IOException { +- impl.write(b); +- } +- +- public final void write_fixed(java.math.BigDecimal value) { +- impl.write_fixed(value); +- } +- +- public final void write_Context(org.omg.CORBA.Context ctx, +- org.omg.CORBA.ContextList contexts) { +- impl.write_Context(ctx, contexts); +- } +- +- public final org.omg.CORBA.ORB orb() { +- return impl.orb(); +- } +- +- // org.omg.CORBA_2_3.portable.OutputStream +- public final void write_value(java.io.Serializable value) { +- impl.write_value(value); +- } +- +- public final void write_value(java.io.Serializable value, java.lang.Class clz) { +- impl.write_value(value, clz); +- } +- +- public final void write_value(java.io.Serializable value, String repository_id) { +- impl.write_value(value, repository_id); +- } +- +- public final void write_value(java.io.Serializable value, +- org.omg.CORBA.portable.BoxedValueHelper factory) { +- impl.write_value(value, factory); +- } +- +- public final void write_abstract_interface(java.lang.Object obj) { +- impl.write_abstract_interface(obj); +- } +- +- // java.io.OutputStream +- public final void write(byte b[]) throws IOException { +- impl.write(b); +- } +- +- public final void write(byte b[], int off, int len) throws IOException { +- impl.write(b, off, len); +- } +- +- public final void flush() throws IOException { +- impl.flush(); +- } +- +- public final void close() throws IOException { +- impl.close(); +- } +- +- // com.sun.corba.se.impl.encoding.MarshalOutputStream +- public final void start_block() { +- impl.start_block(); +- } +- +- public final void end_block() { +- impl.end_block(); +- } +- +- public final void putEndian() { +- impl.putEndian(); +- } +- +- public void writeTo(java.io.OutputStream s) +- throws IOException +- { +- impl.writeTo(s); +- } +- +- public final byte[] toByteArray() { +- return impl.toByteArray(); +- } +- +- // org.omg.CORBA.DataOutputStream +- public final void write_Abstract (java.lang.Object value) { +- impl.write_Abstract(value); +- } +- +- public final void write_Value (java.io.Serializable value) { +- impl.write_Value(value); +- } +- +- public final void write_any_array(org.omg.CORBA.Any[] seq, int offset, int length) { +- impl.write_any_array(seq, offset, length); +- } +- +- public void setMessageMediator(MessageMediator messageMediator) +- { +- this.corbaMessageMediator = (CorbaMessageMediator) messageMediator; +- } +- +- public MessageMediator getMessageMediator() +- { +- return corbaMessageMediator; +- } +- +- // org.omg.CORBA.portable.ValueBase +- public final String[] _truncatable_ids() { +- return impl._truncatable_ids(); +- } +- +- // Other +- protected final int getSize() { +- return impl.getSize(); +- } +- +- protected final int getIndex() { +- return impl.getIndex(); +- } +- +- protected int getRealIndex(int index) { +- // Used in indirections. Overridden by TypeCodeOutputStream. +- return index; +- } +- +- protected final void setIndex(int value) { +- impl.setIndex(value); +- } +- +- protected final ByteBuffer getByteBuffer() { +- return impl.getByteBuffer(); +- } +- +- protected final void setByteBuffer(ByteBuffer byteBuffer) { +- impl.setByteBuffer(byteBuffer); +- } +- +- public final boolean isLittleEndian() { +- return impl.isLittleEndian(); +- } +- +- // XREVISIT - return to final if possible +- // REVISIT - was protected - need access from msgtypes test. +- public ByteBufferWithInfo getByteBufferWithInfo() { +- return impl.getByteBufferWithInfo(); +- } +- +- protected void setByteBufferWithInfo(ByteBufferWithInfo bbwi) { +- impl.setByteBufferWithInfo(bbwi); +- } +- +- // REVISIT: was protected - but need to access from xgiop. +- public final BufferManagerWrite getBufferManager() { +- return impl.getBufferManager(); +- } +- +- public final void write_fixed(java.math.BigDecimal bigDecimal, short digits, short scale) { +- impl.write_fixed(bigDecimal, digits, scale); +- } +- +- public final void writeOctetSequenceTo(org.omg.CORBA.portable.OutputStream s) { +- impl.writeOctetSequenceTo(s); +- } +- +- public final GIOPVersion getGIOPVersion() { +- return impl.getGIOPVersion(); +- } +- +- public final void writeIndirection(int tag, int posIndirectedTo) { +- impl.writeIndirection(tag, posIndirectedTo); +- } +- +- // Use Latin-1 for GIOP 1.0 or when code set negotiation was not +- // performed. +- protected CodeSetConversion.CTBConverter createCharCTBConverter() { +- return CodeSetConversion.impl().getCTBConverter(OSFCodeSetRegistry.ISO_8859_1); +- } +- +- // Subclasses must decide what to do here. It's inconvenient to +- // make the class and this method abstract because of dup(). +- protected abstract CodeSetConversion.CTBConverter createWCharCTBConverter(); +- +- protected final void freeInternalCaches() { +- impl.freeInternalCaches(); +- } +- +- void printBuffer() { +- impl.printBuffer(); +- } +- +- public void alignOnBoundary(int octetBoundary) { +- impl.alignOnBoundary(octetBoundary); +- } +- +- // Needed by request and reply messages for GIOP versions >= 1.2 only. +- public void setHeaderPadding(boolean headerPadding) { +- impl.setHeaderPadding(headerPadding); +- } +- +- // ValueOutputStream ----------------------------- +- +- public void start_value(String rep_id) { +- impl.start_value(rep_id); +- } +- +- public void end_value() { +- impl.end_value(); +- } +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java 2013-09-06 11:20:47.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java 2014-01-18 12:16:06.000000000 -0800 @@ -82,11 +82,18 @@ super((ORB)orb); } @@ -242,8 +1258,8 @@ } } ---- corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. @@ -273,8 +1289,8 @@ } protected CodeSetConversion.BTCConverter createCharBTCConverter() { ---- corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. @@ -308,8 +1324,8 @@ } protected CodeSetConversion.CTBConverter createCharCTBConverter() { ---- corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. @@ -344,8 +1360,8 @@ } encap.setEnclosingInputStream(is); encap.makeEncapsulation(); ---- corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java 2014-01-18 12:16:06.000000000 -0800 @@ -61,6 +61,8 @@ import java.math.BigInteger; import java.nio.ByteBuffer; @@ -368,8 +1384,8 @@ //if (TypeCodeImpl.debug) { //System.out.println("Created TypeCodeInputStream " + tcis + " with no parent"); //tcis.printBuffer(); ---- corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java 2014-01-18 12:16:06.000000000 -0800 @@ -33,6 +33,8 @@ import com.sun.corba.se.spi.ior.iiop.GIOPVersion; import com.sun.corba.se.spi.logging.CORBALogDomains; @@ -391,8 +1407,175 @@ cdrIn.consumeEndian(); ---- corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/interceptors/ThreadCurrentStack.sjava 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/interceptors/ThreadCurrentStack.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,164 +0,0 @@ +-/* +- * Copyright (c) 2000, 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 com.sun.corba.se.impl.interceptors; +- +-import com.sun.corba.se.impl.corba.AnyImpl; +-import org.omg.PortableInterceptor.Current; +-import org.omg.PortableInterceptor.InvalidSlot; +- +-import com.sun.corba.se.impl.util.MinorCodes; +-import com.sun.corba.se.impl.core.ORB; +- +-/** +- * ThreadCurrentStack is the container of PICurrent instances for each thread +- */ +-public class ThreadCurrentStack +-{ +- // PICurrentPool is the container for reusable PICurrents +- private class PICurrentPool { +- +- // Contains a list of reusable PICurrents +- private java.util.ArrayList pool; +- +- // High water mark for the pool +- // If the pool size reaches this limit then putPICurrent will +- // not put PICurrent to the pool. +- private static final int HIGH_WATER_MARK = 5; +- +- // currentIndex points to the last PICurrent in the list +- private int currentIndex; +- +- PICurrentPool( ) { +- pool = new java.util.ArrayList( HIGH_WATER_MARK ); +- currentIndex = 0; +- } +- +- /** +- * Puts PICurrent to the re-usable pool. +- */ +- void putPICurrent( PICurrent current ) { +- // If there are enough PICurrents in the pool, then don't add +- // this current to the pool. +- if( currentIndex >= HIGH_WATER_MARK ) { +- return; +- } +- pool.add(currentIndex , current); +- currentIndex++; +- } +- +- /** +- * Gets PICurrent from the re-usable pool. +- */ +- PICurrent getPICurrent( ) { +- // If there are no entries in the pool then return null +- if( currentIndex == 0 ) { +- return null; +- } +- // Works like a stack, Gets the last one added first +- currentIndex--; +- return (PICurrent) pool.get(currentIndex); +- } +- } +- +- // Contains all the active PICurrents for each thread. +- // The ArrayList is made to behave like a stack. +- private java.util.ArrayList currentContainer; +- +- // Keeps track of number of PICurrents in the stack. +- private int currentIndex; +- +- // For Every Thread there will be a pool of re-usable ThreadCurrent's +- // stored in PICurrentPool +- private PICurrentPool currentPool; +- +- // The orb associated with this ThreadCurrentStack +- private ORB piOrb; +- +- /** +- * Constructs the stack and and PICurrentPool +- */ +- ThreadCurrentStack( ORB piOrb, PICurrent current ) { +- this.piOrb = piOrb; +- currentIndex = 0; +- currentContainer = new java.util.ArrayList( ); +- currentPool = new PICurrentPool( ); +- currentContainer.add( currentIndex, current ); +- currentIndex++; +- } +- +- +- /** +- * pushPICurrent goes through the following steps +- * 1: Checks to see if there is any PICurrent in PICurrentPool +- * If present then use that instance to push into the ThreadCurrentStack +- * +- * 2:If there is no PICurrent in the pool, then creates a new one and pushes +- * that into the ThreadCurrentStack +- */ +- void pushPICurrent( ) { +- PICurrent current = currentPool.getPICurrent( ); +- if( current == null ) { +- // get an existing PICurrent to get the slotSize +- PICurrent currentTemp = peekPICurrent(); +- current = new PICurrent( piOrb, currentTemp.getSlotSize( )); +- } +- currentContainer.add( currentIndex, current ); +- currentIndex++; +- } +- +- /** +- * popPICurrent does the following +- * 1: pops the top PICurrent in the ThreadCurrentStack +- * +- * 2: resets the slots in the PICurrent which resets the slotvalues to +- * null if there are any previous sets. +- * +- * 3: pushes the reset PICurrent into the PICurrentPool to reuse +- */ +- void popPICurrent( ) { +- // Do not pop the PICurrent, If there is only one. +- // This should not happen, But an extra check for safety. +- if( currentIndex <= 1 ) { +- throw new org.omg.CORBA.INTERNAL( +- "Cannot pop the only PICurrent in the stack", +- MinorCodes.CANT_POP_ONLY_CURRENT_2, +- CompletionStatus.COMPLETED_NO ); +- } +- currentIndex--; +- PICurrent current = (PICurrent)currentContainer.get( currentIndex ); +- current.resetSlots( ); +- currentPool.putPICurrent( current ); +- } +- +- /** +- * peekPICurrent gets the top PICurrent in the ThreadCurrentStack without +- * popping. +- */ +- PICurrent peekPICurrent( ) { +- return (PICurrent) currentContainer.get( currentIndex - 1); +- } +- +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. @@ -454,8 +1637,8 @@ String repositoryID, com.sun.org.omg.SendingContext.CodeBase sender, int offset) ---- corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java 2014-01-18 12:16:06.000000000 -0800 @@ -201,7 +201,7 @@ readObjectState.endDefaultReadObject(this); } @@ -465,8 +1648,8 @@ abstract void readFields(java.util.Map fieldToValueMap) throws java.io.InvalidClassException, java.io.StreamCorruptedException, ---- corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java 2014-04-19 01:27:00.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. @@ -853,8 +2036,8 @@ Package pkg1 = cl1.getPackage(), pkg2 = cl2.getPackage(); return ((pkg1 == pkg2) || ((pkg1 != null) && (pkg1.equals(pkg2)))); } ---- corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. @@ -882,8 +2065,8 @@ result.consumeEndian() ; return result ; } ---- corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java 2014-04-20 12:39:44.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. @@ -909,8 +2092,8 @@ ObjectKeyTemplate oktemp = create( is, fullKey, osh ) ; if (oktemp == null) ---- corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java 2013-09-06 11:20:48.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java 2014-04-20 12:39:43.000000000 -0700 +--- ./corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java 2013-09-06 11:20:48.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java 2014-01-18 12:16:06.000000000 -0800 @@ -70,6 +70,8 @@ import com.sun.corba.se.impl.encoding.EncapsInputStream ; import com.sun.corba.se.impl.encoding.EncapsOutputStream ; @@ -931,14 +2114,137 @@ istr.consumeEndian(); init( istr ) ; } ---- corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClassUtil_1_3.java 2013-09-06 11:20:49.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClassUtil_1_3.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * +--- ./corba/src/share/classes/com/sun/corba/se/impl/orbutil/DefineWrapper.sjava 2013-09-06 11:20:49.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/orbutil/DefineWrapper.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,120 +0,0 @@ +-package com.sun.corba.se.impl.orbutil ; +- +-import java.lang.reflect.Method; +-import java.lang.reflect.Modifier; +- +-/** This class provides just a main method. Its purpose is to allow -D arguments to +-* set up the system properties when starting programs with tools like OptimizeIt that +-* make this difficult or impossible. +-* +-* Invocation: {java launcher of some kind} DefineClass -Dxxx=yyy -Dxxx=yyy ... {class name} arg0, arg1, ... +-* Result: updates system properties with -D args, then uses reflection to invoke {class name}.main with the args +-*/ +- +-class DefineWrapper { +- public static void main( String[] args ) +- { +- int numberDefines = args.length ; +- String className = null ; +- +- for (int ctr=0; ctr() { -+ @Override -+ public StubFactoryProxyImpl run() { -+ return new StubFactoryProxyImpl(classData, classLoader); -+ } -+ }); - } - } ---- corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java 2013-09-06 11:20:50.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -115,6 +115,7 @@ - - import java.util.concurrent.ConcurrentMap; - import java.util.concurrent.ConcurrentHashMap; -+import sun.corba.EncapsInputStreamFactory; - - /** - * ClientDelegate is the RMI client-side subcontract or representation -@@ -847,8 +848,8 @@ - } - byte[] data = ((UnknownServiceContext)sc).getData(); - EncapsInputStream in = -- new EncapsInputStream((ORB)messageMediator.getBroker(), -- data, data.length); -+ EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(), -+ data, data.length); - in.consumeEndian(); - - String msg = ---- corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java 2013-09-06 11:20:50.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -36,7 +36,8 @@ - import java.util.Iterator; - import java.rmi.RemoteException; - import java.nio.ByteBuffer; +- +- return new IDLNameTranslatorImpl(new Class[] { interf } ); - -+import java.security.AccessController; -+import java.security.PrivilegedAction; - import javax.rmi.CORBA.Util; - import javax.rmi.CORBA.Tie; - -@@ -111,6 +112,7 @@ - import com.sun.corba.se.impl.protocol.giopmsgheaders.ProfileAddr; - import com.sun.corba.se.impl.protocol.giopmsgheaders.ReferenceAddr; - import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl; -+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; - import com.sun.corba.se.impl.util.JDKBridge; - - /** -@@ -156,10 +158,17 @@ - - ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo(); - cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); +- } - -- CDRInputObject cdrInputObject = -- new CDRInputObject(orb, null, bbwi.byteBuffer, -- cdrOutputObject.getMessageHeader()); -+ final ORB inOrb = orb; -+ final ByteBuffer inBuffer = bbwi.byteBuffer; -+ final Message inMsg = cdrOutputObject.getMessageHeader(); -+ CDRInputObject cdrInputObject = AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public CDRInputObject run() { -+ return new CDRInputObject(inOrb, null, inBuffer, -+ inMsg); -+ } -+ }); - messageMediator.setInputObject(cdrInputObject); - cdrInputObject.setMessageMediator(messageMediator); - -@@ -192,9 +201,17 @@ - cdrOutputObject = (CDROutputObject) messageMediator.getOutputObject(); - bbwi = cdrOutputObject.getByteBufferWithInfo(); - cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); -- cdrInputObject = -- new CDRInputObject(orb, null, bbwi.byteBuffer, -- cdrOutputObject.getMessageHeader()); -+ final ORB inOrb2 = orb; -+ final ByteBuffer inBuffer2 = bbwi.byteBuffer; -+ final Message inMsg2 = cdrOutputObject.getMessageHeader(); -+ cdrInputObject = AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public CDRInputObject run() { -+ return new CDRInputObject(inOrb2, null, inBuffer2, -+ inMsg2); -+ } -+ }); - messageMediator.setInputObject(cdrInputObject); - cdrInputObject.setMessageMediator(messageMediator); - ---- corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java 2013-09-06 11:20:50.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,8 @@ - import org.omg.CosNaming.NamingContextExt ; - import org.omg.CosNaming.NamingContextExtHelper ; - -+import sun.corba.EncapsInputStreamFactory; -+ - import com.sun.corba.se.spi.ior.IOR; - import com.sun.corba.se.spi.ior.IORTemplate; - import com.sun.corba.se.spi.ior.ObjectKey; -@@ -114,8 +116,8 @@ - buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); - buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); - } -- EncapsInputStream s = new EncapsInputStream(orb, buf, buf.length, -- orb.getORBData().getGIOPVersion()); -+ EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, -+ orb.getORBData().getGIOPVersion()); - s.consumeEndian(); - return s.read_Object() ; - } ---- corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java 2013-09-06 11:20:50.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -55,7 +55,7 @@ - /** - * @author Harold Carr - */ --public class SelectorImpl -+class SelectorImpl - extends - Thread - implements ---- corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java 2013-09-06 11:20:51.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -170,6 +170,12 @@ - // representing LogDomain and ExceptionGroup. - private Map wrapperMap ; - -+ static class Holder { -+ static final PresentationManager defaultPresentationManager = -+ setupPresentationManager(); -+ } -+ private static final Object pmLock = new Object(); -+ - private static Map staticWrapperMap = new ConcurrentHashMap(); - - protected MonitoringManager monitoringManager; -@@ -235,13 +241,24 @@ - */ - public static PresentationManager getPresentationManager() - { -- AppContext ac = AppContext.getAppContext(); -- PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class); -- if (pm == null) { -- pm = setupPresentationManager(); -- ac.put(PresentationManager.class, pm); -+ SecurityManager sm = System.getSecurityManager(); -+ if (sm != null && AppContext.getAppContexts().size() > 0) { -+ AppContext ac = AppContext.getAppContext(); -+ if (ac != null) { -+ synchronized (pmLock) { -+ PresentationManager pm = -+ (PresentationManager) ac.get(PresentationManager.class); -+ if (pm == null) { -+ pm = setupPresentationManager(); -+ ac.put(PresentationManager.class, pm); -+ } -+ return pm; -+ } -+ } - } -- return pm; -+ -+ // No security manager or AppContext -+ return Holder.defaultPresentationManager; - } - - /** Get the appropriate StubFactoryFactory. This ---- corba/src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java 2013-09-06 11:20:51.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java 2014-04-20 12:39:43.000000000 -0700 -@@ -36,6 +36,7 @@ - - import com.sun.corba.se.spi.logging.CORBALogDomains ; - import com.sun.corba.se.impl.logging.ORBUtilSystemException ; -+import com.sun.corba.se.impl.presentation.rmi.DynamicAccessPermission; - - public class CompositeInvocationHandlerImpl implements - CompositeInvocationHandler -@@ -46,11 +47,13 @@ - public void addInvocationHandler( Class interf, - InvocationHandler handler ) - { -+ checkAccess(); - classToInvocationHandler.put( interf, handler ) ; - } - - public void setDefaultHandler( InvocationHandler handler ) - { -+ checkAccess(); - defaultHandler = handler ; - } - -@@ -78,4 +81,14 @@ - - return handler.invoke( proxy, method, args ) ; - } -+ -+ private static final DynamicAccessPermission perm = new DynamicAccessPermission("access"); -+ private void checkAccess() { -+ final SecurityManager sm = System.getSecurityManager(); -+ if (sm != null) { -+ sm.checkPermission(perm); -+} -+ } -+ -+ private static final long serialVersionUID = 4571178305984833743L; - } ---- corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java 2013-09-06 11:20:52.000000000 -0700 -+++ corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java 2014-04-20 12:39:43.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -58,6 +58,9 @@ - import com.sun.corba.se.impl.util.Utility ; - import com.sun.corba.se.impl.logging.ORBUtilSystemException ; - -+import sun.corba.EncapsInputStreamFactory; -+ -+ - public class ServiceContexts { - private static boolean isDebugging( OutputStream os ) - { -@@ -198,11 +201,11 @@ - // Note: As of Jan 2001, no standard OMG or Sun service contexts - // ship wchar data or are defined as using anything but GIOP 1.0 CDR. - EncapsInputStream eis -- = new EncapsInputStream(orb, -- data, -- data.length, -- giopVersion, -- codeBase); -+ = EncapsInputStreamFactory.newEncapsInputStream(orb, -+ data, -+ data.length, -+ giopVersion, -+ codeBase); - eis.consumeEndian(); - - // Now the input stream passed to a ServiceContext ---- corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp 2013-09-06 11:20:53.000000000 -0700 -+++ corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp 2014-04-20 12:39:44.000000000 -0700 -@@ -110,7 +110,7 @@ - ParseException.badCustom=%0 (\u884C%1): forward\u5024\u5BA3\u8A00\u306Fcustom\u3068\u3057\u3066\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093\u3002\n%2\n%3 - ParseException.badRepIDAlreadyAssigned=%0 (\u884C%1): \u578B%2\u306B\u306F\u3001\u524D\u306EID\u30D7\u30E9\u30B0\u30DE\u30FB\u30C7\u30A3\u30EC\u30AF\u30C6\u30A3\u30D6\u306E\u30EA\u30DD\u30B8\u30C8\u30EAID\u304C\u3059\u3067\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4 - ParseException.badRepIDForm=%0 (\u884C%1): \u30EA\u30DD\u30B8\u30C8\u30EAID '%2'\u306E\u5F62\u5F0F\u306F':'\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n%3\n%4 --ParseException.badRepIDPrefix=%0 (\u884C%1): \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9%2\u306B\u306F\u3001'%4'\u3067\u306F\u306A\u304F\u30EA\u30DD\u30B8\u30C8\u30EAID\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9`%3'\u304C\u5FC5\u8981\u3067\u3059\u3002\n%5\n%6 -+ParseException.badRepIDPrefix=%0 (\u884C%1): \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9%2\u306B\u306F\u3001'%4'\u3067\u306F\u306A\u304F\u30EA\u30DD\u30B8\u30C8\u30EAID\u63A5\u982D\u8F9E`%3'\u304C\u5FC5\u8981\u3067\u3059\u3002\n%5\n%6 - ParseException.badState=%0 (\u884C%1): %2\u306F\u30B9\u30C6\u30FC\u30C8\u30D5\u30EB\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u8907\u6570\u306E\u30B9\u30C6\u30FC\u30C8\u30D5\u30EB\u89AA\u304C\u3042\u308A\u307E\u3059\u3002\n%3\n%4 - ParseException.branchLabel=%0 (\u884C%1): case %2\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4 - ParseException.branchName=%0 (\u884C%1): %2\u3068\u3044\u3046\u540D\u524D\u306E\u5206\u5C90\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4 ---- corba/src/share/classes/javax/rmi/CORBA/Stub.java 2013-09-06 11:20:53.000000000 -0700 -+++ corba/src/share/classes/javax/rmi/CORBA/Stub.java 2014-04-20 12:39:44.000000000 -0700 -@@ -61,13 +61,11 @@ - private transient StubDelegate stubDelegate = null; - private static Class stubDelegateClass = null; - private static final String StubClassKey = "javax.rmi.CORBA.StubClass"; -- private static final String defaultStubImplName = "com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl"; - - static { -- Object stubDelegateInstance = (Object) createDelegateIfSpecified(StubClassKey, defaultStubImplName); -+ Object stubDelegateInstance = createDelegate(StubClassKey); - if (stubDelegateInstance != null) - stubDelegateClass = stubDelegateInstance.getClass(); +- /** +- * Return an IDLNameTranslator for the given interfacex. +- * +- * @throws IllegalStateException if given classes are not valid +- * RMI/IIOP Remote Interfaces +- */ +- public static IDLNameTranslator get( Class[] interfaces ) +- { +- +- return new IDLNameTranslatorImpl(interfaces ); - - } +- } +- +- public static String getExceptionId( Class cls ) +- { +- // Requirements for this method: +- // 1. cls must be an exception but not a RemoteException. +- // 2. If cls has an IDL keyword name, an underscore is prepended (1.3.2.2). +- // 3. If cls jas a leading underscore, J is prepended (1.3.2.3). +- // 4. If cls has an illegal IDL ident char, it is mapped to UXXXX where +- // XXXX is the unicode value in hex of the char (1.3.2.4). +- // 5. double underscore for inner class (1.3.2.5). +- // 6. The ID is "IDL:" + name with / separators + ":1.0". +- IDLType itype = classToIDLType( cls ) ; +- return itype.getExceptionName() ; +- } +- +- public Class[] getInterfaces() +- { +- return interf_; +- } +- +- public Method[] getMethods() +- { +- return methods_ ; +- } +- +- public Method getMethod( String idlName ) +- { +- return (Method) IDLNameToMethodMap_.get(idlName); +- } +- +- public String getIDLName( Method method ) +- { +- return (String) methodToIDLNameMap_.get(method); +- } +- +- /** +- * Initialize an IDLNameTranslator for the given interface. +- * +- * @throws IllegalStateException if given class is not a valid +- * RMI/IIOP Remote Interface +- */ +- private IDLNameTranslatorImpl(Class[] interfaces) +- { +- +- try { +- IDLTypesUtil idlTypesUtil = new IDLTypesUtil(); +- for (int ctr=0; ctr and get methods. +- +- +- // +- // Perform case sensitivity test first. This applies to all +- // method names AND attributes. Compare each method name and +- // attribute to all other method names and attributes. If names +- // differ only in case, apply mangling as defined in section 1.3.2.7 +- // of Java2IDL spec. Note that we compare using the original names. +- // +- for(Iterator outerIter=allMethodInfo.values().iterator(); +- outerIter.hasNext();) { +- IDLMethodInfo outer = (IDLMethodInfo) outerIter.next(); +- for(Iterator innerIter = allMethodInfo.values().iterator(); +- innerIter.hasNext();) { +- IDLMethodInfo inner = (IDLMethodInfo) innerIter.next(); +- +- if( (outer != inner) && +- (!outer.originalName.equals(inner.originalName)) && +- outer.originalName.equalsIgnoreCase(inner.originalName) ) { +- outer.mangledName = +- mangleCaseSensitiveCollision(outer.originalName); +- break; +- } +- +- } +- } +- +- for(Iterator iter = allMethodInfo.values().iterator(); +- iter.hasNext();) { +- IDLMethodInfo next = (IDLMethodcurrentInfo) iter.next(); +- next.mangledName = +- mangleIdentifier(next.mangledName, +- next.propertyType != null); +- } +- +- // +- // Now check for overloaded method names and apply 1.3.2.6. +- // +- for(Iterator outerIter=allMethodInfo.values().iterator(); +- outerIter.hasNext();) { +- IDLMethodInfo outer = (IDLMethodInfo) outerIter.next(); +- if (outer.propertyType != null) { +- continue; +- } +- for(Iterator innerIter = allMethodInfo.values().iterator(); +- innerIter.hasNext();) { +- IDLMethodInfo inner = (IDLMethodInfo) innerIter.next(); +- +- if( (outer != inner) && +- (inner.propertyType == null) && +- outer.originalName.equals(inner.originalName) ) { +- outer.mangledName = mangleOverloadedMethod +- (outer.mangledName, outer.method); +- break; +- } +- } +- } +- +- // +- // Now mangle any properties that clash with method names. +- // +- for(Iterator outerIter=allMethodInfo.values().iterator(); +- outerIter.hasNext();) { +- IDLMethodInfo outer = (IDLMethodInfo) outerIter.next(); +- if(outer.propertyType == null) { +- continue; +- } +- for(Iterator innerIter = allMethodInfo.values().iterator(); +- innerIter.hasNext();) { +- IDLMethodInfo inner = (IDLMethodInfo) innerIter.next(); +- if( (outer != inner) && +- (inner.propertyType == null) && +- outer.mangledName.equals(inner.mangledName) ) { +- outer.mangledName = outer.mangledName + +- ATTRIBUTE_METHOD_CLASH_MANGLE_CHARS; +- break; +- } +- } +- } +- +- // +- // Ensure that no mapped method names clash with mapped name +- // of container(1.3.2.9). This is a case insensitive comparison. +- // +- for (int ctr=0; ctr and get, +- // map only is to an attribute, and leave the +- // get method alone. +- if( IDLNameToMethodMap_.containsKey(idlName) ) { +- // @@@ I18N +- Method clash = (Method) IDLNameToMethodMap_.get(idlName); +- MethodInfo clashMethodInfo = +- (MethodInfo)allMethodInfo.get( clash ) ; +- if (clashMethodInfo.isBooleanProperty() && +- next.isReadProperty()) { +- // fix idlName +- } else if (clashMethodInfo.isReadProperty() && +- next.isBooleanProperty()) { +- // Remove entry under idlName +- // put entry into table under correct name +- } else { +- throw new IllegalStateException("Error : methods " + +- clash + " and " + next.method + +- " both result in IDL name '" + idlName + "'"); +- } +- } +- +- IDLNameToMethodMap_.put(idlName, next.method); +- } +- +- return; +- +- } +- +- +- /** +- * Perform all necessary stand-alone identifier mangling operations +- * on a java identifier that is being transformed into an IDL name. +- * That is, mangling operations that don't require looking at anything +- * else but the identifier itself. This covers sections 1.3.2.2, 1.3.2.3, +- * and 1.3.2.4 of the Java2IDL spec. Method overloading and +- * case-sensitivity checks are handled elsewhere. +- */ +- +- private static String mangleIdentifier(String identifier) { +- return mangleIdentifier(identifier, false); +- } +- +- private static String mangleIdentifier(String identifier, boolean attribute) { +- +- String mangledName = identifier; +- +- // +- // Apply leading underscore test (1.3.2.3) +- // This should be done before IDL Keyword clash test, since clashing +- // IDL keywords are mangled by adding a leading underscore. +- // +- if( hasLeadingUnderscore(mangledName) ) { +- mangledName = mangleLeadingUnderscore(mangledName); +- } +- +- // +- // Apply IDL keyword clash test (1.3.2.2). +- // This is not needed for attributes since when the full property +- // name is composed it cannot clash with an IDL keyword. +- // (Also, rmic doesn't do it.) +- // +- +- if( !attribute && isIDLKeyword(mangledName) ) { +- mangledName = mangleIDLKeywordClash(mangledName); +- } +- +- // +- // Replace illegal IDL identifier characters (1.3.2.4) +- // for all method names and attributes. +- // +- if( !isIDLIdentifier(mangledName) ) { +- mangledName = mangleUnicodeChars(mangledName); +- } +- +- return mangledName; +- } +- +- /** +- * Checks whether a java identifier clashes with an +- * IDL keyword. Note that this is a case-insensitive +- * comparison. +- * +- * Used to implement section 1.3.2.2 of Java2IDL spec. +- */ +- private static boolean isIDLKeyword(String identifier) { +- +- String identifierAllCaps = identifier.toUpperCase(); +- +- return idlKeywords_.contains(identifierAllCaps); +- } +- +- private static String mangleIDLKeywordClash(String identifier) { +- return UNDERSCORE + identifier; +- } +- +- private static String mangleLeadingUnderscore(String identifier) { +- return LEADING_UNDERSCORE_CHAR + identifier; +- } +- +- /** +- * Checks whether a java identifier starts with an underscore. +- * Used to implement section 1.3.2.3 of Java2IDL spec. +- */ +- private static boolean hasLeadingUnderscore(String identifier) { +- return identifier.startsWith(UNDERSCORE); +- } +- +- /** +- * Implements Section 1.3.2.4 of Java2IDL Mapping. +- * All non-IDL identifier characters must be replaced +- * with their Unicode representation. +- */ +- static String mangleUnicodeChars(String identifier) { +- StringBuffer mangledIdentifier = new StringBuffer(); +- +- for(int i = 0; i < identifier.length(); i++) { +- char nextChar = identifier.charAt(i); +- if( isIDLIdentifierChar(nextChar) ) { +- mangledIdentifier.append(nextChar); +- } else { +- String unicode = charToUnicodeRepresentation(nextChar); +- mangledIdentifier.append(unicode); +- } +- } +- +- return mangledIdentifier.toString(); +- } +- +- /** +- * Implements mangling portion of Section 1.3.2.7 of Java2IDL spec. +- * This method only deals with the actual mangling. Decision about +- * whether case-sensitive collision mangling is required is made +- * elsewhere. +- * +- * +- * "...a mangled name is generated consisting of the original name +- * followed by an underscore separated list of decimal indices +- * into the string, where the indices identify all the upper case +- * characters in the original string. Indices are zero based." +- * +- */ +- String mangleCaseSensitiveCollision(String identifier) { +- +- StringBuffer mangledIdentifier = new StringBuffer(identifier); +- +- // There is always at least one trailing underscore, whether or +- // not the identifier has uppercase letters. +- mangledIdentifier.append(UNDERSCORE); +- +- boolean needUnderscore = false; +- for(int i = 0; i < identifier.length(); i++) { +- char next = identifier.charAt(i); +- if( Character.isUpperCase(next) ) { +- // This bit of logic is needed to ensure that we have +- // an underscore separated list of indices but no +- // trailing underscores. Basically, after we have at least +- // one uppercase letter, we always put an undercore before +- // printing the next one. +- if( needUnderscore ) { +- mangledIdentifier.append(UNDERSCORE); +- } +- mangledIdentifier.append(i); +- needUnderscore = true; +- } +- } +- +- return mangledIdentifier.toString(); +- } +- +- private static String mangleContainerClash(String identifier) { +- return identifier + ID_CONTAINER_CLASH_CHAR; +- } +- +- /** +- * Implements Section 1.3.2.9 of Java2IDL Mapping. Container in this +- * context means the name of the java Class(excluding package) in which +- * the identifier is defined. Comparison is case-insensitive. +- */ +- private static boolean identifierClashesWithContainer +- (String mappedContainerName, String identifier) { +- +- return identifier.equalsIgnoreCase(mappedContainerName); +- } +- +- /** +- * Returns Unicode mangling as defined in Section 1.3.2.4 of +- * Java2IDL spec. +- * +- * "For Java identifiers that contain illegal OMG IDL identifier +- * characters such as '$' or Unicode characters outside of ISO Latin 1, +- * any such illegal characters are replaced by "U" followed by the +- * 4 hexadecimal characters(in upper case) representing the Unicode +- * value. So, the Java name a$b is mapped to aU0024b and +- * x\u03bCy is mapped to xU03BCy." +- */ +- public static String charToUnicodeRepresentation(char c) { +- +- int orig = (int) c; +- StringBuffer hexString = new StringBuffer(); +- +- int value = orig; +- +- while( value > 0 ) { +- int div = value / 16; +- int mod = value % 16; +- hexString.insert(0, HEX_DIGITS[mod]); +- value = div; +- } +- +- int numZerosToAdd = 4 - hexString.length(); +- for(int i = 0; i < numZerosToAdd; i++) { +- hexString.insert(0, "0"); +- } +- +- hexString.insert(0, "U"); +- return hexString.toString(); +- } +- +- private static boolean isIDLIdentifier(String identifier) { +- +- boolean isIdentifier = true; +- +- for(int i = 0; i < identifier.length(); i++) { +- char nextChar = identifier.charAt(i); +- // 1st char must be alphbetic. +- isIdentifier = (i == 0) ? +- isIDLAlphabeticChar(nextChar) : +- isIDLIdentifierChar(nextChar); +- if( !isIdentifier ) { +- break; +- } +- } +- +- return isIdentifier; +- +- } +- +- private static boolean isIDLIdentifierChar(char c) { +- return (isIDLAlphabeticChar(c) || +- isIDLDecimalDigit(c) || +- isUnderscore(c)); +- } +- +- /** +- * True if character is one of 114 Alphabetic characters as +- * specified in Table 2 of Chapter 3 in CORBA spec. +- */ +- private static boolean isIDLAlphabeticChar(char c) { +- +- // NOTE that we can't use the java.lang.Character +- // isUpperCase, isLowerCase, etc. methods since they +- // include many characters other than the Alphabetic list in +- // the CORBA spec. Instead, we test for inclusion in the +- // Unicode value ranges for the corresponding legal characters. +- +- boolean alphaChar = +- ( +- // A - Z +- ((c >= 0x0041) && (c <= 0x005A)) +- +- || +- +- // a - z +- ((c >= 0x0061) && (c <= 0x007A)) +- +- || +- +- // other letter uppercase, other letter lowercase, which is +- // the entire upper half of C1 Controls except X and / +- ((c >= 0x00C0) && (c <= 0x00FF) +- && (c != 0x00D7) && (c != 0x00F7))); +- +- return alphaChar; +- } +- +- /** +- * True if character is one of 10 Decimal Digits +- * specified in Table 3 of Chapter 3 in CORBA spec. +- */ +- private static boolean isIDLDecimalDigit(char c) { +- return ( (c >= 0x0030) && (c <= 0x0039) ); +- } +- +- private static boolean isUnderscore(char c) { +- return ( c == 0x005F ); +- } +- +- /** +- * Mangle an overloaded method name as defined in Section 1.3.2.6 of +- * Java2IDL spec. Current value of method name is passed in as argument. +- * We can't start from original method name since the name might have +- * been partially mangled as a result of the other rules. +- */ +- private static String mangleOverloadedMethod(String mangledName, Method m) { +- +- IDLTypesUtil idlTypesUtil = new IDLTypesUtil(); +- +- // Start by appending the separator string +- String newMangledName = mangledName + OVERLOADED_TYPE_SEPARATOR; +- +- Class[] parameterTypes = m.getParameterTypes(); +- +- for(int i = 0; i < parameterTypes.length; i++) { +- Class nextParamType = parameterTypes[i]; +- +- if( i > 0 ) { +- newMangledName = newMangledName + OVERLOADED_TYPE_SEPARATOR; +- } +- IDLType idlType = classToIDLType(nextParamType); +- +- String moduleName = idlType.getModuleName(); +- String memberName = idlType.getMemberName(); +- +- String typeName = (moduleName.length() > 0) ? +- moduleName + UNDERSCORE + memberName : memberName; +- +- if( !idlTypesUtil.isPrimitive(nextParamType) && +- (idlTypesUtil.getSpecialCaseIDLTypeMapping(nextParamType) +- == null) && +- isIDLKeyword(typeName) ) { +- typeName = mangleIDLKeywordClash(typeName); +- } +- +- typeName = mangleUnicodeChars(typeName); +- +- newMangledName = newMangledName + typeName; +- } +- +- return newMangledName; +- } +- +- +- private static IDLType classToIDLType(Class c) { +- +- IDLType idlType = null; +- IDLTypesUtil idlTypesUtil = new IDLTypesUtil(); +- +- if( idlTypesUtil.isPrimitive(c) ) { +- +- idlType = idlTypesUtil.getPrimitiveIDLTypeMapping(c); +- +- } else if( c.isArray() ) { +- +- // Calculate array depth, as well as base element type. +- Class componentType = c.getComponentType(); +- int numArrayDimensions = 1; +- while(componentType.isArray()) { +- componentType = componentType.getComponentType(); +- numArrayDimensions++; +- } +- IDLType componentIdlType = classToIDLType(componentType); +- +- String[] modules = BASE_IDL_ARRAY_MODULE_TYPE; +- if( componentIdlType.hasModule() ) { +- modules = (String[])ObjectUtility.concatenateArrays( modules, +- componentIdlType.getModules() ) ; +- } +- +- String memberName = BASE_IDL_ARRAY_ELEMENT_TYPE + +- numArrayDimensions + UNDERSCORE + +- componentIdlType.getMemberName(); +- +- idlType = new IDLType(c, modules, memberName); +- +- } else { +- idlType = idlTypesUtil.getSpecialCaseIDLTypeMapping(c); +- +- if (idlType == null) { +- // Section 1.3.2.5 of Java2IDL spec defines mangling rules for +- // inner classes. +- String memberName = getUnmappedContainerName(c); +- +- // replace inner class separator with double underscore +- memberName = memberName.replaceAll("\\$", +- INNER_CLASS_SEPARATOR); +- +- if( hasLeadingUnderscore(memberName) ) { +- memberName = mangleLeadingUnderscore(memberName); +- } +- +- // Get raw package name. If there is a package, it +- // will still have the "." separators and none of the +- // mangling rules will have been applied. +- String packageName = getPackageName(c); +- +- if (packageName == null) { +- idlType = new IDLType( c, memberName ) ; +- } else { +- // If this is a generated IDL Entity Type we need to +- // prepend org_omg_boxedIDL per sections 1.3.5 and 1.3.9 +- if (idlTypesUtil.isEntity(c)) { +- packageName = "org.omg.boxedIDL." + packageName ; +- } +- +- // Section 1.3.2.1 and 1.3.2.6 of Java2IDL spec defines +- // rules for mapping java packages to IDL modules and for +- // mangling module name portion of type name. NOTE that +- // of the individual identifier mangling rules, +- // only the leading underscore test is done here. +- // The other two(IDL Keyword, Illegal Unicode chars) are +- // done in mangleOverloadedMethodName. +- StringTokenizer tokenizer = +- new StringTokenizer(packageName, "."); +- +- String[] modules = new String[ tokenizer.countTokens() ] ; +- int index = 0 ; +- while (tokenizer.hasMoreElements()) { +- String next = tokenizer.nextToken(); +- String nextMangled = hasLeadingUnderscore(next) ? +- mangleLeadingUnderscore(next) : next; +- +- modules[index++] = nextMangled ; +- } +- +- idlType = new IDLType(c, modules, memberName); +- } +- } +- } +- +- return idlType; +- } +- +- /** +- * Return Class' package name or null if there is no package. +- */ +- private static String getPackageName(Class c) { +- Package thePackage = c.getPackage(); +- String packageName = null; +- +- // Try to get package name by introspection. Some classloaders might +- // not provide this information, so check for null. +- if( thePackage != null ) { +- packageName = thePackage.getName(); +- } else { +- // brute force method +- String fullyQualifiedClassName = c.getName(); +- int lastDot = fullyQualifiedClassName.indexOf('.'); +- packageName = (lastDot == -1) ? null : +- fullyQualifiedClassName.substring(0, lastDot); +- } +- return packageName; +- } +- +- private static String getMappedContainerName(Class c) { +- String unmappedName = getUnmappedContainerName(c); +- +- return mangleIdentifier(unmappedName); +- } +- +- /** +- * Return portion of class name excluding package name. +- */ +- private static String getUnmappedContainerName(Class c) { +- +- String memberName = null; +- String packageName = getPackageName(c); +- +- String fullyQualifiedClassName = c.getName(); +- +- if( packageName != null ) { +- int packageLength = packageName.length(); +- memberName = fullyQualifiedClassName.substring(packageLength + 1); +- } else { +- memberName = fullyQualifiedClassName; +- +- } +- +- return memberName; +- } +- +- /** +- * Internal helper class for tracking information related to each +- * interface method while we're building the name translation table. +- */ +- private static class IDLMethodInfo +- { +- public Method method; +- public String propertyType; +- +- // If this is a property, originalName holds the original +- // attribute name. Otherwise, it holds the original method name. +- public String originalName; +- +- // If this is a property, mangledName holds the mangled attribute +- // name. Otherwise, it holds the mangled method name. +- public String mangledName; +- +- } +- +- public String toString() { +- +- StringBuffer contents = new StringBuffer(); +- contents.append("IDLNameTranslator[" ); +- for( int ctr=0; ctr 0 ) { +- String className = args[0]; +- try { +- remoteInterface = Class.forName(className); +- } catch(Exception e) { +- e.printStackTrace(); +- System.exit(-1); +- } +- } +- +- System.out.println("Building name translation for " + remoteInterface); +- try { +- IDLNameTranslator nameTranslator = +- IDLNameTranslatorImpl.get(remoteInterface); +- System.out.println(nameTranslator); +- } catch(IllegalStateException ise) { +- ise.printStackTrace(); +- } +- } +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLTypesUtil_save.sjava 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLTypesUtil_save.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,520 +0,0 @@ +- +-package com.sun.corba.se.impl.presentation.rmi ; +- +-import java.lang.reflect.Method; +-import java.lang.reflect.Field; +-import java.util.Set; +-import java.util.HashSet; +-import java.util.Iterator; +- +-/** +- * Utility class for testing RMI/IDL Types as defined in +- * Section 1.2 of The Java Language to IDL Mapping. Note that +- * these are static checks only. Runtime checks, such as those +- * described in Section 1.2.3, #3, are not covered. +- */ +-public class IDLTypesUtil { +- +- public static final String JAVA_GET_PROPERTY_PREFIX = "get"; +- public static final String JAVA_SET_PROPERTY_PREFIX = "set"; +- public static final String JAVA_IS_PROPERTY_PREFIX = "is"; +- +- public static final int VALID_TYPE = 0; +- public static final int INVALID_TYPE = 1; +- +- /** +- * Validate a class to ensure it conforms to the rules for a +- * Java RMI/IIOP interface. +- * +- * @throws IDLTypeException if not a valid RMI/IIOP interface. +- */ +- public void validateRemoteInterface(Class c) throws IDLTypeException +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- if( !c.isInterface() ) { +- String msg = "Class " + c + " must be a java interface."; +- throw new IDLTypeException(msg); +- } +- +- if( !java.rmi.Remote.class.isAssignableFrom(c) ) { +- String msg = "Class " + c + " must extend java.rmi.Remote, " + +- "either directly or indirectly."; +- throw new IDLTypeException(msg); +- } +- +- // Get all methods, including super-interface methods. +- Method[] methods = c.getMethods(); +- +- for(int i = 0; i < methods.length; i++) { +- Method next = methods[i]; +- validateExceptions(next); +- } +- +- // Removed because of bug 4989053 +- // validateDirectInterfaces(c); +- validateConstants(c); +- +- return; +- } +- +- public boolean isRemoteInterface(Class c) +- { +- boolean remoteInterface = true; +- try { +- validateRemoteInterface(c); +- } catch(IDLTypeException ite) { +- remoteInterface = false; +- } +- +- return remoteInterface; +- } +- +- /** +- * Section 1.2.2 Primitive Types +- */ +- public boolean isPrimitive(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- return c.isPrimitive(); +- } +- +- /** +- * Section 1.2.4 +- */ +- public boolean isValue(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- return +- (!c.isInterface() && +- java.io.Serializable.class.isAssignableFrom(c) && +- !java.rmi.Remote.class.isAssignableFrom(c)); +- } +- +- /** +- * Section 1.2.5 +- */ +- public boolean isArray(Class c) +- { +- boolean arrayType = false; +- +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- if( c.isArray() ) { +- Class componentType = c.getComponentType(); +- arrayType = +- (isPrimitive(componentType) || isRemoteInterface(componentType) || +- isEntity(componentType) || isException(componentType) || +- isValue(componentType) || isObjectReference(componentType) ); +- } +- +- return arrayType; +- } +- +- /** +- * Section 1.2.6 +- */ +- public boolean isException(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- // Must be a checked exception, not including RemoteException or +- // its subclasses. +- return isCheckedException(c) && !isRemoteException(c) && isValue(c); +- } +- +- public boolean isRemoteException(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- return java.rmi.RemoteException.class.isAssignableFrom(c) ; +- } +- +- public boolean isCheckedException(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- return Throwable.class.isAssignableFrom(c) && +- !RuntimeException.class.isAssignableFrom(c) && +- !Error.class.isAssignableFrom(c) ; +- } +- +- /** +- * Section 1.2.7 +- */ +- public boolean isObjectReference(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- return (c.isInterface() && +- org.omg.CORBA.Object.class.isAssignableFrom(c)); +- } +- +- /** +- * Section 1.2.8 +- */ +- public boolean isEntity(Class c) +- { +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- Class superClass = c.getSuperclass(); +- return (!c.isInterface() && +- (superClass != null) && +- (org.omg.CORBA.portable.IDLEntity.class.isAssignableFrom(c))); +- } +- +- public String javaPropertyPrefixToIDL( String javaPrefix ) +- { +- return "_" + javaPrefix + "_" ; +- } +- +- /** +- * Return the property type if given method is legal property accessor as defined in +- * Section 1.3.4.3 of Java2IDL spec. Result is one of: JAVA_GET_PROPERTY_PREFIX, +- * JAVA_SET_PROPERTY_PREFIX, JAVA_IS_PROPERTY_PREFIX. +- */ +- public String propertyAccessorMethodType(Method m, Class c) { +- +- String methodName = m.getName(); +- Class returnType = m.getReturnType(); +- Class[] parameters = m.getParameterTypes(); +- Class[] exceptionTypes = m.getExceptionTypes(); +- String propertyType = null; +- +- if( methodName.startsWith(JAVA_GET_PROPERTY_PREFIX) ) { +- +- if((parameters.length == 0) && (returnType != Void.TYPE) && +- !hasCorrespondingReadProperty(m, c, JAVA_IS_PROPERTY_PREFIX) { +- propertyType = JAVA_GET_PROPERTY_PREFIX; +- } +- +- } else if( methodName.startsWith(JAVA_SET_PROPERTY_PREFIX) ) { +- +- if((returnType == Void.TYPE) && (parameters.length == 1)) { +- if (hasCorrespondingReadProperty(m, c, JAVA_GET_PROPERTY_PREFIX) || +- hasCorrespondingReadProperty(m, c, JAVA_IS_PROPERTY_PREFIX)) { +- propertyType = JAVA_SET_PROPERTY_PREFIX; +- } +- } +- +- } else if( methodName.startsWith(JAVA_IS_PROPERTY_PREFIX) ) { +- if((parameters.length == 0) && (returnType == Boolean.TYPE)) { +- propertyType = JAVA_IS_PROPERTY_PREFIX; +- } +- } +- +- // Some final checks that apply to all properties. +- if( propertyType != null ) { +- if(!validPropertyExceptions(m) || +- (methodName.length() <= propertyType.length())) { +- propertyType = null; +- } +- } +- +- return propertyType ; +- } +- +- private boolean hasCorrespondingReadProperty +- (Method writeProperty, Class c, String readPropertyPrefix) { +- +- String writePropertyMethodName = writeProperty.getName(); +- Class[] writePropertyParameters = writeProperty.getParameterTypes(); +- boolean foundReadProperty = false; +- +- try { +- // Look for a valid corresponding Read property +- String readPropertyMethodName = +- writePropertyMethodName.replaceFirst +- (JAVA_SET_PROPERTY_PREFIX, readPropertyPrefix); +- Method readPropertyMethod = c.getMethod(readPropertyMethodName, +- new Class[] {}); +- foundReadProperty = +- ((propertyAccessorMethodType(readPropertyMethod, c) != null) && +- (readPropertyMethod.getReturnType() == +- writePropertyParameters[0])); +- } catch(Exception e) { +- // ignore. this means we didn't find a corresponding get property. +- } +- +- return foundReadProperty; +- } +- +- public String getAttributeNameForProperty(String propertyName) { +- String attributeName = null; +- String prefix = null; +- +- if( propertyName.startsWith(JAVA_GET_PROPERTY_PREFIX) ) { +- prefix = JAVA_GET_PROPERTY_PREFIX; +- } else if( propertyName.startsWith(JAVA_SET_PROPERTY_PREFIX) ) { +- prefix = JAVA_SET_PROPERTY_PREFIX; +- } else if( propertyName.startsWith(JAVA_IS_PROPERTY_PREFIX) ) { +- prefix = JAVA_IS_PROPERTY_PREFIX; +- } +- +- if( (prefix != null) && (prefix.length() < propertyName.length()) ) { +- String remainder = propertyName.substring(prefix.length()); +- if( (remainder.length() >= 2) && +- Character.isUpperCase(remainder.charAt(0)) && +- Character.isUpperCase(remainder.charAt(1)) ) { +- // don't set the first letter to lower-case if the +- // first two are upper-case +- attributeName = remainder; +- } else { +- attributeName = Character.toLowerCase(remainder.charAt(0)) + +- remainder.substring(1); +- } +- } +- +- return attributeName; +- } +- +- /** +- * Return IDL Type name for primitive types as defined in +- * Section 1.3.3 of Java2IDL spec or null if not a primitive type. +- */ +- public IDLType getPrimitiveIDLTypeMapping(Class c) { +- +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- if( c.isPrimitive() ) { +- if( c == Void.TYPE ) { +- return new IDLType( c, "void" ) ; +- } else if( c == Boolean.TYPE ) { +- return new IDLType( c, "boolean" ) ; +- } else if( c == Character.TYPE ) { +- return new IDLType( c, "wchar" ) ; +- } else if( c == Byte.TYPE ) { +- return new IDLType( c, "octet" ) ; +- } else if( c == Short.TYPE ) { +- return new IDLType( c, "short" ) ; +- } else if( c == Integer.TYPE ) { +- return new IDLType( c, "long" ) ; +- } else if( c == Long.TYPE ) { +- return new IDLType( c, "long_long" ) ; +- } else if( c == Float.TYPE ) { +- return new IDLType( c, "float" ) ; +- } else if( c == Double.TYPE ) { +- return new IDLType( c, "double" ) ; +- } +- } +- +- return null; +- } +- +- /** +- * Return IDL Type name for special case type mappings as defined in +- * Table 1-1 of Java2IDL spec or null if given class is not a special +- * type. +- */ +- public IDLType getSpecialCaseIDLTypeMapping(Class c) { +- +- if( c == null ) { +- throw new IllegalArgumentException(); +- } +- +- if( c == java.lang.Object.class ) { +- return new IDLType( c, new String[] { "java", "lang" }, +- "Object" ) ; +- } else if( c == java.lang.String.class ) { +- return new IDLType( c, new String[] { "CORBA" }, +- "WStringValue" ) ; +- } else if( c == java.lang.Class.class ) { +- return new IDLType( c, new String[] { "javax", "rmi", "CORBA" }, +- "ClassDesc" ) ; +- } else if( c == java.io.Serializable.class ) { +- return new IDLType( c, new String[] { "java", "io" }, +- "Serializable" ) ; +- } else if( c == java.io.Externalizable.class ) { +- return new IDLType( c, new String[] { "java", "io" }, +- "Externalizable" ) ; +- } else if( c == java.rmi.Remote.class ) { +- return new IDLType( c, new String[] { "java", "rmi" }, +- "Remote" ) ; +- } else if( c == org.omg.CORBA.Object.class ) { +- return new IDLType( c, "Object" ) ; +- } else { +- return null; +- } +- } +- +- /** +- * Implements 1.2.3 #2 and #4 +- */ +- private void validateExceptions(Method method) throws IDLTypeException { +- +- Class[] exceptions = method.getExceptionTypes(); +- +- boolean declaresRemoteExceptionOrSuperClass = false; +- +- // Section 1.2.3, #2 +- for(int eIndex = 0; eIndex < exceptions.length; eIndex++) { +- Class exception = exceptions[eIndex]; +- if( isRemoteExceptionOrSuperClass(exception) ) { +- declaresRemoteExceptionOrSuperClass = true; +- break; +- } +- } +- +- if( !declaresRemoteExceptionOrSuperClass ) { +- String msg = "Method '" + method + "' must throw at least one " + +- "exception of type java.rmi.RemoteException or one of its " + +- "super-classes"; +- throw new IDLTypeException(msg); +- } +- +- // Section 1.2.3, #4 +- // See also bug 4972402 +- // For all exceptions E in exceptions, +- // (isCheckedException(E) => (isValue(E) || RemoteException.isAssignableFrom( E ) ) +- for(int eIndex = 0; eIndex < exceptions.length; eIndex++) { +- Class exception = exceptions[eIndex]; +- +- if (isCheckedException(exception) && !isValue(exception) && +- !isRemoteException(exception)) +- { +- String msg = "Exception '" + exception + "' on method '" + +- method + "' is not a allowed RMI/IIOP exception type"; +- throw new IDLTypeException(msg); +- } +- } +- +- return; +- } +- +- /** +- * Returns true if the method's throw clause conforms to the exception +- * restrictions for properties as defined in Section 1.3.4.3 of +- * Java2IDL spec. This means that for all exceptions E declared on the +- * method, E isChecked => RemoteException.isAssignableFrom( E ). +- */ +- private boolean validPropertyExceptions(Method method) +- { +- Class[] exceptions = method.getExceptionTypes(); +- +- for(int eIndex = 0; eIndex < exceptions.length; eIndex++) { +- Class exception = exceptions[eIndex]; +- +- if (isCheckedException(exception) && !isRemoteException(exception)) +- return false ; +- } +- +- return true; +- } +- +- /** +- * Implements Section 1.2.3, #2. +- */ +- private boolean isRemoteExceptionOrSuperClass(Class c) { +- return +- ((c == java.rmi.RemoteException.class) || +- (c == java.io.IOException.class) || +- (c == java.lang.Exception.class) || +- (c == java.lang.Throwable.class)); +- } +- +- /** +- * Implements Section 1.2.3, #5. +- */ +- private void validateDirectInterfaces(Class c) throws IDLTypeException { +- +- Class[] directInterfaces = c.getInterfaces(); +- +- if( directInterfaces.length < 2 ) { +- return; +- } +- +- Set allMethodNames = new HashSet(); +- Set currentMethodNames = new HashSet(); +- +- for(int i = 0; i < directInterfaces.length; i++) { +- Class next = directInterfaces[i]; +- Method[] methods = next.getMethods(); +- +- // Comparison is based on method names only. First collect +- // all methods from current interface, eliminating duplicate +- // names. +- currentMethodNames.clear(); +- for(int m = 0; m < methods.length; m++) { +- currentMethodNames.add(methods[m].getName()); +- } +- +- // Now check each method against list of all unique method +- // names processed so far. +- for(Iterator iter=currentMethodNames.iterator(); iter.hasNext();) { +- String methodName = (String) iter.next(); +- if( allMethodNames.contains(methodName) ) { +- String msg = "Class " + c + " inherits method " + +- methodName + " from multiple direct interfaces."; +- throw new IDLTypeException(msg); +- } else { +- allMethodNames.add(methodName); +- } +- } +- } +- +- return; +- } +- +- /** +- * Implements 1.2.3 #6 +- */ +- private void validateConstants(final Class c) +- throws IDLTypeException { +- +- Field[] fields = null; +- +- try { +- fields = (Field[]) +- java.security.AccessController.doPrivileged +- (new java.security.PrivilegedExceptionAction() { +- public java.lang.Object run() throws Exception { +- return c.getFields(); +- } +- }); +- } catch(java.security.PrivilegedActionException pae) { +- IDLTypeException ite = new IDLTypeException(); +- ite.initCause(pae); +- throw ite; +- } +- +- for(int i = 0; i < fields.length; i++) { +- Field next = fields[i]; +- Class fieldType = next.getType(); +- if( (fieldType != java.lang.String.class) && +- !isPrimitive(fieldType) ) { +- String msg = "Constant field '" + next.getName() + +- "' in class '" + next.getDeclaringClass().getName() + +- "' has invalid type' " + next.getType() + "'. Constants" + +- " in RMI/IIOP interfaces can only have primitive" + +- " types and java.lang.String types."; +- throw new IDLTypeException(msg); +- } +- } +- +- +- return; +- } +- +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/InvocationHandlerFactoryImpl.java 2013-12-01 11:13:38.000000000 -0800 +@@ -43,6 +43,8 @@ + import com.sun.corba.se.spi.orbutil.proxy.DelegateInvocationHandlerImpl ; + import com.sun.corba.se.spi.orbutil.proxy.CompositeInvocationHandler ; + import com.sun.corba.se.spi.orbutil.proxy.CompositeInvocationHandlerImpl ; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + public class InvocationHandlerFactoryImpl implements InvocationHandlerFactory + { +@@ -114,24 +116,32 @@ + // which extends org.omg.CORBA.Object. This handler delegates all + // calls directly to a DynamicStubImpl, which extends + // org.omg.CORBA.portable.ObjectImpl. +- InvocationHandler dynamicStubHandler = ++ final InvocationHandler dynamicStubHandler = + DelegateInvocationHandlerImpl.create( stub ) ; -@@ -207,7 +205,7 @@ - // are in different packages and the visibility needs to be package for - // security reasons. If you know a better solution how to share this code - // then remove it from PortableRemoteObject. Also in Util.java -- private static Object createDelegateIfSpecified(String classKey, String defaultClassName) { -+ private static Object createDelegate(String classKey) { - String className = (String) - AccessController.doPrivileged(new GetPropertyAction(classKey)); - if (className == null) { -@@ -218,7 +216,7 @@ - } + // Create an invocation handler that handles any remote interface + // methods. +- InvocationHandler stubMethodHandler = new StubInvocationHandlerImpl( ++ final InvocationHandler stubMethodHandler = new StubInvocationHandlerImpl( + pm, classData, stub ) ; - if (className == null) { -- className = defaultClassName; -+ return new com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl(); - } + // Create a composite handler that handles the DynamicStub interface + // as well as the remote interfaces. + final CompositeInvocationHandler handler = + new CustomCompositeInvocationHandlerImpl( stub ) ; ++ ++ AccessController.doPrivileged(new PrivilegedAction() { ++ @Override ++ public Void run() { + handler.addInvocationHandler( DynamicStub.class, + dynamicStubHandler ) ; + handler.addInvocationHandler( org.omg.CORBA.Object.class, + dynamicStubHandler ) ; + handler.addInvocationHandler( Object.class, + dynamicStubHandler ) ; ++ return null; ++ } ++ }); ++ - try { ---- corba/src/share/classes/javax/rmi/CORBA/Util.java 2013-09-06 11:20:53.000000000 -0700 -+++ corba/src/share/classes/javax/rmi/CORBA/Util.java 2014-04-20 12:39:44.000000000 -0700 -@@ -60,14 +60,11 @@ - public class Util { + // If the method passed to invoke is not from DynamicStub or its superclasses, + // it must be from an implemented interface, so we just handle +--- ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java 2014-01-18 12:16:06.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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,6 +25,7 @@ - // This can only be set at static initialization time (no sync necessary). -- private static javax.rmi.CORBA.UtilDelegate utilDelegate = null; -+ private static final javax.rmi.CORBA.UtilDelegate utilDelegate; - private static final String UtilClassKey = "javax.rmi.CORBA.UtilClass"; -- private static final String defaultUtilImplName = --"com.sun.corba.se.impl.javax.rmi.CORBA.Util"; + package com.sun.corba.se.impl.presentation.rmi ; - static { -- utilDelegate = (javax.rmi.CORBA.UtilDelegate) -- createDelegateIfSpecified(UtilClassKey, defaultUtilImplName); -+ utilDelegate = (javax.rmi.CORBA.UtilDelegate)createDelegate(UtilClassKey); - } ++import java.io.SerializablePermission; + import java.lang.reflect.InvocationHandler ; + import java.lang.reflect.Proxy ; - private Util(){} -@@ -338,9 +335,7 @@ - // are in different packages and the visibility needs to be package for - // security reasons. If you know a better solution how to share this code - // then remove it from PortableRemoteObject. Also in Stub.java -- private static Object createDelegateIfSpecified(String classKey, -- String defaultClassName) -- { -+ private static Object createDelegate(String classKey) { - String className = (String) - AccessController.doPrivileged(new GetPropertyAction(classKey)); - if (className == null) { -@@ -351,7 +346,7 @@ - } - - if (className == null) { -- className = defaultClassName; -+ return new com.sun.corba.se.impl.javax.rmi.CORBA.Util(); - } - - try { ---- corba/src/share/classes/javax/rmi/PortableRemoteObject.java 2013-09-06 11:20:53.000000000 -0700 -+++ corba/src/share/classes/javax/rmi/PortableRemoteObject.java 2014-04-20 12:39:44.000000000 -0700 -@@ -65,17 +65,14 @@ - */ - public class PortableRemoteObject { - -- private static javax.rmi.CORBA.PortableRemoteObjectDelegate proDelegate = null; -+ private static final javax.rmi.CORBA.PortableRemoteObjectDelegate proDelegate; - - private static final String PortableRemoteObjectClassKey = - "javax.rmi.CORBA.PortableRemoteObjectClass"; - -- private static final String defaultPortableRemoteObjectImplName = -- "com.sun.corba.se.impl.javax.rmi.PortableRemoteObject"; -- - static { - proDelegate = (javax.rmi.CORBA.PortableRemoteObjectDelegate) -- createDelegateIfSpecified(PortableRemoteObjectClassKey); -+ createDelegate(PortableRemoteObjectClassKey); - } - - /** -@@ -181,7 +178,7 @@ - // are in different packages and the visibility needs to be package for - // security reasons. If you know a better solution how to share this code - // then remove it from here. -- private static Object createDelegateIfSpecified(String classKey) { -+ private static Object createDelegate(String classKey) { - String className = (String) - AccessController.doPrivileged(new GetPropertyAction(classKey)); - if (className == null) { -@@ -191,7 +188,7 @@ - } - } - if (className == null) { -- className = defaultPortableRemoteObjectImplName; -+ return new com.sun.corba.se.impl.javax.rmi.PortableRemoteObject(); - } - - try { ---- corba/src/share/classes/org/omg/CORBA/ORB.java 2013-09-06 11:20:54.000000000 -0700 -+++ corba/src/share/classes/org/omg/CORBA/ORB.java 2014-04-20 12:39:44.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. - * 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,8 @@ - import java.security.AccessController; - import java.security.PrivilegedAction; +@@ -38,11 +39,18 @@ + { + protected final ClassLoader loader ; -+import sun.reflect.misc.ReflectUtil; -+ - /** - * A class providing APIs for the CORBA Object Request Broker - * features. The ORB class also provides -@@ -174,15 +176,6 @@ - private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass"; +- public StubFactoryDynamicBase( PresentationManager.ClassData classData, +- ClassLoader loader ) +- { +- super( classData ) ; ++ private static Void checkPermission() { ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++ sm.checkPermission(new SerializablePermission( ++ "enableSubclassImplementation")); ++ } ++ return null; ++ } - // -- // The last resort fallback ORB implementation classes in case -- // no ORB implementation class is dynamically configured through -- // properties or applet parameters. Change these values to -- // vendor-specific class names. -- // -- private static final String defaultORB = "com.sun.corba.se.impl.orb.ORBImpl"; -- private static final String defaultORBSingleton = "com.sun.corba.se.impl.orb.ORBSingleton"; -- -- // - // The global instance of the singleton ORB implementation which - // acts as a factory for typecodes for generated Helper classes. - // TypeCodes should be immutable since they may be shared across -@@ -294,22 +287,42 @@ - String className = getSystemProperty(ORBSingletonClassKey); - if (className == null) - className = getPropertyFromFile(ORBSingletonClassKey); -- if (className == null) -- className = defaultORBSingleton; -- -- singleton = create_impl(className); -+ if ((className == null) || -+ (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) { -+ singleton = new com.sun.corba.se.impl.orb.ORBSingleton(); -+ } else { -+ singleton = create_impl_with_systemclassloader(className); -+ } ++ private StubFactoryDynamicBase(Void unused, ++ PresentationManager.ClassData classData, ClassLoader loader) { ++ super(classData); + // this.loader must not be null, or the newProxyInstance call + // will fail. + if (loader == null) { +@@ -55,5 +63,11 @@ } - return singleton; } -- private static ORB create_impl(String className) { -+ private static ORB create_impl_with_systemclassloader(String className) { - -+ try { -+ ReflectUtil.checkPackageAccess(className); -+ ClassLoader cl = ClassLoader.getSystemClassLoader(); -+ Class orbBaseClass = org.omg.CORBA.ORB.class; -+ Class singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); -+ return (ORB)singletonOrbClass.newInstance(); -+ } catch (Throwable ex) { -+ SystemException systemException = new INITIALIZE( -+ "can't instantiate default ORB implementation " + className); -+ systemException.initCause(ex); -+ throw systemException; -+ } ++ public StubFactoryDynamicBase( PresentationManager.ClassData classData, ++ ClassLoader loader ) ++ { ++ this (checkPermission(), classData, loader); + } + -+ private static ORB create_impl(String className) { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - if (cl == null) - cl = ClassLoader.getSystemClassLoader(); - - try { -- return (ORB) Class.forName(className, true, cl).newInstance(); -+ ReflectUtil.checkPackageAccess(className); -+ Class orbBaseClass = org.omg.CORBA.ORB.class; -+ Class orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); -+ return (ORB)orbClass.newInstance(); - } catch (Throwable ex) { - SystemException systemException = new INITIALIZE( - "can't instantiate default ORB implementation " + className); -@@ -347,10 +360,12 @@ - className = getSystemProperty(ORBClassKey); - if (className == null) - className = getPropertyFromFile(ORBClassKey); -- if (className == null) -- className = defaultORB; -- -- orb = create_impl(className); -+ if ((className == null) || -+ (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { -+ orb = new com.sun.corba.se.impl.orb.ORBImpl(); -+ } else { -+ orb = create_impl(className); -+ } - orb.set_parameters(args, props); - return orb; - } -@@ -375,10 +390,12 @@ - className = getSystemProperty(ORBClassKey); - if (className == null) - className = getPropertyFromFile(ORBClassKey); -- if (className == null) -- className = defaultORB; -- -- orb = create_impl(className); -+ if ((className == null) || -+ (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { -+ orb = new com.sun.corba.se.impl.orb.ORBImpl(); -+ } else { -+ orb = create_impl(className); -+ } - orb.set_parameters(app, props); - return orb; - } -@@ -574,7 +591,7 @@ - try { - // First try to load the OperationDef class - String opDefClassName = "org.omg.CORBA.OperationDef"; -- Class opDefClass = null; -+ Class opDefClass = null; - - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - if ( cl == null ) -@@ -584,7 +601,7 @@ - - // OK, we loaded OperationDef. Now try to get the - // create_operation_list(OperationDef oper) method. -- Class[] argc = { opDefClass }; -+ Class[] argc = { opDefClass }; - java.lang.reflect.Method meth = - this.getClass().getMethod("create_operation_list", argc); - ---- corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java 2013-09-06 11:20:55.000000000 -0700 -+++ corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java 2014-04-20 12:39:44.000000000 -0700 + public abstract org.omg.CORBA.Object makeStub() ; + } +--- ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * 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,6 +31,10 @@ +@@ -25,14 +25,23 @@ - package org.omg.CORBA_2_3.portable; + package com.sun.corba.se.impl.presentation.rmi; -+import java.io.SerializablePermission; +import java.security.AccessController; +import java.security.PrivilegedAction; + - /** - * InputStream provides for the reading of all of the mapped IDL types - * from the stream. It extends org.omg.CORBA.portable.InputStream. This -@@ -43,6 +47,43 @@ - - public abstract class InputStream extends org.omg.CORBA.portable.InputStream { + import com.sun.corba.se.spi.presentation.rmi.PresentationManager ; -+ -+ private static final String ALLOW_SUBCLASS_PROP = "jdk.corba.allowInputStreamSubclass"; -+ -+ private static final boolean allowSubclass = AccessController.doPrivileged( -+ new PrivilegedAction() { -+ @Override -+ public Boolean run() { -+ String prop = System.getProperty(ALLOW_SUBCLASS_PROP); -+ return prop == null ? false : -+ (prop.equalsIgnoreCase("false") ? false : true); -+ } -+ }); -+ -+ private static Void checkPermission() { -+ SecurityManager sm = System.getSecurityManager(); -+ if (sm != null) { -+ if (!allowSubclass) -+ sm.checkPermission(new -+ SerializablePermission("enableSubclassImplementation")); -+ } -+ return null; -+ } -+ -+ private InputStream(Void ignore) { } -+ -+ /** -+ * Create a new instance of this class. -+ * -+ * throw SecurityException if SecurityManager is installed and -+ * enableSubclassImplementation SerializablePermission -+ * is not granted or jdk.corba.allowOutputStreamSubclass system -+ * property is either not set or is set to 'false' -+ */ -+ public InputStream() { -+ this(checkPermission()); -+ } -+ - /** - * Unmarshalls a value type from the input stream. - * @return the value type unmarshalled from the input stream ---- corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java 1969-12-31 16:00:00.000000000 -0800 -+++ corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java 2014-04-20 12:39:44.000000000 -0700 -@@ -0,0 +1,153 @@ -+/* -+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. -+ * 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.corba; -+ -+import java.nio.ByteBuffer; -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+ -+ -+import com.sun.corba.se.impl.encoding.EncapsInputStream; -+import com.sun.corba.se.impl.encoding.TypeCodeInputStream; -+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; -+import com.sun.corba.se.pept.protocol.MessageMediator; -+import com.sun.corba.se.spi.ior.iiop.GIOPVersion; -+import com.sun.corba.se.spi.orb.ORB; -+import com.sun.org.omg.SendingContext.CodeBase; -+ -+public class EncapsInputStreamFactory { -+ -+ public static EncapsInputStream newEncapsInputStream( -+ final org.omg.CORBA.ORB orb, final byte[] buf, final int size, -+ final boolean littleEndian, final GIOPVersion version) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public EncapsInputStream run() { -+ return new EncapsInputStream(orb, buf, size, -+ littleEndian, version); -+ } -+ }); -+ } -+ -+ public static EncapsInputStream newEncapsInputStream( -+ final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer, -+ final int size, final boolean littleEndian, -+ final GIOPVersion version) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public EncapsInputStream run() { -+ return new EncapsInputStream(orb, byteBuffer, size, -+ littleEndian, version); -+ } -+ }); -+ } -+ -+ public static EncapsInputStream newEncapsInputStream( -+ final org.omg.CORBA.ORB orb, final byte[] data, final int size) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public EncapsInputStream run() { -+ return new EncapsInputStream(orb, data, size); -+ } -+ }); -+ } -+ -+ public static EncapsInputStream newEncapsInputStream( -+ final EncapsInputStream eis) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public EncapsInputStream run() { -+ return new EncapsInputStream(eis); -+ } -+ }); -+ } -+ -+ public static EncapsInputStream newEncapsInputStream( -+ final org.omg.CORBA.ORB orb, final byte[] data, final int size, -+ final GIOPVersion version) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public EncapsInputStream run() { -+ return new EncapsInputStream(orb, data, size, version); -+ } -+ }); -+ } -+ -+ public static EncapsInputStream newEncapsInputStream( -+ final org.omg.CORBA.ORB orb, final byte[] data, final int size, -+ final GIOPVersion version, final CodeBase codeBase) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public EncapsInputStream run() { -+ return new EncapsInputStream(orb, data, size, version, -+ codeBase); -+ } -+ }); -+ } -+ -+ public static TypeCodeInputStream newTypeCodeInputStream( -+ final org.omg.CORBA.ORB orb, final byte[] buf, final int size, -+ final boolean littleEndian, final GIOPVersion version) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public TypeCodeInputStream run() { -+ return new TypeCodeInputStream(orb, buf, size, -+ littleEndian, version); -+ } -+ }); -+ } -+ -+ public static TypeCodeInputStream newTypeCodeInputStream( -+ final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer, -+ final int size, final boolean littleEndian, -+ final GIOPVersion version) { -+ return AccessController -+ .doPrivileged(new PrivilegedAction() { -+ @Override -+ public TypeCodeInputStream run() { -+ return new TypeCodeInputStream(orb, byteBuffer, size, -+ littleEndian, version); -+ } -+ }); -+ } -+ -+ public static TypeCodeInputStream newTypeCodeInputStream( -+ final org.omg.CORBA.ORB orb, final byte[] data, final int size) { + public class StubFactoryFactoryProxyImpl extends StubFactoryFactoryDynamicBase + { + public PresentationManager.StubFactory makeDynamicStubFactory( +- PresentationManager pm, PresentationManager.ClassData classData, +- ClassLoader classLoader ) ++ PresentationManager pm, final PresentationManager.ClassData classData, ++ final ClassLoader classLoader ) + { +- return new StubFactoryProxyImpl( classData, classLoader ) ; + return AccessController -+ .doPrivileged(new PrivilegedAction() { ++ .doPrivileged(new PrivilegedAction() { + @Override -+ public TypeCodeInputStream run() { -+ return new TypeCodeInputStream(orb, data, size); ++ public StubFactoryProxyImpl run() { ++ return new StubFactoryProxyImpl(classData, classLoader); + } + }); -+ } -+} ---- corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2013-09-06 11:20:56.000000000 -0700 -+++ corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2014-04-20 12:39:44.000000000 -0700 + } + } +--- ./corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -34,6 +34,9 @@ +@@ -115,6 +115,7 @@ - import java.io.File; - import java.io.IOException; -+import java.io.SerializablePermission; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - import java.util.Vector; - import java.util.Hashtable; - import java.util.Enumeration; -@@ -49,6 +52,7 @@ - import com.sun.corba.se.impl.util.PackagePrefixChecker; - import sun.rmi.rmic.Main; + import java.util.concurrent.ConcurrentMap; + import java.util.concurrent.ConcurrentHashMap; ++import sun.corba.EncapsInputStreamFactory; -+ /** - * An IIOP stub/tie generator for rmic. + * ClientDelegate is the RMI client-side subcontract or representation +@@ -847,8 +848,8 @@ + } + byte[] data = ((UnknownServiceContext)sc).getData(); + EncapsInputStream in = +- new EncapsInputStream((ORB)messageMediator.getBroker(), +- data, data.length); ++ EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(), ++ data, data.length); + in.consumeEndian(); + + String msg = +--- ./corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java 2014-01-18 12:16:06.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * -@@ -78,6 +82,7 @@ - protected boolean castArray = false; - protected Hashtable transactionalObjects = new Hashtable() ; - protected boolean POATie = false ; -+ protected boolean emitPermissionCheck = false; + * This code is free software; you can redistribute it and/or modify it +@@ -36,7 +36,8 @@ + import java.util.Iterator; + import java.rmi.RemoteException; + import java.nio.ByteBuffer; +- ++import java.security.AccessController; ++import java.security.PrivilegedAction; + import javax.rmi.CORBA.Util; + import javax.rmi.CORBA.Tie; - /** - * Default constructor for Main to use. -@@ -193,6 +198,9 @@ - } else if (argv[i].equals("-standardPackage")) { - standardPackage = true; - argv[i] = null; -+ } else if (argv[i].equals("-emitPermissionCheck")) { -+ emitPermissionCheck = true; -+ argv[i] = null; - } else if (arg.equals("-xstubbase")) { - argv[i] = null; - if (++i < argv.length && argv[i] != null && !argv[i].startsWith("-")) { -@@ -390,9 +398,22 @@ +@@ -111,6 +112,7 @@ + import com.sun.corba.se.impl.protocol.giopmsgheaders.ProfileAddr; + import com.sun.corba.se.impl.protocol.giopmsgheaders.ReferenceAddr; + import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl; ++import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; + import com.sun.corba.se.impl.util.JDKBridge; - writePackageAndImports(p); + /** +@@ -156,10 +158,17 @@ -+// generate -+// import java.security.AccessController; -+// import java.security.PrivilegedAction; -+// import java.io.SerializablePermission; -+ if (emitPermissionCheck) { -+ p.pln("import java.security.AccessController;"); -+ p.pln("import java.security.PrivilegedAction;"); -+ p.pln("import java.io.SerializablePermission;"); -+ p.pln(); -+ p.pln(); -+ } -+ - // Declare the stub class; implement all remote interfaces. - - p.p("public class " + currentClass); -+ - p.p(" extends " + getName(stubBaseClass)); - p.p(" implements "); - if (remoteInterfaces.length > 0) { -@@ -422,6 +443,56 @@ - writeIds( p, theType, false ); - p.pln(); - -+ if (emitPermissionCheck) { -+ -+ // produce the following generated code -+ // private static Void checkPermission() { -+ // SecurityManager sm = System.getSecurityManager(); -+ // if (sm != null) { -+ // sm.checkPermission(new SerializablePermission( -+ // "enableSubclassImplementation")); // testing -+ // } -+ // return null; -+ // } -+ // -+ // private _XXXXXX_Stub(Void ignore) { -+ // } -+ // -+ // public _XXXXXX_Stub() { -+ // this(checkPermission()); -+ // } -+ // where XXXXXX is the name of the remote interface -+ -+ p.pln(); -+ p.plnI("private static Void checkPermission() {"); -+ p.plnI("SecurityManager sm = System.getSecurityManager();"); -+ p.pln("if (sm != null) {"); -+ p.pI(); -+ p.plnI("sm.checkPermission(new SerializablePermission("); -+ p.plnI("\"enableSubclassImplementation\"));"); -+ p.pO(); -+ p.pO(); -+ p.pOln("}"); -+ p.pln("return null;"); -+ p.pO(); -+ p.pOln("}"); -+ p.pln(); -+ p.pO(); -+ -+ p.pI(); -+ p.pln("private " + currentClass + "(Void ignore) { }"); -+ p.pln(); -+ -+ p.plnI("public " + currentClass + "() { "); -+ p.pln("this(checkPermission());"); -+ p.pOln("}"); -+ p.pln(); -+ } -+ -+ if (!emitPermissionCheck) { -+ p.pI(); -+ } -+ - // Write the _ids() method... - - p.plnI("public String[] _ids() { "); -@@ -815,7 +886,6 @@ - CompoundType theType) throws IOException { - - // Wtite the method declaration and opening brace... + ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo(); + cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); - - String methodName = method.getName(); - String methodIDLName = method.getIDLName(); - -@@ -1631,7 +1701,7 @@ - - // Write data members... - p.pln(); -- p.pln("private " + getName(theType) + " target = null;"); -+ p.pln("volatile private " + getName(theType) + " target = null;"); - p.pln(); - - // Write the ids... -@@ -1695,6 +1765,10 @@ - - if (remoteMethods.length > 0) { - p.plnI("try {"); -+ p.pln(getName(theType) + " target = this.target;"); -+ p.plnI("if (target == null) {"); -+ p.pln("throw new java.io.IOException();"); -+ p.pOln("}"); - p.plnI(idExtInputStream + " "+in+" = "); - p.pln("(" + idExtInputStream + ") "+_in+";"); - p.pO(); ---- hotspot/.hgtags 2013-09-06 11:21:49.000000000 -0700 -+++ hotspot/.hgtags 2014-04-20 12:39:37.000000000 -0700 -@@ -182,6 +182,7 @@ - 38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16 - 81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147 - 81d815b05abb564aa1f4100ae13491c949b9a07e hs21-b17 -+f1a18ada5853af49fce54d43dd5a5b67dc291470 7u0 - 9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01 - 0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01 - 31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02 -@@ -476,6 +477,24 @@ - 8386245b59c3e82b7c728b7d3832ea342c62615d jdk7u21-b50 - c5e4585a045fe165d067ec0e98af42eace20c5f8 jdk7u21-b12 - 00dbf9fa12ec6b1ba15d9a9a12495f50e10837bf jdk7u21-b31 -+bf2d84c5103d98db1697b50071a649ea23c4e33d jdk7u25-b01 -+07119340f80f77dfcb03fa568641e80b43d4be74 jdk7u25-b02 -+655bea6843fb7beabd8d9eeda59572c0c7055b85 jdk7u25-b03 -+96a4e612195c0d753be24cf38fea0ee8ce30edcf jdk7u25-b04 -+7151c26b838828a20cb28595ef1f70403d1868cf jdk7u25-b05 -+fbb5f6083dd00ca7417e4a45311f33918bb2a5f0 jdk7u25-b06 -+83abf4b2fc8a5bb7226177c5e4334bd0bfd7a8df jdk7u25-b07 -+525252cd9fca4869c3fd81bc61299a85e73ff9c7 jdk7u25-b08 -+706a255a8404b7e41579cea278df6bb87c314567 jdk7u25-b09 -+402184622f60a2ba35479bdf124a8d4694835406 jdk7u25-b10 -+cca49a35bf83664456af112482ffb3a7465d21fa jdk7u25-b11 -+7ca68c0674df72fdd784de337c049404d2b5b0c3 jdk7u25-b12 -+3e145a686fedd9eefdcb6b714241200ed236b41d jdk7u25-b13 -+4fafaf293aa5666e8c9f5ca1d96c3f752305f586 jdk7u25-b14 -+40acb370626fbc439e4cfed8854960a83a376fba jdk7u25-b15 -+97a3ebd62052410e0709035f40032d3f2113ed86 jdk7u25-b30 -+b80a290e6e3011097273525c4f352c70b9857464 jdk7u25-b16 -+273e8afccd6ef9e10e9fe121f7b323755191f3cc jdk7u25-b32 - e3d2c238e29c421c3b5c001e400acbfb30790cfc jdk7u14-b14 - 860ae068f4dff62a77c8315f0335b7e935087e86 hs24-b34 - 12619005c5e29be6e65f0dc9891ca19d9ffb1aaa jdk7u14-b15 -@@ -550,3 +569,60 @@ - b8d8caf6df744d5342b5d284376a005e86c0b108 hs24-b56 - eceae04782438987cd747e1c76e4085f50b43a18 jdk7u40-b43 - af1fc2868a2b919727bfbb0858449bd991bbee4a jdk7u40-b60 -+efaa26fb6de2ecb8506fb8b785a429d040e96768 jdk7u40-b61 -+df6f37a7311d35072a07c1425a7aadee469a09b6 jdk7u40-b62 -+5fb434aa203c32b4551167b922a70e79831ffdf4 jdk7u45-b01 -+f2039061ba49de742ae88cc3123fd1237965d665 jdk7u45-b02 -+d6fd3f84a30ce82a37fc39b6e5e9d73bd8054ab2 jdk7u45-b03 -+7f16aa9067386aeb3668336aa6cd63ef3dc4f44a jdk7u45-b04 -+b4fe146b820b47d8b59bbb9dc9d43221436ed0ae jdk7u45-b05 -+63efa616e54dd3545e16a5aa1917662548b18ee5 jdk7u45-b06 -+f6748e6123b6745497d69addffdff38e224a77c5 jdk7u45-b07 -+06bcab9ef18355dccc87401fc24dbd5f15615db0 jdk7u45-b08 -+996b6863b3b2468cece20d7a6f571f9ec1b7830c jdk7u45-b09 -+bcaf889eea9e64d30f8c3aefdcdc2c2ee29406f2 jdk7u45-b10 -+7ca907428850dc2aa99ee4a906446e479dbeb392 jdk7u45-b11 -+ed1505510ea0e94b17f968cdb3e8aba13c99d543 jdk7u45-b12 -+89f99af7a7bbdadb5b8cf781c7d899c22df64b71 jdk7u45-b13 -+718d1e9223dd0359d9ccef81fb82c32215702fe8 jdk7u45-b14 -+9ad76a08e5edfe24e95eef84e15fef261bff1abf jdk7u45-b15 -+429884602206fcf5314c8b953c06d54d337558ca jdk7u45-b16 -+0c0dc384915cafd9bfaa2fe5792a629a22d1b990 jdk7u45-b17 -+12374864c655a2cefb0d65caaacf215d5365ec5f jdk7u45-b18 -+3677c8cc3c89c0fa608f485b84396e4cf755634b jdk7u45-b30 -+520b7b3d9153c1407791325946b07c5c222cf0d6 jdk7u45-b31 -+c373a733d5d5147f99eaa2b91d6b937c28214fc9 jdk7u45-b33 -+0bcb43482f2ac5615437541ffb8dc0f79ece3148 jdk7u45-b34 -+12ea8d416f105f5971c808c89dddc1006bfc4c53 jdk7u45-b35 -+429884602206fcf5314c8b953c06d54d337558ca jdk7u51-b00 -+68f03ff066f2341b89b52a6d6e21ae09de008351 jdk7u51-b01 -+67910a581eca113847c5320c49436a9816c5d5c6 jdk7u51-b02 -+4138fb11955a528e5ee5448d9c6c8e88e0e268b2 jdk7u51-b03 -+683458c333ced92d515daa1b9bcdb5be679e535a jdk7u51-b04 -+ed2db7a82229e7adbfe8a8166bf98f3ef4a09be5 jdk7u51-b05 -+fec027762cf37d033d82d5b3725020f40c771690 jdk7u51-b06 -+f673c581ebf91073b5bbdbdc5e4d4407910fa006 jdk7u51-b07 -+b0a355aae00427e74cc0b89697c7c7f6fb520176 jdk7u51-b08 -+4f56f2e206fd878809f70ca06f4bc21563a7c530 jdk7u51-b09 -+1b7aaef3df78970c9a5ef5cc353ca927241555ee jdk7u51-b10 -+1f11dff734af98f5bf11d4fceeda221ab1416971 jdk7u51-b11 -+dee2a38ef6b26534c44c550ef4da2c3146c612c2 jdk7u51-b12 -+6c6a2299029ad02fa2820b8ff8c61c2bbcae799c jdk7u51-b13 -+a398ddc79d2310ad37b131cc3794b3cf574f088e jdk7u51-b30 -+cf4110c35afb10456d8264c47b7cde1c20150cab jdk7u51-b31 -+dee2a38ef6b26534c44c550ef4da2c3146c612c2 jdk7u55-b00 -+ac0063b4452bc724e8648e64f4b2d495054bb308 jdk7u55-b01 -+408028d410e316a99495c42df0031018890c22fe jdk7u55-b02 -+50fb91504dd8cdf410eb956075442daf3aacf1db jdk7u55-b03 -+3be3b8a032a5508646c1c5620cee18d3e69fc708 jdk7u55-b04 -+b86119fa2748bd91ae4984ff2264da92b6626f8c jdk7u55-b05 -+260d919d52e500a0b20f911fade2a7710474067a jdk7u55-b06 -+8cf6e0a3a0651c4132ae034c2b68ddf4eb5c4d88 jdk7u55-b07 -+049fd2cef85bf2d557dd7dd8a90a6831a8168ce4 jdk7u55-b08 -+9b238ab164e6d1cf9cfb560827d88ef8a7d8c898 jdk7u55-b09 -+573d8d080af9eff48aa3b8f0696d8874ce36fbb1 jdk7u55-b09 -+36f8bd4dd467ae4183340842fd7158ac3309b826 jdk7u55-b10 -+49cada8e39b9215b9fd8b9183743f92625587cfc jdk7u55-b11 -+aadc864abd1ced3049bf59ce32786a07997ba190 jdk7u55-b12 -+b021fd817a0177b31d1e3d65127a27458e85801e jdk7u55-b13 -+d27b468d5f3be3329ff1ff342f3347e6b2e0303b jdk7u55-b30 ---- hotspot/agent/src/os/bsd/ps_proc.c 2013-09-06 11:21:50.000000000 -0700 -+++ hotspot/agent/src/os/bsd/ps_proc.c 2014-04-20 12:39:33.000000000 -0700 -@@ -131,7 +131,7 @@ - - static bool ptrace_continue(pid_t pid, int signal) { - // pass the signal to the process so we don't swallow it -- if (ptrace(PTRACE_CONT, pid, NULL, signal) < 0) { -+ if (ptrace(PT_CONTINUE, pid, NULL, signal) < 0) { - print_debug("ptrace(PTRACE_CONT, ..) failed for %d\n", pid); - return false; - } ---- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2013-09-06 11:21:51.000000000 -0700 -+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2014-04-20 12:39:33.000000000 -0700 -@@ -33,6 +33,7 @@ - import sun.jvm.hotspot.debugger.remote.*; - import sun.jvm.hotspot.debugger.windbg.*; - import sun.jvm.hotspot.debugger.linux.*; -+import sun.jvm.hotspot.debugger.bsd.*; - import sun.jvm.hotspot.memory.*; - import sun.jvm.hotspot.oops.*; - import sun.jvm.hotspot.runtime.*; ---- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2013-09-06 11:21:52.000000000 -0700 -+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2014-04-20 12:39:33.000000000 -0700 -@@ -35,6 +35,7 @@ - import sun.jvm.hotspot.debugger.windbg.*; - import sun.jvm.hotspot.debugger.linux.*; - import sun.jvm.hotspot.debugger.sparc.*; -+import sun.jvm.hotspot.debugger.bsd.*; - import sun.jvm.hotspot.debugger.remote.*; - import sun.jvm.hotspot.livejvm.*; - import sun.jvm.hotspot.memory.*; ---- hotspot/make/bsd/Makefile 2013-09-06 11:21:59.000000000 -0700 -+++ hotspot/make/bsd/Makefile 2014-04-20 12:39:31.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 1999, 2011, 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 -@@ -211,6 +211,8 @@ - BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX) - BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) - -+BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) -+ - BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) - - #------------------------------------------------------------------------------- -@@ -337,9 +339,11 @@ - - # Doc target. This is the same for all build options. - # Hence create a docs directory beside ...$(ARCH)_[...] -+# We specify 'BUILD_FLAVOR=product' so that the proper -+# ENABLE_FULL_DEBUG_SYMBOLS value is used. - docs: checks - $(QUIETLY) mkdir -p $(SUBDIR_DOCS) -- $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs -+ $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs - - # Synonyms for win32-like targets. - compiler2: jvmg product ---- hotspot/make/bsd/makefiles/arm.make 2013-09-06 11:21:59.000000000 -0700 -+++ hotspot/make/bsd/makefiles/arm.make 2014-04-20 12:39:31.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - # 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 @@ - - Obj_Files += bsd_arm.o - --LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a -+ifneq ($(EXT_LIBS_PATH),) -+ LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a -+endif - - CFLAGS += -DVM_LITTLE_ENDIAN ---- hotspot/make/bsd/makefiles/build_vm_def.sh 2013-09-06 11:21:59.000000000 -0700 -+++ hotspot/make/bsd/makefiles/build_vm_def.sh 2014-04-28 17:39:01.000000000 -0700 -@@ -7,6 +7,16 @@ - NM=nm - fi - -+if [ `uname` == "OpenBSD" ] ; then -+$NM $* \ -+ | awk '{ -+ if ($2 != "U") if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";" -+ if ($2 != "U") if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";" -+ if ($2 != "U") if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";" -+ }' \ -+ | sort -u -+else - $NM -Uj $* | awk ' - { if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 } - ' -+fi ---- hotspot/make/bsd/makefiles/buildtree.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/buildtree.make 2014-04-20 12:39:31.000000000 -0700 -@@ -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 -@@ -253,6 +253,16 @@ - echo "$(call gamma-path,commonsrc,os/posix/vm)"; \ - [ -n "$(CFLAGS_BROWSE)" ] && \ - echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \ -+ [ -n "$(ENABLE_FULL_DEBUG_SYMBOLS)" ] && \ -+ echo && echo "ENABLE_FULL_DEBUG_SYMBOLS = $(ENABLE_FULL_DEBUG_SYMBOLS)"; \ -+ [ -n "$(OBJCOPY)" ] && \ -+ echo && echo "OBJCOPY = $(OBJCOPY)"; \ -+ [ -n "$(STRIP_POLICY)" ] && \ -+ echo && echo "STRIP_POLICY = $(STRIP_POLICY)"; \ -+ [ -n "$(ZIP_DEBUGINFO_FILES)" ] && \ -+ echo && echo "ZIP_DEBUGINFO_FILES = $(ZIP_DEBUGINFO_FILES)"; \ -+ [ -n "$(ZIPEXE)" ] && \ -+ echo && echo "ZIPEXE = $(ZIPEXE)"; \ - [ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \ - echo && \ - echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \ -@@ -382,7 +392,7 @@ - $(QUIETLY) ( \ - $(BUILDTREE_COMMENT); \ - echo "JDK=${JAVA_HOME}"; \ -- ) > $@ -+ ) > $@ - - .dbxrc: $(BUILDTREE_MAKE) - @echo Creating $@ ... ---- hotspot/make/bsd/makefiles/gcc.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/gcc.make 2014-04-28 17:39:01.000000000 -0700 -@@ -116,7 +116,10 @@ - CFLAGS += -fno-rtti - CFLAGS += -fno-exceptions - CFLAGS += -pthread --CFLAGS += -fcheck-new -+# Clang does not support -fcheck-new -+ifeq (,$(findstring clang,$(shell $(CC) -v 2>&1))) -+ CFLAGS += -fcheck-new -+endif - # version 4 and above support fvisibility=hidden (matches jni_x86.h file) - # except 4.1.2 gives pointless warnings that can't be disabled (afaik) - ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" -@@ -214,7 +217,11 @@ - - # Flags for generating make dependency flags. - ifneq ("${CC_VER_MAJOR}", "2") --DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) -+DEPFLAGS = -+ifeq (,$(findstring clang,$(shell $(CC) -v 2>&1))) -+DEPFLAGS += -fpch-deps -+endif -+DEPFLAGS += -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) - endif - - # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. ---- hotspot/make/bsd/makefiles/jsig.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/jsig.make 2014-04-20 12:39:31.000000000 -0700 -@@ -36,9 +36,16 @@ - LIBJSIG_G = lib$(JSIG_G).so - endif - -+LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo -+LIBJSIG_DIZ = lib$(JSIG).diz -+LIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo -+LIBJSIG_G_DIZ = lib$(JSIG_G).diz -+ - JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm - - DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG) -+DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO) -+DEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ) - - LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig - -@@ -57,11 +64,33 @@ - $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) - @echo Making signal interposition lib... - $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ -- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -+ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< - $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } -+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) -+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ -+ ifeq ($(STRIP_POLICY),all_strip) -+ $(QUIETLY) $(STRIP) $@ -+ else -+ ifeq ($(STRIP_POLICY),min_strip) -+ $(QUIETLY) $(STRIP) -S $@ -+ # implied else here is no stripping at all -+ endif -+ endif -+ [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); } -+ ifeq ($(ZIP_DEBUGINFO_FILES),1) -+ $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) -+ $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) -+ [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); } -+ endif -+endif - - install_jsig: $(LIBJSIG) - @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" -+ $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ -+ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) -+ $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ -+ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) - $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" - - .PHONY: install_jsig ---- hotspot/make/bsd/makefiles/launcher.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/launcher.make 2014-04-20 12:39:31.000000000 -0700 -@@ -50,7 +50,7 @@ - LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) - else - LAUNCHER.o = launcher.o -- LFLAGS_LAUNCHER += -L`pwd` -+ LFLAGS_LAUNCHER += -L`pwd` +- CDRInputObject cdrInputObject = +- new CDRInputObject(orb, null, bbwi.byteBuffer, +- cdrOutputObject.getMessageHeader()); ++ final ORB inOrb = orb; ++ final ByteBuffer inBuffer = bbwi.byteBuffer; ++ final Message inMsg = cdrOutputObject.getMessageHeader(); ++ CDRInputObject cdrInputObject = AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public CDRInputObject run() { ++ return new CDRInputObject(inOrb, null, inBuffer, ++ inMsg); ++ } ++ }); + messageMediator.setInputObject(cdrInputObject); + cdrInputObject.setMessageMediator(messageMediator); - # 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-product 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/mapfile-vers-product 2014-04-20 12:39:31.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # - # This code is free software; you can redistribute it and/or modify it -@@ -19,235 +19,247 @@ - # 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. -+# - # --# --# Only used for OSX/Darwin builds +@@ -192,9 +201,17 @@ + cdrOutputObject = (CDROutputObject) messageMediator.getOutputObject(); + bbwi = cdrOutputObject.getByteBufferWithInfo(); + cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize()); +- cdrInputObject = +- new CDRInputObject(orb, null, bbwi.byteBuffer, +- cdrOutputObject.getMessageHeader()); ++ final ORB inOrb2 = orb; ++ final ByteBuffer inBuffer2 = bbwi.byteBuffer; ++ final Message inMsg2 = cdrOutputObject.getMessageHeader(); ++ cdrInputObject = AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public CDRInputObject run() { ++ return new CDRInputObject(inOrb2, null, inBuffer2, ++ inMsg2); ++ } ++ }); + messageMediator.setInputObject(cdrInputObject); + cdrInputObject.setMessageMediator(messageMediator); - # Define public interface. -- # _JNI -- _JNI_CreateJavaVM -- _JNI_GetCreatedJavaVMs -- _JNI_GetDefaultJavaVMInitArgs +--- ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalClientRequestImpl.sjava 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalClientRequestImpl.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,138 +0,0 @@ +-/* +- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. +- * 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. +- */ - -- # _JVM -- _JVM_Accept -- _JVM_ActiveProcessorCount -- _JVM_AllocateNewArray -- _JVM_AllocateNewObject -- _JVM_ArrayCopy -- _JVM_AssertionStatusDirectives -- _JVM_Available -- _JVM_Bind -- _JVM_ClassDepth -- _JVM_ClassLoaderDepth -- _JVM_Clone -- _JVM_Close -- _JVM_CX8Field -- _JVM_CompileClass -- _JVM_CompileClasses -- _JVM_CompilerCommand -- _JVM_Connect -- _JVM_ConstantPoolGetClassAt -- _JVM_ConstantPoolGetClassAtIfLoaded -- _JVM_ConstantPoolGetDoubleAt -- _JVM_ConstantPoolGetFieldAt -- _JVM_ConstantPoolGetFieldAtIfLoaded -- _JVM_ConstantPoolGetFloatAt -- _JVM_ConstantPoolGetIntAt -- _JVM_ConstantPoolGetLongAt -- _JVM_ConstantPoolGetMethodAt -- _JVM_ConstantPoolGetMethodAtIfLoaded -- _JVM_ConstantPoolGetMemberRefInfoAt -- _JVM_ConstantPoolGetSize -- _JVM_ConstantPoolGetStringAt -- _JVM_ConstantPoolGetUTF8At -- _JVM_CountStackFrames -- _JVM_CurrentClassLoader -- _JVM_CurrentLoadedClass -- _JVM_CurrentThread -- _JVM_CurrentTimeMillis -- _JVM_DefineClass -- _JVM_DefineClassWithSource -- _JVM_DefineClassWithSourceCond -- _JVM_DesiredAssertionStatus -- _JVM_DisableCompiler -- _JVM_DoPrivileged -- _JVM_DTraceGetVersion -- _JVM_DTraceActivate -- _JVM_DTraceIsProbeEnabled -- _JVM_DTraceIsSupported -- _JVM_DTraceDispose -- _JVM_DumpAllStacks -- _JVM_DumpThreads -- _JVM_EnableCompiler -- _JVM_Exit -- _JVM_FillInStackTrace -- _JVM_FindClassFromClass -- _JVM_FindClassFromClassLoader -- _JVM_FindClassFromBootLoader -- _JVM_FindLibraryEntry -- _JVM_FindLoadedClass -- _JVM_FindPrimitiveClass -- _JVM_FindSignal -- _JVM_FreeMemory -- _JVM_GC -- _JVM_GetAllThreads -- _JVM_GetArrayElement -- _JVM_GetArrayLength -- _JVM_GetCPClassNameUTF -- _JVM_GetCPFieldClassNameUTF -- _JVM_GetCPFieldModifiers -- _JVM_GetCPFieldNameUTF -- _JVM_GetCPFieldSignatureUTF -- _JVM_GetCPMethodClassNameUTF -- _JVM_GetCPMethodModifiers -- _JVM_GetCPMethodNameUTF -- _JVM_GetCPMethodSignatureUTF -- _JVM_GetCallerClass -- _JVM_GetClassAccessFlags -- _JVM_GetClassAnnotations -- _JVM_GetClassCPEntriesCount -- _JVM_GetClassCPTypes -- _JVM_GetClassConstantPool -- _JVM_GetClassContext -- _JVM_GetClassDeclaredConstructors -- _JVM_GetClassDeclaredFields -- _JVM_GetClassDeclaredMethods -- _JVM_GetClassFieldsCount -- _JVM_GetClassInterfaces -- _JVM_GetClassLoader -- _JVM_GetClassMethodsCount -- _JVM_GetClassModifiers -- _JVM_GetClassName -- _JVM_GetClassNameUTF -- _JVM_GetClassSignature -- _JVM_GetClassSigners -- _JVM_GetComponentType -- _JVM_GetDeclaredClasses -- _JVM_GetDeclaringClass -- _JVM_GetEnclosingMethodInfo -- _JVM_GetFieldAnnotations -- _JVM_GetFieldIxModifiers -- _JVM_GetHostName -- _JVM_GetInheritedAccessControlContext -- _JVM_GetInterfaceVersion -- _JVM_GetLastErrorString -- _JVM_GetManagement -- _JVM_GetMethodAnnotations -- _JVM_GetMethodDefaultAnnotationValue -- _JVM_GetMethodIxArgsSize -- _JVM_GetMethodIxByteCode -- _JVM_GetMethodIxByteCodeLength -- _JVM_GetMethodIxExceptionIndexes -- _JVM_GetMethodIxExceptionTableEntry -- _JVM_GetMethodIxExceptionTableLength -- _JVM_GetMethodIxExceptionsCount -- _JVM_GetMethodIxLocalsCount -- _JVM_GetMethodIxMaxStack -- _JVM_GetMethodIxModifiers -- _JVM_GetMethodIxNameUTF -- _JVM_GetMethodIxSignatureUTF -- _JVM_GetMethodParameterAnnotations -- _JVM_GetPrimitiveArrayElement -- _JVM_GetProtectionDomain -- _JVM_GetSockName -- _JVM_GetSockOpt -- _JVM_GetStackAccessControlContext -- _JVM_GetStackTraceDepth -- _JVM_GetStackTraceElement -- _JVM_GetSystemPackage -- _JVM_GetSystemPackages -- _JVM_GetThreadStateNames -- _JVM_GetThreadStateValues -- _JVM_GetVersionInfo -- _JVM_Halt -- _JVM_HoldsLock -- _JVM_IHashCode -- _JVM_InitAgentProperties -- _JVM_InitProperties -- _JVM_InitializeCompiler -- _JVM_InitializeSocketLibrary -- _JVM_InternString -- _JVM_Interrupt -- _JVM_InvokeMethod -- _JVM_IsArrayClass -- _JVM_IsConstructorIx -- _JVM_IsInterface -- _JVM_IsInterrupted -- _JVM_IsNaN -- _JVM_IsPrimitiveClass -- _JVM_IsSameClassPackage -- _JVM_IsSilentCompiler -- _JVM_IsSupportedJNIVersion -- _JVM_IsThreadAlive -- _JVM_LatestUserDefinedLoader -- _JVM_Listen -- _JVM_LoadClass0 -- _JVM_LoadLibrary -- _JVM_Lseek -- _JVM_MaxObjectInspectionAge -- _JVM_MaxMemory -- _JVM_MonitorNotify -- _JVM_MonitorNotifyAll -- _JVM_MonitorWait -- _JVM_NanoTime -- _JVM_NativePath -- _JVM_NewArray -- _JVM_NewInstanceFromConstructor -- _JVM_NewMultiArray -- _JVM_OnExit -- _JVM_Open -- _JVM_PrintStackTrace -- _JVM_RaiseSignal -- _JVM_RawMonitorCreate -- _JVM_RawMonitorDestroy -- _JVM_RawMonitorEnter -- _JVM_RawMonitorExit -- _JVM_Read -- _JVM_Recv -- _JVM_RecvFrom -- _JVM_RegisterSignal -- _JVM_ReleaseUTF -- _JVM_ResolveClass -- _JVM_ResumeThread -- _JVM_Send -- _JVM_SendTo -- _JVM_SetArrayElement -- _JVM_SetClassSigners -- _JVM_SetLength -- _JVM_SetNativeThreadName -- _JVM_SetPrimitiveArrayElement -- _JVM_SetProtectionDomain -- _JVM_SetSockOpt -- _JVM_SetThreadPriority -- _JVM_Sleep -- _JVM_Socket -- _JVM_SocketAvailable -- _JVM_SocketClose -- _JVM_SocketShutdown -- _JVM_StartThread -- _JVM_StopThread -- _JVM_SuspendThread -- _JVM_SupportsCX8 -- _JVM_Sync -- _JVM_Timeout -- _JVM_TotalMemory -- _JVM_TraceInstructions -- _JVM_TraceMethodCalls -- _JVM_UnloadLibrary -- _JVM_Write -- _JVM_Yield -- _JVM_handle_bsd_signal -+ -+SUNWprivate_1.1 { -+ global: -+ # JNI -+ JNI_CreateJavaVM; -+ JNI_GetCreatedJavaVMs; -+ JNI_GetDefaultJavaVMInitArgs; +-package com.sun.corba.se.impl.iiop; +- +-import com.sun.corba.se.impl.protocol.Request; +-import com.sun.corba.se.impl.core.ClientRequest; +-import com.sun.corba.se.impl.core.ServiceContext; +-import com.sun.corba.se.impl.core.ServiceContexts; +-import com.sun.corba.se.impl.core.ClientResponse; +-import com.sun.corba.se.impl.core.ServerRequest; +-import com.sun.corba.se.impl.core.ServerResponse; +-import com.sun.corba.se.impl.corba.IOR; +-import com.sun.corba.se.impl.corba.GIOPVersion; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage; +-import com.sun.corba.se.impl.orbutil.ORBConstants; +-import com.sun.corba.se.impl.core.ORBVersion; +-import com.sun.corba.se.impl.core.ORB; +-import com.sun.corba.se.impl.orbutil.ORBUtility; +-import com.sun.corba.se.impl.ior.ObjectKeyFactory ; +-import com.sun.corba.se.impl.ior.ObjectKey ; +-import com.sun.corba.se.impl.ior.ObjectKeyTemplate ; +-import com.sun.corba.se.impl.ior.IIOPProfile; +- +-public class LocalClientRequestImpl extends IIOPOutputStream +- implements ClientRequest +-{ +- public LocalClientRequestImpl( GIOPVersion gv, +- ORB orb, IOR ior, short addrDisposition, +- String operationName, boolean oneway, ServiceContexts svc, +- int requestId, byte streamFormatVersion) +- { +- super(gv, +- orb, +- null, +- BufferManagerFactory.newBufferManagerWrite(BufferManagerFactory.GROW), +- streamFormatVersion); +- +- this.isOneway = oneway; +- boolean responseExpected = !isOneway; +- +- IIOPProfile iop = ior.getProfile(); +- ObjectKey okey = iop.getObjectKey(); +- ObjectKeyTemplate oktemp = okey.getTemplate() ; +- ORBVersion version = oktemp.getORBVersion() ; +- orb.setORBVersion( version ) ; +- +- this.request = MessageBase.createRequest(orb, gv, requestId, +- responseExpected, ior, addrDisposition, operationName, svc, null); +- setMessage(request); +- request.write(this); +- +- // mark beginning of msg body for possible later use +- bodyBegin = getSize(); +- } +- +- public int getRequestId() { +- return request.getRequestId(); +- } +- +- public boolean isOneWay() { +- return isOneway; +- } +- +- public ServiceContexts getServiceContexts() { +- return request.getServiceContexts(); +- } +- +- public String getOperationName() { +- return request.getOperation(); +- } +- +- public ObjectKey getObjectKey() { +- return request.getObjectKey(); +- } +- +- public ServerRequest getServerRequest() +- { +- // Set the size of the marshalled data in the message header. +- getMessage().setSize( getByteBuffer(), getSize() ) ; +- +- // Construct a new ServerRequest out of the buffer in this ClientRequest +- LocalServerRequestImpl serverRequest = new LocalServerRequestImpl( +- (ORB)orb(), toByteArray(), request ) ; +- +- // Skip over all of the GIOP header information. This positions +- // the offset in the buffer so that the skeleton can correctly read +- // the marshalled arguments. +- serverRequest.setIndex( bodyBegin ) ; +- +- return serverRequest ; +- } +- +- public ClientResponse invoke() +- { +- ORB myORB = (ORB)orb() ; +- +- ServerResponse serverResponse = myORB.process( getServerRequest() ) ; +- +- LocalServerResponseImpl lsr = (LocalServerResponseImpl)serverResponse ; +- +- return lsr.getClientResponse() ; +- } +- +- /** +- * Check to see if the request is local. +- */ +- public boolean isLocal(){ +- return true; +- } +- +- private RequestMessage request; +- private int bodyBegin; +- private boolean isOneway; +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalClientResponseImpl.sjava 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalClientResponseImpl.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,162 +0,0 @@ +-/* +- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. +- * 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.corba.se.impl.iiop; +- +-import java.io.IOException; +- +-import org.omg.CORBA.SystemException; +-import org.omg.CORBA.CompletionStatus; +- +-import com.sun.corba.se.impl.core.Response; +-import com.sun.corba.se.impl.core.ClientResponse; +-import com.sun.corba.se.impl.corba.IOR; +-import com.sun.corba.se.impl.core.ORB; +-import com.sun.corba.se.impl.core.ServiceContext; +-import com.sun.corba.se.impl.core.ServiceContexts; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage; +-import com.sun.corba.se.impl.orbutil.MinorCodes; +- +-class LocalClientResponseImpl extends IIOPInputStream implements ClientResponse +-{ +- LocalClientResponseImpl(ORB orb, byte[] buf, ReplyMessage header) +- { +- super(orb, buf, header.getSize(), header.isLittleEndian(), header, null); +- +- this.reply = header; +- +- // NOTE (Ram J) (06/02/2000) if we set result.setIndex(bodyBegin) +- // in LocalServerResponse.getClientResponse(), then we do not need +- // to read the headers (done below) anymore. +- // This will be an optimisation which is can be done to speed up the +- // local invocation by avoiding reading the headers in the local cases. +- +- // BUGFIX(Ram Jeyaraman) This has been moved from +- // LocalServerResponse.getClientResponse() +- // Skip over all of the GIOP header information. This positions +- // the offset in the buffer so that the skeleton can correctly read +- // the marshalled arguments. +- this.setIndex(Message.GIOPMessageHeaderLength); +- +- // BUGFIX(Ram Jeyaraman) For local invocations, the reply mesg fields +- // needs to be set, by reading the response buffer contents +- // to correctly set the exception type and other info. +- this.reply.read(this); +- } +- +- LocalClientResponseImpl(SystemException ex) +- { +- this.systemException = ex; +- } +- +- public boolean isSystemException() { +- if ( reply != null ) +- return reply.getReplyStatus() == ReplyMessage.SYSTEM_EXCEPTION; +- else +- return (systemException != null); +- } +- +- public boolean isUserException() { +- if ( reply != null ) +- return reply.getReplyStatus() == ReplyMessage.USER_EXCEPTION; +- else +- return false; +- } +- +- public boolean isLocationForward() { +- if ( reply != null ) { +- return ( (reply.getReplyStatus() == ReplyMessage.LOCATION_FORWARD) || +- (reply.getReplyStatus() == ReplyMessage.LOCATION_FORWARD_PERM) ); +- //return reply.getReplyStatus() == ReplyMessage.LOCATION_FORWARD; +- } else { +- return false; +- } +- } +- +- public boolean isDifferentAddrDispositionRequested() { +- if (reply != null) { +- return reply.getReplyStatus() == ReplyMessage.NEEDS_ADDRESSING_MODE; +- } +- +- return false; +- } +- +- public short getAddrDisposition() { +- if (reply != null) { +- return reply.getAddrDisposition(); +- } +- +- throw new org.omg.CORBA.INTERNAL( +- "Null reply in getAddrDisposition", +- MinorCodes.NULL_REPLY_IN_GET_ADDR_DISPOSITION, +- CompletionStatus.COMPLETED_MAYBE); +- } +- +- public IOR getForwardedIOR() { +- if ( reply != null ) +- return reply.getIOR(); +- else +- return null; +- } +- +- public int getRequestId() { +- if ( reply != null ) +- return reply.getRequestId(); +- else +- throw new org.omg.CORBA.INTERNAL("Error in getRequestId"); +- } +- +- public ServiceContexts getServiceContexts() { +- if ( reply != null ) +- return reply.getServiceContexts(); +- else +- return null; +- } +- +- public SystemException getSystemException() { +- if ( reply != null ) +- return reply.getSystemException(); +- else +- return systemException; +- } +- +- public java.lang.String peekUserExceptionId() { +- mark(Integer.MAX_VALUE); +- String result = read_string(); +- reset(); +- return result; +- } +- +- /** +- * Check to see if the response is local. +- */ +- public boolean isLocal(){ +- return true; +- } +- +- private ReplyMessage reply; +- private SystemException systemException; +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalServerRequestImpl.sjava 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalServerRequestImpl.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,208 +0,0 @@ +-/* +- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. +- * 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.corba.se.impl.iiop; +- +-import org.omg.CORBA.SystemException; +- +-import com.sun.corba.se.impl.core.ServerRequest; +-import com.sun.corba.se.impl.core.ServiceContext; +-import com.sun.corba.se.impl.core.DuplicateServiceContext; +-import com.sun.corba.se.impl.core.UEInfoServiceContext; +-import com.sun.corba.se.impl.core.ServiceContexts; +-import com.sun.corba.se.impl.core.ServerResponse; +-import com.sun.corba.se.impl.corba.IOR; +-import com.sun.corba.se.impl.core.ORB; +-import com.sun.corba.se.impl.orbutil.ORBUtility; //d11638 +-import org.omg.CORBA.portable.UnknownException; +-import org.omg.CORBA.UNKNOWN; +-import org.omg.CORBA.CompletionStatus; +-import com.sun.corba.se.impl.ior.ObjectKey; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage; +- +-class LocalServerRequestImpl extends IIOPInputStream implements ServerRequest { +- org.omg.CORBA.portable.OutputStream replyStream; +- org.omg.CORBA.portable.OutputStream exceptionReplyStream; +- +- LocalServerRequestImpl(ORB orb, byte[] buf, RequestMessage header) +- { +- super(orb, buf, header.getSize(), header.isLittleEndian(), header, null ); +- +- this.request = header; +- } +- +- public int getRequestId() { +- return request.getRequestId(); +- } +- +- public boolean isOneWay() { +- return !request.isResponseExpected(); +- } +- +- public ServiceContexts getServiceContexts() { +- return request.getServiceContexts(); +- } +- +- public String getOperationName() { +- return request.getOperation(); +- } +- +- public ObjectKey getObjectKey() { +- return request.getObjectKey(); +- } +- +- public ServerResponse createResponse(ServiceContexts svc) +- { +- return new LocalServerResponseImpl(this, svc); +- } +- +- public org.omg.CORBA.portable.OutputStream createReply() { +- if (replyStream == null) { +- replyStream = (org.omg.CORBA.portable.OutputStream) +- createResponse(null); +- } +- return replyStream; +- } +- +- public org.omg.CORBA.portable.OutputStream createExceptionReply() { +- if (exceptionReplyStream == null) { +- exceptionReplyStream = (org.omg.CORBA.portable.OutputStream) +- createUserExceptionResponse(null); +- } +- return exceptionReplyStream; +- } +- +- public ServerResponse createUserExceptionResponse( +- ServiceContexts svc) +- { +- return new LocalServerResponseImpl(this, svc, true); +- } +- +- public ServerResponse createUnknownExceptionResponse( +- UnknownException ex) { +- ServiceContexts contexts = null; +- SystemException sys = new UNKNOWN( 0, +- CompletionStatus.COMPLETED_MAYBE); +- +- try { +- contexts = new ServiceContexts( (ORB)orb() ); +- UEInfoServiceContext uei = new UEInfoServiceContext(sys); +- contexts.put(uei) ; +- } catch (DuplicateServiceContext d) { +- // can't happen +- } +- +- return createSystemExceptionResponse(sys,contexts); +- } +- +- public ServerResponse createSystemExceptionResponse( +- SystemException ex, ServiceContexts svc) { +- +- // Only do this if interceptors have been initialized on this request +- // and have not completed their lifecycle (otherwise the info stack +- // may be empty or have a different request's entry on top). +- if (executePIInResponseConstructor()) { +- // Inform Portable Interceptors of the SystemException. This is +- // required to be done here because the ending interception point +- // is called in the ServerResponseImpl constructor called below +- // but we do not currently write the SystemException into the +- // response until after the ending point is called. +- ORB orb = (ORB)orb(); +- orb.getPIHandler().setServerPIInfo( ex ); +- } +- +- if (orb() != null && ((ORB)orb()).subcontractDebugFlag && ex != null) +- ORBUtility.dprint(this, "Sending SystemException:", ex); +- +- LocalServerResponseImpl response = +- new LocalServerResponseImpl(this, svc, false); +- ORBUtility.writeSystemException(ex, response); +- return response; +- } +- +- public ServerResponse createLocationForward( +- IOR ior, ServiceContexts svc) { +- ReplyMessage reply = MessageBase.createReply( (ORB)orb(), +- request.getGIOPVersion(), request.getRequestId(), +- ReplyMessage.LOCATION_FORWARD, svc, ior); +- LocalServerResponseImpl response = +- new LocalServerResponseImpl(this, reply, ior); +- +- return response; +- } +- +- private RequestMessage request; +- +- /** +- * Check to see if the request is local. +- */ +- public boolean isLocal(){ +- return true; +- } +- +- private boolean _executeReturnServantInResponseConstructor = false; +- +- public boolean executeReturnServantInResponseConstructor() +- { +- return _executeReturnServantInResponseConstructor; +- } +- +- public void setExecuteReturnServantInResponseConstructor(boolean b) +- { +- _executeReturnServantInResponseConstructor = b; +- } +- +- +- private boolean _executeRemoveThreadInfoInResponseConstructor = false; +- +- public boolean executeRemoveThreadInfoInResponseConstructor() +- { +- return _executeRemoveThreadInfoInResponseConstructor; +- } +- +- public void setExecuteRemoveThreadInfoInResponseConstructor(boolean b) +- { +- _executeRemoveThreadInfoInResponseConstructor = b; +- } +- +- +- private boolean _executePIInResponseConstructor = false; +- +- public boolean executePIInResponseConstructor() { +- return _executePIInResponseConstructor; +- } +- +- public void setExecutePIInResponseConstructor( boolean b ) { +- _executePIInResponseConstructor = b; +- } +- +- // We know that we're talking to the same ValueHandler, so +- // use the maximum version it supports. +- public byte getStreamFormatVersionForReply() { +- return ORBUtility.getMaxStreamFormatVersion(); +- } +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalServerResponseImpl.sjava 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/protocol/oldlocal/LocalServerResponseImpl.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,192 +0,0 @@ +-/* +- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. +- * 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.corba.se.impl.iiop; +- +-import org.omg.CORBA.SystemException; +- +-import com.sun.corba.se.impl.core.ServerResponse; +-import com.sun.corba.se.impl.core.ORB; +-import com.sun.corba.se.impl.corba.IOR; +-import com.sun.corba.se.impl.core.ServiceContext; +-import com.sun.corba.se.impl.core.ServiceContexts; +-import com.sun.corba.se.impl.core.ClientResponse; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage; +- +-class LocalServerResponseImpl +- extends IIOPOutputStream +- implements ServerResponse +-{ +- LocalServerResponseImpl(LocalServerRequestImpl request, ServiceContexts svc) +- { +- this(request, +- MessageBase.createReply( +- (ORB)request.orb(), +- request.getGIOPVersion(), +- request.getRequestId(), ReplyMessage.NO_EXCEPTION, +- svc, null), +- null); +- } +- +- LocalServerResponseImpl(LocalServerRequestImpl request, ServiceContexts svc, +- boolean user) +- { +- this(request, +- MessageBase.createReply( +- (ORB)request.orb(), +- request.getGIOPVersion(), request.getRequestId(), +- user ? ReplyMessage.USER_EXCEPTION : +- ReplyMessage.SYSTEM_EXCEPTION, +- svc, null), +- null); +- } +- +- LocalServerResponseImpl( LocalServerRequestImpl request, ReplyMessage reply, +- IOR ior) +- { +- super(request.getGIOPVersion(), +- (ORB)request.orb(), +- null, +- BufferManagerFactory.newBufferManagerWrite(BufferManagerFactory.GROW), +- request.getStreamFormatVersionForReply()); +- +- setMessage(reply); +- +- ORB orb = (ORB)request.orb(); +- +- ServerResponseImpl.runServantPostInvoke(orb, request); +- +- if( request.executePIInResponseConstructor() ) { +- // Invoke server request ending interception points (send_*): +- // Note: this may end up with a SystemException or an internal +- // Runtime ForwardRequest. +- orb.getPIHandler().invokeServerPIEndingPoint( reply ); +- +- // Note this will be executed even if a ForwardRequest or +- // SystemException is thrown by a Portable Interceptors ending +- // point since we end up in this constructor again anyway. +- orb.getPIHandler().cleanupServerPIRequest(); +- +- // See (Local)ServerRequestImpl.createSystemExceptionResponse +- // for why this is necesary. +- request.setExecutePIInResponseConstructor(false); +- } +- +- // Once you get here then the final reply is available (i.e., +- // postinvoke and interceptors have completed. +- if (request.executeRemoveThreadInfoInResponseConstructor()) { +- ServerResponseImpl.removeThreadInfo(orb, request); +- } +- +- reply.write(this); +- if (reply.getIOR() != null) +- reply.getIOR().write(this); +- +- this.reply = reply; +- this.ior = reply.getIOR(); +- } +- +- public boolean isSystemException() { +- if (reply != null) +- return reply.getReplyStatus() == ReplyMessage.SYSTEM_EXCEPTION; +- return false; +- } +- +- public boolean isUserException() { +- if (reply != null) +- return reply.getReplyStatus() == ReplyMessage.USER_EXCEPTION; +- return false; +- } +- +- public boolean isLocationForward() { +- if (ior != null) +- return true; +- return false; +- } +- +- public IOR getForwardedIOR() { +- return ior; +- } +- +- public int getRequestId() { +- if (reply != null) +- return reply.getRequestId(); +- return -1; +- } +- +- public ServiceContexts getServiceContexts() { +- if (reply != null) +- return reply.getServiceContexts(); +- return null; +- } +- +- public SystemException getSystemException() { +- if (reply != null) +- return reply.getSystemException(); +- return null; +- } +- +- public ReplyMessage getReply() +- { +- return reply ; +- } +- +- public ClientResponse getClientResponse() +- { +- // set the size of the marshalled data in the message header +- getMessage().setSize(getByteBuffer(), getSize()); +- +- // Construct a new ClientResponse out of the buffer in this ClientRequest +- LocalClientResponseImpl result = +- new LocalClientResponseImpl( (ORB)orb(), toByteArray(), reply); +- +- // NOTE (Ram J) (06/02/2000) if we set result.setIndex(bodyBegin) here +- // then the LocalClientResponse does not need to read the headers anymore. +- // This will be an optimisation which is can be done to speed up the +- // local invocation by avoiding reading the headers in the local cases. +- +- // BUGFIX(Ram Jeyaraman) result.setOffset is now done in +- // LocalClientResponseImpl constructor. +- /* +- // Skip over all of the GIOP header information. This positions +- // the offset in the buffer so that the skeleton can correctly read +- // the marshalled arguments. +- result.setOffset( bodyBegin ) ; +- */ +- +- return result ; +- } +- +- /** +- * Check to see if the response is local. +- */ +- public boolean isLocal(){ +- return true; +- } +- +- private ReplyMessage reply; +- private IOR ior; // forwarded IOR +-} +--- ./corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java 2014-01-18 12:16:06.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,8 @@ + import org.omg.CosNaming.NamingContextExt ; + import org.omg.CosNaming.NamingContextExtHelper ; + ++import sun.corba.EncapsInputStreamFactory; + -+ # JVM -+ JVM_Accept; -+ JVM_ActiveProcessorCount; -+ JVM_AllocateNewArray; -+ JVM_AllocateNewObject; -+ JVM_ArrayCopy; -+ JVM_AssertionStatusDirectives; -+ JVM_Available; -+ JVM_Bind; -+ JVM_ClassDepth; -+ JVM_ClassLoaderDepth; -+ JVM_Clone; -+ JVM_Close; -+ JVM_CX8Field; -+ JVM_CompileClass; -+ JVM_CompileClasses; -+ JVM_CompilerCommand; -+ JVM_Connect; -+ JVM_ConstantPoolGetClassAt; -+ JVM_ConstantPoolGetClassAtIfLoaded; -+ JVM_ConstantPoolGetDoubleAt; -+ JVM_ConstantPoolGetFieldAt; -+ JVM_ConstantPoolGetFieldAtIfLoaded; -+ JVM_ConstantPoolGetFloatAt; -+ JVM_ConstantPoolGetIntAt; -+ JVM_ConstantPoolGetLongAt; -+ JVM_ConstantPoolGetMethodAt; -+ JVM_ConstantPoolGetMethodAtIfLoaded; -+ JVM_ConstantPoolGetMemberRefInfoAt; -+ JVM_ConstantPoolGetSize; -+ JVM_ConstantPoolGetStringAt; -+ JVM_ConstantPoolGetUTF8At; -+ JVM_CountStackFrames; -+ JVM_CurrentClassLoader; -+ JVM_CurrentLoadedClass; -+ JVM_CurrentThread; -+ JVM_CurrentTimeMillis; -+ JVM_DefineClass; -+ JVM_DefineClassWithSource; -+ JVM_DefineClassWithSourceCond; -+ JVM_DesiredAssertionStatus; -+ JVM_DisableCompiler; -+ JVM_DoPrivileged; -+ JVM_DTraceGetVersion; -+ JVM_DTraceActivate; -+ JVM_DTraceIsProbeEnabled; -+ JVM_DTraceIsSupported; -+ JVM_DTraceDispose; -+ JVM_DumpAllStacks; -+ JVM_DumpThreads; -+ JVM_EnableCompiler; -+ JVM_Exit; -+ JVM_FillInStackTrace; -+ JVM_FindClassFromClass; -+ JVM_FindClassFromClassLoader; -+ JVM_FindClassFromBootLoader; -+ JVM_FindLibraryEntry; -+ JVM_FindLoadedClass; -+ JVM_FindPrimitiveClass; -+ JVM_FindSignal; -+ JVM_FreeMemory; -+ JVM_GC; -+ JVM_GetAllThreads; -+ JVM_GetArrayElement; -+ JVM_GetArrayLength; -+ JVM_GetCPClassNameUTF; -+ JVM_GetCPFieldClassNameUTF; -+ JVM_GetCPFieldModifiers; -+ JVM_GetCPFieldNameUTF; -+ JVM_GetCPFieldSignatureUTF; -+ JVM_GetCPMethodClassNameUTF; -+ JVM_GetCPMethodModifiers; -+ JVM_GetCPMethodNameUTF; -+ JVM_GetCPMethodSignatureUTF; -+ JVM_GetCallerClass; -+ JVM_GetClassAccessFlags; -+ JVM_GetClassAnnotations; -+ JVM_GetClassCPEntriesCount; -+ JVM_GetClassCPTypes; -+ JVM_GetClassConstantPool; -+ JVM_GetClassContext; -+ JVM_GetClassDeclaredConstructors; -+ JVM_GetClassDeclaredFields; -+ JVM_GetClassDeclaredMethods; -+ JVM_GetClassFieldsCount; -+ JVM_GetClassInterfaces; -+ JVM_GetClassLoader; -+ JVM_GetClassMethodsCount; -+ JVM_GetClassModifiers; -+ JVM_GetClassName; -+ JVM_GetClassNameUTF; -+ JVM_GetClassSignature; -+ JVM_GetClassSigners; -+ JVM_GetComponentType; -+ JVM_GetDeclaredClasses; -+ JVM_GetDeclaringClass; -+ JVM_GetEnclosingMethodInfo; -+ JVM_GetFieldAnnotations; -+ JVM_GetFieldIxModifiers; -+ JVM_GetHostName; -+ JVM_GetInheritedAccessControlContext; -+ JVM_GetInterfaceVersion; -+ JVM_GetLastErrorString; -+ JVM_GetManagement; -+ JVM_GetMethodAnnotations; -+ JVM_GetMethodDefaultAnnotationValue; -+ JVM_GetMethodIxArgsSize; -+ JVM_GetMethodIxByteCode; -+ JVM_GetMethodIxByteCodeLength; -+ JVM_GetMethodIxExceptionIndexes; -+ JVM_GetMethodIxExceptionTableEntry; -+ JVM_GetMethodIxExceptionTableLength; -+ JVM_GetMethodIxExceptionsCount; -+ JVM_GetMethodIxLocalsCount; -+ JVM_GetMethodIxMaxStack; -+ JVM_GetMethodIxModifiers; -+ JVM_GetMethodIxNameUTF; -+ JVM_GetMethodIxSignatureUTF; -+ JVM_GetMethodParameterAnnotations; -+ JVM_GetPrimitiveArrayElement; -+ JVM_GetProtectionDomain; -+ JVM_GetSockName; -+ JVM_GetSockOpt; -+ JVM_GetStackAccessControlContext; -+ JVM_GetStackTraceDepth; -+ JVM_GetStackTraceElement; -+ JVM_GetSystemPackage; -+ JVM_GetSystemPackages; -+ JVM_GetThreadStateNames; -+ JVM_GetThreadStateValues; -+ JVM_GetVersionInfo; -+ JVM_Halt; -+ JVM_HoldsLock; -+ JVM_IHashCode; -+ JVM_InitAgentProperties; -+ JVM_InitProperties; -+ JVM_InitializeCompiler; -+ JVM_InitializeSocketLibrary; -+ JVM_InternString; -+ JVM_Interrupt; -+ JVM_InvokeMethod; -+ JVM_IsArrayClass; -+ JVM_IsConstructorIx; -+ JVM_IsInterface; -+ JVM_IsInterrupted; -+ JVM_IsNaN; -+ JVM_IsPrimitiveClass; -+ JVM_IsSameClassPackage; -+ JVM_IsSilentCompiler; -+ JVM_IsSupportedJNIVersion; -+ JVM_IsThreadAlive; -+ JVM_LatestUserDefinedLoader; -+ JVM_Listen; -+ JVM_LoadClass0; -+ JVM_LoadLibrary; -+ JVM_Lseek; -+ JVM_MaxObjectInspectionAge; -+ JVM_MaxMemory; -+ JVM_MonitorNotify; -+ JVM_MonitorNotifyAll; -+ JVM_MonitorWait; -+ JVM_NanoTime; -+ JVM_NativePath; -+ JVM_NewArray; -+ JVM_NewInstanceFromConstructor; -+ JVM_NewMultiArray; -+ JVM_OnExit; -+ JVM_Open; -+ JVM_PrintStackTrace; -+ JVM_RaiseSignal; -+ JVM_RawMonitorCreate; -+ JVM_RawMonitorDestroy; -+ JVM_RawMonitorEnter; -+ JVM_RawMonitorExit; -+ JVM_Read; -+ JVM_Recv; -+ JVM_RecvFrom; -+ JVM_RegisterSignal; -+ JVM_ReleaseUTF; -+ JVM_ResolveClass; -+ JVM_ResumeThread; -+ JVM_Send; -+ JVM_SendTo; -+ JVM_SetArrayElement; -+ JVM_SetClassSigners; -+ JVM_SetLength; -+ JVM_SetNativeThreadName; -+ JVM_SetPrimitiveArrayElement; -+ JVM_SetProtectionDomain; -+ JVM_SetSockOpt; -+ JVM_SetThreadPriority; -+ JVM_Sleep; -+ JVM_Socket; -+ JVM_SocketAvailable; -+ JVM_SocketClose; -+ JVM_SocketShutdown; -+ JVM_StartThread; -+ JVM_StopThread; -+ JVM_SuspendThread; -+ JVM_SupportsCX8; -+ JVM_Sync; -+ JVM_Timeout; -+ JVM_TotalMemory; -+ JVM_TraceInstructions; -+ JVM_TraceMethodCalls; -+ JVM_UnloadLibrary; -+ JVM_Write; -+ JVM_Yield; -+ JVM_handle_bsd_signal; + import com.sun.corba.se.spi.ior.IOR; + import com.sun.corba.se.spi.ior.IORTemplate; + import com.sun.corba.se.spi.ior.ObjectKey; +@@ -114,8 +116,8 @@ + buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0); + buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F); + } +- EncapsInputStream s = new EncapsInputStream(orb, buf, buf.length, +- orb.getORBData().getGIOPVersion()); ++ EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length, ++ orb.getORBData().getGIOPVersion()); + s.consumeEndian(); + return s.read_Object() ; + } +--- ./corba/src/share/classes/com/sun/corba/se/impl/transport/BufferConnectionImpl.sjava 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/transport/BufferConnectionImpl.sjava 1969-12-31 16:00:00.000000000 -0800 +@@ -1,710 +0,0 @@ +-/* +- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +- * 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.corba.se.impl.transport; +- +-import java.io.IOException; +-import java.net.InetSocketAddress; +-import java.net.Socket; +-import java.nio.ByteBuffer; +-import java.nio.channels.SelectableChannel; +-import java.nio.channels.SelectionKey; +-import java.nio.channels.SocketChannel; +-import java.security.AccessController; +-import java.security.PrivilegedAction; +-import java.util.Collections; +-import java.util.Hashtable; +-import java.util.HashMap; +-import java.util.Map; +- +-import org.omg.CORBA.COMM_FAILURE; +-import org.omg.CORBA.CompletionStatus; +-import org.omg.CORBA.DATA_CONVERSION; +-import org.omg.CORBA.INTERNAL; +-import org.omg.CORBA.MARSHAL; +-import org.omg.CORBA.OBJECT_NOT_EXIST; +-import org.omg.CORBA.SystemException; +- +-import com.sun.org.omg.SendingContext.CodeBase; +- +-import com.sun.corba.se.pept.broker.Broker; +-import com.sun.corba.se.pept.encoding.InputObject; +-import com.sun.corba.se.pept.encoding.OutputObject; +-import com.sun.corba.se.pept.protocol.MessageMediator; +-import com.sun.corba.se.pept.transport.Acceptor; +-import com.sun.corba.se.pept.transport.Connection; +-import com.sun.corba.se.pept.transport.ConnectionCache; +-import com.sun.corba.se.pept.transport.ContactInfo; +-import com.sun.corba.se.pept.transport.EventHandler; +-import com.sun.corba.se.pept.transport.InboundConnectionCache; +-import com.sun.corba.se.pept.transport.OutboundConnectionCache; +-import com.sun.corba.se.pept.transport.ResponseWaitingRoom; +-import com.sun.corba.se.pept.transport.Selector; +- +-import com.sun.corba.se.spi.ior.IOR; +-import com.sun.corba.se.spi.ior.iiop.GIOPVersion; +-import com.sun.corba.se.spi.logging.CORBALogDomains; +-import com.sun.corba.se.spi.orb.ORB ; +-import com.sun.corba.se.spi.orbutil.threadpool.Work; +-import com.sun.corba.se.spi.protocol.CorbaMessageMediator; +-import com.sun.corba.se.spi.transport.CorbaContactInfo; +-import com.sun.corba.se.spi.transport.CorbaConnection; +-import com.sun.corba.se.spi.transport.CorbaResponseWaitingRoom; +- +-import com.sun.corba.se.impl.encoding.CachedCodeBase; +-import com.sun.corba.se.impl.encoding.CDRInputStream_1_0; +-import com.sun.corba.se.impl.encoding.CDROutputObject; +-import com.sun.corba.se.impl.encoding.CDROutputStream_1_0; +-import com.sun.corba.se.impl.encoding.CodeSetComponentInfo; +-import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry; +-import com.sun.corba.se.impl.logging.ORBUtilSystemException; +-import com.sun.corba.se.impl.orbutil.ORBConstants; +-import com.sun.corba.se.impl.orbutil.ORBUtility; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; +-import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase; +-import com.sun.corba.se.impl.transport.CorbaResponseWaitingRoomImpl; +- +-/** +- * @author Ken Cavanaugh +- */ +-public class BufferConnectionImpl +- extends +- EventHandlerBase +- implements +- CorbaConnection, +- Work +-{ +- // +- // New transport. +- // +- +- protected long enqueueTime; +- +- public SocketChannel getSocketChannel() +- { +- return null; +- } +- +- // REVISIT: +- // protected for test: genericRPCMSGFramework.IIOPConnection constructor. +- +- // +- // From iiop.Connection.java +- // +- +- protected long timeStamp = 0; +- protected boolean isServer = false; +- +- // Start at some value other than zero since this is a magic +- // value in some protocols. +- protected int requestId = 5; +- protected CorbaResponseWaitingRoom responseWaitingRoom; +- protected int state; +- protected java.lang.Object stateEvent = new java.lang.Object(); +- protected java.lang.Object writeEvent = new java.lang.Object(); +- protected boolean writeLocked; +- protected int serverRequestCount = 0; +- +- // Server request map: used on the server side of Connection +- // Maps request ID to IIOPInputStream. +- Map serverRequestMap = new HashMap() ; +- +- // This is a flag associated per connection telling us if the +- // initial set of sending contexts were sent to the receiver +- // already... +- protected boolean postInitialContexts = false; +- +- // Remote reference to CodeBase server (supplies +- // FullValueDescription, among other things) +- protected IOR codeBaseServerIOR; +- +- // CodeBase cache for this connection. This will cache remote operations, +- // handle connecting, and ensure we don't do any remote operations until +- // necessary. +- protected CachedCodeBase cachedCodeBase = new CachedCodeBase(this); +- +- protected ORBUtilSystemException wrapper ; +- +- List buffers ; +- +- public BufferConnectionImpl(ORB orb, byte[][] data ) +- { +- this.orb = orb; +- wrapper = ORBUtilSystemException.get( orb, +- CORBALogDomains.RPC_TRANSPORT ) ; +- buffers = new ArrayList() ; +- } +- +- //////////////////////////////////////////////////// +- // +- // framework.transport.Connection +- // +- +- public boolean shouldRegisterReadEvent() +- { +- return false; +- } +- +- public boolean shouldRegisterServerReadEvent() +- { +- return false; +- } +- +- public boolean read() +- { +- return true ; +- } +- +- protected CorbaMessageMediator readBits() +- { +- return null ; +- } +- +- protected boolean dispatch(CorbaMessageMediator messageMediator) +- { +- } +- +- public boolean shouldUseDirectByteBuffers() +- { +- return false ; +- } +- +- // Only called from readGIOPMessage with (12, 0, 12) as arguments +- // size is size of buffer to create +- // offset is offset from start of message in buffer +- // length is length to read +- public ByteBuffer read(int size, int offset, int length) +- throws IOException +- { +- byte[] buf = new byte[size]; +- readFully( buf, offset, length); +- ByteBuffer byteBuffer = ByteBuffer.wrap(buf); +- byteBuffer.limit(size); +- return byteBuffer; +- } +- +- // Only called as read( buf, 12, msgsize-12 ) in readGIOPMessage +- // We can ignore the byteBuffer parameter +- // offset is the starting position to place data in the result +- // length is the length of the data to read +- public ByteBuffer read(ByteBuffer byteBuffer, int offset, int length) +- throws IOException +- { +- int size = offset + length; +- byte[] buf = new byte[size]; +- readFully(buf, offset, length); +- return ByteBuffer.wrap(buf); +- } +- +- // Read size bytes from buffer list and place the data +- // starting at offset in buf. +- public void readFully(byte[] buf, int offset, int size) +- throws IOException +- { +- int remaining = size ; +- int position = offset ; +- while (remaining > 0) { +- ByteBuffer buff = (ByteBuffer)buffers.get(0) ; +- int dataSize = buff.remaining() ; +- int xferSize = dataSize ; +- if (dataSize >= remaining) : +- xferSize = remaining ; +- buffers.remove(0) ; +- } +- +- buff.get( buf, offset, xferSize ) ; +- +- offset += xferSize ; +- remaining -= xferSize ; +- } +- } +- +- public void write(ByteBuffer byteBuffer) +- throws IOException +- { +- buffers.add( byteBuffer ) ; +- } +- +- /** +- * Note:it is possible for this to be called more than once +- */ +- public synchronized void close() +- { +- } +- +- public Acceptor getAcceptor() +- { +- return null; +- } +- +- public ContactInfo getContactInfo() +- { +- return null; +- } +- +- public EventHandler getEventHandler() +- { +- return this; +- } +- +- public OutputObject createOutputObject(MessageMediator messageMediator) +- { +- // REVISIT - remove this method from Connection and all it subclasses. +- throw new RuntimeException("*****SocketOrChannelConnectionImpl.createOutputObject - should not be called."); +- } +- +- // This is used by the GIOPOutputObject in order to +- // throw the correct error when handling code sets. +- // Can we determine if we are on the server side by +- // other means? XREVISIT +- public boolean isServer() +- { +- return isServer; +- } +- +- public boolean isBusy() +- { +- return false ; +- } +- +- public long getTimeStamp() +- { +- return timeStamp; +- } +- +- public void setTimeStamp(long time) +- { +- timeStamp = time; +- } +- +- public void setState(String stateString) +- { +- synchronized (stateEvent) { +- if (stateString.equals("ESTABLISHED")) { +- state = ESTABLISHED; +- stateEvent.notifyAll(); +- } else { +- // REVISIT: ASSERT +- } +- } +- } +- +- public void writeLock() +- { +- } +- +- public void writeUnlock() +- { +- } +- +- public void sendWithoutLock(OutputObject outputObject) +- { +- } +- +- public void registerWaiter(MessageMediator messageMediator) +- { +- } +- +- public void unregisterWaiter(MessageMediator messageMediator) +- { +- } +- +- public InputObject waitForResponse(MessageMediator messageMediator) +- { +- return null ; +- } +- +- public void setConnectionCache(ConnectionCache connectionCache) +- { +- } +- +- public ConnectionCache getConnectionCache() +- { +- return null; +- } +- +- //////////////////////////////////////////////////// +- // +- // EventHandler methods +- // +- +- public SelectableChannel getChannel() +- { +- return null; +- } +- +- public int getInterestOps() +- { +- return null; +- } +- +- // public Acceptor getAcceptor() - already defined above. +- +- public Connection getConnection() +- { +- return this; +- } +- +- //////////////////////////////////////////////////// +- // +- // Work methods. +- // +- +- public String getName() +- { +- return this.toString(); +- } +- +- public void doWork() +- { +- } +- +- public void setEnqueueTime(long timeInMillis) +- { +- enqueueTime = timeInMillis; +- } +- +- public long getEnqueueTime() +- { +- return enqueueTime; +- } +- +- //////////////////////////////////////////////////// +- // +- // spi.transport.CorbaConnection. +- // +- +- public ResponseWaitingRoom getResponseWaitingRoom() +- { +- return null ; +- } +- +- // REVISIT - inteface defines isServer but already defined in +- // higher interface. +- +- +- public void serverRequestMapPut(int requestId, +- CorbaMessageMediator messageMediator) +- { +- serverRequestMap.put(new Integer(requestId), messageMediator); +- } +- +- public CorbaMessageMediator serverRequestMapGet(int requestId) +- { +- return (CorbaMessageMediator) +- serverRequestMap.get(new Integer(requestId)); +- } +- +- public void serverRequestMapRemove(int requestId) +- { +- serverRequestMap.remove(new Integer(requestId)); +- } +- +- +- // REVISIT: this is also defined in: +- // com.sun.corba.se.spi.legacy.connection.Connection +- public java.net.Socket getSocket() +- { +- return null; +- } +- +- /** It is possible for a Close Connection to have been +- ** sent here, but we will not check for this. A "lazy" +- ** Exception will be thrown in the Worker thread after the +- ** incoming request has been processed even though the connection +- ** is closed before the request is processed. This is o.k because +- ** it is a boundary condition. To prevent it we would have to add +- ** more locks which would reduce performance in the normal case. +- **/ +- public synchronized void serverRequestProcessingBegins() +- { +- serverRequestCount++; +- } +- +- public synchronized void serverRequestProcessingEnds() +- { +- serverRequestCount--; +- } +- +- // +- // +- // +- +- public synchronized int getNextRequestId() +- { +- return requestId++; +- } +- +- // Negotiated code sets for char and wchar data +- protected CodeSetComponentInfo.CodeSetContext codeSetContext = null; +- +- public ORB getBroker() +- { +- return orb; +- } +- +- public CodeSetComponentInfo.CodeSetContext getCodeSetContext() +- { +- // Needs to be synchronized for the following case when the client +- // doesn't send the code set context twice, and we have two threads +- // in ServerRequestDispatcher processCodeSetContext. +- // +- // Thread A checks to see if there is a context, there is none, so +- // it calls setCodeSetContext, getting the synch lock. +- // Thread B checks to see if there is a context. If we didn't synch, +- // it might decide to outlaw wchar/wstring. +- if (codeSetContext == null) { +- synchronized(this) { +- return codeSetContext; +- } +- } +- +- return codeSetContext; +- } +- +- public synchronized void setCodeSetContext(CodeSetComponentInfo.CodeSetContext csc) { +- // Double check whether or not we need to do this +- if (codeSetContext == null) { +- +- if (OSFCodeSetRegistry.lookupEntry(csc.getCharCodeSet()) == null || +- OSFCodeSetRegistry.lookupEntry(csc.getWCharCodeSet()) == null) { +- // If the client says it's negotiated a code set that +- // isn't a fallback and we never said we support, then +- // it has a bug. +- throw wrapper.badCodesetsFromClient() ; +- } +- +- codeSetContext = csc; +- } +- } +- +- // +- // from iiop.IIOPConnection.java +- // +- +- // Map request ID to an InputObject. +- // This is so the client thread can start unmarshaling +- // the reply and remove it from the out_calls map while the +- // ReaderThread can still obtain the input stream to give +- // new fragments. Only the ReaderThread touches the clientReplyMap, +- // so it doesn't incur synchronization overhead. +- +- public MessageMediator clientRequestMapGet(int requestId) +- { +- return null ; +- } +- +- protected MessageMediator clientReply_1_1; +- +- public void clientReply_1_1_Put(MessageMediator x) +- { +- clientReply_1_1 = x; +- } +- +- public MessageMediator clientReply_1_1_Get() +- { +- return clientReply_1_1; +- } +- +- public void clientReply_1_1_Remove() +- { +- clientReply_1_1 = null; +- } +- +- protected MessageMediator serverRequest_1_1; +- +- public void serverRequest_1_1_Put(MessageMediator x) +- { +- serverRequest_1_1 = x; +- } +- +- public MessageMediator serverRequest_1_1_Get() +- { +- return serverRequest_1_1; +- } +- +- public void serverRequest_1_1_Remove() +- { +- serverRequest_1_1 = null; +- } +- +- protected String getStateString( int state ) +- { +- synchronized ( stateEvent ){ +- switch (state) { +- case OPENING : return "OPENING" ; +- case ESTABLISHED : return "ESTABLISHED" ; +- case CLOSE_SENT : return "CLOSE_SENT" ; +- case CLOSE_RECVD : return "CLOSE_RECVD" ; +- case ABORT : return "ABORT" ; +- default : return "???" ; +- } +- } +- } +- +- public synchronized boolean isPostInitialContexts() { +- return postInitialContexts; +- } +- +- // Can never be unset... +- public synchronized void setPostInitialContexts(){ +- postInitialContexts = true; +- } +- +- /** +- * Wake up the outstanding requests on the connection, and hand them +- * COMM_FAILURE exception with a given minor code. +- * +- * Also, delete connection from connection table and +- * stop the reader thread. +- +- * Note that this should only ever be called by the Reader thread for +- * this connection. +- * +- * @param minor_code The minor code for the COMM_FAILURE major code. +- * @param die Kill the reader thread (this thread) before exiting. +- */ +- public void purgeCalls(SystemException systemException, +- boolean die, boolean lockHeld) +- { +- } +- +- /************************************************************************* +- * The following methods are for dealing with Connection cleaning for +- * better scalability of servers in high network load conditions. +- **************************************************************************/ +- +- public void sendCloseConnection(GIOPVersion giopVersion) +- throws IOException +- { +- Message msg = MessageBase.createCloseConnection(giopVersion); +- sendHelper(giopVersion, msg); +- } +- +- public void sendMessageError(GIOPVersion giopVersion) +- throws IOException +- { +- Message msg = MessageBase.createMessageError(giopVersion); +- sendHelper(giopVersion, msg); +- } +- +- /** +- * Send a CancelRequest message. This does not lock the connection, so the +- * caller needs to ensure this method is called appropriately. +- * @exception IOException - could be due to abortive connection closure. +- */ +- public void sendCancelRequest(GIOPVersion giopVersion, int requestId) +- throws IOException +- { +- +- Message msg = MessageBase.createCancelRequest(giopVersion, requestId); +- sendHelper(giopVersion, msg); +- } +- +- protected void sendHelper(GIOPVersion giopVersion, Message msg) +- throws IOException +- { +- // REVISIT: See comments in CDROutputObject constructor. +- CDROutputObject outputObject = +- new CDROutputObject((ORB)orb, null, giopVersion, this, msg, +- ORBConstants.STREAM_FORMAT_VERSION_1); +- msg.write(outputObject); +- +- outputObject.writeTo(this); +- } +- +- public void sendCancelRequestWithLock(GIOPVersion giopVersion, +- int requestId) +- throws IOException +- { +- writeLock(); +- try { +- sendCancelRequest(giopVersion, requestId); +- } finally { +- writeUnlock(); +- } +- } +- +- // Begin Code Base methods --------------------------------------- +- // +- // Set this connection's code base IOR. The IOR comes from the +- // SendingContext. This is an optional service context, but all +- // JavaSoft ORBs send it. +- // +- // The set and get methods don't need to be synchronized since the +- // first possible get would occur during reading a valuetype, and +- // that would be after the set. +- +- // Sets this connection's code base IOR. This is done after +- // getting the IOR out of the SendingContext service context. +- // Our ORBs always send this, but it's optional in CORBA. +- +- public final void setCodeBaseIOR(IOR ior) { +- codeBaseServerIOR = ior; +- } +- +- public final IOR getCodeBaseIOR() { +- return codeBaseServerIOR; +- } +- +- // Get a CodeBase stub to use in unmarshaling. The CachedCodeBase +- // won't connect to the remote codebase unless it's necessary. +- public final CodeBase getCodeBase() { +- return cachedCodeBase; +- } +- +- // End Code Base methods ----------------------------------------- +- +- // Can be overridden in subclass for different options. +- protected void setSocketOptions(Socket socket) +- { +- } +- +- public String toString() +- { +- synchronized ( stateEvent ){ +- return +- "BufferConnectionImpl[" + " " +- + getStateString( state ) + " " +- + shouldUseSelectThreadToWait() + " " +- + shouldUseWorkerThreadForEvent() +- + "]" ; +- } +- } +- +- // Must be public - used in encoding. +- public void dprint(String msg) +- { +- ORBUtility.dprint("SocketOrChannelConnectionImpl", msg); +- } +- +- protected void dprint(String msg, Throwable t) +- { +- dprint(msg); +- t.printStackTrace(System.out); +- } +-} +- +-// End of file. +--- ./corba/src/share/classes/com/sun/corba/se/impl/transport/DefaultSocketFactoryImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/transport/DefaultSocketFactoryImpl.java 2014-06-06 19:56:11.000000000 -0700 +@@ -32,6 +32,7 @@ + import java.net.ServerSocket; + import java.nio.channels.SocketChannel; + import java.nio.channels.ServerSocketChannel; ++import java.security.PrivilegedAction; - # miscellaneous functions -- _jio_fprintf -- _jio_printf -- _jio_snprintf -- _jio_vfprintf -- _jio_vsnprintf -+ jio_fprintf; -+ jio_printf; -+ jio_snprintf; -+ jio_vfprintf; -+ jio_vsnprintf; -+ fork1; -+ numa_warn; -+ numa_error; -+ -+ # Needed because there is no JVM interface for this. -+ sysThreadAvailableStackWithSlack; + import com.sun.corba.se.pept.transport.Acceptor; - # This is for Forte Analyzer profiling support. -- _AsyncGetCallTrace -+ AsyncGetCallTrace; +@@ -44,6 +45,22 @@ + implements ORBSocketFactory + { + private ORB orb; ++ private static final boolean keepAlive; + -+ # INSERT VTABLE SYMBOLS HERE - -- # INSERT VTABLE SYMBOLS HERE -+ local: -+ *; -+}; - ---- hotspot/make/bsd/makefiles/ppc.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/ppc.make 2014-04-20 12:39:31.000000000 -0700 -@@ -28,3 +28,6 @@ - # Must also specify if CPU is big endian - CFLAGS += -DVM_BIG_ENDIAN ++ static { ++ keepAlive = java.security.AccessController.doPrivileged( ++ new PrivilegedAction() { ++ @Override ++ public Boolean run () { ++ String value = ++ System.getProperty("com.sun.CORBA.transport.enableTcpKeepAlive"); ++ if (value != null) ++ return new Boolean(!"false".equalsIgnoreCase(value)); ++ ++ return Boolean.FALSE; ++ } ++ }); ++ } -+ifdef E500V2 -+ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1 -+endif ---- hotspot/make/bsd/makefiles/saproc.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/bsd/makefiles/saproc.make 2014-04-20 12:39:31.000000000 -0700 -@@ -36,6 +36,11 @@ - LIBSAPROC_G = lib$(SAPROC_G).so - endif + public void setORB(ORB orb) + { +@@ -85,6 +102,9 @@ + // Disable Nagle's algorithm (i.e., always send immediately). + socket.setTcpNoDelay(true); -+LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo -+LIBSAPROC_DIZ = lib$(SAPROC).diz -+LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo -+LIBSAPROC_G_DIZ = lib$(SAPROC_G).diz ++ if (keepAlive) ++ socket.setKeepAlive(true); + - AGENT_DIR = $(GAMMADIR)/agent + return socket; + } - SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) -@@ -66,7 +71,9 @@ +@@ -95,6 +115,8 @@ + { + // Disable Nagle's algorithm (i.e., always send immediately). + socket.setTcpNoDelay(true); ++ if (keepAlive) ++ socket.setKeepAlive(true); + } + } - SAMAPFILE = $(SASRCDIR)/mapfile +--- ./corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java 2013-09-06 11:20:50.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java 2013-12-01 11:13:38.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -55,7 +55,7 @@ + /** + * @author Harold Carr + */ +-public class SelectorImpl ++class SelectorImpl + extends + Thread + implements +--- ./corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java 2013-09-06 11:20:51.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/spi/orb/ORB.java 2014-04-19 01:27:00.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -170,6 +170,12 @@ + // representing LogDomain and ExceptionGroup. + private Map wrapperMap ; --DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) -+DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) -+DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) -+DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ) ++ static class Holder { ++ static final PresentationManager defaultPresentationManager = ++ setupPresentationManager(); ++ } ++ private static final Object pmLock = new Object(); ++ + private static Map staticWrapperMap = new ConcurrentHashMap(); - # DEBUG_BINARIES overrides everything, use full -g debug information - ifeq ($(DEBUG_BINARIES), true) -@@ -114,10 +121,32 @@ - -o $@ \ - $(SALIBS) - $(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } -+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) -+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ -+ ifeq ($(STRIP_POLICY),all_strip) -+ $(QUIETLY) $(STRIP) $@ -+ else -+ ifeq ($(STRIP_POLICY),min_strip) -+ $(QUIETLY) $(STRIP) -S $@ -+ # implied else here is no stripping at all -+ endif -+ endif -+ [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } -+ ifeq ($(ZIP_DEBUGINFO_FILES),1) -+ $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) -+ $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) -+ [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); } -+ endif -+endif + protected MonitoringManager monitoringManager; +@@ -235,13 +241,24 @@ + */ + public static PresentationManager getPresentationManager() + { +- AppContext ac = AppContext.getAppContext(); +- PresentationManager pm = (PresentationManager) ac.get(PresentationManager.class); +- if (pm == null) { +- pm = setupPresentationManager(); +- ac.put(PresentationManager.class, pm); ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null && AppContext.getAppContexts().size() > 0) { ++ AppContext ac = AppContext.getAppContext(); ++ if (ac != null) { ++ synchronized (pmLock) { ++ PresentationManager pm = ++ (PresentationManager) ac.get(PresentationManager.class); ++ if (pm == null) { ++ pm = setupPresentationManager(); ++ ac.put(PresentationManager.class, pm); ++ } ++ return pm; ++ } ++ } + } +- return pm; ++ ++ // No security manager or AppContext ++ return Holder.defaultPresentationManager; + } - install_saproc: $(BUILDLIBSAPROC) - $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ - echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ -+ test -f $(LIBSAPROC_DEBUGINFO) && \ -+ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ -+ test -f $(LIBSAPROC_DIZ) && \ -+ cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ - cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ - fi + /** Get the appropriate StubFactoryFactory. This +--- ./corba/src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java 2013-09-06 11:20:51.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/spi/orbutil/proxy/CompositeInvocationHandlerImpl.java 2014-01-18 12:16:06.000000000 -0800 +@@ -36,6 +36,7 @@ ---- hotspot/make/hotspot_version 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/hotspot_version 2014-04-20 12:39:32.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. - # 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,11 +31,11 @@ - # + import com.sun.corba.se.spi.logging.CORBALogDomains ; + import com.sun.corba.se.impl.logging.ORBUtilSystemException ; ++import com.sun.corba.se.impl.presentation.rmi.DynamicAccessPermission; - # Don't put quotes (fail windows build). --HOTSPOT_VM_COPYRIGHT=Copyright 2013 -+HOTSPOT_VM_COPYRIGHT=Copyright 2014 + public class CompositeInvocationHandlerImpl implements + CompositeInvocationHandler +@@ -46,11 +47,13 @@ + public void addInvocationHandler( Class interf, + InvocationHandler handler ) + { ++ checkAccess(); + classToInvocationHandler.put( interf, handler ) ; + } - HS_MAJOR_VER=24 --HS_MINOR_VER=0 --HS_BUILD_NUMBER=56 -+HS_MINOR_VER=55 -+HS_BUILD_NUMBER=03 + public void setDefaultHandler( InvocationHandler handler ) + { ++ checkAccess(); + defaultHandler = handler ; + } - JDK_MAJOR_VER=1 - JDK_MINOR_VER=7 ---- hotspot/make/linux/makefiles/arm.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/linux/makefiles/arm.make 2014-04-20 12:39:31.000000000 -0700 +@@ -78,4 +81,14 @@ + + return handler.invoke( proxy, method, args ) ; + } ++ ++ private static final DynamicAccessPermission perm = new DynamicAccessPermission("access"); ++ private void checkAccess() { ++ final SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++ sm.checkPermission(perm); ++} ++ } ++ ++ private static final long serialVersionUID = 4571178305984833743L; + } +--- ./corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java 2013-09-06 11:20:52.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ - # --# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. - # 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 @@ + /* +- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -58,6 +58,9 @@ + import com.sun.corba.se.impl.util.Utility ; + import com.sun.corba.se.impl.logging.ORBUtilSystemException ; - Obj_Files += linux_arm.o ++import sun.corba.EncapsInputStreamFactory; ++ ++ + public class ServiceContexts { + private static boolean isDebugging( OutputStream os ) + { +@@ -198,11 +201,11 @@ + // Note: As of Jan 2001, no standard OMG or Sun service contexts + // ship wchar data or are defined as using anything but GIOP 1.0 CDR. + EncapsInputStream eis +- = new EncapsInputStream(orb, +- data, +- data.length, +- giopVersion, +- codeBase); ++ = EncapsInputStreamFactory.newEncapsInputStream(orb, ++ data, ++ data.length, ++ giopVersion, ++ codeBase); + eis.consumeEndian(); --LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a -+ifneq ($(EXT_LIBS_PATH),) -+ LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a -+endif + // Now the input stream passed to a ServiceContext +--- ./corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp 2013-09-06 11:20:53.000000000 -0700 ++++ ./corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp 2014-01-18 12:16:06.000000000 -0800 +@@ -110,7 +110,7 @@ + ParseException.badCustom=%0 (\u884C%1): forward\u5024\u5BA3\u8A00\u306Fcustom\u3068\u3057\u3066\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093\u3002\n%2\n%3 + ParseException.badRepIDAlreadyAssigned=%0 (\u884C%1): \u578B%2\u306B\u306F\u3001\u524D\u306EID\u30D7\u30E9\u30B0\u30DE\u30FB\u30C7\u30A3\u30EC\u30AF\u30C6\u30A3\u30D6\u306E\u30EA\u30DD\u30B8\u30C8\u30EAID\u304C\u3059\u3067\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4 + ParseException.badRepIDForm=%0 (\u884C%1): \u30EA\u30DD\u30B8\u30C8\u30EAID '%2'\u306E\u5F62\u5F0F\u306F':'\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n%3\n%4 +-ParseException.badRepIDPrefix=%0 (\u884C%1): \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9%2\u306B\u306F\u3001'%4'\u3067\u306F\u306A\u304F\u30EA\u30DD\u30B8\u30C8\u30EAID\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9`%3'\u304C\u5FC5\u8981\u3067\u3059\u3002\n%5\n%6 ++ParseException.badRepIDPrefix=%0 (\u884C%1): \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9%2\u306B\u306F\u3001'%4'\u3067\u306F\u306A\u304F\u30EA\u30DD\u30B8\u30C8\u30EAID\u63A5\u982D\u8F9E`%3'\u304C\u5FC5\u8981\u3067\u3059\u3002\n%5\n%6 + ParseException.badState=%0 (\u884C%1): %2\u306F\u30B9\u30C6\u30FC\u30C8\u30D5\u30EB\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u8907\u6570\u306E\u30B9\u30C6\u30FC\u30C8\u30D5\u30EB\u89AA\u304C\u3042\u308A\u307E\u3059\u3002\n%3\n%4 + ParseException.branchLabel=%0 (\u884C%1): case %2\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4 + ParseException.branchName=%0 (\u884C%1): %2\u3068\u3044\u3046\u540D\u524D\u306E\u5206\u5C90\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002\n%3\n%4 +--- ./corba/src/share/classes/javax/rmi/CORBA/Stub.java 2013-09-06 11:20:53.000000000 -0700 ++++ ./corba/src/share/classes/javax/rmi/CORBA/Stub.java 2014-01-18 12:16:06.000000000 -0800 +@@ -61,13 +61,11 @@ + private transient StubDelegate stubDelegate = null; + private static Class stubDelegateClass = null; + private static final String StubClassKey = "javax.rmi.CORBA.StubClass"; +- private static final String defaultStubImplName = "com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl"; - CFLAGS += -DVM_LITTLE_ENDIAN ---- hotspot/make/solaris/makefiles/defs.make 2013-09-06 11:22:00.000000000 -0700 -+++ hotspot/make/solaris/makefiles/defs.make 2014-04-20 12:39:31.000000000 -0700 -@@ -221,8 +221,8 @@ - endif - ifeq ($(JVM_VARIANT_CLIENT),true) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) -- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX) -+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) -+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX) - ifeq ($(ARCH_DATA_MODEL),32) - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) ---- hotspot/make/windows/makefiles/compile.make 2013-09-06 11:22:01.000000000 -0700 -+++ hotspot/make/windows/makefiles/compile.make 2014-04-20 12:39:32.000000000 -0700 -@@ -172,6 +172,7 @@ - PRODUCT_OPT_OPTION = /O2 /Oy- - FASTDEBUG_OPT_OPTION = /O2 /Oy- - DEBUG_OPT_OPTION = /Od -+SAFESEH_FLAG = /SAFESEH - !endif + static { +- Object stubDelegateInstance = (Object) createDelegateIfSpecified(StubClassKey, defaultStubImplName); ++ Object stubDelegateInstance = createDelegate(StubClassKey); + if (stubDelegateInstance != null) + stubDelegateClass = stubDelegateInstance.getClass(); +- + } - !if "$(COMPILER_NAME)" == "VS2005" -@@ -190,6 +191,7 @@ - !if "x$(MT)" == "x" - MT=mt.exe - !endif -+SAFESEH_FLAG = /SAFESEH - !endif - !if "$(COMPILER_NAME)" == "VS2008" -@@ -203,6 +205,7 @@ - !if "x$(MT)" == "x" - MT=mt.exe - !endif -+SAFESEH_FLAG = /SAFESEH - !endif +@@ -207,7 +205,7 @@ + // are in different packages and the visibility needs to be package for + // security reasons. If you know a better solution how to share this code + // then remove it from PortableRemoteObject. Also in Util.java +- private static Object createDelegateIfSpecified(String classKey, String defaultClassName) { ++ private static Object createDelegate(String classKey) { + String className = (String) + AccessController.doPrivileged(new GetPropertyAction(classKey)); + if (className == null) { +@@ -218,7 +216,7 @@ + } - !if "$(COMPILER_NAME)" == "VS2010" -@@ -216,9 +219,11 @@ - !if "x$(MT)" == "x" - MT=mt.exe - !endif --!if "$(BUILDARCH)" == "i486" --LD_FLAGS = /SAFESEH $(LD_FLAGS) -+SAFESEH_FLAG = /SAFESEH - !endif -+ -+!if "$(BUILDARCH)" == "i486" -+LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS) - !endif + if (className == null) { +- className = defaultClassName; ++ return new com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl(); + } - # If NO_OPTIMIZATIONS is defined in the environment, turn everything off ---- hotspot/make/windows/makefiles/sa.make 2013-09-06 11:22:01.000000000 -0700 -+++ hotspot/make/windows/makefiles/sa.make 2014-04-20 12:39:32.000000000 -0700 -@@ -107,6 +107,9 @@ - !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" - SA_LFLAGS = $(SA_LFLAGS) -map -debug - !endif -+!if "$(BUILDARCH)" == "i486" -+SA_LFLAGS = $(SAFESEH_FLAG) $(SA_LFLAGS) -+!endif + try { +--- ./corba/src/share/classes/javax/rmi/CORBA/Util.java 2013-09-06 11:20:53.000000000 -0700 ++++ ./corba/src/share/classes/javax/rmi/CORBA/Util.java 2014-01-18 12:16:06.000000000 -0800 +@@ -60,14 +60,11 @@ + public class Util { - # Note that we do not keep sawindbj.obj around as it would then - # get included in the dumpbin command in build_vm_def.sh ---- hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2013-09-06 11:22:02.000000000 -0700 -+++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2014-04-20 12:39:31.000000000 -0700 -@@ -71,7 +71,11 @@ - define_pd_global(bool, RewriteBytecodes, true); - define_pd_global(bool, RewriteFrequentPairs, true); + // This can only be set at static initialization time (no sync necessary). +- private static javax.rmi.CORBA.UtilDelegate utilDelegate = null; ++ private static final javax.rmi.CORBA.UtilDelegate utilDelegate; + private static final String UtilClassKey = "javax.rmi.CORBA.UtilClass"; +- private static final String defaultUtilImplName = +-"com.sun.corba.se.impl.javax.rmi.CORBA.Util"; -+#ifdef _ALLBSD_SOURCE -+define_pd_global(bool, UseMembar, true); -+#else - define_pd_global(bool, UseMembar, false); -+#endif + static { +- utilDelegate = (javax.rmi.CORBA.UtilDelegate) +- createDelegateIfSpecified(UtilClassKey, defaultUtilImplName); ++ utilDelegate = (javax.rmi.CORBA.UtilDelegate)createDelegate(UtilClassKey); + } - // 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 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2014-04-20 12:39:29.000000000 -0700 -@@ -460,14 +460,14 @@ + private Util(){} +@@ -338,9 +335,7 @@ + // are in different packages and the visibility needs to be package for + // security reasons. If you know a better solution how to share this code + // then remove it from PortableRemoteObject. Also in Stub.java +- private static Object createDelegateIfSpecified(String classKey, +- String defaultClassName) +- { ++ private static Object createDelegate(String classKey) { + String className = (String) + AccessController.doPrivileged(new GetPropertyAction(classKey)); + if (className == null) { +@@ -351,7 +346,7 @@ + } - void AttachListener::vm_start() { - char fn[UNIX_PATH_MAX]; -- struct stat64 st; -+ struct stat st; - int ret; + if (className == null) { +- className = defaultClassName; ++ return new com.sun.corba.se.impl.javax.rmi.CORBA.Util(); + } - int n = snprintf(fn, UNIX_PATH_MAX, "%s/.java_pid%d", - os::get_temp_directory(), os::current_process_id()); - assert(n < (int)UNIX_PATH_MAX, "java_pid file name buffer overflow"); + try { +--- ./corba/src/share/classes/javax/rmi/PortableRemoteObject.java 2013-09-06 11:20:53.000000000 -0700 ++++ ./corba/src/share/classes/javax/rmi/PortableRemoteObject.java 2014-01-18 12:16:06.000000000 -0800 +@@ -65,17 +65,14 @@ + */ + public class PortableRemoteObject { -- RESTARTABLE(::stat64(fn, &st), ret); -+ RESTARTABLE(::stat(fn, &st), ret); - if (ret == 0) { - ret = ::unlink(fn); - if (ret == -1) { ---- hotspot/src/os/bsd/vm/decoder_bsd.cpp 1969-12-31 16:00:00.000000000 -0800 -+++ hotspot/src/os/bsd/vm/decoder_bsd.cpp 2014-04-20 12:39:29.000000000 -0700 -@@ -0,0 +1,46 @@ -+/* -+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * 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. -+ * -+ */ -+ -+#include "prims/jvm.h" -+#include "utilities/decoder_elf.hpp" -+ -+#include -+ -+bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) { -+ int status; -+ char* result; -+ size_t size = (size_t)buflen; -+ -+ // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small, -+ // __cxa_demangle will call system "realloc" for additional memory, which -+ // may use different malloc/realloc mechanism that allocates 'buf'. -+ if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) { -+ jio_snprintf(buf, buflen, "%s", result); -+ // call c library's free -+ ::free(result); -+ return true; -+ } -+ return false; -+} -+ ---- hotspot/src/os/bsd/vm/os_bsd.cpp 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/bsd/vm/os_bsd.cpp 2014-04-28 17:39:01.000000000 -0700 -@@ -187,6 +187,8 @@ - static int SR_signum = SIGUSR2; - sigset_t SR_sigset; +- private static javax.rmi.CORBA.PortableRemoteObjectDelegate proDelegate = null; ++ private static final javax.rmi.CORBA.PortableRemoteObjectDelegate proDelegate; -+// Declarations -+static void unpackTime(timespec* absTime, bool isAbsolute, jlong time); + private static final String PortableRemoteObjectClassKey = + "javax.rmi.CORBA.PortableRemoteObjectClass"; - //////////////////////////////////////////////////////////////////////////////// - // utility functions -@@ -355,7 +357,13 @@ - * since it returns a 64 bit value) - */ - mib[0] = CTL_HW; -+#ifdef HW_MEMSIZE - mib[1] = HW_MEMSIZE; -+#elif defined (HW_USERMEM64) -+ mib[1] = HW_USERMEM64; -+#else -+ mib[1] = HW_USERMEM; -+#endif - len = sizeof(mem_val); - if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) { - assert(len == sizeof(mem_val), "unexpected data size"); -@@ -971,13 +979,14 @@ - #endif +- private static final String defaultPortableRemoteObjectImplName = +- "com.sun.corba.se.impl.javax.rmi.PortableRemoteObject"; +- + static { + proDelegate = (javax.rmi.CORBA.PortableRemoteObjectDelegate) +- createDelegateIfSpecified(PortableRemoteObjectClassKey); ++ createDelegate(PortableRemoteObjectClassKey); + } - #ifdef __APPLE__ --static uint64_t locate_unique_thread_id() { -+static uint64_t locate_unique_thread_id(mach_port_t mach_thread_port) { - // Additional thread_id used to correlate threads in SA - thread_identifier_info_data_t m_ident_info; - mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT; + /** +@@ -181,7 +178,7 @@ + // are in different packages and the visibility needs to be package for + // security reasons. If you know a better solution how to share this code + // then remove it from here. +- private static Object createDelegateIfSpecified(String classKey) { ++ private static Object createDelegate(String classKey) { + String className = (String) + AccessController.doPrivileged(new GetPropertyAction(classKey)); + if (className == null) { +@@ -191,7 +188,7 @@ + } + } + if (className == null) { +- className = defaultPortableRemoteObjectImplName; ++ return new com.sun.corba.se.impl.javax.rmi.PortableRemoteObject(); + } -- thread_info(::mach_thread_self(), THREAD_IDENTIFIER_INFO, -+ thread_info(mach_thread_port, THREAD_IDENTIFIER_INFO, - (thread_info_t) &m_ident_info, &count); + try { +--- ./corba/src/share/classes/org/omg/CORBA/ORB.java 2013-09-06 11:20:54.000000000 -0700 ++++ ./corba/src/share/classes/org/omg/CORBA/ORB.java 2014-04-19 01:27:00.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,8 @@ + import java.security.AccessController; + import java.security.PrivilegedAction; + ++import sun.reflect.misc.ReflectUtil; + - return m_ident_info.thread_id; - } - #endif -@@ -1009,9 +1018,14 @@ + /** + * A class providing APIs for the CORBA Object Request Broker + * features. The ORB class also provides +@@ -174,15 +176,6 @@ + private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass"; - #ifdef _ALLBSD_SOURCE - #ifdef __APPLE__ -- // thread_id is mach thread on macos -- osthread->set_thread_id(::mach_thread_self()); -- osthread->set_unique_thread_id(locate_unique_thread_id()); -+ // thread_id is mach thread on macos, which pthreads graciously caches and provides for us -+ mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self()); -+ guarantee(thread_id != 0, "thread id missing from pthreads"); -+ osthread->set_thread_id(thread_id); -+ -+ uint64_t unique_thread_id = locate_unique_thread_id(thread_id); -+ guarantee(unique_thread_id != 0, "unique thread id was not found"); -+ osthread->set_unique_thread_id(unique_thread_id); - #else - // thread_id is pthread_id on BSD - osthread->set_thread_id(::pthread_self()); -@@ -1207,8 +1221,14 @@ - // Store pthread info into the OSThread - #ifdef _ALLBSD_SOURCE - #ifdef __APPLE__ -- osthread->set_thread_id(::mach_thread_self()); -- osthread->set_unique_thread_id(locate_unique_thread_id()); -+ // thread_id is mach thread on macos, which pthreads graciously caches and provides for us -+ mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self()); -+ guarantee(thread_id != 0, "just checking"); -+ osthread->set_thread_id(thread_id); -+ -+ uint64_t unique_thread_id = locate_unique_thread_id(thread_id); -+ guarantee(unique_thread_id != 0, "just checking"); -+ osthread->set_unique_thread_id(unique_thread_id); - #else - osthread->set_thread_id(::pthread_self()); - #endif -@@ -1830,7 +1850,7 @@ - - intx os::current_thread_id() { - #ifdef __APPLE__ -- return (intx)::mach_thread_self(); -+ return (intx)::pthread_mach_thread_np(::pthread_self()); - #else - return (intx)::pthread_self(); - #endif -@@ -2381,14 +2401,14 @@ - } - - void os::print_os_info_brief(outputStream* st) { -- st->print("Bsd"); -+ st->print("BSD"); - - os::Posix::print_uname_info(st); - } - - void os::print_os_info(outputStream* st) { - st->print("OS:"); -- st->print("Bsd"); -+ st->print("BSD"); - - os::Posix::print_uname_info(st); - -@@ -2397,10 +2417,6 @@ - os::Posix::print_load_average(st); - } - --void os::pd_print_cpu_info(outputStream* st) { -- // Nothing to do for now. --} + // +- // The last resort fallback ORB implementation classes in case +- // no ORB implementation class is dynamically configured through +- // properties or applet parameters. Change these values to +- // vendor-specific class names. +- // +- private static final String defaultORB = "com.sun.corba.se.impl.orb.ORBImpl"; +- private static final String defaultORBSingleton = "com.sun.corba.se.impl.orb.ORBSingleton"; - - void os::print_memory_info(outputStream* st) { - - st->print("Memory:"); -@@ -2417,6 +2433,7 @@ - st->print("(" UINT64_FORMAT "k free)", - os::available_memory() >> 10); - #ifndef _ALLBSD_SOURCE -+ // FIXME: Make this work for *BSD - st->print(", swap " UINT64_FORMAT "k", - ((jlong)si.totalswap * si.mem_unit) >> 10); - st->print("(" UINT64_FORMAT "k free)", -@@ -2424,12 +2441,22 @@ - #endif - st->cr(); +- // + // The global instance of the singleton ORB implementation which + // acts as a factory for typecodes for generated Helper classes. + // TypeCodes should be immutable since they may be shared across +@@ -294,22 +287,42 @@ + String className = getSystemProperty(ORBSingletonClassKey); + if (className == null) + className = getPropertyFromFile(ORBSingletonClassKey); +- if (className == null) +- className = defaultORBSingleton; +- +- singleton = create_impl(className); ++ if ((className == null) || ++ (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) { ++ singleton = new com.sun.corba.se.impl.orb.ORBSingleton(); ++ } else { ++ singleton = create_impl_with_systemclassloader(className); ++ } + } + return singleton; + } -+ // FIXME: Make this work for *BSD - // meminfo - st->print("\n/proc/meminfo:\n"); - _print_ascii_file("/proc/meminfo", st); - st->cr(); - } +- private static ORB create_impl(String className) { ++ private static ORB create_impl_with_systemclassloader(String className) { -+void os::pd_print_cpu_info(outputStream* st) { -+ // FIXME: Make this work for *BSD -+ st->print("\n/proc/cpuinfo:\n"); -+ if (!_print_ascii_file("/proc/cpuinfo", st)) { -+ st->print(" "); -+ } -+ st->cr(); -+} ++ try { ++ ReflectUtil.checkPackageAccess(className); ++ ClassLoader cl = ClassLoader.getSystemClassLoader(); ++ Class orbBaseClass = org.omg.CORBA.ORB.class; ++ Class singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); ++ return (ORB)singletonOrbClass.newInstance(); ++ } catch (Throwable ex) { ++ SystemException systemException = new INITIALIZE( ++ "can't instantiate default ORB implementation " + className); ++ systemException.initCause(ex); ++ throw systemException; ++ } ++ } + - // Taken from /usr/include/bits/siginfo.h Supposed to be architecture specific - // but they're the same for all the bsd arch that we support - // and they're the same for solaris but there's no common place to put this. -@@ -2575,6 +2602,25 @@ - len = strlen(buf); - jrelib_p = buf + len; ++ private static ORB create_impl(String className) { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + if (cl == null) + cl = ClassLoader.getSystemClassLoader(); -+#ifndef __APPLE__ -+ snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); -+ if (0 != access(buf, F_OK)) { -+ snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch); + try { +- return (ORB) Class.forName(className, true, cl).newInstance(); ++ ReflectUtil.checkPackageAccess(className); ++ Class orbBaseClass = org.omg.CORBA.ORB.class; ++ Class orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); ++ return (ORB)orbClass.newInstance(); + } catch (Throwable ex) { + SystemException systemException = new INITIALIZE( + "can't instantiate default ORB implementation " + className); +@@ -347,10 +360,12 @@ + className = getSystemProperty(ORBClassKey); + if (className == null) + className = getPropertyFromFile(ORBClassKey); +- if (className == null) +- className = defaultORB; +- +- orb = create_impl(className); ++ if ((className == null) || ++ (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { ++ orb = new com.sun.corba.se.impl.orb.ORBImpl(); ++ } else { ++ orb = create_impl(className); + } -+ -+ if (0 == access(buf, F_OK)) { -+ // Use current module name "libjvm[_g].so" instead of -+ // "libjvm"debug_only("_g")".so" since for fastdebug version -+ // we should have "libjvm.so" but debug_only("_g") adds "_g"! -+ len = strlen(buf); -+ snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p); + orb.set_parameters(args, props); + return orb; + } +@@ -375,10 +390,12 @@ + className = getSystemProperty(ORBClassKey); + if (className == null) + className = getPropertyFromFile(ORBClassKey); +- if (className == null) +- className = defaultORB; +- +- orb = create_impl(className); ++ if ((className == null) || ++ (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { ++ orb = new com.sun.corba.se.impl.orb.ORBImpl(); + } else { -+ // Go back to path of .so -+ rp = realpath(dli_fname, buf); -+ if (rp == NULL) -+ return; ++ orb = create_impl(className); + } -+#else - // Add the appropriate library subdir - snprintf(jrelib_p, buflen-len, "/jre/lib"); - if (0 != access(buf, F_OK)) { -@@ -2604,6 +2650,7 @@ - if (rp == NULL) - return; - } -+#endif - } + orb.set_parameters(app, props); + return orb; } - } -@@ -2707,10 +2754,14 @@ - bool timedwait(unsigned int sec, int nsec); - private: - jlong currenttime() const; -- semaphore_t _semaphore; -+ os_semaphore_t _semaphore; - }; - -+#if defined(__FreeBSD__) && __FreeBSD__ > 8 -+Semaphore::Semaphore() : _semaphore() { -+#else - Semaphore::Semaphore() : _semaphore(0) { -+#endif - SEM_INIT(_semaphore, 0); - } - -@@ -2775,7 +2826,7 @@ - - bool Semaphore::timedwait(unsigned int sec, int nsec) { - struct timespec ts; -- jlong endtime = unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec); -+ unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec); - - while (1) { - int result = sem_timedwait(&_semaphore, &ts); -@@ -2996,7 +3047,11 @@ - } - - void os::pd_free_memory(char *addr, size_t bytes, size_t alignment_hint) { -+#if !defined(__APPLE__) && !defined(__FreeBSD__) -+ commit_memory(addr, bytes, alignment_hint, false); -+#else - ::madvise(addr, bytes, MADV_DONTNEED); -+#endif - } - - void os::numa_make_global(char *addr, size_t bytes) { -@@ -3829,6 +3884,7 @@ - return OS_OK; - #elif defined(__FreeBSD__) - int ret = pthread_setprio(thread->osthread()->pthread_id(), newpri); -+ return (ret == 0) ? OS_OK : OS_ERR; - #elif defined(__APPLE__) || defined(__NetBSD__) - struct sched_param sp; - int policy; ---- hotspot/src/os/bsd/vm/os_bsd.hpp 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/bsd/vm/os_bsd.hpp 2014-04-20 12:39:29.000000000 -0700 -@@ -103,6 +103,12 @@ - - static bool hugetlbfs_sanity_check(bool warn, size_t page_size); - -+ static void print_full_memory_info(outputStream* st); -+#ifndef _ALLBSD_SOURCE -+ static void print_distro_info(outputStream* st); -+ static void print_libversion_info(outputStream* st); -+#endif -+ - public: - - static void init_thread_fpu_state(); ---- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2014-04-20 12:39:29.000000000 -0700 -@@ -31,10 +31,22 @@ - # include "atomic_bsd_x86.inline.hpp" - # include "orderAccess_bsd_x86.inline.hpp" - #endif -+#ifdef TARGET_OS_ARCH_bsd_sparc -+# include "atomic_bsd_sparc.inline.hpp" -+# include "orderAccess_bsd_sparc.inline.hpp" -+#endif - #ifdef TARGET_OS_ARCH_bsd_zero - # include "atomic_bsd_zero.inline.hpp" - # include "orderAccess_bsd_zero.inline.hpp" - #endif -+#ifdef TARGET_OS_ARCH_bsd_arm -+# include "atomic_bsd_arm.inline.hpp" -+# include "orderAccess_bsd_arm.inline.hpp" -+#endif -+#ifdef TARGET_OS_ARCH_bsd_ppc -+# include "atomic_bsd_ppc.inline.hpp" -+# include "orderAccess_bsd_ppc.inline.hpp" -+#endif - - // System includes - ---- hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2014-04-20 12:39:29.000000000 -0700 -@@ -34,11 +34,26 @@ - # include "orderAccess_bsd_x86.inline.hpp" - # include "prefetch_bsd_x86.inline.hpp" - #endif -+#ifdef TARGET_OS_ARCH_bsd_sparc -+# include "atomic_bsd_sparc.inline.hpp" -+# include "orderAccess_bsd_sparc.inline.hpp" -+# include "prefetch_bsd_sparc.inline.hpp" -+#endif - #ifdef TARGET_OS_ARCH_bsd_zero - # include "atomic_bsd_zero.inline.hpp" - # include "orderAccess_bsd_zero.inline.hpp" - # include "prefetch_bsd_zero.inline.hpp" - #endif -+#ifdef TARGET_OS_ARCH_bsd_arm -+# include "atomic_bsd_arm.inline.hpp" -+# include "orderAccess_bsd_arm.inline.hpp" -+# include "prefetch_bsd_arm.inline.hpp" -+#endif -+#ifdef TARGET_OS_ARCH_bsd_ppc -+# include "atomic_bsd_ppc.inline.hpp" -+# include "orderAccess_bsd_ppc.inline.hpp" -+# include "prefetch_bsd_ppc.inline.hpp" -+#endif - - // Contains inlined functions for class Thread and ThreadLocalStorage - ---- hotspot/src/os/linux/vm/os_linux.cpp 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/linux/vm/os_linux.cpp 2014-04-20 12:39:29.000000000 -0700 -@@ -2696,6 +2696,14 @@ - alignment_hint, exec, strerror(err), err); - } - -+static void warn_fail_commit_memory(char* addr, size_t size, -+ size_t alignment_hint, bool exec, -+ int err, const char* msg) { -+ warning("INFO: os::commit_memory(" PTR_FORMAT ", " SIZE_FORMAT -+ ", " SIZE_FORMAT ", %d) failed; error='%s' (errno=%d); %s", addr, size, -+ alignment_hint, exec, strerror(err), err, msg); -+} -+ - // NOTE: Linux kernel does not really reserve the pages for us. - // All it does is to check if there are enough free pages - // left at the time of mmap(). This could be a potential -@@ -2746,6 +2754,8 @@ - #define MADV_HUGEPAGE 14 - #endif - -+volatile jint os::Linux::num_largepage_commit_fails = 0; -+ - int os::Linux::commit_memory_impl(char* addr, size_t size, - size_t alignment_hint, bool exec) { - int err; -@@ -2770,7 +2780,9 @@ - // from the loss. For now, we just issue a warning and we don't - // call vm_exit_out_of_memory(). This issue is being tracked by - // JBS-8007074. -- warn_fail_commit_memory(addr, size, alignment_hint, exec, err); -+ Atomic::inc(&os::Linux::num_largepage_commit_fails); -+ warn_fail_commit_memory(addr, size, alignment_hint, exec, err, -+ "Cannot allocate large pages, falling back to regular pages"); - // vm_exit_out_of_memory(size, "committing reserved memory."); - } - // Fall through and try to use small pages ---- hotspot/src/os/linux/vm/os_linux.hpp 2013-09-06 11:22:03.000000000 -0700 -+++ hotspot/src/os/linux/vm/os_linux.hpp 2014-04-20 12:39:29.000000000 -0700 -@@ -100,6 +100,7 @@ +@@ -574,7 +591,7 @@ + try { + // First try to load the OperationDef class + String opDefClassName = "org.omg.CORBA.OperationDef"; +- Class opDefClass = null; ++ Class opDefClass = null; - public: - static bool _stack_is_executable; -+ static volatile jint num_largepage_commit_fails; - static void *dlopen_helper(const char *name, char *ebuf, int ebuflen); - static void *dll_load_in_vmthread(const char *name, char *ebuf, int ebuflen); - ---- hotspot/src/os/posix/vm/os_posix.cpp 2013-09-06 11:22:04.000000000 -0700 -+++ hotspot/src/os/posix/vm/os_posix.cpp 2014-04-20 12:39:29.000000000 -0700 -@@ -173,11 +173,19 @@ - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); - else st->print("%d", rlim.rlim_cur); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + if ( cl == null ) +@@ -584,7 +601,7 @@ -+#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 - } + // OK, we loaded OperationDef. Now try to get the + // create_operation_list(OperationDef oper) method. +- Class[] argc = { opDefClass }; ++ Class[] argc = { opDefClass }; + java.lang.reflect.Method meth = + this.getClass().getMethod("create_operation_list", argc); - void os::Posix::print_uname_info(outputStream* st) { ---- hotspot/src/os/windows/vm/os_windows.cpp 2013-09-06 11:22:04.000000000 -0700 -+++ hotspot/src/os/windows/vm/os_windows.cpp 2014-04-20 12:39:29.000000000 -0700 +--- ./corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java 2013-09-06 11:20:55.000000000 -0700 ++++ ./corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java 2014-01-18 12:16:06.000000000 -0800 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -1591,6 +1591,7 @@ - - void os::win32::print_windows_version(outputStream* st) { - OSVERSIONINFOEX osvi; -+ SYSTEM_INFO si; - ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); +@@ -31,6 +31,10 @@ -@@ -1600,6 +1601,18 @@ - } + package org.omg.CORBA_2_3.portable; - int os_vers = osvi.dwMajorVersion * 1000 + osvi.dwMinorVersion; ++import java.io.SerializablePermission; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + -+ ZeroMemory(&si, sizeof(SYSTEM_INFO)); -+ if (os_vers >= 5002) { -+ // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could -+ // find out whether we are running on 64 bit processor or not. -+ if (os::Kernel32Dll::GetNativeSystemInfoAvailable()) { -+ os::Kernel32Dll::GetNativeSystemInfo(&si); -+ } else { -+ GetSystemInfo(&si); -+ } -+ } + /** + * InputStream provides for the reading of all of the mapped IDL types + * from the stream. It extends org.omg.CORBA.portable.InputStream. This +@@ -43,6 +47,43 @@ + + public abstract class InputStream extends org.omg.CORBA.portable.InputStream { + + - if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) { - switch (os_vers) { - case 3051: st->print(" Windows NT 3.51"); break; -@@ -1607,57 +1620,48 @@ - case 5000: st->print(" Windows 2000"); break; - case 5001: st->print(" Windows XP"); break; - case 5002: -+ if (osvi.wProductType == VER_NT_WORKSTATION && -+ si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { -+ st->print(" Windows XP x64 Edition"); -+ } else { -+ st->print(" Windows Server 2003 family"); -+ } -+ break; ++ private static final String ALLOW_SUBCLASS_PROP = "jdk.corba.allowInputStreamSubclass"; + - case 6000: -+ if (osvi.wProductType == VER_NT_WORKSTATION) { -+ st->print(" Windows Vista"); -+ } else { -+ st->print(" Windows Server 2008"); -+ } -+ break; ++ private static final boolean allowSubclass = AccessController.doPrivileged( ++ new PrivilegedAction() { ++ @Override ++ public Boolean run() { ++ String prop = System.getProperty(ALLOW_SUBCLASS_PROP); ++ return prop == null ? false : ++ (prop.equalsIgnoreCase("false") ? false : true); ++ } ++ }); + - case 6001: -- case 6002: { -- // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could -- // find out whether we are running on 64 bit processor or not. -- SYSTEM_INFO si; -- ZeroMemory(&si, sizeof(SYSTEM_INFO)); -- if (!os::Kernel32Dll::GetNativeSystemInfoAvailable()){ -- GetSystemInfo(&si); -+ if (osvi.wProductType == VER_NT_WORKSTATION) { -+ st->print(" Windows 7"); - } else { -- os::Kernel32Dll::GetNativeSystemInfo(&si); -+ st->print(" Windows Server 2008 R2"); - } -- if (os_vers == 5002) { -- if (osvi.wProductType == VER_NT_WORKSTATION && -- si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) -- st->print(" Windows XP x64 Edition"); -- else -- st->print(" Windows Server 2003 family"); -- } else if (os_vers == 6000) { -- if (osvi.wProductType == VER_NT_WORKSTATION) -- st->print(" Windows Vista"); -- else -- st->print(" Windows Server 2008"); -- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) -- st->print(" , 64 bit"); -- } else if (os_vers == 6001) { -- if (osvi.wProductType == VER_NT_WORKSTATION) { -- st->print(" Windows 7"); -- } else { -- // Unrecognized windows, print out its major and minor versions -- st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); -- } -- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) -- st->print(" , 64 bit"); -- } else if (os_vers == 6002) { -- if (osvi.wProductType == VER_NT_WORKSTATION) { -- st->print(" Windows 8"); -- } else { -- st->print(" Windows Server 2012"); -- } -- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) -- st->print(" , 64 bit"); -- } else { // future os -- // Unrecognized windows, print out its major and minor versions -- st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); -- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) -- st->print(" , 64 bit"); -+ break; ++ private static Void checkPermission() { ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++ if (!allowSubclass) ++ sm.checkPermission(new ++ SerializablePermission("enableSubclassImplementation")); ++ } ++ return null; ++ } + -+ case 6002: -+ if (osvi.wProductType == VER_NT_WORKSTATION) { -+ st->print(" Windows 8"); -+ } else { -+ st->print(" Windows Server 2012"); - } - break; -- } -- default: // future windows, print out its major and minor versions ++ private InputStream(Void ignore) { } + -+ case 6003: -+ if (osvi.wProductType == VER_NT_WORKSTATION) { -+ st->print(" Windows 8.1"); -+ } else { -+ st->print(" Windows Server 2012 R2"); -+ } -+ break; ++ /** ++ * Create a new instance of this class. ++ * ++ * throw SecurityException if SecurityManager is installed and ++ * enableSubclassImplementation SerializablePermission ++ * is not granted or jdk.corba.allowOutputStreamSubclass system ++ * property is either not set or is set to 'false' ++ */ ++ public InputStream() { ++ this(checkPermission()); ++ } + -+ default: // future os -+ // Unrecognized windows, print out its major and minor versions - st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); - } - } else { -@@ -1669,6 +1673,11 @@ - st->print(" Windows %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); - } - } + /** + * Unmarshalls a value type from the input stream. + * @return the value type unmarshalled from the input stream +--- ./corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java 2014-01-18 12:16:06.000000000 -0800 +@@ -0,0 +1,153 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.corba; + -+ if (os_vers >= 6000 && si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { -+ st->print(" , 64 bit"); -+ } ++import java.nio.ByteBuffer; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + - st->print(" Build %d", osvi.dwBuildNumber); - st->print(" %s", osvi.szCSDVersion); // service pack - st->cr(); ---- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2013-09-06 11:22:04.000000000 -0700 -+++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2014-04-28 17:39:01.000000000 -0700 -@@ -945,7 +945,7 @@ - if (rslt != 0) - fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt)); - -- *bottom = (address)((char *)ss.ss_sp - ss.ss_size); -+ *bottom = (address)(align_size_up((intptr_t)ss.ss_sp, os::vm_page_size()) - ss.ss_size); - *size = ss.ss_size; - #elif defined(_ALLBSD_SOURCE) - pthread_attr_t attr; ---- hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2013-09-06 11:22:04.000000000 -0700 -+++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2014-04-20 12:39:31.000000000 -0700 -@@ -24,7 +24,7 @@ - */ - - #if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__) --#include -+# include - # include /* For pthread_attr_get_np */ - #endif - ---- hotspot/src/share/vm/classfile/classFileParser.cpp 2013-09-06 11:22:10.000000000 -0700 -+++ hotspot/src/share/vm/classfile/classFileParser.cpp 2014-04-20 12:39:30.000000000 -0700 ++ ++import com.sun.corba.se.impl.encoding.EncapsInputStream; ++import com.sun.corba.se.impl.encoding.TypeCodeInputStream; ++import com.sun.corba.se.impl.protocol.giopmsgheaders.Message; ++import com.sun.corba.se.pept.protocol.MessageMediator; ++import com.sun.corba.se.spi.ior.iiop.GIOPVersion; ++import com.sun.corba.se.spi.orb.ORB; ++import com.sun.org.omg.SendingContext.CodeBase; ++ ++public class EncapsInputStreamFactory { ++ ++ public static EncapsInputStream newEncapsInputStream( ++ final org.omg.CORBA.ORB orb, final byte[] buf, final int size, ++ final boolean littleEndian, final GIOPVersion version) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public EncapsInputStream run() { ++ return new EncapsInputStream(orb, buf, size, ++ littleEndian, version); ++ } ++ }); ++ } ++ ++ public static EncapsInputStream newEncapsInputStream( ++ final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer, ++ final int size, final boolean littleEndian, ++ final GIOPVersion version) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public EncapsInputStream run() { ++ return new EncapsInputStream(orb, byteBuffer, size, ++ littleEndian, version); ++ } ++ }); ++ } ++ ++ public static EncapsInputStream newEncapsInputStream( ++ final org.omg.CORBA.ORB orb, final byte[] data, final int size) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public EncapsInputStream run() { ++ return new EncapsInputStream(orb, data, size); ++ } ++ }); ++ } ++ ++ public static EncapsInputStream newEncapsInputStream( ++ final EncapsInputStream eis) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public EncapsInputStream run() { ++ return new EncapsInputStream(eis); ++ } ++ }); ++ } ++ ++ public static EncapsInputStream newEncapsInputStream( ++ final org.omg.CORBA.ORB orb, final byte[] data, final int size, ++ final GIOPVersion version) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public EncapsInputStream run() { ++ return new EncapsInputStream(orb, data, size, version); ++ } ++ }); ++ } ++ ++ public static EncapsInputStream newEncapsInputStream( ++ final org.omg.CORBA.ORB orb, final byte[] data, final int size, ++ final GIOPVersion version, final CodeBase codeBase) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public EncapsInputStream run() { ++ return new EncapsInputStream(orb, data, size, version, ++ codeBase); ++ } ++ }); ++ } ++ ++ public static TypeCodeInputStream newTypeCodeInputStream( ++ final org.omg.CORBA.ORB orb, final byte[] buf, final int size, ++ final boolean littleEndian, final GIOPVersion version) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public TypeCodeInputStream run() { ++ return new TypeCodeInputStream(orb, buf, size, ++ littleEndian, version); ++ } ++ }); ++ } ++ ++ public static TypeCodeInputStream newTypeCodeInputStream( ++ final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer, ++ final int size, final boolean littleEndian, ++ final GIOPVersion version) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public TypeCodeInputStream run() { ++ return new TypeCodeInputStream(orb, byteBuffer, size, ++ littleEndian, version); ++ } ++ }); ++ } ++ ++ public static TypeCodeInputStream newTypeCodeInputStream( ++ final org.omg.CORBA.ORB orb, final byte[] data, final int size) { ++ return AccessController ++ .doPrivileged(new PrivilegedAction() { ++ @Override ++ public TypeCodeInputStream run() { ++ return new TypeCodeInputStream(orb, data, size); ++ } ++ }); ++ } ++} +--- ./corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2013-09-06 11:20:56.000000000 -0700 ++++ ./corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java 2013-12-01 11:13:38.000000000 -0800 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -2028,8 +2028,8 @@ - } - if (lvt_cnt == max_lvt_cnt) { - max_lvt_cnt <<= 1; -- REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); -- REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); -+ localvariable_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); -+ localvariable_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); - } - localvariable_table_start[lvt_cnt] = - parse_localvariable_table(code_length, -@@ -2058,8 +2058,8 @@ - // Parse local variable type table - if (lvtt_cnt == max_lvtt_cnt) { - max_lvtt_cnt <<= 1; -- REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); -- REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); -+ localvariable_type_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); -+ localvariable_type_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); - } - localvariable_type_table_start[lvtt_cnt] = - parse_localvariable_table(code_length, -@@ -2661,6 +2661,11 @@ - "Short length on BootstrapMethods in class file %s", - CHECK); - -+ guarantee_property(attribute_byte_length > sizeof(u2), -+ "Invalid BootstrapMethods attribute length %u in class file %s", -+ attribute_byte_length, -+ CHECK); -+ - // The attribute contains a counted array of counted tuples of shorts, - // represending bootstrap specifiers: - // length*{bootstrap_method_index, argument_count*{argument_index}} -@@ -4051,9 +4056,8 @@ - for (int index = 0; index < num_methods; index++) { - methodOop m = (methodOop)methods->obj_at(index); +@@ -34,6 +34,9 @@ -- // skip private, static and methods -- if ((!m->is_private()) && -- (!m->is_static()) && -+ // skip static and methods -+ if ((!m->is_static()) && - (m->name() != vmSymbols::object_initializer_name())) { + import java.io.File; + import java.io.IOException; ++import java.io.SerializablePermission; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + import java.util.Vector; + import java.util.Hashtable; + import java.util.Enumeration; +@@ -49,6 +52,7 @@ + import com.sun.corba.se.impl.util.PackagePrefixChecker; + import sun.rmi.rmic.Main; - Symbol* name = m->name(); ---- hotspot/src/share/vm/code/relocInfo.hpp 2013-09-06 11:22:10.000000000 -0700 -+++ hotspot/src/share/vm/code/relocInfo.hpp 2014-04-28 17:39:01.000000000 -0700 -@@ -371,7 +371,7 @@ - // "immediate" in the prefix header word itself. This optimization - // is invisible outside this module.) ++ + /** + * An IIOP stub/tie generator for rmic. + * +@@ -78,6 +82,7 @@ + protected boolean castArray = false; + protected Hashtable transactionalObjects = new Hashtable() ; + protected boolean POATie = false ; ++ protected boolean emitPermissionCheck = false; -- inline friend relocInfo prefix_relocInfo(int datalen = 0); -+ inline friend relocInfo prefix_relocInfo(int datalen); + /** + * Default constructor for Main to use. +@@ -193,6 +198,9 @@ + } else if (argv[i].equals("-standardPackage")) { + standardPackage = true; + argv[i] = null; ++ } else if (argv[i].equals("-emitPermissionCheck")) { ++ emitPermissionCheck = true; ++ argv[i] = null; + } else if (arg.equals("-xstubbase")) { + argv[i] = null; + if (++i < argv.length && argv[i] != null && !argv[i].startsWith("-")) { +@@ -390,9 +398,22 @@ - protected: - // an immediate relocInfo optimizes a prefix with one 10-bit unsigned value -@@ -466,7 +466,7 @@ - return relocInfo(relocInfo::none, relocInfo::offset_limit() - relocInfo::offset_unit); - } + writePackageAndImports(p); --inline relocInfo prefix_relocInfo(int datalen) { -+inline relocInfo prefix_relocInfo(int datalen = 0) { - assert(relocInfo::fits_into_immediate(datalen), "datalen in limits"); - return relocInfo(relocInfo::data_prefix_tag, relocInfo::RAW_BITS, relocInfo::datalen_tag | datalen); - } ---- hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2013-09-06 11:22:12.000000000 -0700 -+++ hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -109,7 +109,7 @@ - if (e.should_commit()) { - e.set_gcId(_shared_gc_info.id()); - e.set_data(to_trace_struct(pf_info)); -- e.set_thread(pf_info.thread()->thread_id()); -+ e.set_thread((uint64_t) pf_info.thread()->thread_id()); - e.commit(); - } - } ---- hotspot/src/share/vm/oops/objArrayKlass.cpp 2013-09-06 11:22:13.000000000 -0700 -+++ hotspot/src/share/vm/oops/objArrayKlass.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -149,7 +149,7 @@ - if (element_is_null || - Klass::cast((new_val->klass()))->is_subtype_of(bound)) { - bs->write_ref_field_pre(p, new_val); -- *p = *from; -+ *p = element; - } else { - // We must do a barrier to cover the partial copy. - const size_t pd = pointer_delta(p, dst, (size_t)heapOopSize); ---- hotspot/src/share/vm/opto/matcher.cpp 2013-09-06 11:22:14.000000000 -0700 -+++ hotspot/src/share/vm/opto/matcher.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -464,17 +464,17 @@ - C->FIRST_STACK_mask().Clear(); ++// generate ++// import java.security.AccessController; ++// import java.security.PrivilegedAction; ++// import java.io.SerializablePermission; ++ if (emitPermissionCheck) { ++ p.pln("import java.security.AccessController;"); ++ p.pln("import java.security.PrivilegedAction;"); ++ p.pln("import java.io.SerializablePermission;"); ++ p.pln(); ++ p.pln(); ++ } ++ + // Declare the stub class; implement all remote interfaces. - // Add in the incoming argument area -- OptoReg::Name init = OptoReg::add(_old_SP, C->out_preserve_stack_slots()); -- for (i = init; i < _in_arg_limit; i = OptoReg::add(i,1)) -+ OptoReg::Name init_in = OptoReg::add(_old_SP, C->out_preserve_stack_slots()); -+ for (i = init_in; i < _in_arg_limit; i = OptoReg::add(i,1)) { - C->FIRST_STACK_mask().Insert(i); -- -+ } - // Add in all bits past the outgoing argument area - guarantee(RegMask::can_represent_arg(OptoReg::add(_out_arg_limit,-1)), - "must be able to represent all call arguments in reg mask"); -- init = _out_arg_limit; -- for (i = init; RegMask::can_represent(i); i = OptoReg::add(i,1)) -+ OptoReg::Name init = _out_arg_limit; -+ for (i = init; RegMask::can_represent(i); i = OptoReg::add(i,1)) { - C->FIRST_STACK_mask().Insert(i); -- -+ } - // Finally, set the "infinite stack" bit. - C->FIRST_STACK_mask().set_AllStack(); + p.p("public class " + currentClass); ++ + p.p(" extends " + getName(stubBaseClass)); + p.p(" implements "); + if (remoteInterfaces.length > 0) { +@@ -422,6 +443,56 @@ + writeIds( p, theType, false ); + p.pln(); -@@ -506,16 +506,36 @@ - idealreg2spillmask[Op_VecS]->OR(C->FIRST_STACK_mask()); - } - if (Matcher::vector_size_supported(T_FLOAT,2)) { -+ // For VecD we need dual alignment and 8 bytes (2 slots) for spills. -+ // RA guarantees such alignment since it is needed for Double and Long values. - *idealreg2spillmask[Op_VecD] = *idealreg2regmask[Op_VecD]; - idealreg2spillmask[Op_VecD]->OR(aligned_stack_mask); - } - if (Matcher::vector_size_supported(T_FLOAT,4)) { -+ // For VecX we need quadro alignment and 16 bytes (4 slots) for spills. -+ // -+ // RA can use input arguments stack slots for spills but until RA -+ // we don't know frame size and offset of input arg stack slots. -+ // -+ // Exclude last input arg stack slots to avoid spilling vectors there -+ // otherwise vector spills could stomp over stack slots in caller frame. -+ OptoReg::Name in = OptoReg::add(_in_arg_limit, -1); -+ for (int k = 1; (in >= init_in) && (k < RegMask::SlotsPerVecX); k++) { -+ aligned_stack_mask.Remove(in); -+ in = OptoReg::add(in, -1); -+ } - aligned_stack_mask.clear_to_sets(RegMask::SlotsPerVecX); - assert(aligned_stack_mask.is_AllStack(), "should be infinite stack"); - *idealreg2spillmask[Op_VecX] = *idealreg2regmask[Op_VecX]; - idealreg2spillmask[Op_VecX]->OR(aligned_stack_mask); - } - if (Matcher::vector_size_supported(T_FLOAT,8)) { -+ // For VecY we need octo alignment and 32 bytes (8 slots) for spills. -+ OptoReg::Name in = OptoReg::add(_in_arg_limit, -1); -+ for (int k = 1; (in >= init_in) && (k < RegMask::SlotsPerVecY); k++) { -+ aligned_stack_mask.Remove(in); -+ in = OptoReg::add(in, -1); -+ } - aligned_stack_mask.clear_to_sets(RegMask::SlotsPerVecY); - assert(aligned_stack_mask.is_AllStack(), "should be infinite stack"); - *idealreg2spillmask[Op_VecY] = *idealreg2regmask[Op_VecY]; ---- hotspot/src/share/vm/opto/output.cpp 2013-09-06 11:22:14.000000000 -0700 -+++ hotspot/src/share/vm/opto/output.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -345,6 +345,11 @@ - uint* jmp_offset = NEW_RESOURCE_ARRAY(uint,nblocks); - uint* jmp_size = NEW_RESOURCE_ARRAY(uint,nblocks); - int* jmp_nidx = NEW_RESOURCE_ARRAY(int ,nblocks); ++ if (emitPermissionCheck) { + -+ // Collect worst case block paddings -+ int* block_worst_case_pad = NEW_RESOURCE_ARRAY(int, nblocks); -+ memset(block_worst_case_pad, 0, nblocks * sizeof(int)); ++ // produce the following generated code ++ // private static Void checkPermission() { ++ // SecurityManager sm = System.getSecurityManager(); ++ // if (sm != null) { ++ // sm.checkPermission(new SerializablePermission( ++ // "enableSubclassImplementation")); // testing ++ // } ++ // return null; ++ // } ++ // ++ // private _XXXXXX_Stub(Void ignore) { ++ // } ++ // ++ // public _XXXXXX_Stub() { ++ // this(checkPermission()); ++ // } ++ // where XXXXXX is the name of the remote interface + - DEBUG_ONLY( uint *jmp_target = NEW_RESOURCE_ARRAY(uint,nblocks); ) - DEBUG_ONLY( uint *jmp_rule = NEW_RESOURCE_ARRAY(uint,nblocks); ) - -@@ -461,6 +466,7 @@ - last_avoid_back_to_back_adr += max_loop_pad; - } - blk_size += max_loop_pad; -+ block_worst_case_pad[i + 1] = max_loop_pad; - } - } - -@@ -500,9 +506,16 @@ - if (bnum > i) { // adjust following block's offset - offset -= adjust_block_start; - } ++ p.pln(); ++ p.plnI("private static Void checkPermission() {"); ++ p.plnI("SecurityManager sm = System.getSecurityManager();"); ++ p.pln("if (sm != null) {"); ++ p.pI(); ++ p.plnI("sm.checkPermission(new SerializablePermission("); ++ p.plnI("\"enableSubclassImplementation\"));"); ++ p.pO(); ++ p.pO(); ++ p.pOln("}"); ++ p.pln("return null;"); ++ p.pO(); ++ p.pOln("}"); ++ p.pln(); ++ p.pO(); + -+ // This block can be a loop header, account for the padding -+ // in the previous block. -+ int block_padding = block_worst_case_pad[i]; -+ assert(i == 0 || block_padding == 0 || br_offs >= block_padding, "Should have at least a padding on top"); - // In the following code a nop could be inserted before - // the branch which will increase the backward distance. -- bool needs_padding = ((uint)br_offs == last_may_be_short_branch_adr); -+ bool needs_padding = ((uint)(br_offs - block_padding) == last_may_be_short_branch_adr); -+ assert(!needs_padding || jmp_offset[i] == 0, "padding only branches at the beginning of block"); ++ p.pI(); ++ p.pln("private " + currentClass + "(Void ignore) { }"); ++ p.pln(); + - if (needs_padding && offset <= 0) - offset -= nop_size; ++ p.plnI("public " + currentClass + "() { "); ++ p.pln("this(checkPermission());"); ++ p.pOln("}"); ++ p.pln(); ++ } ++ ++ if (!emitPermissionCheck) { ++ p.pI(); ++ } ++ + // Write the _ids() method... ---- hotspot/src/share/vm/prims/methodHandles.cpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/prims/methodHandles.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -175,30 +175,32 @@ - } + p.plnI("public String[] _ids() { "); +@@ -815,7 +886,6 @@ + CompoundType theType) throws IOException { - oop MethodHandles::init_method_MemberName(oop mname_oop, methodOop m, bool do_dispatch, -- klassOop receiver_limit) { -+ klassOop resolved_klass) { - AccessFlags mods = m->access_flags(); - int flags = (jushort)( mods.as_short() & JVM_RECOGNIZED_METHOD_MODIFIERS ); - int vmindex = methodOopDesc::nonvirtual_vtable_index; // implies never any dispatch -- klassOop mklass = m->method_holder(); -- if (receiver_limit == NULL) -- receiver_limit = mklass; -+ bool is_itable_call = false; -+ klassOop m_klass = m->method_holder(); -+ // resolved_klass is a copy of CallInfo::resolved_klass, if available -+ if (resolved_klass == NULL) -+ resolved_klass = m_klass; - if (m->is_initializer()) { - flags |= IS_CONSTRUCTOR | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT); - } else if (mods.is_static()) { - flags |= IS_METHOD | (JVM_REF_invokeStatic << REFERENCE_KIND_SHIFT); -- } else if (receiver_limit != mklass && -- !Klass::cast(receiver_limit)->is_subtype_of(mklass)) { -+ } else if (resolved_klass != m_klass && -+ !Klass::cast(resolved_klass)->is_subtype_of(m_klass)) { - return NULL; // bad receiver limit -- } else if (Klass::cast(receiver_limit)->is_interface() && -- Klass::cast(mklass)->is_interface()) { -+ } else if (Klass::cast(resolved_klass)->is_interface() && -+ Klass::cast(m_klass)->is_interface()) { - flags |= IS_METHOD | (JVM_REF_invokeInterface << REFERENCE_KIND_SHIFT); -- receiver_limit = mklass; // ignore passed-in limit; interfaces are interconvertible - vmindex = klassItable::compute_itable_index(m); -- } else if (mklass != receiver_limit && Klass::cast(mklass)->is_interface()) { -+ is_itable_call = true; -+ } else if (m_klass != resolved_klass && Klass::cast(m_klass)->is_interface()) { - flags |= IS_METHOD | (JVM_REF_invokeVirtual << REFERENCE_KIND_SHIFT); - // it is a miranda method, so m->vtable_index is not what we want - ResourceMark rm; -- klassVtable* vt = instanceKlass::cast(receiver_limit)->vtable(); -+ klassVtable* vt = instanceKlass::cast(resolved_klass)->vtable(); - vmindex = vt->index_of_miranda(m->name(), m->signature()); - } else if (!do_dispatch || m->can_be_statically_bound()) { - flags |= IS_METHOD | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT); -@@ -207,10 +209,36 @@ - vmindex = m->vtable_index(); - } + // Wtite the method declaration and opening brace... +- + String methodName = method.getName(); + String methodIDLName = method.getIDLName(); -+ if (vmindex >= 0 && !is_itable_call) { -+ if (Klass::cast(m_klass)->is_interface()) { -+ // This is a vtable call to an interface method (abstract "miranda method"). -+ // The vtable index is meaningless without a class (not interface) receiver type, so get one. -+ // (LinkResolver should help us figure this out.) -+ KlassHandle m_klass_non_interface = resolved_klass; -+ if (m_klass_non_interface->is_interface()) { -+ m_klass_non_interface = SystemDictionary::Object_klass(); -+#ifdef ASSERT -+ { ResourceMark rm; -+ methodOop m2 = m_klass_non_interface->vtable()->method_at(vmindex); -+ assert(m->name() == m2->name() && m->signature() == m2->signature(), -+ err_msg("at %d, %s != %s", vmindex, -+ m->name_and_sig_as_C_string(), m2->name_and_sig_as_C_string())); -+ } -+#endif //ASSERT -+ } -+ if (!m->is_public()) { -+ assert(m->is_public(), "virtual call must be to public interface method"); -+ return NULL; // elicit an error later in product build -+ } -+ assert(Klass::cast(resolved_klass)->is_subtype_of(m_klass_non_interface()), "virtual call must be type-safe"); -+ m_klass = m_klass_non_interface(); -+ } -+ } -+ - java_lang_invoke_MemberName::set_flags(mname_oop, flags); - java_lang_invoke_MemberName::set_vmtarget(mname_oop, m); - java_lang_invoke_MemberName::set_vmindex(mname_oop, vmindex); // vtable/itable index -- java_lang_invoke_MemberName::set_clazz(mname_oop, Klass::cast(receiver_limit)->java_mirror()); -+ java_lang_invoke_MemberName::set_clazz(mname_oop, Klass::cast(m_klass)->java_mirror()); - // Note: name and type can be lazily computed by resolve_MemberName, - // if Java code needs them as resolved String and MethodType objects. - // The clazz must be eagerly stored, because it provides a GC -@@ -571,7 +599,7 @@ - // An unresolved member name is a mere symbolic reference. - // Resolving it plants a vmtarget/vmindex in it, - // which refers dirctly to JVM internals. --Handle MethodHandles::resolve_MemberName(Handle mname, TRAPS) { -+Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS) { - Handle empty; - assert(java_lang_invoke_MemberName::is_instance(mname()), ""); - -@@ -650,21 +678,49 @@ - if (ref_kind == JVM_REF_invokeStatic) { - //do_dispatch = false; // no need, since statics are never dispatched - LinkResolver::resolve_static_call(result, -- defc, name, type, KlassHandle(), false, false, THREAD); -+ defc, name, type, caller, caller.not_null(), false, THREAD); - } else if (ref_kind == JVM_REF_invokeInterface) { - LinkResolver::resolve_interface_call(result, Handle(), defc, -- defc, name, type, KlassHandle(), false, false, THREAD); -+ defc, name, type, caller, caller.not_null(), false, THREAD); - } else if (mh_invoke_id != vmIntrinsics::_none) { - assert(!is_signature_polymorphic_static(mh_invoke_id), ""); - LinkResolver::resolve_handle_call(result, -- defc, name, type, KlassHandle(), THREAD); -+ defc, name, type, caller, THREAD); - } else if (ref_kind == JVM_REF_invokeSpecial) { - do_dispatch = false; // force non-virtual linkage - LinkResolver::resolve_special_call(result, -- defc, name, type, KlassHandle(), false, THREAD); -+ defc, name, type, caller, caller.not_null(), THREAD); -+ // CR 8029533: -+ // As a corner case, invokespecial can return a method *below* its resolved_klass. -+ // Since method search *starts* at the resolved_klass, the eventual -+ // method is almost always in a supertype *above* the resolved_klass. -+ // This pattern breaks when an invokespecial "over-reaches" beyond an -+ // immediate super to a method overridden by a super class. -+ // In that case, the selected method will be below the resolved_klass. -+ // (This is the behavior enabled by the famous ACC_SUPER classfile flag.) -+ // -+ // Downstream of this code, we make assumptions about resolved_klass being below m. -+ // (See init_method_MemberName, the comment "bad receiver limit".) -+ // We basically want to patch result._resolved_klass to be m.method_holder(). -+ // The simplest way to get this happier outcome is to re-resolve. -+ if (!HAS_PENDING_EXCEPTION && -+ caller.not_null() && -+ result.resolved_method().not_null()) { -+ // this is the m_klass value that will be checked later: -+ klassOop m_klass = result.resolved_method()->method_holder(); -+ if (m_klass != result.resolved_klass()() && -+ Klass::cast(m_klass)->is_subtype_of(result.resolved_klass()())) { -+ KlassHandle adjusted_defc(THREAD, m_klass); -+ LinkResolver::resolve_special_call(result, -+ adjusted_defc, name, type, caller, caller.not_null(), THREAD); -+ assert(HAS_PENDING_EXCEPTION // if there is something like an OOM, pass it up to caller -+ || result.resolved_method()->method_holder() == adjusted_defc(), -+ "same method, different resolved_klass"); -+ } -+ } - } else if (ref_kind == JVM_REF_invokeVirtual) { - LinkResolver::resolve_virtual_call(result, Handle(), defc, -- defc, name, type, KlassHandle(), false, false, THREAD); -+ defc, name, type, caller, caller.not_null(), false, THREAD); - } else { - assert(false, err_msg("ref_kind=%d", ref_kind)); - } -@@ -681,7 +737,7 @@ - assert(!HAS_PENDING_EXCEPTION, ""); - if (name == vmSymbols::object_initializer_name()) { - LinkResolver::resolve_special_call(result, -- defc, name, type, KlassHandle(), false, THREAD); -+ defc, name, type, caller, caller.not_null(), THREAD); - } else { - break; // will throw after end of switch - } -@@ -1025,7 +1081,12 @@ - if (VerifyMethodHandles && caller_jh != NULL && - java_lang_invoke_MemberName::clazz(mname()) != NULL) { - klassOop reference_klass = java_lang_Class::as_klassOop(java_lang_invoke_MemberName::clazz(mname())); -- if (reference_klass != NULL) { -+ if (reference_klass != NULL && Klass::cast(reference_klass)->oop_is_objArray()) { -+ reference_klass = objArrayKlass::cast(reference_klass)->bottom_klass(); -+ } -+ -+ // Reflection::verify_class_access can only handle instance classes. -+ if (reference_klass != NULL && Klass::cast(reference_klass)->oop_is_instance()) { - // Emulate LinkResolver::check_klass_accessability. - klassOop caller = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(caller_jh)); - if (!Reflection::verify_class_access(caller, -@@ -1036,7 +1097,11 @@ - } - } - -- Handle resolved = MethodHandles::resolve_MemberName(mname, CHECK_NULL); -+ KlassHandle caller(THREAD, -+ caller_jh == NULL ? (klassOop) NULL : -+ java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(caller_jh))); -+ Handle resolved = MethodHandles::resolve_MemberName(mname, caller, CHECK_NULL); -+ - if (resolved.is_null()) { - int flags = java_lang_invoke_MemberName::flags(mname()); - int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK; ---- hotspot/src/share/vm/prims/methodHandles.hpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/prims/methodHandles.hpp 2014-04-20 12:39:30.000000000 -0700 -@@ -51,12 +51,12 @@ +@@ -1631,7 +1701,7 @@ - public: - // working with member names -- static Handle resolve_MemberName(Handle mname, TRAPS); // compute vmtarget/vmindex from name/type -+ static Handle resolve_MemberName(Handle mname, KlassHandle caller, TRAPS); // compute vmtarget/vmindex from name/type - static void expand_MemberName(Handle mname, int suppress, TRAPS); // expand defc/name/type if missing - static Handle new_MemberName(TRAPS); // must be followed by init_MemberName - static oop init_MemberName(oop mname_oop, oop target_oop); // compute vmtarget/vmindex from target - static oop init_method_MemberName(oop mname_oop, methodOop m, bool do_dispatch, -- klassOop receiver_limit); -+ klassOop resolved_klass); - static oop init_field_MemberName(oop mname_oop, klassOop field_holder, - AccessFlags mods, oop type, oop name, - intptr_t offset, bool is_setter = false); ---- hotspot/src/share/vm/runtime/atomic.cpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/atomic.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -54,6 +54,12 @@ - #ifdef TARGET_OS_ARCH_windows_x86 - # include "atomic_windows_x86.inline.hpp" - #endif -+#ifdef TARGET_OS_ARCH_bsd_x86 -+# include "atomic_bsd_x86.inline.hpp" -+#endif -+#ifdef TARGET_OS_ARCH_bsd_zero -+# include "atomic_bsd_zero.inline.hpp" -+#endif - #ifdef TARGET_OS_ARCH_linux_arm - # include "atomic_linux_arm.inline.hpp" - #endif ---- hotspot/src/share/vm/runtime/mutexLocker.cpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/mutexLocker.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -133,13 +133,15 @@ + // Write data members... + p.pln(); +- p.pln("private " + getName(theType) + " target = null;"); ++ p.pln("volatile private " + getName(theType) + " target = null;"); + p.pln(); - Mutex* Management_lock = NULL; - Monitor* Service_lock = NULL; --Mutex* Stacktrace_lock = NULL; -+Monitor* PeriodicTask_lock = NULL; + // Write the ids... +@@ -1695,6 +1765,10 @@ --Monitor* JfrQuery_lock = NULL; -+#ifdef INCLUDE_TRACE -+Mutex* JfrStacktrace_lock = NULL; - Monitor* JfrMsg_lock = NULL; - Mutex* JfrBuffer_lock = NULL; - Mutex* JfrStream_lock = NULL; --Monitor* PeriodicTask_lock = NULL; -+Mutex* JfrThreadGroups_lock = NULL; -+#endif + if (remoteMethods.length > 0) { + p.plnI("try {"); ++ p.pln(getName(theType) + " target = this.target;"); ++ p.plnI("if (target == null) {"); ++ p.pln("throw new java.io.IOException();"); ++ p.pOln("}"); + p.plnI(idExtInputStream + " "+in+" = "); + p.pln("(" + idExtInputStream + ") "+_in+";"); + p.pO(); +--- ./hotspot/.hgtags 2013-09-06 11:21:49.000000000 -0700 ++++ ./hotspot/.hgtags 2014-06-06 19:56:22.000000000 -0700 +@@ -182,6 +182,7 @@ + 38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16 + 81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147 + 81d815b05abb564aa1f4100ae13491c949b9a07e hs21-b17 ++f1a18ada5853af49fce54d43dd5a5b67dc291470 7u0 + 9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01 + 0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01 + 31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02 +@@ -476,6 +477,24 @@ + 8386245b59c3e82b7c728b7d3832ea342c62615d jdk7u21-b50 + c5e4585a045fe165d067ec0e98af42eace20c5f8 jdk7u21-b12 + 00dbf9fa12ec6b1ba15d9a9a12495f50e10837bf jdk7u21-b31 ++bf2d84c5103d98db1697b50071a649ea23c4e33d jdk7u25-b01 ++07119340f80f77dfcb03fa568641e80b43d4be74 jdk7u25-b02 ++655bea6843fb7beabd8d9eeda59572c0c7055b85 jdk7u25-b03 ++96a4e612195c0d753be24cf38fea0ee8ce30edcf jdk7u25-b04 ++7151c26b838828a20cb28595ef1f70403d1868cf jdk7u25-b05 ++fbb5f6083dd00ca7417e4a45311f33918bb2a5f0 jdk7u25-b06 ++83abf4b2fc8a5bb7226177c5e4334bd0bfd7a8df jdk7u25-b07 ++525252cd9fca4869c3fd81bc61299a85e73ff9c7 jdk7u25-b08 ++706a255a8404b7e41579cea278df6bb87c314567 jdk7u25-b09 ++402184622f60a2ba35479bdf124a8d4694835406 jdk7u25-b10 ++cca49a35bf83664456af112482ffb3a7465d21fa jdk7u25-b11 ++7ca68c0674df72fdd784de337c049404d2b5b0c3 jdk7u25-b12 ++3e145a686fedd9eefdcb6b714241200ed236b41d jdk7u25-b13 ++4fafaf293aa5666e8c9f5ca1d96c3f752305f586 jdk7u25-b14 ++40acb370626fbc439e4cfed8854960a83a376fba jdk7u25-b15 ++97a3ebd62052410e0709035f40032d3f2113ed86 jdk7u25-b30 ++b80a290e6e3011097273525c4f352c70b9857464 jdk7u25-b16 ++273e8afccd6ef9e10e9fe121f7b323755191f3cc jdk7u25-b32 + e3d2c238e29c421c3b5c001e400acbfb30790cfc jdk7u14-b14 + 860ae068f4dff62a77c8315f0335b7e935087e86 hs24-b34 + 12619005c5e29be6e65f0dc9891ca19d9ffb1aaa jdk7u14-b15 +@@ -550,3 +569,92 @@ + b8d8caf6df744d5342b5d284376a005e86c0b108 hs24-b56 + eceae04782438987cd747e1c76e4085f50b43a18 jdk7u40-b43 + af1fc2868a2b919727bfbb0858449bd991bbee4a jdk7u40-b60 ++efaa26fb6de2ecb8506fb8b785a429d040e96768 jdk7u40-b61 ++df6f37a7311d35072a07c1425a7aadee469a09b6 jdk7u40-b62 ++5fb434aa203c32b4551167b922a70e79831ffdf4 jdk7u45-b01 ++f2039061ba49de742ae88cc3123fd1237965d665 jdk7u45-b02 ++d6fd3f84a30ce82a37fc39b6e5e9d73bd8054ab2 jdk7u45-b03 ++7f16aa9067386aeb3668336aa6cd63ef3dc4f44a jdk7u45-b04 ++b4fe146b820b47d8b59bbb9dc9d43221436ed0ae jdk7u45-b05 ++63efa616e54dd3545e16a5aa1917662548b18ee5 jdk7u45-b06 ++f6748e6123b6745497d69addffdff38e224a77c5 jdk7u45-b07 ++06bcab9ef18355dccc87401fc24dbd5f15615db0 jdk7u45-b08 ++996b6863b3b2468cece20d7a6f571f9ec1b7830c jdk7u45-b09 ++bcaf889eea9e64d30f8c3aefdcdc2c2ee29406f2 jdk7u45-b10 ++7ca907428850dc2aa99ee4a906446e479dbeb392 jdk7u45-b11 ++ed1505510ea0e94b17f968cdb3e8aba13c99d543 jdk7u45-b12 ++89f99af7a7bbdadb5b8cf781c7d899c22df64b71 jdk7u45-b13 ++718d1e9223dd0359d9ccef81fb82c32215702fe8 jdk7u45-b14 ++9ad76a08e5edfe24e95eef84e15fef261bff1abf jdk7u45-b15 ++429884602206fcf5314c8b953c06d54d337558ca jdk7u45-b16 ++0c0dc384915cafd9bfaa2fe5792a629a22d1b990 jdk7u45-b17 ++12374864c655a2cefb0d65caaacf215d5365ec5f jdk7u45-b18 ++3677c8cc3c89c0fa608f485b84396e4cf755634b jdk7u45-b30 ++520b7b3d9153c1407791325946b07c5c222cf0d6 jdk7u45-b31 ++c373a733d5d5147f99eaa2b91d6b937c28214fc9 jdk7u45-b33 ++0bcb43482f2ac5615437541ffb8dc0f79ece3148 jdk7u45-b34 ++12ea8d416f105f5971c808c89dddc1006bfc4c53 jdk7u45-b35 ++429884602206fcf5314c8b953c06d54d337558ca jdk7u51-b00 ++68f03ff066f2341b89b52a6d6e21ae09de008351 jdk7u51-b01 ++67910a581eca113847c5320c49436a9816c5d5c6 jdk7u51-b02 ++4138fb11955a528e5ee5448d9c6c8e88e0e268b2 jdk7u51-b03 ++683458c333ced92d515daa1b9bcdb5be679e535a jdk7u51-b04 ++ed2db7a82229e7adbfe8a8166bf98f3ef4a09be5 jdk7u51-b05 ++fec027762cf37d033d82d5b3725020f40c771690 jdk7u51-b06 ++f673c581ebf91073b5bbdbdc5e4d4407910fa006 jdk7u51-b07 ++b0a355aae00427e74cc0b89697c7c7f6fb520176 jdk7u51-b08 ++4f56f2e206fd878809f70ca06f4bc21563a7c530 jdk7u51-b09 ++1b7aaef3df78970c9a5ef5cc353ca927241555ee jdk7u51-b10 ++1f11dff734af98f5bf11d4fceeda221ab1416971 jdk7u51-b11 ++dee2a38ef6b26534c44c550ef4da2c3146c612c2 jdk7u51-b12 ++6c6a2299029ad02fa2820b8ff8c61c2bbcae799c jdk7u51-b13 ++a398ddc79d2310ad37b131cc3794b3cf574f088e jdk7u51-b30 ++cf4110c35afb10456d8264c47b7cde1c20150cab jdk7u51-b31 ++208419914859dd77abdb5ec755b32c237ee6e4eb jdk7u51-b33 ++f8457a75bdb5052f1d8c547027a926f9b755b808 jdk7u51-b34 ++dee2a38ef6b26534c44c550ef4da2c3146c612c2 jdk7u55-b00 ++ac0063b4452bc724e8648e64f4b2d495054bb308 jdk7u55-b01 ++408028d410e316a99495c42df0031018890c22fe jdk7u55-b02 ++50fb91504dd8cdf410eb956075442daf3aacf1db jdk7u55-b03 ++3be3b8a032a5508646c1c5620cee18d3e69fc708 jdk7u55-b04 ++b86119fa2748bd91ae4984ff2264da92b6626f8c jdk7u55-b05 ++260d919d52e500a0b20f911fade2a7710474067a jdk7u55-b06 ++8cf6e0a3a0651c4132ae034c2b68ddf4eb5c4d88 jdk7u55-b07 ++049fd2cef85bf2d557dd7dd8a90a6831a8168ce4 jdk7u55-b08 ++9b238ab164e6d1cf9cfb560827d88ef8a7d8c898 jdk7u55-b09 ++573d8d080af9eff48aa3b8f0696d8874ce36fbb1 jdk7u55-b09 ++36f8bd4dd467ae4183340842fd7158ac3309b826 jdk7u55-b10 ++49cada8e39b9215b9fd8b9183743f92625587cfc jdk7u55-b11 ++aadc864abd1ced3049bf59ce32786a07997ba190 jdk7u55-b12 ++b021fd817a0177b31d1e3d65127a27458e85801e jdk7u55-b13 ++d27b468d5f3be3329ff1ff342f3347e6b2e0303b jdk7u55-b30 ++dff9147a781672f20bb0577a94233264ea4a95d1 jdk7u55-b14 ++8175599864880938d68d0a515fa561043d7d5fd0 jdk7u55-b31 ++ae4adc1492d1c90a70bd2d139a939fc0c8329be9 jdk7u60-b00 ++af1fc2868a2b919727bfbb0858449bd991bbee4a jdk7u40-b60 ++cc83359f5e5eb46dd9176b0a272390b1a0a51fdc hs24.60-b01 ++b7d44793cd267b22352c688b0185466741bb7a89 hs24.60-b02 ++90cfd4ad3c9263886d876792d72cb24ac0e03a85 hs24.60-b03 ++8fd0e931efa57d1579fb1bc8a68ba3924244b99e jdk7u60-b01 ++99e96aaac8afc14ce6f9f3d92ef7004cf505b35d hs24.60-b04 ++0025a2a965c8f21376278245c2493d8861386fba jdk7u60-b02 ++fa59add77d1a8f601a695f137248462fdc68cc2f hs24.60-b05 ++a59134ccb1b704b2cd05e157970d425af43e5437 hs24.60-b06 ++2c971ed884cec0a9293ccff3def696da81823225 jdk7u60-b03 ++1afbeb8cb558429156d432f35e7582716053a9cb hs24.60-b07 ++05fe7a87d14908eb3f21a0d29fc72cee2f996b7f jdk7u60-b04 ++f52b5452d424545e3b101d808e6d7da763d6f0f3 hs24.60-b08 ++462db155547e9bdd7ba26bead42808deb0b10d44 jdk7u60-b05 ++0cc4550bd9c57ba3be343bfbfcaf46b9060d5e7d jdk7u60-b06 ++2d053c4fd767155b2ac5e3e0a60b08a1bcc73cab jdk7u60-b07 ++a198787e7b9bc7b831ad210b67732cdb2be9e46e jdk7u60-b08 ++22cae361773d14b467328e8f90cf893550d1d610 jdk7u60-b09 ++6f74afd8577eb4b6a0e6f7b25cfef7d6f7d92e5f jdk7u60-b10 ++a2ac67a2c1cc867a8d6b525ab1df17204186e636 jdk7u60-b11 ++cae50351dcece6e5bf215eabf958c5d669ffff1f jdk7u60-b12 ++5853131ba4b448c5d89a3f0aa501fdf07f3b473c jdk7u60-b13 ++b226be2040f971855626f5b88cb41a7d5299fea0 jdk7u60-b14 ++2871f345b7e5585e20dc7aa91035967fe774cfba jdk7u60-b15 ++ec76bacbb5b90efc7988dee5345c656126b97561 jdk7u60-b16 ++617a6338e0c4f7699eed5061d7e8f576c3ace029 jdk7u60-b18 ++617a6338e0c4f7699eed5061d7e8f576c3ace029 jdk7u60-b17 +--- ./hotspot/agent/src/os/bsd/ps_proc.c 2013-09-06 11:21:50.000000000 -0700 ++++ ./hotspot/agent/src/os/bsd/ps_proc.c 2014-06-06 19:56:22.000000000 -0700 +@@ -131,7 +131,7 @@ - #define MAX_NUM_MUTEX 128 - static Monitor * _mutex_array[MAX_NUM_MUTEX]; -@@ -215,7 +217,6 @@ - def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching. - def(ObjAllocPost_lock , Monitor, special, false); - def(Service_lock , Monitor, special, true ); // used for service thread operations -- def(Stacktrace_lock , Mutex, special, true ); // used for JFR stacktrace database - def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs. + static bool ptrace_continue(pid_t pid, int signal) { + // pass the signal to the process so we don't swallow it +- if (ptrace(PTRACE_CONT, pid, NULL, signal) < 0) { ++ if (ptrace(PT_CONTINUE, pid, NULL, signal) < 0) { + print_debug("ptrace(PTRACE_CONT, ..) failed for %d\n", pid); + return false; + } +--- ./hotspot/agent/src/os/linux/ps_core.c 2013-09-06 11:21:50.000000000 -0700 ++++ ./hotspot/agent/src/os/linux/ps_core.c 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -700,29 +700,61 @@ + + // read segments of a shared object + static bool read_lib_segments(struct ps_prochandle* ph, int lib_fd, ELF_EHDR* lib_ehdr, uintptr_t lib_base) { +- int i = 0; +- ELF_PHDR* phbuf; +- ELF_PHDR* lib_php = NULL; ++ int i = 0; ++ ELF_PHDR* phbuf; ++ ELF_PHDR* lib_php = NULL; + +- if ((phbuf = read_program_header_table(lib_fd, lib_ehdr)) == NULL) +- return false; ++ int page_size = sysconf(_SC_PAGE_SIZE); ++ ++ if ((phbuf = read_program_header_table(lib_fd, lib_ehdr)) == NULL) { ++ return false; ++ } - def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread -@@ -278,12 +279,17 @@ - def(MethodCompileQueue_lock , Monitor, nonleaf+4, true ); - def(Debug2_lock , Mutex , nonleaf+4, true ); - def(Debug3_lock , Mutex , nonleaf+4, true ); -- def(CompileThread_lock , Monitor, nonleaf+5, false ); -+ def(CompileThread_lock , Monitor, nonleaf+5, false); -+ def(PeriodicTask_lock , Monitor, nonleaf+5, true); +- // we want to process only PT_LOAD segments that are not writable. +- // i.e., text segments. The read/write/exec (data) segments would +- // have been already added from core file segments. +- for (lib_php = phbuf, i = 0; i < lib_ehdr->e_phnum; i++) { +- if ((lib_php->p_type == PT_LOAD) && !(lib_php->p_flags & PF_W) && (lib_php->p_filesz != 0)) { +- if (add_map_info(ph, lib_fd, lib_php->p_offset, lib_php->p_vaddr + lib_base, lib_php->p_filesz) == NULL) +- goto err; ++ // we want to process only PT_LOAD segments that are not writable. ++ // i.e., text segments. The read/write/exec (data) segments would ++ // have been already added from core file segments. ++ for (lib_php = phbuf, i = 0; i < lib_ehdr->e_phnum; i++) { ++ if ((lib_php->p_type == PT_LOAD) && !(lib_php->p_flags & PF_W) && (lib_php->p_filesz != 0)) { ++ ++ uintptr_t target_vaddr = lib_php->p_vaddr + lib_base; ++ map_info *existing_map = core_lookup(ph, target_vaddr); ++ ++ if (existing_map == NULL){ ++ if (add_map_info(ph, lib_fd, lib_php->p_offset, ++ target_vaddr, lib_php->p_memsz) == NULL) { ++ goto err; ++ } ++ } else { ++ // Coredump stores value of p_memsz elf field ++ // rounded up to page boundary. ++ ++ if ((existing_map->memsz != page_size) && ++ (existing_map->fd != lib_fd) && ++ (ROUNDUP(existing_map->memsz, page_size) != ROUNDUP(lib_php->p_memsz, page_size))) { ++ ++ print_debug("address conflict @ 0x%lx (existing map size = %ld, size = %ld, flags = %d)\n", ++ target_vaddr, existing_map->memsz, lib_php->p_memsz, lib_php->p_flags); ++ goto err; ++ } ++ ++ /* replace PT_LOAD segment with library segment */ ++ print_debug("overwrote with new address mapping (memsz %ld -> %ld)\n", ++ existing_map->memsz, ROUNDUP(lib_php->p_memsz, page_size)); ++ ++ existing_map->fd = lib_fd; ++ existing_map->offset = lib_php->p_offset; ++ existing_map->memsz = ROUNDUP(lib_php->p_memsz, page_size); + } +- lib_php++; +- } ++ } -+#ifdef INCLUDE_TRACE - def(JfrMsg_lock , Monitor, leaf, true); - def(JfrBuffer_lock , Mutex, nonleaf+1, true); -+ def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); - def(JfrStream_lock , Mutex, nonleaf+2, true); -- def(PeriodicTask_lock , Monitor, nonleaf+5, true); -+ def(JfrStacktrace_lock , Mutex, special, true ); -+#endif +- free(phbuf); +- return true; ++ lib_php++; ++ } + ++ free(phbuf); ++ return true; + err: +- free(phbuf); +- return false; ++ free(phbuf); ++ return false; } - GCMutexLocker::GCMutexLocker(Monitor * mutex) { ---- hotspot/src/share/vm/runtime/mutexLocker.hpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/mutexLocker.hpp 2014-04-20 12:39:30.000000000 -0700 -@@ -135,13 +135,15 @@ + // process segments from interpreter (ld.so or ld-linux.so) +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2013-09-06 11:21:51.000000000 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2014-06-06 19:56:22.000000000 -0700 +@@ -33,6 +33,7 @@ + import sun.jvm.hotspot.debugger.remote.*; + import sun.jvm.hotspot.debugger.windbg.*; + import sun.jvm.hotspot.debugger.linux.*; ++import sun.jvm.hotspot.debugger.bsd.*; + import sun.jvm.hotspot.memory.*; + import sun.jvm.hotspot.oops.*; + import sun.jvm.hotspot.runtime.*; +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2013-09-06 11:21:52.000000000 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2014-06-06 19:56:22.000000000 -0700 +@@ -35,6 +35,7 @@ + import sun.jvm.hotspot.debugger.windbg.*; + import sun.jvm.hotspot.debugger.linux.*; + import sun.jvm.hotspot.debugger.sparc.*; ++import sun.jvm.hotspot.debugger.bsd.*; + import sun.jvm.hotspot.debugger.remote.*; + import sun.jvm.hotspot.livejvm.*; + import sun.jvm.hotspot.memory.*; +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java 2013-09-06 11:21:55.000000000 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/Bytecodes.java 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -272,9 +272,10 @@ + public static final int _fast_aldc = 229; + public static final int _fast_aldc_w = 230; + public static final int _return_register_finalizer = 231; +- public static final int _shouldnotreachhere = 232; // For debugging ++ public static final int _invokehandle = 232; ++ public static final int _shouldnotreachhere = 233; // For debugging - extern Mutex* Management_lock; // a lock used to serialize JVM management - extern Monitor* Service_lock; // a lock used for service thread operation --extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table -+extern Monitor* PeriodicTask_lock; // protects the periodic task structure +- public static final int number_of_codes = 233; ++ public static final int number_of_codes = 234; --extern Monitor* JfrQuery_lock; // protects JFR use -+#ifdef INCLUDE_TRACE -+extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table - extern Monitor* JfrMsg_lock; // protects JFR messaging - extern Mutex* JfrBuffer_lock; // protects JFR buffer operations - extern Mutex* JfrStream_lock; // protects JFR stream access --extern Monitor* PeriodicTask_lock; // protects the periodic task structure -+extern Mutex* JfrThreadGroups_lock; // protects JFR access to Thread Groups -+#endif + // Flag bits derived from format strings, can_trap, can_rewrite, etc.: + // semantic flags: +@@ -798,6 +799,9 @@ - // A MutexLocker provides mutual exclusion with respect to a given mutex - // for the scope which contains the locker. The lock is an OS lock, not ---- hotspot/src/share/vm/runtime/objectMonitor.cpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/objectMonitor.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -1684,7 +1684,7 @@ - } - iterator->_notified = 1 ; - Thread * Self = THREAD; -- iterator->_notifier_tid = Self->osthread()->thread_id(); -+ iterator->_notifier_tid = (jlong) Self->osthread()->thread_id(); + def(_return_register_finalizer, "return_register_finalizer", "b" , null , BasicType.getTVoid() , 0, true, _return ); - ObjectWaiter * List = _EntryList ; - if (List != NULL) { -@@ -1810,7 +1810,7 @@ - guarantee (iterator->_notified == 0, "invariant") ; - iterator->_notified = 1 ; - Thread * Self = THREAD; -- iterator->_notifier_tid = Self->osthread()->thread_id(); -+ iterator->_notifier_tid = (jlong) Self->osthread()->thread_id(); - if (Policy != 4) { - iterator->TState = ObjectWaiter::TS_ENTER ; - } ---- hotspot/src/share/vm/runtime/os.cpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/os.cpp 2014-04-28 17:39:01.000000000 -0700 -@@ -399,13 +399,6 @@ - if (_native_java_library == NULL) { - vm_exit_during_initialization("Unable to load native library", ebuf); - } -- --#if defined(__OpenBSD__) -- // Work-around OpenBSD's lack of $ORIGIN support by pre-loading libnet.so -- // ignore errors -- dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "net"); -- dll_load(buffer, ebuf, sizeof(ebuf)); --#endif - } - static jboolean onLoaded = JNI_FALSE; - if (onLoaded) { -@@ -1139,9 +1132,6 @@ - "%/lib/jce.jar:" - "%/lib/charsets.jar:" - "%/lib/jfr.jar:" --#ifdef __APPLE__ -- "%/lib/JObjC.jar:" --#endif - "%/classes"; - char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep); - if (sysclasspath == NULL) return false; ---- hotspot/src/share/vm/runtime/os.hpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/os.hpp 2014-04-20 12:39:30.000000000 -0700 -@@ -30,6 +30,9 @@ - #include "runtime/extendedPC.hpp" - #include "runtime/handles.hpp" - #include "utilities/top.hpp" -+#ifdef TARGET_OS_FAMILY_bsd -+# include "jvm_bsd.h" -+#endif - #ifdef TARGET_OS_FAMILY_linux - # include "jvm_linux.h" - # include -@@ -755,8 +758,8 @@ - # include "os_windows.hpp" - #endif - #ifdef TARGET_OS_FAMILY_bsd --# include "os_posix.hpp" - # include "os_bsd.hpp" -+# include "os_posix.hpp" - #endif - #ifdef TARGET_OS_ARCH_linux_x86 - # include "os_linux_x86.hpp" ---- hotspot/src/share/vm/runtime/reflection.cpp 2013-09-06 11:22:15.000000000 -0700 -+++ hotspot/src/share/vm/runtime/reflection.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -460,7 +460,7 @@ - // doesn't have a classloader. - if ((current_class == NULL) || - (current_class == new_class) || -- (instanceKlass::cast(new_class)->is_public()) || -+ (Klass::cast(new_class)->is_public()) || - is_same_class_package(current_class, new_class)) { - return true; - } ---- hotspot/src/share/vm/runtime/vmThread.cpp 2013-09-06 11:22:16.000000000 -0700 -+++ hotspot/src/share/vm/runtime/vmThread.cpp 2014-04-20 12:39:30.000000000 -0700 -@@ -390,7 +390,7 @@ - // Only write caller thread information for non-concurrent vm operations. - // For concurrent vm operations, the thread id is set to 0 indicating thread is unknown. - // This is because the caller thread could have exited already. -- event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id()); -+ event.set_caller(is_concurrent ? 0 : (uint64_t) op->calling_thread()->osthread()->thread_id()); - event.commit(); - } ++ def(_invokehandle , "invokehandle" , "bJJ" , null , BasicType.getTIllegal(), -1, true, _invokevirtual ); ++ ++ + def(_fast_aldc , "fast_aldc" , "bj" , null , BasicType.getTObject(), 1, true, _ldc ); + def(_fast_aldc_w , "fast_aldc_w" , "bJJ" , null , BasicType.getTObject(), 1, true, _ldc_w ); ---- hotspot/src/share/vm/services/gcNotifier.cpp 2013-09-06 11:22:16.000000000 -0700 -+++ hotspot/src/share/vm/services/gcNotifier.cpp 2014-04-20 12:39:29.000000000 -0700 +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/JVMTIThreadState.java 2013-09-06 11:21:56.000000000 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/JVMTIThreadState.java 2014-06-06 19:56:21.000000000 -0700 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2004, 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -209,11 +209,11 @@ - GCNotificationRequest *request = getRequest(); - if (request != NULL) { - NotificationMark nm(request); -- Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, THREAD); -+ Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, CHECK); +@@ -29,11 +29,10 @@ + public static final int JVMTI_THREAD_STATE_ALIVE = 0x0001; + public static final int JVMTI_THREAD_STATE_TERMINATED = 0x0002; + public static final int JVMTI_THREAD_STATE_RUNNABLE = 0x0004; +- public static final int JVMTI_THREAD_STATE_WAITING = 0x0008; ++ public static final int JVMTI_THREAD_STATE_WAITING = 0x0080; + public static final int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010; + public static final int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020; + public static final int JVMTI_THREAD_STATE_SLEEPING = 0x0040; +- public static final int JVMTI_THREAD_STATE_WAITING_FOR_NOTIFICATION = 0x0080; + public static final int JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100; + public static final int JVMTI_THREAD_STATE_PARKED = 0x0200; + public static final int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400; +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/OSThread.java 2013-09-06 11:21:57.000000000 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/OSThread.java 2014-06-06 19:56:21.000000000 -0700 +@@ -32,7 +32,7 @@ + // to the sys_thread_t structure of the classic JVM implementation. + public class OSThread extends VMObject { + private static JIntField interruptedField; +- private static JIntField threadIdField; ++ private static Field threadIdField; + static { + VM.registerVMInitializedObserver(new Observer() { + public void update(Observable o, Object data) { +@@ -44,7 +44,7 @@ + private static synchronized void initialize(TypeDataBase db) { + Type type = db.lookupType("OSThread"); + interruptedField = type.getJIntField("_interrupted"); +- threadIdField = type.getJIntField("_thread_id"); ++ threadIdField = type.getField("_thread_id"); + } -- Handle objName = java_lang_String::create_from_platform_dependent_str(request->gcManager->name(), CHECK); -- Handle objAction = java_lang_String::create_from_platform_dependent_str(request->gcAction, CHECK); -- Handle objCause = java_lang_String::create_from_platform_dependent_str(request->gcCause, CHECK); -+ Handle objName = java_lang_String::create_from_str(request->gcManager->name(), CHECK); -+ Handle objAction = java_lang_String::create_from_str(request->gcAction, CHECK); -+ Handle objCause = java_lang_String::create_from_str(request->gcCause, CHECK); + public OSThread(Address addr) { +@@ -56,7 +56,7 @@ + } - klassOop k = Management::sun_management_GarbageCollectorImpl_klass(CHECK); - instanceKlassHandle gc_mbean_klass(THREAD, k); ---- hotspot/src/share/vm/trace/tracetypes.xml 2013-09-06 11:22:17.000000000 -0700 -+++ hotspot/src/share/vm/trace/tracetypes.xml 2014-04-20 12:39:30.000000000 -0700 -@@ -60,7 +60,7 @@ - - - -+ type="thread_id_t" builtin_type="OSTHREAD"> - - + public int threadId() { +- return (int)threadIdField.getValue(addr); ++ return threadIdField.getJInt(addr); + } -@@ -294,8 +294,8 @@ - type="u8" sizeop="sizeof(u8)"/> + } +--- ./hotspot/make/bsd/Makefile 2013-09-06 11:21:59.000000000 -0700 ++++ ./hotspot/make/bsd/Makefile 2014-06-06 19:56:22.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1999, 2011, 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 +@@ -211,6 +211,8 @@ + BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX) + BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) - -- -+ ++BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) ++ + BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS) - - cr(); - } + #------------------------------------------------------------------------------- +@@ -337,9 +339,11 @@ -+#ifdef LINUX -+ STEP(193, "(printing large pages allocation errors)") -+ -+ if (_verbose) { -+ jint largepage_failures = os::Linux::num_largepage_commit_fails; -+ if (largepage_failures > 0) { -+ st->print_cr("Large page allocation failures have occurred " INT32_FORMAT " times", largepage_failures); -+ st->cr(); -+ } -+ } -+#endif -+ - STEP(195, "(printing code cache information)" ) + # Doc target. This is the same for all build options. + # Hence create a docs directory beside ...$(ARCH)_[...] ++# We specify 'BUILD_FLAVOR=product' so that the proper ++# ENABLE_FULL_DEBUG_SYMBOLS value is used. + docs: checks + $(QUIETLY) mkdir -p $(SUBDIR_DOCS) +- $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs ++ $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs - if (_verbose && Universe::is_fully_initialized()) { ---- hotspot/test/compiler/5091921/Test7005594.sh 2013-09-06 11:22:17.000000000 -0700 -+++ hotspot/test/compiler/5091921/Test7005594.sh 2014-04-20 12:39:32.000000000 -0700 -@@ -60,6 +60,9 @@ - # Windows/MKS - MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'` - MEM="$(($machine_memory / 1024))" -+elif [ -n `sysctl -n hw.physmem64 2> /dev/null` -o -n `sysctl -n hw.physmem 2> /dev/null` ]; -+ # BSD -+ MEM=`sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }'` - else - echo "Unable to determine amount of physical memory on the machine" + # Synonyms for win32-like targets. + compiler2: jvmg product +--- ./hotspot/make/bsd/makefiles/arm.make 2013-09-06 11:21:59.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/arm.make 2014-06-06 19:56:22.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + # 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 @@ + + Obj_Files += bsd_arm.o + +-LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a ++ifneq ($(EXT_LIBS_PATH),) ++ LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a ++endif + + CFLAGS += -DVM_LITTLE_ENDIAN +--- ./hotspot/make/bsd/makefiles/build_vm_def.sh 2013-09-06 11:21:59.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/build_vm_def.sh 2014-06-06 19:56:22.000000000 -0700 +@@ -7,6 +7,16 @@ + NM=nm fi ---- hotspot/test/runtime/7110720/Test7110720.sh 2013-09-06 11:22:20.000000000 -0700 -+++ hotspot/test/runtime/7110720/Test7110720.sh 2014-04-20 12:39:32.000000000 -0700 -@@ -28,7 +28,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | Darwin | *BSD ) - FS="/" - RM=/bin/rm - CP=/bin/cp ---- hotspot/test/runtime/7158800/Test7158800.sh 1969-12-31 16:00:00.000000000 -0800 -+++ hotspot/test/runtime/7158800/Test7158800.sh 2014-04-20 12:39:32.000000000 -0700 -@@ -0,0 +1,91 @@ -+#!/bin/sh -+# -+# 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. -+# -+# -+# Run test for InternTest.java -+# -+ -+if [ "${TESTSRC}" = "" ] -+then TESTSRC=. -+fi -+ -+if [ "${TESTJAVA}" = "" ] -+then -+ PARENT=`dirname \`which java\`` -+ TESTJAVA=`dirname ${PARENT}` -+ echo "TESTJAVA not set, selecting " ${TESTJAVA} -+ echo "If this is incorrect, try setting the variable manually." -+fi -+ -+if [ "${TESTCLASSES}" = "" ] -+then -+ echo "TESTCLASSES not set. Test cannot execute. Failed." -+ exit 1 -+fi -+ -+# set platform-dependent variables -+OS=`uname -s` -+case "$OS" in -+ SunOS | Linux | *BSD ) -+ NULL=/dev/null -+ PS=":" -+ FS="/" -+ ;; -+ Windows_* ) -+ NULL=NUL -+ PS=";" -+ FS="\\" -+ ;; -+ * ) -+ echo "Unrecognized system!" -+ exit 1; -+ ;; -+esac -+ -+JEMMYPATH=${CPAPPEND} -+CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH -+ -+THIS_DIR=`pwd` -+ -+${TESTJAVA}${FS}bin${FS}java -fullversion -+ -+${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}InternTest.java -+ -+cp ${TESTSRC}${FS}badstrings.txt . -+ -+${TESTJAVA}${FS}bin${FS}java -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 & -+C_PID=$! -+ -+sleep 60 -+ -+ps | grep ${C_PID} | grep -v grep -+ -+if [ $? = 0 ] -+then -+ kill -9 ${C_PID} -+ echo "Test Failed" -+ exit 1 + ++if [ `uname` == "OpenBSD" ] ; then ++$NM $* \ ++ | awk '{ ++ if ($2 != "U") if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";" ++ if ($2 != "U") if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";" ++ if ($2 != "U") if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";" ++ }' \ ++ | sort -u +else -+ echo "Test Passed" -+ exit 0 + $NM -Uj $* | awk ' + { if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 } + ' +fi ---- jaxp/.hgtags 2013-09-06 11:22:52.000000000 -0700 -+++ jaxp/.hgtags 2014-04-20 12:39:50.000000000 -0700 -@@ -123,6 +123,7 @@ - bcd31fa1e3c6f51b4fdd427ef905188cdac57164 jdk7-b146 - 067fb18071e3872698f6218724958bd0cebf30a3 jdk7u1-b01 - fc268cd1dd5d2e903ccd4b0275e1f9c2461ed30c jdk7-b147 -+3170972bd3928a331c4c64a5c0c9632077fb399a 7u0 - 104ca42e1e7ca66b074a4619ce6420f15d8f454d jdk7u1-b02 - 64e323faadf65018c1ffc8bb9c97f7b664e87347 jdk7u1-b03 - 2256c20e66857f80cacda14ffdbc0979c929d7f8 jdk7u1-b04 -@@ -302,6 +303,22 @@ - 5952538d55e624132f97400332a50b71880c874c jdk7u25-b09 - aa00dd983dd0f5b07269d0648a0325e9b3e0d957 jdk7u25-b10 - 0fb6d76bcd2e8d54d0a69e1c3d2a85d84b3e17a4 jdk7u25-b11 -+7b47e1a26f7cbb8d8d22ea165f2d7fbbbd354c77 jdk7u14-b16 -+77ac1ef42b2fd47cc87b9800f63efdd4cf2fa05d jdk7u14-b17 -+d47975f80a24b55410fa2e2c5f50f3405d83fe73 jdk7u14-b18 -+331e489ecb7b19fa98c60324f7ce5d168284a8c8 jdk7u14-b19 -+331e489ecb7b19fa98c60324f7ce5d168284a8c8 jdk7u14-b19 -+c3c9f04cf10c2fe576b208f6a8ca3777b1d31145 jdk7u14-b19 -+5e1fee011646b4a3ff29b7b9cdc208e0a0577cb4 jdk7u14-b20 -+d1c8bb1cbc9183fc994b5fedf26886ceda0d59f9 jdk7u14-b21 -+d1c6afebdfe28eb07eb2d03a6911a0f33b619165 jdk7u14-b22 -+0e4c549d3635122145ac88bad7b98716976ca49e jdk7u40-b23 -+d17acb2ee133811baa8eae3436a8c191fc433da1 jdk7u40-b24 -+52bcce690998b4ad91abddae118847f4358c6110 jdk7u40-b25 -+cd764ada36b50e2096ba35b4c27ca8f83b3db964 jdk7u40-b26 -+7626b3fbc822fd4efd5ba3b5fc18f2fef5749597 jdk7u40-b27 -+9186b6efd2b2eafa7fee5be1b043f59f25db12a6 jdk7u40-b28 -+740942c76fb668a04bf89feccf069f6958651d54 jdk7u40-b29 - 5e87aee78c91efa65bd5aeb37bcc1c1c637a7f0c jdk7u25-b12 - 83b80c094befd08cbac4247d9b8f12c6a039f23f jdk7u25-b13 - 68cc0d2a49f09b5c611b2775f2e66de1022bdedc jdk7u25-b14 -@@ -343,3 +360,60 @@ - 66363323f14d85d4ab28e883a3323b9d72dea5fd jdk7u40-b42 - c0bd71414ea513f54f23965936a837fca093ac91 jdk7u40-b43 - 91bc4534851265291bb3b16452a0968d6909979f jdk7u40-b60 -+c500d4ec41ff2117eabfa33e640b6df2f21deb3d jdk7u40-b61 -+9e3f8ab9d17be6b1a4a097fcc5bc5412013d3e86 jdk7u40-b62 -+1a7e2024963d3a8d6cde209de0967ac43418b82a jdk7u45-b01 -+72b314bf2ee171bec2157f737ba3bf77fbdf1118 jdk7u45-b02 -+399c58bf22ad35a3527a286123497615100746b2 jdk7u45-b03 -+e66ea9257ba8a77fc64f6f2924584b183767d82b jdk7u45-b04 -+3a6dce39c05c254aba9f3ae57c035bf3facfe8b9 jdk7u45-b05 -+a7b1dcabdebbdbf40040a1c6f8411d2f8d25bb37 jdk7u45-b06 -+abb39bc40bcc91c7f8ebc2867e98f302d9bc8417 jdk7u45-b07 -+72295e1b27e61751cc323b5e4d6781bf7afae0a4 jdk7u45-b08 -+255d92f5ed98915a025484360963d7d09bd77313 jdk7u45-b09 -+28a18e725bb39d47e920ef910f435321fb891a88 jdk7u45-b10 -+3d3b4da34d583e86a3b90b8f69927a37d40f5b57 jdk7u45-b11 -+2ac5c9749223f205cd081ecd0028b2f3ea13f8f8 jdk7u45-b12 -+18a009fdfba2bbc5036f96cbefffcdefe9580bb1 jdk7u45-b13 -+d577bae705f208661733e09a4875d79255897b7b jdk7u45-b14 -+daadec741c9bc5067897eb8803123d0af6c5ebc3 jdk7u45-b15 -+0a8b95184728548be4b20876e05f76e0262e4195 jdk7u45-b16 -+2586d303503b5bb6fd39dc0ce572d6e858caf41c jdk7u45-b17 -+4beb90ab48f7fd46c7a9afbe66f8cccb230699ba jdk7u45-b18 -+a456c78a50e201a65c9f63565c8291b84a4fbd32 jdk7u45-b30 -+3c34f244296e98d8ebb94973c752f3395612391a jdk7u45-b31 -+056494e83d15cd1c546d32a3b35bdb6f670b3876 jdk7u45-b33 -+b5a83862ed2ab9cc2de3719e38c72519481a4bbb jdk7u45-b34 -+7fda9b300e07738116b2b95b568229bdb4b31059 jdk7u45-b35 -+0a8b95184728548be4b20876e05f76e0262e4195 jdk7u51-b00 -+2450ace952f45202e5a3fd4f6a8356a196fe029e jdk7u51-b01 -+68def851cc6b17944756f1986734b323d8569571 jdk7u51-b02 -+0df316a3b3111427500a86f3282293dd566ae936 jdk7u51-b03 -+42be8e6266ab1733a890b21cf6cd6c2e1a48972d jdk7u51-b04 -+0655a95d16094971df14171e1c5f841c3a6bd081 jdk7u51-b05 -+13a15fc9b6bf7ac065958e038648fbe9952fd9fa jdk7u51-b06 -+8e4523e579bf86e514b9c82843b440cb79606b41 jdk7u51-b07 -+783ceae9b7369168216d5344475d92de910351e8 jdk7u51-b08 -+7875c882a7516366147bffcaaea550c4089f2fc7 jdk7u51-b09 -+65798d05674dc9453c5935c018d012b11c8697f8 jdk7u51-b10 -+70b5691c44d2830efd4301856e6223fa43894462 jdk7u51-b11 -+807946db29f42477e8d8390be01c7e27280bc85c jdk7u51-b12 -+114654a331e2f97a048d7ed43d06d7512e20e2c1 jdk7u51-b13 -+3161567adae93d12c64b79592bda3046f0c0a22d jdk7u51-b30 -+e85ee81daec2ea2fa21bf804d03431b0664c6dff jdk7u51-b31 -+807946db29f42477e8d8390be01c7e27280bc85c jdk7u55-b00 -+bb7779a8fc4d14719e907b8890a2665476cf45ae jdk7u55-b01 -+8275dc4db7f852edb331ae48d663d08b9ab2b5c7 jdk7u55-b02 -+381e73f93a83e8d3bfd7dbf79f4f363a8fd6442f jdk7u55-b03 -+c72c57f71c2ba6362d9ccfbf4743947b9ecefcac jdk7u55-b04 -+5592b0c44617022e3c136eedfa1e98d4f254c964 jdk7u55-b05 -+c59d714090080ad2e06f0ca5e8d354403059d8ce jdk7u55-b06 -+125ea54089add3a16898b801a9989bf6cca05da6 jdk7u55-b07 -+39337c00cb3ce29b4d67f6d247c3fa80f16cb49f jdk7u55-b08 -+537f4f609132f3d6a4ce506c98f1dbd57f1320f8 jdk7u55-b09 -+997bdd44d5de4aee319ff0a0d2892a912d9de6f5 jdk7u55-b09 -+606483a43e8b6317d84922b9ed2b2c30d9e77419 jdk7u55-b10 -+f3f02e67d867ae25cd4f3b9bc39a4fd17f593126 jdk7u55-b11 -+708a1872f5bb8ba58ecc9fcbf4e12e6fa4783998 jdk7u55-b12 -+14719f73596f5c90e3f46c0f4312f32e5b105edd jdk7u55-b13 -+01f26830f88cf4f10897416fe1f4f372efcdecf5 jdk7u55-b30 ---- jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java 2014-04-20 12:39:46.000000000 -0700 -@@ -39,33 +39,138 @@ - // - // Constants - // -- // Oracle Feature: -+ //Xerces security manager -+ public static final String SECURITY_MANAGER = -+ "http://apache.org/xml/properties/security-manager"; -+ -+ // -+ // Implementation limits: API properties -+ // -+ /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ -+ public static final String ORACLE_JAXP_PROPERTY_PREFIX = -+ "http://www.oracle.com/xml/jaxp/properties/"; - /** -- *

Use Service Mechanism

-- * -- *
    -- *
  • -+ * JDK entity expansion limit; Note that the existing system property -+ * "entityExpansionLimit" with no prefix is still observed -+ */ -+ public static final String JDK_ENTITY_EXPANSION_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit"; -+ -+ /** -+ * JDK element attribute limit; Note that the existing system property -+ * "elementAttributeLimit" with no prefix is still observed -+ */ -+ public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit"; -+ -+ /** -+ * JDK maxOccur limit; Note that the existing system property -+ * "maxOccurLimit" with no prefix is still observed -+ */ -+ public static final String JDK_MAX_OCCUR_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit"; -+ -+ /** -+ * JDK total entity size limit -+ */ -+ public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit"; -+ -+ /** -+ * JDK maximum general entity size limit -+ */ -+ public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; -+ /** -+ * JDK maximum parameter entity size limit -+ */ -+ public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit"; -+ /** -+ * JDK maximum XML name limit -+ */ -+ public static final String JDK_XML_NAME_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit"; -+ /** -+ * JDK property indicating whether the parser shall print out entity -+ * count information -+ * Value: a string "yes" means print, "no" or any other string means not. -+ */ -+ public static final String JDK_ENTITY_COUNT_INFO = -+ ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo"; -+ -+ // -+ // Implementation limits: corresponding System Properties of the above -+ // API properties -+ // -+ /** -+ * JDK entity expansion limit; Note that the existing system property -+ * "entityExpansionLimit" with no prefix is still observed -+ */ -+ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit"; -+ -+ /** -+ * JDK element attribute limit; Note that the existing system property -+ * "elementAttributeLimit" with no prefix is still observed -+ */ -+ public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit"; -+ -+ /** -+ * JDK maxOccur limit; Note that the existing system property -+ * "maxOccurLimit" with no prefix is still observed -+ */ -+ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit"; -+ -+ /** -+ * JDK total entity size limit -+ */ -+ public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit"; -+ -+ /** -+ * JDK maximum general entity size limit -+ */ -+ public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; -+ /** -+ * JDK maximum parameter entity size limit -+ */ -+ public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit"; -+ /** -+ * JDK maximum XML name limit -+ */ -+ public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit"; -+ -+ //legacy System Properties -+ public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; -+ public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; -+ public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; -+ -+ /** -+ * A string "yes" that can be used for properties such as getEntityCountInfo -+ */ -+ public static final String JDK_YES = "yes"; -+ -+ // Oracle Feature: -+ /** -+ *

    Use Service Mechanism

    -+ * -+ *
      -+ *
    • - * {@code true} instruct an object to use service mechanism to - * find a service implementation. This is the default behavior. - *
    • - *
    • - * {@code false} instruct an object to skip service mechanism and - * use the default implementation for that service. -- *
    • -- *
    -- */ -- -+ *
  • -+ *
-+ */ - public static final String ORACLE_FEATURE_SERVICE_MECHANISM = "http://www.oracle.com/feature/use-service-mechanism"; +--- ./hotspot/make/bsd/makefiles/buildtree.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/buildtree.make 2014-06-06 19:57:03.000000000 -0700 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013 Red Hat, Inc. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -59,7 +60,7 @@ + # needs to be set here since this Makefile doesn't include defs.make + OS_VENDOR:=$(shell uname -s) + +--include $(SPEC) ++include $(GAMMADIR)/make/defs.make + include $(GAMMADIR)/make/scm.make + include $(GAMMADIR)/make/altsrc.make + +@@ -215,6 +216,7 @@ + echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ + echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ + echo "OPENJDK = $(OPENJDK)"; \ ++ echo "ZERO_BUILD = $(ZERO_BUILD)"; \ + echo; \ + echo "# Used for platform dispatching"; \ + echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \ +@@ -253,6 +255,16 @@ + echo "$(call gamma-path,commonsrc,os/posix/vm)"; \ + [ -n "$(CFLAGS_BROWSE)" ] && \ + echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \ ++ [ -n "$(ENABLE_FULL_DEBUG_SYMBOLS)" ] && \ ++ echo && echo "ENABLE_FULL_DEBUG_SYMBOLS = $(ENABLE_FULL_DEBUG_SYMBOLS)"; \ ++ [ -n "$(OBJCOPY)" ] && \ ++ echo && echo "OBJCOPY = $(OBJCOPY)"; \ ++ [ -n "$(STRIP_POLICY)" ] && \ ++ echo && echo "STRIP_POLICY = $(STRIP_POLICY)"; \ ++ [ -n "$(ZIP_DEBUGINFO_FILES)" ] && \ ++ echo && echo "ZIP_DEBUGINFO_FILES = $(ZIP_DEBUGINFO_FILES)"; \ ++ [ -n "$(ZIPEXE)" ] && \ ++ echo && echo "ZIPEXE = $(ZIPEXE)"; \ + [ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \ + echo && \ + echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \ +@@ -382,7 +394,7 @@ + $(QUIETLY) ( \ + $(BUILDTREE_COMMENT); \ + echo "JDK=${JAVA_HOME}"; \ +- ) > $@ ++ ) > $@ -- /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ -- public static final String ORACLE_JAXP_PROPERTY_PREFIX = -- "http://www.oracle.com/xml/jaxp/properties/"; + .dbxrc: $(BUILDTREE_MAKE) + @echo Creating $@ ... +--- ./hotspot/make/bsd/makefiles/gcc.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/gcc.make 2014-06-06 19:56:22.000000000 -0700 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013 Red Hat, Inc. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -105,10 +106,10 @@ + VM_PICFLAG/AOUT = + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) - //System Properties corresponding to ACCESS_EXTERNAL_* properties - public static final String SP_ACCESS_EXTERNAL_STYLESHEET = "javax.xml.accessExternalStylesheet"; - public static final String SP_ACCESS_EXTERNAL_DTD = "javax.xml.accessExternalDTD"; +-ifeq ($(JVM_VARIANT_ZERO), true) ++ifeq ($(TYPE),ZERO) + CFLAGS += $(LIBFFI_CFLAGS) + endif +-ifeq ($(JVM_VARIANT_ZEROSHARK), true) ++ifeq ($(TYPE),SHARK) + CFLAGS += $(LIBFFI_CFLAGS) + CFLAGS += $(LLVM_CFLAGS) + endif +@@ -116,7 +117,10 @@ + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions + CFLAGS += -pthread +-CFLAGS += -fcheck-new ++# Clang does not support -fcheck-new ++ifeq (,$(findstring clang,$(shell $(CC) -v 2>&1))) ++ CFLAGS += -fcheck-new ++endif + # version 4 and above support fvisibility=hidden (matches jni_x86.h file) + # except 4.1.2 gives pointless warnings that can't be disabled (afaik) + ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" +@@ -214,7 +218,11 @@ -- - //all access keyword - public static final String ACCESS_EXTERNAL_ALL = "all"; + # Flags for generating make dependency flags. + ifneq ("${CC_VER_MAJOR}", "2") +-DEPFLAGS = -fpch-deps -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) ++DEPFLAGS = ++ifeq (,$(findstring clang,$(shell $(CC) -v 2>&1))) ++DEPFLAGS += -fpch-deps ++endif ++DEPFLAGS += -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) + endif ---- jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java 2014-04-20 12:39:46.000000000 -0700 -@@ -52,6 +52,8 @@ - */ - public class ExsltStrings extends ExsltBase - { -+ static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"; + # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. +--- ./hotspot/make/bsd/makefiles/jsig.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/jsig.make 2014-06-06 19:56:22.000000000 -0700 +@@ -36,9 +36,16 @@ + LIBJSIG_G = lib$(JSIG_G).so + endif + ++LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo ++LIBJSIG_DIZ = lib$(JSIG).diz ++LIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo ++LIBJSIG_G_DIZ = lib$(JSIG_G).diz + - /** - * The str:align function aligns a string within another string. - *

-@@ -225,7 +227,7 @@ - token = str.substring(fromIndex); - } + JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm -- Document doc = DocumentHolder.m_doc; -+ Document doc = getDocument(); - synchronized (doc) - { - Element element = doc.createElement("token"); -@@ -289,7 +291,7 @@ - { - StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims); + DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG) ++DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO) ++DEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ) -- Document doc = DocumentHolder.m_doc; -+ Document doc = getDocument(); - synchronized (doc) - { - while (lTokenizer.hasMoreTokens()) -@@ -305,7 +307,7 @@ - else - { + LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig -- Document doc = DocumentHolder.m_doc; -+ Document doc = getDocument(); - synchronized (doc) - { - for (int i = 0; i < toTokenize.length(); i++) -@@ -327,31 +329,23 @@ - { - return tokenize(toTokenize, " \t\n\r"); - } -+ - /** -- * This class is not loaded until first referenced (see Java Language -- * Specification by Gosling/Joy/Steele, section 12.4.1) -- * -- * The static members are created when this class is first referenced, as a -- * lazy initialization not needing checking against null or any -- * synchronization. -- * -+ * @return an instance of DOM Document - */ -- private static class DocumentHolder -- { -- // Reuse the Document object to reduce memory usage. -- private static final Document m_doc; -- static { -- try -- { -- m_doc =DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); -- } -- -- catch(ParserConfigurationException pce) -- { -- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); -+ private static Document getDocument() -+ { -+ try -+ { -+ if (System.getSecurityManager() == null) { -+ return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); -+ } else { -+ return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument(); - } -- -+ } -+ catch(ParserConfigurationException pce) -+ { -+ throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); - } - } -- - } ---- jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java 2014-04-20 12:39:46.000000000 -0700 -@@ -56,6 +56,7 @@ - */ - public class Extensions - { -+ static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"; - /** - * Constructor Extensions - * -@@ -114,23 +115,14 @@ - - // This no longer will work right since the DTM. - // Document myDoc = myProcessor.getContextNode().getOwnerDocument(); -- try -- { -- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); -- DocumentBuilder db = dbf.newDocumentBuilder(); -- Document myDoc = db.newDocument(); -+ Document myDoc = getDocument(); - -- Text textNode = myDoc.createTextNode(textNodeValue); -- DocumentFragment docFrag = myDoc.createDocumentFragment(); -+ Text textNode = myDoc.createTextNode(textNodeValue); -+ DocumentFragment docFrag = myDoc.createDocumentFragment(); - -- docFrag.appendChild(textNode); -+ docFrag.appendChild(textNode); - -- return new NodeSet(docFrag); -- } -- catch(ParserConfigurationException pce) -- { -- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); -- } -+ return new NodeSet(docFrag); - } - } - -@@ -249,8 +241,7 @@ - public static NodeList tokenize(String toTokenize, String delims) - { - -- Document doc = DocumentHolder.m_doc; -- -+ Document doc = getDocument(); +@@ -57,11 +64,33 @@ + $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) + @echo Making signal interposition lib... + $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ +- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< ++ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< + $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } ++ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ++ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO) ++ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@ ++ ifeq ($(STRIP_POLICY),all_strip) ++ $(QUIETLY) $(STRIP) $@ ++ else ++ ifeq ($(STRIP_POLICY),min_strip) ++ $(QUIETLY) $(STRIP) -S $@ ++ # implied else here is no stripping at all ++ endif ++ endif ++ [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); } ++ ifeq ($(ZIP_DEBUGINFO_FILES),1) ++ $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) ++ $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO) ++ [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); } ++ endif ++endif - StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims); - NodeSet resultSet = new NodeSet(); -@@ -308,17 +299,7 @@ - public static Node checkEnvironment(ExpressionContext myContext) - { + install_jsig: $(LIBJSIG) + @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" ++ $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ ++ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) ++ $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ ++ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) + $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done" -- Document factoryDocument; -- try -- { -- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); -- DocumentBuilder db = dbf.newDocumentBuilder(); -- factoryDocument = db.newDocument(); -- } -- catch(ParserConfigurationException pce) -- { -- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); -- } -+ Document factoryDocument = getDocument(); + .PHONY: install_jsig +--- ./hotspot/make/bsd/makefiles/launcher.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/launcher.make 2014-06-06 19:56:22.000000000 -0700 +@@ -50,7 +50,7 @@ + LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) + else + LAUNCHER.o = launcher.o +- LFLAGS_LAUNCHER += -L`pwd` ++ LFLAGS_LAUNCHER += -L`pwd` - Node resultNode = null; - try -@@ -391,30 +372,21 @@ - } + # 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-product 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/mapfile-vers-product 2014-06-06 19:56:22.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -19,235 +19,247 @@ + # 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. ++# + # +-# +-# Only used for OSX/Darwin builds - /** -- * This class is not loaded until first referenced (see Java Language -- * Specification by Gosling/Joy/Steele, section 12.4.1) -- * -- * The static members are created when this class is first referenced, as a -- * lazy initialization not needing checking against null or any -- * synchronization. -- * -+ * @return an instance of DOM Document - */ -- private static class DocumentHolder -- { -- // Reuse the Document object to reduce memory usage. -- private static final Document m_doc; -- static -+ private static Document getDocument() -+ { -+ try - { -- try -- { -- m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); -- } -- -- catch(ParserConfigurationException pce) -- { -- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); -+ if (System.getSecurityManager() == null) { -+ return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); -+ } else { -+ return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument(); - } + # Define public interface. +- # _JNI +- _JNI_CreateJavaVM +- _JNI_GetCreatedJavaVMs +- _JNI_GetDefaultJavaVMInitArgs - -+ } -+ catch(ParserConfigurationException pce) -+ { -+ throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); - } - } - } ---- jaxp/src/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java 2014-04-20 12:39:46.000000000 -0700 -@@ -54,8 +54,8 @@ - // - // Constants - // -- private static final String XALAN_INTERNAL = "com.sun.org.apache.xalan.internal"; -- private static final String XERCES_INTERNAL = "com.sun.org.apache.xerces.internal"; -+ private static final String JAXP_INTERNAL = "com.sun.org.apache"; -+ private static final String STAX_INTERNAL = "com.sun.xml.internal"; - - // name of default properties file to look for in JDK's jre/lib directory - private static final String DEFAULT_PROPERTIES_FILENAME = -@@ -497,12 +497,8 @@ - public static Class findProviderClass(String className, boolean doFallback) - throws ClassNotFoundException, ConfigurationError - { -- if (System.getSecurityManager()!=null) { -- return Class.forName(className); -- } else { -- return findProviderClass (className, -+ return findProviderClass (className, - findClassLoader (), doFallback); -- } - } - - /** -@@ -517,8 +513,8 @@ - SecurityManager security = System.getSecurityManager(); - try{ - if (security != null){ -- if (className.startsWith(XALAN_INTERNAL) || -- className.startsWith(XERCES_INTERNAL)) { -+ if (className.startsWith(JAXP_INTERNAL) || -+ className.startsWith(STAX_INTERNAL)) { - cl = null; - } else { - final int lastDot = className.lastIndexOf("."); -@@ -533,16 +529,7 @@ - - Class providerClass; - if (cl == null) { -- // XXX Use the bootstrap ClassLoader. There is no way to -- // load a class using the bootstrap ClassLoader that works -- // in both JDK 1.1 and Java 2. However, this should still -- // work b/c the following should be true: -- // -- // (cl == null) iff current ClassLoader == null -- // -- // Thus Class.forName(String) will use the current -- // ClassLoader which will be the bootstrap ClassLoader. -- providerClass = Class.forName(className); -+ providerClass = Class.forName(className, false, ObjectFactory.class.getClassLoader()); - } else { - try { - providerClass = cl.loadClass(className); ---- jaxp/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java 2014-04-20 12:39:46.000000000 -0700 -@@ -57,7 +57,7 @@ - return securitySupport; - } - -- static ClassLoader getContextClassLoader() { -+ public static ClassLoader getContextClassLoader() { - return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; ---- jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java 2014-04-20 12:39:46.000000000 -0700 -@@ -0,0 +1,449 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -+ * or packager/legal/LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at packager/legal/LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+package com.sun.org.apache.xalan.internal.utils; -+ -+import com.sun.org.apache.xalan.internal.XalanConstants; -+ +- # _JVM +- _JVM_Accept +- _JVM_ActiveProcessorCount +- _JVM_AllocateNewArray +- _JVM_AllocateNewObject +- _JVM_ArrayCopy +- _JVM_AssertionStatusDirectives +- _JVM_Available +- _JVM_Bind +- _JVM_ClassDepth +- _JVM_ClassLoaderDepth +- _JVM_Clone +- _JVM_Close +- _JVM_CX8Field +- _JVM_CompileClass +- _JVM_CompileClasses +- _JVM_CompilerCommand +- _JVM_Connect +- _JVM_ConstantPoolGetClassAt +- _JVM_ConstantPoolGetClassAtIfLoaded +- _JVM_ConstantPoolGetDoubleAt +- _JVM_ConstantPoolGetFieldAt +- _JVM_ConstantPoolGetFieldAtIfLoaded +- _JVM_ConstantPoolGetFloatAt +- _JVM_ConstantPoolGetIntAt +- _JVM_ConstantPoolGetLongAt +- _JVM_ConstantPoolGetMethodAt +- _JVM_ConstantPoolGetMethodAtIfLoaded +- _JVM_ConstantPoolGetMemberRefInfoAt +- _JVM_ConstantPoolGetSize +- _JVM_ConstantPoolGetStringAt +- _JVM_ConstantPoolGetUTF8At +- _JVM_CountStackFrames +- _JVM_CurrentClassLoader +- _JVM_CurrentLoadedClass +- _JVM_CurrentThread +- _JVM_CurrentTimeMillis +- _JVM_DefineClass +- _JVM_DefineClassWithSource +- _JVM_DefineClassWithSourceCond +- _JVM_DesiredAssertionStatus +- _JVM_DisableCompiler +- _JVM_DoPrivileged +- _JVM_DTraceGetVersion +- _JVM_DTraceActivate +- _JVM_DTraceIsProbeEnabled +- _JVM_DTraceIsSupported +- _JVM_DTraceDispose +- _JVM_DumpAllStacks +- _JVM_DumpThreads +- _JVM_EnableCompiler +- _JVM_Exit +- _JVM_FillInStackTrace +- _JVM_FindClassFromClass +- _JVM_FindClassFromClassLoader +- _JVM_FindClassFromBootLoader +- _JVM_FindLibraryEntry +- _JVM_FindLoadedClass +- _JVM_FindPrimitiveClass +- _JVM_FindSignal +- _JVM_FreeMemory +- _JVM_GC +- _JVM_GetAllThreads +- _JVM_GetArrayElement +- _JVM_GetArrayLength +- _JVM_GetCPClassNameUTF +- _JVM_GetCPFieldClassNameUTF +- _JVM_GetCPFieldModifiers +- _JVM_GetCPFieldNameUTF +- _JVM_GetCPFieldSignatureUTF +- _JVM_GetCPMethodClassNameUTF +- _JVM_GetCPMethodModifiers +- _JVM_GetCPMethodNameUTF +- _JVM_GetCPMethodSignatureUTF +- _JVM_GetCallerClass +- _JVM_GetClassAccessFlags +- _JVM_GetClassAnnotations +- _JVM_GetClassCPEntriesCount +- _JVM_GetClassCPTypes +- _JVM_GetClassConstantPool +- _JVM_GetClassContext +- _JVM_GetClassDeclaredConstructors +- _JVM_GetClassDeclaredFields +- _JVM_GetClassDeclaredMethods +- _JVM_GetClassFieldsCount +- _JVM_GetClassInterfaces +- _JVM_GetClassLoader +- _JVM_GetClassMethodsCount +- _JVM_GetClassModifiers +- _JVM_GetClassName +- _JVM_GetClassNameUTF +- _JVM_GetClassSignature +- _JVM_GetClassSigners +- _JVM_GetComponentType +- _JVM_GetDeclaredClasses +- _JVM_GetDeclaringClass +- _JVM_GetEnclosingMethodInfo +- _JVM_GetFieldAnnotations +- _JVM_GetFieldIxModifiers +- _JVM_GetHostName +- _JVM_GetInheritedAccessControlContext +- _JVM_GetInterfaceVersion +- _JVM_GetLastErrorString +- _JVM_GetManagement +- _JVM_GetMethodAnnotations +- _JVM_GetMethodDefaultAnnotationValue +- _JVM_GetMethodIxArgsSize +- _JVM_GetMethodIxByteCode +- _JVM_GetMethodIxByteCodeLength +- _JVM_GetMethodIxExceptionIndexes +- _JVM_GetMethodIxExceptionTableEntry +- _JVM_GetMethodIxExceptionTableLength +- _JVM_GetMethodIxExceptionsCount +- _JVM_GetMethodIxLocalsCount +- _JVM_GetMethodIxMaxStack +- _JVM_GetMethodIxModifiers +- _JVM_GetMethodIxNameUTF +- _JVM_GetMethodIxSignatureUTF +- _JVM_GetMethodParameterAnnotations +- _JVM_GetPrimitiveArrayElement +- _JVM_GetProtectionDomain +- _JVM_GetSockName +- _JVM_GetSockOpt +- _JVM_GetStackAccessControlContext +- _JVM_GetStackTraceDepth +- _JVM_GetStackTraceElement +- _JVM_GetSystemPackage +- _JVM_GetSystemPackages +- _JVM_GetThreadStateNames +- _JVM_GetThreadStateValues +- _JVM_GetVersionInfo +- _JVM_Halt +- _JVM_HoldsLock +- _JVM_IHashCode +- _JVM_InitAgentProperties +- _JVM_InitProperties +- _JVM_InitializeCompiler +- _JVM_InitializeSocketLibrary +- _JVM_InternString +- _JVM_Interrupt +- _JVM_InvokeMethod +- _JVM_IsArrayClass +- _JVM_IsConstructorIx +- _JVM_IsInterface +- _JVM_IsInterrupted +- _JVM_IsNaN +- _JVM_IsPrimitiveClass +- _JVM_IsSameClassPackage +- _JVM_IsSilentCompiler +- _JVM_IsSupportedJNIVersion +- _JVM_IsThreadAlive +- _JVM_LatestUserDefinedLoader +- _JVM_Listen +- _JVM_LoadClass0 +- _JVM_LoadLibrary +- _JVM_Lseek +- _JVM_MaxObjectInspectionAge +- _JVM_MaxMemory +- _JVM_MonitorNotify +- _JVM_MonitorNotifyAll +- _JVM_MonitorWait +- _JVM_NanoTime +- _JVM_NativePath +- _JVM_NewArray +- _JVM_NewInstanceFromConstructor +- _JVM_NewMultiArray +- _JVM_OnExit +- _JVM_Open +- _JVM_PrintStackTrace +- _JVM_RaiseSignal +- _JVM_RawMonitorCreate +- _JVM_RawMonitorDestroy +- _JVM_RawMonitorEnter +- _JVM_RawMonitorExit +- _JVM_Read +- _JVM_Recv +- _JVM_RecvFrom +- _JVM_RegisterSignal +- _JVM_ReleaseUTF +- _JVM_ResolveClass +- _JVM_ResumeThread +- _JVM_Send +- _JVM_SendTo +- _JVM_SetArrayElement +- _JVM_SetClassSigners +- _JVM_SetLength +- _JVM_SetNativeThreadName +- _JVM_SetPrimitiveArrayElement +- _JVM_SetProtectionDomain +- _JVM_SetSockOpt +- _JVM_SetThreadPriority +- _JVM_Sleep +- _JVM_Socket +- _JVM_SocketAvailable +- _JVM_SocketClose +- _JVM_SocketShutdown +- _JVM_StartThread +- _JVM_StopThread +- _JVM_SuspendThread +- _JVM_SupportsCX8 +- _JVM_Sync +- _JVM_Timeout +- _JVM_TotalMemory +- _JVM_TraceInstructions +- _JVM_TraceMethodCalls +- _JVM_UnloadLibrary +- _JVM_Write +- _JVM_Yield +- _JVM_handle_bsd_signal + -+/** -+ * This class is not the same as that in Xerces. It is used to manage the -+ * state of corresponding Xerces properties and pass the values over to -+ * the Xerces Security Manager. -+ * -+ * @author Joe Wang Oracle Corp. -+ * -+ */ -+public final class XMLSecurityManager { ++SUNWprivate_1.1 { ++ global: ++ # JNI ++ JNI_CreateJavaVM; ++ JNI_GetCreatedJavaVMs; ++ JNI_GetDefaultJavaVMInitArgs; + -+ /** -+ * States of the settings of a property, in the order: default value, value -+ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system -+ * properties, and jaxp api properties -+ */ -+ public static enum State { -+ //this order reflects the overriding order ++ # JVM ++ JVM_Accept; ++ JVM_ActiveProcessorCount; ++ JVM_AllocateNewArray; ++ JVM_AllocateNewObject; ++ JVM_ArrayCopy; ++ JVM_AssertionStatusDirectives; ++ JVM_Available; ++ JVM_Bind; ++ JVM_ClassDepth; ++ JVM_ClassLoaderDepth; ++ JVM_Clone; ++ JVM_Close; ++ JVM_CX8Field; ++ JVM_CompileClass; ++ JVM_CompileClasses; ++ JVM_CompilerCommand; ++ JVM_Connect; ++ JVM_ConstantPoolGetClassAt; ++ JVM_ConstantPoolGetClassAtIfLoaded; ++ JVM_ConstantPoolGetDoubleAt; ++ JVM_ConstantPoolGetFieldAt; ++ JVM_ConstantPoolGetFieldAtIfLoaded; ++ JVM_ConstantPoolGetFloatAt; ++ JVM_ConstantPoolGetIntAt; ++ JVM_ConstantPoolGetLongAt; ++ JVM_ConstantPoolGetMethodAt; ++ JVM_ConstantPoolGetMethodAtIfLoaded; ++ JVM_ConstantPoolGetMemberRefInfoAt; ++ JVM_ConstantPoolGetSize; ++ JVM_ConstantPoolGetStringAt; ++ JVM_ConstantPoolGetUTF8At; ++ JVM_CountStackFrames; ++ JVM_CurrentClassLoader; ++ JVM_CurrentLoadedClass; ++ JVM_CurrentThread; ++ JVM_CurrentTimeMillis; ++ JVM_DefineClass; ++ JVM_DefineClassWithSource; ++ JVM_DefineClassWithSourceCond; ++ JVM_DesiredAssertionStatus; ++ JVM_DisableCompiler; ++ JVM_DoPrivileged; ++ JVM_DTraceGetVersion; ++ JVM_DTraceActivate; ++ JVM_DTraceIsProbeEnabled; ++ JVM_DTraceIsSupported; ++ JVM_DTraceDispose; ++ JVM_DumpAllStacks; ++ JVM_DumpThreads; ++ JVM_EnableCompiler; ++ JVM_Exit; ++ JVM_FillInStackTrace; ++ JVM_FindClassFromClass; ++ JVM_FindClassFromClassLoader; ++ JVM_FindClassFromBootLoader; ++ JVM_FindLibraryEntry; ++ JVM_FindLoadedClass; ++ JVM_FindPrimitiveClass; ++ JVM_FindSignal; ++ JVM_FreeMemory; ++ JVM_GC; ++ JVM_GetAllThreads; ++ JVM_GetArrayElement; ++ JVM_GetArrayLength; ++ JVM_GetCPClassNameUTF; ++ JVM_GetCPFieldClassNameUTF; ++ JVM_GetCPFieldModifiers; ++ JVM_GetCPFieldNameUTF; ++ JVM_GetCPFieldSignatureUTF; ++ JVM_GetCPMethodClassNameUTF; ++ JVM_GetCPMethodModifiers; ++ JVM_GetCPMethodNameUTF; ++ JVM_GetCPMethodSignatureUTF; ++ JVM_GetCallerClass; ++ JVM_GetClassAccessFlags; ++ JVM_GetClassAnnotations; ++ JVM_GetClassCPEntriesCount; ++ JVM_GetClassCPTypes; ++ JVM_GetClassConstantPool; ++ JVM_GetClassContext; ++ JVM_GetClassDeclaredConstructors; ++ JVM_GetClassDeclaredFields; ++ JVM_GetClassDeclaredMethods; ++ JVM_GetClassFieldsCount; ++ JVM_GetClassInterfaces; ++ JVM_GetClassLoader; ++ JVM_GetClassMethodsCount; ++ JVM_GetClassModifiers; ++ JVM_GetClassName; ++ JVM_GetClassNameUTF; ++ JVM_GetClassSignature; ++ JVM_GetClassSigners; ++ JVM_GetComponentType; ++ JVM_GetDeclaredClasses; ++ JVM_GetDeclaringClass; ++ JVM_GetEnclosingMethodInfo; ++ JVM_GetFieldAnnotations; ++ JVM_GetFieldIxModifiers; ++ JVM_GetHostName; ++ JVM_GetInheritedAccessControlContext; ++ JVM_GetInterfaceVersion; ++ JVM_GetLastErrorString; ++ JVM_GetManagement; ++ JVM_GetMethodAnnotations; ++ JVM_GetMethodDefaultAnnotationValue; ++ JVM_GetMethodIxArgsSize; ++ JVM_GetMethodIxByteCode; ++ JVM_GetMethodIxByteCodeLength; ++ JVM_GetMethodIxExceptionIndexes; ++ JVM_GetMethodIxExceptionTableEntry; ++ JVM_GetMethodIxExceptionTableLength; ++ JVM_GetMethodIxExceptionsCount; ++ JVM_GetMethodIxLocalsCount; ++ JVM_GetMethodIxMaxStack; ++ JVM_GetMethodIxModifiers; ++ JVM_GetMethodIxNameUTF; ++ JVM_GetMethodIxSignatureUTF; ++ JVM_GetMethodParameterAnnotations; ++ JVM_GetPrimitiveArrayElement; ++ JVM_GetProtectionDomain; ++ JVM_GetSockName; ++ JVM_GetSockOpt; ++ JVM_GetStackAccessControlContext; ++ JVM_GetStackTraceDepth; ++ JVM_GetStackTraceElement; ++ JVM_GetSystemPackage; ++ JVM_GetSystemPackages; ++ JVM_GetThreadStateNames; ++ JVM_GetThreadStateValues; ++ JVM_GetVersionInfo; ++ JVM_Halt; ++ JVM_HoldsLock; ++ JVM_IHashCode; ++ JVM_InitAgentProperties; ++ JVM_InitProperties; ++ JVM_InitializeCompiler; ++ JVM_InitializeSocketLibrary; ++ JVM_InternString; ++ JVM_Interrupt; ++ JVM_InvokeMethod; ++ JVM_IsArrayClass; ++ JVM_IsConstructorIx; ++ JVM_IsInterface; ++ JVM_IsInterrupted; ++ JVM_IsNaN; ++ JVM_IsPrimitiveClass; ++ JVM_IsSameClassPackage; ++ JVM_IsSilentCompiler; ++ JVM_IsSupportedJNIVersion; ++ JVM_IsThreadAlive; ++ JVM_LatestUserDefinedLoader; ++ JVM_Listen; ++ JVM_LoadClass0; ++ JVM_LoadLibrary; ++ JVM_Lseek; ++ JVM_MaxObjectInspectionAge; ++ JVM_MaxMemory; ++ JVM_MonitorNotify; ++ JVM_MonitorNotifyAll; ++ JVM_MonitorWait; ++ JVM_NanoTime; ++ JVM_NativePath; ++ JVM_NewArray; ++ JVM_NewInstanceFromConstructor; ++ JVM_NewMultiArray; ++ JVM_OnExit; ++ JVM_Open; ++ JVM_PrintStackTrace; ++ JVM_RaiseSignal; ++ JVM_RawMonitorCreate; ++ JVM_RawMonitorDestroy; ++ JVM_RawMonitorEnter; ++ JVM_RawMonitorExit; ++ JVM_Read; ++ JVM_Recv; ++ JVM_RecvFrom; ++ JVM_RegisterSignal; ++ JVM_ReleaseUTF; ++ JVM_ResolveClass; ++ JVM_ResumeThread; ++ JVM_Send; ++ JVM_SendTo; ++ JVM_SetArrayElement; ++ JVM_SetClassSigners; ++ JVM_SetLength; ++ JVM_SetNativeThreadName; ++ JVM_SetPrimitiveArrayElement; ++ JVM_SetProtectionDomain; ++ JVM_SetSockOpt; ++ JVM_SetThreadPriority; ++ JVM_Sleep; ++ JVM_Socket; ++ JVM_SocketAvailable; ++ JVM_SocketClose; ++ JVM_SocketShutdown; ++ JVM_StartThread; ++ JVM_StopThread; ++ JVM_SuspendThread; ++ JVM_SupportsCX8; ++ JVM_Sync; ++ JVM_Timeout; ++ JVM_TotalMemory; ++ JVM_TraceInstructions; ++ JVM_TraceMethodCalls; ++ JVM_UnloadLibrary; ++ JVM_Write; ++ JVM_Yield; ++ JVM_handle_bsd_signal; + + # miscellaneous functions +- _jio_fprintf +- _jio_printf +- _jio_snprintf +- _jio_vfprintf +- _jio_vsnprintf ++ jio_fprintf; ++ jio_printf; ++ jio_snprintf; ++ jio_vfprintf; ++ jio_vsnprintf; ++ fork1; ++ numa_warn; ++ numa_error; + -+ DEFAULT("default"), FSP("FEATURE_SECURE_PROCESSING"), -+ JAXPDOTPROPERTIES("jaxp.properties"), SYSTEMPROPERTY("system property"), -+ APIPROPERTY("property"); ++ # Needed because there is no JVM interface for this. ++ sysThreadAvailableStackWithSlack; + + # This is for Forte Analyzer profiling support. +- _AsyncGetCallTrace ++ AsyncGetCallTrace; + -+ final String literal; -+ State(String literal) { -+ this.literal = literal; -+ } ++ # INSERT VTABLE SYMBOLS HERE + +- # INSERT VTABLE SYMBOLS HERE ++ local: ++ *; ++}; + +--- ./hotspot/make/bsd/makefiles/ppc.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/ppc.make 2014-06-06 19:56:22.000000000 -0700 +@@ -28,3 +28,6 @@ + # Must also specify if CPU is big endian + CFLAGS += -DVM_BIG_ENDIAN + ++ifdef E500V2 ++ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1 ++endif +--- ./hotspot/make/bsd/makefiles/saproc.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/saproc.make 2014-06-06 19:56:22.000000000 -0700 +@@ -36,6 +36,11 @@ + LIBSAPROC_G = lib$(SAPROC_G).so + endif + ++LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo ++LIBSAPROC_DIZ = lib$(SAPROC).diz ++LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo ++LIBSAPROC_G_DIZ = lib$(SAPROC_G).diz + -+ String literal() { -+ return literal; -+ } -+ } + AGENT_DIR = $(GAMMADIR)/agent + + SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) +@@ -66,7 +71,9 @@ + + SAMAPFILE = $(SASRCDIR)/mapfile + +-DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) ++DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) ++DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) ++DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ) + + # DEBUG_BINARIES overrides everything, use full -g debug information + ifeq ($(DEBUG_BINARIES), true) +@@ -114,10 +121,32 @@ + -o $@ \ + $(SALIBS) + $(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } ++ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ++ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) ++ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ ++ ifeq ($(STRIP_POLICY),all_strip) ++ $(QUIETLY) $(STRIP) $@ ++ else ++ ifeq ($(STRIP_POLICY),min_strip) ++ $(QUIETLY) $(STRIP) -S $@ ++ # implied else here is no stripping at all ++ endif ++ endif ++ [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); } ++ ifeq ($(ZIP_DEBUGINFO_FILES),1) ++ $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) ++ $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO) ++ [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); } ++ endif ++endif + + install_saproc: $(BUILDLIBSAPROC) + $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ + echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ ++ test -f $(LIBSAPROC_DEBUGINFO) && \ ++ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ ++ test -f $(LIBSAPROC_DIZ) && \ ++ cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ + cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ + fi + +--- ./hotspot/make/bsd/makefiles/vm.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/bsd/makefiles/vm.make 2014-06-06 19:56:22.000000000 -0700 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013 Red Hat, Inc. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -42,7 +43,9 @@ + -include $(DEP_DIR)/*.d + + # read machine-specific adjustments (%%% should do this via buildtree.make?) +-ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true) ++ifeq ($(TYPE),ZERO) ++ include $(MAKEFILES_DIR)/zeroshark.make ++else ifeq ($(TYPE),SHARK) + include $(MAKEFILES_DIR)/zeroshark.make + else + include $(MAKEFILES_DIR)/$(BUILDARCH).make +@@ -271,10 +274,10 @@ + + LIBS_VM += $(LIBS) + endif +-ifeq ($(JVM_VARIANT_ZERO), true) ++ifeq ($(TYPE),ZERO) + LIBS_VM += $(LIBFFI_LIBS) + endif +-ifeq ($(JVM_VARIANT_ZEROSHARK), true) ++ifeq ($(TYPE),SHARK) + LIBS_VM += $(LIBFFI_LIBS) $(LLVM_LIBS) + LFLAGS_VM += $(LLVM_LDFLAGS) + endif +--- ./hotspot/make/hotspot_version 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/hotspot_version 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. + # 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,11 +31,11 @@ + # + + # Don't put quotes (fail windows build). +-HOTSPOT_VM_COPYRIGHT=Copyright 2013 ++HOTSPOT_VM_COPYRIGHT=Copyright 2014 + + HS_MAJOR_VER=24 +-HS_MINOR_VER=0 +-HS_BUILD_NUMBER=56 ++HS_MINOR_VER=60 ++HS_BUILD_NUMBER=09 + + JDK_MAJOR_VER=1 + JDK_MINOR_VER=7 +--- ./hotspot/make/linux/makefiles/arm.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/linux/makefiles/arm.make 2014-04-19 01:27:07.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + # 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 @@ + + Obj_Files += linux_arm.o + +-LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a ++ifneq ($(EXT_LIBS_PATH),) ++ LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a ++endif + + CFLAGS += -DVM_LITTLE_ENDIAN +--- ./hotspot/make/linux/makefiles/buildtree.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/linux/makefiles/buildtree.make 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013 Red Hat, Inc. + # 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,7 +57,7 @@ + # The makefiles are split this way so that "make foo" will run faster by not + # having to read the dependency files for the vm. + +--include $(SPEC) ++include $(GAMMADIR)/make/defs.make + include $(GAMMADIR)/make/scm.make + include $(GAMMADIR)/make/altsrc.make + +@@ -208,6 +209,7 @@ + echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \ + echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \ + echo "OPENJDK = $(OPENJDK)"; \ ++ echo "ZERO_BUILD = $(ZERO_BUILD)"; \ + echo; \ + echo "# Used for platform dispatching"; \ + echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \ +--- ./hotspot/make/linux/makefiles/gcc.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/linux/makefiles/gcc.make 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013 Red Hat, Inc. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -72,10 +73,10 @@ + VM_PICFLAG/AOUT = + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) + +-ifeq ($(JVM_VARIANT_ZERO), true) ++ifeq ($(TYPE),ZERO) + CFLAGS += $(LIBFFI_CFLAGS) + endif +-ifeq ($(JVM_VARIANT_ZEROSHARK), true) ++ifeq ($(TYPE),SHARK) + CFLAGS += $(LIBFFI_CFLAGS) + CFLAGS += $(LLVM_CFLAGS) + endif +--- ./hotspot/make/linux/makefiles/vm.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/linux/makefiles/vm.make 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,6 @@ + # + # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013 Red Hat, Inc. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -42,7 +43,9 @@ + -include $(DEP_DIR)/*.d + + # read machine-specific adjustments (%%% should do this via buildtree.make?) +-ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true) ++ifeq ($(TYPE),ZERO) ++ include $(MAKEFILES_DIR)/zeroshark.make ++else ifeq ($(TYPE),SHARK) + include $(MAKEFILES_DIR)/zeroshark.make + else + include $(MAKEFILES_DIR)/$(BUILDARCH).make +@@ -244,7 +247,7 @@ + vm.def: $(Res_Files) $(Obj_Files) + sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@ + +-ifeq ($(JVM_VARIANT_ZEROSHARK), true) ++ifeq ($(TYPE),SHARK) + STATIC_CXX = false + else + ifeq ($(ZERO_LIBARCH), ppc64) +@@ -276,10 +279,10 @@ + + LIBS_VM += $(LIBS) + endif +-ifeq ($(JVM_VARIANT_ZERO), true) ++ifeq ($(TYPE),ZERO) + LIBS_VM += $(LIBFFI_LIBS) + endif +-ifeq ($(JVM_VARIANT_ZEROSHARK), true) ++ifeq ($(TYPE),SHARK) + LIBS_VM += $(LIBFFI_LIBS) $(LLVM_LIBS) + LFLAGS_VM += $(LLVM_LDFLAGS) + endif +--- ./hotspot/make/solaris/makefiles/defs.make 2013-09-06 11:22:00.000000000 -0700 ++++ ./hotspot/make/solaris/makefiles/defs.make 2014-06-06 19:56:22.000000000 -0700 +@@ -221,8 +221,8 @@ + endif + ifeq ($(JVM_VARIANT_CLIENT),true) + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX) + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX) + ifeq ($(ARCH_DATA_MODEL),32) + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) +--- ./hotspot/make/windows/makefiles/compile.make 2013-09-06 11:22:01.000000000 -0700 ++++ ./hotspot/make/windows/makefiles/compile.make 2013-12-01 11:14:01.000000000 -0800 +@@ -172,6 +172,7 @@ + PRODUCT_OPT_OPTION = /O2 /Oy- + FASTDEBUG_OPT_OPTION = /O2 /Oy- + DEBUG_OPT_OPTION = /Od ++SAFESEH_FLAG = /SAFESEH + !endif + + !if "$(COMPILER_NAME)" == "VS2005" +@@ -190,6 +191,7 @@ + !if "x$(MT)" == "x" + MT=mt.exe + !endif ++SAFESEH_FLAG = /SAFESEH + !endif + + !if "$(COMPILER_NAME)" == "VS2008" +@@ -203,6 +205,7 @@ + !if "x$(MT)" == "x" + MT=mt.exe + !endif ++SAFESEH_FLAG = /SAFESEH + !endif + + !if "$(COMPILER_NAME)" == "VS2010" +@@ -216,9 +219,11 @@ + !if "x$(MT)" == "x" + MT=mt.exe + !endif +-!if "$(BUILDARCH)" == "i486" +-LD_FLAGS = /SAFESEH $(LD_FLAGS) ++SAFESEH_FLAG = /SAFESEH + !endif + -+ /** -+ * Limits managed by the security manager -+ */ -+ public static enum Limit { ++!if "$(BUILDARCH)" == "i486" ++LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS) + !endif + + # If NO_OPTIMIZATIONS is defined in the environment, turn everything off +--- ./hotspot/make/windows/makefiles/sa.make 2013-09-06 11:22:01.000000000 -0700 ++++ ./hotspot/make/windows/makefiles/sa.make 2013-12-01 11:14:01.000000000 -0800 +@@ -107,6 +107,9 @@ + !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" + SA_LFLAGS = $(SA_LFLAGS) -map -debug + !endif ++!if "$(BUILDARCH)" == "i486" ++SA_LFLAGS = $(SAFESEH_FLAG) $(SA_LFLAGS) ++!endif + + # Note that we do not keep sawindbj.obj around as it would then + # get included in the dumpbin command in build_vm_def.sh +--- ./hotspot/src/cpu/sparc/vm/assembler_sparc.cpp 2013-09-06 11:22:01.000000000 -0700 ++++ ./hotspot/src/cpu/sparc/vm/assembler_sparc.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -4512,7 +4512,7 @@ + #define __ masm. + address start = __ pc(); + +- Label not_already_dirty, restart, refill; ++ Label not_already_dirty, restart, refill, young_card; + + #ifdef _LP64 + __ srlx(O0, CardTableModRefBS::card_shift, O0); +@@ -4523,9 +4523,15 @@ + __ set(addrlit, O1); // O1 := + __ ldub(O0, O1, O2); // O2 := [O0 + O1] + ++ __ cmp_and_br_short(O2, G1SATBCardTableModRefBS::g1_young_card_val(), Assembler::equal, Assembler::pt, young_card); ++ ++ __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad)); ++ __ ldub(O0, O1, O2); // O2 := [O0 + O1] ++ + assert(CardTableModRefBS::dirty_card_val() == 0, "otherwise check this code"); + __ cmp_and_br_short(O2, G0, Assembler::notEqual, Assembler::pt, not_already_dirty); + ++ __ bind(young_card); + // We didn't take the branch, so we're already dirty: return. + // Use return-from-leaf + __ retl(); +--- ./hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp 2013-09-06 11:22:01.000000000 -0700 ++++ ./hotspot/src/cpu/sparc/vm/c1_Runtime1_sparc.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -36,6 +36,9 @@ + #include "runtime/signature.hpp" + #include "runtime/vframeArray.hpp" + #include "vmreg_sparc.inline.hpp" ++#ifndef SERIALGC ++#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" ++#endif + + // Implementation of StubAssembler + +@@ -898,7 +901,7 @@ + Register tmp2 = G3_scratch; + jbyte* byte_map_base = ((CardTableModRefBS*)bs)->byte_map_base; + +- Label not_already_dirty, restart, refill; ++ Label not_already_dirty, restart, refill, young_card; + + #ifdef _LP64 + __ srlx(addr, CardTableModRefBS::card_shift, addr); +@@ -910,9 +913,15 @@ + __ set(rs, cardtable); // cardtable := + __ ldub(addr, cardtable, tmp); // tmp := [addr + cardtable] + ++ __ cmp_and_br_short(tmp, G1SATBCardTableModRefBS::g1_young_card_val(), Assembler::equal, Assembler::pt, young_card); + -+ ENTITY_EXPANSION_LIMIT(XalanConstants.JDK_ENTITY_EXPANSION_LIMIT, -+ XalanConstants.SP_ENTITY_EXPANSION_LIMIT, 0, 64000), -+ MAX_OCCUR_NODE_LIMIT(XalanConstants.JDK_MAX_OCCUR_LIMIT, -+ XalanConstants.SP_MAX_OCCUR_LIMIT, 0, 5000), -+ ELEMENT_ATTRIBUTE_LIMIT(XalanConstants.JDK_ELEMENT_ATTRIBUTE_LIMIT, -+ XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), -+ TOTAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_TOTAL_ENTITY_SIZE_LIMIT, -+ XalanConstants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), -+ GENEAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENEAL_ENTITY_SIZE_LIMIT, -+ XalanConstants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), -+ PARAMETER_ENTITY_SIZE_LIMIT(XalanConstants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, -+ XalanConstants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); ++ __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad)); ++ __ ldub(addr, cardtable, tmp); // tmp := [addr + cardtable] + -+ final String apiProperty; -+ final String systemProperty; -+ final int defaultValue; -+ final int secureValue; + assert(CardTableModRefBS::dirty_card_val() == 0, "otherwise check this code"); + __ cmp_and_br_short(tmp, G0, Assembler::notEqual, Assembler::pt, not_already_dirty); + ++ __ bind(young_card); + // We didn't take the branch, so we're already dirty: return. + // Use return-from-leaf + __ retl(); +--- ./hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2014-06-06 19:56:22.000000000 -0700 +@@ -71,7 +71,11 @@ + define_pd_global(bool, RewriteBytecodes, true); + define_pd_global(bool, RewriteFrequentPairs, true); + ++#ifdef _ALLBSD_SOURCE ++define_pd_global(bool, UseMembar, true); ++#else + define_pd_global(bool, UseMembar, false); ++#endif + + // GC Ergo Flags + define_pd_global(intx, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread +--- ./hotspot/src/cpu/sparc/vm/sparc.ad 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/sparc/vm/sparc.ad 2014-06-06 19:56:20.000000000 -0700 +@@ -3399,8 +3399,8 @@ + interface(CONST_INTER); + %} + +-// Unsigned (positive) Integer Immediate: 13-bit +-operand immU13() %{ ++// Unsigned Integer Immediate: 12-bit (non-negative that fits in simm13) ++operand immU12() %{ + predicate((0 <= n->get_int()) && Assembler::is_simm13(n->get_int())); + match(ConI); + op_cost(0); +@@ -3436,6 +3436,17 @@ + interface(CONST_INTER); + %} + ++// Int Immediate non-negative ++operand immU31() ++%{ ++ predicate(n->get_int() >= 0); ++ match(ConI); ++ ++ op_cost(0); ++ format %{ %} ++ interface(CONST_INTER); ++%} ++ + // Integer Immediate: 0-bit + operand immI0() %{ + predicate(n->get_int() == 0); +@@ -5732,7 +5743,6 @@ + effect(TEMP dst, TEMP tmp); + ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST); + +- size((3+1)*4); // set may use two instructions. + format %{ "LDUH $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t" + "SET $mask,$tmp\n\t" + "AND $dst,$tmp,$dst" %} +@@ -5854,13 +5864,13 @@ + ins_pipe(iload_mem); + %} + +-// Load Integer with a 13-bit mask into a Long Register +-instruct loadI2L_immI13(iRegL dst, memory mem, immI13 mask) %{ ++// Load Integer with a 12-bit mask into a Long Register ++instruct loadI2L_immU12(iRegL dst, memory mem, immU12 mask) %{ + match(Set dst (ConvI2L (AndI (LoadI mem) mask))); + ins_cost(MEMORY_REF_COST + DEFAULT_COST); + + size(2*4); +- format %{ "LDUW $mem,$dst\t! int & 13-bit mask -> long\n\t" ++ format %{ "LDUW $mem,$dst\t! int & 12-bit mask -> long\n\t" + "AND $dst,$mask,$dst" %} + ins_encode %{ + Register Rdst = $dst$$Register; +@@ -5870,14 +5880,13 @@ + ins_pipe(iload_mem); + %} + +-// Load Integer with a 32-bit mask into a Long Register +-instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{ ++// Load Integer with a 31-bit mask into a Long Register ++instruct loadI2L_immU31(iRegL dst, memory mem, immU31 mask, iRegL tmp) %{ + match(Set dst (ConvI2L (AndI (LoadI mem) mask))); + effect(TEMP dst, TEMP tmp); + ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST); + +- size((3+1)*4); // set may use two instructions. +- format %{ "LDUW $mem,$dst\t! int & 32-bit mask -> long\n\t" ++ format %{ "LDUW $mem,$dst\t! int & 31-bit mask -> long\n\t" + "SET $mask,$tmp\n\t" + "AND $dst,$tmp,$dst" %} + ins_encode %{ +@@ -8919,7 +8928,7 @@ + ins_pipe(ialu_cconly_reg_reg); + %} + +-instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU13 op2 ) %{ ++instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU12 op2 ) %{ + match(Set icc (CmpU op1 op2)); + + size(4); +--- ./hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1873,6 +1873,25 @@ + if (ProfileInterpreter) { + __ set_method_data_pointer_for_bcp(); + } + -+ Limit(String apiProperty, String systemProperty, int value, int secureValue) { -+ this.apiProperty = apiProperty; -+ this.systemProperty = systemProperty; -+ this.defaultValue = value; -+ this.secureValue = secureValue; -+ } ++ if (EnableInvokeDynamic) { ++ Label L_done; + -+ public boolean equalsAPIPropertyName(String propertyName) { -+ return (propertyName == null) ? false : apiProperty.equals(propertyName); -+ } ++ __ ldub(Address(Lbcp, 0), G1_scratch); // Load current bytecode ++ __ cmp_and_br_short(G1_scratch, Bytecodes::_invokestatic, Assembler::notEqual, Assembler::pn, L_done); + -+ public boolean equalsSystemPropertyName(String propertyName) { -+ return (propertyName == null) ? false : systemProperty.equals(propertyName); -+ } ++ // The member name argument must be restored if _invokestatic is re-executed after a PopFrame call. ++ // Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL. + -+ public String apiProperty() { -+ return apiProperty; -+ } ++ __ call_VM(G1_scratch, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), I0, Lmethod, Lbcp); + -+ String systemProperty() { -+ return systemProperty; -+ } ++ __ br_null(G1_scratch, false, Assembler::pn, L_done); ++ __ delayed()->nop(); + -+ int defaultValue() { -+ return defaultValue; -+ } ++ __ st_ptr(G1_scratch, Lesp, wordSize); ++ __ bind(L_done); ++ } + -+ int secureValue() { -+ return secureValue; -+ } -+ } + // Resume bytecode interpretation at the current bcp + __ dispatch_next(vtos); + // end of JVMTI PopFrame support +--- ./hotspot/src/cpu/x86/vm/assembler_x86.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/assembler_x86.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -8754,13 +8754,18 @@ + const Register card_addr = tmp; + lea(card_addr, as_Address(ArrayAddress(cardtable, index))); + #endif +- cmpb(Address(card_addr, 0), 0); ++ cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val()); + jcc(Assembler::equal, done); + ++ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad)); ++ cmpb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val()); ++ jcc(Assembler::equal, done); + -+ /** -+ * Map old property names with the new ones -+ */ -+ public static enum NameMap { -+ -+ ENTITY_EXPANSION_LIMIT(XalanConstants.SP_ENTITY_EXPANSION_LIMIT, -+ XalanConstants.ENTITY_EXPANSION_LIMIT), -+ MAX_OCCUR_NODE_LIMIT(XalanConstants.SP_MAX_OCCUR_LIMIT, -+ XalanConstants.MAX_OCCUR_LIMIT), -+ ELEMENT_ATTRIBUTE_LIMIT(XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, -+ XalanConstants.ELEMENT_ATTRIBUTE_LIMIT); -+ final String newName; -+ final String oldName; -+ -+ NameMap(String newName, String oldName) { -+ this.newName = newName; -+ this.oldName = oldName; -+ } -+ -+ String getOldName(String newName) { -+ if (newName.equals(this.newName)) { -+ return oldName; -+ } -+ return null; -+ } -+ } -+ /** -+ * Values of the properties -+ */ -+ private final int[] values; -+ /** -+ * States of the settings for each property -+ */ -+ private State[] states; -+ /** -+ * States that determine if properties are set explicitly -+ */ -+ private boolean[] isSet; -+ -+ -+ /** -+ * Index of the special entityCountInfo property -+ */ -+ private int indexEntityCountInfo = 10000; -+ private String printEntityCountInfo = ""; + -+ /** -+ * Default constructor. Establishes default values for known security -+ * vulnerabilities. -+ */ -+ public XMLSecurityManager() { -+ this(false); -+ } + // storing a region crossing, non-NULL oop, card is clean. + // dirty card and log. + +- movb(Address(card_addr, 0), 0); ++ movb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val()); + + cmpl(queue_index, 0); + jcc(Assembler::equal, runtime); +--- ./hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -1686,14 +1686,6 @@ + } + + assert_different_registers(obj, k_RInfo, klass_RInfo); +- if (!k->is_loaded()) { +- jobject2reg_with_patching(k_RInfo, op->info_for_patch()); +- } else { +-#ifdef _LP64 +- __ movoop(k_RInfo, k->constant_encoding()); +-#endif // _LP64 +- } +- assert(obj != k_RInfo, "must be different"); + + __ cmpptr(obj, (int32_t)NULL_WORD); + if (op->should_profile()) { +@@ -1710,6 +1702,14 @@ + } else { + __ jcc(Assembler::equal, *obj_is_null); + } + -+ /** -+ * Instantiate Security Manager in accordance with the status of -+ * secure processing -+ * @param secureProcessing -+ */ -+ public XMLSecurityManager(boolean secureProcessing) { -+ values = new int[Limit.values().length]; -+ states = new State[Limit.values().length]; -+ isSet = new boolean[Limit.values().length]; -+ for (Limit limit : Limit.values()) { -+ if (secureProcessing) { -+ values[limit.ordinal()] = limit.secureValue(); -+ states[limit.ordinal()] = State.FSP; -+ } else { -+ values[limit.ordinal()] = limit.defaultValue(); -+ states[limit.ordinal()] = State.DEFAULT; -+ } -+ } -+ //read system properties or jaxp.properties -+ readSystemProperties(); -+ } ++ if (!k->is_loaded()) { ++ jobject2reg_with_patching(k_RInfo, op->info_for_patch()); ++ } else { ++#ifdef _LP64 ++ __ movoop(k_RInfo, k->constant_encoding()); ++#endif // _LP64 ++ } + __ verify_oop(obj); + + if (op->fast_check()) { +--- ./hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1395,19 +1395,18 @@ + addr = new LIR_Address(src.result(), offset, type); + } + +- if (data != dst) { +- __ move(data, dst); +- data = dst; +- } ++ // Because we want a 2-arg form of xchg and xadd ++ __ move(data, dst); + -+ /** -+ * Setting FEATURE_SECURE_PROCESSING explicitly -+ */ -+ public void setSecureProcessing(boolean secure) { -+ for (Limit limit : Limit.values()) { -+ if (secure) { -+ setLimit(limit.ordinal(), State.FSP, limit.secureValue()); -+ } else { -+ setLimit(limit.ordinal(), State.FSP, limit.defaultValue()); -+ } -+ } -+ } + if (x->is_add()) { +- __ xadd(LIR_OprFact::address(addr), data, dst, LIR_OprFact::illegalOpr); ++ __ xadd(LIR_OprFact::address(addr), dst, dst, LIR_OprFact::illegalOpr); + } else { + if (is_obj) { + // Do the pre-write barrier, if any. + pre_barrier(LIR_OprFact::address(addr), LIR_OprFact::illegalOpr /* pre_val */, + true /* do_load */, false /* patch */, NULL); + } +- __ xchg(LIR_OprFact::address(addr), data, dst, LIR_OprFact::illegalOpr); ++ __ xchg(LIR_OprFact::address(addr), dst, dst, LIR_OprFact::illegalOpr); + if (is_obj) { + // Seems to be a precise address + post_barrier(LIR_OprFact::address(addr), data); +--- ./hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -37,6 +37,9 @@ + #include "runtime/signature.hpp" + #include "runtime/vframeArray.hpp" + #include "vmreg_x86.inline.hpp" ++#ifndef SERIALGC ++#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" ++#endif + + + // Implementation of StubAssembler +@@ -1743,13 +1746,17 @@ + __ leal(card_addr, __ as_Address(ArrayAddress(cardtable, index))); + #endif + +- __ cmpb(Address(card_addr, 0), 0); ++ __ cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val()); ++ __ jcc(Assembler::equal, done); + -+ /** -+ * Set limit by property name and state -+ * @param propertyName property name -+ * @param state the state of the property -+ * @param value the value of the property -+ * @return true if the property is managed by the security manager; false -+ * if otherwise. -+ */ -+ public boolean setLimit(String propertyName, State state, Object value) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ setLimit(index, state, value); -+ return true; -+ } ++ __ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad)); ++ __ cmpb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val()); + __ jcc(Assembler::equal, done); + + // storing region crossing non-NULL, card is clean. + // dirty card and log. + +- __ movb(Address(card_addr, 0), 0); ++ __ movb(Address(card_addr, 0), (int)CardTableModRefBS::dirty_card_val()); + + __ cmpl(queue_index, 0); + __ jcc(Assembler::equal, runtime); +--- ./hotspot/src/cpu/x86/vm/frame_x86.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/frame_x86.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -94,12 +94,6 @@ + // other generic buffer blobs are more problematic so we just assume they are + // ok. adapter blobs never have a frame complete and are never ok. + +- // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc +- +- if (!Interpreter::contains(_pc) && _cb->frame_size() <= 0) { +- return false; +- } +- + if (!_cb->is_frame_complete_at(_pc)) { + if (_cb->is_nmethod() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) { + return false; +@@ -139,6 +133,11 @@ + // must be some sort of compiled/runtime frame + // fp does not have to be safe (although it could be check for c1?) + ++ // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc ++ if (_cb->frame_size() <= 0) { + return false; -+ } -+ -+ /** -+ * Set the value for a specific limit. -+ * -+ * @param limit the limit -+ * @param state the state of the property -+ * @param value the value of the property -+ */ -+ public void setLimit(Limit limit, State state, int value) { -+ setLimit(limit.ordinal(), state, value); -+ } ++ } + -+ /** -+ * Set the value of a property by its index -+ * -+ * @param index the index of the property -+ * @param state the state of the property -+ * @param value the value of the property -+ */ -+ public void setLimit(int index, State state, Object value) { -+ if (index == indexEntityCountInfo) { -+ //if it's explicitly set, it's treated as yes no matter the value -+ printEntityCountInfo = (String)value; -+ } else { -+ int temp = 0; -+ try { -+ temp = Integer.parseInt((String) value); -+ if (temp < 0) { -+ temp = 0; -+ } -+ } catch (NumberFormatException e) {} -+ setLimit(index, state, temp); } -+ } + sender_sp = _unextended_sp + _cb->frame_size(); + // On Intel the return_address is always the word on the stack + sender_pc = (address) *(sender_sp-1); +--- ./hotspot/src/cpu/x86/vm/globals_x86.hpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/globals_x86.hpp 2014-06-06 19:56:22.000000000 -0700 +@@ -62,7 +62,7 @@ + // due to lack of optimization caused by C++ compiler bugs + define_pd_global(intx, StackShadowPages, NOT_WIN64(20) WIN64_ONLY(6) DEBUG_ONLY(+2)); + #else +-define_pd_global(intx, StackShadowPages, 4 DEBUG_ONLY(+5)); ++define_pd_global(intx, StackShadowPages, 6 DEBUG_ONLY(+5)); + #endif // AMD64 + + define_pd_global(intx, PreInflateSpin, 10); +--- ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1789,6 +1789,27 @@ + __ get_thread(thread); + __ movl(Address(thread, JavaThread::popframe_condition_offset()), JavaThread::popframe_inactive); + ++ if (EnableInvokeDynamic) { ++ Label L_done; ++ const Register local0 = rdi; + -+ /** -+ * Set the value of a property by its index -+ * -+ * @param index the index of the property -+ * @param state the state of the property -+ * @param value the value of the property -+ */ -+ public void setLimit(int index, State state, int value) { -+ if (index == indexEntityCountInfo) { -+ //if it's explicitly set, it's treated as yes no matter the value -+ printEntityCountInfo = XalanConstants.JDK_YES; -+ } else { -+ //only update if it shall override -+ if (state.compareTo(states[index]) >= 0) { -+ values[index] = value; -+ states[index] = state; -+ isSet[index] = true; -+ } -+ } -+ } ++ __ cmpb(Address(rsi, 0), Bytecodes::_invokestatic); ++ __ jcc(Assembler::notEqual, L_done); + ++ // The member name argument must be restored if _invokestatic is re-executed after a PopFrame call. ++ // Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL. + -+ /** -+ * Return the value of the specified property. -+ * -+ * @param propertyName the property name -+ * @return the value of the property as a string. If a property is managed -+ * by this manager, its value shall not be null. -+ */ -+ public String getLimitAsString(String propertyName) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ return getLimitValueByIndex(index); -+ } ++ __ get_method(rdx); ++ __ movptr(rax, Address(local0, 0)); ++ __ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), rax, rdx, rsi); + -+ return null; -+ } ++ __ testptr(rax, rax); ++ __ jcc(Assembler::zero, L_done); + -+ /** -+ * Return the value of a property by its ordinal -+ * -+ * @param limit the property -+ * @return value of a property -+ */ -+ public String getLimitValueAsString(Limit limit) { -+ return Integer.toString(values[limit.ordinal()]); -+ } ++ __ movptr(Address(rbx, 0), rax); ++ __ bind(L_done); ++ } + -+ /** -+ * Return the value of the specified property -+ * -+ * @param limit the property -+ * @return the value of the property -+ */ -+ public int getLimit(Limit limit) { -+ return values[limit.ordinal()]; -+ } + __ dispatch_next(vtos); + // end of PopFrame support + +--- ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp 2013-09-06 11:22:02.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1815,6 +1815,27 @@ + __ movl(Address(r15_thread, JavaThread::popframe_condition_offset()), + JavaThread::popframe_inactive); + ++ if (EnableInvokeDynamic) { ++ Label L_done; ++ const Register local0 = r14; + -+ /** -+ * Return the value of a property by its ordinal -+ * -+ * @param index the index of a property -+ * @return value of a property -+ */ -+ public int getLimitByIndex(int index) { -+ return values[index]; -+ } -+ /** -+ * Return the value of a property by its index -+ * -+ * @param index the index of a property -+ * @return limit of a property as a string -+ */ -+ public String getLimitValueByIndex(int index) { -+ if (index == indexEntityCountInfo) { -+ return printEntityCountInfo; -+ } ++ __ cmpb(Address(r13, 0), Bytecodes::_invokestatic); ++ __ jcc(Assembler::notEqual, L_done); + -+ return Integer.toString(values[index]); -+ } -+ /** -+ * Return the state of the limit property -+ * -+ * @param limit the limit -+ * @return the state of the limit property -+ */ -+ public State getState(Limit limit) { -+ return states[limit.ordinal()]; -+ } ++ // The member name argument must be restored if _invokestatic is re-executed after a PopFrame call. ++ // Detect such a case in the InterpreterRuntime function and return the member name argument, or NULL. + -+ /** -+ * Return the state of the limit property -+ * -+ * @param limit the limit -+ * @return the state of the limit property -+ */ -+ public String getStateLiteral(Limit limit) { -+ return states[limit.ordinal()].literal(); -+ } ++ __ get_method(rdx); ++ __ movptr(rax, Address(local0, 0)); ++ __ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::member_name_arg_or_null), rax, rdx, r13); + -+ /** -+ * Get the index by property name -+ * -+ * @param propertyName property name -+ * @return the index of the property if found; return -1 if not -+ */ -+ public int getIndex(String propertyName) { -+ for (Limit limit : Limit.values()) { -+ if (limit.equalsAPIPropertyName(propertyName)) { -+ //internally, ordinal is used as index -+ return limit.ordinal(); -+ } -+ } -+ //special property to return entity count info -+ if (propertyName.equals(XalanConstants.JDK_ENTITY_COUNT_INFO)) { -+ return indexEntityCountInfo; -+ } -+ return -1; -+ } ++ __ testptr(rax, rax); ++ __ jcc(Assembler::zero, L_done); + -+ /** -+ * Indicate if a property is set explicitly -+ * @param index -+ * @return -+ */ -+ public boolean isSet(int index) { -+ return isSet[index]; -+ } ++ __ movptr(Address(rbx, 0), rax); ++ __ bind(L_done); ++ } + -+ public boolean printEntityCountInfo() { -+ return printEntityCountInfo.equals(XalanConstants.JDK_YES); -+ } -+ /** -+ * Read from system properties, or those in jaxp.properties -+ */ -+ private void readSystemProperties() { + __ dispatch_next(vtos); + // end of PopFrame support + +--- ./hotspot/src/cpu/x86/vm/x86_32.ad 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/x86_32.ad 2014-06-06 19:56:21.000000000 -0700 +@@ -3919,6 +3919,17 @@ + interface(CONST_INTER); + %} + ++// Int Immediate non-negative ++operand immU31() ++%{ ++ predicate(n->get_int() >= 0); ++ match(ConI); ++ ++ op_cost(0); ++ format %{ %} ++ interface(CONST_INTER); ++%} ++ + // Constant for long shifts + operand immI_32() %{ + predicate( n->get_int() == 32 ); +@@ -6135,12 +6146,12 @@ + ins_pipe(ialu_reg_mem); + %} + +-// Load Integer with 32-bit mask into Long Register +-instruct loadI2L_immI(eRegL dst, memory mem, immI mask, eFlagsReg cr) %{ ++// Load Integer with 31-bit mask into Long Register ++instruct loadI2L_immU31(eRegL dst, memory mem, immU31 mask, eFlagsReg cr) %{ + match(Set dst (ConvI2L (AndI (LoadI mem) mask))); + effect(KILL cr); + +- format %{ "MOV $dst.lo,$mem\t# int & 32-bit mask -> long\n\t" ++ format %{ "MOV $dst.lo,$mem\t# int & 31-bit mask -> long\n\t" + "XOR $dst.hi,$dst.hi\n\t" + "AND $dst.lo,$mask" %} + ins_encode %{ +--- ./hotspot/src/cpu/x86/vm/x86_64.ad 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/cpu/x86/vm/x86_64.ad 2014-06-06 19:56:21.000000000 -0700 +@@ -3142,6 +3142,17 @@ + interface(CONST_INTER); + %} + ++// Int Immediate non-negative ++operand immU31() ++%{ ++ predicate(n->get_int() >= 0); ++ match(ConI); ++ ++ op_cost(0); ++ format %{ %} ++ interface(CONST_INTER); ++%} ++ + // Constant for long shifts + operand immI_32() + %{ +@@ -5083,12 +5094,12 @@ + ins_pipe(ialu_reg_mem); + %} + +-// Load Integer with a 32-bit mask into Long Register +-instruct loadI2L_immI(rRegL dst, memory mem, immI mask, rFlagsReg cr) %{ ++// Load Integer with a 31-bit mask into Long Register ++instruct loadI2L_immU31(rRegL dst, memory mem, immU31 mask, rFlagsReg cr) %{ + match(Set dst (ConvI2L (AndI (LoadI mem) mask))); + effect(KILL cr); + +- format %{ "movl $dst, $mem\t# int & 32-bit mask -> long\n\t" ++ format %{ "movl $dst, $mem\t# int & 31-bit mask -> long\n\t" + "andl $dst, $mask" %} + ins_encode %{ + Register Rdst = $dst$$Register; +--- ./hotspot/src/cpu/zero/vm/entryFrame_zero.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/cpu/zero/vm/entryFrame_zero.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,6 +1,6 @@ + /* + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +- * Copyright 2008, 2010 Red Hat, Inc. ++ * Copyright (c) 2013 Red Hat, Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -58,8 +58,8 @@ + JavaCallWrapper* call_wrapper, + TRAPS); + public: +- JavaCallWrapper *call_wrapper() const { +- return (JavaCallWrapper *) value_of_word(call_wrapper_off); ++ JavaCallWrapper **call_wrapper() const { ++ return (JavaCallWrapper **) addr_of_word(call_wrapper_off); + } + + public: +--- ./hotspot/src/cpu/zero/vm/frame_zero.inline.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/cpu/zero/vm/frame_zero.inline.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,6 +1,6 @@ + /* + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2007, 2013, Red Hat, Inc. ++ * Copyright (c) 2013 Red Hat, Inc. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -132,7 +132,7 @@ + return fp(); + } + +-inline JavaCallWrapper* frame::entry_frame_call_wrapper() const { ++inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const { + return zero_entryframe()->call_wrapper(); + } + +--- ./hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -460,14 +460,14 @@ + + void AttachListener::vm_start() { + char fn[UNIX_PATH_MAX]; +- struct stat64 st; ++ struct stat st; + int ret; + + int n = snprintf(fn, UNIX_PATH_MAX, "%s/.java_pid%d", + os::get_temp_directory(), os::current_process_id()); + assert(n < (int)UNIX_PATH_MAX, "java_pid file name buffer overflow"); + +- RESTARTABLE(::stat64(fn, &st), ret); ++ RESTARTABLE(::stat(fn, &st), ret); + if (ret == 0) { + ret = ::unlink(fn); + if (ret == -1) { +--- ./hotspot/src/os/bsd/vm/decoder_bsd.cpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/src/os/bsd/vm/decoder_bsd.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -0,0 +1,46 @@ ++/* ++ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ * ++ */ + -+ for (Limit limit : Limit.values()) { -+ if (!getSystemProperty(limit, limit.systemProperty())) { -+ //if system property is not found, try the older form if any -+ for (NameMap nameMap : NameMap.values()) { -+ String oldName = nameMap.getOldName(limit.systemProperty()); -+ if (oldName != null) { -+ getSystemProperty(limit, oldName); -+ } -+ } -+ } -+ } ++#include "prims/jvm.h" ++#include "utilities/decoder_elf.hpp" + -+ } ++#include + -+ /** -+ * Read from system properties, or those in jaxp.properties -+ * -+ * @param property the type of the property -+ * @param sysPropertyName the name of system property -+ */ -+ private boolean getSystemProperty(Limit limit, String sysPropertyName) { -+ try { -+ String value = SecuritySupport.getSystemProperty(sysPropertyName); -+ if (value != null && !value.equals("")) { -+ values[limit.ordinal()] = Integer.parseInt(value); -+ states[limit.ordinal()] = State.SYSTEMPROPERTY; -+ return true; -+ } ++bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) { ++ int status; ++ char* result; ++ size_t size = (size_t)buflen; + -+ value = SecuritySupport.readJAXPProperty(sysPropertyName); -+ if (value != null && !value.equals("")) { -+ values[limit.ordinal()] = Integer.parseInt(value); -+ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; -+ return true; -+ } -+ } catch (NumberFormatException e) { -+ //invalid setting -+ throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty()); -+ } -+ return false; -+ } ++ // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small, ++ // __cxa_demangle will call system "realloc" for additional memory, which ++ // may use different malloc/realloc mechanism that allocates 'buf'. ++ if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) { ++ jio_snprintf(buf, buflen, "%s", result); ++ // call c library's free ++ ::free(result); ++ return true; ++ } ++ return false; +} ---- jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityPropertyManager.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityPropertyManager.java 2014-04-20 12:39:46.000000000 -0700 -@@ -94,6 +94,23 @@ - } - - /** -+ * Set limit by property name and state -+ * @param propertyName property name -+ * @param state the state of the property -+ * @param value the value of the property -+ * @return true if the property is managed by the security property manager; -+ * false if otherwise. -+ */ -+ public boolean setValue(String propertyName, State state, Object value) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ setValue(index, state, (String)value); -+ return true; -+ } -+ return false; -+ } -+ -+ /** - * Set the value for a specific property. - * - * @param property the property -@@ -121,6 +138,22 @@ - states[index] = state; - } - } -+ -+ /** -+ * Return the value of the specified property -+ * -+ * @param propertyName the property name -+ * @return the value of the property as a string -+ */ -+ public String getValue(String propertyName) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ return getValueByIndex(index); -+ } -+ -+ return null; -+ } + - /** - * Return the value of the specified property - * ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java 2014-04-20 12:39:46.000000000 -0700 -@@ -86,7 +86,7 @@ - if (input == null) { - docToLoad = SystemIDResolver.getAbsoluteURI(docToLoad, currLoadedDoc); - String accessError = SecuritySupport.checkAccess(docToLoad, -- xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), -+ (String)xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), - XalanConstants.ACCESS_EXTERNAL_ALL); +--- ./hotspot/src/os/bsd/vm/os_bsd.cpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/bsd/vm/os_bsd.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -187,6 +187,8 @@ + static int SR_signum = SIGUSR2; + sigset_t SR_sigset; - if (accessError != null) { ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java 2014-04-20 12:39:46.000000000 -0700 -@@ -87,7 +87,7 @@ - if (input == null) { - docToLoad = SystemIDResolver.getAbsoluteURI(docToLoad, currLoadedDoc); - String accessError = SecuritySupport.checkAccess(docToLoad, -- xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), -+ (String)xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), - XalanConstants.ACCESS_EXTERNAL_ALL); ++// Declarations ++static void unpackTime(timespec* absTime, bool isAbsolute, jlong time); - if (accessError != null) { ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java 2013-09-06 11:22:55.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java 2014-04-20 12:39:46.000000000 -0700 -@@ -28,6 +28,7 @@ - import com.sun.org.apache.xalan.internal.utils.FactoryImpl; - import com.sun.org.apache.xalan.internal.utils.ObjectFactory; - import com.sun.org.apache.xalan.internal.utils.SecuritySupport; -+import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; - import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType; - import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; -@@ -487,6 +488,20 @@ - } + //////////////////////////////////////////////////////////////////////////////// + // utility functions +@@ -355,7 +357,13 @@ + * since it returns a 64 bit value) + */ + mib[0] = CTL_HW; ++#ifdef HW_MEMSIZE + mib[1] = HW_MEMSIZE; ++#elif defined (HW_USERMEM64) ++ mib[1] = HW_USERMEM64; ++#else ++ mib[1] = HW_USERMEM; ++#endif + len = sizeof(mem_val); + if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) { + assert(len == sizeof(mem_val), "unexpected data size"); +@@ -971,13 +979,14 @@ + #endif - final XMLReader reader = parser.getXMLReader(); -+ try { -+ XMLSecurityManager securityManager = -+ (XMLSecurityManager)_xsltc.getProperty(XalanConstants.SECURITY_MANAGER); -+ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { -+ reader.setProperty(limit.apiProperty(), securityManager.getLimitValueAsString(limit)); -+ } -+ if (securityManager.printEntityCountInfo()) { -+ parser.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); -+ } -+ } catch (SAXException se) { -+ System.err.println("Warning: " + reader.getClass().getName() + ": " -+ + se.getMessage()); -+ } + #ifdef __APPLE__ +-static uint64_t locate_unique_thread_id() { ++static uint64_t locate_unique_thread_id(mach_port_t mach_thread_port) { + // Additional thread_id used to correlate threads in SA + thread_identifier_info_data_t m_ident_info; + mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT; + +- thread_info(::mach_thread_self(), THREAD_IDENTIFIER_INFO, ++ thread_info(mach_thread_port, THREAD_IDENTIFIER_INFO, + (thread_info_t) &m_ident_info, &count); + - return(parse(reader, input)); - } - catch (ParserConfigurationException e) { -@@ -565,7 +580,7 @@ - } - path = SystemIDResolver.getAbsoluteURI(path); - String accessError = SecuritySupport.checkAccess(path, -- _xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), -+ (String)_xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), - XalanConstants.ACCESS_EXTERNAL_ALL); - if (accessError != null) { - ErrorMsg msg = new ErrorMsg(ErrorMsg.ACCESSING_XSLT_TARGET_ERR, ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java 2013-09-06 11:22:56.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java 2014-04-20 12:39:46.000000000 -0700 -@@ -44,11 +44,11 @@ - import com.sun.org.apache.bcel.internal.classfile.JavaClass; - import com.sun.org.apache.xalan.internal.XalanConstants; - import com.sun.org.apache.xalan.internal.utils.SecuritySupport; -+import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; - import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; - import com.sun.org.apache.xml.internal.dtm.DTM; + return m_ident_info.thread_id; + } + #endif +@@ -1009,9 +1018,14 @@ --import com.sun.org.apache.xalan.internal.utils.SecuritySupport; - import org.xml.sax.InputSource; - import org.xml.sax.XMLReader; + #ifdef _ALLBSD_SOURCE + #ifdef __APPLE__ +- // thread_id is mach thread on macos +- osthread->set_thread_id(::mach_thread_self()); +- osthread->set_unique_thread_id(locate_unique_thread_id()); ++ // thread_id is mach thread on macos, which pthreads graciously caches and provides for us ++ mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self()); ++ guarantee(thread_id != 0, "thread id missing from pthreads"); ++ osthread->set_thread_id(thread_id); ++ ++ uint64_t unique_thread_id = locate_unique_thread_id(thread_id); ++ guarantee(unique_thread_id != 0, "unique thread id was not found"); ++ osthread->set_unique_thread_id(unique_thread_id); + #else + // thread_id is pthread_id on BSD + osthread->set_thread_id(::pthread_self()); +@@ -1207,8 +1221,14 @@ + // Store pthread info into the OSThread + #ifdef _ALLBSD_SOURCE + #ifdef __APPLE__ +- osthread->set_thread_id(::mach_thread_self()); +- osthread->set_unique_thread_id(locate_unique_thread_id()); ++ // thread_id is mach thread on macos, which pthreads graciously caches and provides for us ++ mach_port_t thread_id = ::pthread_mach_thread_np(::pthread_self()); ++ guarantee(thread_id != 0, "just checking"); ++ osthread->set_thread_id(thread_id); ++ ++ uint64_t unique_thread_id = locate_unique_thread_id(thread_id); ++ guarantee(unique_thread_id != 0, "just checking"); ++ osthread->set_unique_thread_id(unique_thread_id); + #else + osthread->set_thread_id(::pthread_self()); + #endif +@@ -1570,10 +1590,10 @@ + return (1000 * 1000); + } -@@ -146,6 +146,7 @@ - */ - private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; +-// XXX: For now, code this as if BSD does not support vtime. +-bool os::supports_vtime() { return false; } ++bool os::supports_vtime() { return true; } + bool os::enable_vtime() { return false; } + bool os::vtime_enabled() { return false; } ++ + double os::elapsedVTime() { + // better than nothing, but not much + return elapsedTime(); +@@ -1830,7 +1850,7 @@ -+ private XMLSecurityManager _xmlSecurityManager; + intx os::current_thread_id() { + #ifdef __APPLE__ +- return (intx)::mach_thread_self(); ++ return (intx)::pthread_mach_thread_np(::pthread_self()); + #else + return (intx)::pthread_self(); + #endif +@@ -2381,14 +2401,14 @@ + } - /** - * XSLTC compiler constructor -@@ -184,12 +185,14 @@ - /** - * Return allowed protocols for accessing external stylesheet. - */ -- public String getProperty(String name) { -+ public Object getProperty(String name) { - if (name.equals(XMLConstants.ACCESS_EXTERNAL_STYLESHEET)) { - return _accessExternalStylesheet; - } - else if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { - return _accessExternalDTD; -+ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { -+ return _xmlSecurityManager; - } - return null; - } -@@ -197,12 +200,14 @@ - /** - * Set allowed protocols for accessing external stylesheet. - */ -- public void setProperty(String name, String value) { -+ public void setProperty(String name, Object value) { - if (name.equals(XMLConstants.ACCESS_EXTERNAL_STYLESHEET)) { - _accessExternalStylesheet = (String)value; - } - else if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { - _accessExternalDTD = (String)value; -+ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { -+ _xmlSecurityManager = (XMLSecurityManager)value; - } - } + void os::print_os_info_brief(outputStream* st) { +- st->print("Bsd"); ++ st->print("BSD"); ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -29,7 +29,7 @@ - import javax.xml.transform.TransformerException; - import javax.xml.transform.URIResolver; - import javax.xml.transform.sax.TemplatesHandler; -- -+import com.sun.org.apache.xalan.internal.XalanConstants; - import com.sun.org.apache.xalan.internal.xsltc.compiler.CompilerException; - import com.sun.org.apache.xalan.internal.xsltc.compiler.Parser; - import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader; -@@ -103,6 +103,8 @@ - (String)tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET)); - xsltc.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, - (String)tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD)); -+ xsltc.setProperty(XalanConstants.SECURITY_MANAGER, -+ tfactory.getAttribute(XalanConstants.SECURITY_MANAGER)); + os::Posix::print_uname_info(st); + } + void os::print_os_info(outputStream* st) { + st->print("OS:"); +- st->print("Bsd"); ++ st->print("BSD"); - if ("true".equals(tfactory.getAttribute(TransformerFactoryImpl.ENABLE_INLINING))) ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -77,6 +77,7 @@ - import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager.Property; - import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager.State; -+import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; + os::Posix::print_uname_info(st); - import org.xml.sax.InputSource; - import org.xml.sax.XMLFilter; -@@ -227,17 +228,17 @@ - */ - private boolean _useServicesMechanism; +@@ -2397,10 +2417,6 @@ + os::Posix::print_load_average(st); + } -- /** -+ /** - * protocols allowed for external references set by the stylesheet processing instruction, Import and Include element. - */ - private String _accessExternalStylesheet = XalanConstants.EXTERNAL_ACCESS_DEFAULT; +-void os::pd_print_cpu_info(outputStream* st) { +- // Nothing to do for now. +-} - - /** - * protocols allowed for external DTD references in source file and/or stylesheet. - */ - private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; + void os::print_memory_info(outputStream* st) { - private XMLSecurityPropertyManager _xmlSecurityPropertyMgr; -+ private XMLSecurityManager _xmlSecurityManager; + st->print("Memory:"); +@@ -2417,6 +2433,7 @@ + st->print("(" UINT64_FORMAT "k free)", + os::available_memory() >> 10); + #ifndef _ALLBSD_SOURCE ++ // FIXME: Make this work for *BSD + st->print(", swap " UINT64_FORMAT "k", + ((jlong)si.totalswap * si.mem_unit) >> 10); + st->print("(" UINT64_FORMAT "k free)", +@@ -2424,12 +2441,22 @@ + #endif + st->cr(); - /** - * javax.xml.transform.sax.TransformerFactory implementation. -@@ -264,6 +265,9 @@ - Property.ACCESS_EXTERNAL_DTD); - _accessExternalStylesheet = _xmlSecurityPropertyMgr.getValue( - Property.ACCESS_EXTERNAL_STYLESHEET); -+ -+ //Parser's security manager -+ _xmlSecurityManager = new XMLSecurityManager(true); - } ++ // FIXME: Make this work for *BSD + // meminfo + st->print("\n/proc/meminfo:\n"); + _print_ascii_file("/proc/meminfo", st); + st->cr(); + } - /** -@@ -322,11 +326,21 @@ - return Boolean.TRUE; - else - return Boolean.FALSE; -+ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { -+ return _xmlSecurityManager; - } ++void os::pd_print_cpu_info(outputStream* st) { ++ // FIXME: Make this work for *BSD ++ st->print("\n/proc/cpuinfo:\n"); ++ if (!_print_ascii_file("/proc/cpuinfo", st)) { ++ st->print(" "); ++ } ++ st->cr(); ++} ++ + // Taken from /usr/include/bits/siginfo.h Supposed to be architecture specific + // but they're the same for all the bsd arch that we support + // and they're the same for solaris but there's no common place to put this. +@@ -2575,6 +2602,25 @@ + len = strlen(buf); + jrelib_p = buf + len; -- int index = _xmlSecurityPropertyMgr.getIndex(name); -- if (index > -1) { -- return _xmlSecurityPropertyMgr.getValueByIndex(index); -+ /** Check to see if the property is managed by the security manager **/ -+ String propertyValue = (_xmlSecurityManager != null) ? -+ _xmlSecurityManager.getLimitAsString(name) : null; -+ if (propertyValue != null) { -+ return propertyValue; ++#ifndef __APPLE__ ++ snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch); ++ if (0 != access(buf, F_OK)) { ++ snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch); ++ } ++ ++ if (0 == access(buf, F_OK)) { ++ // Use current module name "libjvm[_g].so" instead of ++ // "libjvm"debug_only("_g")".so" since for fastdebug version ++ // we should have "libjvm.so" but debug_only("_g") adds "_g"! ++ len = strlen(buf); ++ snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p); + } else { -+ propertyValue = (_xmlSecurityPropertyMgr != null) ? -+ _xmlSecurityPropertyMgr.getValue(name) : null; -+ if (propertyValue != null) { -+ return propertyValue; -+ } ++ // Go back to path of .so ++ rp = realpath(dli_fname, buf); ++ if (rp == NULL) ++ return; ++ } ++#else + // Add the appropriate library subdir + snprintf(jrelib_p, buflen-len, "/jre/lib"); + if (0 != access(buf, F_OK)) { +@@ -2604,6 +2650,7 @@ + if (rp == NULL) + return; } ++#endif + } + } + } +@@ -2707,10 +2754,14 @@ + bool timedwait(unsigned int sec, int nsec); + private: + jlong currenttime() const; +- semaphore_t _semaphore; ++ os_semaphore_t _semaphore; + }; - // Throw an exception for all other attributes -@@ -429,10 +443,13 @@ - } - } ++#if defined(__FreeBSD__) && __FreeBSD__ > 8 ++Semaphore::Semaphore() : _semaphore() { ++#else + Semaphore::Semaphore() : _semaphore(0) { ++#endif + SEM_INIT(_semaphore, 0); + } -- int index = _xmlSecurityPropertyMgr.getIndex(name); -- if (index > -1) { -- _xmlSecurityPropertyMgr.setValue(index, -- State.APIPROPERTY, (String)value); -+ if (_xmlSecurityManager != null && -+ _xmlSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { -+ return; -+ } -+ -+ if (_xmlSecurityPropertyMgr != null && -+ _xmlSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { - _accessExternalDTD = _xmlSecurityPropertyMgr.getValue( - Property.ACCESS_EXTERNAL_DTD); - _accessExternalStylesheet = _xmlSecurityPropertyMgr.getValue( -@@ -482,6 +499,7 @@ - throw new TransformerConfigurationException(err.toString()); - } - _isNotSecureProcessing = !value; -+ _xmlSecurityManager.setSecureProcessing(value); +@@ -2775,7 +2826,7 @@ - // set external access restriction when FSP is explicitly set - if (value && XalanConstants.IS_JDK8_OR_ABOVE) { -@@ -851,6 +869,7 @@ - if (!_isNotSecureProcessing) xsltc.setSecureProcessing(true); - xsltc.setProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, _accessExternalStylesheet); - xsltc.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD); -+ xsltc.setProperty(XalanConstants.SECURITY_MANAGER, _xmlSecurityManager); - xsltc.init(); + bool Semaphore::timedwait(unsigned int sec, int nsec) { + struct timespec ts; +- jlong endtime = unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec); ++ unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec); - // Set a document loader (for xsl:include/import) if defined ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -25,6 +25,7 @@ + while (1) { + int result = sem_timedwait(&_semaphore, &ts); +@@ -2996,7 +3047,11 @@ + } - import com.sun.org.apache.xalan.internal.XalanConstants; - import com.sun.org.apache.xalan.internal.utils.FactoryImpl; -+import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; - import java.io.File; - import java.io.FileOutputStream; - import java.io.IOException; -@@ -218,6 +219,7 @@ - */ - private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; + void os::pd_free_memory(char *addr, size_t bytes, size_t alignment_hint) { ++#if !defined(__APPLE__) && !defined(__FreeBSD__) ++ commit_memory(addr, bytes, alignment_hint, false); ++#else + ::madvise(addr, bytes, MADV_DONTNEED); ++#endif + } -+ private XMLSecurityManager _securityManager; - /** - * A hashtable to store parameters for the identity transform. These - * are not needed during the transformation, but we must keep track of -@@ -272,8 +274,11 @@ - _useServicesMechanism = _tfactory.useServicesMechnism(); - _accessExternalStylesheet = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET); - _accessExternalDTD = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD); -+ _securityManager = (XMLSecurityManager)_tfactory.getAttribute(XalanConstants.SECURITY_MANAGER); - _readerManager = XMLReaderManager.getInstance(_useServicesMechanism); - _readerManager.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD); -+ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); -+ _readerManager.setProperty(XalanConstants.SECURITY_MANAGER, _securityManager); - //_isIncremental = tfactory._incremental; - } + void os::numa_make_global(char *addr, size_t bytes) { +@@ -3422,7 +3477,9 @@ + #endif + #endif -@@ -289,6 +294,7 @@ - */ - public void setSecureProcessing(boolean flag) { - _isSecureProcessing = flag; -+ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); - } - /** - * Return the state of the services mechanism feature. ---- jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java 2014-04-20 12:39:46.000000000 -0700 -@@ -23,6 +23,7 @@ +-char* os::reserve_memory_special(size_t bytes, char* req_addr, bool exec) { ++char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr, bool exec) { ++ fatal("This code is not used or maintained."); ++ + // "exec" is passed in but not used. Creating the shared image for + // the code cache doesn't have an SHM_X executable permission to check. + assert(UseLargePages && UseSHM, "only for SHM large pages"); +@@ -3829,6 +3886,7 @@ + return OS_OK; + #elif defined(__FreeBSD__) + int ret = pthread_setprio(thread->osthread()->pthread_id(), newpri); ++ return (ret == 0) ? OS_OK : OS_ERR; + #elif defined(__APPLE__) || defined(__NetBSD__) + struct sched_param sp; + int policy; +@@ -6093,3 +6151,9 @@ + return n; + } - package com.sun.org.apache.xalan.internal.xsltc.trax; ++#ifndef PRODUCT ++void TestReserveMemorySpecial_test() { ++ // No tests available for this platform ++} ++#endif ++ +--- ./hotspot/src/os/bsd/vm/os_bsd.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/bsd/vm/os_bsd.hpp 2014-06-06 19:56:22.000000000 -0700 +@@ -103,6 +103,12 @@ -+import com.sun.org.apache.xalan.internal.XalanConstants; - import java.io.InputStream; - import java.io.Reader; + static bool hugetlbfs_sanity_check(bool warn, size_t page_size); -@@ -43,6 +44,7 @@ - import javax.xml.transform.stream.StreamSource; ++ static void print_full_memory_info(outputStream* st); ++#ifndef _ALLBSD_SOURCE ++ static void print_distro_info(outputStream* st); ++ static void print_libversion_info(outputStream* st); ++#endif ++ + public: - import com.sun.org.apache.xalan.internal.utils.FactoryImpl; -+import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC; - import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; + static void init_thread_fpu_state(); +--- ./hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2014-06-06 19:56:22.000000000 -0700 +@@ -31,10 +31,22 @@ + # include "atomic_bsd_x86.inline.hpp" + # include "orderAccess_bsd_x86.inline.hpp" + #endif ++#ifdef TARGET_OS_ARCH_bsd_sparc ++# include "atomic_bsd_sparc.inline.hpp" ++# include "orderAccess_bsd_sparc.inline.hpp" ++#endif + #ifdef TARGET_OS_ARCH_bsd_zero + # include "atomic_bsd_zero.inline.hpp" + # include "orderAccess_bsd_zero.inline.hpp" + #endif ++#ifdef TARGET_OS_ARCH_bsd_arm ++# include "atomic_bsd_arm.inline.hpp" ++# include "orderAccess_bsd_arm.inline.hpp" ++#endif ++#ifdef TARGET_OS_ARCH_bsd_ppc ++# include "atomic_bsd_ppc.inline.hpp" ++# include "orderAccess_bsd_ppc.inline.hpp" ++#endif -@@ -105,6 +107,13 @@ - if (reader == null) { - try { - reader= XMLReaderFactory.createXMLReader(); -+ try { -+ reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, -+ xsltc.isSecureProcessing()); -+ } catch (SAXNotRecognizedException e) { -+ System.err.println("Warning: " + reader.getClass().getName() + ": " -+ + e.getMessage()); -+ } - } catch (Exception e ) { - try { + // System includes -@@ -144,6 +153,22 @@ - + e.getMessage()); - } +--- ./hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2014-06-06 19:56:22.000000000 -0700 +@@ -34,11 +34,26 @@ + # include "orderAccess_bsd_x86.inline.hpp" + # include "prefetch_bsd_x86.inline.hpp" + #endif ++#ifdef TARGET_OS_ARCH_bsd_sparc ++# include "atomic_bsd_sparc.inline.hpp" ++# include "orderAccess_bsd_sparc.inline.hpp" ++# include "prefetch_bsd_sparc.inline.hpp" ++#endif + #ifdef TARGET_OS_ARCH_bsd_zero + # include "atomic_bsd_zero.inline.hpp" + # include "orderAccess_bsd_zero.inline.hpp" + # include "prefetch_bsd_zero.inline.hpp" + #endif ++#ifdef TARGET_OS_ARCH_bsd_arm ++# include "atomic_bsd_arm.inline.hpp" ++# include "orderAccess_bsd_arm.inline.hpp" ++# include "prefetch_bsd_arm.inline.hpp" ++#endif ++#ifdef TARGET_OS_ARCH_bsd_ppc ++# include "atomic_bsd_ppc.inline.hpp" ++# include "orderAccess_bsd_ppc.inline.hpp" ++# include "prefetch_bsd_ppc.inline.hpp" ++#endif -+ try { -+ XMLSecurityManager securityManager = -+ (XMLSecurityManager)xsltc.getProperty(XalanConstants.SECURITY_MANAGER); -+ if (securityManager != null) { -+ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { -+ reader.setProperty(limit.apiProperty(), -+ securityManager.getLimitValueAsString(limit)); -+ } -+ if (securityManager.printEntityCountInfo()) { -+ reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); -+ } -+ } -+ } catch (SAXException se) { -+ System.err.println("Warning: " + reader.getClass().getName() + ": " -+ + se.getMessage()); -+ } - xsltc.setXMLReader(reader); - }catch (SAXNotRecognizedException snre ) { - throw new TransformerConfigurationException ---- jaxp/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -33,6 +33,7 @@ - import com.sun.org.apache.xerces.internal.util.PropertyState; - import com.sun.org.apache.xerces.internal.util.SymbolTable; - import com.sun.org.apache.xerces.internal.utils.ObjectFactory; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler; - import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler; -@@ -59,6 +60,7 @@ - import org.w3c.dom.ls.LSResourceResolver; + // Contains inlined functions for class Thread and ThreadLocalStorage + +--- ./hotspot/src/os/linux/vm/globals_linux.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/linux/vm/globals_linux.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -40,6 +40,9 @@ + product(bool, UseHugeTLBFS, false, \ + "Use MAP_HUGETLB for large pages") \ + \ ++ product(bool, UseTransparentHugePages, false, \ ++ "Use MADV_HUGEPAGE for large pages") \ ++ \ + product(bool, LoadExecStackDllInVMThread, true, \ + "Load DLLs with executable-stack attribute in the VM Thread") \ + \ +@@ -50,7 +53,7 @@ + // Defines Linux-specific default values. The flags are available on all + // platforms, but they may have different default values on other platforms. + // +-define_pd_global(bool, UseLargePages, true); ++define_pd_global(bool, UseLargePages, false); + define_pd_global(bool, UseLargePagesIndividualAllocation, false); + define_pd_global(bool, UseOSErrorReporting, false); + define_pd_global(bool, UseThreadPriorities, true) ; +--- ./hotspot/src/os/linux/vm/jsig.c 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/linux/vm/jsig.c 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + signal_lock(); +- sigused = (MASK(sig) & jvmsigs) != 0; ++ sigused = (sig < MAXSIGNUM) && ((MASK(sig) & jvmsigs) != 0); + if (jvm_signal_installed && sigused) { + /* jvm has installed its signal handler for this signal. */ + /* Save the handler. Don't really install it. */ +@@ -116,7 +116,7 @@ + + signal_unlock(); + return oldhandler; +- } else if (jvm_signal_installing) { ++ } else if (sig < MAXSIGNUM && jvm_signal_installing) { + /* jvm is installing its signal handlers. Install the new + * handlers and save the old ones. jvm uses sigaction(). + * Leave the piece here just in case. */ +@@ -165,7 +165,7 @@ + + signal_lock(); + +- sigused = (MASK(sig) & jvmsigs) != 0; ++ sigused = (sig < MAXSIGNUM) && ((MASK(sig) & jvmsigs) != 0); + if (jvm_signal_installed && sigused) { + /* jvm has installed its signal handler for this signal. */ + /* Save the handler. Don't really install it. */ +@@ -178,7 +178,7 @@ + + signal_unlock(); + return 0; +- } else if (jvm_signal_installing) { ++ } else if (sig < MAXSIGNUM && jvm_signal_installing) { + /* jvm is installing its signal handlers. Install the new + * handlers and save the old ones. */ + res = call_os_sigaction(sig, act, &oldAct); +--- ./hotspot/src/os/linux/vm/os_linux.cpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/linux/vm/os_linux.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -120,8 +120,16 @@ + # include + # include + ++// if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling ++// getrusage() is prepared to handle the associated failure. ++#ifndef RUSAGE_THREAD ++#define RUSAGE_THREAD (1) /* only the calling thread */ ++#endif + - /** - * Xerces implementation of DOMConfiguration that maintains a table of recognized parameters. - * -@@ -156,6 +158,9 @@ - protected static final String SCHEMA_DV_FACTORY = - Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY; + #define MAX_PATH (2 * K) -+ /** Property identifier: Security manager. */ -+ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; ++#define MAX_SECS 100000000 + - /** Property identifier: Security property manager. */ - private static final String XML_SECURITY_PROPERTY_MANAGER = - Constants.XML_SECURITY_PROPERTY_MANAGER; -@@ -279,6 +284,7 @@ - JAXP_SCHEMA_LANGUAGE, - DTD_VALIDATOR_FACTORY_PROPERTY, - SCHEMA_DV_FACTORY, -+ SECURITY_MANAGER, - XML_SECURITY_PROPERTY_MANAGER - }; - addRecognizedProperties(recognizedProperties); -@@ -313,6 +319,8 @@ - fValidationManager = createValidationManager(); - setProperty(VALIDATION_MANAGER, fValidationManager); + // for timer info max values which include all bits + #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF) -+ setProperty(SECURITY_MANAGER, new XMLSecurityManager(true)); +@@ -144,6 +152,7 @@ + bool os::Linux::_supports_fast_thread_cpu_time = false; + const char * os::Linux::_glibc_version = NULL; + const char * os::Linux::_libpthread_version = NULL; ++pthread_condattr_t os::Linux::_condattr[1]; + + static jlong initial_time_count=0; + +@@ -1377,15 +1386,19 @@ + return (1000 * 1000); + } + +-// For now, we say that linux does not support vtime. I have no idea +-// whether it can actually be made to (DLD, 9/13/05). +- +-bool os::supports_vtime() { return false; } ++bool os::supports_vtime() { return true; } + bool os::enable_vtime() { return false; } + bool os::vtime_enabled() { return false; } ++ + double os::elapsedVTime() { +- // better than nothing, but not much +- return elapsedTime(); ++ struct rusage usage; ++ int retval = getrusage(RUSAGE_THREAD, &usage); ++ if (retval == 0) { ++ return (double) (usage.ru_utime.tv_sec + usage.ru_stime.tv_sec) + (double) (usage.ru_utime.tv_usec + usage.ru_stime.tv_usec) / (1000 * 1000); ++ } else { ++ // better than nothing, but not much ++ return elapsedTime(); ++ } + } + + jlong os::javaTimeMillis() { +@@ -1427,12 +1440,15 @@ + clock_gettime_func(CLOCK_MONOTONIC, &tp) == 0) { + // yes, monotonic clock is supported + _clock_gettime = clock_gettime_func; ++ return; + } else { + // close librt if there is no monotonic clock + dlclose(handle); + } + } + } ++ warning("No monotonic clock was available - timed services may " \ ++ "be adversely affected if the time-of-day clock changes"); + } + + #ifndef SYS_clock_getres +@@ -2468,7 +2484,6 @@ + sem_t _semaphore; + }; + +- + Semaphore::Semaphore() { + sem_init(&_semaphore, 0, 0); + } +@@ -2490,8 +2505,22 @@ + } + + bool Semaphore::timedwait(unsigned int sec, int nsec) { + - setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, - new XMLSecurityPropertyManager()); + struct timespec ts; +- unpackTime(&ts, false, (sec * NANOSECS_PER_SEC) + nsec); ++ // Semaphore's are always associated with CLOCK_REALTIME ++ os::Linux::clock_gettime(CLOCK_REALTIME, &ts); ++ // see unpackTime for discussion on overflow checking ++ if (sec >= MAX_SECS) { ++ ts.tv_sec += MAX_SECS; ++ ts.tv_nsec = 0; ++ } else { ++ ts.tv_sec += sec; ++ ts.tv_nsec += nsec; ++ if (ts.tv_nsec >= NANOSECS_PER_SEC) { ++ ts.tv_nsec -= NANOSECS_PER_SEC; ++ ++ts.tv_sec; // note: this must be <= max_secs ++ } ++ } ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java 2014-04-20 12:39:47.000000000 -0700 -@@ -174,8 +174,6 @@ - /** JAXP schemaSource language: when used internally may include DTD namespace (DOM) */ - public static final String SCHEMA_LANGUAGE = "schemaLanguage"; + while (1) { + int result = sem_timedwait(&_semaphore, &ts); +@@ -2748,35 +2777,7 @@ -- public static final String SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; + int os::Linux::commit_memory_impl(char* addr, size_t size, + size_t alignment_hint, bool exec) { +- int err; +- if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { +- int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; +- uintptr_t res = +- (uintptr_t) ::mmap(addr, size, prot, +- MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_HUGETLB, +- -1, 0); +- if (res != (uintptr_t) MAP_FAILED) { +- if (UseNUMAInterleaving) { +- numa_make_global(addr, size); +- } +- return 0; +- } - - /** JAXP Standard property prefix ("http://javax.xml.XMLConstants/property/"). */ - public static final String JAXPAPI_PROPERTY_PREFIX = - "http://javax.xml.XMLConstants/property/"; -@@ -209,6 +207,107 @@ - public static final boolean IS_JDK8_OR_ABOVE = isJavaVersionAtLeast(8); +- err = errno; // save errno from mmap() call above +- +- if (!recoverable_mmap_error(err)) { +- // However, it is not clear that this loss of our reserved mapping +- // happens with large pages on Linux or that we cannot recover +- // from the loss. For now, we just issue a warning and we don't +- // call vm_exit_out_of_memory(). This issue is being tracked by +- // JBS-8007074. +- warn_fail_commit_memory(addr, size, alignment_hint, exec, err); +-// vm_exit_out_of_memory(size, "committing reserved memory."); +- } +- // Fall through and try to use small pages +- } +- +- err = os::Linux::commit_memory_impl(addr, size, exec); ++ int err = os::Linux::commit_memory_impl(addr, size, exec); + if (err == 0) { + realign_memory(addr, size, alignment_hint); + } +@@ -2801,7 +2802,7 @@ + } - // -+ // Implementation limits: corresponding System Properties of the above -+ // API properties -+ // -+ /** -+ * JDK entity expansion limit; Note that the existing system property -+ * "entityExpansionLimit" with no prefix is still observed -+ */ -+ public static final String JDK_ENTITY_EXPANSION_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit"; + void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) { +- if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { ++ if (UseTransparentHugePages && alignment_hint > (size_t)vm_page_size()) { + // We don't check the return value: madvise(MADV_HUGEPAGE) may not + // be supported or the memory may already be backed by huge pages. + ::madvise(addr, bytes, MADV_HUGEPAGE); +@@ -2814,7 +2815,7 @@ + // uncommitted at all. We don't do anything in this case to avoid creating a segment with + // small pages on top of the SHM segment. This method always works for small pages, so we + // allow that in any case. +- if (alignment_hint <= (size_t)os::vm_page_size() || !UseSHM) { ++ if (alignment_hint <= (size_t)os::vm_page_size() || can_commit_large_page_memory()) { + commit_memory(addr, bytes, alignment_hint, !ExecMem); + } + } +@@ -3183,11 +3184,31 @@ + return linux_mprotect(addr, size, PROT_READ|PROT_WRITE); + } + ++bool os::Linux::transparent_huge_pages_sanity_check(bool warn, size_t page_size) { ++ bool result = false; ++ void *p = mmap(NULL, page_size * 2, PROT_READ|PROT_WRITE, ++ MAP_ANONYMOUS|MAP_PRIVATE, ++ -1, 0); ++ if (p != MAP_FAILED) { ++ void *aligned_p = align_ptr_up(p, page_size); + -+ /** -+ * JDK element attribute limit; Note that the existing system property -+ * "elementAttributeLimit" with no prefix is still observed -+ */ -+ public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit"; ++ result = madvise(aligned_p, page_size, MADV_HUGEPAGE) == 0; + -+ /** -+ * JDK maxOccur limit; Note that the existing system property -+ * "maxOccurLimit" with no prefix is still observed -+ */ -+ public static final String JDK_MAX_OCCUR_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit"; ++ munmap(p, page_size * 2); ++ } + -+ /** -+ * JDK total entity size limit -+ */ -+ public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit"; ++ if (warn && !result) { ++ warning("TransparentHugePages is not supported by the operating system."); ++ } + -+ /** -+ * JDK maximum general entity size limit -+ */ -+ public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; -+ /** -+ * JDK maximum parameter entity size limit -+ */ -+ public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit"; -+ /** -+ * JDK maximum XML name limit -+ */ -+ public static final String JDK_XML_NAME_LIMIT = -+ ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit"; -+ /** -+ * JDK property to allow printing out information from the limit analyzer -+ */ -+ public static final String JDK_ENTITY_COUNT_INFO = -+ ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo"; ++ return result; ++} + -+ // -+ // Implementation limits: API properties -+ // -+ /** -+ * JDK entity expansion limit; Note that the existing system property -+ * "entityExpansionLimit" with no prefix is still observed -+ */ -+ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit"; + bool os::Linux::hugetlbfs_sanity_check(bool warn, size_t page_size) { + bool result = false; +- void *p = mmap (NULL, page_size, PROT_READ|PROT_WRITE, +- MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB, +- -1, 0); ++ void *p = mmap(NULL, page_size, PROT_READ|PROT_WRITE, ++ MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB, ++ -1, 0); + + if (p != MAP_FAILED) { + // We don't know if this really is a huge page or not. +@@ -3208,12 +3229,10 @@ + } + fclose(fp); + } +- munmap (p, page_size); +- if (result) +- return true; ++ munmap(p, page_size); + } + +- if (warn) { ++ if (warn && !result) { + warning("HugeTLBFS is not supported by the operating system."); + } + +@@ -3261,82 +3280,126 @@ + + static size_t _large_page_size = 0; + +-void os::large_page_init() { +- if (!UseLargePages) { +- UseHugeTLBFS = false; +- UseSHM = false; +- return; +- } +- +- if (FLAG_IS_DEFAULT(UseHugeTLBFS) && FLAG_IS_DEFAULT(UseSHM)) { +- // If UseLargePages is specified on the command line try both methods, +- // if it's default, then try only HugeTLBFS. +- if (FLAG_IS_DEFAULT(UseLargePages)) { +- UseHugeTLBFS = true; +- } else { +- UseHugeTLBFS = UseSHM = true; +- } +- } ++size_t os::Linux::find_large_page_size() { ++ size_t large_page_size = 0; + +- if (LargePageSizeInBytes) { +- _large_page_size = LargePageSizeInBytes; +- } else { +- // large_page_size on Linux is used to round up heap size. x86 uses either +- // 2M or 4M page, depending on whether PAE (Physical Address Extensions) +- // mode is enabled. AMD64/EM64T uses 2M page in 64bit mode. IA64 can use +- // page as large as 256M. +- // +- // Here we try to figure out page size by parsing /proc/meminfo and looking +- // for a line with the following format: +- // Hugepagesize: 2048 kB +- // +- // If we can't determine the value (e.g. /proc is not mounted, or the text +- // format has been changed), we'll use the largest page size supported by +- // the processor. ++ // large_page_size on Linux is used to round up heap size. x86 uses either ++ // 2M or 4M page, depending on whether PAE (Physical Address Extensions) ++ // mode is enabled. AMD64/EM64T uses 2M page in 64bit mode. IA64 can use ++ // page as large as 256M. ++ // ++ // Here we try to figure out page size by parsing /proc/meminfo and looking ++ // for a line with the following format: ++ // Hugepagesize: 2048 kB ++ // ++ // If we can't determine the value (e.g. /proc is not mounted, or the text ++ // format has been changed), we'll use the largest page size supported by ++ // the processor. + + #ifndef ZERO +- _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) +- ARM_ONLY(2 * M) PPC_ONLY(4 * M); ++ large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M) ++ ARM_ONLY(2 * M) PPC_ONLY(4 * M); + #endif // ZERO + +- FILE *fp = fopen("/proc/meminfo", "r"); +- if (fp) { +- while (!feof(fp)) { +- int x = 0; +- char buf[16]; +- if (fscanf(fp, "Hugepagesize: %d", &x) == 1) { +- if (x && fgets(buf, sizeof(buf), fp) && strcmp(buf, " kB\n") == 0) { +- _large_page_size = x * K; +- break; +- } +- } else { +- // skip to next line +- for (;;) { +- int ch = fgetc(fp); +- if (ch == EOF || ch == (int)'\n') break; +- } ++ FILE *fp = fopen("/proc/meminfo", "r"); ++ if (fp) { ++ while (!feof(fp)) { ++ int x = 0; ++ char buf[16]; ++ if (fscanf(fp, "Hugepagesize: %d", &x) == 1) { ++ if (x && fgets(buf, sizeof(buf), fp) && strcmp(buf, " kB\n") == 0) { ++ large_page_size = x * K; ++ break; ++ } ++ } else { ++ // skip to next line ++ for (;;) { ++ int ch = fgetc(fp); ++ if (ch == EOF || ch == (int)'\n') break; + } + } +- fclose(fp); + } ++ fclose(fp); + } + +- // print a warning if any large page related flag is specified on command line +- bool warn_on_failure = !FLAG_IS_DEFAULT(UseHugeTLBFS); ++ if (!FLAG_IS_DEFAULT(LargePageSizeInBytes) && LargePageSizeInBytes != large_page_size) { ++ warning("Setting LargePageSizeInBytes has no effect on this OS. Large page size is " ++ SIZE_FORMAT "%s.", byte_size_in_proper_unit(large_page_size), ++ proper_unit_for_byte_size(large_page_size)); ++ } + -+ /** -+ * JDK element attribute limit; Note that the existing system property -+ * "elementAttributeLimit" with no prefix is still observed -+ */ -+ public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit"; ++ return large_page_size; ++} + ++size_t os::Linux::setup_large_page_size() { ++ _large_page_size = Linux::find_large_page_size(); + const size_t default_page_size = (size_t)Linux::page_size(); + if (_large_page_size > default_page_size) { + _page_sizes[0] = _large_page_size; + _page_sizes[1] = default_page_size; + _page_sizes[2] = 0; + } +- UseHugeTLBFS = UseHugeTLBFS && +- Linux::hugetlbfs_sanity_check(warn_on_failure, _large_page_size); + +- if (UseHugeTLBFS) ++ return _large_page_size; ++} + -+ /** -+ * JDK maxOccur limit; Note that the existing system property -+ * "maxOccurLimit" with no prefix is still observed -+ */ -+ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit"; ++bool os::Linux::setup_large_page_type(size_t page_size) { ++ if (FLAG_IS_DEFAULT(UseHugeTLBFS) && ++ FLAG_IS_DEFAULT(UseSHM) && ++ FLAG_IS_DEFAULT(UseTransparentHugePages)) { + -+ /** -+ * JDK total entity size limit -+ */ -+ public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit"; ++ // The type of large pages has not been specified by the user. + -+ /** -+ * JDK maximum general entity size limit -+ */ -+ public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; -+ /** -+ * JDK maximum parameter entity size limit -+ */ -+ public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit"; -+ /** -+ * JDK maximum XML name limit -+ */ -+ public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit"; ++ // Try UseHugeTLBFS and then UseSHM. ++ UseHugeTLBFS = UseSHM = true; + -+ //legacy System Properties -+ public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; -+ public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; -+ public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; ++ // Don't try UseTransparentHugePages since there are known ++ // performance issues with it turned on. This might change in the future. ++ UseTransparentHugePages = false; ++ } + -+ /** -+ * A string "yes" that can be used for properties such as getEntityCountInfo -+ */ -+ public static final String JDK_YES = "yes"; ++ if (UseTransparentHugePages) { ++ bool warn_on_failure = !FLAG_IS_DEFAULT(UseTransparentHugePages); ++ if (transparent_huge_pages_sanity_check(warn_on_failure, page_size)) { ++ UseHugeTLBFS = false; ++ UseSHM = false; ++ return true; ++ } ++ UseTransparentHugePages = false; ++ } + -+ // - // DOM features - // - -@@ -443,7 +542,7 @@ - public static final String LOCALE_PROPERTY = "locale"; ++ if (UseHugeTLBFS) { ++ bool warn_on_failure = !FLAG_IS_DEFAULT(UseHugeTLBFS); ++ if (hugetlbfs_sanity_check(warn_on_failure, page_size)) { ++ UseSHM = false; ++ return true; ++ } ++ UseHugeTLBFS = false; ++ } ++ ++ return UseSHM; ++} ++ ++void os::large_page_init() { ++ if (!UseLargePages && ++ !UseTransparentHugePages && ++ !UseHugeTLBFS && ++ !UseSHM) { ++ // Not using large pages. ++ return; ++ } ++ ++ if (!FLAG_IS_DEFAULT(UseLargePages) && !UseLargePages) { ++ // The user explicitly turned off large pages. ++ // Ignore the rest of the large pages flags. ++ UseTransparentHugePages = false; ++ UseHugeTLBFS = false; + UseSHM = false; ++ return; ++ } - /** property identifier: security manager. */ -- protected static final String SECURITY_MANAGER = -+ public static final String SECURITY_MANAGER = - Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; +- UseLargePages = UseHugeTLBFS || UseSHM; ++ size_t large_page_size = Linux::setup_large_page_size(); ++ UseLargePages = Linux::setup_large_page_type(large_page_size); + set_coredump_filter(); + } +@@ -3345,16 +3408,22 @@ + #define SHM_HUGETLB 04000 + #endif -@@ -511,9 +610,6 @@ - */ - public final static String ATTRIBUTE_DECLARED = "ATTRIBUTE_DECLARED"; +-char* os::reserve_memory_special(size_t bytes, char* req_addr, bool exec) { ++char* os::Linux::reserve_memory_special_shm(size_t bytes, size_t alignment, char* req_addr, bool exec) { + // "exec" is passed in but not used. Creating the shared image for + // the code cache doesn't have an SHM_X executable permission to check. + assert(UseLargePages && UseSHM, "only for SHM large pages"); ++ assert(is_ptr_aligned(req_addr, os::large_page_size()), "Unaligned address"); ++ ++ if (!is_size_aligned(bytes, os::large_page_size()) || alignment > os::large_page_size()) { ++ return NULL; // Fallback to small pages. ++ } -- public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; -- -- public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; + key_t key = IPC_PRIVATE; + char *addr; + + bool warn_on_failure = UseLargePages && + (!FLAG_IS_DEFAULT(UseLargePages) || ++ !FLAG_IS_DEFAULT(UseSHM) || + !FLAG_IS_DEFAULT(LargePageSizeInBytes) + ); + char msg[128]; +@@ -3402,42 +3471,220 @@ + return NULL; + } - /** - * {@link org.w3c.dom.TypeInfo} associated with current element/attribute ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java 2014-04-20 12:39:47.000000000 -0700 -@@ -25,6 +25,7 @@ +- if ((addr != NULL) && UseNUMAInterleaving) { +- numa_make_global(addr, bytes); ++ return addr; ++} ++ ++static void warn_on_large_pages_failure(char* req_addr, size_t bytes, int error) { ++ assert(error == ENOMEM, "Only expect to fail if no memory is available"); ++ ++ bool warn_on_failure = UseLargePages && ++ (!FLAG_IS_DEFAULT(UseLargePages) || ++ !FLAG_IS_DEFAULT(UseHugeTLBFS) || ++ !FLAG_IS_DEFAULT(LargePageSizeInBytes)); ++ ++ if (warn_on_failure) { ++ char msg[128]; ++ jio_snprintf(msg, sizeof(msg), "Failed to reserve large pages memory req_addr: " ++ PTR_FORMAT " bytes: " SIZE_FORMAT " (errno = %d).", req_addr, bytes, error); ++ warning(msg); ++ } ++} ++ ++char* os::Linux::reserve_memory_special_huge_tlbfs_only(size_t bytes, char* req_addr, bool exec) { ++ assert(UseLargePages && UseHugeTLBFS, "only for Huge TLBFS large pages"); ++ assert(is_size_aligned(bytes, os::large_page_size()), "Unaligned size"); ++ assert(is_ptr_aligned(req_addr, os::large_page_size()), "Unaligned address"); ++ ++ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; ++ char* addr = (char*)::mmap(req_addr, bytes, prot, ++ MAP_PRIVATE|MAP_ANONYMOUS|MAP_HUGETLB, ++ -1, 0); ++ ++ if (addr == MAP_FAILED) { ++ warn_on_large_pages_failure(req_addr, bytes, errno); ++ return NULL; + } - package com.sun.org.apache.xerces.internal.impl; +- // The memory is committed +- MemTracker::record_virtual_memory_reserve_and_commit((address)addr, bytes, mtNone, CALLER_PC); ++ assert(is_ptr_aligned(addr, os::large_page_size()), "Must be"); -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.xml.internal.stream.StaxEntityResolverWrapper; - import java.util.HashMap; -@@ -50,12 +51,16 @@ + return addr; + } - private static final String STRING_INTERNING = "http://xml.org/sax/features/string-interning"; ++char* os::Linux::reserve_memory_special_huge_tlbfs_mixed(size_t bytes, size_t alignment, char* req_addr, bool exec) { ++ size_t large_page_size = os::large_page_size(); ++ ++ assert(bytes >= large_page_size, "Shouldn't allocate large pages for small sizes"); ++ ++ // Allocate small pages. ++ ++ char* start; ++ if (req_addr != NULL) { ++ assert(is_ptr_aligned(req_addr, alignment), "Must be"); ++ assert(is_size_aligned(bytes, alignment), "Must be"); ++ start = os::reserve_memory(bytes, req_addr); ++ assert(start == NULL || start == req_addr, "Must be"); ++ } else { ++ start = os::reserve_memory_aligned(bytes, alignment); ++ } ++ ++ if (start == NULL) { ++ return NULL; ++ } ++ ++ assert(is_ptr_aligned(start, alignment), "Must be"); ++ ++ // os::reserve_memory_special will record this memory area. ++ // Need to release it here to prevent overlapping reservations. ++ MemTracker::record_virtual_memory_release((address)start, bytes); ++ ++ char* end = start + bytes; ++ ++ // Find the regions of the allocated chunk that can be promoted to large pages. ++ char* lp_start = (char*)align_ptr_up(start, large_page_size); ++ char* lp_end = (char*)align_ptr_down(end, large_page_size); ++ ++ size_t lp_bytes = lp_end - lp_start; ++ ++ assert(is_size_aligned(lp_bytes, large_page_size), "Must be"); ++ ++ if (lp_bytes == 0) { ++ // The mapped region doesn't even span the start and the end of a large page. ++ // Fall back to allocate a non-special area. ++ ::munmap(start, end - start); ++ return NULL; ++ } ++ ++ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; ++ ++ ++ void* result; ++ ++ if (start != lp_start) { ++ result = ::mmap(start, lp_start - start, prot, ++ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, ++ -1, 0); ++ if (result == MAP_FAILED) { ++ ::munmap(lp_start, end - lp_start); ++ return NULL; ++ } ++ } ++ ++ result = ::mmap(lp_start, lp_bytes, prot, ++ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED|MAP_HUGETLB, ++ -1, 0); ++ if (result == MAP_FAILED) { ++ warn_on_large_pages_failure(req_addr, bytes, errno); ++ // If the mmap above fails, the large pages region will be unmapped and we ++ // have regions before and after with small pages. Release these regions. ++ // ++ // | mapped | unmapped | mapped | ++ // ^ ^ ^ ^ ++ // start lp_start lp_end end ++ // ++ ::munmap(start, lp_start - start); ++ ::munmap(lp_end, end - lp_end); ++ return NULL; ++ } ++ ++ if (lp_end != end) { ++ result = ::mmap(lp_end, end - lp_end, prot, ++ MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, ++ -1, 0); ++ if (result == MAP_FAILED) { ++ ::munmap(start, lp_end - start); ++ return NULL; ++ } ++ } ++ ++ return start; ++} ++ ++char* os::Linux::reserve_memory_special_huge_tlbfs(size_t bytes, size_t alignment, char* req_addr, bool exec) { ++ assert(UseLargePages && UseHugeTLBFS, "only for Huge TLBFS large pages"); ++ assert(is_ptr_aligned(req_addr, alignment), "Must be"); ++ assert(is_power_of_2(alignment), "Must be"); ++ assert(is_power_of_2(os::large_page_size()), "Must be"); ++ assert(bytes >= os::large_page_size(), "Shouldn't allocate large pages for small sizes"); ++ ++ if (is_size_aligned(bytes, os::large_page_size()) && alignment <= os::large_page_size()) { ++ return reserve_memory_special_huge_tlbfs_only(bytes, req_addr, exec); ++ } else { ++ return reserve_memory_special_huge_tlbfs_mixed(bytes, alignment, req_addr, exec); ++ } ++} ++ ++char* os::reserve_memory_special(size_t bytes, size_t alignment, char* req_addr, bool exec) { ++ assert(UseLargePages, "only for large pages"); ++ ++ char* addr; ++ if (UseSHM) { ++ addr = os::Linux::reserve_memory_special_shm(bytes, alignment, req_addr, exec); ++ } else { ++ assert(UseHugeTLBFS, "must be"); ++ addr = os::Linux::reserve_memory_special_huge_tlbfs(bytes, alignment, req_addr, exec); ++ } ++ ++ if (addr != NULL) { ++ if (UseNUMAInterleaving) { ++ numa_make_global(addr, bytes); ++ } ++ ++ // The memory is committed ++ MemTracker::record_virtual_memory_reserve_and_commit((address)addr, bytes, mtNone, CALLER_PC); ++ } ++ ++ return addr; ++} ++ ++bool os::Linux::release_memory_special_shm(char* base, size_t bytes) { ++ // detaching the SHM segment will also delete it, see reserve_memory_special_shm() ++ return shmdt(base) == 0; ++} ++ ++bool os::Linux::release_memory_special_huge_tlbfs(char* base, size_t bytes) { ++ return pd_release_memory(base, bytes); ++} ++ + bool os::release_memory_special(char* base, size_t bytes) { ++ assert(UseLargePages, "only for large pages"); ++ + MemTracker::Tracker tkr = MemTracker::get_virtual_memory_release_tracker(); +- // detaching the SHM segment will also delete it, see reserve_memory_special() +- int rslt = shmdt(base); +- if (rslt == 0) { ++ ++ bool res; ++ if (UseSHM) { ++ res = os::Linux::release_memory_special_shm(base, bytes); ++ } else { ++ assert(UseHugeTLBFS, "must be"); ++ res = os::Linux::release_memory_special_huge_tlbfs(base, bytes); ++ } ++ ++ if (res) { + tkr.record((address)base, bytes); +- return true; + } else { + tkr.discard(); +- return false; + } ++ ++ return res; + } -+ /** Property identifier: Security manager. */ -+ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; + - /** Property identifier: Security property manager. */ - private static final String XML_SECURITY_PROPERTY_MANAGER = - Constants.XML_SECURITY_PROPERTY_MANAGER; + size_t os::large_page_size() { + return _large_page_size; + } - HashMap supportedProps = new HashMap(); +-// HugeTLBFS allows application to commit large page memory on demand; +-// with SysV SHM the entire memory region must be allocated as shared ++// With SysV SHM the entire memory region must be allocated as shared + // memory. ++// HugeTLBFS allows application to commit large page memory on demand. ++// However, when committing memory with HugeTLBFS fails, the region ++// that was supposed to be committed will lose the old reservation ++// and allow other threads to steal that memory region. Because of this ++// behavior we can't commit HugeTLBFS memory. + bool os::can_commit_large_page_memory() { +- return UseHugeTLBFS; ++ return UseTransparentHugePages; + } -+ private XMLSecurityManager fSecurityManager; - private XMLSecurityPropertyManager fSecurityPropertyMgr; + bool os::can_execute_large_page_memory() { +- return UseHugeTLBFS; ++ return UseTransparentHugePages || UseHugeTLBFS; + } - public static final int CONTEXT_READER = 1; -@@ -82,6 +87,7 @@ + // Reserve memory at an arbitrary address, only if that area is +@@ -4493,6 +4740,26 @@ - HashMap properties = propertyManager.getProperties(); - supportedProps.putAll(properties); -+ fSecurityManager = (XMLSecurityManager)getProperty(SECURITY_MANAGER); - fSecurityPropertyMgr = (XMLSecurityPropertyManager)getProperty(XML_SECURITY_PROPERTY_MANAGER); - } + Linux::clock_init(); + initial_time_count = os::elapsed_counter(); ++ ++ // pthread_condattr initialization for monotonic clock ++ int status; ++ pthread_condattr_t* _condattr = os::Linux::condAttr(); ++ if ((status = pthread_condattr_init(_condattr)) != 0) { ++ fatal(err_msg("pthread_condattr_init: %s", strerror(status))); ++ } ++ // Only set the clock if CLOCK_MONOTONIC is available ++ if (Linux::supports_monotonic_clock()) { ++ if ((status = pthread_condattr_setclock(_condattr, CLOCK_MONOTONIC)) != 0) { ++ if (status == EINVAL) { ++ warning("Unable to use monotonic clock with relative timed-waits" \ ++ " - changes to the time-of-day clock may have adverse affects"); ++ } else { ++ fatal(err_msg("pthread_condattr_setclock: %s", strerror(status))); ++ } ++ } ++ } ++ // else it defaults to CLOCK_REALTIME ++ + pthread_mutex_init(&dl_mutex, NULL); -@@ -124,6 +130,8 @@ - supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE, new Boolean(false)); - supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_UNDECLARED_ELEMDEF_FEATURE, new Boolean(false)); + // If the pagesize of the VM is greater than 8K determine the appropriate +@@ -4575,6 +4842,10 @@ -+ fSecurityManager = new XMLSecurityManager(true); -+ supportedProps.put(SECURITY_MANAGER, fSecurityManager); - fSecurityPropertyMgr = new XMLSecurityPropertyManager(); - supportedProps.put(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); - } -@@ -142,6 +150,7 @@ - */ - public boolean containsProperty(String property){ - return supportedProps.containsKey(property) || -+ (fSecurityManager != null && fSecurityManager.getIndex(property) > -1) || - (fSecurityPropertyMgr!=null && fSecurityPropertyMgr.getIndex(property) > -1) ; - } + Linux::capture_initial_stack(JavaThread::stack_size_at_create()); -@@ -169,12 +178,34 @@ - supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ; ++#if defined(IA32) ++ workaround_expand_exec_shield_cs_limit(); ++#endif ++ + Linux::libpthread_init(); + if (PrintMiscellaneous && (Verbose || WizardMode)) { + tty->print_cr("[HotSpot is running with %s, %s(%s)]\n", +@@ -4591,21 +4862,23 @@ + UseNUMA = false; + } + } +- // With SHM large pages we cannot uncommit a page, so there's not way ++ // With SHM and HugeTLBFS large pages we cannot uncommit a page, so there's no way + // we can make the adaptive lgrp chunk resizing work. If the user specified +- // both UseNUMA and UseLargePages (or UseSHM) on the command line - warn and ++ // both UseNUMA and UseLargePages (or UseSHM/UseHugeTLBFS) on the command line - warn and + // disable adaptive resizing. +- if (UseNUMA && UseLargePages && UseSHM) { +- if (!FLAG_IS_DEFAULT(UseNUMA)) { +- if (FLAG_IS_DEFAULT(UseLargePages) && FLAG_IS_DEFAULT(UseSHM)) { ++ if (UseNUMA && UseLargePages && !can_commit_large_page_memory()) { ++ if (FLAG_IS_DEFAULT(UseNUMA)) { ++ UseNUMA = false; ++ } else { ++ if (FLAG_IS_DEFAULT(UseLargePages) && ++ FLAG_IS_DEFAULT(UseSHM) && ++ FLAG_IS_DEFAULT(UseHugeTLBFS)) { + UseLargePages = false; + } else { +- warning("UseNUMA is not fully compatible with SHM large pages, disabling adaptive resizing"); ++ warning("UseNUMA is not fully compatible with SHM/HugeTLBFS large pages, disabling adaptive resizing"); + UseAdaptiveSizePolicy = false; + UseAdaptiveNUMAChunkSizing = false; } +- } else { +- UseNUMA = false; + } + } + if (!UseNUMA && ForceNUMA) { +@@ -5339,21 +5612,36 @@ -- int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(property) : -1; -- if (index > -1) { -- fSecurityPropertyMgr.setValue(index, -- XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); -- } else { -- supportedProps.put(property, value); -+ /** -+ * It's possible for users to set a security manager through the interface. -+ * If it's the old SecurityManager, convert it to the new XMLSecurityManager -+ */ -+ if (property.equals(Constants.SECURITY_MANAGER)) { -+ fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager); -+ supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager); -+ return; -+ } -+ if (property.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { -+ if (value == null) { -+ fSecurityPropertyMgr = new XMLSecurityPropertyManager(); -+ } else { -+ fSecurityPropertyMgr = (XMLSecurityPropertyManager)value; -+ } -+ supportedProps.put(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); -+ return; -+ } + static struct timespec* compute_abstime(timespec* abstime, jlong millis) { + if (millis < 0) millis = 0; +- struct timeval now; +- int status = gettimeofday(&now, NULL); +- assert(status == 0, "gettimeofday"); + -+ //check if the property is managed by security manager -+ if (fSecurityManager == null || -+ !fSecurityManager.setLimit(property, XMLSecurityManager.State.APIPROPERTY, value)) { -+ //check if the property is managed by security property manager -+ if (fSecurityPropertyMgr == null || -+ !fSecurityPropertyMgr.setValue(property, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { -+ //fall back to the existing property manager -+ supportedProps.put(property, value); -+ } - } + jlong seconds = millis / 1000; + millis %= 1000; + if (seconds > 50000000) { // see man cond_timedwait(3T) + seconds = 50000000; + } +- abstime->tv_sec = now.tv_sec + seconds; +- long usec = now.tv_usec + millis * 1000; +- if (usec >= 1000000) { +- abstime->tv_sec += 1; +- usec -= 1000000; ++ ++ if (os::Linux::supports_monotonic_clock()) { ++ struct timespec now; ++ int status = os::Linux::clock_gettime(CLOCK_MONOTONIC, &now); ++ assert_status(status == 0, status, "clock_gettime"); ++ abstime->tv_sec = now.tv_sec + seconds; ++ long nanos = now.tv_nsec + millis * NANOSECS_PER_MILLISEC; ++ if (nanos >= NANOSECS_PER_SEC) { ++ abstime->tv_sec += 1; ++ nanos -= NANOSECS_PER_SEC; ++ } ++ abstime->tv_nsec = nanos; ++ } else { ++ struct timeval now; ++ int status = gettimeofday(&now, NULL); ++ assert(status == 0, "gettimeofday"); ++ abstime->tv_sec = now.tv_sec + seconds; ++ long usec = now.tv_usec + millis * 1000; ++ if (usec >= 1000000) { ++ abstime->tv_sec += 1; ++ usec -= 1000000; ++ } ++ abstime->tv_nsec = usec * 1000; + } +- abstime->tv_nsec = usec * 1000; + return abstime; + } - if(equivalentProperty != null){ ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java 2014-04-20 12:39:47.000000000 -0700 -@@ -108,6 +108,7 @@ - * @author Elena Litani, IBM - * @author Michael Glavassevich, IBM - * @author Sunitha Reddy, Sun Microsystems -+ * @version $Id: XML11NSDocumentScannerImpl.java,v 1.6 2010-11-01 04:39:40 joehw Exp $ +@@ -5445,7 +5733,7 @@ + status = os::Linux::safe_cond_timedwait(_cond, _mutex, &abst); + if (status != 0 && WorkAroundNPTLTimedWaitHang) { + pthread_cond_destroy (_cond); +- pthread_cond_init (_cond, NULL) ; ++ pthread_cond_init (_cond, os::Linux::condAttr()) ; + } + assert_status(status == 0 || status == EINTR || + status == ETIME || status == ETIMEDOUT, +@@ -5524,7 +5812,6 @@ + * is no need to track notifications. */ - public class XML11NSDocumentScannerImpl extends XML11DocumentScannerImpl { -@@ -236,7 +237,8 @@ +-#define MAX_SECS 100000000 + /* + * This code is common to linux and solaris and will be moved to a + * common place in dolphin. +@@ -5546,32 +5833,50 @@ - // attributes - scanAttribute(fAttributes); -- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ -+ if (fSecurityManager != null && (!fSecurityManager.isNoLimit(fElementAttributeLimit)) && -+ fAttributes.getLength() > fElementAttributeLimit){ - fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, - "ElementAttributeLimit", - new Object[]{rawname, new Integer(fElementAttributeLimit) }, ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java 2014-04-20 12:39:47.000000000 -0700 -@@ -44,6 +44,9 @@ - import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; - import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; - import com.sun.org.apache.xerces.internal.impl.Constants; -+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; -+import com.sun.xml.internal.stream.Entity; + static void unpackTime(timespec* absTime, bool isAbsolute, jlong time) { + assert (time > 0, "convertTime"); ++ time_t max_secs = 0; - /** - * This class is responsible for scanning the declarations found -@@ -66,7 +69,7 @@ - * @author Glenn Marcy, IBM - * @author Eric Ye, IBM - * -- * @version $Id: XMLDTDScannerImpl.java,v 1.7 2007/09/26 12:52:40 ndw Exp $ -+ * @version $Id: XMLDTDScannerImpl.java,v 1.8 2010-11-01 04:39:41 joehw Exp $ - */ - public class XMLDTDScannerImpl - extends XMLScanner -@@ -260,6 +263,11 @@ - fEntityManager.startDTDEntity(inputSource); - } // setInputSource(XMLInputSource) +- struct timeval now; +- int status = gettimeofday(&now, NULL); +- assert(status == 0, "gettimeofday"); +- +- time_t max_secs = now.tv_sec + MAX_SECS; +- +- if (isAbsolute) { +- jlong secs = time / 1000; +- if (secs > max_secs) { +- absTime->tv_sec = max_secs; +- } +- else { +- absTime->tv_sec = secs; ++ if (!os::Linux::supports_monotonic_clock() || isAbsolute) { ++ struct timeval now; ++ int status = gettimeofday(&now, NULL); ++ assert(status == 0, "gettimeofday"); ++ ++ max_secs = now.tv_sec + MAX_SECS; ++ ++ if (isAbsolute) { ++ jlong secs = time / 1000; ++ if (secs > max_secs) { ++ absTime->tv_sec = max_secs; ++ } else { ++ absTime->tv_sec = secs; ++ } ++ absTime->tv_nsec = (time % 1000) * NANOSECS_PER_MILLISEC; ++ } else { ++ jlong secs = time / NANOSECS_PER_SEC; ++ if (secs >= MAX_SECS) { ++ absTime->tv_sec = max_secs; ++ absTime->tv_nsec = 0; ++ } else { ++ absTime->tv_sec = now.tv_sec + secs; ++ absTime->tv_nsec = (time % NANOSECS_PER_SEC) + now.tv_usec*1000; ++ if (absTime->tv_nsec >= NANOSECS_PER_SEC) { ++ absTime->tv_nsec -= NANOSECS_PER_SEC; ++ ++absTime->tv_sec; // note: this must be <= max_secs ++ } ++ } + } +- absTime->tv_nsec = (time % 1000) * NANOSECS_PER_MILLISEC; +- } +- else { ++ } else { ++ // must be relative using monotonic clock ++ struct timespec now; ++ int status = os::Linux::clock_gettime(CLOCK_MONOTONIC, &now); ++ assert_status(status == 0, status, "clock_gettime"); ++ max_secs = now.tv_sec + MAX_SECS; + jlong secs = time / NANOSECS_PER_SEC; + if (secs >= MAX_SECS) { + absTime->tv_sec = max_secs; + absTime->tv_nsec = 0; +- } +- else { ++ } else { + absTime->tv_sec = now.tv_sec + secs; +- absTime->tv_nsec = (time % NANOSECS_PER_SEC) + now.tv_usec*1000; ++ absTime->tv_nsec = (time % NANOSECS_PER_SEC) + now.tv_nsec; + if (absTime->tv_nsec >= NANOSECS_PER_SEC) { + absTime->tv_nsec -= NANOSECS_PER_SEC; + ++absTime->tv_sec; // note: this must be <= max_secs +@@ -5650,16 +5955,20 @@ + OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() +- ++ assert(_cur_index == -1, "invariant"); + if (time == 0) { +- status = pthread_cond_wait (_cond, _mutex) ; ++ _cur_index = REL_INDEX; // arbitrary choice when not timed ++ status = pthread_cond_wait (&_cond[_cur_index], _mutex) ; + } else { +- status = os::Linux::safe_cond_timedwait (_cond, _mutex, &absTime) ; ++ _cur_index = isAbsolute ? ABS_INDEX : REL_INDEX; ++ status = os::Linux::safe_cond_timedwait (&_cond[_cur_index], _mutex, &absTime) ; + if (status != 0 && WorkAroundNPTLTimedWaitHang) { +- pthread_cond_destroy (_cond) ; +- pthread_cond_init (_cond, NULL); ++ pthread_cond_destroy (&_cond[_cur_index]) ; ++ pthread_cond_init (&_cond[_cur_index], isAbsolute ? NULL : os::Linux::condAttr()); + } + } ++ _cur_index = -1; ++ + assert_status(status == 0 || status == EINTR || + status == ETIME || status == ETIMEDOUT, + status, "cond_timedwait"); +@@ -5688,17 +5997,24 @@ + s = _counter; + _counter = 1; + if (s < 1) { +- if (WorkAroundNPTLTimedWaitHang) { +- status = pthread_cond_signal (_cond) ; +- assert (status == 0, "invariant") ; ++ // thread might be parked ++ if (_cur_index != -1) { ++ // thread is definitely parked ++ if (WorkAroundNPTLTimedWaitHang) { ++ status = pthread_cond_signal (&_cond[_cur_index]); ++ assert (status == 0, "invariant"); + status = pthread_mutex_unlock(_mutex); +- assert (status == 0, "invariant") ; +- } else { ++ assert (status == 0, "invariant"); ++ } else { + status = pthread_mutex_unlock(_mutex); +- assert (status == 0, "invariant") ; +- status = pthread_cond_signal (_cond) ; +- assert (status == 0, "invariant") ; +- } ++ assert (status == 0, "invariant"); ++ status = pthread_cond_signal (&_cond[_cur_index]); ++ assert (status == 0, "invariant"); ++ } ++ } else { ++ pthread_mutex_unlock(_mutex); ++ assert (status == 0, "invariant") ; ++ } + } else { + pthread_mutex_unlock(_mutex); + assert (status == 0, "invariant") ; +@@ -5914,3 +6230,149 @@ + } + #endif // JAVASE_EMBEDDED + -+ public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) { -+ fLimitAnalyzer = limitAnalyzer; ++ ++/////////////// Unit tests /////////////// ++ ++#ifndef PRODUCT ++ ++#define test_log(...) \ ++ do {\ ++ if (VerboseInternalVMTests) { \ ++ tty->print_cr(__VA_ARGS__); \ ++ tty->flush(); \ ++ }\ ++ } while (false) ++ ++class TestReserveMemorySpecial : AllStatic { ++ public: ++ static void small_page_write(void* addr, size_t size) { ++ size_t page_size = os::vm_page_size(); ++ ++ char* end = (char*)addr + size; ++ for (char* p = (char*)addr; p < end; p += page_size) { ++ *p = 1; + } ++ } + - /** - * Scans the external subset of the document. - * -@@ -1545,7 +1553,7 @@ - - // internal entity - if (systemId == null) { -- scanEntityValue(fLiteral, fLiteral2); -+ scanEntityValue(name, isPEDecl, fLiteral, fLiteral2); - // since we need it's value anyway, let's snag it so it doesn't get corrupted - // if a new load takes place before we store the entity values - fStringBuffer.clear(); -@@ -1610,7 +1618,7 @@ - * the use of scanCharReferenceValue), and fStringBuffer2, anything in them - * at the time of calling is lost. - */ -- protected final void scanEntityValue(XMLString value, -+ protected final void scanEntityValue(String entityName, boolean isPEDecl, XMLString value, - XMLString nonNormalizedValue) - throws IOException, XNIException { - int quote = fEntityScanner.scanChar(); -@@ -1622,10 +1630,20 @@ - - XMLString literal = fString; - XMLString literal2 = fString; -+ int countChar = 0; -+ if (fLimitAnalyzer == null ) { -+ fLimitAnalyzer = new XMLLimitAnalyzer(); -+ } -+ fLimitAnalyzer.startEntity(entityName); ++ static void test_reserve_memory_special_huge_tlbfs_only(size_t size) { ++ if (!UseHugeTLBFS) { ++ return; ++ } + - if (fEntityScanner.scanLiteral(quote, fString) != quote) { - fStringBuffer.clear(); - fStringBuffer2.clear(); - do { -+ if (isPEDecl && fLimitAnalyzer != null) { -+ checkLimit("%" + entityName, fString.length + countChar); -+ } -+ countChar = 0; - fStringBuffer.append(fString); - fStringBuffer2.append(fString); - if (fEntityScanner.skipChar('&')) { -@@ -1685,6 +1703,7 @@ - } - } - else { -+ countChar++; - int c = fEntityScanner.peekChar(); - if (XMLChar.isHighSurrogate(c)) { - scanSurrogates(fStringBuffer2); -@@ -1708,9 +1727,17 @@ - fStringBuffer2.append(fString); - literal = fStringBuffer; - literal2 = fStringBuffer2; -+ } else { -+ if (isPEDecl) { -+ checkLimit("%" + entityName, literal); -+ } - } - value.setValues(literal); - nonNormalizedValue.setValues(literal2); -+ if (fLimitAnalyzer != null) { -+ fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName); -+ } ++ test_log("test_reserve_memory_special_huge_tlbfs_only(" SIZE_FORMAT ")", size); + - if (!fEntityScanner.skipChar(quote)) { - reportFatalError("CloseQuoteMissingInDecl", null); - } -@@ -2124,6 +2151,45 @@ - // set starting state - setScannerState(SCANNER_STATE_TEXT_DECL); - //new SymbolTable()); ++ char* addr = os::Linux::reserve_memory_special_huge_tlbfs_only(size, NULL, false); + -+ fLimitAnalyzer = new XMLLimitAnalyzer(); ++ if (addr != NULL) { ++ small_page_write(addr, size); ++ ++ os::Linux::release_memory_special_huge_tlbfs(addr, size); + } ++ } + -+ /** -+ * Add the count of the content buffer and check if the accumulated -+ * value exceeds the limit -+ * @param entityName entity name -+ * @param buffer content buffer -+ */ -+ private void checkLimit(String entityName, XMLString buffer) { -+ checkLimit(entityName, buffer.length); ++ static void test_reserve_memory_special_huge_tlbfs_only() { ++ if (!UseHugeTLBFS) { ++ return; + } + -+ /** -+ * Add the count and check limit -+ * @param entityName entity name -+ * @param len length of the buffer -+ */ -+ private void checkLimit(String entityName, int len) { -+ if (fLimitAnalyzer == null) { -+ fLimitAnalyzer = new XMLLimitAnalyzer(); -+ } -+ fLimitAnalyzer.addValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName, len); -+ if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { -+ fSecurityManager.debugPrint(fLimitAnalyzer); -+ reportFatalError("MaxEntitySizeLimit", new Object[]{entityName, -+ fLimitAnalyzer.getValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)}); -+ } -+ if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { -+ fSecurityManager.debugPrint(fLimitAnalyzer); -+ reportFatalError("TotalEntitySizeLimit", -+ new Object[]{fLimitAnalyzer.getTotalValue(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)}); -+ } ++ size_t lp = os::large_page_size(); + - } - - public DTDGrammar getGrammar(){ ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java 2014-04-20 12:39:47.000000000 -0700 -@@ -50,12 +50,14 @@ - import com.sun.org.apache.xerces.internal.xni.Augmentations; - import com.sun.org.apache.xerces.internal.impl.Constants; - import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.NamespaceSupport; - import com.sun.org.apache.xerces.internal.utils.SecuritySupport; -+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.State; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.NamespaceContext; --import com.sun.xml.internal.stream.Entity; - import javax.xml.XMLConstants; - import javax.xml.stream.XMLStreamConstants; - import javax.xml.stream.events.XMLEvent; -@@ -165,7 +167,7 @@ - - /** Feature identifier: standard uri conformant */ - protected static final String STANDARD_URI_CONFORMANT = -- Constants.XERCES_FEATURE_PREFIX +Constants.STANDARD_URI_CONFORMANT_FEATURE; -+ Constants.XERCES_FEATURE_PREFIX + Constants.STANDARD_URI_CONFORMANT_FEATURE; ++ for (size_t size = lp; size <= lp * 10; size += lp) { ++ test_reserve_memory_special_huge_tlbfs_only(size); ++ } ++ } ++ ++ static void test_reserve_memory_special_huge_tlbfs_mixed(size_t size, size_t alignment) { ++ if (!UseHugeTLBFS) { ++ return; ++ } ++ ++ test_log("test_reserve_memory_special_huge_tlbfs_mixed(" SIZE_FORMAT ", " SIZE_FORMAT ")", ++ size, alignment); ++ ++ assert(size >= os::large_page_size(), "Incorrect input to test"); ++ ++ char* addr = os::Linux::reserve_memory_special_huge_tlbfs_mixed(size, alignment, NULL, false); ++ ++ if (addr != NULL) { ++ small_page_write(addr, size); ++ ++ os::Linux::release_memory_special_huge_tlbfs(addr, size); ++ } ++ } ++ ++ static void test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(size_t size) { ++ size_t lp = os::large_page_size(); ++ size_t ag = os::vm_allocation_granularity(); ++ ++ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) { ++ test_reserve_memory_special_huge_tlbfs_mixed(size, alignment); ++ } ++ } ++ ++ static void test_reserve_memory_special_huge_tlbfs_mixed() { ++ size_t lp = os::large_page_size(); ++ size_t ag = os::vm_allocation_granularity(); ++ ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp + ag); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp + lp / 2); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2 + ag); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2 - ag); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 2 + lp / 2); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 10); ++ test_reserve_memory_special_huge_tlbfs_mixed_all_alignments(lp * 10 + lp / 2); ++ } ++ ++ static void test_reserve_memory_special_huge_tlbfs() { ++ if (!UseHugeTLBFS) { ++ return; ++ } ++ ++ test_reserve_memory_special_huge_tlbfs_only(); ++ test_reserve_memory_special_huge_tlbfs_mixed(); ++ } ++ ++ static void test_reserve_memory_special_shm(size_t size, size_t alignment) { ++ if (!UseSHM) { ++ return; ++ } ++ ++ test_log("test_reserve_memory_special_shm(" SIZE_FORMAT ", " SIZE_FORMAT ")", size, alignment); ++ ++ char* addr = os::Linux::reserve_memory_special_shm(size, alignment, NULL, false); ++ ++ if (addr != NULL) { ++ assert(is_ptr_aligned(addr, alignment), "Check"); ++ assert(is_ptr_aligned(addr, os::large_page_size()), "Check"); ++ ++ small_page_write(addr, size); ++ ++ os::Linux::release_memory_special_shm(addr, size); ++ } ++ } ++ ++ static void test_reserve_memory_special_shm() { ++ size_t lp = os::large_page_size(); ++ size_t ag = os::vm_allocation_granularity(); ++ ++ for (size_t size = ag; size < lp * 3; size += ag) { ++ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) { ++ test_reserve_memory_special_shm(size, alignment); ++ } ++ } ++ } ++ ++ static void test() { ++ test_reserve_memory_special_huge_tlbfs(); ++ test_reserve_memory_special_shm(); ++ } ++}; ++ ++void TestReserveMemorySpecial_test() { ++ TestReserveMemorySpecial::test(); ++} ++ ++#endif +--- ./hotspot/src/os/linux/vm/os_linux.hpp 2013-09-06 11:22:03.000000000 -0700 ++++ ./hotspot/src/os/linux/vm/os_linux.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -32,6 +32,7 @@ - /** Property identifier: Security property manager. */ - private static final String XML_SECURITY_PROPERTY_MANAGER = -@@ -213,11 +215,8 @@ - }; + class Linux { + friend class os; ++ friend class TestReserveMemorySpecial; - private static final char [] cdata = {'[','C','D','A','T','A','['}; -- private static final char [] endTag = {'<','/'}; -- -- //this variable is also used by XMLDocumentScannerImpl in the same package - static final char [] xmlDecl = {'<','?','x','m','l'}; -- -+ private static final char [] endTag = {'<','/'}; - // debugging + // For signal-chaining + #define MAXSIGNUM 32 +@@ -92,8 +93,21 @@ + static void rebuild_cpu_to_node_map(); + static GrowableArray* cpu_to_node() { return _cpu_to_node; } - /** Debug scanner state. */ -@@ -316,6 +315,7 @@ - protected String fDeclaredEncoding = null; - /** Xerces Feature: Disallow doctype declaration. */ - protected boolean fDisallowDoctype = false; ++ static size_t find_large_page_size(); ++ static size_t setup_large_page_size(); + - /** - * comma-delimited list of protocols that are allowed for the purpose - * of accessing external dtd or entity references -@@ -384,7 +384,6 @@ ++ static bool setup_large_page_type(size_t page_size); ++ static bool transparent_huge_pages_sanity_check(bool warn, size_t pages_size); + static bool hugetlbfs_sanity_check(bool warn, size_t page_size); - protected boolean foundBuiltInRefs = false; ++ static char* reserve_memory_special_shm(size_t bytes, size_t alignment, char* req_addr, bool exec); ++ static char* reserve_memory_special_huge_tlbfs(size_t bytes, size_t alignment, char* req_addr, bool exec); ++ static char* reserve_memory_special_huge_tlbfs_only(size_t bytes, char* req_addr, bool exec); ++ static char* reserve_memory_special_huge_tlbfs_mixed(size_t bytes, size_t alignment, char* req_addr, bool exec); ++ ++ static bool release_memory_special_shm(char* base, size_t bytes); ++ static bool release_memory_special_huge_tlbfs(char* base, size_t bytes); ++ + static void print_full_memory_info(outputStream* st); + static void print_distro_info(outputStream* st); + static void print_libversion_info(outputStream* st); +@@ -207,6 +221,13 @@ + + static jlong fast_thread_cpu_time(clockid_t clockid); + ++ // pthread_cond clock suppport ++ private: ++ static pthread_condattr_t _condattr[1]; ++ ++ public: ++ static pthread_condattr_t* condAttr() { return _condattr; } ++ + // Stack repair handling + + // none present +@@ -273,7 +294,7 @@ + public: + PlatformEvent() { + int status; +- status = pthread_cond_init (_cond, NULL); ++ status = pthread_cond_init (_cond, os::Linux::condAttr()); + assert_status(status == 0, status, "cond_init"); + status = pthread_mutex_init (_mutex, NULL); + assert_status(status == 0, status, "mutex_init"); +@@ -288,14 +309,19 @@ + void park () ; + void unpark () ; + int TryPark () ; +- int park (jlong millis) ; ++ int park (jlong millis) ; // relative timed-wait only + void SetAssociation (Thread * a) { _Assoc = a ; } + } ; + + class PlatformParker : public CHeapObj { + protected: ++ enum { ++ REL_INDEX = 0, ++ ABS_INDEX = 1 ++ }; ++ int _cur_index; // which cond is in use: -1, 0, 1 + pthread_mutex_t _mutex [1] ; +- pthread_cond_t _cond [1] ; ++ pthread_cond_t _cond [2] ; // one for relative times and one for abs. + + public: // TODO-FIXME: make dtor private + ~PlatformParker() { guarantee (0, "invariant") ; } +@@ -303,10 +329,13 @@ + public: + PlatformParker() { + int status; +- status = pthread_cond_init (_cond, NULL); +- assert_status(status == 0, status, "cond_init"); ++ status = pthread_cond_init (&_cond[REL_INDEX], os::Linux::condAttr()); ++ assert_status(status == 0, status, "cond_init rel"); ++ status = pthread_cond_init (&_cond[ABS_INDEX], NULL); ++ assert_status(status == 0, status, "cond_init abs"); + status = pthread_mutex_init (_mutex, NULL); + assert_status(status == 0, status, "mutex_init"); ++ _cur_index = -1; // mark as unused + } + }; -- protected SecurityManager fSecurityManager = null; +--- ./hotspot/src/os/posix/vm/os_posix.cpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os/posix/vm/os_posix.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +-* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. ++* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,6 +30,8 @@ + #include + #include + #include ++#include ++#include - //skip element algorithm - static final short MAX_DEPTH_LIMIT = 5 ; -@@ -570,46 +569,24 @@ - // xerces features - fReportCdataEvent = componentManager.getFeature(Constants.STAX_REPORT_CDATA_EVENT, true); -- -- fSecurityManager = (SecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null); -- fElementAttributeLimit = (fSecurityManager != null)?fSecurityManager.getElementAttrLimit():0; -- -+ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null); - fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS, false); + // Check core dump limit and report possible place where core can be found +@@ -173,11 +175,19 @@ + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%d", rlim.rlim_cur); - Object resolver = componentManager.getProperty(ENTITY_RESOLVER, null); - fExternalSubsetResolver = (resolver instanceof ExternalSubsetResolver) ? - (ExternalSubsetResolver) resolver : null; ++#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 + } -- // initialize vars -- fMarkupDepth = 0; -- fCurrentElement = null; -- fElementStack.clear(); -- fHasExternalDTD = false; -- fStandaloneSet = false; -- fStandalone = false; -- fInScanContent = false; -- //skipping algorithm -- fShouldSkip = false; -- fAdd = false; -- fSkip = false; -- - //attribute - fReadingAttributes = false; - //xxx: external entities are supported in Xerces - // it would be good to define feature for this case - fSupportExternalEntities = true; -- fSupportExternalEntities = true; -- fSupportExternalEntities = true; -- fSupportExternalEntities = true; - fReplaceEntityReferences = true; - fIsCoalesce = false; + void os::Posix::print_uname_info(outputStream* st) { +@@ -203,11 +213,17 @@ + * The callback is supposed to provide the method that should be protected. + */ + bool os::WatcherThreadCrashProtection::call(os::CrashProtectionCallback& cb) { ++ sigset_t saved_sig_mask; ++ + assert(Thread::current()->is_Watcher_thread(), "Only for WatcherThread"); + assert(!WatcherThread::watcher_thread()->has_crash_protection(), + "crash_protection already set?"); + +- if (sigsetjmp(_jmpbuf, 1) == 0) { ++ // we cannot rely on sigsetjmp/siglongjmp to save/restore the signal mask ++ // since on at least some systems (OS X) siglongjmp will restore the mask ++ // for the process, not the thread ++ pthread_sigmask(0, NULL, &saved_sig_mask); ++ if (sigsetjmp(_jmpbuf, 0) == 0) { + // make sure we can see in the signal handler that we have crash protection + // installed + WatcherThread::watcher_thread()->set_crash_protection(this); +@@ -217,6 +233,7 @@ + return true; + } + // this happens when we siglongjmp() back ++ pthread_sigmask(SIG_SETMASK, &saved_sig_mask, NULL); + WatcherThread::watcher_thread()->set_crash_protection(NULL); + return false; + } +--- ./hotspot/src/os/solaris/vm/os_solaris.cpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os/solaris/vm/os_solaris.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -3530,11 +3530,15 @@ + return true; + } - // setup Driver - setScannerState(SCANNER_STATE_CONTENT); - setDriver(fContentDriver); -- fEntityStore = fEntityManager.getEntityStore(); -- -- dtdGrammarUtil = null; +-char* os::reserve_memory_special(size_t size, char* addr, bool exec) { ++char* os::reserve_memory_special(size_t size, size_t alignment, char* addr, bool exec) { + // "exec" is passed in but not used. Creating the shared image for + // the code cache doesn't have an SHM_X executable permission to check. + assert(UseLargePages && UseISM, "only for ISM large pages"); - // JAXP 1.5 features and properties - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) -@@ -618,6 +595,7 @@ ++ if (!is_size_aligned(size, os::large_page_size()) || alignment > os::large_page_size()) { ++ return NULL; // Fallback to small pages. ++ } ++ + char* retAddr = NULL; + int shmid; + key_t ismKey; +@@ -6862,3 +6866,9 @@ - fStrictURI = componentManager.getFeature(STANDARD_URI_CONFORMANT, false); + return strlen(buffer); + } ++ ++#ifndef PRODUCT ++void TestReserveMemorySpecial_test() { ++ // No tests available for this platform ++} ++#endif +--- ./hotspot/src/os/windows/vm/os_windows.cpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os/windows/vm/os_windows.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -800,15 +800,21 @@ + return result; + } -+ resetCommon(); - //fEntityManager.test(); - } // reset(XMLComponentManager) +-// For now, we say that Windows does not support vtime. I have no idea +-// whether it can actually be made to (DLD, 9/13/05). +- +-bool os::supports_vtime() { return false; } ++bool os::supports_vtime() { return true; } + bool os::enable_vtime() { return false; } + bool os::vtime_enabled() { return false; } ++ + double os::elapsedVTime() { +- // better than nothing, but not much +- return elapsedTime(); ++ FILETIME created; ++ FILETIME exited; ++ FILETIME kernel; ++ FILETIME user; ++ if (GetThreadTimes(GetCurrentThread(), &created, &exited, &kernel, &user) != 0) { ++ // the resolution of windows_to_java_time() should be sufficient (ms) ++ return (double) (windows_to_java_time(kernel) + windows_to_java_time(user)) / MILLIUNITS; ++ } else { ++ return elapsedTime(); ++ } + } -@@ -631,17 +609,7 @@ - fNamespaces = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue(); - fNotifyBuiltInRefs = false ; + jlong os::javaTimeMillis() { +@@ -1591,6 +1597,7 @@ -- // initialize vars -- fMarkupDepth = 0; -- fCurrentElement = null; -- fShouldSkip = false; -- fAdd = false; -- fSkip = false; -- fElementStack.clear(); - //fElementStack2.clear(); -- fHasExternalDTD = false; -- fStandaloneSet = false; -- fStandalone = false; - //fReplaceEntityReferences = true; - //fSupportExternalEntities = true; - Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_REPLACING_ENTITY_REFERENCES); -@@ -662,17 +630,43 @@ - //we dont need to do this -- nb. - //setScannerState(SCANNER_STATE_CONTENT); - //setDriver(fContentDriver); -- fEntityStore = fEntityManager.getEntityStore(); - //fEntityManager.test(); + void os::win32::print_windows_version(outputStream* st) { + OSVERSIONINFOEX osvi; ++ SYSTEM_INFO si; + ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); -- dtdGrammarUtil = null; -- -- // JAXP 1.5 features and properties -+ // JAXP 1.5 features and properties - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) - propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); - fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); -+ -+ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(Constants.SECURITY_MANAGER); -+ resetCommon(); - } // reset(XMLComponentManager) +@@ -1600,6 +1607,18 @@ + } -+ void resetCommon() { -+ // initialize vars -+ fMarkupDepth = 0; -+ fCurrentElement = null; -+ fElementStack.clear(); -+ fHasExternalDTD = false; -+ fStandaloneSet = false; -+ fStandalone = false; -+ fInScanContent = false; -+ //skipping algorithm -+ fShouldSkip = false; -+ fAdd = false; -+ fSkip = false; -+ -+ fEntityStore = fEntityManager.getEntityStore(); -+ dtdGrammarUtil = null; + int os_vers = osvi.dwMajorVersion * 1000 + osvi.dwMinorVersion; + -+ if (fSecurityManager != null) { -+ fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT); -+ } else { -+ fElementAttributeLimit = 0; -+ } -+ fLimitAnalyzer = new XMLLimitAnalyzer(); -+ fEntityManager.setLimitAnalyzer(fLimitAnalyzer); ++ ZeroMemory(&si, sizeof(SYSTEM_INFO)); ++ if (os_vers >= 5002) { ++ // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could ++ // find out whether we are running on 64 bit processor or not. ++ if (os::Kernel32Dll::GetNativeSystemInfoAvailable()) { ++ os::Kernel32Dll::GetNativeSystemInfo(&si); ++ } else { ++ GetSystemInfo(&si); + } ++ } + - /** - * Returns a list of feature identifiers that are recognized by - * this component. This method may return null if no features -@@ -769,10 +763,10 @@ - - //JAXP 1.5 properties - if (propertyId.equals(XML_SECURITY_PROPERTY_MANAGER)) -- { -+ { - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)value; - fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); + if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) { + switch (os_vers) { + case 3051: st->print(" Windows NT 3.51"); break; +@@ -1607,57 +1626,48 @@ + case 5000: st->print(" Windows 2000"); break; + case 5001: st->print(" Windows XP"); break; + case 5002: ++ if (osvi.wProductType == VER_NT_WORKSTATION && ++ si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { ++ st->print(" Windows XP x64 Edition"); ++ } else { ++ st->print(" Windows Server 2003 family"); ++ } ++ break; ++ + case 6000: ++ if (osvi.wProductType == VER_NT_WORKSTATION) { ++ st->print(" Windows Vista"); ++ } else { ++ st->print(" Windows Server 2008"); ++ } ++ break; ++ + case 6001: +- case 6002: { +- // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could +- // find out whether we are running on 64 bit processor or not. +- SYSTEM_INFO si; +- ZeroMemory(&si, sizeof(SYSTEM_INFO)); +- if (!os::Kernel32Dll::GetNativeSystemInfoAvailable()){ +- GetSystemInfo(&si); ++ if (osvi.wProductType == VER_NT_WORKSTATION) { ++ st->print(" Windows 7"); + } else { +- os::Kernel32Dll::GetNativeSystemInfo(&si); ++ st->print(" Windows Server 2008 R2"); + } +- if (os_vers == 5002) { +- if (osvi.wProductType == VER_NT_WORKSTATION && +- si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) +- st->print(" Windows XP x64 Edition"); +- else +- st->print(" Windows Server 2003 family"); +- } else if (os_vers == 6000) { +- if (osvi.wProductType == VER_NT_WORKSTATION) +- st->print(" Windows Vista"); +- else +- st->print(" Windows Server 2008"); +- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) +- st->print(" , 64 bit"); +- } else if (os_vers == 6001) { +- if (osvi.wProductType == VER_NT_WORKSTATION) { +- st->print(" Windows 7"); +- } else { +- // Unrecognized windows, print out its major and minor versions +- st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); - } -+ } +- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) +- st->print(" , 64 bit"); +- } else if (os_vers == 6002) { +- if (osvi.wProductType == VER_NT_WORKSTATION) { +- st->print(" Windows 8"); +- } else { +- st->print(" Windows Server 2012"); +- } +- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) +- st->print(" , 64 bit"); +- } else { // future os +- // Unrecognized windows, print out its major and minor versions +- st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); +- if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) +- st->print(" , 64 bit"); ++ break; ++ ++ case 6002: ++ if (osvi.wProductType == VER_NT_WORKSTATION) { ++ st->print(" Windows 8"); ++ } else { ++ st->print(" Windows Server 2012"); + } + break; +- } +- default: // future windows, print out its major and minor versions ++ ++ case 6003: ++ if (osvi.wProductType == VER_NT_WORKSTATION) { ++ st->print(" Windows 8.1"); ++ } else { ++ st->print(" Windows Server 2012 R2"); ++ } ++ break; ++ ++ default: // future os ++ // Unrecognized windows, print out its major and minor versions + st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); + } + } else { +@@ -1669,6 +1679,11 @@ + st->print(" Windows %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); + } + } ++ ++ if (os_vers >= 6000 && si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { ++ st->print(" , 64 bit"); ++ } ++ + st->print(" Build %d", osvi.dwBuildNumber); + st->print(" %s", osvi.szCSDVersion); // service pack + st->cr(); +@@ -3079,7 +3094,12 @@ + return true; + } - } // setProperty(String,Object) +-char* os::reserve_memory_special(size_t bytes, char* addr, bool exec) { ++char* os::reserve_memory_special(size_t bytes, size_t alignment, char* addr, bool exec) { ++ assert(UseLargePages, "only for large pages"); ++ ++ if (!is_size_aligned(bytes, os::large_page_size()) || alignment > os::large_page_size()) { ++ return NULL; // Fallback to small pages. ++ } -@@ -1322,10 +1316,11 @@ - fAddDefaultAttr = true; - do { - scanAttribute(fAttributes); -- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ -+ if (fSecurityManager != null && !fSecurityManager.isNoLimit(fElementAttributeLimit) && -+ fAttributes.getLength() > fElementAttributeLimit){ - fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, - "ElementAttributeLimit", -- new Object[]{rawname, new Integer(fAttributes.getLength()) }, -+ new Object[]{rawname, fElementAttributeLimit }, - XMLErrorReporter.SEVERITY_FATAL_ERROR ); - } + const DWORD prot = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; + const DWORD flags = MEM_RESERVE | MEM_COMMIT | MEM_LARGE_PAGES; +@@ -5584,3 +5604,9 @@ + } -@@ -2036,6 +2031,13 @@ + #endif ++ ++#ifndef PRODUCT ++void TestReserveMemorySpecial_test() { ++ // No tests available for this platform ++} ++#endif +--- ./hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -945,7 +945,7 @@ + if (rslt != 0) + fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt)); - } // getDriverName():String +- *bottom = (address)((char *)ss.ss_sp - ss.ss_size); ++ *bottom = (address)(align_size_up((intptr_t)ss.ss_sp, os::vm_page_size()) - ss.ss_size); + *size = ss.ss_size; + #elif defined(_ALLBSD_SOURCE) + pthread_attr_t attr; +--- ./hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -24,7 +24,7 @@ + */ -+ /** -+ * Check the protocol used in the systemId against allowed protocols -+ * -+ * @param systemId the Id of the URI -+ * @param allowedProtocols a list of allowed protocols separated by comma -+ * @return the name of the protocol if rejected, null otherwise -+ */ - String checkAccess(String systemId, String allowedProtocols) throws IOException { - String baseSystemId = fEntityScanner.getBaseSystemId(); - String expandedSystemId = fEntityManager.expandSystemId(systemId, baseSystemId,fStrictURI); -@@ -2833,6 +2835,8 @@ - if(DEBUG){ - System.out.println("NOT USING THE BUFFER, STRING = " + fTempString.toString()); - } -+ //check limit before returning event -+ checkLimit(fContentBuffer); - if(dtdGrammarUtil!= null && dtdGrammarUtil.isIgnorableWhiteSpace(fContentBuffer)){ - if(DEBUG)System.out.println("Return SPACE EVENT"); - return XMLEvent.SPACE; -@@ -2931,6 +2935,8 @@ - fLastSectionWasCharacterData = true ; - continue; - }else{ -+ //check limit before returning event -+ checkLimit(fContentBuffer); - if(dtdGrammarUtil!= null && dtdGrammarUtil.isIgnorableWhiteSpace(fContentBuffer)){ - if(DEBUG)System.out.println("Return SPACE EVENT"); - return XMLEvent.SPACE; -@@ -3141,6 +3147,30 @@ - } //while loop - }//next + #if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__) +-#include ++# include + # include /* For pthread_attr_get_np */ + #endif -+ /** -+ * Add the count of the content buffer and check if the accumulated -+ * value exceeds the limit -+ * @param buffer content buffer -+ */ -+ protected void checkLimit(XMLStringBuffer buffer) { -+ if (fLimitAnalyzer.isTracking(fCurrentEntityName)) { -+ fLimitAnalyzer.addValue(Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length); -+ if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { -+ fSecurityManager.debugPrint(fLimitAnalyzer); -+ reportFatalError("MaxEntitySizeLimit", new Object[]{fCurrentEntityName, -+ fLimitAnalyzer.getValue(Limit.GENEAL_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getStateLiteral(Limit.GENEAL_ENTITY_SIZE_LIMIT)}); -+ } -+ if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { -+ fSecurityManager.debugPrint(fLimitAnalyzer); -+ reportFatalError("TotalEntitySizeLimit", -+ new Object[]{fLimitAnalyzer.getTotalValue(Limit.TOTAL_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT), -+ fSecurityManager.getStateLiteral(Limit.TOTAL_ENTITY_SIZE_LIMIT)}); -+ } -+ } -+ } +--- ./hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -873,3 +873,46 @@ + #endif + } + #endif ++ ++ ++/* ++ * IA32 only: execute code at a high address in case buggy NX emulation is present. I.e. avoid CS limit ++ * updates (JDK-8023956). ++ */ ++void os::workaround_expand_exec_shield_cs_limit() { ++#if defined(IA32) ++ size_t page_size = os::vm_page_size(); ++ /* ++ * Take the highest VA the OS will give us and exec ++ * ++ * Although using -(pagesz) as mmap hint works on newer kernel as you would ++ * think, older variants affected by this work-around don't (search forward only). ++ * ++ * On the affected distributions, we understand the memory layout to be: ++ * ++ * TASK_LIMIT= 3G, main stack base close to TASK_LIMT. ++ * ++ * A few pages south main stack will do it. ++ * ++ * If we are embedded in an app other than launcher (initial != main stack), ++ * we don't have much control or understanding of the address space, just let it slide. ++ */ ++ char* hint = (char*) (Linux::initial_thread_stack_bottom() - ++ ((StackYellowPages + StackRedPages + 1) * page_size)); ++ char* codebuf = os::reserve_memory(page_size, hint); ++ if ( (codebuf == NULL) || (!os::commit_memory(codebuf, page_size, true)) ) { ++ return; // No matter, we tried, best effort. ++ } ++ if (PrintMiscellaneous && (Verbose || WizardMode)) { ++ tty->print_cr("[CS limit NX emulation work-around, exec code at: %p]", codebuf); ++ } ++ ++ // Some code to exec: the 'ret' instruction ++ codebuf[0] = 0xC3; ++ ++ // Call the code in the codebuf ++ __asm__ volatile("call *%0" : : "r"(codebuf)); ++ ++ // keep the page mapped so CS limit isn't reduced. ++#endif ++} +--- ./hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.hpp 2013-09-06 11:22:04.000000000 -0700 ++++ ./hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -36,4 +36,17 @@ + // Note: Currently only used in 64 bit Windows implementations + static bool register_code_area(char *low, char *high) { return true; } + ++ /* ++ * Work-around for broken NX emulation using CS limit, Red Hat patch "Exec-Shield" ++ * (IA32 only). ++ * ++ * Map and execute at a high VA to prevent CS lazy updates race with SMP MM ++ * invalidation.Further code generation by the JVM will no longer cause CS limit ++ * updates. ++ * ++ * Affects IA32: RHEL 5 & 6, Ubuntu 10.04 (LTS), 10.10, 11.04, 11.10, 12.04. ++ * @see JDK-8023956 ++ */ ++ static void workaround_expand_exec_shield_cs_limit(); ++ + #endif // OS_CPU_LINUX_X86_VM_OS_LINUX_X86_HPP +--- ./hotspot/src/share/vm/c1/c1_GraphBuilder.cpp 2013-09-06 11:22:09.000000000 -0700 ++++ ./hotspot/src/share/vm/c1/c1_GraphBuilder.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -4178,7 +4178,9 @@ + } + } - // - // Protected methods ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java 2014-04-20 12:39:47.000000000 -0700 -@@ -1090,6 +1090,8 @@ +- if (!PrintInlining) return; ++ if (!PrintInlining && !compilation()->method()->has_option("PrintInlining")) { ++ return; ++ } + CompileTask::print_inlining(callee, scope()->level(), bci(), msg); + if (success && CIPrintMethodCodes) { + callee->print_codes(); +--- ./hotspot/src/share/vm/c1/c1_LIR.hpp 2013-09-06 11:22:09.000000000 -0700 ++++ ./hotspot/src/share/vm/c1/c1_LIR.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -2221,7 +2221,7 @@ + typedef enum { inputMode, firstMode = inputMode, tempMode, outputMode, numModes, invalidMode = -1 } OprMode; + + enum { +- maxNumberOfOperands = 16, ++ maxNumberOfOperands = 20, + maxNumberOfInfos = 4 + }; + +--- ./hotspot/src/share/vm/c1/c1_LinearScan.cpp 2013-09-06 11:22:09.000000000 -0700 ++++ ./hotspot/src/share/vm/c1/c1_LinearScan.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1138,8 +1138,10 @@ + } + } + } +- +- } else if (opr_type != T_LONG) { ++ // We want to sometimes use logical operations on pointers, in particular in GC barriers. ++ // Since 64bit logical operations do not current support operands on stack, we have to make sure ++ // T_OBJECT doesn't get spilled along with T_LONG. ++ } else if (opr_type != T_LONG LP64_ONLY(&& opr_type != T_OBJECT)) { + // integer instruction (note: long operands must always be in register) + switch (op->code()) { + case lir_cmp: +--- ./hotspot/src/share/vm/c1/c1_Runtime1.cpp 2013-09-06 11:22:09.000000000 -0700 ++++ ./hotspot/src/share/vm/c1/c1_Runtime1.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -911,16 +911,6 @@ + // Return to the now deoptimized frame. + } - ((XMLDTDScannerImpl)fDTDScanner).reset(fPropertyManager); - } +- // If we are patching in a non-perm oop, make sure the nmethod +- // is on the right list. +- if (ScavengeRootsInCode && load_klass.not_null() && load_klass->is_scavengable()) { +- MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag); +- nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); +- guarantee(nm != NULL, "only nmethods can contain non-perm oops"); +- if (!nm->on_scavenge_root_list()) +- CodeCache::add_scavenge_root_nmethod(nm); +- } +- + // Now copy code back + + { +@@ -1096,6 +1086,22 @@ + } + } + } + -+ fDTDScanner.setLimitAnalyzer(fLimitAnalyzer); - do { - again = false; - switch (fScannerState) { ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2014-04-20 12:39:47.000000000 -0700 -@@ -18,19 +18,17 @@ - * limitations under the License. - */ ++ ++ // If we are patching in a non-perm oop, make sure the nmethod ++ // is on the right list. ++ if (ScavengeRootsInCode && load_klass.not_null() && load_klass->is_scavengable()) { ++ MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag); ++ nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); ++ guarantee(nm != NULL, "only nmethods can contain non-perm oops"); ++ if (!nm->on_scavenge_root_list()) { ++ CodeCache::add_scavenge_root_nmethod(nm); ++ } ++ ++ // Since we've patched some oops in the nmethod, ++ // (re)register it with the heap. ++ Universe::heap()->register_nmethod(nm); ++ } + JRT_END --package com.sun.org.apache.xerces.internal.impl ; -+package com.sun.org.apache.xerces.internal.impl; + // +--- ./hotspot/src/share/vm/classfile/classFileParser.cpp 2013-09-06 11:22:10.000000000 -0700 ++++ ./hotspot/src/share/vm/classfile/classFileParser.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -2028,8 +2028,8 @@ + } + if (lvt_cnt == max_lvt_cnt) { + max_lvt_cnt <<= 1; +- REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); +- REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); ++ localvariable_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_table_length, lvt_cnt, max_lvt_cnt); ++ localvariable_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_table_start, lvt_cnt, max_lvt_cnt); + } + localvariable_table_start[lvt_cnt] = + parse_localvariable_table(code_length, +@@ -2058,8 +2058,8 @@ + // Parse local variable type table + if (lvtt_cnt == max_lvtt_cnt) { + max_lvtt_cnt <<= 1; +- REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); +- REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); ++ localvariable_type_table_length = REALLOC_RESOURCE_ARRAY(u2, localvariable_type_table_length, lvtt_cnt, max_lvtt_cnt); ++ localvariable_type_table_start = REALLOC_RESOURCE_ARRAY(u2*, localvariable_type_table_start, lvtt_cnt, max_lvtt_cnt); + } + localvariable_type_table_start[lvtt_cnt] = + parse_localvariable_table(code_length, +@@ -2661,6 +2661,11 @@ + "Short length on BootstrapMethods in class file %s", + CHECK); --import com.sun.org.apache.xerces.internal.impl.Constants; - import com.sun.org.apache.xerces.internal.impl.io.ASCIIReader; - import com.sun.org.apache.xerces.internal.impl.io.UCSReader; - import com.sun.org.apache.xerces.internal.impl.io.UTF8Reader; - import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; --import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; - import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager; - import com.sun.org.apache.xerces.internal.util.*; --import com.sun.org.apache.xerces.internal.util.SecurityManager; --import com.sun.org.apache.xerces.internal.util.URI; - import com.sun.org.apache.xerces.internal.utils.SecuritySupport; -+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.Augmentations; - import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; -@@ -174,7 +172,6 @@ - /** access external dtd: file protocol */ - static final String EXTERNAL_ACCESS_DEFAULT = Constants.EXTERNAL_ACCESS_DEFAULT; ++ guarantee_property(attribute_byte_length > sizeof(u2), ++ "Invalid BootstrapMethods attribute length %u in class file %s", ++ attribute_byte_length, ++ CHECK); ++ + // The attribute contains a counted array of counted tuples of shorts, + // represending bootstrap specifiers: + // length*{bootstrap_method_index, argument_count*{argument_index}} +@@ -4051,9 +4056,8 @@ + for (int index = 0; index < num_methods; index++) { + methodOop m = (methodOop)methods->obj_at(index); -- - // recognized features and properties +- // skip private, static and methods +- if ((!m->is_private()) && +- (!m->is_static()) && ++ // skip private, static, and methods ++ if ((!m->is_private() && !m->is_static()) && + (m->name() != vmSymbols::object_initializer_name())) { - /** Recognized features. */ -@@ -307,6 +304,7 @@ + Symbol* name = m->name(); +--- ./hotspot/src/share/vm/classfile/javaClasses.cpp 2013-09-06 11:22:10.000000000 -0700 ++++ ./hotspot/src/share/vm/classfile/javaClasses.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -2388,6 +2388,26 @@ + *offset = value; + } - /** used to restrict external access */ - protected String fAccessExternalDTD = EXTERNAL_ACCESS_DEFAULT; ++// Support for java_lang_invoke_DirectMethodHandle + - // settings ++int java_lang_invoke_DirectMethodHandle::_member_offset; ++ ++oop java_lang_invoke_DirectMethodHandle::member(oop dmh) { ++ oop member_name = NULL; ++ bool is_dmh = dmh->is_oop() && java_lang_invoke_DirectMethodHandle::is_instance(dmh); ++ assert(is_dmh, "a DirectMethodHandle oop is expected"); ++ if (is_dmh) { ++ member_name = dmh->obj_field(member_offset_in_bytes()); ++ } ++ return member_name; ++} ++ ++void java_lang_invoke_DirectMethodHandle::compute_offsets() { ++ klassOop klass_oop = SystemDictionary::DirectMethodHandle_klass(); ++ if (klass_oop != NULL && EnableInvokeDynamic) { ++ compute_offset(_member_offset, klass_oop, vmSymbols::member_name(), vmSymbols::java_lang_invoke_MemberName_signature()); ++ } ++} - /** -@@ -324,9 +322,12 @@ - */ - protected int fBufferSize = DEFAULT_BUFFER_SIZE; + // Support for java_lang_invoke_MethodHandle -- // stores defaults for entity expansion limit if it has -- // been set on the configuration. -- protected SecurityManager fSecurityManager = null; -+ /** Security Manager */ -+ protected XMLSecurityManager fSecurityManager = null; +@@ -2497,6 +2517,13 @@ + return mname->obj_field(_vmtarget_offset); + } + ++// Can be executed on VM thread only ++void java_lang_invoke_MemberName::adjust_vmtarget(oop mname, oop ref) { ++ assert((is_instance(mname) && (flags(mname) & (MN_IS_METHOD | MN_IS_CONSTRUCTOR)) > 0), "wrong type"); ++ assert(Thread::current()->is_VM_thread(), "not VM thread"); ++ mname->address_field_put(_vmtarget_offset, (address)ref); ++} + -+ protected XMLLimitAnalyzer fLimitAnalyzer = null; + void java_lang_invoke_MemberName::set_vmtarget(oop mname, oop ref) { + assert(is_instance(mname), "wrong type"); + #ifdef ASSERT +@@ -3000,6 +3027,7 @@ + java_lang_ThreadGroup::compute_offsets(); + if (EnableInvokeDynamic) { + java_lang_invoke_MethodHandle::compute_offsets(); ++ java_lang_invoke_DirectMethodHandle::compute_offsets(); + java_lang_invoke_MemberName::compute_offsets(); + java_lang_invoke_LambdaForm::compute_offsets(); + java_lang_invoke_MethodType::compute_offsets(); +--- ./hotspot/src/share/vm/classfile/javaClasses.hpp 2013-09-06 11:22:10.000000000 -0700 ++++ ./hotspot/src/share/vm/classfile/javaClasses.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -915,6 +915,32 @@ + static int form_offset_in_bytes() { return _form_offset; } + }; + ++// Interface to java.lang.invoke.DirectMethodHandle objects + -+ protected int entityExpansionIndex; ++class java_lang_invoke_DirectMethodHandle: AllStatic { ++ friend class JavaClasses; ++ ++ private: ++ static int _member_offset; // the MemberName of this DMH ++ ++ static void compute_offsets(); ++ ++ public: ++ // Accessors ++ static oop member(oop mh); ++ ++ // Testers ++ static bool is_subclass(klassOop klass) { ++ return Klass::cast(klass)->is_subclass_of(SystemDictionary::DirectMethodHandle_klass()); ++ } ++ static bool is_instance(oop obj) { ++ return obj != NULL && is_subclass(obj->klass()); ++ } ++ ++ // Accessors for code generation: ++ static int member_offset_in_bytes() { return _member_offset; } ++}; ++ + // Interface to java.lang.invoke.LambdaForm objects + // (These are a private interface for managing adapter code generation.) - /** - * True if the document entity is standalone. This should really -@@ -352,10 +353,6 @@ - /** XML 1.1 entity scanner. */ - protected XMLEntityScanner fXML11EntityScanner; +@@ -988,6 +1014,7 @@ -- /** entity expansion limit (contains useful data if and only if -- fSecurityManager is non-null) */ -- protected int fEntityExpansionLimit = 0; -- - /** count of entities expanded: */ - protected int fEntityExpansionCount = 0; + static oop vmtarget(oop mname); + static void set_vmtarget(oop mname, oop target); ++ static void adjust_vmtarget(oop mname, oop target); -@@ -833,6 +830,9 @@ - fCurrentEntity.setEncodingExternallySpecified(encodingExternallySpecified); - fEntityScanner.setCurrentEntity(fCurrentEntity); - fResourceIdentifier.setValues(publicId, literalSystemId, baseSystemId, expandedSystemId); -+ if (fLimitAnalyzer != null) { -+ fLimitAnalyzer.startEntity(name); -+ } - return encoding; - } //setupCurrentEntity(String, XMLInputSource, boolean, boolean): String + static intptr_t vmindex(oop mname); + static void set_vmindex(oop mname, intptr_t index); +--- ./hotspot/src/share/vm/classfile/symbolTable.cpp 2013-09-06 11:22:10.000000000 -0700 ++++ ./hotspot/src/share/vm/classfile/symbolTable.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -39,6 +39,9 @@ -@@ -1294,10 +1294,13 @@ - //expansions exceeds the entity expansion limit, parser will throw fatal error. - // Note that this represents the nesting level of open entities. - fEntityExpansionCount++; -- if( fSecurityManager != null && fEntityExpansionCount > fEntityExpansionLimit ){ -- fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, -- "EntityExpansionLimitExceeded", -- new Object[]{new Integer(fEntityExpansionLimit) }, -+ if(fLimitAnalyzer != null) { -+ fLimitAnalyzer.addValue(entityExpansionIndex, name, 1); -+ } -+ if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex, fLimitAnalyzer)){ -+ fSecurityManager.debugPrint(fLimitAnalyzer); -+ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimitExceeded", -+ new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)}, - XMLErrorReporter.SEVERITY_FATAL_ERROR ); - // is there anything better to do than reset the counter? - // at least one can envision debugging applications where this might -@@ -1361,6 +1364,12 @@ - if(fCurrentEntity != null){ - //close the reader - try{ -+ if (fLimitAnalyzer != null) { -+ fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name); -+ if (fCurrentEntity.name.equals("[xml]")) { -+ fSecurityManager.debugPrint(fLimitAnalyzer); -+ } -+ } - fCurrentEntity.close(); - }catch(IOException ex){ - throw new XNIException(ex); -@@ -1426,6 +1435,8 @@ - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); - fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); + // -------------------------------------------------------------------------- -+ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); ++// the number of buckets a thread claims ++const int ClaimChunkSize = 32; + - // initialize state - //fStandalone = false; - fEntities.clear(); -@@ -1485,7 +1496,8 @@ - fEntityResolver = (XMLEntityResolver)componentManager.getProperty(ENTITY_RESOLVER, null); - fStaxEntityResolver = (StaxEntityResolverWrapper)componentManager.getProperty(STAX_ENTITY_RESOLVER, null); - fValidationManager = (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER, null); -- fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); -+ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); -+ entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT); - - // JAXP 1.5 feature - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null); -@@ -1506,7 +1518,6 @@ - // a class acting as a component manager but not - // implementing that interface for whatever reason. - public void reset() { -- fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0; + SymbolTable* SymbolTable::_the_table = NULL; + // Static arena for symbols that are not deallocated + Arena* SymbolTable::_arena = NULL; +@@ -81,16 +84,12 @@ + } + } - // initialize state - fStandalone = false; -@@ -1642,17 +1653,20 @@ - } - if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() && - propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) { -- fSecurityManager = (SecurityManager)value; -- fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0; -+ fSecurityManager = (XMLSecurityManager)value; - } - } +-int SymbolTable::symbols_removed = 0; +-int SymbolTable::symbols_counted = 0; ++int SymbolTable::_symbols_removed = 0; ++int SymbolTable::_symbols_counted = 0; ++volatile int SymbolTable::_parallel_claimed_idx = 0; + +-// Remove unreferenced symbols from the symbol table +-// This is done late during GC. +-void SymbolTable::unlink() { +- int removed = 0; +- int total = 0; +- size_t memory_total = 0; +- for (int i = 0; i < the_table()->table_size(); ++i) { ++void SymbolTable::buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total) { ++ for (int i = start_idx; i < end_idx; ++i) { + HashtableEntry** p = the_table()->bucket_addr(i); + HashtableEntry* entry = the_table()->bucket(i); + while (entry != NULL) { +@@ -102,14 +101,14 @@ + break; + } + Symbol* s = entry->literal(); +- memory_total += s->object_size(); +- total++; ++ (*memory_total) += s->object_size(); ++ (*processed)++; + assert(s != NULL, "just checking"); + // If reference count is zero, remove. + if (s->refcount() == 0) { + assert(!entry->is_shared(), "shared entries should be kept live"); + delete s; +- removed++; ++ (*removed)++; + *p = entry->next(); + the_table()->free_entry(entry); + } else { +@@ -119,12 +118,45 @@ + entry = (HashtableEntry*)HashtableEntry::make_ptr(*p); + } + } +- symbols_removed += removed; +- symbols_counted += total; ++} ++ ++// Remove unreferenced symbols from the symbol table ++// This is done late during GC. ++void SymbolTable::unlink(int* processed, int* removed) { ++ size_t memory_total = 0; ++ buckets_unlink(0, the_table()->table_size(), processed, removed, &memory_total); ++ _symbols_removed += *removed; ++ _symbols_counted += *processed; ++ // Exclude printing for normal PrintGCDetails because people parse ++ // this output. ++ if (PrintGCDetails && Verbose && WizardMode) { ++ gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", *processed, ++ (memory_total*HeapWordSize)/1024); ++ } ++} ++ ++void SymbolTable::possibly_parallel_unlink(int* processed, int* removed) { ++ const int limit = the_table()->table_size(); ++ ++ size_t memory_total = 0; ++ ++ for (;;) { ++ // Grab next set of buckets to scan ++ int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize; ++ if (start_idx >= limit) { ++ // End of table ++ break; ++ } ++ ++ int end_idx = MIN2(limit, start_idx + ClaimChunkSize); ++ buckets_unlink(start_idx, end_idx, processed, removed, &memory_total); ++ } ++ Atomic::add(*processed, &_symbols_counted); ++ Atomic::add(*removed, &_symbols_removed); + // Exclude printing for normal PrintGCDetails because people parse + // this output. + if (PrintGCDetails && Verbose && WizardMode) { +- gclog_or_tty->print(" [Symbols=%d size=" SIZE_FORMAT "K] ", total, ++ gclog_or_tty->print(" [Symbols: scanned=%d removed=%d size=" SIZE_FORMAT "K] ", *processed, *removed, + (memory_total*HeapWordSize)/1024); + } + } +@@ -503,21 +535,21 @@ + } + } + tty->print_cr("Symbol Table:"); +- tty->print_cr("Total number of symbols %5d", count); +- tty->print_cr("Total size in memory %5dK", ++ tty->print_cr("Total number of symbols "INT32_FORMAT, count); ++ tty->print_cr("Total size in memory "INT32_FORMAT"K", + (memory_total*HeapWordSize)/1024); +- tty->print_cr("Total counted %5d", symbols_counted); +- tty->print_cr("Total removed %5d", symbols_removed); +- if (symbols_counted > 0) { ++ tty->print_cr("Total counted "INT32_FORMAT, _symbols_counted); ++ tty->print_cr("Total removed "INT32_FORMAT, _symbols_removed); ++ if (_symbols_counted > 0) { + tty->print_cr("Percent removed %3.2f", +- ((float)symbols_removed/(float)symbols_counted)* 100); ++ ((float)_symbols_removed/(float)_symbols_counted)* 100); + } +- tty->print_cr("Reference counts %5d", Symbol::_total_count); +- tty->print_cr("Symbol arena size %5d used %5d", ++ tty->print_cr("Reference counts "INT32_FORMAT, Symbol::_total_count); ++ tty->print_cr("Symbol arena size "SIZE_FORMAT" used "SIZE_FORMAT, + arena()->size_in_bytes(), arena()->used()); + tty->print_cr("Histogram of symbol length:"); +- tty->print_cr("%8s %5d", "Total ", total); +- tty->print_cr("%8s %5d", "Maximum", max_symbols); ++ tty->print_cr("%8s "INT32_FORMAT, "Total ", total); ++ tty->print_cr("%8s "INT32_FORMAT, "Maximum", max_symbols); + tty->print_cr("%8s %3.2f", "Average", + ((float) total / (float) the_table()->table_size())); + tty->print_cr("%s", "Histogram:"); +@@ -746,11 +778,41 @@ + return result; + } - //JAXP 1.5 properties - if (propertyId.equals(XML_SECURITY_PROPERTY_MANAGER)) -- { -+ { - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)value; - fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); -+ } - } +-void StringTable::unlink(BoolObjectClosure* is_alive) { ++void StringTable::unlink(BoolObjectClosure* is_alive, int* processed, int* removed) { ++ buckets_unlink(is_alive, 0, the_table()->table_size(), processed, removed); ++} + -+ public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) { -+ this.fLimitAnalyzer = fLimitAnalyzer; ++void StringTable::possibly_parallel_unlink(BoolObjectClosure* is_alive, int* processed, int* removed) { + // Readers of the table are unlocked, so we should only be removing + // entries at a safepoint. + assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); +- for (int i = 0; i < the_table()->table_size(); ++i) { ++ const int limit = the_table()->table_size(); ++ ++ for (;;) { ++ // Grab next set of buckets to scan ++ int start_idx = Atomic::add(ClaimChunkSize, &_parallel_claimed_idx) - ClaimChunkSize; ++ if (start_idx >= limit) { ++ // End of table ++ break; ++ } ++ ++ int end_idx = MIN2(limit, start_idx + ClaimChunkSize); ++ buckets_unlink(is_alive, start_idx, end_idx, processed, removed); ++ } ++} ++ ++void StringTable::buckets_unlink(BoolObjectClosure* is_alive, int start_idx, int end_idx, int* processed, int* removed) { ++ const int limit = the_table()->table_size(); ++ ++ assert(0 <= start_idx && start_idx <= limit, ++ err_msg("start_idx (" INT32_FORMAT ") is out of bounds", start_idx)); ++ assert(0 <= end_idx && end_idx <= limit, ++ err_msg("end_idx (" INT32_FORMAT ") is out of bounds", end_idx)); ++ assert(start_idx <= end_idx, ++ err_msg("Index ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT, ++ start_idx, end_idx)); ++ ++ for (int i = start_idx; i < end_idx; ++i) { + HashtableEntry** p = the_table()->bucket_addr(i); + HashtableEntry* entry = the_table()->bucket(i); + while (entry != NULL) { +@@ -767,24 +829,26 @@ + } else { + *p = entry->next(); + the_table()->free_entry(entry); ++ (*removed)++; + } ++ (*processed)++; + entry = (HashtableEntry*)HashtableEntry::make_ptr(*p); } + } + } - /** ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java 2014-04-20 12:39:47.000000000 -0700 -@@ -58,6 +58,7 @@ - * @author Neeraj Bajaj, Sun Microsystems - * @author Venugopal Rao K, Sun Microsystems - * @author Elena Litani, IBM -+ * @version $Id: XMLNSDocumentScannerImpl.java,v 1.11 2010-11-01 04:39:41 joehw Exp $ - */ - public class XMLNSDocumentScannerImpl - extends XMLDocumentScannerImpl { -@@ -251,10 +252,11 @@ +-void StringTable::buckets_do(OopClosure* f, int start_idx, int end_idx) { ++void StringTable::buckets_oops_do(OopClosure* f, int start_idx, int end_idx) { + const int limit = the_table()->table_size(); + + assert(0 <= start_idx && start_idx <= limit, +- err_msg("start_idx (" INT32_FORMAT ") oob?", start_idx)); ++ err_msg("start_idx (" INT32_FORMAT ") is out of bounds", start_idx)); + assert(0 <= end_idx && end_idx <= limit, +- err_msg("end_idx (" INT32_FORMAT ") oob?", end_idx)); ++ err_msg("end_idx (" INT32_FORMAT ") is out of bounds", end_idx)); + assert(start_idx <= end_idx, +- err_msg("Ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT, ++ err_msg("Index ordering: start_idx=" INT32_FORMAT", end_idx=" INT32_FORMAT, + start_idx, end_idx)); + +- for (int i = start_idx; i < end_idx; i += 1) { ++ for (int i = start_idx; i < end_idx; i++) { + HashtableEntry** p = the_table()->bucket_addr(i); + HashtableEntry* entry = the_table()->bucket(i); + while (entry != NULL) { +@@ -804,11 +868,10 @@ + } - do { - scanAttribute(fAttributes); -- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ -+ if (fSecurityManager != null && (!fSecurityManager.isNoLimit(fElementAttributeLimit)) && -+ fAttributes.getLength() > fElementAttributeLimit){ - fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, - "ElementAttributeLimit", -- new Object[]{rawname, new Integer(fAttributes.getLength()) }, -+ new Object[]{rawname, fElementAttributeLimit }, - XMLErrorReporter.SEVERITY_FATAL_ERROR ); - } + void StringTable::oops_do(OopClosure* f) { +- buckets_do(f, 0, the_table()->table_size()); ++ buckets_oops_do(f, 0, the_table()->table_size()); + } ---- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java 2013-09-06 11:22:57.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java 2014-04-20 12:39:47.000000000 -0700 -@@ -32,6 +32,8 @@ - import com.sun.org.apache.xerces.internal.util.XMLChar; - import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; - import com.sun.org.apache.xerces.internal.util.XMLStringBuffer; -+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.xni.Augmentations; - import com.sun.org.apache.xerces.internal.xni.XMLAttributes; - import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; -@@ -106,6 +108,9 @@ - protected static final String ENTITY_MANAGER = - Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY; + void StringTable::possibly_parallel_oops_do(OopClosure* f) { +- const int ClaimChunkSize = 32; + const int limit = the_table()->table_size(); -+ /** Property identifier: Security manager. */ -+ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; -+ - // debugging + for (;;) { +@@ -820,7 +883,7 @@ + } - /** Debug attribute normalization. */ -@@ -159,6 +164,12 @@ - /** xxx this should be available from EntityManager Entity storage */ - protected XMLEntityStorage fEntityStore = null ; + int end_idx = MIN2(limit, start_idx + ClaimChunkSize); +- buckets_do(f, start_idx, end_idx); ++ buckets_oops_do(f, start_idx, end_idx); + } + } -+ /** Security manager. */ -+ protected XMLSecurityManager fSecurityManager = null; -+ -+ /** Limit analyzer. */ -+ protected XMLLimitAnalyzer fLimitAnalyzer = null; -+ - // protected data +--- ./hotspot/src/share/vm/classfile/symbolTable.hpp 2013-09-06 11:22:10.000000000 -0700 ++++ ./hotspot/src/share/vm/classfile/symbolTable.hpp 2014-06-06 19:56:20.000000000 -0700 +@@ -86,8 +86,8 @@ + static bool _needs_rehashing; - /** event type */ -@@ -256,6 +267,7 @@ - fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE); - fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER); - fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER); -+ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER); + // For statistics +- static int symbols_removed; +- static int symbols_counted; ++ static int _symbols_removed; ++ static int _symbols_counted; - //this step is extra because we have separated the storage of entity - fEntityStore = fEntityManager.getEntityStore() ; -@@ -293,6 +305,10 @@ - fEntityManager = (XMLEntityManager)value; - } - } + Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F + +@@ -126,6 +126,11 @@ + static Arena* arena() { return _arena; } // called for statistics + + static void initialize_symbols(int arena_alloc_size = 0); + -+ if (propertyId.equals(SECURITY_MANAGER)) { -+ fSecurityManager = (XMLSecurityManager)value; -+ } - /*else if(propertyId.equals(Constants.STAX_PROPERTIES)){ - fStaxProperties = (HashMap)value; - //TODO::discuss with neeraj what are his thoughts on passing properties. -@@ -352,6 +368,8 @@ - fEntityManager = (XMLEntityManager)propertyManager.getProperty(ENTITY_MANAGER); - fEntityStore = fEntityManager.getEntityStore() ; - fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ; -+ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); ++ static volatile int _parallel_claimed_idx; + - //fEntityManager.reset(); - // DTD preparsing defaults: - fValidation = false; -@@ -499,7 +517,7 @@ - reportFatalError("SDDeclInvalid", new Object[] {standalone}); - } - } else { -- reportFatalError("EncodingDeclRequired", null); -+ reportFatalError("SDDeclNameInvalid", null); - } - break; - } -@@ -510,8 +528,9 @@ - sawSpace = fEntityScanner.skipSpaces(); - } - // restore original literal value -- if(currLiteral) -+ if(currLiteral) { - currEnt.literal = true; -+ } - // REVISIT: should we remove this error reporting? - if (scanningTextDecl && state != STATE_DONE) { - reportFatalError("MorePseudoAttributes", null); -@@ -564,7 +583,7 @@ - XMLString value) - throws IOException, XNIException { ++ // Release any dead symbols ++ static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total); + public: + enum { + symbol_alloc_batch_size = 8, +@@ -175,7 +180,19 @@ + unsigned int* hashValues, TRAPS); + + // Release any dead symbols +- static void unlink(); ++ static void unlink() { ++ int processed = 0; ++ int removed = 0; ++ unlink(&processed, &removed); ++ } ++ static void unlink(int* processed, int* removed); ++ // Release any dead symbols, possibly parallel version ++ static void possibly_parallel_unlink() { ++ int processed = 0; ++ int removed = 0; ++ possibly_parallel_unlink(&processed, &removed); ++ } ++ static void possibly_parallel_unlink(int* processed, int* removed); + + // iterate over symbols + static void symbols_do(SymbolClosure *cl); +@@ -233,6 +250,9 @@ + // Rehash the symbol table if it gets out of balance + static void rehash_table(); + static bool needs_rehashing() { return _needs_rehashing; } ++ // Parallel chunked scanning ++ static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; } ++ static int parallel_claimed_index() { return _parallel_claimed_idx; } + }; -- String name = fEntityScanner.scanName(); -+ String name = scanPseudoAttributeName(); - // XMLEntityManager.print(fEntityManager.getCurrentEntity()); + class StringTable : public Hashtable { +@@ -256,7 +276,9 @@ + + // Apply the give oop closure to the entries to the buckets + // in the range [start_idx, end_idx). +- static void buckets_do(OopClosure* f, int start_idx, int end_idx); ++ static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx); ++ // Unlink the entries to the buckets in the range [start_idx, end_idx). ++ static void buckets_unlink(BoolObjectClosure* is_alive, int start_idx, int end_idx, int* processed, int* removed); + + StringTable() : Hashtable((int)StringTableSize, + sizeof (HashtableEntry)) {} +@@ -283,7 +305,13 @@ + + // GC support + // Delete pointers to otherwise-unreachable objects. +- static void unlink(BoolObjectClosure* cl); ++ static void unlink(BoolObjectClosure* cl) { ++ int processed = 0; ++ int removed = 0; ++ unlink(cl, &processed, &removed); ++ } ++ ++ static void unlink(BoolObjectClosure* cl, int* processed, int* removed); - if (name == null) { -@@ -617,6 +636,35 @@ - } // scanPseudoAttribute(XMLString):String + // Serially invoke "f->do_oop" on the locations of all oops in the table. + static void oops_do(OopClosure* f); +@@ -291,6 +319,8 @@ + // Possibly parallel version of the above + static void possibly_parallel_oops_do(OopClosure* f); - /** -+ * Scans the name of a pseudo attribute. The only legal names -+ * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'. -+ * -+ * @return the name of the pseudo attribute or null -+ * if a legal pseudo attribute name could not be scanned. -+ */ -+ private String scanPseudoAttributeName() throws IOException, XNIException { -+ final int ch = fEntityScanner.peekChar(); -+ switch (ch) { -+ case 'v': -+ if (fEntityScanner.skipString(fVersionSymbol)) { -+ return fVersionSymbol; -+ } -+ break; -+ case 'e': -+ if (fEntityScanner.skipString(fEncodingSymbol)) { -+ return fEncodingSymbol; -+ } -+ break; -+ case 's': -+ if (fEntityScanner.skipString(fStandaloneSymbol)) { -+ return fStandaloneSymbol; -+ } -+ break; -+ } -+ return null; -+ } // scanPseudoAttributeName() ++ static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed); + -+ /** - * Scans a processing instruction. - *

- *

---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	2013-09-06 11:22:58.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -44,6 +44,7 @@
-         
- # 2.9 Standalone Document Declaration
-         SDDeclInvalid = The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\".
-+        SDDeclNameInvalid = The standalone name in XML declaration may be misspelled.
- # 2.12 Language Identification
-         XMLLangInvalid = The xml:lang attribute value \"{0}\" is an invalid language identifier.
- # 3. Logical Structures
-@@ -292,8 +293,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+   // Hashing algorithm, used as the hash value used by the
+   //     StringTable for bucket selection and comparison (stored in the
+   //     HashtableEntry structures).  This is used in the String.intern() method.
+@@ -328,5 +358,6 @@
  
+   // Parallel chunked scanning
+   static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
++  static int parallel_claimed_index() { return _parallel_claimed_idx; }
+ };
+ #endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
+--- ./hotspot/src/share/vm/classfile/systemDictionary.cpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/classfile/systemDictionary.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -585,7 +585,7 @@
+   assert(name != NULL && !FieldType::is_array(name) &&
+          !FieldType::is_obj(name), "invalid class name");
+ 
+-  TracingTime class_load_start_time = Tracing::time();
++  const Ticks class_load_start_time = Ticks::now();
+ 
+   // UseNewReflection
+   // Fix for 4474172; see evaluation for more details
+@@ -946,7 +946,7 @@
+                                         TRAPS) {
+   TempNewSymbol parsed_name = NULL;
+ 
+-  TracingTime class_load_start_time = Tracing::time();
++  const Ticks class_load_start_time = Ticks::now();
+ 
+   // Parse the stream. Note that we do this even though this klass might
+   // already be present in the SystemDictionary, otherwise we would not
+@@ -1572,9 +1572,10 @@
+ // Used for assertions and verification only
+ klassOop SystemDictionary::find_class(Symbol* class_name, Handle class_loader) {
+   #ifndef ASSERT
+-  guarantee(VerifyBeforeGC   ||
+-            VerifyDuringGC   ||
+-            VerifyBeforeExit ||
++  guarantee(VerifyBeforeGC      ||
++            VerifyDuringGC      ||
++            VerifyBeforeExit    ||
++            VerifyDuringStartup ||
+             VerifyAfterGC, "too expensive");
+   #endif
+   assert_locked_or_safepoint(SystemDictionary_lock);
+@@ -2314,6 +2315,11 @@
+   objArrayHandle appendix_box = oopFactory::new_objArray(SystemDictionary::Object_klass(), 1, CHECK_(empty));
+   assert(appendix_box->obj_at(0) == NULL, "");
+ 
++  // This should not happen.  JDK code should take care of that.
++  if (accessing_klass.is_null() || method_type.is_null()) {
++    THROW_MSG_(vmSymbols::java_lang_InternalError(), "bad invokehandle", empty);
++  }
++
+   // call java.lang.invoke.MethodHandleNatives::linkMethod(... String, MethodType) -> MemberName
+   JavaCallArguments args;
+   args.push_oop(accessing_klass()->java_mirror());
+@@ -2439,6 +2445,9 @@
+   Handle type;
+   if (signature->utf8_length() > 0 && signature->byte_at(0) == '(') {
+     type = find_method_handle_type(signature, caller, CHECK_(empty));
++  } else if (caller.is_null()) {
++    // This should not happen.  JDK code should take care of that.
++    THROW_MSG_(vmSymbols::java_lang_InternalError(), "bad MH constant", empty);
+   } else {
+     ResourceMark rm(THREAD);
+     SignatureStream ss(signature, false);
+@@ -2502,6 +2511,11 @@
+   Handle method_name = java_lang_String::create_from_symbol(name, CHECK_(empty));
+   Handle method_type = find_method_handle_type(type, caller, CHECK_(empty));
+ 
++  // This should not happen.  JDK code should take care of that.
++  if (caller.is_null() || method_type.is_null()) {
++    THROW_MSG_(vmSymbols::java_lang_InternalError(), "bad invokedynamic", empty);
++  }
++
+   objArrayHandle appendix_box = oopFactory::new_objArray(SystemDictionary::Object_klass(), 1, CHECK_(empty));
+   assert(appendix_box->obj_at(0) == NULL, "");
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the application.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the JDK.
-+        ElementAttributeLimit=JAXP00010002:  Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the JDK.
-+        MaxEntitySizeLimit=JAXP00010003: The length of entity \"{0}\" is \"{1}\" that exceeds the \"{2}\" limit set by \"{3}\".
-+        TotalEntitySizeLimit=JAXP00010004: The accumulated size \"{0}\" of entities exceeded the \"{1}\" limit set by \"{2}\".
-+        MaxXMLNameLimit=JAXP00010005: The name \"{0}\" exceeded the \"{1}\" limit set by \"{2}\".
+@@ -2607,13 +2621,12 @@
+ }
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the application.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
--
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+ // utility function for posting class load event
+-void SystemDictionary::post_class_load_event(TracingTime start_time,
++void SystemDictionary::post_class_load_event(const Ticks& start_time,
+                                              instanceKlassHandle k,
+                                              Handle initiating_loader) {
+ #if INCLUDE_TRACE
+   EventClassLoad event(UNTIMED);
+   if (event.should_commit()) {
+-    event.set_endtime(Tracing::time());
+     event.set_starttime(start_time);
+     event.set_loadedClass(k());
+     oop defining_class_loader = k->class_loader();
+@@ -2632,7 +2645,7 @@
+   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint!");
+   if (Tracing::enabled()) {
+     _should_write_unload_events = Tracing::is_event_enabled(TraceClassUnloadEvent);
+-    _class_unload_time = Tracing::time();
++    _class_unload_time = Ticks::now();
+     _is_alive = is_alive;
+     classes_do(&class_unload_event);
+ 
+@@ -2648,7 +2661,7 @@
+ 
+ #if INCLUDE_TRACE
+ 
+-TracingTime SystemDictionary::_class_unload_time;
++Ticks SystemDictionary::_class_unload_time;
+ BoolObjectClosure* SystemDictionary::_is_alive = NULL;
+ int SystemDictionary::_no_of_classes_unloading = 0;
+ bool SystemDictionary::_should_write_unload_events = false;
+--- ./hotspot/src/share/vm/classfile/systemDictionary.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/classfile/systemDictionary.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -33,7 +33,7 @@
+ #include "runtime/reflectionUtils.hpp"
+ #include "utilities/hashtable.hpp"
+ #include "utilities/hashtable.inline.hpp"
+-#include "trace/traceTime.hpp"
++#include "utilities/ticks.hpp"
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde im Prolog des Dokuments gefunden.
-         InvalidCharInXMLDecl = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der XML-Deklaration gefunden.
- # 2.4 Character Data and Markup
--        CDEndInContent = Zeichenfolge"\"]]>\" darf nur im Content enthalten sein, wenn sie das Ende eines CDATA-Abschnitts markiert.
-+        CDEndInContent = Zeichenfolge""]]>" darf nur im Content enthalten sein, wenn sie das Ende eines CDATA-Abschnitts markiert.
- # 2.7 CDATA Sections
--        CDSectUnterminated = CDATA-Abschnitt muss mit \"]]>\" enden.
-+        CDSectUnterminated = CDATA-Abschnitt muss mit "]]>" enden.
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = XML-Deklaration darf nur ganz am Anfang des Dokuments enthalten sein.
--        EqRequiredInXMLDecl = Zeichen " = " muss auf \"{0}\" in der XML-Deklaration folgen.
--        QuoteRequiredInXMLDecl = Der Wert nach \"{0}\" in der XML-Deklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
--        XMLDeclUnterminated = XML-Deklaration muss mit \"?>\" enden.
-+        EqRequiredInXMLDecl = Zeichen " = " muss auf "{0}" in der XML-Deklaration folgen.
-+        QuoteRequiredInXMLDecl = Der Wert nach "{0}" in der XML-Deklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
-+        XMLDeclUnterminated = XML-Deklaration muss mit "?>" enden.
-         VersionInfoRequired = Version ist in der XML-Deklaration erforderlich.
-         SpaceRequiredBeforeVersionInXMLDecl = Leerstelle vor dem Versionspseudoattribut in der XML-Deklaration erforderlich.
-         SpaceRequiredBeforeEncodingInXMLDecl = Leerstelle vor dem Codierungspseudoattribut in der XML-Deklaration erforderlich.
-@@ -71,70 +68,71 @@
-         ReferenceIllegalInTrailingMisc=Referenz ist nicht zul\u00E4ssig in angeh\u00E4ngtem Abschnitt.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = Standalone-Dokumentdeklarationswert muss \"Ja\" oder \"Nein\" und nicht \"{0}\" sein.
-+        SDDeclInvalid = Standalone-Dokumentdeklarationswert muss "Ja" oder "Nein" und nicht "{0}" sein.
-+        SDDeclNameInvalid = Der Standalone-Name in der XML-Deklaration ist m\u00F6glicherweise falsch geschrieben.
- # 2.12 Language Identification
--        XMLLangInvalid = xml:lang-Attributwert \"{0}\" ist eine ung\u00FCltige Sprach-ID.
-+        XMLLangInvalid = xml:lang-Attributwert "{0}" ist eine ung\u00FCltige Sprach-ID.
- # 3. Logical Structures
--        ETagRequired = Elementtyp \"{0}\" muss mit dem entsprechenden Endtag \"\" beendet werden.
-+        ETagRequired = Elementtyp "{0}" muss mit dem entsprechenden Endtag "" beendet werden.
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = Auf Elementtyp \"{0}\" m\u00FCssen entweder Attributspezifikationen, \">\" oder \"/>\" folgen.
--        EqRequiredInAttribute = Mit Elementtyp \"{0}\" verkn\u00FCpfter Attributname \"{1}\" muss vom Zeichen " = " gefolgt werden.
--        OpenQuoteExpected = \u00D6ffnendes Anf\u00FChrungszeichen wird f\u00FCr Attribut \"{1}\" erwartet, das mit Elementtyp \"{0}\" verkn\u00FCpft ist.
--        CloseQuoteExpected = Schlie\u00DFendes Anf\u00FChrungszeichen wird f\u00FCr Attribut \"{1}\" erwartet, das mit Elementtyp \"{0}\" verkn\u00FCpft ist.
--        AttributeNotUnique = Attribut \"{1}\" wurde bereits f\u00FCr Element \"{0}\" angegeben.
--        AttributeNSNotUnique = An Namespace \"{2}\" gebundenes Attribut \"{1}\" wurde bereits f\u00FCr Element \"{0}\" angegeben.
--        ETagUnterminated = Endtag f\u00FCr Elementtyp \"{0}\" muss mit einem ">"-Begrenzungszeichen enden.
-+        ElementUnterminated = Auf Elementtyp "{0}" m\u00FCssen entweder Attributspezifikationen, ">" oder "/>" folgen.
-+        EqRequiredInAttribute = Mit Elementtyp "{0}" verkn\u00FCpfter Attributname "{1}" muss vom Zeichen " = " gefolgt werden.
-+        OpenQuoteExpected = \u00D6ffnendes Anf\u00FChrungszeichen wird f\u00FCr Attribut "{1}" erwartet, das mit Elementtyp "{0}" verkn\u00FCpft ist.
-+        CloseQuoteExpected = Schlie\u00DFendes Anf\u00FChrungszeichen wird f\u00FCr Attribut "{1}" erwartet, das mit Elementtyp "{0}" verkn\u00FCpft ist.
-+        AttributeNotUnique = Attribut "{1}" wurde bereits f\u00FCr Element "{0}" angegeben.
-+        AttributeNSNotUnique = An Namespace "{2}" gebundenes Attribut "{1}" wurde bereits f\u00FCr Element "{0}" angegeben.
-+        ETagUnterminated = Endtag f\u00FCr Elementtyp "{0}" muss mit einem ">"-Begrenzungszeichen enden.
-         MarkupNotRecognizedInContent = Der Content von Elementen muss aus ordnungsgem\u00E4\u00DF formatierten Zeichendaten oder Markups bestehen.
-         DoctypeIllegalInContent = DOCTYPE ist nicht zul\u00E4ssig in Content.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = Referenz muss mit einem ";"-Begrenzungszeichen beendet werden.
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = Referenz muss vollst\u00E4ndig in derselben geparsten Entit\u00E4t enthalten sein.
--        ElementEntityMismatch = Element \"{0}\" muss innerhalb derselben Entit\u00E4t beginnen und enden.
-+        ElementEntityMismatch = Element "{0}" muss innerhalb derselben Entit\u00E4t beginnen und enden.
-         MarkupEntityMismatch=XML-Dokumentstrukturen m\u00FCssen innerhalb derselben Entit\u00E4t beginnen und enden.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{2}) wurde im Wert des Attributs \"{1}\" gefunden. Element ist \"{0}\".
-+        InvalidCharInAttValue = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{2}) wurde im Wert des Attributs "{1}" gefunden. Element ist "{0}".
-         InvalidCharInComment = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde im Kommentar gefunden.
-         InvalidCharInPI = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der Verarbeitungsanweisung gefunden.
-         InvalidCharInInternalSubset = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der internen Teilmenge der DTD gefunden.
-         InvalidCharInTextDecl = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der Textdeklaration gefunden.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = Wert des Attributs \"{1}\" muss mit einem einzelnen oder doppelten Anf\u00FChrungszeichen beginnen.
--        LessthanInAttValue = Wert des Attributs \"{1}\", das mit Elementtyp \"{0}\" verkn\u00FCpft ist, darf nicht das Zeichen "<" enthalten.
--        AttributeValueUnterminated = Wert f\u00FCr Attribut \"{1}\" muss mit dem entsprechenden Anf\u00FChrungszeichen enden.
-+        QuoteRequiredInAttValue = Wert des Attributs "{1}" muss mit einem einzelnen oder doppelten Anf\u00FChrungszeichen beginnen.
-+        LessthanInAttValue = Wert des Attributs "{1}", das mit Elementtyp "{0}" verkn\u00FCpft ist, darf nicht das Zeichen "<" enthalten.
-+        AttributeValueUnterminated = Wert f\u00FCr Attribut "{1}" muss mit dem entsprechenden Anf\u00FChrungszeichen enden.
- # 2.5 Comments
--        InvalidCommentStart = Kommentar muss mit \"\" enden.
-+        InvalidCommentStart = Kommentar muss mit "" enden.
-         COMMENT_NOT_IN_ONE_ENTITY = Kommentar ist nicht in derselben Entit\u00E4t enthalten.
- # 2.6 Processing Instructions
-         PITargetRequired = Verarbeitungsanweisung muss mit dem Namen des Ziels beginnen.
-         SpaceRequiredInPI = Leerstelle ist zwischen dem Ziel der Verarbeitungsanweisung und den Daten erforderlich.
--        PIUnterminated = Verarbeitungsanweisung muss mit \"?>\" enden.
--        ReservedPITarget = Verarbeitungsanweisungsziel, das \"[xX][mM][lL]\" entspricht, ist nicht zul\u00E4ssig.
-+        PIUnterminated = Verarbeitungsanweisung muss mit "?>" enden.
-+        ReservedPITarget = Verarbeitungsanweisungsziel, das "[xX][mM][lL]" entspricht, ist nicht zul\u00E4ssig.
-         PI_NOT_IN_ONE_ENTITY = Verarbeitungsanweisung ist nicht in derselben Entit\u00E4t enthalten.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = Ung\u00FCltige Version \"{0}\".
--        VersionNotSupported = XML-Version \"{0}\" wird nicht unterst\u00FCtzt. Nur XML 1.0 wird unterst\u00FCtzt.
--        VersionNotSupported11 = XML-Version \"{0}\" wird nicht unterst\u00FCtzt. Nur XML 1.0 und XML 1.1 werden unterst\u00FCtzt.
-+        VersionInfoInvalid = Ung\u00FCltige Version "{0}".
-+        VersionNotSupported = XML-Version "{0}" wird nicht unterst\u00FCtzt. Nur XML 1.0 wird unterst\u00FCtzt.
-+        VersionNotSupported11 = XML-Version "{0}" wird nicht unterst\u00FCtzt. Nur XML 1.0 und XML 1.1 werden unterst\u00FCtzt.
-         VersionMismatch= Eine Entit\u00E4t kann keine andere Entit\u00E4t einer sp\u00E4teren Version enthalten.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = Auf \"&#\" in einer Zeichenreferenz muss umgehend eine Dezimaldarstellung folgen.
--        HexdigitRequiredInCharRef = Auf \"&#x\" in einer Zeichenreferenz muss umgehend eine hexadezimale Darstellung folgen.
-+        DigitRequiredInCharRef = Auf "&#" in einer Zeichenreferenz muss umgehend eine Dezimaldarstellung folgen.
-+        HexdigitRequiredInCharRef = Auf "&#x" in einer Zeichenreferenz muss umgehend eine hexadezimale Darstellung folgen.
-         SemicolonRequiredInCharRef = Zeichenreferenz muss mit dem Begrenzungszeichen ";" enden.
--        InvalidCharRef = Zeichenreferenz \"&#{0}\" ist ein ung\u00FCltiges XML-Zeichen.
-+        InvalidCharRef = Zeichenreferenz "&#{0}" ist ein ung\u00FCltiges XML-Zeichen.
-         NameRequiredInReference = Auf "&" in der Entit\u00E4tsreferenz muss umgehend der Entit\u00E4tsname folgen.
--        SemicolonRequiredInReference = Referenz zu Entit\u00E4t \"{0}\" muss mit dem Begrenzungszeichen ";" enden.
-+        SemicolonRequiredInReference = Referenz zu Entit\u00E4t "{0}" muss mit dem Begrenzungszeichen ";" enden.
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = Textdeklaration darf nur ganz am Anfang der externen geparsten Entit\u00E4t enthalten sein.
--        EqRequiredInTextDecl = Zeichen " = " muss auf \"{0}\" in der Textdeklaration folgen.
--        QuoteRequiredInTextDecl = Der Wert nach \"{0}\" in der Textdeklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
--        CloseQuoteMissingInTextDecl = Schlie\u00DFendes Anf\u00FChrungszeichen im Wert nach \"{0}\" in der Textdeklaration fehlt.
-+        EqRequiredInTextDecl = Zeichen " = " muss auf "{0}" in der Textdeklaration folgen.
-+        QuoteRequiredInTextDecl = Der Wert nach "{0}" in der Textdeklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
-+        CloseQuoteMissingInTextDecl = Schlie\u00DFendes Anf\u00FChrungszeichen im Wert nach "{0}" in der Textdeklaration fehlt.
-         SpaceRequiredBeforeVersionInTextDecl = Leerstelle vor dem Versionspseudoattribut in der Textdeklaration erforderlich.
-         SpaceRequiredBeforeEncodingInTextDecl = Leerstelle vor dem Codierungspseudoattribut in der Textdeklaration erforderlich.
--        TextDeclUnterminated = Textdeklaration muss mit \"?>\" enden.
-+        TextDeclUnterminated = Textdeklaration muss mit "?>" enden.
-         EncodingDeclRequired = Codierungsdeklaration ist in der Textdeklaration erforderlich.
-         NoMorePseudoAttributes = Es sind keine weiteren Pseudoattribute zul\u00E4ssig.
-         MorePseudoAttributes = Es werden weitere Pseudoattribute erwartet.
-@@ -143,13 +141,13 @@
-         CommentNotInOneEntity = Kommentar muss vollst\u00E4ndig in derselben geparsten Entit\u00E4t enthalten sein.
-         PINotInOneEntity = Verarbeitungsanweisung muss vollst\u00E4ndig in derselben geparsten Entit\u00E4t enthalten sein.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = Ung\u00FCltiger Codierungsname \"{0}\".
--        EncodingByteOrderUnsupported = Angegebene Bytereihenfolge f\u00FCr die Codierung von \"{0}\" wird nicht unterst\u00FCtzt.
-+        EncodingDeclInvalid = Ung\u00FCltiger Codierungsname "{0}".
-+        EncodingByteOrderUnsupported = Angegebene Bytereihenfolge f\u00FCr die Codierung von "{0}" wird nicht unterst\u00FCtzt.
-         InvalidByte = Ung\u00FCltiges Byte {0} von {1}-Byte-UTF-8-Sequenz.
-         ExpectedByte = Byte {0} von {1}-Byte-UTF-8-Sequenz erwartet.  
-         InvalidHighSurrogate = High-Surrogate-Bits in UTF-8-Sequenz d\u00FCrfen 0x10 nicht \u00FCberschreiten, gefunden wurde aber 0x{0}.
--        OperationNotSupported = Vorgang \"{0}\" nicht unterst\u00FCtzt von {1}-Reader.
--        InvalidASCII = Byte \"{0}\" geh\u00F6rt nicht zum (7-Bit) ASCII-Zeichensatz.
-+        OperationNotSupported = Vorgang "{0}" nicht unterst\u00FCtzt von {1}-Reader.
-+        InvalidASCII = Byte "{0}" geh\u00F6rt nicht zum (7-Bit) ASCII-Zeichensatz.
-         CharConversionFailure = Eine Entit\u00E4t, f\u00FCr die eine bestimmte Codierung ermittelt wurde, darf keine Sequenzen enthalten, die in dieser Codierung ung\u00FCltig sind.
-         
- # DTD Messages
-@@ -169,135 +167,135 @@
-         PubidCharIllegal = Zeichen (Unicode: 0x{0}) ist nicht zul\u00E4ssig in der \u00F6ffentlichen ID.
-         SpaceRequiredBetweenPublicAndSystem = Leerstellen erforderlich zwischen publicId und systemId.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Leerstelle nach \"" enden.
--        PEReferenceWithinMarkup = Parameterentit\u00E4tsreferenz \"%{0};\" darf nicht in Markup in der internen Teilmenge der DTD vorkommen.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Leerstelle nach "" enden.
-+        PEReferenceWithinMarkup = Parameterentit\u00E4tsreferenz "%{0};" darf nicht in Markup in der internen Teilmenge der DTD vorkommen.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Die Markup-Deklarationen, die in der Dokumenttypdeklaration enthalten sind bzw. auf die von der Dokumenttypdeklaration verwiesen wird, m\u00FCssen ordnungsgem\u00E4\u00DF formatiert sein.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklaration f\u00FCr \"xml:space\" muss als aufgez\u00E4hlter Typ angegeben werden, dessen einzigen m\u00F6glichen Werte \"default\" und \"preserve\" sind.
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklaration f\u00FCr "xml:space" muss als aufgez\u00E4hlter Typ angegeben werden, dessen einzigen m\u00F6glichen Werte "default" und "preserve" sind.
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Leerstelle nach \"" enden.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Leerstelle nach Elementtyp "{0}" in der Elementtypdeklaration erforderlich.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = Constraint ist nach dem Elementtyp "{0}" in der Elementtypdeklaration erforderlich.
-+        ElementDeclUnterminated = Deklaration f\u00FCr Elementtyp "{0}" muss mit ">" enden.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Das Zeichen "(" oder ein Elementtyp ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Das Zeichen ")" ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Das Zeichen "(" oder ein Elementtyp ist in der Deklaration des Elementtyps "{0}" erforderlich.
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Das Zeichen ")" ist in der Deklaration des Elementtyps "{0}" erforderlich.
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Ein Elementtyp ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Das Zeichen ")" ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
--        MixedContentUnterminated = Das Mischcontentmodell \"{0}\" muss mit \")*\" enden, wenn die Typen der untergeordneten Elemente eingeschr\u00E4nkt sind.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Ein Elementtyp ist in der Deklaration des Elementtyps "{0}" erforderlich.
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Das Zeichen ")" ist in der Deklaration des Elementtyps "{0}" erforderlich.
-+        MixedContentUnterminated = Das Mischcontentmodell "{0}" muss mit ")*" enden, wenn die Typen der untergeordneten Elemente eingeschr\u00E4nkt sind.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Leerstelle nach \"\" enden.
--        IgnoreSectUnterminated = Der ausgeschlossene Bedingungsabschnitt muss mit \"]]>\" enden.
-+        IncludeSectUnterminated = Der eingeschlossene Bedingungsabschnitt muss mit "]]>" enden.
-+        IgnoreSectUnterminated = Der ausgeschlossene Bedingungsabschnitt muss mit "]]>" enden.
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = Auf "%" in der Parameterentit\u00E4tsreferenz muss umgehend der Entit\u00E4tsname folgen.
--        SemicolonRequiredInPEReference = Parameterentit\u00E4tsreferenz \"%{0};\" muss mit dem Begrenzungszeichen ";" enden.
-+        SemicolonRequiredInPEReference = Parameterentit\u00E4tsreferenz "%{0};" muss mit dem Begrenzungszeichen ";" enden.
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Leerstelle nach \"" enden.
--	MSG_DUPLICATE_ENTITY_DEFINITION = Entit\u00E4t \"{0}\" wurde mehrmals deklariert.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Leerstelle zwischen dem Entit\u00E4tsnamen "{0}" und der Definition in der Entit\u00E4tsdeklaration erforderlich.
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Leerstelle zwischen "NDATA" und dem Notationsnamen in der Deklaration f\u00FCr die Entit\u00E4t "{0} erforderlich.
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Leerstelle vor "NDATA" in der Deklaration f\u00FCr die Entit\u00E4t "{0} erforderlich.
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Notationsname ist nach "NDATA" in der Deklaration f\u00FCr die Entit\u00E4t "{0} erforderlich.
-+        EntityDeclUnterminated = Deklaration f\u00FCr Entit\u00E4t "{0}" muss mit ">" enden.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = Entit\u00E4t "{0}" wurde mehrmals deklariert.        
- # 4.2.2 External Entities
--        ExternalIDRequired = Externe Entit\u00E4tsdeklaration muss mit \"SYSTEM\" oder \"PUBLIC\" beginnen.
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Leerstelle zwischen \"PUBLIC\" und der \u00F6ffentlichen ID erforderlich.
-+        ExternalIDRequired = Externe Entit\u00E4tsdeklaration muss mit "SYSTEM" oder "PUBLIC" beginnen.
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Leerstelle zwischen "PUBLIC" und der \u00F6ffentlichen ID erforderlich.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Leerstelle zwischen der \u00F6ffentlichen ID und der System-ID erforderlich.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Leerstelle zwischen \"SYSTEM\" und der System-ID erforderlich.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragment-ID darf nicht als Teil der System-ID \"{0}\" angegeben werden.
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Leerstelle zwischen "SYSTEM" und der System-ID erforderlich.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragment-ID darf nicht als Teil der System-ID "{0}" angegeben werden.
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Leerstelle nach \"" enden.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Leerstelle nach dem Notationsnamen "{0}" in der Notationsdeklaration erforderlich.
-+        ExternalIDorPublicIDRequired = Deklaration f\u00FCr die Notation "{0}" muss eine System- oder eine \u00F6ffentliche ID enthalten.
-+        NotationDeclUnterminated = Deklaration f\u00FCr die Notation "{0}" muss mit ">" enden.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = Elementtyp \"{1}\" wurde bereits im Contentmodell der Elementdeklaration\"{0}\" angegeben.
--        ENTITIESInvalid = Attributwert \"{1}\" mit dem Typ ENTITIES muss aus den Namen von mindestens einer geparsten Entit\u00E4t bestehen.
--        ENTITYInvalid = Attributwert \"{1}\" mit dem Typ ENTITY muss aus dem Namen einer geparsten Entit\u00E4t bestehen.
--        IDDefaultTypeInvalid = ID-Attribut \"{0}\" muss den deklarierten Standardwert \"#IMPLIED\" oder \"#REQUIRED\" haben.
--        IDInvalid = Attributwert \"{0}\" mit dem Typ ID muss ein Name sein.
--        IDInvalidWithNamespaces = Attributwert \"{0}\" mit dem Typ ID muss ein NCName sein, wenn Namespaces aktiviert sind.
--        IDNotUnique = Attributwert \"{0}\" mit dem Typ ID muss eindeutig im Dokument sein.
--        IDREFInvalid = Attributwert \"{0}\" mit dem Typ IDREF muss ein Name sein.
--        IDREFInvalidWithNamespaces = Attributwert \"{0}\" mit dem Typ IDREF muss ein NCName sein, wenn Namespaces aktiviert sind.
--        IDREFSInvalid = Attributwert \"{0}\" mit dem Typ IDREFS muss mindestens ein Name sein.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ersatztext der Parameterentit\u00E4t \"{0}\" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten, wenn die Entit\u00E4tsreferenz als vollst\u00E4ndige Deklaration verwendet wird.
--        ImproperDeclarationNesting = Ersatztext der Parameterentit\u00E4t \"{0}\" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten.
--        ImproperGroupNesting = Ersatztext der Parameterentit\u00E4t \"{0}\" muss ordnungsgem\u00E4\u00DF verschachtelte Klammernpaare enthalten.
--        INVALID_PE_IN_CONDITIONAL = Ersatztext der Parameterentit\u00E4t \"{0}\" muss den gesamten Bedingungsabschnitt oder nur INCLUDE oder IGNORE enthalten.
--        MSG_ATTRIBUTE_NOT_DECLARED = Attribut \"{1}\" muss f\u00FCr Elementtyp \"{0}\" deklariert werden.
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribut \"{0}\" mit Wert \"{1}\" muss einen Wert aus der Liste \"{2}\" haben.
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Der Wert \"{1}\" des Attributs \"{0}\" darf nicht von der Normalisierung (zu \"{2}\") in einem Standalone-Dokument ge\u00E4ndert werden.
--        MSG_CONTENT_INCOMPLETE = Content des Elementtyps \"{0}\" ist unvollst\u00E4ndig. Muss \"{1}\" entsprechen.
--        MSG_CONTENT_INVALID = Content des Elementtyps \"{0}\" muss \"{1}\" entsprechen.
--        MSG_CONTENT_INVALID_SPECIFIED = Content des Elementtyps \"{0}\" muss \"{1}\" entsprechen. Untergeordnete Elemente mit dem Typ \"{2}\" sind nicht zul\u00E4ssig.
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribut \"{1}\" f\u00FCr Elementtyp \"{0}\" hat einen Standardwert und muss in einem Standalone-Dokument angegeben werden.
--        MSG_DUPLICATE_ATTDEF = Attribut \"{1}\" ist bereits deklariert f\u00FCr Elementtyp \"{0}\".
--        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp \"{0}\" darf nicht mehrmals deklariert werden.
--        MSG_ELEMENT_NOT_DECLARED = Elementtyp \"{0}\" muss deklariert werden.
-+        DuplicateTypeInMixedContent = Elementtyp "{1}" wurde bereits im Contentmodell der Elementdeklaration"{0}" angegeben.
-+        ENTITIESInvalid = Attributwert "{1}" mit dem Typ ENTITIES muss aus den Namen von mindestens einer geparsten Entit\u00E4t bestehen.
-+        ENTITYInvalid = Attributwert "{1}" mit dem Typ ENTITY muss aus dem Namen einer geparsten Entit\u00E4t bestehen.
-+        IDDefaultTypeInvalid = ID-Attribut "{0}" muss den deklarierten Standardwert "#IMPLIED" oder "#REQUIRED" haben.
-+        IDInvalid = Attributwert "{0}" mit dem Typ ID muss ein Name sein.
-+        IDInvalidWithNamespaces = Attributwert "{0}" mit dem Typ ID muss ein NCName sein, wenn Namespaces aktiviert sind.
-+        IDNotUnique = Attributwert "{0}" mit dem Typ ID muss eindeutig im Dokument sein.
-+        IDREFInvalid = Attributwert "{0}" mit dem Typ IDREF muss ein Name sein.
-+        IDREFInvalidWithNamespaces = Attributwert "{0}" mit dem Typ IDREF muss ein NCName sein, wenn Namespaces aktiviert sind.
-+        IDREFSInvalid = Attributwert "{0}" mit dem Typ IDREFS muss mindestens ein Name sein.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ersatztext der Parameterentit\u00E4t "{0}" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten, wenn die Entit\u00E4tsreferenz als vollst\u00E4ndige Deklaration verwendet wird.
-+        ImproperDeclarationNesting = Ersatztext der Parameterentit\u00E4t "{0}" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten.
-+        ImproperGroupNesting = Ersatztext der Parameterentit\u00E4t "{0}" muss ordnungsgem\u00E4\u00DF verschachtelte Klammernpaare enthalten.
-+        INVALID_PE_IN_CONDITIONAL = Ersatztext der Parameterentit\u00E4t "{0}" muss den gesamten Bedingungsabschnitt oder nur INCLUDE oder IGNORE enthalten.
-+        MSG_ATTRIBUTE_NOT_DECLARED = Attribut "{1}" muss f\u00FCr Elementtyp "{0}" deklariert werden.
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribut "{0}" mit Wert "{1}" muss einen Wert aus der Liste "{2}" haben.
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Der Wert "{1}" des Attributs "{0}" darf nicht von der Normalisierung (zu "{2}") in einem Standalone-Dokument ge\u00E4ndert werden.
-+        MSG_CONTENT_INCOMPLETE = Content des Elementtyps "{0}" ist unvollst\u00E4ndig. Muss "{1}" entsprechen.
-+        MSG_CONTENT_INVALID = Content des Elementtyps "{0}" muss "{1}" entsprechen.
-+        MSG_CONTENT_INVALID_SPECIFIED = Content des Elementtyps "{0}" muss "{1}" entsprechen. Untergeordnete Elemente mit dem Typ "{2}" sind nicht zul\u00E4ssig.
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribut "{1}" f\u00FCr Elementtyp "{0}" hat einen Standardwert und muss in einem Standalone-Dokument angegeben werden.
-+        MSG_DUPLICATE_ATTDEF = Attribut "{1}" ist bereits deklariert f\u00FCr Elementtyp "{0}".
-+        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp "{0}" darf nicht mehrmals deklariert werden.
-+        MSG_ELEMENT_NOT_DECLARED = Elementtyp "{0}" muss deklariert werden.
-         MSG_GRAMMAR_NOT_FOUND = Dokument ist ung\u00FCltig. Keine Grammatik gefunden.
--        MSG_ELEMENT_WITH_ID_REQUIRED = Element mit \"{0}\" ist im Dokument erforderlich.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referenz zur externen Entit\u00E4t \"{0}\" ist in einem Standalone-Dokument nicht zul\u00E4ssig.
--        MSG_FIXED_ATTVALUE_INVALID = Attribut \"{1}\" mit Wert \"{2}\" muss den Wert\"{3}\" haben.
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp \"{0}\" hat bereits ein Attribut \"{1}\" mit dem Typ ID. Ein zweites Attribut \"{2}\" mit dem Typ ID ist nicht zul\u00E4ssig.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp \"{0}\" hat bereits ein Attribut \"{1}\" mit dem Typ NOTATION. Ein zweites Attribut \"{2}\" mit dem Typ NOTATION ist nicht zul\u00E4ssig.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notation \"{1}\" muss deklariert werden, wenn sie in der Notationstypliste f\u00FCr Attribut \"{0}\" referenziert wird.
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notation \"{1}\" muss deklariert werden, wenn sie in der Deklaration der nicht geparsten Entit\u00E4t f\u00FCr \"{0}\" referenziert wird.
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referenz zur Entit\u00E4t \"{0}\", die in einer externen geparsten Entit\u00E4t deklariert wird, ist in einem Standalone-Dokument nicht zul\u00E4ssig.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribut \"{1}\" ist erforderlich und muss f\u00FCr Elementtyp \"{0}\" angegeben werden.
-+        MSG_ELEMENT_WITH_ID_REQUIRED = Element mit "{0}" ist im Dokument erforderlich.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referenz zur externen Entit\u00E4t "{0}" ist in einem Standalone-Dokument nicht zul\u00E4ssig.
-+        MSG_FIXED_ATTVALUE_INVALID = Attribut "{1}" mit Wert "{2}" muss den Wert"{3}" haben.
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp "{0}" hat bereits ein Attribut "{1}" mit dem Typ ID. Ein zweites Attribut "{2}" mit dem Typ ID ist nicht zul\u00E4ssig.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp "{0}" hat bereits ein Attribut "{1}" mit dem Typ NOTATION. Ein zweites Attribut "{2}" mit dem Typ NOTATION ist nicht zul\u00E4ssig.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notation "{1}" muss deklariert werden, wenn sie in der Notationstypliste f\u00FCr Attribut "{0}" referenziert wird.
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notation "{1}" muss deklariert werden, wenn sie in der Deklaration der nicht geparsten Entit\u00E4t f\u00FCr "{0}" referenziert wird.
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referenz zur Entit\u00E4t "{0}", die in einer externen geparsten Entit\u00E4t deklariert wird, ist in einem Standalone-Dokument nicht zul\u00E4ssig.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribut "{1}" ist erforderlich und muss f\u00FCr Elementtyp "{0}" angegeben werden.
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Es d\u00FCrfen keine Leerstellen zwischen Elementen in einem Standalone-Dokument vorkommen, die in einer externen geparsten Entit\u00E4t mit Elementcontent deklariert sind.
--        NMTOKENInvalid = Attributwert \"{0}\" mit dem Typ NMTOKEN muss ein Namenstoken sein.
--        NMTOKENSInvalid = Attributwert \"{0}\" mit dem Typ NMTOKENS muss mindestens ein Namenstoken sein.
--        NoNotationOnEmptyElement = Elementtyp \"{0}\", der als EMPTY deklariert wurde, kann nicht das Attribut \"{1}\" mit dem Typ NOTATION deklarieren.
--        RootElementTypeMustMatchDoctypedecl = Dokument-Root-Element \"{1}\"muss mit DOCTYPE-Root \"{0}\" \u00FCbereinstimmen.
--        UndeclaredElementInContentSpec = Contentmodell des Elements \"{0}\" verweist auf das nicht deklarierte Element \"{1}\".
--        UniqueNotationName = Deklaration f\u00FCr die Notation \"{0}\" ist nicht eindeutig. Ein jeweiliger Name darf nicht in mehreren Notationsdeklarationen deklariert werden.
-+        NMTOKENInvalid = Attributwert "{0}" mit dem Typ NMTOKEN muss ein Namenstoken sein.
-+        NMTOKENSInvalid = Attributwert "{0}" mit dem Typ NMTOKENS muss mindestens ein Namenstoken sein.
-+        NoNotationOnEmptyElement = Elementtyp "{0}", der als EMPTY deklariert wurde, kann nicht das Attribut "{1}" mit dem Typ NOTATION deklarieren.
-+        RootElementTypeMustMatchDoctypedecl = Dokument-Root-Element "{1}"muss mit DOCTYPE-Root "{0}" \u00FCbereinstimmen.
-+        UndeclaredElementInContentSpec = Contentmodell des Elements "{0}" verweist auf das nicht deklarierte Element "{1}".
-+        UniqueNotationName = Deklaration f\u00FCr die Notation "{0}" ist nicht eindeutig. Ein jeweiliger Name darf nicht in mehreren Notationsdeklarationen deklariert werden.
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype-Validator: Nicht erfolgreich. Initialisierungsmethode muss mit einer g\u00FCltigen Grammatikreferenz aufgerufen werden. \t
--        ENTITYNotUnparsed = ENTITY \"{0}\" ist geparst.
--        ENTITYNotValid = ENTITY \"{0}\" ist nicht g\u00FCltig.
-+        ENTITYNotUnparsed = ENTITY "{0}" ist geparst.
-+        ENTITYNotValid = ENTITY "{0}" ist nicht g\u00FCltig.
-         EmptyList = Werte der Typen ENTITIES, IDREFS und NMTOKENS d\u00FCrfen keine leeren Listen sein.
+ // The system dictionary stores all loaded classes and maps:
+ //
+@@ -151,6 +151,7 @@
+   do_klass(MemberName_klass,                            java_lang_invoke_MemberName,               Pre_JSR292          ) \
+   do_klass(MethodHandleNatives_klass,                   java_lang_invoke_MethodHandleNatives,      Pre_JSR292          ) \
+   do_klass(LambdaForm_klass,                            java_lang_invoke_LambdaForm,               Opt                 ) \
++  do_klass(DirectMethodHandle_klass,                    java_lang_invoke_DirectMethodHandle,       Opt                 ) \
+   do_klass(MethodType_klass,                            java_lang_invoke_MethodType,               Pre_JSR292          ) \
+   do_klass(BootstrapMethodError_klass,                  java_lang_BootstrapMethodError,            Pre_JSR292          ) \
+   do_klass(CallSite_klass,                              java_lang_invoke_CallSite,                 Pre_JSR292          ) \
+@@ -616,7 +617,7 @@
+   static void add_to_hierarchy(instanceKlassHandle k, TRAPS);
+ 
+   // event based tracing
+-  static void post_class_load_event(TracingTime start_time, instanceKlassHandle k,
++  static void post_class_load_event(const Ticks& start_time, instanceKlassHandle k,
+                                     Handle initiating_loader);
+   static void post_class_unload_events(BoolObjectClosure* is_alive);
+ 
+@@ -678,7 +679,7 @@
+   static bool _has_checkPackageAccess;
+ 
+ #if INCLUDE_TRACE
+-  static TracingTime _class_unload_time;
++  static Ticks _class_unload_time;
+   static BoolObjectClosure* _is_alive;
+   static int _no_of_classes_unloading;
+   static bool _should_write_unload_events;
+--- ./hotspot/src/share/vm/classfile/vmSymbols.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/classfile/vmSymbols.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -243,6 +243,7 @@
+   /* Support for JSR 292 & invokedynamic (JDK 1.7 and above) */                                   \
+   template(java_lang_invoke_CallSite,                 "java/lang/invoke/CallSite")                \
+   template(java_lang_invoke_ConstantCallSite,         "java/lang/invoke/ConstantCallSite")        \
++  template(java_lang_invoke_DirectMethodHandle,       "java/lang/invoke/DirectMethodHandle")      \
+   template(java_lang_invoke_MutableCallSite,          "java/lang/invoke/MutableCallSite")         \
+   template(java_lang_invoke_VolatileCallSite,         "java/lang/invoke/VolatileCallSite")        \
+   template(java_lang_invoke_MethodHandle,             "java/lang/invoke/MethodHandle")            \
+@@ -338,6 +339,7 @@
+   template(thread_id_name,                            "tid")                                      \
+   template(newInstance0_name,                         "newInstance0")                             \
+   template(limit_name,                                "limit")                                    \
++  template(member_name,                               "member")                                   \
+   template(forName_name,                              "forName")                                  \
+   template(forName0_name,                             "forName0")                                 \
+   template(isJavaIdentifierStart_name,                "isJavaIdentifierStart")                    \
+--- ./hotspot/src/share/vm/code/nmethod.cpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/code/nmethod.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -676,6 +676,7 @@
+     code_buffer->copy_oops_to(this);
+     if (ScavengeRootsInCode && detect_scavenge_root_oops()) {
+       CodeCache::add_scavenge_root_nmethod(this);
++      Universe::heap()->register_nmethod(this);
+     }
+     debug_only(verify_scavenge_root_oops());
+     CodeCache::commit(this);
+@@ -869,6 +870,7 @@
+     dependencies->copy_to(this);
+     if (ScavengeRootsInCode && detect_scavenge_root_oops()) {
+       CodeCache::add_scavenge_root_nmethod(this);
++      Universe::heap()->register_nmethod(this);
+     }
+     debug_only(verify_scavenge_root_oops());
+ 
+@@ -1282,6 +1284,13 @@
+   methodHandle the_method(method());
+   No_Safepoint_Verifier nsv;
+ 
++  // during patching, depending on the nmethod state we must notify the GC that
++  // code has been unloaded, unregistering it. We cannot do this right while
++  // holding the Patching_lock because we need to use the CodeCache_lock. This
++  // would be prone to deadlocks.
++  // This flag is used to remember whether we need to later lock and unregister.
++  bool nmethod_needs_unregister = false;
++
+   {
+     // invalidate osr nmethod before acquiring the patching lock since
+     // they both acquire leaf locks and we don't want a deadlock.
+@@ -1314,6 +1323,13 @@
+       inc_decompile_count();
+     }
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = Externe Entit\u00E4tsreferenz \"&{0};\" ist in einem Attributwert nicht zul\u00E4ssig.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = Externe Entit\u00E4tsreferenz "&{0};" ist in einem Attributwert nicht zul\u00E4ssig.
-+        AccessExternalDTD = Externe DTD: Lesen von externer DTD "{0}" nicht erfolgreich, da "{1}"-Zugriff wegen der von der Eigenschaft "accessExternalDTD" festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist.
-+        AccessExternalEntity = Externe Entit\u00E4t: Lesen des externen Dokuments "{0}" nicht erfolgreich, da "{1}"-Zugriff wegen der von der Eigenschaft "accessExternalDTD" festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist.
++    // If the state is becoming a zombie, signal to unregister the nmethod with
++    // the heap.
++    // This nmethod may have already been unloaded during a full GC.
++    if ((state == zombie) && !is_unloaded()) {
++      nmethod_needs_unregister = true;
++    }
++
+     // Change state
+     _state = state;
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = Entit\u00E4t \"{0}\" wurde referenziert aber nicht deklariert.
--        ReferenceToUnparsedEntity = Nicht geparste Entit\u00E4tsreferenz \"&{0};\" ist nicht zul\u00E4ssig.
--        RecursiveReference = Rekursive Entit\u00E4tsreferenz \"{0}\". (Referenzpfad: {1}),
--        RecursiveGeneralReference = Rekursive allgemeine Entit\u00E4tsreferenz \"&{0};\". (Referenzpfad: {1}),
--        RecursivePEReference = Rekursive Parameterentit\u00E4tsreferenz \"%{0};\". (Referenzpfad: {1}),
-+        EntityNotDeclared = Entit\u00E4t "{0}" wurde referenziert aber nicht deklariert.
-+        ReferenceToUnparsedEntity = Nicht geparste Entit\u00E4tsreferenz "&{0};" ist nicht zul\u00E4ssig.
-+        RecursiveReference = Rekursive Entit\u00E4tsreferenz "{0}". (Referenzpfad: {1}),
-+        RecursiveGeneralReference = Rekursive allgemeine Entit\u00E4tsreferenz "&{0};". (Referenzpfad: {1}),
-+        RecursivePEReference = Rekursive Parameterentit\u00E4tsreferenz "%{0};". (Referenzpfad: {1}),
- # 4.3.3 Character Encoding in Entities
-         EncodingNotSupported = Codierung "{0}" wird nicht unterst\u00FCtzt.
-         EncodingRequired = Eine nicht in UTF-8 oder UTF-16 codierte geparste Entit\u00E4t muss eine Codierungsdeklaration enthalten.
-@@ -305,14 +303,14 @@
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = Element oder Attribut stimmt nicht mit QName-Production \u00FCberein: QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = Element \"{0}\" darf nicht \"xmlns\" als Pr\u00E4fix enthalten.
--        ElementPrefixUnbound = Pr\u00E4fix \"{0}\" f\u00FCr Element \"{1}\" ist nicht gebunden.
--        AttributePrefixUnbound = Pr\u00E4fix \"{2}\" f\u00FCr Attribut \"{1}\", das mit Elementtyp \"{0}\" verkn\u00FCpft ist, ist nicht gebunden.
--        EmptyPrefixedAttName = Wert des Attributs \"{0}\" ist ung\u00FCltig. Namespace Bindings mit Pr\u00E4fix d\u00FCrfen nicht leer sein.
--        PrefixDeclared = Namespace-Pr\u00E4fix \"{0}\" wurde nicht deklariert.
-+        ElementXMLNSPrefix = Element "{0}" darf nicht "xmlns" als Pr\u00E4fix enthalten.
-+        ElementPrefixUnbound = Pr\u00E4fix "{0}" f\u00FCr Element "{1}" ist nicht gebunden.
-+        AttributePrefixUnbound = Pr\u00E4fix "{2}" f\u00FCr Attribut "{1}", das mit Elementtyp "{0}" verkn\u00FCpft ist, ist nicht gebunden.
-+        EmptyPrefixedAttName = Wert des Attributs "{0}" ist ung\u00FCltig. Namespace Bindings mit Pr\u00E4fix d\u00FCrfen nicht leer sein.
-+        PrefixDeclared = Namespace-Pr\u00E4fix "{0}" wurde nicht deklariert.
-         CantBindXMLNS = Pr\u00E4fix "xmlns" kann nicht explizit an einen Namespace gebunden werden. Umgekehrt kann auch der Namespace f\u00FCr "xmlns" nicht explizit an ein Pr\u00E4fix gebunden werden.
-         CantBindXML = Pr\u00E4fix "xml" kann nicht an einen anderen Namespace als den gew\u00F6hnlichen gebunden werden. Umgekehrt kann auch der Namespace f\u00FCr "xml" nicht an ein anderes Pr\u00E4fix als "xml" gebunden werden.
--        MSG_ATT_DEFAULT_INVALID = defaultValue \"{1}\" von Attribut \"{0}\" ist aufgrund der lexikalischen Constraints dieses Attributtyps nicht g\u00FCltig.
-+        MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" von Attribut "{0}" ist aufgrund der lexikalischen Constraints dieses Attributtyps nicht g\u00FCltig.
+@@ -1349,6 +1365,9 @@
+       // safepoint can sneak in, otherwise the oops used by the
+       // dependency logic could have become stale.
+       MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
++      if (nmethod_needs_unregister) {
++        Universe::heap()->unregister_nmethod(this);
++      }
+       flush_dependencies(NULL);
+     }
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+@@ -1696,20 +1715,10 @@
+ #endif // !PRODUCT
+ }
  
+-// This method is called twice during GC -- once while
+-// tracing the "active" nmethods on thread stacks during
+-// the (strong) marking phase, and then again when walking
+-// the code cache contents during the weak roots processing
+-// phase. The two uses are distinguished by means of the
+-// 'do_strong_roots_only' flag, which is true in the first
+-// case. We want to walk the weak roots in the nmethod
+-// only in the second case. The weak roots in the nmethod
+-// are the oops in the ExceptionCache and the InlineCache
+-// oops.
+-void nmethod::oops_do(OopClosure* f, bool do_strong_roots_only) {
+-  // make sure the oops ready to receive visitors
+-  assert(!is_zombie() && !is_unloaded(),
+-         "should not call follow on zombie or unloaded nmethod");
++void nmethod::oops_do(OopClosure* f, bool do_strong_roots_only, bool allow_zombie) {
++   // make sure the oops ready to receive visitors
++  assert(allow_zombie || !is_zombie(), "should not call follow on zombie nmethod");
++  assert(!is_unloaded(), "should not call follow on unloaded nmethod");
+ 
+   // If the method is not entrant or zombie then a JMP is plastered over the
+   // first few bytes.  If an oop in the old code was there, that oop
+--- ./hotspot/src/share/vm/code/nmethod.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/code/nmethod.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -548,8 +548,8 @@
+ 
+   void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map,
+                                      OopClosure* f);
+-  void oops_do(OopClosure* f) { oops_do(f, false); }
+-  void oops_do(OopClosure* f, bool do_strong_roots_only);
++  void oops_do(OopClosure* f) { oops_do(f, false, false); }
++  void oops_do(OopClosure* f, bool do_strong_roots_only, bool allow_zombie);
+   bool detect_scavenge_root_oops();
+   void verify_scavenge_root_oops() PRODUCT_RETURN;
+ 
+--- ./hotspot/src/share/vm/code/relocInfo.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/code/relocInfo.hpp	2014-06-06 19:56:22.000000000 -0700
+@@ -371,7 +371,7 @@
+   // "immediate" in the prefix header word itself.  This optimization
+   // is invisible outside this module.)
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=Parser hat mehr als \"{0}\" Entit\u00E4tserweiterungen in diesem Dokument gefunden. Dies ist der durch die Anwendung vorgeschriebene Grenzwert.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: Der Parser hat mehr als {0} Entit\u00E4tserweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
-+        ElementAttributeLimit=JAXP00010002: Element "{0}" hat mehr als {1} Attribute. "{1}" ist der von JDK vorgeschriebene Grenzwert.
-+        MaxEntitySizeLimit=JAXP00010003: Die L\u00E4nge von Entit\u00E4t "{0}" ist "{1}" und \u00FCberschreitet den Grenzwert "{2}", der von "{3}" festgelegt wurde.
-+        TotalEntitySizeLimit=JAXP00010004: Die akkumulierte Gr\u00F6\u00DFe "{0}" der Entit\u00E4ten \u00FCberschreitet den Grenzwert "{1}", der von "{2}" festgelegt wurde.
-+        MaxXMLNameLimit=JAXP00010005: Der Name "{0}" \u00FCberschreitet den Grenzwert "{1}", der von "{2}" festgelegt wurde.
+-  inline friend relocInfo prefix_relocInfo(int datalen = 0);
++  inline friend relocInfo prefix_relocInfo(int datalen);
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= Element \"{0}\" hat mehr als \"{1}\" Attribute. \"{1}\" ist der durch die Anwendung vorgeschriebene Grenzwert.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
--
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+  protected:
+   // an immediate relocInfo optimizes a prefix with one 10-bit unsigned value
+@@ -466,7 +466,7 @@
+   return relocInfo(relocInfo::none, relocInfo::offset_limit() - relocInfo::offset_unit);
+ }
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el pr\u00F3logo del documento.
-         InvalidCharInXMLDecl = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en la declaraci\u00F3n XML.
- # 2.4 Character Data and Markup
--        CDEndInContent = La secuencia de caracteres \"]]>\" no debe aparecer en el contenido, a menos que se utilice para marcar el final de una secci\u00F3n CDATA.
-+        CDEndInContent = La secuencia de caracteres "]]>" no debe aparecer en el contenido, a menos que se utilice para marcar el final de una secci\u00F3n CDATA.
- # 2.7 CDATA Sections
--        CDSectUnterminated = La secci\u00F3n CDATA debe finalizar en \"]]>\".
-+        CDSectUnterminated = La secci\u00F3n CDATA debe finalizar en "]]>".
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = La declaraci\u00F3n XML s\u00F3lo puede aparecer al principio del documento.
--        EqRequiredInXMLDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de \"{0}\" en la declaraci\u00F3n XML.
--        QuoteRequiredInXMLDecl = El valor despu\u00E9s de \"{0}\" en la declaraci\u00F3n XML debe ser una cadena con comillas.
--        XMLDeclUnterminated = La declaraci\u00F3n XML debe finalizar en \"?>\".
-+        EqRequiredInXMLDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de "{0}" en la declaraci\u00F3n XML.
-+        QuoteRequiredInXMLDecl = El valor despu\u00E9s de "{0}" en la declaraci\u00F3n XML debe ser una cadena con comillas.
-+        XMLDeclUnterminated = La declaraci\u00F3n XML debe finalizar en "?>".
-         VersionInfoRequired = La versi\u00F3n es necesaria en la declaraci\u00F3n XML.
-         SpaceRequiredBeforeVersionInXMLDecl = Es necesario un espacio en blanco antes del pseudo atributo version en la declaraci\u00F3n XML.
-         SpaceRequiredBeforeEncodingInXMLDecl = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaraci\u00F3n XML.
-@@ -71,70 +68,71 @@
-         ReferenceIllegalInTrailingMisc=La referencia no est\u00E1 permitida en la secci\u00F3n final.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = El valor de declaraci\u00F3n del documento aut\u00F3nomo debe ser \"yes\" o \"no\", pero nunca \"{0}\".
-+        SDDeclInvalid = El valor de declaraci\u00F3n del documento aut\u00F3nomo debe ser "yes" o "no", pero nunca "{0}".
-+        SDDeclNameInvalid = Puede que el nombre aut\u00F3nomo de la declaraci\u00F3n XML est\u00E9 mal escrito.
- # 2.12 Language Identification
--        XMLLangInvalid = El valor del atributo xml:lang \"{0}\" es un identificador de idioma no v\u00E1lido.
-+        XMLLangInvalid = El valor del atributo xml:lang "{0}" es un identificador de idioma no v\u00E1lido.
- # 3. Logical Structures
--        ETagRequired = El tipo de elemento \"{0}\" debe finalizar por la etiqueta final coincidente \"\".
-+        ETagRequired = El tipo de elemento "{0}" debe finalizar por la etiqueta final coincidente "".
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = El tipo de elemento \"{0}\" debe ir seguido de una de estas especificaciones de atributo: \">\" o \"/>\".
--        EqRequiredInAttribute = El nombre de atributo \"{1}\" asociado a un tipo de elemento \"{0}\" debe ir seguido del car\u00E1cter '' = ''.
--        OpenQuoteExpected = Las comillas de apertura se deben utilizar para el atributo \"{1}\" asociado a un tipo de elemento \"{0}\".
--        CloseQuoteExpected = Las comillas de cierre se deben utilizar para el atributo \"{1}\" asociado a un tipo de elemento \"{0}\".
--        AttributeNotUnique = El atributo \"{1}\" ya se ha especificado para el elemento \"{0}\".
--        AttributeNSNotUnique = El atributo \"{1}\" enlazado al espacio de nombres \"{2}\" ya se ha especificado para el elemento \"{0}\".
--        ETagUnterminated = La etiqueta final para el tipo de elemento \"{0}\" debe finalizar en un delimitador ''>''.
-+        ElementUnterminated = El tipo de elemento "{0}" debe ir seguido de una de estas especificaciones de atributo: ">" o "/>".
-+        EqRequiredInAttribute = El nombre de atributo "{1}" asociado a un tipo de elemento "{0}" debe ir seguido del car\u00E1cter '' = ''.
-+        OpenQuoteExpected = Las comillas de apertura se deben utilizar para el atributo "{1}" asociado a un tipo de elemento "{0}".
-+        CloseQuoteExpected = Las comillas de cierre se deben utilizar para el atributo "{1}" asociado a un tipo de elemento "{0}".
-+        AttributeNotUnique = El atributo "{1}" ya se ha especificado para el elemento "{0}".
-+        AttributeNSNotUnique = El atributo "{1}" enlazado al espacio de nombres "{2}" ya se ha especificado para el elemento "{0}".
-+        ETagUnterminated = La etiqueta final para el tipo de elemento "{0}" debe finalizar en un delimitador ''>''.
-         MarkupNotRecognizedInContent = El contenido de los elementos debe constar de marcadores o datos de car\u00E1cter con un formato correcto.
-         DoctypeIllegalInContent = No se permite un DOCTYPE en el contenido.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = La referencia debe finalizar con un delimitador ';'.
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = La referencia debe incluirse totalmente en la misma entidad analizada.
--        ElementEntityMismatch = El elemento \"{0}\" debe empezar y finalizar en la misma entidad.
-+        ElementEntityMismatch = El elemento "{0}" debe empezar y finalizar en la misma entidad.
-         MarkupEntityMismatch=Las estructuras del documento XML deben empezar y finalizar en la misma entidad.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{2}) no v\u00E1lido en el valor del atributo \"{1}\" y el elemento es \"{0}\".
-+        InvalidCharInAttValue = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{2}) no v\u00E1lido en el valor del atributo "{1}" y el elemento es "{0}".
-         InvalidCharInComment = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el comentario.
-         InvalidCharInPI = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en la instrucci\u00F3n de procesamiento.
-         InvalidCharInInternalSubset = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el subconjunto interno del DTD.
-         InvalidCharInTextDecl = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en la declaraci\u00F3n de texto.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = El valor del atributo \"{1}\" debe empezar por un car\u00E1cter de comillas dobles o simples.
--        LessthanInAttValue = El valor del atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no debe contener el car\u00E1cter ''<''.
--        AttributeValueUnterminated = El valor para el atributo \"{1}\" debe finalizar en un car\u00E1cter de comillas coincidentes.
-+        QuoteRequiredInAttValue = El valor del atributo "{1}" debe empezar por un car\u00E1cter de comillas dobles o simples.
-+        LessthanInAttValue = El valor del atributo "{1}" asociado a un tipo de elemento "{0}" no debe contener el car\u00E1cter ''<''.
-+        AttributeValueUnterminated = El valor para el atributo "{1}" debe finalizar en un car\u00E1cter de comillas coincidentes.
- # 2.5 Comments
--        InvalidCommentStart = El comentario debe empezar por \"\".
-+        InvalidCommentStart = El comentario debe empezar por "".
-         COMMENT_NOT_IN_ONE_ENTITY = El comentario no est\u00E1 incluido en la misma entidad.
- # 2.6 Processing Instructions
-         PITargetRequired = La instrucci\u00F3n de procesamiento debe empezar por el nombre del destino.
-         SpaceRequiredInPI = Es necesario un espacio en blanco entre el destino de la instrucci\u00F3n de procesamiento y los datos.
--        PIUnterminated = La instrucci\u00F3n de procesamiento debe finalizar en \"?>\".
--        ReservedPITarget = El destino de la instrucci\u00F3n de procesamiento que coincide con \"[xX][mM][lL]\" no est\u00E1 permitido.
-+        PIUnterminated = La instrucci\u00F3n de procesamiento debe finalizar en "?>".
-+        ReservedPITarget = El destino de la instrucci\u00F3n de procesamiento que coincide con "[xX][mM][lL]" no est\u00E1 permitido.
-         PI_NOT_IN_ONE_ENTITY = La instrucci\u00F3n de procesamiento no est\u00E1 incluida en la misma entidad.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = Versi\u00F3n no v\u00E1lida \"{0}\".
--        VersionNotSupported = La versi\u00F3n XML \"{0}\" no est\u00E1 soportada, s\u00F3lo la versi\u00F3n XML 1.0 est\u00E1 soportada.
--        VersionNotSupported11 = La versi\u00F3n XML \"{0}\" no est\u00E1 soportada, s\u00F3lo las versiones XML 1.0 y XML 1.1 est\u00E1n soportadas.
-+        VersionInfoInvalid = Versi\u00F3n no v\u00E1lida "{0}".
-+        VersionNotSupported = La versi\u00F3n XML "{0}" no est\u00E1 soportada, s\u00F3lo la versi\u00F3n XML 1.0 est\u00E1 soportada.
-+        VersionNotSupported11 = La versi\u00F3n XML "{0}" no est\u00E1 soportada, s\u00F3lo las versiones XML 1.0 y XML 1.1 est\u00E1n soportadas.
-         VersionMismatch= Una entidad no puede incluir otra entidad de una versi\u00F3n posterior.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = Una representaci\u00F3n decimal debe aparecer inmediatamente despu\u00E9s de \"&#\" en una referencia de caracteres.
--        HexdigitRequiredInCharRef = Una representaci\u00F3n hexadecimal debe aparecer inmediatamente despu\u00E9s de \"&#\" en una referencia de caracteres.
-+        DigitRequiredInCharRef = Una representaci\u00F3n decimal debe aparecer inmediatamente despu\u00E9s de "&#" en una referencia de caracteres.
-+        HexdigitRequiredInCharRef = Una representaci\u00F3n hexadecimal debe aparecer inmediatamente despu\u00E9s de "&#" en una referencia de caracteres.
-         SemicolonRequiredInCharRef = La referencia de caracteres debe finalizar en el delimitador ';'.
--        InvalidCharRef = La referencia de caracteres \"&#{0}\" es un car\u00E1cter XML no v\u00E1lido.
-+        InvalidCharRef = La referencia de caracteres "&#{0}" es un car\u00E1cter XML no v\u00E1lido.
-         NameRequiredInReference = El nombre de la entidad debe aparecer inmediatamente despu\u00E9s de '&' en la referencia de entidades.
--        SemicolonRequiredInReference = La referencia a la entidad \"{0}\" debe finalizar en el delimitador '';''.
-+        SemicolonRequiredInReference = La referencia a la entidad "{0}" debe finalizar en el delimitador '';''.
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = La declaraci\u00F3n de texto s\u00F3lo puede aparecer al principio de la entidad analizada externa.
--        EqRequiredInTextDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de \"{0}\" en la declaraci\u00F3n de texto.
--        QuoteRequiredInTextDecl = El valor despu\u00E9s de \"{0}\" en la declaraci\u00F3n de texto debe ser una cadena con comillas.
--        CloseQuoteMissingInTextDecl = Faltan las comillas de cierre en el valor despu\u00E9s de \"{0}\" en la declaraci\u00F3n de texto.
-+        EqRequiredInTextDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de "{0}" en la declaraci\u00F3n de texto.
-+        QuoteRequiredInTextDecl = El valor despu\u00E9s de "{0}" en la declaraci\u00F3n de texto debe ser una cadena con comillas.
-+        CloseQuoteMissingInTextDecl = Faltan las comillas de cierre en el valor despu\u00E9s de "{0}" en la declaraci\u00F3n de texto.
-         SpaceRequiredBeforeVersionInTextDecl = Es necesario un espacio en blanco antes del pseudo atributo version en la declaraci\u00F3n de texto.
-         SpaceRequiredBeforeEncodingInTextDecl = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaraci\u00F3n de texto.
--        TextDeclUnterminated = La declaraci\u00F3n de texto debe finalizar en \"?>\".
-+        TextDeclUnterminated = La declaraci\u00F3n de texto debe finalizar en "?>".
-         EncodingDeclRequired = La declaraci\u00F3n de codificaci\u00F3n es necesaria en la declaraci\u00F3n de texto.
-         NoMorePseudoAttributes = No se permiten m\u00E1s pseudo atributos.
-         MorePseudoAttributes = Se esperan m\u00E1s pseudo atributos.
-@@ -143,13 +141,13 @@
-         CommentNotInOneEntity = El comentario debe incluirse totalmente en la misma entidad analizada.
-         PINotInOneEntity = La instrucci\u00F3n de procesamiento debe incluirse totalmente en la misma entidad analizada.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = Nombre de codificaci\u00F3n no v\u00E1lido \"{0}\".
--        EncodingByteOrderUnsupported = El orden de bytes proporcionado para la codificaci\u00F3n \"{0}\" no est\u00E1 soportado.
-+        EncodingDeclInvalid = Nombre de codificaci\u00F3n no v\u00E1lido "{0}".
-+        EncodingByteOrderUnsupported = El orden de bytes proporcionado para la codificaci\u00F3n "{0}" no est\u00E1 soportado.
-         InvalidByte = Byte no v\u00E1lido {0} de la secuencia UTF-8 de {1} bytes
-         ExpectedByte = Byte esperado {0} de la secuencia UTF-8 de {1} bytes.  
-         InvalidHighSurrogate = Los bits de sustituci\u00F3n superior en la secuencia UTF-8 no deben exceder 0x10 pero se han encontrado 0x{0}.
--        OperationNotSupported = La operaci\u00F3n \"{0}\" no est\u00E1 soportada por el lector {1}.
--        InvalidASCII = El byte \"{0}\"no es un miembro del juego de caracteres ASCII (7 bits).
-+        OperationNotSupported = La operaci\u00F3n "{0}" no est\u00E1 soportada por el lector {1}.
-+        InvalidASCII = El byte "{0}"no es un miembro del juego de caracteres ASCII (7 bits).
-         CharConversionFailure = Una entidad con una codificaci\u00F3n determinada no debe contener secuencias no permitidas en dicha codificaci\u00F3n.
-         
- # DTD Messages
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = El car\u00E1cter (Unicode: 0x{0}) no est\u00E1 permitido en el identificador p\u00FAblico.
-         SpaceRequiredBetweenPublicAndSystem = Son necesarios espacios en blanco entre publicId y systemId.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
--        PEReferenceWithinMarkup = La referencia de entidad del par\u00E1metro \"%{0};\" no puede producirse en el marcador en el subconjunto interno del DTD.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Es necesario un espacio en blanco despu\u00E9s de "''.
-+        PEReferenceWithinMarkup = La referencia de entidad del par\u00E1metro "%{0};" no puede producirse en el marcador en el subconjunto interno del DTD.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Las declaraciones de marcador que se incluyen o a las que apunta la declaraci\u00F3n de tipo de documento deben tener el formato correcto.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = La declaraci\u00F3n de atributo para \"xml:space\" debe ofrecerse como un tipo enumerado cuyos \u00FAnicos valores posibles son \"default\" y \"preserve\".
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = La declaraci\u00F3n de atributo para "xml:space" debe ofrecerse como un tipo enumerado cuyos \u00FAnicos valores posibles son "default" y "preserve".
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Es necesario un espacio en blanco despu\u00E9s del tipo de elemento "{0}" en la declaraci\u00F3n de tipo de elemento.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = Es necesaria la restricci\u00F3n despu\u00E9s del tipo de elemento "{0}" en la declaraci\u00F3n de tipo de elemento.
-+        ElementDeclUnterminated = La declaraci\u00F3n para el tipo de elemento "{0}" debe finalizar en ''>''.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un car\u00E1cter ''('' o un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un car\u00E1cter ''('' o un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
--        MixedContentUnterminated = El modelo de contenido mixto \"{0}\" debe finalizar en \")*\" cuando los tipos de elementos secundarios est\u00E1n restringidos.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
-+        MixedContentUnterminated = El modelo de contenido mixto "{0}" debe finalizar en ")*" cuando los tipos de elementos secundarios est\u00E1n restringidos.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Es necesario un espacio en blanco despu\u00E9s de \"\".
--        IgnoreSectUnterminated = La secci\u00F3n condicional excluida debe finalizar en \"]]>\".
-+        IncludeSectUnterminated = La secci\u00F3n condicional incluida debe finalizar en "]]>".
-+        IgnoreSectUnterminated = La secci\u00F3n condicional excluida debe finalizar en "]]>".
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = El nombre de la entidad debe aparecer inmediatamente despu\u00E9s de '%' en la referencia de entidad de par\u00E1metro.
--        SemicolonRequiredInPEReference = La referencia de entidad de par\u00E1metro \"%{0};\" debe finalizar en el delimitador '';''.
-+        SemicolonRequiredInPEReference = La referencia de entidad de par\u00E1metro "%{0};" debe finalizar en el delimitador '';''.
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
--	MSG_DUPLICATE_ENTITY_DEFINITION = La entidad \"{0}\" se ha declarado m\u00E1s de una vez.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Es necesario un espacio en blanco entre el nombre de entidad "{0}" y la definici\u00F3n en la declaraci\u00F3n de entidad.
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Es necesario un espacio en blanco entre "NDATA" y el nombre de notaci\u00F3n en la declaraci\u00F3n para la entidad "{0}".
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Es necesario un espacio en blanco antes de "NDATA" en la declaraci\u00F3n para la entidad "{0}".
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = El nombre de notaci\u00F3n es necesario despu\u00E9s de "NDATA" en la declaraci\u00F3n para la entidad "{0}".
-+        EntityDeclUnterminated = La declaraci\u00F3n para la entidad "{0}" debe finalizar en ''>''.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = La entidad "{0}" se ha declarado m\u00E1s de una vez.        
- # 4.2.2 External Entities
--        ExternalIDRequired = La declaraci\u00F3n de entidad externa debe empezar por \"SYSTEM\" o \"PUBLIC\".
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre \"PUBLIC\" y el identificador p\u00FAblico.
-+        ExternalIDRequired = La declaraci\u00F3n de entidad externa debe empezar por "SYSTEM" o "PUBLIC".
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre "PUBLIC" y el identificador p\u00FAblico.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre el identificador p\u00FAblico y el identificador del sistema.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre \"SYSTEM\" y el identificador del sistema.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = No se debe especificar el identificador del fragmento como parte del identificador del sistema \"{0}\".
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre "SYSTEM" y el identificador del sistema.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = No se debe especificar el identificador del fragmento como parte del identificador del sistema "{0}".
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Es necesario un espacio en blanco despu\u00E9s del nombre de la notaci\u00F3n "{0}" en la declaraci\u00F3n de notaci\u00F3n.
-+        ExternalIDorPublicIDRequired = La declaraci\u00F3n para la notaci\u00F3n "{0}" debe incluir un identificador p\u00FAblico o del sistema.
-+        NotationDeclUnterminated = La declaraci\u00F3n para la notaci\u00F3n "{0}" debe finalizar en ''>''.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = El tipo de elemento \"{1}\" ya se especific\u00F3 en el modelo de contenido de la declaraci\u00F3n de elementos \"{0}\".
--        ENTITIESInvalid = El valor de atributo \"{1}\" del tipo ENTITIES debe ser el nombre de una o m\u00E1s entidades no analizadas.
--        ENTITYInvalid = El valor de atributo \"{1}\" del tipo ENTITY debe ser el nombre de una entidad no analizada.
--        IDDefaultTypeInvalid = El atributo de identificador \"{0}\" debe tener un valor por defecto declarado de \"#IMPLIED\" o \"#REQUIRED\".
--        IDInvalid = El valor de atributo \"{0}\" del tipo ID debe ser un nombre.
--        IDInvalidWithNamespaces = El valor de atributo \"{0}\" del tipo ID debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
--        IDNotUnique = El valor de atributo \"{0}\" del tipo ID debe ser \u00FAnico en el documento.
--        IDREFInvalid = El valor de atributo \"{0}\" del tipo IDREF debe ser un nombre.
--        IDREFInvalidWithNamespaces = El valor de atributo \"{0}\" del tipo IDREF debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
--        IDREFSInvalid = El valor de atributo \"{0}\" del tipo IDREFS debe ser uno o m\u00E1s nombres.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir declaraciones correctamente anidadas cuando la referencia de entidad se utiliza como una declaraci\u00F3n completa.
--        ImproperDeclarationNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir declaraciones correctamente anidadas.
--        ImproperGroupNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir pares de par\u00E9ntesis correctamente anidados.
--        INVALID_PE_IN_CONDITIONAL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir la secci\u00F3n condicional completa o s\u00F3lo INCLUDE o IGNORE.
--        MSG_ATTRIBUTE_NOT_DECLARED = El atributo \"{1}\" se debe haber declarado para el tipo de elemento \"{0}\".
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = El atributo \"{0}\" con el valor \"{1}\" debe tener un valor de la lista \"{2}\".
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = El valor \"{1}\" del atributo \"{0}\" no se debe cambiar mediante la normalizaci\u00F3n (a \"{2}\") en un documento aut\u00F3nomo.
--        MSG_CONTENT_INCOMPLETE = El contenido del tipo de elemento \"{0}\" es incompleto, debe coincidir con \"{1}\".
--        MSG_CONTENT_INVALID = El contenido del tipo de elemento \"{0}\" debe coincidir con \"{1}\".
--        MSG_CONTENT_INVALID_SPECIFIED = El contenido del tipo de elemento \"{0}\" debe coincidir con \"{1}\". Los secundarios del tipo \"{2}\" no est\u00E1n permitidos.
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = El atributo \"{1}\" para el tipo de elemento \"{0}\" tiene un valor por defecto y debe especificarse en un documento aut\u00F3nomo.
--        MSG_DUPLICATE_ATTDEF = El atributo \"{1}\" ya se ha declarado para el tipo de elemento \"{0}\".
--        MSG_ELEMENT_ALREADY_DECLARED = El tipo de elemento \"{0}\" no debe declararse m\u00E1s de una vez.
--        MSG_ELEMENT_NOT_DECLARED = El tipo de elemento \"{0}\" debe declararse.
-+        DuplicateTypeInMixedContent = El tipo de elemento "{1}" ya se especific\u00F3 en el modelo de contenido de la declaraci\u00F3n de elementos "{0}".
-+        ENTITIESInvalid = El valor de atributo "{1}" del tipo ENTITIES debe ser el nombre de una o m\u00E1s entidades no analizadas.
-+        ENTITYInvalid = El valor de atributo "{1}" del tipo ENTITY debe ser el nombre de una entidad no analizada.
-+        IDDefaultTypeInvalid = El atributo de identificador "{0}" debe tener un valor por defecto declarado de "#IMPLIED" o "#REQUIRED".
-+        IDInvalid = El valor de atributo "{0}" del tipo ID debe ser un nombre.
-+        IDInvalidWithNamespaces = El valor de atributo "{0}" del tipo ID debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
-+        IDNotUnique = El valor de atributo "{0}" del tipo ID debe ser \u00FAnico en el documento.
-+        IDREFInvalid = El valor de atributo "{0}" del tipo IDREF debe ser un nombre.
-+        IDREFInvalidWithNamespaces = El valor de atributo "{0}" del tipo IDREF debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
-+        IDREFSInvalid = El valor de atributo "{0}" del tipo IDREFS debe ser uno o m\u00E1s nombres.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir declaraciones correctamente anidadas cuando la referencia de entidad se utiliza como una declaraci\u00F3n completa.
-+        ImproperDeclarationNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir declaraciones correctamente anidadas.
-+        ImproperGroupNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir pares de par\u00E9ntesis correctamente anidados.
-+        INVALID_PE_IN_CONDITIONAL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir la secci\u00F3n condicional completa o s\u00F3lo INCLUDE o IGNORE.
-+        MSG_ATTRIBUTE_NOT_DECLARED = El atributo "{1}" se debe haber declarado para el tipo de elemento "{0}".
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = El atributo "{0}" con el valor "{1}" debe tener un valor de la lista "{2}".
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = El valor "{1}" del atributo "{0}" no se debe cambiar mediante la normalizaci\u00F3n (a "{2}") en un documento aut\u00F3nomo.
-+        MSG_CONTENT_INCOMPLETE = El contenido del tipo de elemento "{0}" es incompleto, debe coincidir con "{1}".
-+        MSG_CONTENT_INVALID = El contenido del tipo de elemento "{0}" debe coincidir con "{1}".
-+        MSG_CONTENT_INVALID_SPECIFIED = El contenido del tipo de elemento "{0}" debe coincidir con "{1}". Los secundarios del tipo "{2}" no est\u00E1n permitidos.
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = El atributo "{1}" para el tipo de elemento "{0}" tiene un valor por defecto y debe especificarse en un documento aut\u00F3nomo.
-+        MSG_DUPLICATE_ATTDEF = El atributo "{1}" ya se ha declarado para el tipo de elemento "{0}".
-+        MSG_ELEMENT_ALREADY_DECLARED = El tipo de elemento "{0}" no debe declararse m\u00E1s de una vez.
-+        MSG_ELEMENT_NOT_DECLARED = El tipo de elemento "{0}" debe declararse.
-         MSG_GRAMMAR_NOT_FOUND = El documento no es v\u00E1lido: no se ha encontrado la gram\u00E1tica.
--        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con el identificador \"{0}\" debe aparecer en el documento.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La referencia a la entidad externa \"{0}\" no est\u00E1 permitida en un documento aut\u00F3nomo.
--        MSG_FIXED_ATTVALUE_INVALID = El atributo \"{1}\" con el valor \"{2}\" debe tener un valor de \"{3}\".
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = El tipo de elemento \"{0}\" ya tiene un atributo \"{1}\" del tipo ID, un segundo atributo \"{2}\" del tipo ID no est\u00E1 permitido.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = El tipo de elemento \"{0}\" ya tiene un atributo \"{1}\" del tipo NOTATION, un segundo atributo \"{2}\" del tipo NOTATION no est\u00E1 permitido.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notaci\u00F3n \"{1}\" debe declararse cuando se hace referencia a la misma en la lista de tipos de notaci\u00F3n para el atributo \"{0}\".
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notaci\u00F3n \"{1}\" debe declararse cuando se hace referencia a la misma en la declaraci\u00F3n de entidad no analizada para \"{0}\".
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La referencia a la entidad \"{0}\" declarada en una entidad analizada externa no est\u00E1 permitida en un documento aut\u00F3nomo.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = El atributo \"{1}\" es necesario y debe especificarse para el tipo de elemento \"{0}\".
-+        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con el identificador "{0}" debe aparecer en el documento.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La referencia a la entidad externa "{0}" no est\u00E1 permitida en un documento aut\u00F3nomo.
-+        MSG_FIXED_ATTVALUE_INVALID = El atributo "{1}" con el valor "{2}" debe tener un valor de "{3}".
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = El tipo de elemento "{0}" ya tiene un atributo "{1}" del tipo ID, un segundo atributo "{2}" del tipo ID no est\u00E1 permitido.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = El tipo de elemento "{0}" ya tiene un atributo "{1}" del tipo NOTATION, un segundo atributo "{2}" del tipo NOTATION no est\u00E1 permitido.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notaci\u00F3n "{1}" debe declararse cuando se hace referencia a la misma en la lista de tipos de notaci\u00F3n para el atributo "{0}".
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notaci\u00F3n "{1}" debe declararse cuando se hace referencia a la misma en la declaraci\u00F3n de entidad no analizada para "{0}".
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La referencia a la entidad "{0}" declarada en una entidad analizada externa no est\u00E1 permitida en un documento aut\u00F3nomo.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = El atributo "{1}" es necesario y debe especificarse para el tipo de elemento "{0}".
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = No debe incluirse un espacio en blanco entre los elementos declarados en una entidad analizada externa con el contenido del elemento en un documento aut\u00F3nomo.
--        NMTOKENInvalid = El valor de atributo \"{0}\" del tipo NMTOKEN debe ser un elemento de nombre.
--        NMTOKENSInvalid = El valor de atributo \"{0}\" del tipo NMTOKENS debe ser uno o m\u00E1s elementos de nombre.
--        NoNotationOnEmptyElement = El tipo de elemento \"{0}\" que se declar\u00F3 como EMPTY no puede declarar el atributo \"{1}\" del tipo NOTATION.
--        RootElementTypeMustMatchDoctypedecl = El elemento ra\u00EDz del documento \"{1}\", debe coincidir con la ra\u00EDz DOCTYPE \"{0}\".
--        UndeclaredElementInContentSpec = El modelo de contenido del elemento \"{0}\" hace referencia al elemento no declarado \"{1}\".
--        UniqueNotationName = La declaraci\u00F3n de la notaci\u00F3n \"{0}\" no es \u00FAnica. Un nombre determinado no debe declararse en m\u00E1s de una declaraci\u00F3n de notaci\u00F3n.
-+        NMTOKENInvalid = El valor de atributo "{0}" del tipo NMTOKEN debe ser un token de nombre.
-+        NMTOKENSInvalid = El valor de atributo "{0}" del tipo NMTOKENS debe ser uno o m\u00E1s tokens de nombre.
-+        NoNotationOnEmptyElement = El tipo de elemento "{0}" que se declar\u00F3 como EMPTY no puede declarar el atributo "{1}" del tipo NOTATION.
-+        RootElementTypeMustMatchDoctypedecl = El elemento ra\u00EDz del documento "{1}", debe coincidir con la ra\u00EDz DOCTYPE "{0}".
-+        UndeclaredElementInContentSpec = El modelo de contenido del elemento "{0}" hace referencia al elemento no declarado "{1}".
-+        UniqueNotationName = La declaraci\u00F3n de la notaci\u00F3n "{0}" no es \u00FAnica. Un nombre determinado no debe declararse en m\u00E1s de una declaraci\u00F3n de notaci\u00F3n.
-         ENTITYFailedInitializeGrammar =  Fallo del validador ENTITYDatatype. Es necesario llamar al m\u00E9todo de inicializaci\u00F3n con una referencia de gram\u00E1tica v\u00E1lida. \t
--        ENTITYNotUnparsed = ENTITY \"{0}\"no est\u00E1 sin analizar.
--        ENTITYNotValid = ENTITY \"{0}\" no es v\u00E1lida.
-+        ENTITYNotUnparsed = ENTITY "{0}"no est\u00E1 sin analizar.
-+        ENTITYNotValid = ENTITY "{0}" no es v\u00E1lida.
-         EmptyList = El valor de tipo ENTITIES, IDREFS y NMTOKENS no puede ser una lista vac\u00EDa.
+-inline relocInfo prefix_relocInfo(int datalen) {
++inline relocInfo prefix_relocInfo(int datalen = 0) {
+   assert(relocInfo::fits_into_immediate(datalen), "datalen in limits");
+   return relocInfo(relocInfo::data_prefix_tag, relocInfo::RAW_BITS, relocInfo::datalen_tag | datalen);
+ }
+--- ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -58,8 +58,22 @@
+   MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
+   virtual void do_oop(oop* p);
+   virtual void do_oop(narrowOop* p);
+-  inline void do_oop_nv(oop* p)       { MarkRefsIntoClosure::do_oop_work(p); }
+-  inline void do_oop_nv(narrowOop* p) { MarkRefsIntoClosure::do_oop_work(p); }
++
++  Prefetch::style prefetch_style() {
++    return Prefetch::do_read;
++  }
++};
++
++class Par_MarkRefsIntoClosure: public OopsInGenClosure {
++ private:
++  const MemRegion _span;
++  CMSBitMap*      _bitMap;
++ protected:
++  DO_OOP_WORK_DEFN
++ public:
++  Par_MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
++  virtual void do_oop(oop* p);
++  virtual void do_oop(narrowOop* p);
+   bool do_header() { return true; }
+   Prefetch::style prefetch_style() {
+     return Prefetch::do_read;
+--- ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -575,6 +575,7 @@
+   _restart_addr(NULL),
+   _overflow_list(NULL),
+   _stats(cmsGen),
++  _eden_chunk_lock(new Mutex(Mutex::leaf + 1, "CMS_eden_chunk_lock", true)),
+   _eden_chunk_array(NULL),     // may be set in ctor body
+   _eden_chunk_capacity(0),     // -- ditto --
+   _eden_chunk_index(0),        // -- ditto --
+@@ -754,7 +755,7 @@
+   assert(_eden_chunk_array != NULL || _eden_chunk_capacity == 0, "Error");
+ 
+   // Support for parallelizing survivor space rescan
+-  if (CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) {
++  if ((CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) || CMSParallelInitialMarkEnabled) {
+     const size_t max_plab_samples =
+       ((DefNewGeneration*)_young_gen)->max_survivor_size()/MinTLABSize;
+ 
+@@ -1997,7 +1998,7 @@
+   GenCollectedHeap* gch = GenCollectedHeap::heap();
+ 
+   STWGCTimer* gc_timer = GenMarkSweep::gc_timer();
+-  gc_timer->register_gc_start(os::elapsed_counter());
++  gc_timer->register_gc_start();
+ 
+   SerialOldTracer* gc_tracer = GenMarkSweep::gc_tracer();
+   gc_tracer->report_gc_start(gch->gc_cause(), gc_timer->gc_start());
+@@ -2094,7 +2095,7 @@
+     size_policy()->msc_collection_end(gch->gc_cause());
+   }
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = La referencia de entidad externa \"&{0};\" no est\u00E1 permitida en un valor de atributo.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = La referencia de entidad externa "&{0};" no est\u00E1 permitida en un valor de atributo.
-+        AccessExternalDTD = DTD externa: fallo al leer DTD externa ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido debido a una restricci\u00F3n que ha definido la propiedad accessExternalDTD.
-+        AccessExternalEntity = Entidad externa: fallo al leer el documento externo ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido debido a una restricci\u00F3n que ha definido la propiedad accessExternalDTD.
+-  gc_timer->register_gc_end(os::elapsed_counter());
++  gc_timer->register_gc_end();
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = Se hizo referencia a la entidad \"{0}\", pero no se declar\u00F3.
--        ReferenceToUnparsedEntity = La referencia de entidad no analizada \"&{0};\" no est\u00E1 permitida.
--        RecursiveReference = Referencia de entidad recursiva \"{0}\". (Ruta de acceso de referencia: {1}),
--        RecursiveGeneralReference = Referencia de entidad general recursiva \"&{0};\". (Ruta de acceso de referencia: {1}),
--        RecursivePEReference = Referencia de entidad de par\u00E1metro recursiva \"%{0};\". (Ruta de acceso de referencia: {1}),
-+        EntityNotDeclared = Se hizo referencia a la entidad "{0}", pero no se declar\u00F3.
-+        ReferenceToUnparsedEntity = La referencia de entidad no analizada "&{0};" no est\u00E1 permitida.
-+        RecursiveReference = Referencia de entidad recursiva "{0}". (Ruta de acceso de referencia: {1}),
-+        RecursiveGeneralReference = Referencia de entidad general recursiva "&{0};". (Ruta de acceso de referencia: {1}),
-+        RecursivePEReference = Referencia de entidad de par\u00E1metro recursiva "%{0};". (Ruta de acceso de referencia: {1}),
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = La codificaci\u00F3n \"{0}\" no est\u00E1 soportada.
-+        EncodingNotSupported = La codificaci\u00F3n "{0}" no est\u00E1 soportada.
-         EncodingRequired = Una entidad analizada no codificada en UTF-8 o UTF-16 debe contener una declaraci\u00F3n de codificaci\u00F3n.
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = El elemento o el atributo no coinciden con la producci\u00F3n del QName: QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = El elemento \"{0}\" no puede tener \"xmlns\" como prefijo.
--        ElementPrefixUnbound = El prefijo \"{0}\" para el elemento \"{1}\" no est\u00E1 enlazado.
--        AttributePrefixUnbound = El prefijo \"{2}\" para el atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no est\u00E1 enlazado.
--        EmptyPrefixedAttName = El valor del atributo \"{0}\" no es v\u00E1lido. Los enlaces de espacio de nombres utilizados de prefijo no pueden estar vac\u00EDos.
--        PrefixDeclared = El prefijo de espacio de nombres \"{0}\" no se ha declarado.
-+        ElementXMLNSPrefix = El elemento "{0}" no puede tener "xmlns" como prefijo.
-+        ElementPrefixUnbound = El prefijo "{0}" para el elemento "{1}" no est\u00E1 enlazado.
-+        AttributePrefixUnbound = El prefijo "{2}" para el atributo "{1}" asociado a un tipo de elemento "{0}" no est\u00E1 enlazado.
-+        EmptyPrefixedAttName = El valor del atributo "{0}" no es v\u00E1lido. Los enlaces de espacio de nombres utilizados de prefijo no pueden estar vac\u00EDos.
-+        PrefixDeclared = El prefijo de espacio de nombres "{0}" no se ha declarado.
-         CantBindXMLNS = El prefijo "xmlns" no puede enlazarse a ning\u00FAn espacio de nombres expl\u00EDcitamente; tampoco puede enlazarse el espacio de nombres para "xmlns" a cualquier prefijo expl\u00EDcitamente.
-         CantBindXML = El prefijo "xml" no puede enlazarse a ning\u00FAn espacio de nombres que no sea el habitual; tampoco puede enlazarse el espacio de nombres para "xml" a cualquier prefijo que no sea "xml".
--        MSG_ATT_DEFAULT_INVALID = El valor por defecto \"{1}\" del atributo \"{0}\" no es legal para las restricciones l\u00E9xicas de este tipo de atributo.
-+        MSG_ATT_DEFAULT_INVALID = El valor por defecto "{1}" del atributo "{0}" no es legal para las restricciones l\u00E9xicas de este tipo de atributo.
+   gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions());
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+@@ -2136,6 +2137,39 @@
+ }
  
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=El analizador ha encontrado m\u00E1s de \"{0}\"ampliaciones de entidad en este documento; \u00E9ste es el l\u00EDmite impuesto por la aplicaci\u00F3n.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: el analizador ha encontrado m\u00E1s de "{0}"ampliaciones de entidad en este documento; \u00E9ste es el l\u00EDmite impuesto por el JDK.
-+        ElementAttributeLimit=JAXP00010002: el elemento "{0}" tiene m\u00E1s de "{1}" atributos, "{1}" es el l\u00EDmite impuesto por el JDK.
-+        MaxEntitySizeLimit=JAXP00010003: la longitud de la entidad "{0}" es "{1}", que excede el l\u00EDmite de "{2}" que ha definido "{3}".
-+        TotalEntitySizeLimit=JAXP00010004: el tama\u00F1o acumulado "{0}" de las entidades ha excedido el l\u00EDmite de "{1}" que ha definido "{2}".
-+        MaxXMLNameLimit=JAXP00010005: el nombre "{0}" ha excedido el l\u00EDmite de "{1}" que ha definido "{2}".
++void CMSCollector::print_eden_and_survivor_chunk_arrays() {
++  DefNewGeneration* dng = _young_gen->as_DefNewGeneration();
++  EdenSpace* eden_space = dng->eden();
++  ContiguousSpace* from_space = dng->from();
++  ContiguousSpace* to_space   = dng->to();
++  // Eden
++  if (_eden_chunk_array != NULL) {
++    gclog_or_tty->print_cr("eden " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")",
++                           eden_space->bottom(), eden_space->top(),
++                           eden_space->end(), eden_space->capacity());
++    gclog_or_tty->print_cr("_eden_chunk_index=" SIZE_FORMAT ", "
++                           "_eden_chunk_capacity=" SIZE_FORMAT,
++                           _eden_chunk_index, _eden_chunk_capacity);
++    for (size_t i = 0; i < _eden_chunk_index; i++) {
++      gclog_or_tty->print_cr("_eden_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT,
++                             i, _eden_chunk_array[i]);
++    }
++  }
++  // Survivor
++  if (_survivor_chunk_array != NULL) {
++    gclog_or_tty->print_cr("survivor " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")",
++                           from_space->bottom(), from_space->top(),
++                           from_space->end(), from_space->capacity());
++    gclog_or_tty->print_cr("_survivor_chunk_index=" SIZE_FORMAT ", "
++                           "_survivor_chunk_capacity=" SIZE_FORMAT,
++                           _survivor_chunk_index, _survivor_chunk_capacity);
++    for (size_t i = 0; i < _survivor_chunk_index; i++) {
++      gclog_or_tty->print_cr("_survivor_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT,
++                             i, _survivor_chunk_array[i]);
++    }
++  }
++}
++
+ void CMSCollector::getFreelistLocks() const {
+   // Get locks for all free lists in all generations that this
+   // collector is responsible for
+@@ -2443,7 +2477,7 @@
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= El elemento \"{0}\" tiene m\u00E1s de \"{1}\" atributos, \"{1}\" es el l\u00EDmite impuesto por la aplicaci\u00F3n.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
--
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+ void CMSCollector::register_gc_start(GCCause::Cause cause) {
+   _cms_start_registered = true;
+-  _gc_timer_cm->register_gc_start(os::elapsed_counter());
++  _gc_timer_cm->register_gc_start();
+   _gc_tracer_cm->report_gc_start(cause, _gc_timer_cm->gc_start());
+ }
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le prologue du document.
-         InvalidCharInXMLDecl = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la d\u00E9claration XML.
- # 2.4 Character Data and Markup
--        CDEndInContent = La s\u00E9quence de caract\u00E8res \"]]>\" ne doit pas figurer dans le contenu sauf si elle est utilis\u00E9e pour baliser la fin d'une section CDATA.
-+        CDEndInContent = La s\u00E9quence de caract\u00E8res "]]>" ne doit pas figurer dans le contenu sauf si elle est utilis\u00E9e pour baliser la fin d'une section CDATA.
- # 2.7 CDATA Sections
--        CDSectUnterminated = La section CDATA doit se terminer par \"]]>\".
-+        CDSectUnterminated = La section CDATA doit se terminer par "]]>".
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = La d\u00E9claration XML ne peut figurer qu'au d\u00E9but du document.
--        EqRequiredInXMLDecl = Le caract\u00E8re ''='' doit suivre \"{0}\" dans la d\u00E9claration XML.
--        QuoteRequiredInXMLDecl = La valeur suivant \"{0}\" dans la d\u00E9claration XML doit \u00EAtre une cha\u00EEne entre guillemets.
--        XMLDeclUnterminated = La d\u00E9claration XML doit se terminer par \"?>\".
-+        EqRequiredInXMLDecl = Le caract\u00E8re ''='' doit suivre "{0}" dans la d\u00E9claration XML.
-+        QuoteRequiredInXMLDecl = La valeur suivant "{0}" dans la d\u00E9claration XML doit \u00EAtre une cha\u00EEne entre guillemets.
-+        XMLDeclUnterminated = La d\u00E9claration XML doit se terminer par "?>".
-         VersionInfoRequired = La version est obligatoire dans la d\u00E9claration XML.
-         SpaceRequiredBeforeVersionInXMLDecl = Un espace est obligatoire devant le pseudo-attribut version dans la d\u00E9claration XML.
-         SpaceRequiredBeforeEncodingInXMLDecl = Un espace est obligatoire devant le pseudo-attribut encoding dans la d\u00E9claration XML.
-@@ -71,70 +68,71 @@
-         ReferenceIllegalInTrailingMisc=R\u00E9f\u00E9rence non autoris\u00E9e dans la section de fin.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = La valeur de d\u00E9claration de document autonome doit \u00EAtre \"oui\" ou \"non\", mais pas \"{0}\".
-+        SDDeclInvalid = La valeur de d\u00E9claration de document autonome doit \u00EAtre "oui" ou "non", mais pas "{0}".
-+        SDDeclNameInvalid = Le nom de document autonome contenu dans la d\u00E9claration XML est peut-\u00EAtre mal orthographi\u00E9.
- # 2.12 Language Identification
--        XMLLangInvalid = La valeur d''attribut xml:lang \"{0}\" est un identificateur de langue non valide.
-+        XMLLangInvalid = La valeur d''attribut xml:lang "{0}" est un identificateur de langue non valide.
- # 3. Logical Structures
--        ETagRequired = Le type d''\u00E9l\u00E9ment \"{0}\" doit se terminer par la balise de fin correspondante \"\".
-+        ETagRequired = Le type d''\u00E9l\u00E9ment "{0}" doit se terminer par la balise de fin correspondante "".
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = Le type d''\u00E9l\u00E9ment \"{0}\" doit \u00EAtre suivi des sp\u00E9cifications d''attribut, \">\" ou \"/>\".
--        EqRequiredInAttribute = Le nom d''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" doit \u00EAtre suivi du caract\u00E8re ''=''.
--        OpenQuoteExpected = Des guillemets ouvrants sont attendus pour l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\".
--        CloseQuoteExpected = Des guillemets fermants sont attendus pour l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\".
--        AttributeNotUnique = L''attribut \"{1}\" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment \"{0}\".
--        AttributeNSNotUnique = L''attribut \"{1}\" li\u00E9 \u00E0 l''espace de noms \"{2}\" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment \"{0}\".
--        ETagUnterminated = La balise de fin pour le type d''\u00E9l\u00E9ment \"{0}\" doit se terminer par un d\u00E9limiteur ''>''.
-+        ElementUnterminated = Le type d''\u00E9l\u00E9ment "{0}" doit \u00EAtre suivi des sp\u00E9cifications d''attribut, ">" ou "/>".
-+        EqRequiredInAttribute = Le nom d''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}" doit \u00EAtre suivi du caract\u00E8re ''=''.
-+        OpenQuoteExpected = Des guillemets ouvrants sont attendus pour l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}".
-+        CloseQuoteExpected = Des guillemets fermants sont attendus pour l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}".
-+        AttributeNotUnique = L''attribut "{1}" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment "{0}".
-+        AttributeNSNotUnique = L''attribut "{1}" li\u00E9 \u00E0 l''espace de noms "{2}" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment "{0}".
-+        ETagUnterminated = La balise de fin pour le type d''\u00E9l\u00E9ment "{0}" doit se terminer par un d\u00E9limiteur ''>''.
-         MarkupNotRecognizedInContent = Le contenu des \u00E9l\u00E9ments doit inclure un balisage ou des caract\u00E8res au format correct.
-         DoctypeIllegalInContent = Un DOCTYPE n'est pas autoris\u00E9 dans le contenu.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = La r\u00E9f\u00E9rence doit se terminer par un d\u00E9limiteur ';'.
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = La r\u00E9f\u00E9rence doit \u00EAtre enti\u00E8rement incluse dans la m\u00EAme entit\u00E9 analys\u00E9e.
--        ElementEntityMismatch = L''\u00E9l\u00E9ment \"{0}\" doit commencer et se terminer dans la m\u00EAme entit\u00E9.
-+        ElementEntityMismatch = L''\u00E9l\u00E9ment "{0}" doit commencer et se terminer dans la m\u00EAme entit\u00E9.
-         MarkupEntityMismatch=Les structures de document XML doivent commencer et se terminer dans la m\u00EAme entit\u00E9.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = Un caract\u00E8re XML non valide (Unicode : 0x{2}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la valeur de l''attribut \"{1}\" et l''\u00E9l\u00E9ment est \"{0}\".
-+        InvalidCharInAttValue = Un caract\u00E8re XML non valide (Unicode : 0x{2}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la valeur de l''attribut "{1}" et l''\u00E9l\u00E9ment est "{0}".
-         InvalidCharInComment = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le commentaire.
-         InvalidCharInPI = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans l''instruction de traitement.
-         InvalidCharInInternalSubset = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le sous-ensemble interne de la DTD.
-         InvalidCharInTextDecl = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la d\u00E9claration textuelle.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = La valeur de l''attribut \"{1}\" doit commencer par une apostrophe ou des guillemets.
--        LessthanInAttValue = La valeur de l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" ne doit pas contenir le caract\u00E8re ''<''.
--        AttributeValueUnterminated = La valeur de l''attribut \"{1}\" doit se terminer par les guillemets correspondants.
-+        QuoteRequiredInAttValue = La valeur de l''attribut "{1}" doit commencer par une apostrophe ou des guillemets.
-+        LessthanInAttValue = La valeur de l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}" ne doit pas contenir le caract\u00E8re ''<''.
-+        AttributeValueUnterminated = La valeur de l''attribut "{1}" doit se terminer par les guillemets correspondants.
- # 2.5 Comments
--        InvalidCommentStart = Le commentaire doit commencer par \"\".
-+        InvalidCommentStart = Le commentaire doit commencer par "".
-         COMMENT_NOT_IN_ONE_ENTITY = Le commentaire n'est pas compris dans la m\u00EAme entit\u00E9.
- # 2.6 Processing Instructions
-         PITargetRequired = L'instruction de traitement doit commencer par le nom de la cible.
-         SpaceRequiredInPI = Un espace est obligatoire entre les donn\u00E9es et la cible de l'instruction de traitement.
--        PIUnterminated = L'instruction de traitement doit se terminer par \"?>\".
--        ReservedPITarget = La cible de l'instruction de traitement correspondant \u00E0 \"[xX][mM][lL]\" n'est pas autoris\u00E9e.
-+        PIUnterminated = L'instruction de traitement doit se terminer par "?>".
-+        ReservedPITarget = La cible de l'instruction de traitement correspondant \u00E0 "[xX][mM][lL]" n'est pas autoris\u00E9e.
-         PI_NOT_IN_ONE_ENTITY = L'instruction de traitement n'est pas comprise dans la m\u00EAme entit\u00E9.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = Version \"{0}\" non valide.
--        VersionNotSupported = La version XML \"{0}\" n''est pas prise en charge. Seule la version XML 1.0 est prise en charge.
--        VersionNotSupported11 = La version XML \"{0}\" n''est pas prise en charge. Seules les versions XML 1.0 et XML 1.1 sont prises en charge.
-+        VersionInfoInvalid = Version "{0}" non valide.
-+        VersionNotSupported = La version XML "{0}" n''est pas prise en charge. Seule la version XML 1.0 est prise en charge.
-+        VersionNotSupported11 = La version XML "{0}" n''est pas prise en charge. Seules les versions XML 1.0 et XML 1.1 sont prises en charge.
-         VersionMismatch= Une entit\u00E9 ne peut pas inclure une autre entit\u00E9 d'une version ult\u00E9rieure.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = Une repr\u00E9sentation d\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne \"&#\" dans une r\u00E9f\u00E9rence de caract\u00E8re.
--        HexdigitRequiredInCharRef = Une repr\u00E9sentation hexad\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne \"&#x\" dans une r\u00E9f\u00E9rence de caract\u00E8re.
-+        DigitRequiredInCharRef = Une repr\u00E9sentation d\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne "&#" dans une r\u00E9f\u00E9rence de caract\u00E8re.
-+        HexdigitRequiredInCharRef = Une repr\u00E9sentation hexad\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne "&#x" dans une r\u00E9f\u00E9rence de caract\u00E8re.
-         SemicolonRequiredInCharRef = La r\u00E9f\u00E9rence de caract\u00E8re doit se terminer par le d\u00E9limiteur ';'.
--        InvalidCharRef = La r\u00E9f\u00E9rence de caract\u00E8re \"&#{0}\" est un caract\u00E8re XML non valide.
-+        InvalidCharRef = La r\u00E9f\u00E9rence de caract\u00E8re "&#{0}" est un caract\u00E8re XML non valide.
-         NameRequiredInReference = Le nom de l'identit\u00E9 doit imm\u00E9diatement suivre le caract\u00E8re "&" dans la r\u00E9f\u00E9rence d'entit\u00E9.
--        SemicolonRequiredInReference = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 \"{0}\" doit se terminer par le d\u00E9limiteur '';''.
-+        SemicolonRequiredInReference = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 "{0}" doit se terminer par le d\u00E9limiteur '';''.
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = La d\u00E9claration textuelle ne doit figurer qu'au d\u00E9but de l'entit\u00E9 analys\u00E9e externe.
--        EqRequiredInTextDecl = Le caract\u00E8re ''='' doit suivre \"{0}\" dans la d\u00E9claration textuelle.
--        QuoteRequiredInTextDecl = La valeur suivant \"{0}\" dans la d\u00E9claration textuelle doit \u00EAtre une cha\u00EEne entre guillemets.
--        CloseQuoteMissingInTextDecl = Dans la valeur suivant \"{0}\" dans la d\u00E9claration textuelle, il manque les guillemets fermants.
-+        EqRequiredInTextDecl = Le caract\u00E8re ''='' doit suivre "{0}" dans la d\u00E9claration textuelle.
-+        QuoteRequiredInTextDecl = La valeur suivant "{0}" dans la d\u00E9claration textuelle doit \u00EAtre une cha\u00EEne entre guillemets.
-+        CloseQuoteMissingInTextDecl = Dans la valeur suivant "{0}" dans la d\u00E9claration textuelle, il manque les guillemets fermants.
-         SpaceRequiredBeforeVersionInTextDecl = Un espace est obligatoire devant le pseudo-attribut version dans la d\u00E9claration textuelle.
-         SpaceRequiredBeforeEncodingInTextDecl = Un espace est obligatoire devant le pseudo-attribut encoding dans la d\u00E9claration textuelle.
--        TextDeclUnterminated = La d\u00E9claration textuelle doit se terminer par \"?>\".
-+        TextDeclUnterminated = La d\u00E9claration textuelle doit se terminer par "?>".
-         EncodingDeclRequired = La d\u00E9claration d'encodage est obligatoire dans la d\u00E9claration textuelle.
-         NoMorePseudoAttributes = Aucun autre pseudo-attribut n'est autoris\u00E9.
-         MorePseudoAttributes = D'autres pseudo-attributs sont attendus.
-@@ -143,13 +141,13 @@
-         CommentNotInOneEntity = Le commentaire doit \u00EAtre enti\u00E8rement inclus dans la m\u00EAme entit\u00E9 analys\u00E9e.
-         PINotInOneEntity = L'instruction de traitement doit \u00EAtre enti\u00E8rement incluse dans la m\u00EAme entit\u00E9 analys\u00E9e.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = Nom d''encodage \"{0}\" non valide.
--        EncodingByteOrderUnsupported = L''ordre des octets donn\u00E9 pour encoder \"{0}\" n''est pas pris en charge.
-+        EncodingDeclInvalid = Nom d''encodage "{0}" non valide.
-+        EncodingByteOrderUnsupported = L''ordre des octets donn\u00E9 pour encoder "{0}" n''est pas pris en charge.
-         InvalidByte = Octet {0} de la s\u00E9quence UTF-8 \u00E0 {1} octets non valide.
-         ExpectedByte = Octet {0} de la s\u00E9quence UTF-8 \u00E0 {1} octets attendu.  
-         InvalidHighSurrogate = Les bits de substitution sup\u00E9rieurs (High surrogate) dans la s\u00E9quence UTF-8 ne doivent pas d\u00E9passer 0x10 mais des bits 0x{0} ont \u00E9t\u00E9 d\u00E9tect\u00E9s.
--        OperationNotSupported = Op\u00E9ration \"{0}\" non prise en charge par le lecteur {1}.
--        InvalidASCII = L''octet \"{0}\" n''appartient pas au jeu de caract\u00E8res ASCII (7 bits).
-+        OperationNotSupported = Op\u00E9ration "{0}" non prise en charge par le lecteur {1}.
-+        InvalidASCII = L''octet "{0}" n''appartient pas au jeu de caract\u00E8res ASCII (7 bits).
-         CharConversionFailure = Une entit\u00E9 respectant un certain encodage ne doit pas contenir de s\u00E9quences non admises dans cet encodage.
-         
- # DTD Messages
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = Ce caract\u00E8re (Unicode : 0x{0}) n''est pas autoris\u00E9 dans l''identificateur public.
-         SpaceRequiredBetweenPublicAndSystem = Des espaces sont obligatoires entre les ID publicId et systemId.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Un espace est obligatoire apr\u00E8s \"''.
--        PEReferenceWithinMarkup = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre \"%{0};\" ne peut pas survenir dans le balisage du sous-ensemble interne de la DTD.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Un espace est obligatoire apr\u00E8s "''.
-+        PEReferenceWithinMarkup = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre "%{0};" ne peut pas survenir dans le balisage du sous-ensemble interne de la DTD.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Les d\u00E9clarations de balisage contenues dans la d\u00E9claration de type de document ou sur lesquelles pointe cette derni\u00E8re doivent avoir un format correct.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = La d\u00E9claration d'attribut pour \"xml:space\" doit \u00EAtre pr\u00E9sent\u00E9e comme type \u00E9num\u00E9r\u00E9 dont les seules valeurs possibles sont \"default\" et \"preserve\".
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = La d\u00E9claration d'attribut pour "xml:space" doit \u00EAtre pr\u00E9sent\u00E9e comme type \u00E9num\u00E9r\u00E9 dont les seules valeurs possibles sont "default" et "preserve".
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Un espace est obligatoire apr\u00E8s \"''.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Un espace est obligatoire apr\u00E8s le type d''\u00E9l\u00E9ment "{0}" dans la d\u00E9claration de type d''\u00E9l\u00E9ment.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = La contrainte est obligatoire apr\u00E8s le type d''\u00E9l\u00E9ment "{0}" dans la d\u00E9claration de type d''\u00E9l\u00E9ment.
-+        ElementDeclUnterminated = La d\u00E9claration du type d''\u00E9l\u00E9ment "{0}" doit se terminer par ''>''.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un caract\u00E8re ''('' ou un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un caract\u00E8re ''('' ou un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
--        MixedContentUnterminated = Le mod\u00E8le de contenu mixte \"{0}\" doit se terminer par \")*\" lorsque les types d''\u00E9l\u00E9ment enfant sont contraints.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
-+        MixedContentUnterminated = Le mod\u00E8le de contenu mixte "{0}" doit se terminer par ")*" lorsque les types d''\u00E9l\u00E9ment enfant sont contraints.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Un espace est obligatoire apr\u00E8s \"\".
--        IgnoreSectUnterminated = La section conditionnelle exclue doit se terminer par \"]]>\".
-+        IncludeSectUnterminated = La section conditionnelle incluse doit se terminer par "]]>".
-+        IgnoreSectUnterminated = La section conditionnelle exclue doit se terminer par "]]>".
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = Le nom de l'entit\u00E9 doit imm\u00E9diatement suivre le caract\u00E8re "%" dans la r\u00E9f\u00E9rence d'entit\u00E9 de param\u00E8tre.
--        SemicolonRequiredInPEReference = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre \"%{0};\" doit se terminer par le d\u00E9limiteur '';''.
-+        SemicolonRequiredInPEReference = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre "%{0};" doit se terminer par le d\u00E9limiteur '';''.
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Un espace est obligatoire apr\u00E8s \"''.
--	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E9 \"{0}\" est d\u00E9clar\u00E9e plusieurs fois.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Un espace est obligatoire entre le nom de l''entit\u00E9 "{0}" et la d\u00E9finition dans la d\u00E9claration d''entit\u00E9.
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Un espace est obligatoire entre "NDATA" et le nom de notation dans la d\u00E9claration de l''entit\u00E9 "{0}".
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Un espace est obligatoire avant "NDATA" dans la d\u00E9claration de l''entit\u00E9 "{0}".
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Le nom de notation est obligatoire apr\u00E8s "NDATA" dans la d\u00E9claration de l''entit\u00E9 "{0}".
-+        EntityDeclUnterminated = La d\u00E9claration de l''entit\u00E9 "{0}" doit se terminer par ''>''.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E9 "{0}" est d\u00E9clar\u00E9e plusieurs fois.        
- # 4.2.2 External Entities
--        ExternalIDRequired = La d\u00E9claration d'entit\u00E9 externe doit commencer par \"SYSTEM\" ou \"PUBLIC\".
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre \"PUBLIC\" et l'identificateur public.
-+        ExternalIDRequired = La d\u00E9claration d'entit\u00E9 externe doit commencer par "SYSTEM" ou "PUBLIC".
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre "PUBLIC" et l'identificateur public.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre l'identificateur public et l'identificateur syst\u00E8me.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Un espace est obligatoire entre \"SYSTEM\" et l'identificateur syst\u00E8me.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificateur du fragment ne doit pas \u00EAtre sp\u00E9cifi\u00E9 comme faisant partie de l''identificateur syst\u00E8me \"{0}\".
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Un espace est obligatoire entre "SYSTEM" et l'identificateur syst\u00E8me.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificateur du fragment ne doit pas \u00EAtre sp\u00E9cifi\u00E9 comme faisant partie de l''identificateur syst\u00E8me "{0}".
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Un espace est obligatoire apr\u00E8s \"''.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Un espace est obligatoire apr\u00E8s le nom de notation "{0}" dans la d\u00E9claration de notation.
-+        ExternalIDorPublicIDRequired = La d\u00E9claration de la notation "{0}" doit inclure un identificateur syst\u00E8me ou public.
-+        NotationDeclUnterminated = La d\u00E9claration de la notation "{0}" doit se terminer par ''>''.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = Le type d''\u00E9l\u00E9ment \"{1}\" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 dans le mod\u00E8le de contenu de la d\u00E9claration d''\u00E9l\u00E9ment \"{0}\".
--        ENTITIESInvalid = La valeur d''attribut \"{1}\" de type ENTITIES doit correspondre au nom d''au moins une entit\u00E9 non analys\u00E9e.
--        ENTITYInvalid = La valeur d''attribut \"{1}\" de type ENTITY doit correspondre au nom d''une entit\u00E9 non analys\u00E9e.
--        IDDefaultTypeInvalid = L''attribut d''ID \"{0}\" doit avoir une valeur par d\u00E9faut d\u00E9clar\u00E9e de \"#IMPLIED\" ou \"#REQUIRED\".
--        IDInvalid = La valeur d''attribut \"{0}\" de type ID doit \u00EAtre un nom.
--        IDInvalidWithNamespaces = La valeur d''attribut \"{0}\" de type ID doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
--        IDNotUnique = La valeur d''attribut \"{0}\" de type ID doit \u00EAtre unique dans le document.
--        IDREFInvalid = La valeur d''attribut \"{0}\" de type IDREF doit \u00EAtre un nom.
--        IDREFInvalidWithNamespaces = La valeur d''attribut \"{0}\" de type IDREF doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
--        IDREFSInvalid = Une valeur d''attribut \"{0}\" de type IDREFS doit correspondre \u00E0 au moins un nom.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es lorsque la r\u00E9f\u00E9rence d''entit\u00E9 est utilis\u00E9e comme d\u00E9claration compl\u00E8te.
--        ImproperDeclarationNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es.
--        ImproperGroupNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure des paires de parenth\u00E8ses correctement imbriqu\u00E9es.
--        INVALID_PE_IN_CONDITIONAL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure la section conditionnelle compl\u00E8te ou seulement INCLUDE ou IGNORE.
--        MSG_ATTRIBUTE_NOT_DECLARED = L''attribut \"{1}\" doit \u00EAtre d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment \"{0}\".
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attribut \"{0}\" de valeur \"{1}\" doit avoir une valeur issue de la liste \"{2}\".
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = La valeur \"{1}\" de l''attribut \"{0}\" ne doit pas \u00EAtre modifi\u00E9e par normalisation (et devenir \"{2}\") dans un document autonome.
--        MSG_CONTENT_INCOMPLETE = Le contenu du type d''\u00E9l\u00E9ment \"{0}\" est incomplet. Il doit correspondre \u00E0 \"{1}\".
--        MSG_CONTENT_INVALID = Le contenu du type d''\u00E9l\u00E9ment \"{0}\" doit correspondre \u00E0 \"{1}\".
--        MSG_CONTENT_INVALID_SPECIFIED = Le contenu du type d''\u00E9l\u00E9ment \"{0}\" doit correspondre \u00E0 \"{1}\". Les enfants de type \"{2}\" ne sont pas autoris\u00E9s.
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attribut \"{1}\" du type d''\u00E9l\u00E9ment \"{0}\" a une valeur par d\u00E9faut et doit \u00EAtre sp\u00E9cifi\u00E9 dans un document autonome.
--        MSG_DUPLICATE_ATTDEF = L''attribut \"{1}\" est d\u00E9j\u00E0 d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment \"{0}\".
--        MSG_ELEMENT_ALREADY_DECLARED = Le type d''\u00E9l\u00E9ment \"{0}\" ne doit pas \u00EAtre d\u00E9clar\u00E9 plusieurs fois.
--        MSG_ELEMENT_NOT_DECLARED = Le type d''\u00E9l\u00E9ment \"{0}\" doit \u00EAtre d\u00E9clar\u00E9.
-+        DuplicateTypeInMixedContent = Le type d''\u00E9l\u00E9ment "{1}" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 dans le mod\u00E8le de contenu de la d\u00E9claration d''\u00E9l\u00E9ment "{0}".
-+        ENTITIESInvalid = La valeur d''attribut "{1}" de type ENTITIES doit correspondre au nom d''au moins une entit\u00E9 non analys\u00E9e.
-+        ENTITYInvalid = La valeur d''attribut "{1}" de type ENTITY doit correspondre au nom d''une entit\u00E9 non analys\u00E9e.
-+        IDDefaultTypeInvalid = L''attribut d''ID "{0}" doit avoir une valeur par d\u00E9faut d\u00E9clar\u00E9e de "#IMPLIED" ou "#REQUIRED".
-+        IDInvalid = La valeur d''attribut "{0}" de type ID doit \u00EAtre un nom.
-+        IDInvalidWithNamespaces = La valeur d''attribut "{0}" de type ID doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
-+        IDNotUnique = La valeur d''attribut "{0}" de type ID doit \u00EAtre unique dans le document.
-+        IDREFInvalid = La valeur d''attribut "{0}" de type IDREF doit \u00EAtre un nom.
-+        IDREFInvalidWithNamespaces = La valeur d''attribut "{0}" de type IDREF doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
-+        IDREFSInvalid = Une valeur d''attribut "{0}" de type IDREFS doit correspondre \u00E0 au moins un nom.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es lorsque la r\u00E9f\u00E9rence d''entit\u00E9 est utilis\u00E9e comme d\u00E9claration compl\u00E8te.
-+        ImproperDeclarationNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es.
-+        ImproperGroupNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure des paires de parenth\u00E8ses correctement imbriqu\u00E9es.
-+        INVALID_PE_IN_CONDITIONAL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure la section conditionnelle compl\u00E8te ou seulement INCLUDE ou IGNORE.
-+        MSG_ATTRIBUTE_NOT_DECLARED = L''attribut "{1}" doit \u00EAtre d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment "{0}".
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attribut "{0}" de valeur "{1}" doit avoir une valeur issue de la liste "{2}".
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = La valeur "{1}" de l''attribut "{0}" ne doit pas \u00EAtre modifi\u00E9e par normalisation (et devenir "{2}") dans un document autonome.
-+        MSG_CONTENT_INCOMPLETE = Le contenu du type d''\u00E9l\u00E9ment "{0}" est incomplet. Il doit correspondre \u00E0 "{1}".
-+        MSG_CONTENT_INVALID = Le contenu du type d''\u00E9l\u00E9ment "{0}" doit correspondre \u00E0 "{1}".
-+        MSG_CONTENT_INVALID_SPECIFIED = Le contenu du type d''\u00E9l\u00E9ment "{0}" doit correspondre \u00E0 "{1}". Les enfants de type "{2}" ne sont pas autoris\u00E9s.
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attribut "{1}" du type d''\u00E9l\u00E9ment "{0}" a une valeur par d\u00E9faut et doit \u00EAtre sp\u00E9cifi\u00E9 dans un document autonome.
-+        MSG_DUPLICATE_ATTDEF = L''attribut "{1}" est d\u00E9j\u00E0 d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment "{0}".
-+        MSG_ELEMENT_ALREADY_DECLARED = Le type d''\u00E9l\u00E9ment "{0}" ne doit pas \u00EAtre d\u00E9clar\u00E9 plusieurs fois.
-+        MSG_ELEMENT_NOT_DECLARED = Le type d''\u00E9l\u00E9ment "{0}" doit \u00EAtre d\u00E9clar\u00E9.
-         MSG_GRAMMAR_NOT_FOUND = Le document n'est pas valide : aucune grammaire d\u00E9tect\u00E9e.
--        MSG_ELEMENT_WITH_ID_REQUIRED = Un \u00E9l\u00E9ment avec l''identificateur \"{0}\" doit figurer dans le document.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 externe \"{0}\" n''est pas autoris\u00E9e dans le document autonome.
--        MSG_FIXED_ATTVALUE_INVALID = L''attribut \"{1}\" de valeur \"{2}\" doit avoir une valeur de \"{3}\".
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Le type d''\u00E9l\u00E9ment \"{0}\" a d\u00E9j\u00E0 l''attribut \"{1}\" de type ID. Un deuxi\u00E8me attribut \"{2}\" de type ID n''est pas autoris\u00E9.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Le type d''\u00E9l\u00E9ment \"{0}\" a d\u00E9j\u00E0 l''attribut \"{1}\" de type NOTATION. Un deuxi\u00E8me attribut \"{2}\" de type NOTATION n''est pas autoris\u00E9.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notation \"{1}\" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la liste des types de notation de l''attribut \"{0}\".
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notation \"{1}\" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la d\u00E9claration d''entit\u00E9 non analys\u00E9e pour \"{0}\".
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 \"{0}\" d\u00E9clar\u00E9e dans une entit\u00E9 analys\u00E9e externe n''est pas autoris\u00E9e dans un document autonome.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attribut \"{1}\" est obligatoire et doit \u00EAtre sp\u00E9cifi\u00E9 pour le type d''\u00E9l\u00E9ment \"{0}\".
-+        MSG_ELEMENT_WITH_ID_REQUIRED = Un \u00E9l\u00E9ment avec l''identificateur "{0}" doit figurer dans le document.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 externe "{0}" n''est pas autoris\u00E9e dans le document autonome.
-+        MSG_FIXED_ATTVALUE_INVALID = L''attribut "{1}" de valeur "{2}" doit avoir une valeur de "{3}".
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Le type d''\u00E9l\u00E9ment "{0}" a d\u00E9j\u00E0 l''attribut "{1}" de type ID. Un deuxi\u00E8me attribut "{2}" de type ID n''est pas autoris\u00E9.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Le type d''\u00E9l\u00E9ment "{0}" a d\u00E9j\u00E0 l''attribut "{1}" de type NOTATION. Un deuxi\u00E8me attribut "{2}" de type NOTATION n''est pas autoris\u00E9.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notation "{1}" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la liste des types de notation de l''attribut "{0}".
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notation "{1}" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la d\u00E9claration d''entit\u00E9 non analys\u00E9e pour "{0}".
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 "{0}" d\u00E9clar\u00E9e dans une entit\u00E9 analys\u00E9e externe n''est pas autoris\u00E9e dans un document autonome.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attribut "{1}" est obligatoire et doit \u00EAtre sp\u00E9cifi\u00E9 pour le type d''\u00E9l\u00E9ment "{0}".
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Aucun espace ne doit figurer entre les \u00E9l\u00E9ments d\u00E9clar\u00E9s dans une entit\u00E9 analys\u00E9e externe avec le contenu des \u00E9l\u00E9ments dans un document autonome.
--        NMTOKENInvalid = La valeur d''attribut \"{0}\" de type NMTOKEN doit correspondre \u00E0 un jeton de nom.
--        NMTOKENSInvalid = La valeur d''attribut \"{0}\" de type NMTOKENS doit correspondre \u00E0 au moins un jeton de nom.
--        NoNotationOnEmptyElement = Le type d''\u00E9l\u00E9ment \"{0}\" d\u00E9clar\u00E9 EMPTY ne peut pas d\u00E9clarer un attribut \"{1}\" de type NOTATION.
--        RootElementTypeMustMatchDoctypedecl = L''\u00E9l\u00E9ment racine de document \"{1}\" doit correspondre \u00E0 la racine DOCTYPE \"{0}\".
--        UndeclaredElementInContentSpec = Le mod\u00E8le de contenu de l''\u00E9l\u00E9ment \"{0}\" fait r\u00E9f\u00E9rence \u00E0 l''\u00E9l\u00E9ment non d\u00E9clar\u00E9 \"{1}\".
--        UniqueNotationName = La d\u00E9claration de la notation \"{0}\" n''est pas unique. Une valeur Name donn\u00E9e ne doit pas \u00EAtre d\u00E9clar\u00E9e dans plusieurs d\u00E9clarations de notation.
--        ENTITYFailedInitializeGrammar =  Contr\u00F4le de validation ENTITYDatatype : \u00E9chec. Besoin d'appeler une m\u00E9thode d'initialisation avec une r\u00E9f\u00E9rence de grammaire valide. \t
--        ENTITYNotUnparsed = La valeur ENTITY \"{0}\" est analys\u00E9e.
--        ENTITYNotValid = La valeur ENTITY \"{0}\" n''est pas valide.
-+        NMTOKENInvalid = La valeur d''attribut "{0}" de type NMTOKEN doit correspondre \u00E0 un jeton de nom.
-+        NMTOKENSInvalid = La valeur d''attribut "{0}" de type NMTOKENS doit correspondre \u00E0 au moins un jeton de nom.
-+        NoNotationOnEmptyElement = Le type d''\u00E9l\u00E9ment "{0}" d\u00E9clar\u00E9 EMPTY ne peut pas d\u00E9clarer un attribut "{1}" de type NOTATION.
-+        RootElementTypeMustMatchDoctypedecl = L''\u00E9l\u00E9ment racine de document "{1}" doit correspondre \u00E0 la racine DOCTYPE "{0}".
-+        UndeclaredElementInContentSpec = Le mod\u00E8le de contenu de l''\u00E9l\u00E9ment "{0}" fait r\u00E9f\u00E9rence \u00E0 l''\u00E9l\u00E9ment non d\u00E9clar\u00E9 "{1}".
-+        UniqueNotationName = La d\u00E9claration de la notation "{0}" n''est pas unique. Une valeur Name donn\u00E9e ne doit pas \u00EAtre d\u00E9clar\u00E9e dans plusieurs d\u00E9clarations de notation.
-+        ENTITYFailedInitializeGrammar =  Valideur ENTITYDatatype : \u00E9chec. Besoin d'appeler une m\u00E9thode d'initialisation avec une r\u00E9f\u00E9rence de grammaire valide. \t
-+        ENTITYNotUnparsed = La valeur ENTITY "{0}" est analys\u00E9e.
-+        ENTITYNotValid = La valeur ENTITY "{0}" n''est pas valide.
-         EmptyList = Une valeur de type ENTITIES, IDREFS et NMTOKENS ne peut pas correspondre \u00E0 une liste vide.
+@@ -2451,7 +2485,7 @@
+   if (_cms_start_registered) {
+     report_heap_summary(GCWhen::AfterGC);
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = La r\u00E9f\u00E9rence d''entit\u00E9 externe \"&{0};\" n''est pas autoris\u00E9e dans une valeur d''attribut.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = La r\u00E9f\u00E9rence d''entit\u00E9 externe "&{0};" n''est pas autoris\u00E9e dans une valeur d''attribut.
-+        AccessExternalDTD = DTD externe : \u00E9chec de la lecture de la DTD externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalDTD.
-+        AccessExternalEntity = Entit\u00E9 externe : \u00E9chec de la lecture du document externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalDTD.
+-    _gc_timer_cm->register_gc_end(os::elapsed_counter());
++    _gc_timer_cm->register_gc_end();
+     _gc_tracer_cm->report_gc_end(_gc_timer_cm->gc_end(), _gc_timer_cm->time_partitions());
+     _cms_start_registered = false;
+   }
+@@ -2510,8 +2544,7 @@
+         // initial marking in checkpointRootsInitialWork has been completed
+         if (VerifyDuringGC &&
+             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
+-          gclog_or_tty->print("Verify before initial mark: ");
+-          Universe::verify();
++          Universe::verify("Verify before initial mark: ");
+         }
+         {
+           bool res = markFromRoots(false);
+@@ -2522,8 +2555,7 @@
+       case FinalMarking:
+         if (VerifyDuringGC &&
+             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
+-          gclog_or_tty->print("Verify before re-mark: ");
+-          Universe::verify();
++          Universe::verify("Verify before re-mark: ");
+         }
+         checkpointRootsFinal(false, clear_all_soft_refs,
+                              init_mark_was_synchronous);
+@@ -2534,8 +2566,7 @@
+         // final marking in checkpointRootsFinal has been completed
+         if (VerifyDuringGC &&
+             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
+-          gclog_or_tty->print("Verify before sweep: ");
+-          Universe::verify();
++          Universe::verify("Verify before sweep: ");
+         }
+         sweep(false);
+         assert(_collectorState == Resizing, "Incorrect state");
+@@ -2550,8 +2581,7 @@
+         // The heap has been resized.
+         if (VerifyDuringGC &&
+             GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
+-          gclog_or_tty->print("Verify before reset: ");
+-          Universe::verify();
++          Universe::verify("Verify before reset: ");
+         }
+         save_heap_summary();
+         reset(false);
+@@ -2890,8 +2920,8 @@
+   bool failed() { return _failed; }
+ };
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = L''entit\u00E9 \"{0}\" \u00E9tait r\u00E9f\u00E9renc\u00E9e, mais pas d\u00E9clar\u00E9e.
--        ReferenceToUnparsedEntity = La r\u00E9f\u00E9rence d''entit\u00E9 non analys\u00E9e \"&{0};\" n''est pas autoris\u00E9e.
--        RecursiveReference = R\u00E9f\u00E9rence d''entit\u00E9 r\u00E9cursive \"{0}\". (Chemin de r\u00E9f\u00E9rence : {1}),
--        RecursiveGeneralReference = R\u00E9f\u00E9rence d''entit\u00E9 g\u00E9n\u00E9rale r\u00E9cursive \"&{0};\". (Chemin de r\u00E9f\u00E9rence : {1}),
--        RecursivePEReference = R\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre r\u00E9cursive \"%{0};\". (Chemin de r\u00E9f\u00E9rence : {1}),
-+        EntityNotDeclared = L''entit\u00E9 "{0}" \u00E9tait r\u00E9f\u00E9renc\u00E9e, mais pas d\u00E9clar\u00E9e.
-+        ReferenceToUnparsedEntity = La r\u00E9f\u00E9rence d''entit\u00E9 non analys\u00E9e "&{0};" n''est pas autoris\u00E9e.
-+        RecursiveReference = R\u00E9f\u00E9rence d''entit\u00E9 r\u00E9cursive "{0}". (Chemin de r\u00E9f\u00E9rence : {1}),
-+        RecursiveGeneralReference = R\u00E9f\u00E9rence d''entit\u00E9 g\u00E9n\u00E9rale r\u00E9cursive "&{0};". (Chemin de r\u00E9f\u00E9rence : {1}),
-+        RecursivePEReference = R\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre r\u00E9cursive "%{0};". (Chemin de r\u00E9f\u00E9rence : {1}),
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = L''encodage \"{0}\" n''est pas pris en charge.
-+        EncodingNotSupported = L''encodage "{0}" n''est pas pris en charge.
-         EncodingRequired = Une entit\u00E9 analys\u00E9e sans encodage UTF-8 ou UTF-16 doit contenir une d\u00E9claration d'encodage.
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = L'\u00E9l\u00E9ment ou l'attribut ne correspond pas \u00E0 la production QName : QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = L''\u00E9l\u00E9ment \"{0}\" ne peut pas avoir \"xmlns\" comme pr\u00E9fixe.
--        ElementPrefixUnbound = Le pr\u00E9fixe \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" n''est pas li\u00E9.
--        AttributePrefixUnbound = Le pr\u00E9fixe \"{2}\" de l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" n''est pas li\u00E9.
--        EmptyPrefixedAttName = La valeur de l''attribut \"{0}\" n''est pas valide. Les liaisons d''espaces de noms pr\u00E9fix\u00E9s ne peuvent pas \u00EAtre vides.
--        PrefixDeclared = Le pr\u00E9fixe d''espace de noms \"{0}\" n''\u00E9tait pas d\u00E9clar\u00E9.
-+        ElementXMLNSPrefix = L''\u00E9l\u00E9ment "{0}" ne peut pas avoir "xmlns" comme pr\u00E9fixe.
-+        ElementPrefixUnbound = Le pr\u00E9fixe "{0}" de l''\u00E9l\u00E9ment "{1}" n''est pas li\u00E9.
-+        AttributePrefixUnbound = Le pr\u00E9fixe "{2}" de l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}" n''est pas li\u00E9.
-+        EmptyPrefixedAttName = La valeur de l''attribut "{0}" n''est pas valide. Les liaisons d''espaces de noms pr\u00E9fix\u00E9s ne peuvent pas \u00EAtre vides.
-+        PrefixDeclared = Le pr\u00E9fixe d''espace de noms "{0}" n''\u00E9tait pas d\u00E9clar\u00E9.
-         CantBindXMLNS = Le pr\u00E9fixe "xmlns" ne peut pas \u00EAtre li\u00E9 \u00E0 un espace de noms de fa\u00E7on explicite, pas plus que l'espace de noms de "xmlns" \u00E0 un pr\u00E9fixe quelconque.
-         CantBindXML = Le pr\u00E9fixe "xml" ne peut pas \u00EAtre li\u00E9 \u00E0 un autre espace de noms que son espace de noms habituel. L'espace de noms de "xml" ne peut pas non plus \u00EAtre li\u00E9 \u00E0 un autre pr\u00E9fixe que "xml".
--        MSG_ATT_DEFAULT_INVALID = La valeur par d\u00E9faut \"{1}\" de l''attribut \"{0}\" n''est pas admise conform\u00E9ment aux contraintes lexicales de ce type d''attribut.
-+        MSG_ATT_DEFAULT_INVALID = La valeur par d\u00E9faut "{1}" de l''attribut "{0}" n''est pas admise conform\u00E9ment aux contraintes lexicales de ce type d''attribut.
+-bool CMSCollector::verify_after_remark() {
+-  gclog_or_tty->print(" [Verifying CMS Marking... ");
++bool CMSCollector::verify_after_remark(bool silent) {
++  if (!silent) gclog_or_tty->print(" [Verifying CMS Marking... ");
+   MutexLockerEx ml(verification_mark_bm()->lock(), Mutex::_no_safepoint_check_flag);
+   static bool init = false;
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+@@ -2952,7 +2982,7 @@
+     warning("Unrecognized value %d for CMSRemarkVerifyVariant",
+             CMSRemarkVerifyVariant);
+   }
+-  gclog_or_tty->print(" done] ");
++  if (!silent) gclog_or_tty->print(" done] ");
+   return true;
+ }
  
+@@ -3530,6 +3560,31 @@
+ 
+ // CMS work
+ 
++// The common parts of CMSParInitialMarkTask and CMSParRemarkTask.
++class CMSParMarkTask : public AbstractGangTask {
++ protected:
++  CMSCollector*     _collector;
++  int               _n_workers;
++  CMSParMarkTask(const char* name, CMSCollector* collector, int n_workers) :
++      AbstractGangTask(name),
++      _collector(collector),
++      _n_workers(n_workers) {}
++  // Work method in support of parallel rescan ... of young gen spaces
++  void do_young_space_rescan(uint worker_id, OopsInGenClosure* cl,
++                             ContiguousSpace* space,
++                             HeapWord** chunk_array, size_t chunk_top);
++  void work_on_young_gen_roots(uint worker_id, OopsInGenClosure* cl);
++};
++
++// Parallel initial mark task
++class CMSParInitialMarkTask: public CMSParMarkTask {
++ public:
++  CMSParInitialMarkTask(CMSCollector* collector, int n_workers) :
++      CMSParMarkTask("Scan roots and young gen for initial mark in parallel",
++                     collector, n_workers) {}
++  void work(uint worker_id);
++};
++
+ // Checkpoint the roots into this generation from outside
+ // this generation. [Note this initial checkpoint need only
+ // be approximate -- we'll do a catch up phase subsequently.]
+@@ -3619,20 +3674,42 @@
+   // weak reference processing has not started yet.
+   ref_processor()->set_enqueuing_is_done(false);
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=L''analyseur a rencontr\u00E9 plus de \"{0}\" d\u00E9veloppements d''entit\u00E9 dans ce document. Il s''agit de la limite impos\u00E9e par l''application.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001 : L''analyseur a rencontr\u00E9 plus de "{0}" d\u00E9veloppements d''entit\u00E9 dans ce document. Il s''agit de la limite impos\u00E9e par le JDK.
-+        ElementAttributeLimit=JAXP00010002 : L''\u00E9l\u00E9ment "{0}" a plus de "{1}" attributs. "{1}" est la limite impos\u00E9e par le JDK.
-+        MaxEntitySizeLimit=JAXP00010003 : La longueur de l''entit\u00E9 "{0}" est de "{1}". Cette valeur d\u00E9passe la limite de "{2}" d\u00E9finie par "{3}".
-+        TotalEntitySizeLimit=JAXP00010004 : La taille cumul\u00E9e des entit\u00E9s ("{0}") d\u00E9passe la limite de "{1}" d\u00E9finie par "{2}".
-+        MaxXMLNameLimit=JAXP00010005 : le nom "{0}" d\u00E9passe la limite de "{1}" d\u00E9finie par "{2}".
++  if (CMSPrintEdenSurvivorChunks) {
++    print_eden_and_survivor_chunk_arrays();
++  }
++
+   {
+     // This is not needed. DEBUG_ONLY(RememberKlassesChecker imx(true);)
+     COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;)
+-    gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
+-    gch->gen_process_strong_roots(_cmsGen->level(),
+-                                  true,   // younger gens are roots
+-                                  true,   // activate StrongRootsScope
+-                                  true,   // collecting perm gen
+-                                  SharedHeap::ScanningOption(roots_scanning_options()),
+-                                  ¬Older,
+-                                  true,   // walk all of code cache if (so & SO_CodeCache)
+-                                  NULL);
++    if (CMSParallelInitialMarkEnabled && CollectedHeap::use_parallel_gc_threads()) {
++      // The parallel version.
++      FlexibleWorkGang* workers = gch->workers();
++      assert(workers != NULL, "Need parallel worker threads.");
++      int n_workers = workers->active_workers();
++      CMSParInitialMarkTask tsk(this, n_workers);
++      gch->set_par_threads(n_workers);
++      initialize_sequential_subtasks_for_young_gen_rescan(n_workers);
++      if (n_workers > 1) {
++        GenCollectedHeap::StrongRootsScope srs(gch);
++        workers->run_task(&tsk);
++      } else {
++        GenCollectedHeap::StrongRootsScope srs(gch);
++        tsk.work(0);
++      }
++      gch->set_par_threads(0);
++    } else {
++      // The serial version.
++      gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
++      gch->gen_process_strong_roots(_cmsGen->level(),
++                                    true,   // younger gens are roots
++                                    true,   // activate StrongRootsScope
++                                    true,   // collecting perm gen
++                                    SharedHeap::ScanningOption(roots_scanning_options()),
++                                    ¬Older,
++                                    true,   // walk all of code cache if (so & SO_CodeCache)
++                                    NULL);
++    }
+   }
+-
+   // Clear mod-union table; it will be dirtied in the prologue of
+   // CMS generation per each younger generation collection.
+ 
+@@ -4414,7 +4491,9 @@
+   verify_overflow_empty();
+   _abort_preclean = false;
+   if (CMSPrecleaningEnabled) {
+-    _eden_chunk_index = 0;
++    if (!CMSEdenChunksRecordAlways) {
++      _eden_chunk_index = 0;
++    }
+     size_t used = get_eden_used();
+     size_t capacity = get_eden_capacity();
+     // Don't start sampling unless we will get sufficiently
+@@ -4523,7 +4602,9 @@
+   if (!_start_sampling) {
+     return;
+   }
+-  if (_eden_chunk_array) {
++  // When CMSEdenChunksRecordAlways is true, the eden chunk array
++  // is populated by the young generation.
++  if (_eden_chunk_array != NULL && !CMSEdenChunksRecordAlways) {
+     if (_eden_chunk_index < _eden_chunk_capacity) {
+       _eden_chunk_array[_eden_chunk_index] = *_top_addr;   // take sample
+       assert(_eden_chunk_array[_eden_chunk_index] <= *_end_addr,
+@@ -5000,6 +5081,10 @@
+     // Update the saved marks which may affect the root scans.
+     gch->save_marks();
+ 
++    if (CMSPrintEdenSurvivorChunks) {
++      print_eden_and_survivor_chunk_arrays();
++    }
++
+     {
+       COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;)
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= L''\u00E9l\u00E9ment \"{0}\" a plus de \"{1}\" attributs. \"{1}\" est la limite impos\u00E9e par l''application.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
+@@ -5107,10 +5192,51 @@
+   }
+ }
+ 
++void CMSParInitialMarkTask::work(uint worker_id) {
++  elapsedTimer _timer;
++  ResourceMark rm;
++  HandleMark   hm;
++
++  // ---------- scan from roots --------------
++  _timer.start();
++  GenCollectedHeap* gch = GenCollectedHeap::heap();
++  Par_MarkRefsIntoClosure par_mri_cl(_collector->_span, &(_collector->_markBitMap));
++
++  // ---------- young gen roots --------------
++  {
++    work_on_young_gen_roots(worker_id, &par_mri_cl);
++    _timer.stop();
++    if (PrintCMSStatistics != 0) {
++      gclog_or_tty->print_cr(
++        "Finished young gen initial mark scan work in %dth thread: %3.3f sec",
++        worker_id, _timer.seconds());
++    }
++  }
++
++  // ---------- remaining roots --------------
++  _timer.reset();
++  _timer.start();
++  gch->gen_process_strong_roots(_collector->_cmsGen->level(),
++                                false,     // yg was scanned above
++                                false,     // this is parallel code
++                                true,      // collecting perm gen
++                                SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
++                                &par_mri_cl,
++                                true,   // walk all of code cache if (so & SO_CodeCache)
++                                NULL);
++  assert(_collector->should_unload_classes()
++         || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache),
++         "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
++  _timer.stop();
++  if (PrintCMSStatistics != 0) {
++    gclog_or_tty->print_cr(
++      "Finished remaining root initial mark scan work in %dth thread: %3.3f sec",
++      worker_id, _timer.seconds());
++  }
++}
++
+ // Parallel remark task
+-class CMSParRemarkTask: public AbstractGangTask {
+-  CMSCollector* _collector;
+-  int           _n_workers;
++class CMSParRemarkTask: public CMSParMarkTask {
+   CompactibleFreeListSpace* _cms_space;
+   CompactibleFreeListSpace* _perm_space;
+ 
+@@ -5126,10 +5252,9 @@
+                    CompactibleFreeListSpace* perm_space,
+                    int n_workers, FlexibleWorkGang* workers,
+                    OopTaskQueueSet* task_queues):
+-    AbstractGangTask("Rescan roots and grey objects in parallel"),
+-    _collector(collector),
++    CMSParMarkTask("Rescan roots and grey objects in parallel",
++                   collector, n_workers),
+     _cms_space(cms_space), _perm_space(perm_space),
+-    _n_workers(n_workers),
+     _task_queues(task_queues),
+     _term(n_workers, task_queues) { }
+ 
+@@ -5143,11 +5268,6 @@
+   void work(uint worker_id);
+ 
+  private:
+-  // Work method in support of parallel rescan ... of young gen spaces
+-  void do_young_space_rescan(int i, Par_MarkRefsIntoAndScanClosure* cl,
+-                             ContiguousSpace* space,
+-                             HeapWord** chunk_array, size_t chunk_top);
 -
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+   // ... of  dirty cards in old space
+   void do_dirty_card_rescan_tasks(CompactibleFreeListSpace* sp, int i,
+                                   Par_MarkRefsIntoAndScanClosure* cl);
+@@ -5156,6 +5276,25 @@
+   void do_work_steal(int i, Par_MarkRefsIntoAndScanClosure* cl, int* seed);
+ };
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel prologo del documento.
-         InvalidCharInXMLDecl = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nella dichiarazione XML.
- # 2.4 Character Data and Markup
--        CDEndInContent = La sequenza di caratteri \"]]>\" non deve essere presente nel contenuto a meno che non sia utilizzata per contrassegnare la fine di una sezione CDATA.
-+        CDEndInContent = La sequenza di caratteri "]]>" non deve essere presente nel contenuto a meno che non sia utilizzata per contrassegnare la fine di una sezione CDATA.
- # 2.7 CDATA Sections
--        CDSectUnterminated = La sezione CDATA deve terminare con \"]]>\".
-+        CDSectUnterminated = La sezione CDATA deve terminare con "]]>".
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = La dichiarazione XML pu\u00F2 comparire solo all'inizio del documento.
--        EqRequiredInXMLDecl = Il carattere '' = '' deve seguire \"{0}\" nella dichiarazione XML.
--        QuoteRequiredInXMLDecl = Il valore che segue \"{0}\" nella dichiarazione XML deve essere una stringa compresa tra apici.
--        XMLDeclUnterminated = La dichiarazione XML deve terminare con \"?>\".
-+        EqRequiredInXMLDecl = Il carattere '' = '' deve seguire "{0}" nella dichiarazione XML.
-+        QuoteRequiredInXMLDecl = Il valore che segue "{0}" nella dichiarazione XML deve essere una stringa compresa tra apici.
-+        XMLDeclUnterminated = La dichiarazione XML deve terminare con "?>".
-         VersionInfoRequired = La versione \u00E8 obbligatoria nella dichiarazione XML.
-         SpaceRequiredBeforeVersionInXMLDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo della versione nella dichiarazione XML.
-         SpaceRequiredBeforeEncodingInXMLDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione XML.
-@@ -71,70 +68,71 @@
-         ReferenceIllegalInTrailingMisc=Il riferimento non \u00E8 consentito nella sezione finale.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = Il valore della dichiarazione del documento standalone deve essere \"yes\" o \"no\", non \"{0}\".
-+        SDDeclInvalid = Il valore della dichiarazione del documento standalone deve essere "yes" o "no", non "{0}".
-+        SDDeclNameInvalid = Il nome standalone nella dichiarazione XML potrebbe essere stato digitato in modo errato.
- # 2.12 Language Identification
--        XMLLangInvalid = Il valore dell''attributo xml:lang \"{0}\" \u00E8 un identificativo di lingua non valido.
-+        XMLLangInvalid = Il valore dell''attributo xml:lang "{0}" \u00E8 un identificativo di lingua non valido.
- # 3. Logical Structures
--        ETagRequired = Il tipo di elemento \"{0}\" deve terminare con la corrispondente tag finale \"\".
-+        ETagRequired = Il tipo di elemento "{0}" deve terminare con la corrispondente tag finale "".
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = Il tipo di elemento \"{0}\" deve essere seguito dalle specifiche di attributo \">\" o \"/>\".
--        EqRequiredInAttribute = Il nome attributo \"{1}\" associato a un tipo di elemento \"{0}\" deve essere seguito dal carattere '' = ''.
--        OpenQuoteExpected = \u00C8 previsto un apice di apertura per l''attributo \"{1}\" associato a un tipo di elemento \"{0}\".
--        CloseQuoteExpected = \u00C8 previsto un apice di chiusura per l''attributo \"{1}\" associato a un tipo di elemento \"{0}\".
--        AttributeNotUnique = L''attributo \"{1}\" \u00E8 gi\u00E0 stato specificato per l''elemento \"{0}\".
--        AttributeNSNotUnique = L''attributo \"{1}\" associato allo spazio di nomi \"{2}\" \u00E8 gi\u00E0 stato specificato per l''elemento \"{0}\".
--        ETagUnterminated = La tag finale per il tipo di elemento \"{0}\" deve terminare con un delimitatore ''>''.
-+        ElementUnterminated = Il tipo di elemento "{0}" deve essere seguito dalle specifiche di attributo ">" o "/>".
-+        EqRequiredInAttribute = Il nome attributo "{1}" associato a un tipo di elemento "{0}" deve essere seguito dal carattere '' = ''.
-+        OpenQuoteExpected = \u00C8 previsto un apice di apertura per l''attributo "{1}" associato a un tipo di elemento "{0}".
-+        CloseQuoteExpected = \u00C8 previsto un apice di chiusura per l''attributo "{1}" associato a un tipo di elemento "{0}".
-+        AttributeNotUnique = L''attributo "{1}" \u00E8 gi\u00E0 stato specificato per l''elemento "{0}".
-+        AttributeNSNotUnique = L''attributo "{1}" associato allo spazio di nomi "{2}" \u00E8 gi\u00E0 stato specificato per l''elemento "{0}".
-+        ETagUnterminated = La tag finale per il tipo di elemento "{0}" deve terminare con un delimitatore ''>''.
-         MarkupNotRecognizedInContent = Il contenuto degli elementi deve essere composto da dati o markup di caratteri con formato corretto.
-         DoctypeIllegalInContent = DOCTYPE non \u00E8 consentito nel contenuto.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = Il riferimento deve terminare con un delimitatore ';'.
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = Il riferimento deve essere compreso completamente all'interno della stessa entit\u00E0 analizzata.
--        ElementEntityMismatch = L''elemento \"{0}\" deve iniziare e finire con la stessa entit\u00E0.
-+        ElementEntityMismatch = L''elemento "{0}" deve iniziare e finire con la stessa entit\u00E0.
-         MarkupEntityMismatch=Le strutture di documenti XML devono iniziare e finire con la stessa entit\u00E0.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{2}) nel valore dell''attributo \"{1}\". L''elemento \u00E8 \"{0}\".
-+        InvalidCharInAttValue = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{2}) nel valore dell''attributo "{1}". L''elemento \u00E8 "{0}".
-         InvalidCharInComment = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel commento.
-         InvalidCharInPI = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nell''istruzione di elaborazione.
-         InvalidCharInInternalSubset = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel set secondario interno del DTD.
-         InvalidCharInTextDecl = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nella dichiarazione testuale.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = Il valore dell''attributo \"{1}\" deve iniziare con un apice o una virgoletta.
--        LessthanInAttValue = Il valore dell''attributo \"{1}\" associato a un tipo di elemento \"{0}\" non deve essere contenere il carattere ''<''.
--        AttributeValueUnterminated = Il valore dell''attributo \"{1}\" deve terminare con un apice corrispondente.
-+        QuoteRequiredInAttValue = Il valore dell''attributo "{1}" deve iniziare con un apice o una virgoletta.
-+        LessthanInAttValue = Il valore dell''attributo "{1}" associato a un tipo di elemento "{0}" non deve essere contenere il carattere ''<''.
-+        AttributeValueUnterminated = Il valore dell''attributo "{1}" deve terminare con un apice corrispondente.
- # 2.5 Comments
--        InvalidCommentStart = Il commento deve iniziare con \"\".
-+        InvalidCommentStart = Il commento deve iniziare con "".
-         COMMENT_NOT_IN_ONE_ENTITY = Il commento non \u00E8 compreso all'interno della stessa entit\u00E0.
- # 2.6 Processing Instructions
-         PITargetRequired = L'istruzione di elaborazione deve iniziare con il nome della destinazione.
-         SpaceRequiredInPI = \u00C8 richiesto uno spazio tra la destinazione delle istruzioni di elaborazione e i dati.
--        PIUnterminated = L'istruzione di elaborazione deve terminare con \"?>\".
--        ReservedPITarget = Non \u00E8 consentita una destinazione di istruzione di elaborazione corrispondente a \"[xX][mM][lL]\".
-+        PIUnterminated = L'istruzione di elaborazione deve terminare con "?>".
-+        ReservedPITarget = Non \u00E8 consentita una destinazione di istruzione di elaborazione corrispondente a "[xX][mM][lL]".
-         PI_NOT_IN_ONE_ENTITY = L'istruzione di elaborazione non \u00E8 compresa all'interno della stessa entit\u00E0.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = Versione \"{0}\" non valida.
--        VersionNotSupported = La versione XML \"{0}\" non \u00E8 supportata. Solo la versione XML 1.0 \u00E8 supportata.
--        VersionNotSupported11 = La versione XML \"{0}\" non \u00E8 supportata. Solo le versioni XML 1.0 e XML 1.1 sono supportate.
-+        VersionInfoInvalid = Versione "{0}" non valida.
-+        VersionNotSupported = La versione XML "{0}" non \u00E8 supportata. Solo la versione XML 1.0 \u00E8 supportata.
-+        VersionNotSupported11 = La versione XML "{0}" non \u00E8 supportata. Solo le versioni XML 1.0 e XML 1.1 sono supportate.
-         VersionMismatch= Un'entit\u00E0 non pu\u00F2 includerne un'altra con una versione successiva.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = Una rappresentazione decimale deve seguire immediatamente \"&#\" in un riferimento di carattere.
--        HexdigitRequiredInCharRef = Una rappresentazione esadecimale deve seguire immediatamente \"&#\" in un riferimento di carattere.
-+        DigitRequiredInCharRef = Una rappresentazione decimale deve seguire immediatamente "&#" in un riferimento di carattere.
-+        HexdigitRequiredInCharRef = Una rappresentazione esadecimale deve seguire immediatamente "&#" in un riferimento di carattere.
-         SemicolonRequiredInCharRef = Il riferimento di carattere deve terminare con il delimitatore ';'.
--        InvalidCharRef = Il riferimento di carattere \"&#{0}\" \u00E8 un carattere XML non valido.
-+        InvalidCharRef = Il riferimento di carattere "&#{0}" \u00E8 un carattere XML non valido.
-         NameRequiredInReference = Il nome entit\u00E0 deve seguire immediatamente '&' nel riferimento di entit\u00E0.
--        SemicolonRequiredInReference = Il riferimento di entit\u00E0 \"{0}\" deve terminare con il delimitatore '';''.
-+        SemicolonRequiredInReference = Il riferimento di entit\u00E0 "{0}" deve terminare con il delimitatore '';''.
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = La dichiarazione di testo pu\u00F2 comparire solo all'inizio dell'entit\u00E0 esterna analizzata.
--        EqRequiredInTextDecl = Il carattere '' = '' deve seguire \"{0}\" nella dichiarazione di testo.
--        QuoteRequiredInTextDecl = Il valore che segue \"{0}\" nella dichiarazione di testo deve essere una stringa compresa tra apici.
--        CloseQuoteMissingInTextDecl = manca l''apice di chiusura nel valore che segue \"{0}\" nella dichiarazione di testo.
-+        EqRequiredInTextDecl = Il carattere '' = '' deve seguire "{0}" nella dichiarazione di testo.
-+        QuoteRequiredInTextDecl = Il valore che segue "{0}" nella dichiarazione di testo deve essere una stringa compresa tra apici.
-+        CloseQuoteMissingInTextDecl = manca l''apice di chiusura nel valore che segue "{0}" nella dichiarazione di testo.
-         SpaceRequiredBeforeVersionInTextDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo della versione nella dichiarazione del testo.
-         SpaceRequiredBeforeEncodingInTextDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione del testo.
--        TextDeclUnterminated = La dichiarazione di testo deve terminare con \"?>\".
-+        TextDeclUnterminated = La dichiarazione di testo deve terminare con "?>".
-         EncodingDeclRequired = La dichiarazione di codifica \u00E8 obbligatoria nella dichiarazione di testo.
-         NoMorePseudoAttributes = Non sono consentiti altri attributi pseudo.
-         MorePseudoAttributes = Sono previsti altri attributi pseudo.
-@@ -143,13 +141,13 @@
-         CommentNotInOneEntity = Il commento deve essere compreso completamente all'interno della stessa entit\u00E0 analizzata.
-         PINotInOneEntity = L'istruzione di elaborazione deve essere compresa completamente all'interno della stessa entit\u00E0 analizzata.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = Nome codifica \"{0}\" non valido.
--        EncodingByteOrderUnsupported = L''ordine di byte specificato per la codifica \"{0}\" non \u00E8 supportato.
-+        EncodingDeclInvalid = Nome codifica "{0}" non valido.
-+        EncodingByteOrderUnsupported = L''ordine di byte specificato per la codifica "{0}" non \u00E8 supportato.
-         InvalidByte = Byte non valido {0} della sequenza UTF-8 a {1} byte.
-         ExpectedByte = \u00C8 previsto il byte {0} della sequenza UTF-8 a {1} byte.  
-         InvalidHighSurrogate = I bit per surrogato alto nella sequenza UTF-8 non devono superare 0x10, ma \u00E8 stato trovato 0x{0}.
--        OperationNotSupported = Operazione \"{0}\" non supportata dal processo di lettura {1}.
--        InvalidASCII = Il byte \"{0}\" non fa parte del set di caratteri ASCII (a 7 bit).
-+        OperationNotSupported = Operazione "{0}" non supportata dal processo di lettura {1}.
-+        InvalidASCII = Il byte "{0}" non fa parte del set di caratteri ASCII (a 7 bit).
-         CharConversionFailure = Un'entit\u00E0 che deve trovarsi in una determinata codifica non pu\u00F2 contenere sequenze non valide in quella codifica.
-         
- # DTD Messages
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = Il carattere (Unicode: 0x{0}) non \u00E8 consentito nell''identificativo pubblico.
-         SpaceRequiredBetweenPublicAndSystem = Sono richiesti spazi tra publicId e systemId.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u00C8 richiesto uno spazio dopo \"''.
--        PEReferenceWithinMarkup = Il riferimento di entit\u00E0 di parametro \"%{0};\" non pu\u00F2 essere presente nel markup del set secondario interno del DTD.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u00C8 richiesto uno spazio dopo "''.
-+        PEReferenceWithinMarkup = Il riferimento di entit\u00E0 di parametro "%{0};" non pu\u00F2 essere presente nel markup del set secondario interno del DTD.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Le dichiarazioni di markup contenute o indicate dalla dichiarazione del tipo di documento devono avere un formato corretto.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = La dichiarazione di attributo \"xml:space\" deve essere specificata come tipo enumerato, i cui unici possibili valori sono \"default\" e \"preserve\".
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = La dichiarazione di attributo "xml:space" deve essere specificata come tipo enumerato, i cui unici possibili valori sono "default" e "preserve".
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u00C8 richiesto uno spazio dopo \"''.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u00C8 richiesto uno spazio dopo il tipo di elemento "{0}" nella dichiarazione del tipo di elemento.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u00C8 richiesto uno vincolo dopo il tipo di elemento "{0}" nella dichiarazione del tipo di elemento.
-+        ElementDeclUnterminated = La dichiarazione per il tipo di elemento "{0}" deve terminare con ''>''.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un carattere ''('' o un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un carattere ''('' o un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
--        MixedContentUnterminated = Il modello di contenuto misto \"{0}\" deve terminare con \")*\" se i tipi di elementi figlio hanno vincoli.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
-+        MixedContentUnterminated = Il modello di contenuto misto "{0}" deve terminare con ")*" se i tipi di elementi figlio hanno vincoli.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u00C8 richiesto uno spazio dopo \"\".
--        IgnoreSectUnterminated = La sezione condizionale esclusa deve terminare con \"]]>\".
-+        IncludeSectUnterminated = La sezione condizionale inclusa deve terminare con "]]>".
-+        IgnoreSectUnterminated = La sezione condizionale esclusa deve terminare con "]]>".
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = Il nome entit\u00E0 deve seguire immediatamente '%' nel riferimento di entit\u00E0 di parametro.
--        SemicolonRequiredInPEReference = Il riferimento di entit\u00E0 di parametro \"%{0};\" deve terminare con il delimitatore '';''.
-+        SemicolonRequiredInPEReference = Il riferimento di entit\u00E0 di parametro "%{0};" deve terminare con il delimitatore '';''.
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u00C8 richiesto uno spazio dopo \"''.
--	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E0 \"{0}\" \u00E8 stata dichiarata pi\u00F9 volte.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \u00C8 richiesto uno spazio tra il nome entit\u00E0 "{0}" e la definizione nella dichiarazione dell''entit\u00E0:
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u00C8 richiesto uno spazio tra "NDATA" e il nome notazione nella dichiarazione dell''entit\u00E0 "{0}".
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = \u00C8 richiesto uno spazio prima di "NDATA" nella dichiarazione dell''entit\u00E0 "{0}".
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Il nome notazione \u00E8 obbligatorio dopo "NDATA" nella dichiarazione dell''entit\u00E0 "{0}".
-+        EntityDeclUnterminated = La dichiarazione per l''entit\u00E0 "{0}" deve terminare con ''>''.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E0 "{0}" \u00E8 stata dichiarata pi\u00F9 volte.        
- # 4.2.2 External Entities
--        ExternalIDRequired = La dichiarazione di entit\u00E0 esterna deve iniziare con \"SYSTEM\" o \"PUBLIC\".
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra \"PUBLIC\" e l'identificativo pubblico.
-+        ExternalIDRequired = La dichiarazione di entit\u00E0 esterna deve iniziare con "SYSTEM" o "PUBLIC".
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra "PUBLIC" e l'identificativo pubblico.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra l'identificativo pubblico e quello di sistema.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra \"SYSTEM\" e l'identificativo di sistema.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificativo di frammento non deve essere specificato nell''identificativo di sistema \"{0}\".
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra "SYSTEM" e l'identificativo di sistema.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificativo di frammento non deve essere specificato nell''identificativo di sistema "{0}".
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u00C8 richiesto uno spazio dopo \"''.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u00C8 richiesto uno spazio dopo il nome notazione "{0}" nella dichiarazione della notazione.
-+        ExternalIDorPublicIDRequired = La dichiarazione per la notazione "{0}" deve includere un identificativo di sistema o pubblico.
-+        NotationDeclUnterminated = La dichiarazione per la notazione "{0}" deve terminare con ''>''.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = Il tipo di elemento \"{1}\" \u00E8 gi\u00E0 stato specificato nel modello di contenuto della dichiarazione di elemento \"{0}\".
--        ENTITIESInvalid = Il valore di attributo \"{1}\" di tipo ENTITIES deve corrispondere ai nomi di una o pi\u00F9 entit\u00E0 non analizzate.
--        ENTITYInvalid = Il valore di attributo \"{1}\" di tipo ENTITY deve corrispondere al nome di un''entit\u00E0 non analizzata.
--        IDDefaultTypeInvalid = Nell''attributo ID \"{0}\" deve essere dichiarato un valore predefinito \"#IMPLIED\" o \"#REQUIRED\".
--        IDInvalid = Il valore di attributo \"{0}\" di tipo ID deve essere un nome.
--        IDInvalidWithNamespaces = Il valore di attributo \"{0}\" di tipo ID deve essere un NCName se sono abilitati gli spazi di nomi.
--        IDNotUnique = Il valore di attributo \"{0}\" di tipo ID deve essere univoco all''interno del documento.
--        IDREFInvalid = Il valore di attributo \"{0}\" di tipo IDREF deve essere un nome.
--        IDREFInvalidWithNamespaces = Il valore di attributo \"{0}\" di tipo IDREF deve essere un NCName se sono abilitati gli spazi di nomi.
--        IDREFSInvalid = Il valore di attributo \"{0}\" di tipo IDREFS deve corrispondere a uno o pi\u00F9 nomi.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere dichiarazioni nidificate correttamente se il riferimento dell''entit\u00E0 \u00E8 utilizzato come dichiarazione completa.
--        ImproperDeclarationNesting = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere dichiarazioni nidificate correttamente.
--        ImproperGroupNesting = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere coppie di parentesi nidificate correttamente.
--        INVALID_PE_IN_CONDITIONAL = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere tutta la sezione condizionale oppure solo INCLUDE o IGNORE.
--        MSG_ATTRIBUTE_NOT_DECLARED = Dichiarare l''attributo \"{1}\" per il tipo di elemento \"{0}\".
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attributo \"{0}\" con valore \"{1}\" deve avere un valore della lista \"{2}\".
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Il valore \"{1}\" dell''attributo \"{0}\" non deve essere modificato dalla normalizzazione (in \"{2}\") in un documento standalone.
--        MSG_CONTENT_INCOMPLETE = Il contenuto del tipo di elemento \"{0}\" \u00E8 incompleto. Deve corrispondere a \"{1}\".
--        MSG_CONTENT_INVALID = Il contenuto del tipo di elemento \"{0}\" deve corrispondere a \"{1}\".
--        MSG_CONTENT_INVALID_SPECIFIED = Il contenuto del tipo di elemento \"{0}\" deve corrispondere a \"{1}\". Non sono consentiti elementi figlio di tipo \"{2}\".
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attributo \"{1}\" per il tipo di elemento \"{0}\" ha un valore predefinito e deve essere specificato in un documento standalone.
--        MSG_DUPLICATE_ATTDEF = L''attributo \"{1}\" \u00E8 gi\u00E0 stato dichiarato per il tipo di elemento \"{0}\".
--        MSG_ELEMENT_ALREADY_DECLARED = Il tipo di elemento \"{0}\" non deve essere dichiarato pi\u00F9 volte.
--        MSG_ELEMENT_NOT_DECLARED = Il tipo di elemento \"{0}\" deve essere dichiarato.
-+        DuplicateTypeInMixedContent = Il tipo di elemento "{1}" \u00E8 gi\u00E0 stato specificato nel modello di contenuto della dichiarazione di elemento "{0}".
-+        ENTITIESInvalid = Il valore di attributo "{1}" di tipo ENTITIES deve corrispondere ai nomi di una o pi\u00F9 entit\u00E0 non analizzate.
-+        ENTITYInvalid = Il valore di attributo "{1}" di tipo ENTITY deve corrispondere al nome di un''entit\u00E0 non analizzata.
-+        IDDefaultTypeInvalid = Nell''attributo ID "{0}" deve essere dichiarato un valore predefinito "#IMPLIED" o "#REQUIRED".
-+        IDInvalid = Il valore di attributo "{0}" di tipo ID deve essere un nome.
-+        IDInvalidWithNamespaces = Il valore di attributo "{0}" di tipo ID deve essere un NCName se sono abilitati gli spazi di nomi.
-+        IDNotUnique = Il valore di attributo "{0}" di tipo ID deve essere univoco all''interno del documento.
-+        IDREFInvalid = Il valore di attributo "{0}" di tipo IDREF deve essere un nome.
-+        IDREFInvalidWithNamespaces = Il valore di attributo "{0}" di tipo IDREF deve essere un NCName se sono abilitati gli spazi di nomi.
-+        IDREFSInvalid = Il valore di attributo "{0}" di tipo IDREFS deve corrispondere a uno o pi\u00F9 nomi.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere dichiarazioni nidificate correttamente se il riferimento dell''entit\u00E0 \u00E8 utilizzato come dichiarazione completa.
-+        ImproperDeclarationNesting = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere dichiarazioni nidificate correttamente.
-+        ImproperGroupNesting = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere coppie di parentesi nidificate correttamente.
-+        INVALID_PE_IN_CONDITIONAL = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere tutta la sezione condizionale oppure solo INCLUDE o IGNORE.
-+        MSG_ATTRIBUTE_NOT_DECLARED = Dichiarare l''attributo "{1}" per il tipo di elemento "{0}".
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attributo "{0}" con valore "{1}" deve avere un valore della lista "{2}".
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Il valore "{1}" dell''attributo "{0}" non deve essere modificato dalla normalizzazione (in "{2}") in un documento standalone.
-+        MSG_CONTENT_INCOMPLETE = Il contenuto del tipo di elemento "{0}" \u00E8 incompleto. Deve corrispondere a "{1}".
-+        MSG_CONTENT_INVALID = Il contenuto del tipo di elemento "{0}" deve corrispondere a "{1}".
-+        MSG_CONTENT_INVALID_SPECIFIED = Il contenuto del tipo di elemento "{0}" deve corrispondere a "{1}". Non sono consentiti elementi figlio di tipo "{2}".
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attributo "{1}" per il tipo di elemento "{0}" ha un valore predefinito e deve essere specificato in un documento standalone.
-+        MSG_DUPLICATE_ATTDEF = L''attributo "{1}" \u00E8 gi\u00E0 stato dichiarato per il tipo di elemento "{0}".
-+        MSG_ELEMENT_ALREADY_DECLARED = Il tipo di elemento "{0}" non deve essere dichiarato pi\u00F9 volte.
-+        MSG_ELEMENT_NOT_DECLARED = Il tipo di elemento "{0}" deve essere dichiarato.
-         MSG_GRAMMAR_NOT_FOUND = Documento non valido: nessuna grammatica trovata.
--        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con identificativo \"{0}\" deve esistere nel documento.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Il riferimento all''entit\u00E0 esterna \"{0}\" non \u00E8 consentito in un documento standalone.
--        MSG_FIXED_ATTVALUE_INVALID = L''attributo \"{1}\" con valore \"{2}\" deve avere un valore \"{3}\".
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Il tipo di elemento \"{0}\" ha gi\u00E0 un attributo \"{1}\" di tipo ID. Non \u00E8 consentito un secondo attributo \"{2}\" di tipo ID.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Il tipo di elemento \"{0}\" ha gi\u00E0 un attributo \"{1}\" di tipo NOTATION. Non \u00E8 consentito un secondo attributo \"{2}\" di tipo NOTATION.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notazione \"{1}\" deve essere dichiarata se vi viene fatto riferimento nella lista dei tipi di notazione per l''attributo \"{0}\".
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notazione \"{1}\" deve essere dichiarata se vi viene fatto riferimento dichiarazione di entit\u00E0 non analizzata per \"{0}\".
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Il riferimento all''entit\u00E0 \"{0}\" dichiarata in un''entit\u00E0 esterna analizzata non \u00E8 consentito in un documento standalone.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attributo \"{1}\" \u00E8 obbligatorio e deve essere specificato per il tipo di elemento \"{0}\".
-+        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con identificativo "{0}" deve esistere nel documento.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Il riferimento all''entit\u00E0 esterna "{0}" non \u00E8 consentito in un documento standalone.
-+        MSG_FIXED_ATTVALUE_INVALID = L''attributo "{1}" con valore "{2}" deve avere un valore "{3}".
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Il tipo di elemento "{0}" ha gi\u00E0 un attributo "{1}" di tipo ID. Non \u00E8 consentito un secondo attributo "{2}" di tipo ID.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Il tipo di elemento "{0}" ha gi\u00E0 un attributo "{1}" di tipo NOTATION. Non \u00E8 consentito un secondo attributo "{2}" di tipo NOTATION.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notazione "{1}" deve essere dichiarata se vi viene fatto riferimento nella lista dei tipi di notazione per l''attributo "{0}".
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notazione "{1}" deve essere dichiarata se vi viene fatto riferimento dichiarazione di entit\u00E0 non analizzata per "{0}".
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Il riferimento all''entit\u00E0 "{0}" dichiarata in un''entit\u00E0 esterna analizzata non \u00E8 consentito in un documento standalone.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attributo "{1}" \u00E8 obbligatorio e deve essere specificato per il tipo di elemento "{0}".
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Non deve esistere nessuno spazio tra gli elementi dichiarati in un'entit\u00E0 esterna analizzata con il contenuto dell'elemento in un documento standalone.
--        NMTOKENInvalid = Il valore di attributo \"{0}\" di tipo NMTOKEN deve essere un token di nome.
--        NMTOKENSInvalid = Il valore di attributo \"{0}\" di tipo NMTOKENS deve corrispondere a uno o pi\u00F9 token di nomi.
--        NoNotationOnEmptyElement = Il tipo di elemento \"{0}\" dichiarato come EMPTY non pu\u00F2 dichiarare l''attributo \"{1}\" di tipo NOTATION.
--        RootElementTypeMustMatchDoctypedecl = L''elemento radice \"{1}\" del documento deve corrispondere alla radice DOCTYPE \"{0}\".
--        UndeclaredElementInContentSpec = Il modello di contenuto dell''elemento \"{0}\" fa riferimento a un elemento \"{1}\" non dichiarato.
--        UniqueNotationName = La dichiarazione per la notazione \"{0}\" non \u00E8 univoca. Un nome non deve essere dichiarato pi\u00F9 volte nella dichiarazione di una notazione.
-+        NMTOKENInvalid = Il valore di attributo "{0}" di tipo NMTOKEN deve essere un token di nome.
-+        NMTOKENSInvalid = Il valore di attributo "{0}" di tipo NMTOKENS deve corrispondere a uno o pi\u00F9 token di nomi.
-+        NoNotationOnEmptyElement = Il tipo di elemento "{0}" dichiarato come EMPTY non pu\u00F2 dichiarare l''attributo "{1}" di tipo NOTATION.
-+        RootElementTypeMustMatchDoctypedecl = L''elemento radice "{1}" del documento deve corrispondere alla radice DOCTYPE "{0}".
-+        UndeclaredElementInContentSpec = Il modello di contenuto dell''elemento "{0}" fa riferimento a un elemento "{1}" non dichiarato.
-+        UniqueNotationName = La dichiarazione per la notazione "{0}" non \u00E8 univoca. Un nome non deve essere dichiarato pi\u00F9 volte nella dichiarazione di una notazione.
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype Validator: errore. \u00C8 necessario richiamare il metodo di inizializzazione con un riferimento di grammatica valido. \t
--        ENTITYNotUnparsed = ENTITY \"{0}\" non analizzata.
--        ENTITYNotValid = ENTITY \"{0}\" non valida.
-+        ENTITYNotUnparsed = ENTITY "{0}" non analizzata.
-+        ENTITYNotValid = ENTITY "{0}" non valida.
-         EmptyList = I valori di tipo ENTITIES, IDREFS e NMTOKENS non possono essere una lista vuota.
++void CMSParMarkTask::work_on_young_gen_roots(uint worker_id, OopsInGenClosure* cl) {
++  DefNewGeneration* dng = _collector->_young_gen->as_DefNewGeneration();
++  EdenSpace* eden_space = dng->eden();
++  ContiguousSpace* from_space = dng->from();
++  ContiguousSpace* to_space   = dng->to();
++
++  HeapWord** eca = _collector->_eden_chunk_array;
++  size_t     ect = _collector->_eden_chunk_index;
++  HeapWord** sca = _collector->_survivor_chunk_array;
++  size_t     sct = _collector->_survivor_chunk_index;
++
++  assert(ect <= _collector->_eden_chunk_capacity, "out of bounds");
++  assert(sct <= _collector->_survivor_chunk_capacity, "out of bounds");
++
++  do_young_space_rescan(worker_id, cl, to_space, NULL, 0);
++  do_young_space_rescan(worker_id, cl, from_space, sca, sct);
++  do_young_space_rescan(worker_id, cl, eden_space, eca, ect);
++}
++
+ // work_queue(i) is passed to the closure
+ // Par_MarkRefsIntoAndScanClosure.  The "i" parameter
+ // also is passed to do_dirty_card_rescan_tasks() and to
+@@ -5180,23 +5319,7 @@
+   // work first.
+   // ---------- young gen roots --------------
+   {
+-    DefNewGeneration* dng = _collector->_young_gen->as_DefNewGeneration();
+-    EdenSpace* eden_space = dng->eden();
+-    ContiguousSpace* from_space = dng->from();
+-    ContiguousSpace* to_space   = dng->to();
+-
+-    HeapWord** eca = _collector->_eden_chunk_array;
+-    size_t     ect = _collector->_eden_chunk_index;
+-    HeapWord** sca = _collector->_survivor_chunk_array;
+-    size_t     sct = _collector->_survivor_chunk_index;
+-
+-    assert(ect <= _collector->_eden_chunk_capacity, "out of bounds");
+-    assert(sct <= _collector->_survivor_chunk_capacity, "out of bounds");
+-
+-    do_young_space_rescan(worker_id, &par_mrias_cl, to_space, NULL, 0);
+-    do_young_space_rescan(worker_id, &par_mrias_cl, from_space, sca, sct);
+-    do_young_space_rescan(worker_id, &par_mrias_cl, eden_space, eca, ect);
+-
++    work_on_young_gen_roots(worker_id, &par_mrias_cl);
+     _timer.stop();
+     if (PrintCMSStatistics != 0) {
+       gclog_or_tty->print_cr(
+@@ -5257,8 +5380,8 @@
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = Il riferimento di entit\u00E0 esterna \"&{0};\" non \u00E8 consentito in un valore di attributo.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = Il riferimento di entit\u00E0 esterna "&{0};" non \u00E8 consentito in un valore di attributo.
-+        AccessExternalDTD = DTD esterna: lettura della DTD esterna ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalDTD.
-+        AccessExternalEntity = Entit\u00E0 esterna: lettura del documento esterno ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalDTD.
+ // Note that parameter "i" is not used.
+ void
+-CMSParRemarkTask::do_young_space_rescan(int i,
+-  Par_MarkRefsIntoAndScanClosure* cl, ContiguousSpace* space,
++CMSParMarkTask::do_young_space_rescan(uint worker_id,
++  OopsInGenClosure* cl, ContiguousSpace* space,
+   HeapWord** chunk_array, size_t chunk_top) {
+   // Until all tasks completed:
+   // . claim an unclaimed task
+@@ -5454,6 +5577,32 @@
+          "Else our work is not yet done");
+ }
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = L''entit\u00E0 \"{0}\" \u00E8 indicata da un riferimento, ma non \u00E8 dichiarata.
--        ReferenceToUnparsedEntity = Il riferimento di entit\u00E0 non analizzata \"&{0};\" non \u00E8 consentito.
--        RecursiveReference = Riferimento di entit\u00E0 ricorsivo \"{0}\" (percorso riferimento: {1}).
--        RecursiveGeneralReference = Riferimento di entit\u00E0 generale ricorsivo \"&{0};\" (percorso riferimento: {1}).
--        RecursivePEReference = Riferimento di entit\u00E0 parametro ricorsivo \"%{0};\" (percorso riferimento: {1}).
-+        EntityNotDeclared = L''entit\u00E0 "{0}" \u00E8 indicata da un riferimento, ma non \u00E8 dichiarata.
-+        ReferenceToUnparsedEntity = Il riferimento di entit\u00E0 non analizzata "&{0};" non \u00E8 consentito.
-+        RecursiveReference = Riferimento di entit\u00E0 ricorsivo "{0}" (percorso riferimento: {1}).
-+        RecursiveGeneralReference = Riferimento di entit\u00E0 generale ricorsivo "&{0};" (percorso riferimento: {1}).
-+        RecursivePEReference = Riferimento di entit\u00E0 parametro ricorsivo "%{0};" (percorso riferimento: {1}).
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = La codifica \"{0}\" non \u00E8 supportata.
-+        EncodingNotSupported = La codifica "{0}" non \u00E8 supportata.
-         EncodingRequired = Un'entit\u00E0 analizzata non codificata in UTF-8 o UTF-16 deve contenere una dichiarazione di codifica.
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = L'elemento o l'attributo non corrisponde alla produzione del QName: QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = L''elemento \"{0}\" non pu\u00F2 avere \"xmlns\" come prefisso.
--        ElementPrefixUnbound = Il prefisso \"{0}\" per l''elemento \"{1}\" non \u00E8 associato.
--        AttributePrefixUnbound = Il prefisso \"{2}\" per l''attributo \"{1}\" associato a un tipo di elemento \"{0}\" non \u00E8 associato.
--        EmptyPrefixedAttName = Il valore dell''attributo \"{0}\" non \u00E8 valido. Le associazioni di spazi di nomi con prefisso non possono essere vuote.
--        PrefixDeclared = Il prefisso spazio di nomi \"{0}\" non \u00E8 stato dichiarato.
-+        ElementXMLNSPrefix = L''elemento "{0}" non pu\u00F2 avere "xmlns" come prefisso.
-+        ElementPrefixUnbound = Il prefisso "{0}" per l''elemento "{1}" non \u00E8 associato.
-+        AttributePrefixUnbound = Il prefisso "{2}" per l''attributo "{1}" associato a un tipo di elemento "{0}" non \u00E8 associato.
-+        EmptyPrefixedAttName = Il valore dell''attributo "{0}" non \u00E8 valido. Le associazioni di spazi di nomi con prefisso non possono essere vuote.
-+        PrefixDeclared = Il prefisso spazio di nomi "{0}" non \u00E8 stato dichiarato.
-         CantBindXMLNS = Il prefisso "xmlns" non pu\u00F2 essere associato esplicitamente a uno spazio di nomi, n\u00E9 lo spazio di nomi per "xmlns" pu\u00F2 essere associato esplicitamente a un prefisso.
-         CantBindXML = Il prefisso "xml" non pu\u00F2 essere associato a uno spazio di nomi diverso da quello al quale appartiene, n\u00E9 lo spazio di nomi per "xml" pu\u00F2 essere associato a un prefisso diverso da "xml".
--        MSG_ATT_DEFAULT_INVALID = defaultValue \"{1}\" dell''attributo \"{0}\" non valido per i vincoli lessicali di questo tipo di attributo.
-+        MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" dell''attributo "{0}" non valido per i vincoli lessicali di questo tipo di attributo.
++// Record object boundaries in _eden_chunk_array by sampling the eden
++// top in the slow-path eden object allocation code path and record
++// the boundaries, if CMSEdenChunksRecordAlways is true. If
++// CMSEdenChunksRecordAlways is false, we use the other asynchronous
++// sampling in sample_eden() that activates during the part of the
++// preclean phase.
++void CMSCollector::sample_eden_chunk() {
++  if (CMSEdenChunksRecordAlways && _eden_chunk_array != NULL) {
++    if (_eden_chunk_lock->try_lock()) {
++      // Record a sample. This is the critical section. The contents
++      // of the _eden_chunk_array have to be non-decreasing in the
++      // address order.
++      _eden_chunk_array[_eden_chunk_index] = *_top_addr;
++      assert(_eden_chunk_array[_eden_chunk_index] <= *_end_addr,
++             "Unexpected state of Eden");
++      if (_eden_chunk_index == 0 ||
++          ((_eden_chunk_array[_eden_chunk_index] > _eden_chunk_array[_eden_chunk_index-1]) &&
++           (pointer_delta(_eden_chunk_array[_eden_chunk_index],
++                          _eden_chunk_array[_eden_chunk_index-1]) >= CMSSamplingGrain))) {
++        _eden_chunk_index++;  // commit sample
++      }
++      _eden_chunk_lock->unlock();
++    }
++  }
++}
++
+ // Return a thread-local PLAB recording array, as appropriate.
+ void* CMSCollector::get_data_recorder(int thr_num) {
+   if (_survivor_plab_array != NULL &&
+@@ -5477,12 +5626,13 @@
+ 
+ // Merge the per-thread plab arrays into the global survivor chunk
+ // array which will provide the partitioning of the survivor space
+-// for CMS rescan.
++// for CMS initial scan and rescan.
+ void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv,
+                                               int no_of_gc_threads) {
+   assert(_survivor_plab_array  != NULL, "Error");
+   assert(_survivor_chunk_array != NULL, "Error");
+-  assert(_collectorState == FinalMarking, "Error");
++  assert(_collectorState == FinalMarking ||
++         (CMSParallelInitialMarkEnabled && _collectorState == InitialMarking), "Error");
+   for (int j = 0; j < no_of_gc_threads; j++) {
+     _cursor[j] = 0;
+   }
+@@ -5545,7 +5695,7 @@
+ }
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+ // Set up the space's par_seq_tasks structure for work claiming
+-// for parallel rescan of young gen.
++// for parallel initial scan and rescan of young gen.
+ // See ParRescanTask where this is currently used.
+ void
+ CMSCollector::
+@@ -6695,6 +6845,28 @@
+ void MarkRefsIntoClosure::do_oop(oop* p)       { MarkRefsIntoClosure::do_oop_work(p); }
+ void MarkRefsIntoClosure::do_oop(narrowOop* p) { MarkRefsIntoClosure::do_oop_work(p); }
+ 
++Par_MarkRefsIntoClosure::Par_MarkRefsIntoClosure(
++  MemRegion span, CMSBitMap* bitMap):
++    _span(span),
++    _bitMap(bitMap)
++{
++    assert(_ref_processor == NULL, "deliberately left NULL");
++    assert(_bitMap->covers(_span), "_bitMap/_span mismatch");
++}
++
++void Par_MarkRefsIntoClosure::do_oop(oop obj) {
++  // if p points into _span, then mark corresponding bit in _markBitMap
++  assert(obj->is_oop(), "expected an oop");
++  HeapWord* addr = (HeapWord*)obj;
++  if (_span.contains(addr)) {
++    // this should be made more efficient
++    _bitMap->par_mark(addr);
++  }
++}
++
++void Par_MarkRefsIntoClosure::do_oop(oop* p)       { Par_MarkRefsIntoClosure::do_oop_work(p); }
++void Par_MarkRefsIntoClosure::do_oop(narrowOop* p) { Par_MarkRefsIntoClosure::do_oop_work(p); }
++
+ // A variant of the above, used for CMS marking verification.
+ MarkRefsIntoVerifyClosure::MarkRefsIntoVerifyClosure(
+   MemRegion span, CMSBitMap* verification_bm, CMSBitMap* cms_bm):
+@@ -9360,7 +9532,6 @@
+     return;
+   }
+ }
+-
+ // Transfer some number of overflown objects to usual marking
+ // stack. Return true if some objects were transferred.
+ bool MarkRefsIntoAndScanClosure::take_from_overflow_list() {
+@@ -9432,4 +9603,3 @@
+       ShouldNotReachHere();
+   }
+ }
+-
+--- ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -516,6 +516,8 @@
+   friend class ConcurrentMarkSweepThread;
+   friend class ConcurrentMarkSweepGeneration;
+   friend class CompactibleFreeListSpace;
++  friend class CMSParMarkTask;
++  friend class CMSParInitialMarkTask;
+   friend class CMSParRemarkTask;
+   friend class CMSConcMarkingTask;
+   friend class CMSRefProcTaskProxy;
+@@ -752,6 +754,7 @@
+   Generation* _young_gen;  // the younger gen
+   HeapWord** _top_addr;    // ... Top of Eden
+   HeapWord** _end_addr;    // ... End of Eden
++  Mutex*     _eden_chunk_lock;
+   HeapWord** _eden_chunk_array; // ... Eden partitioning array
+   size_t     _eden_chunk_index; // ... top (exclusive) of array
+   size_t     _eden_chunk_capacity;  // ... max entries in array
+@@ -953,6 +956,7 @@
+ 
+   // Support for parallel remark of survivor space
+   void* get_data_recorder(int thr_num);
++  void sample_eden_chunk();
+ 
+   CMSBitMap* markBitMap()  { return &_markBitMap; }
+   void directAllocated(HeapWord* start, size_t size);
+@@ -1013,7 +1017,7 @@
+ 
+   // debugging
+   void verify();
+-  bool verify_after_remark();
++  bool verify_after_remark(bool silent = VerifySilently);
+   void verify_ok_to_terminate() const PRODUCT_RETURN;
+   void verify_work_stacks_empty() const PRODUCT_RETURN;
+   void verify_overflow_empty() const PRODUCT_RETURN;
+@@ -1031,6 +1035,8 @@
+ 
+   // Initialization errors
+   bool completed_initialization() { return _completed_initialization; }
++
++  void print_eden_and_survivor_chunk_arrays();
+ };
  
+ class CMSExpansionCause : public AllStatic  {
+@@ -1317,6 +1323,10 @@
+     //Delegate to collector
+     return collector()->get_data_recorder(thr_num);
+   }
++  void sample_eden_chunk() {
++    //Delegate to collector
++    return collector()->sample_eden_chunk();
++  }
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=Il parser ha rilevato pi\u00F9 \"{0}\" espansioni di entit\u00E0 nel documento. Questo \u00E8 il limite imposto dall''applicazione.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: il parser ha rilevato pi\u00F9 "{0}" espansioni di entit\u00E0 nel documento. Questo \u00E8 il limite imposto dal kit JDK.
-+        ElementAttributeLimit=JAXP00010002: l''elemento "{0}" contiene pi\u00F9 di "{1}" attributi. "{1}" \u00E8 il limite imposto dal kit JDK.
-+        MaxEntitySizeLimit=JAXP00010003: la lunghezza dell''entit\u00E0 "{0}" \u00E8 "{1}". Tale valore supera il limite "{2}" definito da "{3}".
-+        TotalEntitySizeLimit=JAXP00010004: le dimensioni accumulate "{0}" delle entit\u00E0 supera il limite "{1}" definito da "{2}".
-+        MaxXMLNameLimit=JAXP00010005: il nome "{0}" supera il limite "{1}" definito da "{2}".
+   // Printing
+   const char* name() const;
+--- ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -145,7 +145,7 @@
+                                 );
+ #endif /* USDT2 */
+ 
+-  _collector->_gc_timer_cm->register_gc_pause_start("Initial Mark", os::elapsed_counter());
++  _collector->_gc_timer_cm->register_gc_pause_start("Initial Mark");
+ 
+   GenCollectedHeap* gch = GenCollectedHeap::heap();
+   GCCauseSetter gccs(gch, GCCause::_cms_initial_mark);
+@@ -157,7 +157,7 @@
+ 
+   VM_CMS_Operation::verify_after_gc();
+ 
+-  _collector->_gc_timer_cm->register_gc_pause_end(os::elapsed_counter());
++  _collector->_gc_timer_cm->register_gc_pause_end();
+ 
+ #ifndef USDT2
+   HS_DTRACE_PROBE(hs_private, cms__initmark__end);
+@@ -182,7 +182,7 @@
+                                 );
+ #endif /* USDT2 */
+ 
+-  _collector->_gc_timer_cm->register_gc_pause_start("Final Mark", os::elapsed_counter());
++  _collector->_gc_timer_cm->register_gc_pause_start("Final Mark");
+ 
+   GenCollectedHeap* gch = GenCollectedHeap::heap();
+   GCCauseSetter gccs(gch, GCCause::_cms_final_remark);
+@@ -195,7 +195,7 @@
+   VM_CMS_Operation::verify_after_gc();
+ 
+   _collector->save_heap_summary();
+-  _collector->_gc_timer_cm->register_gc_pause_end(os::elapsed_counter());
++  _collector->_gc_timer_cm->register_gc_pause_end();
+ 
+ #ifndef USDT2
+   HS_DTRACE_PROBE(hs_private, cms__remark__end);
+--- ./hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -114,6 +114,14 @@
+   }
+ }
+ 
++void ConcurrentG1Refine::worker_threads_do(ThreadClosure * tc) {
++  if (_threads != NULL) {
++    for (int i = 0; i < worker_thread_num(); i++) {
++      tc->do_thread(_threads[i]);
++    }
++  }
++}
++
+ int ConcurrentG1Refine::thread_num() {
+   int n_threads = (G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads
+                                                 : ParallelGCThreads;
+@@ -126,3 +134,7 @@
+     st->cr();
+   }
+ }
++
++ConcurrentG1RefineThread * ConcurrentG1Refine::sampling_thread() const {
++  return _threads[worker_thread_num()];
++}
+--- ./hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -35,6 +35,7 @@
+ class G1CollectedHeap;
+ class G1HotCardCache;
+ class G1RemSet;
++class DirtyCardQueue;
+ 
+ class ConcurrentG1Refine: public CHeapObj {
+   ConcurrentG1RefineThread** _threads;
+@@ -78,9 +79,15 @@
+ 
+   void reinitialize_threads();
+ 
+-  // Iterate over the conc refine threads
++  // Iterate over all concurrent refinement threads
+   void threads_do(ThreadClosure *tc);
+ 
++  // Iterate over all worker refinement threads
++  void worker_threads_do(ThreadClosure * tc);
++
++  // The RS sampling thread
++  ConcurrentG1RefineThread * sampling_thread() const;
++
+   static int thread_num();
+ 
+   void print_worker_threads_on(outputStream* st) const;
+--- ./hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -1154,10 +1154,9 @@
+ 
+   if (VerifyDuringGC) {
+     HandleMark hm;  // handle scope
+-    gclog_or_tty->print(" VerifyDuringGC:(before)");
+     Universe::heap()->prepare_for_verify();
+-    Universe::verify(/* silent */ false,
+-                     /* option */ VerifyOption_G1UsePrevMarking);
++    Universe::verify(VerifyOption_G1UsePrevMarking,
++                     " VerifyDuringGC:(before)");
+   }
+ 
+   G1CollectorPolicy* g1p = g1h->g1_policy();
+@@ -1181,10 +1180,9 @@
+     // Verify the heap w.r.t. the previous marking bitmap.
+     if (VerifyDuringGC) {
+       HandleMark hm;  // handle scope
+-      gclog_or_tty->print(" VerifyDuringGC:(overflow)");
+       Universe::heap()->prepare_for_verify();
+-      Universe::verify(/* silent */ false,
+-                       /* option */ VerifyOption_G1UsePrevMarking);
++      Universe::verify(VerifyOption_G1UsePrevMarking,
++                       " VerifyDuringGC:(overflow)");
+     }
+ 
+     // Clear the marking state because we will be restarting
+@@ -1204,10 +1202,9 @@
+ 
+     if (VerifyDuringGC) {
+       HandleMark hm;  // handle scope
+-      gclog_or_tty->print(" VerifyDuringGC:(after)");
+       Universe::heap()->prepare_for_verify();
+-      Universe::verify(/* silent */ false,
+-                       /* option */ VerifyOption_G1UseNextMarking);
++      Universe::verify(VerifyOption_G1UseNextMarking,
++                       " VerifyDuringGC:(after)");
+     }
+     assert(!restart_for_overflow(), "sanity");
+     // Completely reset the marking state since marking completed
+@@ -1498,7 +1495,6 @@
+   }
+ };
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= L''elemento \"{0}\" contiene pi\u00F9 di \"{1}\" attributi. \"{1}\" \u00E8 il limite imposto dall''applicazione.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,26 @@
--/*
-- * 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.
-- */
 -
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
+ class G1ParVerifyFinalCountTask: public AbstractGangTask {
+ protected:
+   G1CollectedHeap* _g1h;
+@@ -1856,10 +1852,9 @@
+ 
+   if (VerifyDuringGC) {
+     HandleMark hm;  // handle scope
+-    gclog_or_tty->print(" VerifyDuringGC:(before)");
+     Universe::heap()->prepare_for_verify();
+-    Universe::verify(/* silent */ false,
+-                     /* option */ VerifyOption_G1UsePrevMarking);
++    Universe::verify(VerifyOption_G1UsePrevMarking,
++                     " VerifyDuringGC:(before)");
+   }
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +44,14 @@
-         InvalidCharInProlog = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D7\u30ED\u30ED\u30FC\u30B0\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
-         InvalidCharInXMLDecl = XML\u5BA3\u8A00\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
- # 2.4 Character Data and Markup
--        CDEndInContent = \u6587\u5B57\u30B7\u30FC\u30B1\u30F3\u30B9\"]]>\"\u306F\u3001CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u3092\u793A\u3059\u76EE\u7684\u4EE5\u5916\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
-+        CDEndInContent = \u6587\u5B57\u30B7\u30FC\u30B1\u30F3\u30B9"]]>"\u306F\u3001CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u3092\u793A\u3059\u76EE\u7684\u4EE5\u5916\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
- # 2.7 CDATA Sections
--        CDSectUnterminated = CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306F\"]]>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        CDSectUnterminated = CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306F"]]>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = XML\u5BA3\u8A00\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u5148\u982D\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
--        EqRequiredInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001\"{0}\"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
--        QuoteRequiredInXMLDecl = XML\u5BA3\u8A00\u306E\"{0}\"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        XMLDeclUnterminated = XML\u5BA3\u8A00\u306F\"?>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        EqRequiredInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001"{0}"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        QuoteRequiredInXMLDecl = XML\u5BA3\u8A00\u306E"{0}"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        XMLDeclUnterminated = XML\u5BA3\u8A00\u306F"?>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         VersionInfoRequired = XML\u5BA3\u8A00\u306B\u306F\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u5FC5\u8981\u3067\u3059\u3002
-         SpaceRequiredBeforeVersionInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001\u30D0\u30FC\u30B8\u30E7\u30F3\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-         SpaceRequiredBeforeEncodingInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-@@ -71,70 +67,71 @@
-         ReferenceIllegalInTrailingMisc=\u5F8C\u7D9A\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u53C2\u7167\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5BA3\u8A00\u306E\u5024\u306F\u3001\"{0}\"\u3067\u306F\u306A\u304F\u3001\"yes\"\u307E\u305F\u306F\"no\"\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        SDDeclInvalid = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5BA3\u8A00\u306E\u5024\u306F\u3001"{0}"\u3067\u306F\u306A\u304F\u3001"yes"\u307E\u305F\u306F"no"\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        SDDeclNameInvalid = XML\u5BA3\u8A00\u306E\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u540D\u304C\u9593\u9055\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
- # 2.12 Language Identification
--        XMLLangInvalid = xml:lang\u5C5E\u6027\u306E\u5024\"{0}\"\u306F\u7121\u52B9\u306A\u8A00\u8A9E\u8B58\u5225\u5B50\u3067\u3059\u3002
-+        XMLLangInvalid = xml:lang\u5C5E\u6027\u306E\u5024"{0}"\u306F\u7121\u52B9\u306A\u8A00\u8A9E\u8B58\u5225\u5B50\u3067\u3059\u3002
- # 3. Logical Structures
--        ETagRequired = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u7D42\u4E86\u30BF\u30B0\"\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ETagRequired = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u7D42\u4E86\u30BF\u30B0""\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5F8C\u306B\u306F\u3001\u5C5E\u6027\u6307\u5B9A\">\"\u307E\u305F\u306F\"/>\"\u304C\u5FC5\u8981\u3067\u3059\u3002
--        EqRequiredInAttribute = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\u540D\"{1}\"\u306E\u5F8C\u306B\u306F\u3001'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
--        OpenQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306B\u306F\u3001\u958B\u59CB\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
--        CloseQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306B\u306F\u3001\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
--        AttributeNotUnique = \u5C5E\u6027\"{1}\"\u306F\u8981\u7D20\"{0}\"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
--        AttributeNSNotUnique = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{2}\"\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u305F\u5C5E\u6027\"{1}\"\u306F\u8981\u7D20\"{0}\"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
--        ETagUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u7D42\u4E86\u30BF\u30B0\u306F''>''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ElementUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5F8C\u306B\u306F\u3001\u5C5E\u6027\u6307\u5B9A">"\u307E\u305F\u306F"/>"\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        EqRequiredInAttribute = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\u540D"{1}"\u306E\u5F8C\u306B\u306F\u3001'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        OpenQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306B\u306F\u3001\u958B\u59CB\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        CloseQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306B\u306F\u3001\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        AttributeNotUnique = \u5C5E\u6027"{1}"\u306F\u8981\u7D20"{0}"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-+        AttributeNSNotUnique = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9"{2}"\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u305F\u5C5E\u6027"{1}"\u306F\u8981\u7D20"{0}"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-+        ETagUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u7D42\u4E86\u30BF\u30B0\u306F''>''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         MarkupNotRecognizedInContent = \u8981\u7D20\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\u3001\u6574\u5F62\u5F0F\u306E\u6587\u5B57\u30C7\u30FC\u30BF\u307E\u305F\u306F\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         DoctypeIllegalInContent = \u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u306FDOCTYPE\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
- # 4.1 Character and Entity References
-         ReferenceUnterminated = \u53C2\u7167\u306F';'\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = \u53C2\u7167\u306F\u3001\u540C\u3058\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        ElementEntityMismatch = \u8981\u7D20\"{0}\"\u306F\u3001\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u3067\u958B\u59CB\u304A\u3088\u3073\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ElementEntityMismatch = \u8981\u7D20"{0}"\u306F\u3001\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u3067\u958B\u59CB\u304A\u3088\u3073\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         MarkupEntityMismatch=XML\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u69CB\u9020\u306F\u3001\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u3067\u958B\u59CB\u304A\u3088\u3073\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = \u5C5E\u6027\"{1}\"\u306E\u5024\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{2})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\u8981\u7D20\u306F\"{0}\"\u3067\u3059\u3002
-+        InvalidCharInAttValue = \u5C5E\u6027"{1}"\u306E\u5024\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{2})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\u8981\u7D20\u306F"{0}"\u3067\u3059\u3002
-         InvalidCharInComment = \u30B3\u30E1\u30F3\u30C8\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
-         InvalidCharInPI = \u51E6\u7406\u547D\u4EE4\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
-         InvalidCharInInternalSubset = DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
-         InvalidCharInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = \u5C5E\u6027\"{1}\"\u306E\u5024\u306E\u5148\u982D\u306B\u306F\u3001\u4E00\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u307E\u305F\u306F\u4E8C\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
--        LessthanInAttValue = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306E\u5024\u306B\u306F\u3001''<''\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
--        AttributeValueUnterminated = \u5C5E\u6027\"{1}\"\u306E\u5024\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u5F15\u7528\u7B26\u6587\u5B57\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        QuoteRequiredInAttValue = \u5C5E\u6027"{1}"\u306E\u5024\u306E\u5148\u982D\u306B\u306F\u3001\u4E00\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u307E\u305F\u306F\u4E8C\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        LessthanInAttValue = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306E\u5024\u306B\u306F\u3001''<''\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-+        AttributeValueUnterminated = \u5C5E\u6027"{1}"\u306E\u5024\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u5F15\u7528\u7B26\u6587\u5B57\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 2.5 Comments
--        InvalidCommentStart = \u30B3\u30E1\u30F3\u30C8\u306E\u5148\u982D\u306B\u306F\"\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        InvalidCommentStart = \u30B3\u30E1\u30F3\u30C8\u306E\u5148\u982D\u306B\u306F""\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         COMMENT_NOT_IN_ONE_ENTITY = \u30B3\u30E1\u30F3\u30C8\u304C\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u56F2\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002
- # 2.6 Processing Instructions
-         PITargetRequired = \u51E6\u7406\u547D\u4EE4\u306E\u5148\u982D\u306B\u306F\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u540D\u524D\u304C\u5FC5\u8981\u3067\u3059\u3002
-         SpaceRequiredInPI = \u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u30C7\u30FC\u30BF\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
--        PIUnterminated = \u51E6\u7406\u547D\u4EE4\u306F\"?>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        ReservedPITarget = \"[xX][mM][lL]\"\u3068\u4E00\u81F4\u3059\u308B\u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        PIUnterminated = \u51E6\u7406\u547D\u4EE4\u306F"?>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ReservedPITarget = "[xX][mM][lL]"\u3068\u4E00\u81F4\u3059\u308B\u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-         PI_NOT_IN_ONE_ENTITY = \u51E6\u7406\u547D\u4EE4\u304C\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u56F2\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = \u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\"\u306F\u7121\u52B9\u3067\u3059\u3002
--        VersionNotSupported = XML\u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u306E\u307F\u3067\u3059\u3002
--        VersionNotSupported11 = XML\u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u304A\u3088\u3073XML 1.1\u306E\u307F\u3067\u3059\u3002
-+        VersionInfoInvalid = \u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u7121\u52B9\u3067\u3059\u3002
-+        VersionNotSupported = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u306E\u307F\u3067\u3059\u3002
-+        VersionNotSupported11 = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u304A\u3088\u3073XML 1.1\u306E\u307F\u3067\u3059\u3002
-         VersionMismatch= \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u306F\u3001\u5F8C\u7D9A\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u5225\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300110\u9032\u8868\u73FE\u306F\"&#\"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        HexdigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300116\u9032\u8868\u73FE\u306F\"&#x\"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        DigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300110\u9032\u8868\u73FE\u306F"&#"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        HexdigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300116\u9032\u8868\u73FE\u306F"&#x"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         SemicolonRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u306F';'\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        InvalidCharRef = \u6587\u5B57\u53C2\u7167\"&#{0}\"\u306F\u7121\u52B9\u306AXML\u6587\u5B57\u3067\u3059\u3002
-+        InvalidCharRef = \u6587\u5B57\u53C2\u7167"&#{0}"\u306F\u7121\u52B9\u306AXML\u6587\u5B57\u3067\u3059\u3002
-         NameRequiredInReference = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3067\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u306F'&'\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        SemicolonRequiredInReference = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u3078\u306E\u53C2\u7167\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        SemicolonRequiredInReference = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u3078\u306E\u53C2\u7167\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306F\u3001\u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u5148\u982D\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
--        EqRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\"{0}\"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
--        QuoteRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E\"{0}\"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        CloseQuoteMissingInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E\"{0}\"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306B\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-+        EqRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001"{0}"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        QuoteRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E"{0}"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        CloseQuoteMissingInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E"{0}"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306B\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-         SpaceRequiredBeforeVersionInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\u30D0\u30FC\u30B8\u30E7\u30F3\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-         SpaceRequiredBeforeEncodingInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
--        TextDeclUnterminated = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306F\"?>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        TextDeclUnterminated = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306F"?>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         EncodingDeclRequired = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306B\u306F\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u5BA3\u8A00\u304C\u5FC5\u8981\u3067\u3059\u3002
-         NoMorePseudoAttributes = \u3053\u308C\u4EE5\u4E0A\u306E\u7591\u4F3C\u5C5E\u6027\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-         MorePseudoAttributes = \u7591\u4F3C\u5C5E\u6027\u304C\u3055\u3089\u306B\u5FC5\u8981\u3067\u3059\u3002
-@@ -143,13 +140,13 @@
-         CommentNotInOneEntity = \u30B3\u30E1\u30F3\u30C8\u306F\u3001\u540C\u3058\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         PINotInOneEntity = \u51E6\u7406\u547D\u4EE4\u306F\u3001\u540C\u3058\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002
--        EncodingByteOrderUnsupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\"{0}\"\u306B\u6307\u5B9A\u3055\u308C\u305F\u30D0\u30A4\u30C8\u9806\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        EncodingDeclInvalid = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D"{0}"\u304C\u7121\u52B9\u3067\u3059\u3002
-+        EncodingByteOrderUnsupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{0}"\u306B\u6307\u5B9A\u3055\u308C\u305F\u30D0\u30A4\u30C8\u9806\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-         InvalidByte = {1}\u30D0\u30A4\u30C8\u306EUTF-8\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u30D0\u30A4\u30C8{0}\u304C\u7121\u52B9\u3067\u3059\u3002
-         ExpectedByte = {1}\u30D0\u30A4\u30C8\u306EUTF-8\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u30D0\u30A4\u30C8{0}\u304C\u5FC5\u8981\u3067\u3059\u3002  
-         InvalidHighSurrogate = UTF-8\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u4E0A\u4F4D\u30B5\u30ED\u30B2\u30FC\u30C8\u30FB\u30D3\u30C3\u30C8\u306E\u4E0A\u9650\u306F0x10\u3067\u3059\u304C\u30010x{0}\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002
--        OperationNotSupported = \u64CD\u4F5C\"{0}\"\u306F{1}\u30EA\u30FC\u30C0\u30FC\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        InvalidASCII = \u30D0\u30A4\u30C8\"{0}\"\u306F\u3001(7\u30D3\u30C3\u30C8) ASCII\u30AD\u30E3\u30E9\u30AF\u30BF\u30FB\u30BB\u30C3\u30C8\u306E\u30E1\u30F3\u30D0\u30FC\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-+        OperationNotSupported = \u64CD\u4F5C"{0}"\u306F{1}\u30EA\u30FC\u30C0\u30FC\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        InvalidASCII = \u30D0\u30A4\u30C8"{0}"\u306F\u3001(7\u30D3\u30C3\u30C8) ASCII\u30AD\u30E3\u30E9\u30AF\u30BF\u30FB\u30BB\u30C3\u30C8\u306E\u30E1\u30F3\u30D0\u30FC\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-         CharConversionFailure = \u7279\u5B9A\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u3042\u308B\u3068\u78BA\u5B9A\u3055\u308C\u305F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u306F\u3001\u305D\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u4E0D\u6B63\u306A\u30B7\u30FC\u30B1\u30F3\u30B9\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-         
- # DTD Messages
-@@ -169,150 +166,150 @@
-         PubidCharIllegal = \u516C\u958B\u8B58\u5225\u5B50\u3067\u306F\u3001\u6587\u5B57(Unicode: 0x{0})\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
-         SpaceRequiredBetweenPublicAndSystem = \u516C\u958B\u8B58\u5225\u5B50\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        PEReferenceWithinMarkup = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"%{0};\"\u306F\u3001DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5185\u306B\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        PEReferenceWithinMarkup = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u306F\u3001DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5185\u306B\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u306B\u542B\u307E\u308C\u308B\u304B\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u304C\u6307\u3057\u3066\u3044\u308B\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5BA3\u8A00\u306F\u6574\u5F62\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\"\u306E\u5C5E\u6027\u5BA3\u8A00\u306F\u3001\"default\"\u304A\u3088\u3073\"preserve\"\u306E\u307F\u3092\u4F7F\u7528\u3067\u304D\u308B\u5217\u6319\u30BF\u30A4\u30D7\u3068\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space"\u306E\u5C5E\u6027\u5BA3\u8A00\u306F\u3001"default"\u304A\u3088\u3073"preserve"\u306E\u307F\u3092\u4F7F\u7528\u3067\u304D\u308B\u5217\u6319\u30BF\u30A4\u30D7\u3068\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u8981\u7D20\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u8981\u7D20\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5F8C\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u8981\u7D20\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5F8C\u306B\u5236\u7D04\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        ElementDeclUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F''(''\u6587\u5B57\u307E\u305F\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F''(''\u6587\u5B57\u307E\u305F\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MixedContentUnterminated = \u5B50\u8981\u7D20\u306E\u30BF\u30A4\u30D7\u304C\u5236\u7D04\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u6DF7\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\"{0}\"\u306F\")*\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MixedContentUnterminated = \u5B50\u8981\u7D20\u306E\u30BF\u30A4\u30D7\u304C\u5236\u7D04\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u6DF7\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB"{0}"\u306F")*"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u5C5E\u6027\u30EA\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\"\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IgnoreSectUnterminated = \u9664\u5916\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u5F8C\u306F\"]]>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IncludeSectUnterminated = \u5305\u542B\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u306F"]]>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IgnoreSectUnterminated = \u9664\u5916\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u5F8C\u306F"]]>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3067\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u306F'%'\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        SemicolonRequiredInPEReference = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"%{0};\"\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        SemicolonRequiredInPEReference = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--	MSG_DUPLICATE_ENTITY_DEFINITION = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u304C\u8907\u6570\u56DE\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D"{0}"\u3068\u5B9A\u7FA9\u306E\u9593\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u3067\u306F\u3001"NDATA"\u3068\u8868\u8A18\u540D\u306E\u9593\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u3067\u306F\u3001"NDATA"\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u3067\u306F\u3001"NDATA"\u306E\u5F8C\u306B\u8868\u8A18\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        EntityDeclUnterminated = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+	MSG_DUPLICATE_ENTITY_DEFINITION = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u304C\u8907\u6570\u56DE\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002        
- # 4.2.2 External Entities
--        ExternalIDRequired = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u306E\u5148\u982D\u306B\u306F\"SYSTEM\"\u307E\u305F\u306F\"PUBLIC\"\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \"PUBLIC\"\u3068\u516C\u958B\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        ExternalIDRequired = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u306E\u5148\u982D\u306B\u306F"SYSTEM"\u307E\u305F\u306F"PUBLIC"\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC"\u3068\u516C\u958B\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u516C\u958B\u8B58\u5225\u5B50\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \"SYSTEM\"\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_URI_FRAGMENT_IN_SYSTEMID = \u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8B58\u5225\u5B50\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\"{0}\"\u306E\u4E00\u90E8\u3068\u3057\u3066\u6307\u5B9A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM"\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = \u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8B58\u5225\u5B50\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50"{0}"\u306E\u4E00\u90E8\u3068\u3057\u3066\u6307\u5B9A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u306F\u3001\u8868\u8A18\u540D"{0}"\u306E\u5F8C\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        ExternalIDorPublicIDRequired = \u8868\u8A18\u6CD5"{0}"\u306E\u5BA3\u8A00\u306B\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u307E\u305F\u306F\u516C\u958B\u8B58\u5225\u5B50\u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        NotationDeclUnterminated = \u8868\u8A18\u6CD5"{0}"\u306E\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         
- # Validation messages
--        DuplicateTypeInMixedContent = \u8981\u7D20\u30BF\u30A4\u30D7\"{1}\"\u306F\u3001\u8981\u7D20\u5BA3\u8A00\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
--        ENTITIESInvalid = \u30BF\u30A4\u30D7ENTITIES\u306E\u5C5E\u6027\u5024\"{1}\"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        ENTITYInvalid = \u30BF\u30A4\u30D7ENTITY\u306E\u5C5E\u6027\u5024\"{1}\"\u306F\u3001\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDDefaultTypeInvalid = ID\u5C5E\u6027\"{0}\"\u306B\u306F\u3001\"#IMPLIED\"\u307E\u305F\u306F\"#REQUIRED\"\u306E\u5BA3\u8A00\u6E08\u30C7\u30D5\u30A9\u30EB\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDInvalid = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024\"{0}\"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDNotUnique = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDREFInvalid = \u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDREFInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024\"{0}\"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        IDREFSInvalid = \u30BF\u30A4\u30D7IDREFS\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u304C\u5B8C\u5168\u306A\u5BA3\u8A00\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        ImproperDeclarationNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        ImproperGroupNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u4E38\u30AB\u30C3\u30B3\u306E\u30DA\u30A2\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        INVALID_PE_IN_CONDITIONAL = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304B\u3001INCLUDE\u307E\u305F\u306FIGNORE\u306E\u307F\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_ATTRIBUTE_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u5BFE\u3057\u3066\u5C5E\u6027\"{1}\"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5024\"{1}\"\u3092\u6301\u3064\u5C5E\u6027\"{0}\"\u306B\u306F\u3001\u30EA\u30B9\u30C8\"{2}\"\u304B\u3089\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5C5E\u6027\"{0}\"\u306E\u5024\"{1}\"\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6B63\u898F\u5316\u306B\u3088\u3063\u3066(\"{2}\"\u306B)\u5909\u66F4\u3055\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_CONTENT_INCOMPLETE = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u4E0D\u5B8C\u5168\u3067\u3059\u3002\"{1}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_CONTENT_INVALID = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\"{1}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_CONTENT_INVALID_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\"{1}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7\"{2}\"\u306E\u5B50\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5C5E\u6027\"{1}\"\u306F\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u6301\u3061\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_DUPLICATE_ATTDEF = \u5C5E\u6027\"{1}\"\u306F\u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002
--        MSG_ELEMENT_ALREADY_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306F\u8907\u6570\u56DE\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
--        MSG_ELEMENT_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_GRAMMAR_NOT_FOUND = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u7121\u52B9\u3067\u3059\u3002\u69CB\u6587\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
--        MSG_ELEMENT_WITH_ID_REQUIRED = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u8B58\u5225\u5B50\"{0}\"\u3092\u6301\u3064\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        MSG_FIXED_ATTVALUE_INVALID = \u5024\"{2}\"\u3092\u6301\u3064\u5C5E\u6027\"{1}\"\u306B\u306F\u3001\"{3}\"\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u306F\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\"{1}\"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\"{2}\"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027\"{1}\"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027\"{2}\"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5C5E\u6027\"{0}\"\u306E\u8868\u8A18\u6CD5\u30BF\u30A4\u30D7\u30FB\u30EA\u30B9\u30C8\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5\"{1}\"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \"{0}\"\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5\"{1}\"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5C5E\u6027\"{1}\"\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u306E\u5C5E\u6027\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u5BFE\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        DuplicateTypeInMixedContent = \u8981\u7D20\u30BF\u30A4\u30D7"{1}"\u306F\u3001\u8981\u7D20\u5BA3\u8A00"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-+        ENTITIESInvalid = \u30BF\u30A4\u30D7ENTITIES\u306E\u5C5E\u6027\u5024"{1}"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ENTITYInvalid = \u30BF\u30A4\u30D7ENTITY\u306E\u5C5E\u6027\u5024"{1}"\u306F\u3001\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDDefaultTypeInvalid = ID\u5C5E\u6027"{0}"\u306B\u306F\u3001"#IMPLIED"\u307E\u305F\u306F"#REQUIRED"\u306E\u5BA3\u8A00\u6E08\u30C7\u30D5\u30A9\u30EB\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDInvalid = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024"{0}"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDNotUnique = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDREFInvalid = \u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDREFInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024"{0}"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        IDREFSInvalid = \u30BF\u30A4\u30D7IDREFS\u306E\u5C5E\u6027\u5024"{0}"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u304C\u5B8C\u5168\u306A\u5BA3\u8A00\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ImproperDeclarationNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        ImproperGroupNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u4E38\u30AB\u30C3\u30B3\u306E\u30DA\u30A2\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        INVALID_PE_IN_CONDITIONAL = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304B\u3001INCLUDE\u307E\u305F\u306FIGNORE\u306E\u307F\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_ATTRIBUTE_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u5BFE\u3057\u3066\u5C5E\u6027"{1}"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5024"{1}"\u3092\u6301\u3064\u5C5E\u6027"{0}"\u306B\u306F\u3001\u30EA\u30B9\u30C8"{2}"\u304B\u3089\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5C5E\u6027"{0}"\u306E\u5024"{1}"\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6B63\u898F\u5316\u306B\u3088\u3063\u3066("{2}"\u306B)\u5909\u66F4\u3055\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_CONTENT_INCOMPLETE = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u4E0D\u5B8C\u5168\u3067\u3059\u3002"{1}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_CONTENT_INVALID = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F"{1}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_CONTENT_INVALID_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F"{1}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7"{2}"\u306E\u5B50\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5C5E\u6027"{1}"\u306F\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u6301\u3061\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_DUPLICATE_ATTDEF = \u5C5E\u6027"{1}"\u306F\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-+        MSG_ELEMENT_ALREADY_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306F\u8907\u6570\u56DE\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
-+        MSG_ELEMENT_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_GRAMMAR_NOT_FOUND = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u7121\u52B9\u3067\u3059: \u69CB\u6587\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-+        MSG_ELEMENT_WITH_ID_REQUIRED = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u8B58\u5225\u5B50"{0}"\u3092\u6301\u3064\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        MSG_FIXED_ATTVALUE_INVALID = \u5024"{2}"\u3092\u6301\u3064\u5C5E\u6027"{1}"\u306B\u306F\u3001"{3}"\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u306F\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027"{1}"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027"{2}"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027"{1}"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027"{2}"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5C5E\u6027"{0}"\u306E\u8868\u8A18\u6CD5\u30BF\u30A4\u30D7\u30FB\u30EA\u30B9\u30C8\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5"{1}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = "{0}"\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5"{1}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5C5E\u6027"{1}"\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u306E\u5C5E\u6027\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u5BFE\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u3001\u8981\u7D20\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u6301\u3064\u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u5BA3\u8A00\u3055\u308C\u308B\u8981\u7D20\u9593\u306B\u7A7A\u767D\u306F\u4E0D\u8981\u3067\u3059\u3002
--        NMTOKENInvalid = \u30BF\u30A4\u30D7NMTOKEN\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        NMTOKENSInvalid = \u30BF\u30A4\u30D7NMTOKENS\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        NoNotationOnEmptyElement = EMPTY\u3068\u5BA3\u8A00\u3055\u308C\u305F\u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u3067\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027\"{1}\"\u3092\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093\u3002
--        RootElementTypeMustMatchDoctypedecl = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EB\u30FC\u30C8\u8981\u7D20\"{1}\"\u306FDOCTYPE\u30EB\u30FC\u30C8\"{0}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
--        UndeclaredElementInContentSpec = \u8981\u7D20\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u672A\u5BA3\u8A00\u306E\u8981\u7D20\"{1}\"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002
--        UniqueNotationName = \u8868\u8A18\u6CD5\"{0}\"\u306E\u5BA3\u8A00\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u540C\u3058\u540D\u524D\u3092\u8907\u6570\u306E\u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
-+        NMTOKENInvalid = \u30BF\u30A4\u30D7NMTOKEN\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        NMTOKENSInvalid = \u30BF\u30A4\u30D7NMTOKENS\u306E\u5C5E\u6027\u5024"{0}"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        NoNotationOnEmptyElement = EMPTY\u3068\u5BA3\u8A00\u3055\u308C\u305F\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u3067\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027"{1}"\u3092\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093\u3002
-+        RootElementTypeMustMatchDoctypedecl = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EB\u30FC\u30C8\u8981\u7D20"{1}"\u306FDOCTYPE\u30EB\u30FC\u30C8"{0}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-+        UndeclaredElementInContentSpec = \u8981\u7D20"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u672A\u5BA3\u8A00\u306E\u8981\u7D20"{1}"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-+        UniqueNotationName = \u8868\u8A18\u6CD5"{0}"\u306E\u5BA3\u8A00\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u540C\u3058\u540D\u524D\u3092\u8907\u6570\u306E\u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype\u30D0\u30EA\u30C7\u30FC\u30BF: \u6709\u52B9\u306A\u69CB\u6587\u53C2\u7167\u306B\u3088\u308B\u521D\u671F\u5316\u30E1\u30BD\u30C3\u30C9\u306E\u547C\u51FA\u3057\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 \t
--        ENTITYNotUnparsed = ENTITY \"{0}\"\u306F\u672A\u89E3\u6790\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
--        ENTITYNotValid = ENTITY \"{0}\"\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-+        ENTITYNotUnparsed = ENTITY "{0}"\u306F\u672A\u89E3\u6790\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-+        ENTITYNotValid = ENTITY "{0}"\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-         EmptyList = \u30BF\u30A4\u30D7ENTITIES\u3001IDREFS\u304A\u3088\u3073NMTOKENS\u306E\u5024\u306F\u7A7A\u306E\u30EA\u30B9\u30C8\u306B\u3067\u304D\u307E\u305B\u3093\u3002
+   G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy();
+@@ -2011,10 +2006,9 @@
+ 
+   if (VerifyDuringGC) {
+     HandleMark hm;  // handle scope
+-    gclog_or_tty->print(" VerifyDuringGC:(after)");
+     Universe::heap()->prepare_for_verify();
+-    Universe::verify(/* silent */ false,
+-                     /* option */ VerifyOption_G1UsePrevMarking);
++    Universe::verify(VerifyOption_G1UsePrevMarking,
++                     " VerifyDuringGC:(after)");
+   }
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"&{0};\"\u306F\u3001\u5C5E\u6027\u5024\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u306F\u3001\u5C5E\u6027\u5024\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        AccessExternalDTD = \u5916\u90E8DTD: accessExternalDTD\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8DTD ''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-+        AccessExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: accessExternalDTD\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
+   g1h->verify_region_sets_optional();
+@@ -2412,10 +2406,9 @@
+     assert(!rp->discovery_enabled(), "Post condition");
+   }
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        ReferenceToUnparsedEntity = \u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"&{0};\"\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        RecursiveReference = \u518D\u5E30\u7684\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"{0}\"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
--        RecursiveGeneralReference = \u518D\u5E30\u7684\u306A\u4E00\u822C\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"&{0};\"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
--        RecursivePEReference = \u518D\u5E30\u7684\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"%{0};\"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
-+        EntityNotDeclared = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        ReferenceToUnparsedEntity = \u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        RecursiveReference = \u518D\u5E30\u7684\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"{0}"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
-+        RecursiveGeneralReference = \u518D\u5E30\u7684\u306A\u4E00\u822C\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
-+        RecursivePEReference = \u518D\u5E30\u7684\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\"{0}\"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        EncodingNotSupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-         EncodingRequired = \u30A8\u30F3\u30B3\u30FC\u30C9\u304CUTF-8\u3068UTF-16\u306E\u3044\u305A\u308C\u3067\u3082\u306A\u3044\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = \u8981\u7D20\u307E\u305F\u306F\u5C5E\u6027\u304CQName\u751F\u6210\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: QName::=(NCName':')?NCName\u3002 
--        ElementXMLNSPrefix = \u8981\u7D20\"{0}\"\u306E\u63A5\u982D\u8F9E\u3068\u3057\u3066\"xmlns\"\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
--        ElementPrefixUnbound = \u8981\u7D20\"{1}\"\u306E\u63A5\u982D\u8F9E\"{0}\"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        AttributePrefixUnbound = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306E\u63A5\u982D\u8F9E\"{2}\"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
--        EmptyPrefixedAttName = \u5C5E\u6027\"{0}\"\u306E\u5024\u304C\u7121\u52B9\u3067\u3059\u3002\u63A5\u982D\u8F9E\u306E\u4ED8\u3044\u305F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093\u3002
--        PrefixDeclared = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306E\u63A5\u982D\u8F9E\"{0}\"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        ElementXMLNSPrefix = \u8981\u7D20"{0}"\u306E\u63A5\u982D\u8F9E\u3068\u3057\u3066"xmlns"\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-+        ElementPrefixUnbound = \u8981\u7D20"{1}"\u306E\u63A5\u982D\u8F9E"{0}"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        AttributePrefixUnbound = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306E\u63A5\u982D\u8F9E"{2}"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-+        EmptyPrefixedAttName = \u5C5E\u6027"{0}"\u306E\u5024\u304C\u7121\u52B9\u3067\u3059\u3002\u63A5\u982D\u8F9E\u306E\u4ED8\u3044\u305F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093\u3002
-+        PrefixDeclared = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306E\u63A5\u982D\u8F9E"{0}"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-         CantBindXMLNS = \u63A5\u982D\u8F9E"xmlns"\u306F\u3001\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u660E\u793A\u7684\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002\u307E\u305F\u3001"xmlns"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3082\u3001\u63A5\u982D\u8F9E\u306B\u660E\u793A\u7684\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002
-         CantBindXML = \u63A5\u982D\u8F9E"xml"\u306F\u3001\u901A\u5E38\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u4EE5\u5916\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002\u307E\u305F\u3001"xml"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3082\u3001"xml"\u4EE5\u5916\u306E\u63A5\u982D\u8F9E\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002
--        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027\"{0}\"\u306EdefaultValue \"{1}\"\u306F\u3001\u3053\u306E\u5C5E\u6027\u30BF\u30A4\u30D7\u306E\u5B57\u53E5\u5236\u7D04\u306B\u95A2\u3057\u3066\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-+        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027"{0}"\u306EdefaultValue "{1}"\u306F\u3001\u3053\u306E\u5C5E\u6027\u30BF\u30A4\u30D7\u306E\u5B57\u53E5\u5236\u7D04\u306B\u95A2\u3057\u3066\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+-  // Now clean up stale oops in StringTable
+-  StringTable::unlink(&g1_is_alive);
+-  // Clean up unreferenced symbols in symbol table.
+-  SymbolTable::unlink();
++  g1h->unlink_string_and_symbol_table(&g1_is_alive,
++                                      /* process_strings */ false, // currently strings are always roots
++                                      /* process_symbols */ true);
+ }
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +317,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+ void ConcurrentMark::swapMarkBitMaps() {
+@@ -4396,7 +4389,8 @@
+     _total_used_bytes(0), _total_capacity_bytes(0),
+     _total_prev_live_bytes(0), _total_next_live_bytes(0),
+     _hum_used_bytes(0), _hum_capacity_bytes(0),
+-    _hum_prev_live_bytes(0), _hum_next_live_bytes(0) {
++    _hum_prev_live_bytes(0), _hum_next_live_bytes(0),
++    _total_remset_bytes(0), _total_strong_code_roots_bytes(0) {
+   G1CollectedHeap* g1h = G1CollectedHeap::heap();
+   MemRegion g1_committed = g1h->g1_committed();
+   MemRegion g1_reserved = g1h->g1_reserved();
+@@ -4414,23 +4408,29 @@
+                  HeapRegion::GrainBytes);
+   _out->print_cr(G1PPRL_LINE_PREFIX);
+   _out->print_cr(G1PPRL_LINE_PREFIX
+-                 G1PPRL_TYPE_H_FORMAT
+-                 G1PPRL_ADDR_BASE_H_FORMAT
+-                 G1PPRL_BYTE_H_FORMAT
+-                 G1PPRL_BYTE_H_FORMAT
+-                 G1PPRL_BYTE_H_FORMAT
+-                 G1PPRL_DOUBLE_H_FORMAT,
+-                 "type", "address-range",
+-                 "used", "prev-live", "next-live", "gc-eff");
++                G1PPRL_TYPE_H_FORMAT
++                G1PPRL_ADDR_BASE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_DOUBLE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT,
++                "type", "address-range",
++                "used", "prev-live", "next-live", "gc-eff",
++                "remset", "code-roots");
+   _out->print_cr(G1PPRL_LINE_PREFIX
+-                 G1PPRL_TYPE_H_FORMAT
+-                 G1PPRL_ADDR_BASE_H_FORMAT
+-                 G1PPRL_BYTE_H_FORMAT
+-                 G1PPRL_BYTE_H_FORMAT
+-                 G1PPRL_BYTE_H_FORMAT
+-                 G1PPRL_DOUBLE_H_FORMAT,
+-                 "", "",
+-                 "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)");
++                G1PPRL_TYPE_H_FORMAT
++                G1PPRL_ADDR_BASE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_DOUBLE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT
++                G1PPRL_BYTE_H_FORMAT,
++                "", "",
++                "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)",
++                "(bytes)", "(bytes)");
+ }
  
+ // It takes as a parameter a reference to one of the _hum_* fields, it
+@@ -4472,6 +4472,9 @@
+   size_t prev_live_bytes = r->live_bytes();
+   size_t next_live_bytes = r->next_live_bytes();
+   double gc_eff          = r->gc_efficiency();
++  size_t remset_bytes    = r->rem_set()->mem_size();
++  size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size();
++
+   if (r->used() == 0) {
+     type = "FREE";
+   } else if (r->is_survivor()) {
+@@ -4505,6 +4508,8 @@
+   _total_capacity_bytes  += capacity_bytes;
+   _total_prev_live_bytes += prev_live_bytes;
+   _total_next_live_bytes += next_live_bytes;
++  _total_remset_bytes    += remset_bytes;
++  _total_strong_code_roots_bytes += strong_code_roots_bytes;
+ 
+   // Print a line for this particular region.
+   _out->print_cr(G1PPRL_LINE_PREFIX
+@@ -4513,14 +4518,19 @@
+                  G1PPRL_BYTE_FORMAT
+                  G1PPRL_BYTE_FORMAT
+                  G1PPRL_BYTE_FORMAT
+-                 G1PPRL_DOUBLE_FORMAT,
++                 G1PPRL_DOUBLE_FORMAT
++                 G1PPRL_BYTE_FORMAT
++                 G1PPRL_BYTE_FORMAT,
+                  type, bottom, end,
+-                 used_bytes, prev_live_bytes, next_live_bytes, gc_eff);
++                 used_bytes, prev_live_bytes, next_live_bytes, gc_eff,
++                 remset_bytes, strong_code_roots_bytes);
+ 
+   return false;
+ }
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=\u30D1\u30FC\u30B5\u30FC\u306B\u3088\u3063\u3066\u3001\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\"{0}\"\u3092\u8D85\u3048\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u62E1\u5F35\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: \u30D1\u30FC\u30B5\u30FC\u306B\u3088\u3063\u3066\u3001\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067"{0}"\u3092\u8D85\u3048\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u62E1\u5F35\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u3001JDK\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
-+        ElementAttributeLimit=JAXP00010002: \u8981\u7D20"{0}"\u306B"{1}"\u3092\u8D85\u3048\u308B\u5C5E\u6027\u304C\u5B58\u5728\u3057\u307E\u3059\u3002"{1}"\u306F\u3001JDK\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
-+        MaxEntitySizeLimit=JAXP00010003: \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u9577\u3055\u306F"{1}"\u3067\u3001"{3}"\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650"{2}"\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002
-+        TotalEntitySizeLimit=JAXP00010004: \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7D2F\u7A4D\u30B5\u30A4\u30BA"{0}"\u306F\u3001"{2}"\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650"{1}"\u3092\u8D85\u3048\u307E\u3057\u305F\u3002
-+        MaxXMLNameLimit=JAXP00010005: \u540D\u524D"{0}"\u306F\u3001"{2}"\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650"{1}"\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002
+ G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() {
++  // add static memory usages to remembered set sizes
++  _total_remset_bytes += HeapRegionRemSet::fl_mem_size() + HeapRegionRemSet::static_mem_size();
+   // Print the footer of the output.
+   _out->print_cr(G1PPRL_LINE_PREFIX);
+   _out->print_cr(G1PPRL_LINE_PREFIX
+@@ -4528,13 +4538,17 @@
+                  G1PPRL_SUM_MB_FORMAT("capacity")
+                  G1PPRL_SUM_MB_PERC_FORMAT("used")
+                  G1PPRL_SUM_MB_PERC_FORMAT("prev-live")
+-                 G1PPRL_SUM_MB_PERC_FORMAT("next-live"),
++                 G1PPRL_SUM_MB_PERC_FORMAT("next-live")
++                 G1PPRL_SUM_MB_FORMAT("remset")
++                 G1PPRL_SUM_MB_FORMAT("code-roots"),
+                  bytes_to_mb(_total_capacity_bytes),
+                  bytes_to_mb(_total_used_bytes),
+                  perc(_total_used_bytes, _total_capacity_bytes),
+                  bytes_to_mb(_total_prev_live_bytes),
+                  perc(_total_prev_live_bytes, _total_capacity_bytes),
+                  bytes_to_mb(_total_next_live_bytes),
+-                 perc(_total_next_live_bytes, _total_capacity_bytes));
++                 perc(_total_next_live_bytes, _total_capacity_bytes),
++                 bytes_to_mb(_total_remset_bytes),
++                 bytes_to_mb(_total_strong_code_roots_bytes));
+   _out->cr();
+ }
+--- ./hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -1224,6 +1224,12 @@
+   size_t _hum_prev_live_bytes;
+   size_t _hum_next_live_bytes;
+ 
++  // Accumulator for the remembered set size
++  size_t _total_remset_bytes;
++
++  // Accumulator for strong code roots memory size
++  size_t _total_strong_code_roots_bytes;
++
+   static double perc(size_t val, size_t total) {
+     if (total == 0) {
+       return 0.0;
+--- ./hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp	2013-09-06 11:22:10.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -81,7 +81,7 @@
+                                          size_t* marked_bytes_array,
+                                          BitMap* task_card_bm) {
+   G1CollectedHeap* g1h = _g1h;
+-  CardTableModRefBS* ct_bs = (CardTableModRefBS*) (g1h->barrier_set());
++  CardTableModRefBS* ct_bs = g1h->g1_barrier_set();
+ 
+   HeapWord* start = mr.start();
+   HeapWord* end = mr.end();
+--- ./hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	2013-09-06 11:22:11.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -65,9 +65,7 @@
+     // threshold limit is no more than this.
+     guarantee(G1ConcRSHotCardLimit <= max_jubyte, "sanity");
+ 
+-    ModRefBarrierSet* bs = _g1h->mr_bs();
+-    guarantee(bs->is_a(BarrierSet::CardTableModRef), "Precondition");
+-    _ct_bs = (CardTableModRefBS*)bs;
++    _ct_bs = _g1h->g1_barrier_set();
+     _ct_bot = _ct_bs->byte_for_const(_g1h->reserved_region().start());
+ 
+     // Allocate/Reserve the counts table
+--- ./hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2013-09-06 11:22:11.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	2014-06-06 19:56:20.000000000 -0700
+@@ -23,6 +23,7 @@
+  */
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= \u8981\u7D20\"{0}\"\u306B\"{1}\"\u3092\u8D85\u3048\u308B\u5C5E\u6027\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\"{1}\"\u306F\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
+ #include "precompiled.hpp"
++#include "code/codeCache.hpp"
+ #include "code/icBuffer.hpp"
+ #include "gc_implementation/g1/bufferingOopClosure.hpp"
+ #include "gc_implementation/g1/concurrentG1Refine.hpp"
+@@ -56,6 +57,7 @@
+ #include "oops/oop.pcgc.inline.hpp"
+ #include "runtime/aprofiler.hpp"
+ #include "runtime/vmThread.hpp"
++#include "utilities/ticks.hpp"
+ 
+ size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
+ 
+@@ -125,10 +127,8 @@
+   int _histo[256];
+ public:
+   ClearLoggedCardTableEntryClosure() :
+-    _calls(0)
++    _calls(0), _g1h(G1CollectedHeap::heap()), _ctbs(_g1h->g1_barrier_set())
+   {
+-    _g1h = G1CollectedHeap::heap();
+-    _ctbs = (CardTableModRefBS*)_g1h->barrier_set();
+     for (int i = 0; i < 256; i++) _histo[i] = 0;
+   }
+   bool do_card_ptr(jbyte* card_ptr, int worker_i) {
+@@ -158,11 +158,8 @@
+   CardTableModRefBS* _ctbs;
+ public:
+   RedirtyLoggedCardTableEntryClosure() :
+-    _calls(0)
+-  {
+-    _g1h = G1CollectedHeap::heap();
+-    _ctbs = (CardTableModRefBS*)_g1h->barrier_set();
+-  }
++    _calls(0), _g1h(G1CollectedHeap::heap()), _ctbs(_g1h->g1_barrier_set()) {}
++
+   bool do_card_ptr(jbyte* card_ptr, int worker_i) {
+     if (_g1h->is_in_reserved(_ctbs->addr_for(card_ptr))) {
+       _calls++;
+@@ -477,7 +474,7 @@
+ 
+ void G1CollectedHeap::check_ct_logs_at_safepoint() {
+   DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
+-  CardTableModRefBS* ct_bs = (CardTableModRefBS*)barrier_set();
++  CardTableModRefBS* ct_bs = g1_barrier_set();
+ 
+   // Count the dirty cards at the start.
+   CountNonCleanMemRegionClosure count1(this);
+@@ -1158,26 +1155,33 @@
+   ModRefBarrierSet* _mr_bs;
+ public:
+   PostMCRemSetClearClosure(G1CollectedHeap* g1h, ModRefBarrierSet* mr_bs) :
+-    _g1h(g1h), _mr_bs(mr_bs) { }
++    _g1h(g1h), _mr_bs(mr_bs) {}
++
+   bool doHeapRegion(HeapRegion* r) {
++    HeapRegionRemSet* hrrs = r->rem_set();
++
+     if (r->continuesHumongous()) {
++      // We'll assert that the strong code root list and RSet is empty
++      assert(hrrs->strong_code_roots_list_length() == 0, "sanity");
++      assert(hrrs->occupied() == 0, "RSet should be empty");
+       return false;
+     }
++
+     _g1h->reset_gc_time_stamps(r);
+-    HeapRegionRemSet* hrrs = r->rem_set();
+-    if (hrrs != NULL) hrrs->clear();
++    hrrs->clear();
+     // You might think here that we could clear just the cards
+     // corresponding to the used region.  But no: if we leave a dirty card
+     // in a region we might allocate into, then it would prevent that card
+     // from being enqueued, and cause it to be missed.
+     // Re: the performance cost: we shouldn't be doing full GC anyway!
+     _mr_bs->clear(MemRegion(r->bottom(), r->end()));
++
+     return false;
+   }
+ };
+ 
+ void G1CollectedHeap::clear_rsets_post_compaction() {
+-  PostMCRemSetClearClosure rs_clear(this, mr_bs());
++  PostMCRemSetClearClosure rs_clear(this, g1_barrier_set());
+   heap_region_iterate(&rs_clear);
+ }
+ 
+@@ -1251,31 +1255,6 @@
+   heap_region_iterate(&cl);
+ }
+ 
+-double G1CollectedHeap::verify(bool guard, const char* msg) {
+-  double verify_time_ms = 0.0;
 -
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+-  if (guard && total_collections() >= VerifyGCStartAt) {
+-    double verify_start = os::elapsedTime();
+-    HandleMark hm;  // Discard invalid handles created during verification
+-    gclog_or_tty->print(msg);
+-    prepare_for_verify();
+-    Universe::verify(false /* silent */, VerifyOption_G1UsePrevMarking);
+-    verify_time_ms = (os::elapsedTime() - verify_start) * 1000;
+-  }
+-
+-  return verify_time_ms;
+-}
+-
+-void G1CollectedHeap::verify_before_gc() {
+-  double verify_time_ms = verify(VerifyBeforeGC, " VerifyBeforeGC:");
+-  g1_policy()->phase_times()->record_verify_before_time_ms(verify_time_ms);
+-}
+-
+-void G1CollectedHeap::verify_after_gc() {
+-  double verify_time_ms = verify(VerifyAfterGC, " VerifyAfterGC:");
+-  g1_policy()->phase_times()->record_verify_after_time_ms(verify_time_ms);
+-}
+-
+ bool G1CollectedHeap::do_collection(bool explicit_gc,
+                                     bool clear_all_soft_refs,
+                                     size_t word_size) {
+@@ -1286,7 +1265,7 @@
+   }
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = \uBB38\uC11C\uC758 \uD504\uB864\uB85C\uADF8\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-         InvalidCharInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
- # 2.4 Character Data and Markup
--        CDEndInContent = \uBB38\uC790 \uC2DC\uD000\uC2A4 \"]]>\"\uB294 CDATA \uC139\uC158 \uB05D\uC744 \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uB294 \uACBD\uC6B0 \uCF58\uD150\uCE20\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-+        CDEndInContent = \uBB38\uC790 \uC2DC\uD000\uC2A4 "]]>"\uB294 CDATA \uC139\uC158 \uB05D\uC744 \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uB294 \uACBD\uC6B0 \uCF58\uD150\uCE20\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
- # 2.7 CDATA Sections
--        CDSectUnterminated = CDATA \uC139\uC158\uC740 \"]]>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        CDSectUnterminated = CDATA \uC139\uC158\uC740 "]]>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = XML \uC120\uC5B8\uC740 \uBB38\uC11C \uB9E8 \uC55E\uC5D0\uB9CC \uB098\uD0C0\uB0A0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
--        EqRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 \"{0}\" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        QuoteRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C \"{0}\" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        XMLDeclUnterminated = XML \uC120\uC5B8\uC740 \"?>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        EqRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 "{0}" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
-+        QuoteRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C "{0}" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        XMLDeclUnterminated = XML \uC120\uC5B8\uC740 "?>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         VersionInfoRequired = XML \uC120\uC5B8\uC5D0\uB294 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-         SpaceRequiredBeforeVersionInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 \uBC84\uC804 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-         SpaceRequiredBeforeEncodingInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 \uC778\uCF54\uB529 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-@@ -71,70 +68,71 @@
-         ReferenceIllegalInTrailingMisc=\uD6C4\uD589 \uC139\uC158\uC5D0\uC11C\uB294 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = \uB3C5\uB9BD\uD615 \uBB38\uC11C \uC120\uC5B8 \uAC12\uC740 \"{0}\"\uC774(\uAC00) \uC544\uB2CC \"yes\" \uB610\uB294 \"no\"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-+        SDDeclInvalid = \uB3C5\uB9BD\uD615 \uBB38\uC11C \uC120\uC5B8 \uAC12\uC740 "{0}"\uC774(\uAC00) \uC544\uB2CC "yes" \uB610\uB294 "no"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-+        SDDeclNameInvalid = XML \uC120\uC5B8\uC758 \uB3C5\uB9BD\uD615 \uC774\uB984\uC758 \uCCA0\uC790\uAC00 \uC798\uBABB\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
- # 2.12 Language Identification
--        XMLLangInvalid = xml:lang \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC5B8\uC5B4 \uC2DD\uBCC4\uC790\uC785\uB2C8\uB2E4.
-+        XMLLangInvalid = xml:lang \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC5B8\uC5B4 \uC2DD\uBCC4\uC790\uC785\uB2C8\uB2E4.
- # 3. Logical Structures
--        ETagRequired = \uC694\uC18C \uC720\uD615 \"{0}\"\uC740(\uB294) \uC9DD\uC774 \uB9DE\uB294 \uC885\uB8CC \uD0DC\uADF8 \"\"(\uC73C)\uB85C \uC885\uB8CC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        ETagRequired = \uC694\uC18C \uC720\uD615 "{0}"\uC740(\uB294) \uC9DD\uC774 \uB9DE\uB294 \uC885\uB8CC \uD0DC\uADF8 ""(\uC73C)\uB85C \uC885\uB8CC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = \uC694\uC18C \uC720\uD615 \"{0}\" \uB2E4\uC74C\uC5D0\uB294 \uC18D\uC131 \uC0AC\uC591 \">\" \uB610\uB294 \"/>\"\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        EqRequiredInAttribute = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \uC18D\uC131 \uC774\uB984 \"{1}\" \uB2E4\uC74C\uC5D0\uB294 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        OpenQuoteExpected = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC5D0\uB294 \uC5EC\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
--        CloseQuoteExpected = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC5D0\uB294 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
--        AttributeNotUnique = \"{1}\" \uC18D\uC131\uC774 \"{0}\" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--        AttributeNSNotUnique = \"{2}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB41C \"{1}\" \uC18D\uC131\uC774 \"{0}\" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--        ETagUnterminated = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \uC885\uB8CC \uD0DC\uADF8\uB294 ''>'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        ElementUnterminated = \uC694\uC18C \uC720\uD615 "{0}" \uB2E4\uC74C\uC5D0\uB294 \uC18D\uC131 \uC0AC\uC591 ">" \uB610\uB294 "/>"\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
-+        EqRequiredInAttribute = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C \uC18D\uC131 \uC774\uB984 "{1}" \uB2E4\uC74C\uC5D0\uB294 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
-+        OpenQuoteExpected = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC5D0\uB294 \uC5EC\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        CloseQuoteExpected = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC5D0\uB294 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        AttributeNotUnique = "{1}" \uC18D\uC131\uC774 "{0}" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-+        AttributeNSNotUnique = "{2}" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB41C "{1}" \uC18D\uC131\uC774 "{0}" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-+        ETagUnterminated = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uC885\uB8CC \uD0DC\uADF8\uB294 ''>'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         MarkupNotRecognizedInContent = \uC694\uC18C \uCF58\uD150\uCE20\uB294 \uC62C\uBC14\uB978 \uD615\uC2DD\uC758 \uBB38\uC790 \uB370\uC774\uD130 \uB610\uB294 \uB9C8\uD06C\uC5C5\uC73C\uB85C \uAD6C\uC131\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-         DoctypeIllegalInContent = \uCF58\uD150\uCE20\uC5D0\uC11C\uB294 DOCTYPE\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = \uCC38\uC870\uB294 ';' \uAD6C\uBD84\uC790\uB85C \uC885\uB8CC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = \uCC38\uC870\uB294 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0 \uC644\uC804\uD788 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        ElementEntityMismatch = \"{0}\" \uC694\uC18C\uB294 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC2DC\uC791\uB418\uACE0 \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        ElementEntityMismatch = "{0}" \uC694\uC18C\uB294 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC2DC\uC791\uB418\uACE0 \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         MarkupEntityMismatch=XML \uBB38\uC11C \uAD6C\uC870\uB294 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC2DC\uC791\uB418\uACE0 \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = \"{1}\" \uC18D\uC131\uC758 \uAC12\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{2})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC73C\uBA70 \uC694\uC18C\uAC00 \"{0}\"\uC785\uB2C8\uB2E4.
-+        InvalidCharInAttValue = "{1}" \uC18D\uC131\uC758 \uAC12\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{2})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC73C\uBA70 \uC694\uC18C\uAC00 "{0}"\uC785\uB2C8\uB2E4.
-         InvalidCharInComment = \uC8FC\uC11D\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-         InvalidCharInPI = \uCC98\uB9AC \uBA85\uB839\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-         InvalidCharInInternalSubset = DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-         InvalidCharInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = \"{1}\" \uC18D\uC131\uC758 \uAC12\uC740 \uC791\uC740 \uB530\uC634\uD45C \uB610\uB294 \uD070 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
--        LessthanInAttValue = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC758 \uAC12\uC5D0\uB294 ''<'' \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
--        AttributeValueUnterminated = \"{1}\" \uC18D\uC131\uC758 \uAC12\uC740 \uC9DD\uC774 \uB9DE\uB294 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        QuoteRequiredInAttValue = "{1}" \uC18D\uC131\uC758 \uAC12\uC740 \uC791\uC740 \uB530\uC634\uD45C \uB610\uB294 \uD070 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        LessthanInAttValue = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC758 \uAC12\uC5D0\uB294 ''<'' \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-+        AttributeValueUnterminated = "{1}" \uC18D\uC131\uC758 \uAC12\uC740 \uC9DD\uC774 \uB9DE\uB294 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 2.5 Comments
--        InvalidCommentStart = \uC8FC\uC11D\uC740 \"\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        InvalidCommentStart = \uC8FC\uC11D\uC740 ""\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         COMMENT_NOT_IN_ONE_ENTITY = \uC8FC\uC11D\uC774 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0 \uC548\uC5D0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
- # 2.6 Processing Instructions
-         PITargetRequired = \uCC98\uB9AC \uBA85\uB839\uC740 \uB300\uC0C1 \uC774\uB984\uC73C\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
-         SpaceRequiredInPI = \uCC98\uB9AC \uBA85\uB839 \uB300\uC0C1\uACFC \uB370\uC774\uD130 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
--        PIUnterminated = \uCC98\uB9AC \uBA85\uB839\uC740 \"?>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
--        ReservedPITarget = \"[xX][mM][lL]\"\uACFC \uC77C\uCE58\uD558\uB294 \uCC98\uB9AC \uBA85\uB839 \uB300\uC0C1\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        PIUnterminated = \uCC98\uB9AC \uBA85\uB839\uC740 "?>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        ReservedPITarget = "[xX][mM][lL]"\uACFC \uC77C\uCE58\uD558\uB294 \uCC98\uB9AC \uBA85\uB839 \uB300\uC0C1\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         PI_NOT_IN_ONE_ENTITY = \uCC98\uB9AC \uBA85\uB839\uC774 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0 \uC548\uC5D0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = \"{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uBC84\uC804\uC785\uB2C8\uB2E4.
--        VersionNotSupported = XML \uBC84\uC804 \"{0}\"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
--        VersionNotSupported11 = XML \uBC84\uC804 \"{0}\"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0 \uBC0F XML 1.1\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
-+        VersionInfoInvalid = "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uBC84\uC804\uC785\uB2C8\uB2E4.
-+        VersionNotSupported = XML \uBC84\uC804 "{0}"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
-+        VersionNotSupported11 = XML \uBC84\uC804 "{0}"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0 \uBC0F XML 1.1\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
-         VersionMismatch= \uD558\uB098\uC758 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uC774\uD6C4 \uBC84\uC804\uC758 \uB2E4\uB978 \uC5D4\uD2F0\uD2F0\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 \"&#\" \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC2ED\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        HexdigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 \"&#x\" \uBC14\uB85C \uB2E4\uC74C\uC5D0 16\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
-+        DigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 "&#" \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC2ED\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
-+        HexdigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 "&#x" \uBC14\uB85C \uB2E4\uC74C\uC5D0 16\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
-         SemicolonRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uB294 ';' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
--        InvalidCharRef = \uBB38\uC790 \uCC38\uC870 \"&#{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C XML \uBB38\uC790\uC785\uB2C8\uB2E4.
-+        InvalidCharRef = \uBB38\uC790 \uCC38\uC870 "&#{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C XML \uBB38\uC790\uC785\uB2C8\uB2E4.
-         NameRequiredInReference = \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC5D0\uC11C\uB294 '&' \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC5D4\uD2F0\uD2F0 \uC774\uB984\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        SemicolonRequiredInReference = \"{0}\" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB294 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        SemicolonRequiredInReference = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB294 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uB9E8 \uC55E\uC5D0\uB9CC \uB098\uD0C0\uB0A0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
--        EqRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C\uB294 \"{0}\" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        QuoteRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C \"{0}\" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        CloseQuoteMissingInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C \"{0}\" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC758 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-+        EqRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C\uB294 "{0}" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
-+        QuoteRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C "{0}" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        CloseQuoteMissingInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C "{0}" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC758 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-         SpaceRequiredBeforeVersionInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \uBC84\uC804 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-         SpaceRequiredBeforeEncodingInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \uC778\uCF54\uB529 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
--        TextDeclUnterminated = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \"?>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        TextDeclUnterminated = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 "?>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         EncodingDeclRequired = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uB294 \uC778\uCF54\uB529 \uC120\uC5B8\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-         NoMorePseudoAttributes = \uC758\uC0AC \uC18D\uC131\uC740 \uB354 \uC774\uC0C1 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         MorePseudoAttributes = \uC758\uC0AC \uC18D\uC131\uC774 \uB354 \uD544\uC694\uD569\uB2C8\uB2E4.
-@@ -143,13 +141,13 @@
-         CommentNotInOneEntity = \uC8FC\uC11D\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0 \uC644\uC804\uD788 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-         PINotInOneEntity = \uCC98\uB9AC \uBA85\uB839\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0 \uC644\uC804\uD788 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = \"{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC778\uCF54\uB529 \uC774\uB984\uC785\uB2C8\uB2E4.
--        EncodingByteOrderUnsupported = \"{0}\" \uC778\uCF54\uB529\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C \uBC14\uC774\uD2B8 \uC21C\uC11C\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        EncodingDeclInvalid = "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC778\uCF54\uB529 \uC774\uB984\uC785\uB2C8\uB2E4.
-+        EncodingByteOrderUnsupported = "{0}" \uC778\uCF54\uB529\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C \uBC14\uC774\uD2B8 \uC21C\uC11C\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         InvalidByte = {0}\uC740(\uB294) {1}\uBC14\uC774\uD2B8 UTF-8 \uC2DC\uD000\uC2A4\uC5D0 \uB300\uD574 \uBD80\uC801\uD569\uD55C \uBC14\uC774\uD2B8\uC785\uB2C8\uB2E4.
-         ExpectedByte = {1}\uBC14\uC774\uD2B8 UTF-8 \uC2DC\uD000\uC2A4\uC5D0 \uD544\uC694\uD55C \uBC14\uC774\uD2B8\uB294 {0}\uC785\uB2C8\uB2E4.  
-         InvalidHighSurrogate = UTF-8 \uC2DC\uD000\uC2A4\uC758 \uB192\uC740 \uB300\uB9AC \uBE44\uD2B8\uB294 0x10\uC744 \uCD08\uACFC\uD558\uC9C0 \uC54A\uC544\uC57C \uD558\uC9C0\uB9CC 0x{0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--        OperationNotSupported = {1} \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC740 \"{0}\" \uC791\uC5C5\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        InvalidASCII = \uBC14\uC774\uD2B8 \"{0}\"\uC740(\uB294) (7\uBE44\uD2B8) ASCII \uBB38\uC790 \uC9D1\uD569\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        OperationNotSupported = {1} \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC740 "{0}" \uC791\uC5C5\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        InvalidASCII = \uBC14\uC774\uD2B8 "{0}"\uC740(\uB294) (7\uBE44\uD2B8) ASCII \uBB38\uC790 \uC9D1\uD569\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         CharConversionFailure = \uD2B9\uC815 \uC778\uCF54\uB529 \uD615\uC2DD\uC774\uC5B4\uC57C \uD558\uB294 \uAC83\uC73C\uB85C \uD655\uC778\uB41C \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uD574\uB2F9 \uC778\uCF54\uB529\uC5D0 \uBD80\uC801\uD569\uD55C \uC2DC\uD000\uC2A4\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-         
- # DTD Messages
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = \uACF5\uC6A9 \uC2DD\uBCC4\uC790\uC5D0\uB294 \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         SpaceRequiredBetweenPublicAndSystem = publicId\uC640 systemId \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
--        PEReferenceWithinMarkup = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"%{0};\"\uC740 DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0 \uC788\uB294 \uB9C8\uD06C\uC5C5 \uC548\uC5D0 \uD45C\uC2DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 "''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        PEReferenceWithinMarkup = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "%{0};"\uC740 DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0 \uC788\uB294 \uB9C8\uD06C\uC5C5 \uC548\uC5D0 \uD45C\uC2DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC744 \uD3EC\uD568\uD558\uAC70\uB098 \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC774 \uAC00\uB9AC\uD0A4\uB294 \uB9C8\uD06C\uC5C5 \uC120\uC5B8\uC740 \uC62C\uBC14\uB978 \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\"\uC5D0 \uB300\uD55C \uC18D\uC131 \uC120\uC5B8\uC740 \"default\" \uBC0F \"preserve\" \uAC12\uB9CC \uAC00\uB2A5\uD55C \uC5F4\uAC70 \uC720\uD615\uC73C\uB85C \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space"\uC5D0 \uB300\uD55C \uC18D\uC131 \uC120\uC5B8\uC740 "default" \uBC0F "preserve" \uAC12\uB9CC \uAC00\uB2A5\uD55C \uC5F4\uAC70 \uC720\uD615\uC73C\uB85C \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \uC694\uC18C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \uC694\uC18C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \uC694\uC18C \uC720\uD615 "{0}" \uB2E4\uC74C\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \uC694\uC18C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \uC694\uC18C \uC720\uD615 "{0}" \uB2E4\uC74C\uC5D0 \uC81C\uC57D \uC870\uAC74\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        ElementDeclUnterminated = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 ''('' \uBB38\uC790 \uB610\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 ''('' \uBB38\uC790 \uB610\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
--        MixedContentUnterminated = \uD558\uC704 \uC694\uC18C \uC720\uD615\uC774 \uC81C\uD55C\uB418\uB294 \uACBD\uC6B0 \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378 \"{0}\"\uC740(\uB294) \")*\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MixedContentUnterminated = \uD558\uC704 \uC694\uC18C \uC720\uD615\uC774 \uC81C\uD55C\uB418\uB294 \uACBD\uC6B0 \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378 "{0}"\uC740(\uB294) ")*"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = attribute-list \uC120\uC5B8\uC5D0\uC11C\uB294 \"\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
--        IgnoreSectUnterminated = \uC81C\uC678\uB41C \uC870\uAC74\uBD80 \uC139\uC158\uC740 \"]]>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        IncludeSectUnterminated = \uD3EC\uD568\uB41C \uC870\uAC74\uBD80 \uC139\uC158\uC740 "]]>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        IgnoreSectUnterminated = \uC81C\uC678\uB41C \uC870\uAC74\uBD80 \uC139\uC158\uC740 "]]>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC5D0\uC11C\uB294 '%' \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC5D4\uD2F0\uD2F0 \uC774\uB984\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
--        SemicolonRequiredInPEReference = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"%{0};\"\uC740 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        SemicolonRequiredInPEReference = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "%{0};"\uC740 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
--	MSG_DUPLICATE_ENTITY_DEFINITION = \"{0}\" \uC5D4\uD2F0\uD2F0\uAC00 \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C\uB294 \uC5D4\uD2F0\uD2F0 \uC774\uB984 "{0}"\uACFC(\uC640) \uC815\uC758 \uC0AC\uC774\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uC11C\uB294 "NDATA"\uC640 \uD45C\uAE30\uBC95 \uC774\uB984 \uC0AC\uC774\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uC11C\uB294 "NDATA" \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uC11C\uB294 "NDATA" \uB2E4\uC74C\uC5D0 \uD45C\uAE30\uBC95 \uC774\uB984\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        EntityDeclUnterminated = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = "{0}" \uC5D4\uD2F0\uD2F0\uAC00 \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.        
- # 4.2.2 External Entities
--        ExternalIDRequired = \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC740 \"SYSTEM\" \uB610\uB294 \"PUBLIC\"\uC73C\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \"PUBLIC\"\uACFC \uACF5\uC6A9 \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        ExternalIDRequired = \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC740 "SYSTEM" \uB610\uB294 "PUBLIC"\uC73C\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC"\uACFC \uACF5\uC6A9 \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \uACF5\uC6A9 \uC2DD\uBCC4\uC790\uC640 \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \"SYSTEM\"\uACFC \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = \uBD80\uBD84 \uC2DD\uBCC4\uC790\uB294 \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \"{0}\"\uC758 \uC77C\uBD80\uB85C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM"\uACFC \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = \uBD80\uBD84 \uC2DD\uBCC4\uC790\uB294 \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 "{0}"\uC758 \uC77C\uBD80\uB85C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C\uB294 \uD45C\uAE30\uBC95 \uC774\uB984 "{0}" \uB2E4\uC74C\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-+        ExternalIDorPublicIDRequired = "{0}" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uB294 \uC2DC\uC2A4\uD15C \uB610\uB294 \uACF5\uC6A9 \uC2DD\uBCC4\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        NotationDeclUnterminated = "{0}" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = \uC694\uC18C \uC720\uD615 \"{1}\"\uC774(\uAC00) \uC694\uC18C \uC120\uC5B8 \"{0}\"\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
--        ENTITIESInvalid = ENTITIES \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{1}\"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uD558\uB098 \uC774\uC0C1\uC758 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        ENTITYInvalid = ENTITY \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{1}\"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        IDDefaultTypeInvalid = ID \uC18D\uC131 \"{0}\"\uC758 \uC120\uC5B8\uB41C \uAE30\uBCF8\uAC12\uC740 \"#IMPLIED\" \uB610\uB294 \"#REQUIRED\"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
--        IDInvalid = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        IDInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        IDNotUnique = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uBB38\uC11C \uB0B4\uC5D0\uC11C \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4.
--        IDREFInvalid = IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        IDREFInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        IDREFSInvalid = IDREFS \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uAC00 \uC804\uCCB4 \uC120\uC5B8\uC73C\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        ImproperDeclarationNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        ImproperGroupNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uAD04\uD638 \uC30D\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        INVALID_PE_IN_CONDITIONAL = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC804\uCCB4 \uC870\uAC74\uBD80 \uC139\uC158\uC774 \uD3EC\uD568\uB418\uAC70\uB098 INCLUDE \uB610\uB294 IGNORE\uB9CC \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        MSG_ATTRIBUTE_NOT_DECLARED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \"{1}\" \uC18D\uC131\uC744 \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \uAC12\uC774 \"{1}\"\uC778 \"{0}\" \uC18D\uC131\uC5D0\uB294 \"{2}\" \uBAA9\uB85D\uC758 \uAC12\uC774 \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \"{0}\" \uC18D\uC131\uC758 \"{1}\" \uAC12\uC740 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C \uC815\uADDC\uD654\uC5D0 \uC758\uD574 \"{2}\"(\uC73C)\uB85C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
--        MSG_CONTENT_INCOMPLETE = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uCF58\uD150\uCE20\uAC00 \uBD88\uC644\uC804\uD569\uB2C8\uB2E4. \uD574\uB2F9 \uCF58\uD150\uCE20\uB294 \"{1}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
--        MSG_CONTENT_INVALID = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uCF58\uD150\uCE20\uB294 \"{1}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
--        MSG_CONTENT_INVALID_SPECIFIED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uCF58\uD150\uCE20\uB294 \"{1}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. \"{2}\" \uC720\uD615\uC758 \uD558\uC704 \uD56D\uBAA9\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \"{1}\" \uC18D\uC131\uC5D0 \uAE30\uBCF8\uAC12\uC774 \uC788\uC73C\uBA70 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        MSG_DUPLICATE_ATTDEF = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \"{1}\" \uC18D\uC131\uC774 \uC774\uBBF8 \uC120\uC5B8\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
--        MSG_ELEMENT_ALREADY_DECLARED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC740(\uB294) \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
--        MSG_ELEMENT_NOT_DECLARED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC744(\uB97C) \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        DuplicateTypeInMixedContent = \uC694\uC18C \uC720\uD615 "{1}"\uC774(\uAC00) \uC694\uC18C \uC120\uC5B8 "{0}"\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-+        ENTITIESInvalid = ENTITIES \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{1}"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uD558\uB098 \uC774\uC0C1\uC758 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        ENTITYInvalid = ENTITY \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{1}"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        IDDefaultTypeInvalid = ID \uC18D\uC131 "{0}"\uC758 \uC120\uC5B8\uB41C \uAE30\uBCF8\uAC12\uC740 "#IMPLIED" \uB610\uB294 "#REQUIRED"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-+        IDInvalid = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        IDInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        IDNotUnique = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uBB38\uC11C \uB0B4\uC5D0\uC11C \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        IDREFInvalid = IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        IDREFInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        IDREFSInvalid = IDREFS \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uAC00 \uC804\uCCB4 \uC120\uC5B8\uC73C\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        ImproperDeclarationNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        ImproperGroupNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uAD04\uD638 \uC30D\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        INVALID_PE_IN_CONDITIONAL = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC804\uCCB4 \uC870\uAC74\uBD80 \uC139\uC158\uC774 \uD3EC\uD568\uB418\uAC70\uB098 INCLUDE \uB610\uB294 IGNORE\uB9CC \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_ATTRIBUTE_NOT_DECLARED = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C "{1}" \uC18D\uC131\uC744 \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \uAC12\uC774 "{1}"\uC778 "{0}" \uC18D\uC131\uC5D0\uB294 "{2}" \uBAA9\uB85D\uC758 \uAC12\uC774 \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = "{0}" \uC18D\uC131\uC758 "{1}" \uAC12\uC740 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C \uC815\uADDC\uD654\uC5D0 \uC758\uD574 "{2}"(\uC73C)\uB85C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_CONTENT_INCOMPLETE = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uCF58\uD150\uCE20\uAC00 \uBD88\uC644\uC804\uD569\uB2C8\uB2E4. \uD574\uB2F9 \uCF58\uD150\uCE20\uB294 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_CONTENT_INVALID = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uCF58\uD150\uCE20\uB294 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_CONTENT_INVALID_SPECIFIED = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uCF58\uD150\uCE20\uB294 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. "{2}" \uC720\uD615\uC758 \uD558\uC704 \uD56D\uBAA9\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C "{1}" \uC18D\uC131\uC5D0 \uAE30\uBCF8\uAC12\uC774 \uC788\uC73C\uBA70 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_DUPLICATE_ATTDEF = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C "{1}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC120\uC5B8\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-+        MSG_ELEMENT_ALREADY_DECLARED = \uC694\uC18C \uC720\uD615 "{0}"\uC740(\uB294) \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_ELEMENT_NOT_DECLARED = \uC694\uC18C \uC720\uD615 "{0}"\uC744(\uB97C) \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
-         MSG_GRAMMAR_NOT_FOUND = \uBB38\uC11C\uAC00 \uBD80\uC801\uD569\uD568: \uBB38\uBC95\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--        MSG_ELEMENT_WITH_ID_REQUIRED = \uC2DD\uBCC4\uC790\uAC00 \"{0}\"\uC778 \uC694\uC18C\uAC00 \uBB38\uC11C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        MSG_FIXED_ATTVALUE_INVALID = \uAC12\uC774 \"{2}\"\uC778 \"{1}\" \uC18D\uC131\uC758 \uAC12\uC740 \"{3}\"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 ID \uC720\uD615\uC758 \"{1}\" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C ID \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 \"{2}\"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 NOTATION \uC720\uD615\uC758 \"{1}\" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C NOTATION \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 \"{2}\"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \"{1}\" \uD45C\uAE30\uBC95\uC740 \"{0}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uD45C\uAE30\uBC95 \uC720\uD615 \uBAA9\uB85D\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \"{1}\" \uD45C\uAE30\uBC95\uC740 \"{0}\"\uC5D0 \uB300\uD574 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC120\uC5B8\uB41C \"{0}\" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \"{1}\" \uC18D\uC131\uC774 \uD544\uC694\uD558\uBA70 \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD574 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_ELEMENT_WITH_ID_REQUIRED = \uC2DD\uBCC4\uC790\uAC00 "{0}"\uC778 \uC694\uC18C\uAC00 \uBB38\uC11C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 "{0}"\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        MSG_FIXED_ATTVALUE_INVALID = \uAC12\uC774 "{2}"\uC778 "{1}" \uC18D\uC131\uC758 \uAC12\uC740 "{3}"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 ID \uC720\uD615\uC758 "{1}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C ID \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 "{2}"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 NOTATION \uC720\uD615\uC758 "{1}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C NOTATION \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 "{2}"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = "{1}" \uD45C\uAE30\uBC95\uC740 "{0}" \uC18D\uC131\uC5D0 \uB300\uD55C \uD45C\uAE30\uBC95 \uC720\uD615 \uBAA9\uB85D\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = "{1}" \uD45C\uAE30\uBC95\uC740 "{0}"\uC5D0 \uB300\uD574 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC120\uC5B8\uB41C "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = "{1}" \uC18D\uC131\uC774 \uD544\uC694\uD558\uBA70 \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD574 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uC694\uC18C \uCF58\uD150\uCE20\uB97C \uAC00\uC9C0\uBA70 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC120\uC5B8\uB41C \uC694\uC18C \uC0AC\uC774\uC5D0 \uACF5\uBC31\uC774 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        NMTOKENInvalid = NMTOKEN \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        NMTOKENSInvalid = NMTOKENS \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
--        NoNotationOnEmptyElement = EMPTY\uB85C \uC120\uC5B8\uB41C \uC694\uC18C \uC720\uD615 \"{0}\"\uC740(\uB294) NOTATION \uC720\uD615\uC758 \"{1}\" \uC18D\uC131\uC744 \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--        RootElementTypeMustMatchDoctypedecl = \uBB38\uC11C \uB8E8\uD2B8 \uC694\uC18C \"{1}\"\uC740(\uB294) DOCTYPE \uB8E8\uD2B8 \"{0}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
--        UndeclaredElementInContentSpec = \"{0}\" \uC694\uC18C\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C \"{1}\"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4.
--        UniqueNotationName = \"{0}\" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC774 \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC81C\uACF5\uB41C \uC774\uB984\uC740 \uB450 \uAC1C \uC774\uC0C1\uC758 \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-+        NMTOKENInvalid = NMTOKEN \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        NMTOKENSInvalid = NMTOKENS \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-+        NoNotationOnEmptyElement = EMPTY\uB85C \uC120\uC5B8\uB41C \uC694\uC18C \uC720\uD615 "{0}"\uC740(\uB294) NOTATION \uC720\uD615\uC758 "{1}" \uC18D\uC131\uC744 \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-+        RootElementTypeMustMatchDoctypedecl = \uBB38\uC11C \uB8E8\uD2B8 \uC694\uC18C "{1}"\uC740(\uB294) DOCTYPE \uB8E8\uD2B8 "{0}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
-+        UndeclaredElementInContentSpec = "{0}" \uC694\uC18C\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C "{1}"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4.
-+        UniqueNotationName = "{0}" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC774 \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC81C\uACF5\uB41C \uC774\uB984\uC740 \uB450 \uAC1C \uC774\uC0C1\uC758 \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype \uAC80\uC99D\uAE30: \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC801\uD569\uD55C \uBB38\uBC95 \uCC38\uC870\uB85C \uCD08\uAE30\uD654 \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD574\uC57C \uD569\uB2C8\uB2E4. \t
--        ENTITYNotUnparsed = ENTITY \"{0}\"\uC758 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
--        ENTITYNotValid = ENTITY \"{0}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-+        ENTITYNotUnparsed = ENTITY "{0}"\uC758 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-+        ENTITYNotValid = ENTITY "{0}"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-         EmptyList = ENTITIES, IDREFS \uBC0F NMTOKENS \uC720\uD615\uC758 \uAC12\uC740 \uBE48 \uBAA9\uB85D\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+   STWGCTimer* gc_timer = G1MarkSweep::gc_timer();
+-  gc_timer->register_gc_start(os::elapsed_counter());
++  gc_timer->register_gc_start();
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = \uC18D\uC131\uAC12\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"&{0};\"\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = \uC18D\uC131\uAC12\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "&{0};"\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        AccessExternalDTD = \uC678\uBD80 DTD: accessExternalDTD \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC678\uBD80 DTD ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-+        AccessExternalEntity = \uC678\uBD80 \uC5D4\uD2F0\uD2F0: accessExternalDTD \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC678\uBD80 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+   SerialOldTracer* gc_tracer = G1MarkSweep::gc_tracer();
+   gc_tracer->report_gc_start(gc_cause(), gc_timer->gc_start());
+@@ -1408,8 +1387,6 @@
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = \"{0}\" \uC5D4\uD2F0\uD2F0\uAC00 \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
--        ReferenceToUnparsedEntity = \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"&{0};\"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
--        RecursiveReference = \"{0}\"\uC740(\uB294) \uC21C\uD658 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
--        RecursiveGeneralReference = \"&{0};\"\uC740 \uC21C\uD658 \uC77C\uBC18 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
--        RecursivePEReference = \"%{0};\"\uC740 \uC21C\uD658 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
-+        EntityNotDeclared = "{0}" \uC5D4\uD2F0\uD2F0\uAC00 \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-+        ReferenceToUnparsedEntity = \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "&{0};"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        RecursiveReference = "{0}"\uC740(\uB294) \uC21C\uD658 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
-+        RecursiveGeneralReference = "&{0};"\uC740 \uC21C\uD658 \uC77C\uBC18 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
-+        RecursivePEReference = "%{0};"\uC740 \uC21C\uD658 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = \"{0}\" \uC778\uCF54\uB529\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-+        EncodingNotSupported = "{0}" \uC778\uCF54\uB529\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-         EncodingRequired = UTF-8 \uB610\uB294 UTF-16\uC73C\uB85C \uC778\uCF54\uB529\uB418\uC9C0 \uC54A\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uC778\uCF54\uB529 \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = \uC694\uC18C \uB610\uB294 \uC18D\uC131\uC774 QName \uC791\uC131\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC74C: QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = \"{0}\" \uC694\uC18C\uC5D0\uB294 \"xmlns\"\uAC00 \uC811\uB450\uC5B4\uB85C \uC0AC\uC6A9\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--        ElementPrefixUnbound = \"{1}\" \uC694\uC18C\uC5D0 \uB300\uD55C \"{0}\" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
--        AttributePrefixUnbound = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC758 \"{2}\" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
--        EmptyPrefixedAttName = \"{0}\" \uC18D\uC131\uC758 \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC811\uB450\uC5B4\uAC00 \uC9C0\uC815\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uBC14\uC778\uB529\uC740 \uBE44\uC6CC \uB458 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--        PrefixDeclared = \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 \"{0}\"\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-+        ElementXMLNSPrefix = "{0}" \uC694\uC18C\uC5D0\uB294 "xmlns"\uAC00 \uC811\uB450\uC5B4\uB85C \uC0AC\uC6A9\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-+        ElementPrefixUnbound = "{1}" \uC694\uC18C\uC5D0 \uB300\uD55C "{0}" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-+        AttributePrefixUnbound = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC758 "{2}" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-+        EmptyPrefixedAttName = "{0}" \uC18D\uC131\uC758 \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC811\uB450\uC5B4\uAC00 \uC9C0\uC815\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uBC14\uC778\uB529\uC740 \uBE44\uC6CC \uB458 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-+        PrefixDeclared = \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 "{0}"\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-         CantBindXMLNS = "xmlns" \uC811\uB450\uC5B4\uB294 \uBA85\uC2DC\uC801\uC73C\uB85C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "xmlns"\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB3C4 \uBA85\uC2DC\uC801\uC73C\uB85C \uC811\uB450\uC5B4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-         CantBindXML = "xml" \uC811\uB450\uC5B4\uB294 \uC77C\uBC18 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC544\uB2CC \uB2E4\uB978 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "xml"\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB3C4 "xml" \uC774\uC678\uC758 \uC811\uB450\uC5B4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--        MSG_ATT_DEFAULT_INVALID = \"{0}\" \uC18D\uC131\uC758 defaultValue \"{1}\"\uC740(\uB294) \uC774 \uC18D\uC131 \uC720\uD615\uC758 \uB809\uC2DC\uCE7C \uC81C\uC57D \uC870\uAC74\uC5D0 \uB300\uD55C \uAC12\uC73C\uB85C \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-+        MSG_ATT_DEFAULT_INVALID = "{0}" \uC18D\uC131\uC758 defaultValue "{1}"\uC740(\uB294) \uC774 \uC18D\uC131 \uC720\uD615\uC758 \uB809\uC2DC\uCE7C \uC81C\uC57D \uC870\uAC74\uC5D0 \uB300\uD55C \uAC12\uC73C\uB85C \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+       MemoryService::track_memory_usage();
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+-      verify_after_gc();
+-
+       assert(!ref_processor_stw()->discovery_enabled(), "Postcondition");
+       ref_processor_stw()->verify_no_references_recorded();
  
+@@ -1482,6 +1459,9 @@
+         heap_region_iterate(&rebuild_rs);
+       }
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=\uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C \"{0}\"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
-+        ElementAttributeLimit=JAXP00010002:  "{0}" \uC694\uC18C\uC5D0 "{1}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
-+        MaxEntitySizeLimit=JAXP00010003: "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uAE38\uC774\uAC00 "{3}"\uC5D0\uC11C \uC124\uC815\uB41C "{2}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{1}"\uC785\uB2C8\uB2E4.
-+        TotalEntitySizeLimit=JAXP00010004: \uC5D4\uD2F0\uD2F0\uC758 \uB204\uC801 \uD06C\uAE30 "{0}"\uC774(\uAC00) "{2}"\uC5D0\uC11C \uC124\uC815\uB41C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.
-+        MaxXMLNameLimit=JAXP00010005: "{0}" \uC774\uB984\uC774 "{2}"\uC5D0\uC11C \uC124\uC815\uB41C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.
++      // Rebuild the strong code root lists for each region
++      rebuild_strong_code_roots();
++
+       if (true) { // FIXME
+         // Ask the permanent generation to adjust size for full collections
+         perm()->compute_new_size();
+@@ -1509,6 +1489,8 @@
+       _hrs.verify_optional();
+       verify_region_sets_optional();
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= \"{0}\" \uC694\uC18C\uC5D0 \"{1}\"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. \"{1}\"\uC740(\uB294) \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
++      verify_after_gc();
++
+       // Start a new incremental collection set for the next pause
+       assert(g1_policy()->collection_set() == NULL, "must be");
+       g1_policy()->start_incremental_cset_building();
+@@ -1546,8 +1528,7 @@
+     post_full_gc_dump(gc_timer);
+   }
+ 
+-  gc_timer->register_gc_end(os::elapsed_counter());
 -
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
++  gc_timer->register_gc_end();
+   gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions());
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = Um caractere XML inv\u00E1lido (Unicode: 0x {0}) foi encontrado no pr\u00F3logo do documento.
-         InvalidCharInXMLDecl = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado na declara\u00E7\u00E3o XML.
- # 2.4 Character Data and Markup
--        CDEndInContent = A sequ\u00EAncia de caracteres \"]]>\" n\u00E3o deve aparecer no conte\u00FAdo, a menos que seja usada para marcar o fim de uma se\u00E7\u00E3o CDATA.
-+        CDEndInContent = A sequ\u00EAncia de caracteres "]]>" n\u00E3o deve aparecer no conte\u00FAdo, a menos que seja usada para marcar o fim de uma se\u00E7\u00E3o CDATA.
- # 2.7 CDATA Sections
--        CDSectUnterminated = A se\u00E7\u00E3o CDATA deve terminar com \"]]>\".
-+        CDSectUnterminated = A se\u00E7\u00E3o CDATA deve terminar com "]]>".
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = A declara\u00E7\u00E3o XML pode aparecer somente bem no in\u00EDcio do documento.
--        EqRequiredInXMLDecl = O caractere '' = '' deve estar ap\u00F3s \"{0}\" na declara\u00E7\u00E3o XML.
--        QuoteRequiredInXMLDecl = O valor ap\u00F3s \"{0}\" na declara\u00E7\u00E3o XML deve ser uma string entre aspas.
--        XMLDeclUnterminated = A declara\u00E7\u00E3o XML deve terminar com \"?>\".
-+        EqRequiredInXMLDecl = O caractere '' = '' deve estar ap\u00F3s "{0}" na declara\u00E7\u00E3o XML.
-+        QuoteRequiredInXMLDecl = O valor ap\u00F3s "{0}" na declara\u00E7\u00E3o XML deve ser uma string entre aspas.
-+        XMLDeclUnterminated = A declara\u00E7\u00E3o XML deve terminar com "?>".
-         VersionInfoRequired = A vers\u00E3o \u00E9 obrigat\u00F3ria na declara\u00E7\u00E3o XML.
-         SpaceRequiredBeforeVersionInXMLDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes do pseudo-atributo da vers\u00E3o na declara\u00E7\u00E3o XML.
-         SpaceRequiredBeforeEncodingInXMLDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes de codificar o pseudo-atributo na declara\u00E7\u00E3o XML.
-@@ -71,85 +68,86 @@
-         ReferenceIllegalInTrailingMisc=A refer\u00EAncia n\u00E3o \u00E9 permitida na se\u00E7\u00E3o \u00E0 esquerda.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = O valor da declara\u00E7\u00E3o do documento stand-alone deve ser \"sim\" ou \"n\u00E3o\", mas n\u00E3o deve ser \"{0}\".
-+        SDDeclInvalid = O valor da declara\u00E7\u00E3o do documento stand-alone deve ser "sim" ou "n\u00E3o", mas n\u00E3o deve ser "{0}".
-+        SDDeclNameInvalid = O nome standalone na declara\u00E7\u00E3o XML pode estar grafado incorretamente.
- # 2.12 Language Identification
--        XMLLangInvalid = O valor do atributo xml:lang \"{0}\" \u00E9 um identificador de idioma inv\u00E1lido.
-+        XMLLangInvalid = O valor do atributo xml:lang "{0}" \u00E9 um identificador de idioma inv\u00E1lido.
- # 3. Logical Structures
--        ETagRequired = O tipo de elemento {0}\" deve ser encerrado pela tag final correspondente \"\".
-+        ETagRequired = O tipo de elemento {0}" deve ser encerrado pela tag final correspondente "".
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = O tipo de elemento \"{0}\" deve ser seguido pelas especifica\u00E7\u00F5es do atributo, \">\" ou \"/>\".
--        EqRequiredInAttribute = O nome do atributo \"{1}\" associado a um tipo de elemento \"{0}\" deve ser seguido do caractere '' = ''.
--        OpenQuoteExpected = S\u00E3o esperadas aspas de abertura para o atributo \"{1}\" associado a um tipo de elemento \"{0}\".
--        CloseQuoteExpected = S\u00E3o esperadas aspas de fechamento para o atributo \"{1}\" associado a um tipo de elemento \"{0}\".
--        AttributeNotUnique = O atributo \"{1}\" j\u00E1 foi especificado para o elemento \"{0}\".
--        AttributeNSNotUnique = O atributo \"{1}\" vinculado ao namespace \"{2}\" j\u00E1 foi especificado para o elemento \"{0}\".
--        ETagUnterminated = A tag final do tipo de elemento \"{0}\" deve terminar com um delimitador ''>".
-+        ElementUnterminated = O tipo de elemento "{0}" deve ser seguido pelas especifica\u00E7\u00F5es do atributo, ">" ou "/>".
-+        EqRequiredInAttribute = O nome do atributo "{1}" associado a um tipo de elemento "{0}" deve ser seguido do caractere '' = ''.
-+        OpenQuoteExpected = S\u00E3o esperadas aspas de abertura para o atributo "{1}" associado a um tipo de elemento "{0}".
-+        CloseQuoteExpected = S\u00E3o esperadas aspas de fechamento para o atributo "{1}" associado a um tipo de elemento "{0}".
-+        AttributeNotUnique = O atributo "{1}" j\u00E1 foi especificado para o elemento "{0}".
-+        AttributeNSNotUnique = O atributo "{1}" vinculado ao namespace "{2}" j\u00E1 foi especificado para o elemento "{0}".
-+        ETagUnterminated = A tag final do tipo de elemento "{0}" deve terminar com um delimitador ''>".
-         MarkupNotRecognizedInContent = O conte\u00FAdo dos elementos deve consistir em dados ou marca\u00E7\u00E3o do caractere correto.
-         DoctypeIllegalInContent = Um DOCTYPE n\u00E3o \u00E9 permitido no conte\u00FAdo.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = A refer\u00EAncia deve ser encerrada por um delimitador ';'.
- # 4.3.2 Well-Formed Parsed Entities
--        ReferenceNotInOneEntity = A refer\u00EAncia deve estar totalmente contida na mesma entidade submetida a parse.
--        ElementEntityMismatch = O elemento \"{0}\" deve come\u00E7ar e terminar com a mesma entidade.
-+        ReferenceNotInOneEntity = A refer\u00EAncia deve estar totalmente contida na mesma entidade submetida a parsing.
-+        ElementEntityMismatch = O elemento "{0}" deve come\u00E7ar e terminar com a mesma entidade.
-         MarkupEntityMismatch=As estruturas do documento XML devem come\u00E7ar e terminar com a mesma entidade.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = Um caractere XML inv\u00E1lido (Unicode: 0x {2}) foi encontrado no valor do atributo \"{1}\" e o elemento \u00E9 \"{0}\".
-+        InvalidCharInAttValue = Um caractere XML inv\u00E1lido (Unicode: 0x {2}) foi encontrado no valor do atributo "{1}" e o elemento \u00E9 "{0}".
-         InvalidCharInComment = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado no coment\u00E1rio.
-         InvalidCharInPI = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado na instru\u00E7\u00E3o de processamento.
-         InvalidCharInInternalSubset = Um caractere XML inv\u00E1lido (Unicode: 0x {0}) foi encontrado no subconjunto interno do DTD.
-         InvalidCharInTextDecl = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado na declara\u00E7\u00E3o de texto.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = O valor do atributo \"{1}\" deve come\u00E7ar com aspas simples ou duplas.
--        LessthanInAttValue = O valor do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00E3o deve conter o caractere ''<''.
--        AttributeValueUnterminated = O valor do atributo \"{1}\" deve terminar com as aspas correspondentes.
-+        QuoteRequiredInAttValue = O valor do atributo "{1}" deve come\u00E7ar com aspas simples ou duplas.
-+        LessthanInAttValue = O valor do atributo "{1}" associado a um tipo de elemento "{0}" n\u00E3o deve conter o caractere ''<''.
-+        AttributeValueUnterminated = O valor do atributo "{1}" deve terminar com as aspas correspondentes.
- # 2.5 Comments
--        InvalidCommentStart = O coment\u00E1rio deve come\u00E7ar com \"\".
-+        InvalidCommentStart = O coment\u00E1rio deve come\u00E7ar com "".
-         COMMENT_NOT_IN_ONE_ENTITY = O coment\u00E1rio n\u00E3o est\u00E1 entre chaves na mesma entidade.
- # 2.6 Processing Instructions
-         PITargetRequired = A instru\u00E7\u00E3o de processamento deve come\u00E7ar com o nome do destino.
-         SpaceRequiredInPI = O espa\u00E7o em branco \u00E9 obrigat\u00F3rio entre o destino da instru\u00E7\u00E3o de processamento e os dados.
--        PIUnterminated = A instru\u00E7\u00E3o de processamento deve terminar com \"?>\".
--        ReservedPITarget = O destino da instru\u00E7\u00E3o de processamento correspondente \"[xX][mM][lL]\" n\u00E3o \u00E9 permitido.
-+        PIUnterminated = A instru\u00E7\u00E3o de processamento deve terminar com "?>".
-+        ReservedPITarget = O destino da instru\u00E7\u00E3o de processamento correspondente "[xX][mM][lL]" n\u00E3o \u00E9 permitido.
-         PI_NOT_IN_ONE_ENTITY = A instru\u00E7\u00E3o de processamento n\u00E3o est\u00E1 entre chaves na mesma entidade.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = Vers\u00E3o inv\u00E1lida \"{0}\".
--        VersionNotSupported = Vers\u00E3o XML \"{0}\" n\u00E3o suportada; somente XML 1.0 \u00E9 suportada.
--        VersionNotSupported11 = Vers\u00E3o XML \"{0}\" n\u00E3o suportada, somente XML 1.0 e XML 1.1 s\u00E3o suportadas.
-+        VersionInfoInvalid = Vers\u00E3o inv\u00E1lida "{0}".
-+        VersionNotSupported = Vers\u00E3o XML "{0}" n\u00E3o suportada; somente XML 1.0 \u00E9 suportada.
-+        VersionNotSupported11 = Vers\u00E3o XML "{0}" n\u00E3o suportada, somente XML 1.0 e XML 1.1 s\u00E3o suportadas.
-         VersionMismatch= Uma entidade n\u00E3o pode incluir outra entidade de uma vers\u00E3o posterior.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = Uma representa\u00E7\u00E3o decimal deve seguir imediatamente o \"&#\" em uma refer\u00EAncia de caractere.
--        HexdigitRequiredInCharRef = Uma representa\u00E7\u00E3o hexadecimal deve seguir imediatamente o \"&#\" em uma refer\u00EAncia de caractere.
-+        DigitRequiredInCharRef = Uma representa\u00E7\u00E3o decimal deve seguir imediatamente o "&#" em uma refer\u00EAncia de caractere.
-+        HexdigitRequiredInCharRef = Uma representa\u00E7\u00E3o hexadecimal deve seguir imediatamente o "&#" em uma refer\u00EAncia de caractere.
-         SemicolonRequiredInCharRef = A refer\u00EAncia de caractere deve terminar com o delimitador ';'.
--        InvalidCharRef = A refer\u00EAncia do caractere \"&#{0}\" \u00E9 um caractere XML inv\u00E1lido.
-+        InvalidCharRef = A refer\u00EAncia do caractere "&#{0}" \u00E9 um caractere XML inv\u00E1lido.
-         NameRequiredInReference = O nome da entidade deve seguir imediatamente o '&' na refer\u00EAncia da entidade.
--        SemicolonRequiredInReference = A refer\u00EAncia \u00E0 entidade \"{0}\" deve terminar com o delimitador '';''.
-+        SemicolonRequiredInReference = A refer\u00EAncia \u00E0 entidade "{0}" deve terminar com o delimitador '';''.
- # 4.3.1 The Text Declaration
--        TextDeclMustBeFirst = A declara\u00E7\u00E3o de texto somente pode aparecer bem no in\u00EDcio da entidade externa submetida a parse.
--        EqRequiredInTextDecl = O caractere '' = '' deve estar ap\u00F3s \"{0}\" na declara\u00E7\u00E3o de texto.
--        QuoteRequiredInTextDecl = O valor ap\u00F3s \"{0}\" na declara\u00E7\u00E3o de texto deve ser uma string entre aspas.
--        CloseQuoteMissingInTextDecl = n\u00E3o foi encontrada a aspa de fechamento no valor ap\u00F3s "{0}\" na declara\u00E7\u00E3o de texto.
-+        TextDeclMustBeFirst = A declara\u00E7\u00E3o de texto somente pode aparecer bem no in\u00EDcio da entidade externa submetida a parsing.
-+        EqRequiredInTextDecl = O caractere '' = '' deve estar ap\u00F3s "{0}" na declara\u00E7\u00E3o de texto.
-+        QuoteRequiredInTextDecl = O valor ap\u00F3s "{0}" na declara\u00E7\u00E3o de texto deve ser uma string entre aspas.
-+        CloseQuoteMissingInTextDecl = n\u00E3o foi encontrada a aspa de fechamento no valor ap\u00F3s "{0}" na declara\u00E7\u00E3o de texto.
-         SpaceRequiredBeforeVersionInTextDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes do pseudo-atributo da vers\u00E3o na declara\u00E7\u00E3o de texto.
-         SpaceRequiredBeforeEncodingInTextDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes de codificar o pseudo-atributo na declara\u00E7\u00E3o de texto.
--        TextDeclUnterminated = A declara\u00E7\u00E3o de texto deve terminar com \"?>\".
-+        TextDeclUnterminated = A declara\u00E7\u00E3o de texto deve terminar com "?>".
-         EncodingDeclRequired = A declara\u00E7\u00E3o de codifica\u00E7\u00E3o \u00E9 necess\u00E1ria na declara\u00E7\u00E3o de texto.
-         NoMorePseudoAttributes = N\u00E3o s\u00E3o mais permitidos pseudo-atributos.
-         MorePseudoAttributes = S\u00E3o esperados mais pseudo-atributos.
-         PseudoAttrNameExpected = \u00C9 esperado um nome de um pseudo-atributo. 
- # 4.3.2 Well-Formed Parsed Entities
--        CommentNotInOneEntity = O coment\u00E1rio deve estar totalmente contido na mesma entidade submetida a parse.
--        PINotInOneEntity = A instru\u00E7\u00E3o de processamento deve estar totalmente contida na mesma entidade submetida a parse.
-+        CommentNotInOneEntity = O coment\u00E1rio deve estar totalmente contido na mesma entidade submetida a parsing.
-+        PINotInOneEntity = A instru\u00E7\u00E3o de processamento deve estar totalmente contida na mesma entidade submetida a parsing.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = Nome da codifica\u00E7\u00E3o inv\u00E1lida \"{0}\".
--        EncodingByteOrderUnsupported = A ordem de bytes fornecida para codifica\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 suportada.
-+        EncodingDeclInvalid = Nome da codifica\u00E7\u00E3o inv\u00E1lida "{0}".
-+        EncodingByteOrderUnsupported = A ordem de bytes fornecida para codifica\u00E7\u00E3o "{0}" n\u00E3o \u00E9 suportada.
-         InvalidByte = Byte inv\u00E1lido {0} da sequ\u00EAncia UTF-8 do byte {1}.
-         ExpectedByte = Esperava {0} byte da sequ\u00EAncia UTF-8 do byte {1}.  
-         InvalidHighSurrogate = Os bits substitutos altos na sequ\u00EAncia da UTF-8 n\u00E3o devem exceder 0x10 mas foi encontrado 0x{0}.
--        OperationNotSupported = A opera\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 suportada pelo leitor {1}.
--        InvalidASCII = O byte \"{0}\" n\u00E3o \u00E9 membro do conjunto de caracteres ASCII (7 bits).
-+        OperationNotSupported = A opera\u00E7\u00E3o "{0}" n\u00E3o \u00E9 suportada pelo leitor {1}.
-+        InvalidASCII = O byte "{0}" n\u00E3o \u00E9 membro do conjunto de caracteres ASCII (7 bits).
-         CharConversionFailure = Uma entidade destinada a estar em uma determinada codifica\u00E7\u00E3o n\u00E3o deve conter sequ\u00EAncias inv\u00E1lidas na referida codifica\u00E7\u00E3o.
-         
- # DTD Messages
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = O caractere XML (Unicode: 0x{0}) n\u00E3o \u00E9 permitido no identificador p\u00FAblico.
-         SpaceRequiredBetweenPublicAndSystem = Espa\u00E7os em branco s\u00E3o necess\u00E1rios entre publicId e systemId.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
--        PEReferenceWithinMarkup = A refer\u00EAncia da entidade do par\u00E2metro \"%{0};\" n\u00E3o pode ocorrer na marca\u00E7\u00E3o no subconjunto interno do DTD.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s "''.
-+        PEReferenceWithinMarkup = A refer\u00EAncia da entidade do par\u00E2metro "%{0};" n\u00E3o pode ocorrer na marca\u00E7\u00E3o no subconjunto interno do DTD.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = As declara\u00E7\u00F5es de marca\u00E7\u00E3o contidas ou apontadas pela declara\u00E7\u00E3o do tipo de documento devem estar corretas.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = Deve ser fornecida a declara\u00E7\u00E3o do atributo para \"xml:space\" como um tipo enumerado, cujo os \u00FAnicos valores poss\u00EDveis s\u00E3o \"default\" e \"preserve\".
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = Deve ser fornecida a declara\u00E7\u00E3o do atributo para "xml:space" como um tipo enumerado, cujo os \u00FAnicos valores poss\u00EDveis s\u00E3o "default" e "preserve".
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s o tipo de elemento "{0}" na declara\u00E7\u00E3o do tipo de elemento.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = A restri\u00E7\u00E3o \u00E9 necess\u00E1ria ap\u00F3s o tipo de elemento "{0}" na declara\u00E7\u00E3o do tipo de elemento.
-+        ElementDeclUnterminated = A declara\u00E7\u00E3o do tipo de elemento "{0}" deve terminar com ''>''.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere ''('' ou um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere ''('' ou um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento "{0}".
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u00C9 necess\u00E1rio um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
--        MixedContentUnterminated = O modelo de conte\u00FAdo misto \"{0}\" deve terminar com \")*\" quando os tipos de elementos filhos forem restringidos.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u00C9 necess\u00E1rio um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento "{0}".
-+        MixedContentUnterminated = O modelo de conte\u00FAdo misto "{0}" deve terminar com ")*" quando os tipos de elementos filhos forem restringidos.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"\".
--        IgnoreSectUnterminated = A se\u00E7\u00E3o condicional exclu\u00EDda deve terminar com \"]]>\".
-+        IncludeSectUnterminated = A se\u00E7\u00E3o condicional inclu\u00EDda deve terminar com "]]>".
-+        IgnoreSectUnterminated = A se\u00E7\u00E3o condicional exclu\u00EDda deve terminar com "]]>".
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = O nome da entidade deve seguir imediatamente o '%' na refer\u00EAncia da entidade do par\u00E2metro.
--        SemicolonRequiredInPEReference = A refer\u00EAncia da entidade do par\u00E2metro \"%{0};\" deve terminar com o delimitador '';".
-+        SemicolonRequiredInPEReference = A refer\u00EAncia da entidade do par\u00E2metro "%{0};" deve terminar com o delimitador '';".
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
--	MSG_DUPLICATE_ENTITY_DEFINITION = A entidade \"{0}\" foi declarada mais de uma vez.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre o nome da entidade "{0}" e a defini\u00E7\u00E3o da declara\u00E7\u00E3o da entidade.
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u00C9 necess\u00E1rio um espa\u00E7o em branco entre "NDATA" e o nome da nota\u00E7\u00E3o na declara\u00E7\u00E3o da entidade "{0}".
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes de "NDATA" na declara\u00E7\u00E3o da entidade "{0}".
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = O nome da nota\u00E7\u00E3o \u00E9 necess\u00E1rio ap\u00F3s "NDATA" na declara\u00E7\u00E3o da entidade "{0}".
-+        EntityDeclUnterminated = A declara\u00E7\u00E3o da entidade "{0}" deve terminar com ''>''.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = A entidade "{0}" foi declarada mais de uma vez.        
- # 4.2.2 External Entities
--        ExternalIDRequired = A declara\u00E7\u00E3o da entidade externa deve come\u00E7ar com \"SYSTEM\" ou \"PUBLIC\".
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre \"PUBLIC\" e o identificador p\u00FAblico.
-+        ExternalIDRequired = A declara\u00E7\u00E3o da entidade externa deve come\u00E7ar com "SYSTEM" ou "PUBLIC".
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre "PUBLIC" e o identificador p\u00FAblico.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre o identificador p\u00FAblico e o identificador do sistema.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre \"SYSTEM\" e o identificador do sistema.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = O identificador do fragmento n\u00E3o deve ser especificado como parte do identificador do sistema \"{0}\".
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre "SYSTEM" e o identificador do sistema.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = O identificador do fragmento n\u00E3o deve ser especificado como parte do identificador do sistema "{0}".
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s o nome da nota\u00E7\u00E3o "{0}" na declara\u00E7\u00E3o de nota\u00E7\u00E3o.
-+        ExternalIDorPublicIDRequired = A declara\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" deve incluir um identificador p\u00FAblico ou do sistema.
-+        NotationDeclUnterminated = A declara\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" deve terminar com ''>''.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = O tipo de elemento \"{1}\" j\u00E1 foi especificado no modelo de conte\u00FAdo da declara\u00E7\u00E3o do elemento \"{0}\".
--        ENTITIESInvalid = O valor do atributo \"{1}\" do tipo ENTITIES deve ser o nome de uma ou mais entidades n\u00E3o submetidas a parse.
--        ENTITYInvalid = O valor do atributo \"{1}\" do tipo ENTITY deve ser o nome de uma entidade n\u00E3o submetida a parse.
--        IDDefaultTypeInvalid = O atributo do ID \"{0}\" deve ter um default declarado \"#IMPLIED\" ou \"#REQUIRED\".
--        IDInvalid = O valor do atributo \"{0}\" do ID de tipo deve ser um nome.
--        IDInvalidWithNamespaces = O valor do atributo \"{0}\" do ID de tipo deve ser um NCName quando os namespaces estiverem ativados.
--        IDNotUnique = O valor do atributo \"{0}\" do ID de tipo deve ser exclusivo no documento.
--        IDREFInvalid = O valor do atributo \"{0}\" do IDREF de tipo deve ser um nome.
--        IDREFInvalidWithNamespaces = O valor do atributo \"{0}\" do IDREF de tipo deve ser um NCName quando os namespaces estiverem ativados.
--        IDREFSInvalid = O valor do atributo \"{0}\" de tipo IDREFS deve ter um ou mais nomes.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir as declara\u00E7\u00F5es aninhadas corretamente quando a refer\u00EAncia da entidade for usada como uma declara\u00E7\u00E3o completa.
--        ImproperDeclarationNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir as declara\u00E7\u00F5es aninhadas corretamente.
--        ImproperGroupNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir pares de par\u00EAnteses aninhados corretamente.
--        INVALID_PE_IN_CONDITIONAL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir a se\u00E7\u00E3o condicional inteira ou apenas INCLUDE ou IGNORE.
--        MSG_ATTRIBUTE_NOT_DECLARED = O atributo \"{1}\" deve ser declarado para o tipo de elemento \"{0}\".
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = O atributo \"{0}\" com o valor \"{1}\" deve ter um valor da lista \"{2}\".
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = O valor \"{1}\" do atributo \"{0}\" n\u00E3o deve ser alterado por meio da normaliza\u00E7\u00E3o (para \"{2}\") em um documento stand-alone.
--        MSG_CONTENT_INCOMPLETE = O conte\u00FAdo do tipo de elemento \"{0}\" est\u00E1 incompleto; ele deve corresponder a \"{1}\".
--        MSG_CONTENT_INVALID = O conte\u00FAdo do tipo de elemento \"{0}\" deve corresponder a \"{1}\".
--        MSG_CONTENT_INVALID_SPECIFIED = O conte\u00FAdo do tipo de elemento \"{0}\" deve corresponder a \"{1}\". N\u00E3o s\u00E3o permitidos os filhos do tipo \"{2}\".
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = O atributo \"{1}\" do tipo de elemento \"{0}\" tem um valor default e deve ser especificado em um documento stand-alone.
--        MSG_DUPLICATE_ATTDEF = O atributo \"{1}\" j\u00E1 foi declarado para o tipo de elemento \"{0}\".
--        MSG_ELEMENT_ALREADY_DECLARED = O tipo de elemento \"{0}\" n\u00E3o deve ser declarado mais de uma vez.
--        MSG_ELEMENT_NOT_DECLARED = O tipo de elemento \"{0}\" deve ser declarado.
-+        DuplicateTypeInMixedContent = O tipo de elemento "{1}" j\u00E1 foi especificado no modelo de conte\u00FAdo da declara\u00E7\u00E3o do elemento "{0}".
-+        ENTITIESInvalid = O valor do atributo "{1}" do tipo ENTITIES deve ser o nome de uma ou mais entidades n\u00E3o submetidas a parsing.
-+        ENTITYInvalid = O valor do atributo "{1}" do tipo ENTITY deve ser o nome de uma entidade n\u00E3o submetida a parsing.
-+        IDDefaultTypeInvalid = O atributo do ID "{0}" deve ter um default declarado "#IMPLIED" ou "#REQUIRED".
-+        IDInvalid = O valor do atributo "{0}" do ID de tipo deve ser um nome.
-+        IDInvalidWithNamespaces = O valor do atributo "{0}" do ID de tipo deve ser um NCName quando os namespaces estiverem ativados.
-+        IDNotUnique = O valor do atributo "{0}" do ID de tipo deve ser exclusivo no documento.
-+        IDREFInvalid = O valor do atributo "{0}" do IDREF de tipo deve ser um nome.
-+        IDREFInvalidWithNamespaces = O valor do atributo "{0}" do IDREF de tipo deve ser um NCName quando os namespaces estiverem ativados.
-+        IDREFSInvalid = O valor do atributo "{0}" de tipo IDREFS deve ter um ou mais nomes.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir as declara\u00E7\u00F5es aninhadas corretamente quando a refer\u00EAncia da entidade for usada como uma declara\u00E7\u00E3o completa.
-+        ImproperDeclarationNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir as declara\u00E7\u00F5es aninhadas corretamente.
-+        ImproperGroupNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir pares de par\u00EAnteses aninhados corretamente.
-+        INVALID_PE_IN_CONDITIONAL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir a se\u00E7\u00E3o condicional inteira ou apenas INCLUDE ou IGNORE.
-+        MSG_ATTRIBUTE_NOT_DECLARED = O atributo "{1}" deve ser declarado para o tipo de elemento "{0}".
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = O atributo "{0}" com o valor "{1}" deve ter um valor da lista "{2}".
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = O valor "{1}" do atributo "{0}" n\u00E3o deve ser alterado por meio da normaliza\u00E7\u00E3o (para "{2}") em um documento stand-alone.
-+        MSG_CONTENT_INCOMPLETE = O conte\u00FAdo do tipo de elemento "{0}" est\u00E1 incompleto; ele deve corresponder a "{1}".
-+        MSG_CONTENT_INVALID = O conte\u00FAdo do tipo de elemento "{0}" deve corresponder a "{1}".
-+        MSG_CONTENT_INVALID_SPECIFIED = O conte\u00FAdo do tipo de elemento "{0}" deve corresponder a "{1}". N\u00E3o s\u00E3o permitidos os filhos do tipo "{2}".
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = O atributo "{1}" do tipo de elemento "{0}" tem um valor default e deve ser especificado em um documento stand-alone.
-+        MSG_DUPLICATE_ATTDEF = O atributo "{1}" j\u00E1 foi declarado para o tipo de elemento "{0}".
-+        MSG_ELEMENT_ALREADY_DECLARED = O tipo de elemento "{0}" n\u00E3o deve ser declarado mais de uma vez.
-+        MSG_ELEMENT_NOT_DECLARED = O tipo de elemento "{0}" deve ser declarado.
-         MSG_GRAMMAR_NOT_FOUND = O documento \u00E9 inv\u00E1lido: nenhuma gram\u00E1tica encontrada.
--        MSG_ELEMENT_WITH_ID_REQUIRED = Um elemento com o identificador \"{0}\" deve aparecer no documento.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = A refer\u00EAncia \u00E0 entidade externa \"{0}\" n\u00E3o \u00E9 permitida em um documento stand-alone.
--        MSG_FIXED_ATTVALUE_INVALID = O atributo \"{1}\" com o valor \"{2}\" deve ter um valor \"{3}\".
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = O tipo de elemento \"{0}\" j\u00E1 tem o atributo \"{1}\" do ID do tipo; um segundo atributo \"{2}\" do ID de tipo n\u00E3o \u00E9 permitido.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = O tipo de elemento \"{0}\" j\u00E1 tem o atributo \"{1}\" do tipo NOTATION; um segundo atributo \"{2}\" do tipo NOTATION n\u00E3o \u00E9 permitido.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = A nota\u00E7\u00E3o \"{1}\" deve ser declarada quando referenciada na lista de tipos de nota\u00E7\u00E3o do atributo \"{0}\".
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = A nota\u00E7\u00E3o \"{1}\" deve ser declarada quando referenciada na declara\u00E7\u00E3o da entidade n\u00E3o submetida a parse para \"{0}\".
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = A refer\u00EAncia \u00E0 entidade \"{0}\" declarada em uma entidade externa submetida a parse n\u00E3o \u00E9 permitida em um documento stand-alone.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = O atributo \"{1}\" \u00E9 necess\u00E1rio e deve ser especificado para o tipo de elemento \"{0}\".
--        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = N\u00E3o deve haver espa\u00E7o em branco entre os elementos declarados em uma entidade externa submetida a parse com o conte\u00FAdo do elemento em um documento stand-alone.
--        NMTOKENInvalid = O valor do atributo \"{0}\" do tipo NMTOKEN deve ser um token de nome.
--        NMTOKENSInvalid = O valor do atributo \"{0}\" do tipo NMTOKENS deve ter um ou mais tokens de nome.
--        NoNotationOnEmptyElement = O tipo de elemento \"{0}\" que foi declarado EMPTY n\u00E3o pode declarar o atributo \"{1}\" do tipo NOTATION.
--        RootElementTypeMustMatchDoctypedecl = O elemento-raiz do documento \"{1}\" deve corresponder \u00E0 raiz de DOCTYPE \"{0}\".
--        UndeclaredElementInContentSpec = O modelo do conte\u00FAdo do elemento \"{0}\" refere-se ao elemento n\u00E3o declarado \"{1}\".
--        UniqueNotationName = A declara\u00E7\u00E3o da nota\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 exclusiva. Um Nome fornecido n\u00E3o deve ser declarado em mais de uma declara\u00E7\u00E3o de nota\u00E7\u00E3o.
-+        MSG_ELEMENT_WITH_ID_REQUIRED = Um elemento com o identificador "{0}" deve aparecer no documento.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = A refer\u00EAncia \u00E0 entidade externa "{0}" n\u00E3o \u00E9 permitida em um documento stand-alone.
-+        MSG_FIXED_ATTVALUE_INVALID = O atributo "{1}" com o valor "{2}" deve ter um valor "{3}".
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = O tipo de elemento "{0}" j\u00E1 tem o atributo "{1}" do ID do tipo; um segundo atributo "{2}" do ID de tipo n\u00E3o \u00E9 permitido.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = O tipo de elemento "{0}" j\u00E1 tem o atributo "{1}" do tipo NOTATION; um segundo atributo "{2}" do tipo NOTATION n\u00E3o \u00E9 permitido.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = A nota\u00E7\u00E3o "{1}" deve ser declarada quando referenciada na lista de tipos de nota\u00E7\u00E3o do atributo "{0}".
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = A nota\u00E7\u00E3o "{1}" deve ser declarada quando referenciada na declara\u00E7\u00E3o da entidade n\u00E3o submetida a parsing para "{0}".
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = A refer\u00EAncia \u00E0 entidade "{0}" declarada em uma entidade externa submetida a parsing n\u00E3o \u00E9 permitida em um documento stand-alone.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = O atributo "{1}" \u00E9 necess\u00E1rio e deve ser especificado para o tipo de elemento "{0}".
-+        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = N\u00E3o deve haver espa\u00E7o em branco entre os elementos declarados em uma entidade externa submetida a parsing com o conte\u00FAdo do elemento em um documento stand-alone.
-+        NMTOKENInvalid = O valor do atributo "{0}" do tipo NMTOKEN deve ser um token de nome.
-+        NMTOKENSInvalid = O valor do atributo "{0}" do tipo NMTOKENS deve ter um ou mais tokens de nome.
-+        NoNotationOnEmptyElement = O tipo de elemento "{0}" que foi declarado EMPTY n\u00E3o pode declarar o atributo "{1}" do tipo NOTATION.
-+        RootElementTypeMustMatchDoctypedecl = O elemento-raiz do documento "{1}" deve corresponder \u00E0 raiz de DOCTYPE "{0}".
-+        UndeclaredElementInContentSpec = O modelo do conte\u00FAdo do elemento "{0}" refere-se ao elemento n\u00E3o declarado "{1}".
-+        UniqueNotationName = A declara\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" n\u00E3o \u00E9 exclusiva. Um Nome fornecido n\u00E3o deve ser declarado em mais de uma declara\u00E7\u00E3o de nota\u00E7\u00E3o.
-         ENTITYFailedInitializeGrammar =  Validador de ENTITYDatatype: Falha ao chamar o m\u00E9todo de inicializa\u00E7\u00E3o com uma refer\u00EAncia de Gram\u00E1tica v\u00E1lida. \t
--        ENTITYNotUnparsed = ENTITY \"{0}\" n\u00E3o \u00E9 submetida a parse.
--        ENTITYNotValid = ENTITY \"{0}\" n\u00E3o \u00E9 v\u00E1lida.
-+        ENTITYNotUnparsed = ENTITY "{0}" n\u00E3o \u00E9 submetida a parsing.
-+        ENTITYNotValid = ENTITY "{0}" n\u00E3o \u00E9 v\u00E1lida.
-         EmptyList = O valor dos tipos ENTITIES, IDREFS e NMTOKENS n\u00E3o pode estar na lista vazia.
+   return true;
+@@ -1568,8 +1549,6 @@
+ void
+ G1CollectedHeap::
+ resize_if_necessary_after_full_collection(size_t word_size) {
+-  assert(MinHeapFreeRatio <= MaxHeapFreeRatio, "sanity check");
+-
+   // Include the current allocation, if any, and bytes that will be
+   // pre-allocated to support collections, as "used".
+   const size_t used_after_gc = used();
+@@ -2002,10 +1981,12 @@
+ 
+   size_t init_byte_size = collector_policy()->initial_heap_byte_size();
+   size_t max_byte_size = collector_policy()->max_heap_byte_size();
++  size_t heap_alignment = collector_policy()->max_alignment();
+ 
+   // Ensure that the sizes are properly aligned.
+   Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap");
+   Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap");
++  Universe::check_alignment(max_byte_size, heap_alignment, "g1 heap");
+ 
+   _cg1r = new ConcurrentG1Refine(this);
+ 
+@@ -2029,14 +2010,14 @@
+   size_t total_reserved = 0;
+ 
+   total_reserved = add_and_check_overflow(total_reserved, max_byte_size);
+-  size_t pg_max_size = (size_t) align_size_up(pgs->max_size(), HeapRegion::GrainBytes);
++  size_t pg_max_size = (size_t) align_size_up(pgs->max_size(), heap_alignment);
+   total_reserved = add_and_check_overflow(total_reserved, pg_max_size);
+ 
+   Universe::check_alignment(total_reserved, HeapRegion::GrainBytes, "g1 heap and perm");
+ 
+-  char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop);
++  char* addr = Universe::preferred_heap_base(total_reserved, heap_alignment, Universe::UnscaledNarrowOop);
+ 
+-  ReservedHeapSpace heap_rs(total_reserved, HeapRegion::GrainBytes,
++  ReservedHeapSpace heap_rs(total_reserved, heap_alignment,
+                             UseLargePages, addr);
+ 
+   if (UseCompressedOops) {
+@@ -2044,17 +2025,17 @@
+       // Failed to reserve at specified address - the requested memory
+       // region is taken already, for example, by 'java' launcher.
+       // Try again to reserver heap higher.
+-      addr = Universe::preferred_heap_base(total_reserved, Universe::ZeroBasedNarrowOop);
++      addr = Universe::preferred_heap_base(total_reserved, heap_alignment, Universe::ZeroBasedNarrowOop);
+ 
+-      ReservedHeapSpace heap_rs0(total_reserved, HeapRegion::GrainBytes,
++      ReservedHeapSpace heap_rs0(total_reserved, heap_alignment,
+                                  UseLargePages, addr);
+ 
+       if (addr != NULL && !heap_rs0.is_reserved()) {
+         // Failed to reserve at specified address again - give up.
+-        addr = Universe::preferred_heap_base(total_reserved, Universe::HeapBasedNarrowOop);
++        addr = Universe::preferred_heap_base(total_reserved, heap_alignment, Universe::HeapBasedNarrowOop);
+         assert(addr == NULL, "");
+ 
+-        ReservedHeapSpace heap_rs1(total_reserved, HeapRegion::GrainBytes,
++        ReservedHeapSpace heap_rs1(total_reserved, heap_alignment,
+                                    UseLargePages, addr);
+         heap_rs = heap_rs1;
+       } else {
+@@ -2080,20 +2061,13 @@
+   // Create the gen rem set (and barrier set) for the entire reserved region.
+   _rem_set = collector_policy()->create_rem_set(_reserved, 2);
+   set_barrier_set(rem_set()->bs());
+-  if (barrier_set()->is_a(BarrierSet::ModRef)) {
+-    _mr_bs = (ModRefBarrierSet*)_barrier_set;
+-  } else {
+-    vm_exit_during_initialization("G1 requires a mod ref bs.");
++  if (!barrier_set()->is_a(BarrierSet::G1SATBCTLogging)) {
++    vm_exit_during_initialization("G1 requires a G1SATBLoggingCardTableModRefBS");
+     return JNI_ENOMEM;
+   }
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = A refer\u00EAncia da entidade externa \"&{0};\" n\u00E3o \u00E9 permitida em um valor do atributo.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = A refer\u00EAncia da entidade externa "&{0};" n\u00E3o \u00E9 permitida em um valor do atributo.
-+        AccessExternalDTD = DTD Externo: falha ao ler o DTD ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalDTD.
-+        AccessExternalEntity = Entidade Externa: falha ao ler o documento ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalDTD.
+   // Also create a G1 rem set.
+-  if (mr_bs()->is_a(BarrierSet::CardTableModRef)) {
+-    _g1_rem_set = new G1RemSet(this, (CardTableModRefBS*)mr_bs());
+-  } else {
+-    vm_exit_during_initialization("G1 requires a cardtable mod ref bs.");
+-    return JNI_ENOMEM;
+-  }
++  _g1_rem_set = new G1RemSet(this, g1_barrier_set());
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = A entidade \"{0}\" foi referenciada, mas n\u00E3o declarada.
--        ReferenceToUnparsedEntity = A refer\u00EAncia da entidade n\u00E3o submetida a parse \"&{0};\" n\u00E3o \u00E9 permitida.
--        RecursiveReference = Refer\u00EAncia da entidade recursiva \"{0}\". (Caminho de refer\u00EAncia: {1}),
--        RecursiveGeneralReference = Refer\u00EAncia geral da entidade recursiva \"&{0};\". (Caminho de refer\u00EAncia: {1}),
--        RecursivePEReference = Refer\u00EAncia da entidade do par\u00E2metro recursivo \"%{0};\". (Caminho de refer\u00EAncia: {1}),
-+        EntityNotDeclared = A entidade "{0}" foi referenciada, mas n\u00E3o declarada.
-+        ReferenceToUnparsedEntity = A refer\u00EAncia da entidade n\u00E3o submetida a parsing "&{0};" n\u00E3o \u00E9 permitida.
-+        RecursiveReference = Refer\u00EAncia da entidade recursiva "{0}". (Caminho de refer\u00EAncia: {1}),
-+        RecursiveGeneralReference = Refer\u00EAncia geral da entidade recursiva "&{0};". (Caminho de refer\u00EAncia: {1}),
-+        RecursivePEReference = Refer\u00EAncia da entidade do par\u00E2metro recursivo "%{0};". (Caminho de refer\u00EAncia: {1}),
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = A codifica\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 suportada.
--        EncodingRequired = Uma entidade submetida a parse n\u00E3o codificada em UTF-8 nem em UTF-16 deve conter uma declara\u00E7\u00E3o de codifica\u00E7\u00E3o.
-+        EncodingNotSupported = A codifica\u00E7\u00E3o "{0}" n\u00E3o \u00E9 suportada.
-+        EncodingRequired = Uma entidade submetida a parsing n\u00E3o codificada em UTF-8 nem em UTF-16 deve conter uma declara\u00E7\u00E3o de codifica\u00E7\u00E3o.
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = O elemento ou o atributo n\u00E3o correspondem \u00E0 produ\u00E7\u00E3o QName: QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = O elemento \"{0}\" n\u00E3o pode ter \"xmlns\" como seu prefixo.
--        ElementPrefixUnbound = O prefixo \"{0}\" do elemento \"{1}\" n\u00E3o est\u00E1 vinculado.
--        AttributePrefixUnbound = O prefixo \"{2}\" do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00E3o est\u00E1 vinculado.
--        EmptyPrefixedAttName = O valor do atributo \"{0}\" \u00E9 inv\u00E1lido. Associa\u00E7\u00F5es de namespace prefixadas n\u00E3o podem ficar vazias.
--        PrefixDeclared = O prefixo do namespace \"{0}\" n\u00E3o foi declarado.
-+        ElementXMLNSPrefix = O elemento "{0}" n\u00E3o pode ter "xmlns" como seu prefixo.
-+        ElementPrefixUnbound = O prefixo "{0}" do elemento "{1}" n\u00E3o est\u00E1 vinculado.
-+        AttributePrefixUnbound = O prefixo "{2}" do atributo "{1}" associado a um tipo de elemento "{0}" n\u00E3o est\u00E1 vinculado.
-+        EmptyPrefixedAttName = O valor do atributo "{0}" \u00E9 inv\u00E1lido. Associa\u00E7\u00F5es de namespace prefixadas n\u00E3o podem ficar vazias.
-+        PrefixDeclared = O prefixo do namespace "{0}" n\u00E3o foi declarado.
-         CantBindXMLNS = O prefixo "xmlns" n\u00E3o pode ser vinculado a um namespace explicitamente, assim como o namespace de "xmlns" n\u00E3o pode ser vinculado a um prefixo explicitamente.
-         CantBindXML = O prefixo "xml" n\u00E3o pode ser vinculado a um namespace diferente do namespace comum, assim como o namespace de "xml" n\u00E3o pode ser vinculado a um prefixo diferente de "xml".
--        MSG_ATT_DEFAULT_INVALID = O defaultValue \"{1}\" do atributo \"{0}\" n\u00E3o \u00E9 v\u00E1lido para as restri\u00E7\u00F5es l\u00E9xicas deste tipo de atributo.
-+        MSG_ATT_DEFAULT_INVALID = O defaultValue "{1}" do atributo "{0}" n\u00E3o \u00E9 v\u00E1lido para as restri\u00E7\u00F5es l\u00E9xicas deste tipo de atributo.
+   // Carve out the G1 part of the heap.
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+@@ -2517,7 +2491,7 @@
+   FullGCCount_lock->notify_all();
+ }
  
+-void G1CollectedHeap::register_concurrent_cycle_start(jlong start_time) {
++void G1CollectedHeap::register_concurrent_cycle_start(const Ticks& start_time) {
+   _concurrent_cycle_started = true;
+   _gc_timer_cm->register_gc_start(start_time);
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=O parser detectou mais de \"{0}\" expans\u00F5es da entidade neste documento. Este \u00E9 o limite imposto pela aplica\u00E7\u00E3o.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: O parser detectou mais de "{0}" expans\u00F5es da entidade neste documento. Este \u00E9 o limite imposto pelo JDK.
-+        ElementAttributeLimit=JAXP00010002: o elemento "{0}" tem mais de "{1}" atributos. "{1}" \u00E9 o limite imposto pelo JDK.
-+        MaxEntitySizeLimit=JAXP00010003: o tamanho da entidade "{0}" \u00E9 "{1}", o que excede o limite de "{2}" definido por "{3}".
-+        TotalEntitySizeLimit=JAXP00010004: o tamanho acumulado  "{0}" de entidades excedeu o limite de "{1}" definido por "{2}".
-+        MaxXMLNameLimit=JAXP00010005: o nome "{0}" excedeu o limite de "{1}" definido por "{2}".
+@@ -2527,7 +2501,7 @@
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= O elemento \"{0}\" tem mais de \"{1}\" atributos. \"{1}\" \u00E9 o limite imposto pela aplica\u00E7\u00E3o.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
+ void G1CollectedHeap::register_concurrent_cycle_end() {
+   if (_concurrent_cycle_started) {
+-    _gc_timer_cm->register_gc_end(os::elapsed_counter());
++    _gc_timer_cm->register_gc_end();
+ 
+     if (_cm->has_aborted()) {
+       _gc_tracer_cm->report_concurrent_mode_failure();
+@@ -3161,6 +3135,119 @@
+   return NULL; // keep some compilers happy
+ }
+ 
++// TODO: VerifyRootsClosure extends OopsInGenClosure so that we can
++//       pass it as the perm_blk to SharedHeap::process_strong_roots.
++//       When process_strong_roots stop calling perm_blk->younger_refs_iterate
++//       we can change this closure to extend the simpler OopClosure.
++class VerifyRootsClosure: public OopsInGenClosure {
++private:
++  G1CollectedHeap* _g1h;
++  VerifyOption     _vo;
++  bool             _failures;
++public:
++  // _vo == UsePrevMarking -> use "prev" marking information,
++  // _vo == UseNextMarking -> use "next" marking information,
++  // _vo == UseMarkWord    -> use mark word from object header.
++  VerifyRootsClosure(VerifyOption vo) :
++    _g1h(G1CollectedHeap::heap()),
++    _vo(vo),
++    _failures(false) { }
++
++  bool failures() { return _failures; }
++
++  template  void do_oop_nv(T* p) {
++    T heap_oop = oopDesc::load_heap_oop(p);
++    if (!oopDesc::is_null(heap_oop)) {
++      oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
++      if (_g1h->is_obj_dead_cond(obj, _vo)) {
++        gclog_or_tty->print_cr("Root location "PTR_FORMAT" "
++                              "points to dead obj "PTR_FORMAT, p, (void*) obj);
++        if (_vo == VerifyOption_G1UseMarkWord) {
++          gclog_or_tty->print_cr("  Mark word: "PTR_FORMAT, (void*)(obj->mark()));
++        }
++        obj->print_on(gclog_or_tty);
++        _failures = true;
++      }
++    }
++  }
++
++  void do_oop(oop* p)       { do_oop_nv(p); }
++  void do_oop(narrowOop* p) { do_oop_nv(p); }
++};
++
++class G1VerifyCodeRootOopClosure: public OopsInGenClosure {
++  G1CollectedHeap* _g1h;
++  OopClosure* _root_cl;
++  nmethod* _nm;
++  VerifyOption _vo;
++  bool _failures;
++
++  template  void do_oop_work(T* p) {
++    // First verify that this root is live
++    _root_cl->do_oop(p);
++
++    if (!G1VerifyHeapRegionCodeRoots) {
++      // We're not verifying the code roots attached to heap region.
++      return;
++    }
++
++    // Don't check the code roots during marking verification in a full GC
++    if (_vo == VerifyOption_G1UseMarkWord) {
++      return;
++    }
++
++    // Now verify that the current nmethod (which contains p) is
++    // in the code root list of the heap region containing the
++    // object referenced by p.
++
++    T heap_oop = oopDesc::load_heap_oop(p);
++    if (!oopDesc::is_null(heap_oop)) {
++      oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
++
++      if (_g1h->is_in_g1_reserved(obj)) {
++        // Now fetch the region containing the object
++        HeapRegion* hr = _g1h->heap_region_containing(obj);
++        HeapRegionRemSet* hrrs = hr->rem_set();
++        // Verify that the strong code root list for this region
++        // contains the nmethod
++        if (!hrrs->strong_code_roots_list_contains(_nm)) {
++          gclog_or_tty->print_cr("Code root location "PTR_FORMAT" "
++                                "from nmethod "PTR_FORMAT" not in strong "
++                                "code roots for region ["PTR_FORMAT","PTR_FORMAT")",
++                                p, _nm, hr->bottom(), hr->end());
++          _failures = true;
++        }
++      }
++    }
++  }
++
++public:
++  G1VerifyCodeRootOopClosure(G1CollectedHeap* g1h, OopClosure* root_cl, VerifyOption vo):
++    _g1h(g1h), _root_cl(root_cl), _vo(vo), _nm(NULL), _failures(false) {}
++
++  void do_oop(oop* p) { do_oop_work(p); }
++  void do_oop(narrowOop* p) { do_oop_work(p); }
++
++  void set_nmethod(nmethod* nm) { _nm = nm; }
++  bool failures() { return _failures; }
++};
++
++class G1VerifyCodeRootBlobClosure: public CodeBlobClosure {
++  G1VerifyCodeRootOopClosure* _oop_cl;
++
++public:
++  G1VerifyCodeRootBlobClosure(G1VerifyCodeRootOopClosure* oop_cl):
++    _oop_cl(oop_cl) {}
++
++  void do_code_blob(CodeBlob* cb) {
++    nmethod* nm = cb->as_nmethod_or_null();
++    if (nm != NULL) {
++      _oop_cl->set_nmethod(nm);
++      nm->oops_do(_oop_cl);
++    }
++  }
++};
++
+ class VerifyLivenessOopClosure: public OopClosure {
+   G1CollectedHeap* _g1h;
+   VerifyOption _vo;
+@@ -3294,42 +3381,6 @@
+   }
+ };
+ 
+-class VerifyRootsClosure: public OopsInGenClosure {
+-private:
+-  G1CollectedHeap* _g1h;
+-  VerifyOption     _vo;
+-  bool             _failures;
+-public:
+-  // _vo == UsePrevMarking -> use "prev" marking information,
+-  // _vo == UseNextMarking -> use "next" marking information,
+-  // _vo == UseMarkWord    -> use mark word from object header.
+-  VerifyRootsClosure(VerifyOption vo) :
+-    _g1h(G1CollectedHeap::heap()),
+-    _vo(vo),
+-    _failures(false) { }
 -
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+-  bool failures() { return _failures; }
+-
+-  template  void do_oop_nv(T* p) {
+-    T heap_oop = oopDesc::load_heap_oop(p);
+-    if (!oopDesc::is_null(heap_oop)) {
+-      oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
+-      if (_g1h->is_obj_dead_cond(obj, _vo)) {
+-        gclog_or_tty->print_cr("Root location "PTR_FORMAT" "
+-                              "points to dead obj "PTR_FORMAT, p, (void*) obj);
+-        if (_vo == VerifyOption_G1UseMarkWord) {
+-          gclog_or_tty->print_cr("  Mark word: "PTR_FORMAT, (void*)(obj->mark()));
+-        }
+-        obj->print_on(gclog_or_tty);
+-        _failures = true;
+-      }
+-    }
+-  }
+-
+-  void do_oop(oop* p)       { do_oop_nv(p); }
+-  void do_oop(narrowOop* p) { do_oop_nv(p); }
+-};
+-
+ // This is the task used for parallel heap verification.
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i dokumentets prolog.
-         InvalidCharInXMLDecl = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i XML-deklarationen.
- # 2.4 Character Data and Markup
--        CDEndInContent = Teckensekvensen \"]]>\" f\u00E5r inte f\u00F6rekomma i inneh\u00E5llet, s\u00E5vida det inte anv\u00E4nds f\u00F6r att markera slut av CDATA-sektion.
-+        CDEndInContent = Teckensekvensen "]]>" f\u00E5r inte f\u00F6rekomma i inneh\u00E5llet, s\u00E5vida det inte anv\u00E4nds f\u00F6r att markera slut av CDATA-sektion.
- # 2.7 CDATA Sections
--        CDSectUnterminated = CDATA-sektionen m\u00E5ste sluta med \"]]>\".
-+        CDSectUnterminated = CDATA-sektionen m\u00E5ste sluta med "]]>".
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = XML-deklarationen f\u00E5r endast f\u00F6rekomma allra \u00F6verst i dokumentet.
--        EqRequiredInXMLDecl = Tecknet '' = '' m\u00E5ste anges efter \"{0}\" i XML-deklarationen.
--        QuoteRequiredInXMLDecl = V\u00E4rdet som f\u00F6ljer \"{0}\" i XML-deklarationen m\u00E5ste omges av citattecken.
--        XMLDeclUnterminated = XML-deklarationen m\u00E5ste avslutas med \"?>\".
-+        EqRequiredInXMLDecl = Tecknet '' = '' m\u00E5ste anges efter "{0}" i XML-deklarationen.
-+        QuoteRequiredInXMLDecl = V\u00E4rdet som f\u00F6ljer "{0}" i XML-deklarationen m\u00E5ste omges av citattecken.
-+        XMLDeclUnterminated = XML-deklarationen m\u00E5ste avslutas med "?>".
-         VersionInfoRequired = Versionen kr\u00E4vs i XML-deklarationen.
-         SpaceRequiredBeforeVersionInXMLDecl = Tomt utrymme kr\u00E4vs f\u00F6re versionens pseudoattribut i XML-deklarationen.
-         SpaceRequiredBeforeEncodingInXMLDecl = Tomt utrymme kr\u00E4vs f\u00F6re kodningens pseudoattribut i XML-deklarationen.
-@@ -71,70 +68,71 @@
-         ReferenceIllegalInTrailingMisc=Referensen \u00E4r inte till\u00E5ten i efterf\u00F6ljande avsnitt.
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = Deklarationsv\u00E4rdet f\u00F6r frist\u00E5ende dokument m\u00E5ste vara \"yes\" eller \"no\", inte \"{0}\".
-+        SDDeclInvalid = Deklarationsv\u00E4rdet f\u00F6r frist\u00E5ende dokument m\u00E5ste vara "yes" eller "no", inte "{0}".
-+        SDDeclNameInvalid = Det frist\u00E5ende namnet i XML-deklarationen kan vara felstavat.
- # 2.12 Language Identification
--        XMLLangInvalid = Attributv\u00E4rdet \"{0}\" f\u00F6r xml:lang \u00E4r en ogiltig spr\u00E5kidentifierare.
-+        XMLLangInvalid = Attributv\u00E4rdet "{0}" f\u00F6r xml:lang \u00E4r en ogiltig spr\u00E5kidentifierare.
- # 3. Logical Structures
--        ETagRequired = Elementtyp \"{0}\" m\u00E5ste avslutas med matchande sluttagg \"\".
-+        ETagRequired = Elementtyp "{0}" m\u00E5ste avslutas med matchande sluttagg "".
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = Elementtyp \"{0}\" m\u00E5ste f\u00F6ljas av n\u00E5gondera av attributspecifikationerna \">\" eller \"/>\".
--        EqRequiredInAttribute = Attributnamnet \"{1}\" som associeras med elementtyp \"{0}\" m\u00E5ste f\u00F6ljas av likhetstecknet ('' = '').
--        OpenQuoteExpected = \u00D6ppningscitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet \"{1}\" som associeras med elementtyp \"{0}\".
--        CloseQuoteExpected = Slutcitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet \"{1}\" som associeras med elementtyp \"{0}\".
--        AttributeNotUnique = Attributet \"{1}\" har redan angetts f\u00F6r elementet \"{0}\".
--        AttributeNSNotUnique = Attributet \"{1}\" bundet till namnrymden \"{2}\" har redan angetts f\u00F6r elementet \"{0}\".
--        ETagUnterminated = Sluttaggen f\u00F6r elementtyp \"{0}\" m\u00E5ste avslutas med en ''>''-avgr\u00E4nsare.
-+        ElementUnterminated = Elementtyp "{0}" m\u00E5ste f\u00F6ljas av n\u00E5gondera av attributspecifikationerna ">" eller "/>".
-+        EqRequiredInAttribute = Attributnamnet "{1}" som associeras med elementtyp "{0}" m\u00E5ste f\u00F6ljas av likhetstecknet ('' = '').
-+        OpenQuoteExpected = \u00D6ppningscitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet "{1}" som associeras med elementtyp "{0}".
-+        CloseQuoteExpected = Slutcitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet "{1}" som associeras med elementtyp "{0}".
-+        AttributeNotUnique = Attributet "{1}" har redan angetts f\u00F6r elementet "{0}".
-+        AttributeNSNotUnique = Attributet "{1}" bundet till namnrymden "{2}" har redan angetts f\u00F6r elementet "{0}".
-+        ETagUnterminated = Sluttaggen f\u00F6r elementtyp "{0}" m\u00E5ste avslutas med en ''>''-avgr\u00E4nsare.
-         MarkupNotRecognizedInContent = Elementinneh\u00E5llet m\u00E5ste best\u00E5 av v\u00E4lformulerad(e) teckendata eller kodtext.
-         DoctypeIllegalInContent = DOCTYPE \u00E4r inte till\u00E5tet i inneh\u00E5llet.
- # 4.1 Character and Entity References
-         ReferenceUnterminated = Referensen m\u00E5ste avslutas med en ';'-avgr\u00E4nsare.
- # 4.3.2 Well-Formed Parsed Entities
-         ReferenceNotInOneEntity = Referensen m\u00E5ste finnas med inom samma tolkade enhet.
--        ElementEntityMismatch = Elementet \"{0}\" m\u00E5ste b\u00F6rja och sluta inom samma enhet.
-+        ElementEntityMismatch = Elementet "{0}" m\u00E5ste b\u00F6rja och sluta inom samma enhet.
-         MarkupEntityMismatch=XML-dokumentstrukturer m\u00E5ste b\u00F6rja och sluta inom samma enhet.
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = Ett ogiltigt XML-tecken (Unicode: 0x{2}) hittades i attributv\u00E4rdet \"{1}\" och elementet \u00E4r \"{0}\".
-+        InvalidCharInAttValue = Ett ogiltigt XML-tecken (Unicode: 0x{2}) hittades i attributv\u00E4rdet "{1}" och elementet \u00E4r "{0}".
-         InvalidCharInComment = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i kommentaren.
--        InvalidCharInPI = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades bearbetningsinstruktionen.
-+        InvalidCharInPI = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i bearbetningsinstruktionen.
-         InvalidCharInInternalSubset = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i den interna delm\u00E4ngden i DTD.
-         InvalidCharInTextDecl = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i textdeklarationen.
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = Attributv\u00E4rdet \"{1}\" m\u00E5ste b\u00F6rja med antingen enkelt eller dubbelt citattecken.
--        LessthanInAttValue = Attributv\u00E4rdet \"{1}\" som associeras med elementtyp \"{0}\" f\u00E5r inte inneh\u00E5lla n\u00E5got ''<''-tecken.
--        AttributeValueUnterminated = Attributv\u00E4rdet \"{1}\" m\u00E5ste avslutas med matchande citattecken.
-+        QuoteRequiredInAttValue = Attributv\u00E4rdet "{1}" m\u00E5ste b\u00F6rja med antingen enkelt eller dubbelt citattecken.
-+        LessthanInAttValue = Attributv\u00E4rdet "{1}" som associeras med elementtyp "{0}" f\u00E5r inte inneh\u00E5lla n\u00E5got ''<''-tecken.
-+        AttributeValueUnterminated = Attributv\u00E4rdet "{1}" m\u00E5ste avslutas med matchande citattecken.
- # 2.5 Comments
--        InvalidCommentStart = Kommentarer m\u00E5ste inledas med \"\".
-+        InvalidCommentStart = Kommentarer m\u00E5ste inledas med "".
-         COMMENT_NOT_IN_ONE_ENTITY = Kommentaren innesluts inte i samma enhet.
- # 2.6 Processing Instructions
-         PITargetRequired = Bearbetningsinstruktionen m\u00E5ste b\u00F6rja med m\u00E5lnamnet.
-         SpaceRequiredInPI = Tomt utrymme kr\u00E4vs mellan bearbetningsinstruktionens m\u00E5l och data.
--        PIUnterminated = Bearbetningsinstruktionen m\u00E5ste avslutas med \"?>\".
--        ReservedPITarget = Bearbetningsinstruktionens m\u00E5lmatchning \"[xX][mM][lL]\" \u00E4r inte till\u00E5ten.
-+        PIUnterminated = Bearbetningsinstruktionen m\u00E5ste avslutas med "?>".
-+        ReservedPITarget = Bearbetningsinstruktionens m\u00E5lmatchning "[xX][mM][lL]" \u00E4r inte till\u00E5ten.
-         PI_NOT_IN_ONE_ENTITY = Bearbetningsinstruktionen innesluts inte i samma enhet.
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = Ogiltig version \"{0}\".
--        VersionNotSupported = XML-versionen \"{0}\" st\u00F6ds inte, endast XML 1.0 st\u00F6ds.
--        VersionNotSupported11 = XML-versionen \"{0}\" st\u00F6ds inte, endast XML 1.0 och XML 1.1 st\u00F6ds.
-+        VersionInfoInvalid = Ogiltig version "{0}".
-+        VersionNotSupported = XML-versionen "{0}" st\u00F6ds inte, endast XML 1.0 st\u00F6ds.
-+        VersionNotSupported11 = XML-versionen "{0}" st\u00F6ds inte, endast XML 1.0 och XML 1.1 st\u00F6ds.
-         VersionMismatch= En enhet kan inte inkludera n\u00E5gon annan enhet som har en senare version.
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = Ett decimalt uttryck m\u00E5ste anges direkt efter \"&#\" i en teckenreferens.
--        HexdigitRequiredInCharRef = Ett hexadecimalt uttryck m\u00E5ste anges direkt efter \"&#x\" i en teckenreferens.
-+        DigitRequiredInCharRef = Ett decimalt uttryck m\u00E5ste anges direkt efter "&#" i en teckenreferens.
-+        HexdigitRequiredInCharRef = Ett hexadecimalt uttryck m\u00E5ste anges direkt efter "&#x" i en teckenreferens.
-         SemicolonRequiredInCharRef = Teckenreferensen m\u00E5ste avslutas med ';'-avgr\u00E4nsare.
--        InvalidCharRef = Teckenreferensen \"&#{0}\" \u00E4r ett ogiltigt XML-tecken.
-+        InvalidCharRef = Teckenreferensen "&#{0}" \u00E4r ett ogiltigt XML-tecken.
-         NameRequiredInReference = Enhetsnamnet m\u00E5ste omedelbart f\u00F6ljas av '&' i enhetsreferensen.
--        SemicolonRequiredInReference = Referensen till enhet \"{0}\" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
-+        SemicolonRequiredInReference = Referensen till enhet "{0}" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
- # 4.3.1 The Text Declaration
-         TextDeclMustBeFirst = Textdeklarationen m\u00E5ste anges direkt i b\u00F6rjan av externt tolkad enhet.
--        EqRequiredInTextDecl = Ett likhetstecken ('' = '') m\u00E5ste anges efter \"{0}\" i textdeklarationen.
--        QuoteRequiredInTextDecl = V\u00E4rdet som f\u00F6ljer \"{0}\" i textdeklarationen m\u00E5ste omges av citattecken.
--        CloseQuoteMissingInTextDecl = avslutande citattecken saknas f\u00F6r v\u00E4rdet efter \"{0}\" i textdeklarationen.
-+        EqRequiredInTextDecl = Ett likhetstecken ('' = '') m\u00E5ste anges efter "{0}" i textdeklarationen.
-+        QuoteRequiredInTextDecl = V\u00E4rdet som f\u00F6ljer "{0}" i textdeklarationen m\u00E5ste omges av citattecken.
-+        CloseQuoteMissingInTextDecl = avslutande citattecken saknas f\u00F6r v\u00E4rdet efter "{0}" i textdeklarationen.
-         SpaceRequiredBeforeVersionInTextDecl = Tomt utrymme kr\u00E4vs f\u00F6re versionens pseudoattribut i textdeklarationen.
-         SpaceRequiredBeforeEncodingInTextDecl = Tomt utrymme kr\u00E4vs f\u00F6re kodningens pseudoattribut i textdeklarationen.
--        TextDeclUnterminated = Textdeklarationen m\u00E5ste avslutas med \"?>\".
-+        TextDeclUnterminated = Textdeklarationen m\u00E5ste avslutas med "?>".
-         EncodingDeclRequired = Koddeklaration kr\u00E4vs i textdeklarationen.
-         NoMorePseudoAttributes = Inga fler pseudoattribut \u00E4r till\u00E5tna.
-         MorePseudoAttributes = Ytterligare pseudoattribut f\u00F6rv\u00E4ntas.
-@@ -143,13 +141,13 @@
-         CommentNotInOneEntity = Kommentaren m\u00E5ste finnas med inom samma tolkade enhet.
-         PINotInOneEntity = Bearbetningsinstruktionen m\u00E5ste finnas med inom samma tolkade enhet.
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = Ogiltigt kodnamn, \"{0}\".
--        EncodingByteOrderUnsupported = Angiven byteordningsf\u00F6ljd i kodning \"{0}\" st\u00F6ds inte.
-+        EncodingDeclInvalid = Ogiltigt kodnamn, "{0}".
-+        EncodingByteOrderUnsupported = Angiven byteordningsf\u00F6ljd i kodning "{0}" st\u00F6ds inte.
-         InvalidByte = Ogiltig byte {0} i UTF-8-sekvensen f\u00F6r {1}-byte.
-         ExpectedByte = F\u00F6rv\u00E4ntad byte {0} i UTF-8-sekvensen f\u00F6r {1}-byte.  
-         InvalidHighSurrogate = H\u00F6ga surrogatbitar i UTF-8-sekvens f\u00E5r inte \u00F6verskrida 0x10, men 0x{0} hittades.
--        OperationNotSupported = Operation \"{0}\" st\u00F6ds inte i l\u00E4saren {1}.
--        InvalidASCII = Byte \"{0}\" ing\u00E5r inte i ASCII-teckenupps\u00E4ttningen (7 bitar).
-+        OperationNotSupported = Operation "{0}" st\u00F6ds inte i l\u00E4saren {1}.
-+        InvalidASCII = Byte "{0}" ing\u00E5r inte i ASCII-teckenupps\u00E4ttningen (7 bitar).
-         CharConversionFailure = En enhet som fastst\u00E4lls anv\u00E4nda ett visst kodformat f\u00E5r inte inneh\u00E5lla sekvenser som \u00E4r otill\u00E5tna i kodningen.
-         
- # DTD Messages
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = Tecknet (Unicode: 0x{0}) \u00E4r inte till\u00E5tet i den allm\u00E4nna identifieraren.
-         SpaceRequiredBetweenPublicAndSystem = Tomma utrymmen kr\u00E4vs mellan publicId och systemId.
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Tomt utrymme kr\u00E4vs efter \"''.
--        PEReferenceWithinMarkup = Parameterreferensen \"%{0};\" f\u00E5r inte f\u00F6rekomma i kodtexten i den interna delm\u00E4ngden i DTD.
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Tomt utrymme kr\u00E4vs efter "''.
-+        PEReferenceWithinMarkup = Parameterreferensen "%{0};" f\u00E5r inte f\u00F6rekomma i kodtexten i den interna delm\u00E4ngden i DTD.
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Kodtextdeklarationerna som finns med eller pekas till fr\u00E5n dokumenttypdeklarationen m\u00E5ste vara v\u00E4lformulerade.
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklarationen f\u00F6r \"xml:space\" m\u00E5ste anges som uppr\u00E4kningstyp vars enda m\u00F6jliga v\u00E4rden \u00E4r \"default\" och \"preserve\".
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklarationen f\u00F6r "xml:space" m\u00E5ste anges som uppr\u00E4kningstyp vars enda m\u00F6jliga v\u00E4rden \u00E4r "default" och "preserve".
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Tomt utrymme kr\u00E4vs efter \"''.
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Tomt utrymme kr\u00E4vs efter elementtyp "{0}" i elementtypdeklarationen.
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = Begr\u00E4nsningen kr\u00E4vs efter elementtyp "{0}" i elementtypdeklarationen.
-+        ElementDeclUnterminated = Deklarationen f\u00F6r elementtyp "{0}" m\u00E5ste avslutas med ''>''.
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Tecknet ''('' eller en elementtyp m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Tecknet ''('' eller en elementtyp m\u00E5ste anges i deklarationen av elementtyp "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp "{0}".
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = En elementtyp m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
--        MixedContentUnterminated = Modellen med blandat inneh\u00E5ll \"{0}\" m\u00E5ste avslutas med \")*\" om typer av underordnade element \u00E4r begr\u00E4nsade.
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = En elementtyp m\u00E5ste anges i deklarationen av elementtyp "{0}".
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp "{0}".
-+        MixedContentUnterminated = Modellen med blandat inneh\u00E5ll "{0}" m\u00E5ste avslutas med ")*" om typer av underordnade element \u00E4r begr\u00E4nsade.
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Tomt utrymme kr\u00E4vs efter \"\".
--        IgnoreSectUnterminated = Exkluderat villkorsavsnitt m\u00E5ste avslutas med \"]]>\".
-+        IncludeSectUnterminated = Inkluderat villkorsavsnitt m\u00E5ste avslutas med "]]>".
-+        IgnoreSectUnterminated = Exkluderat villkorsavsnitt m\u00E5ste avslutas med "]]>".
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = Enhetsnamnet m\u00E5ste omedelbart f\u00F6ljas av '%' i parameterreferensen.
--        SemicolonRequiredInPEReference = Parameterreferensen \"%{0};\" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
-+        SemicolonRequiredInPEReference = Parameterreferensen "%{0};" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Tomt utrymme kr\u00E4vs efter \"''.
--	MSG_DUPLICATE_ENTITY_DEFINITION = Enheten \"{0}\" har deklarerats mer \u00E4n en g\u00E5ng.        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Tomt utrymme kr\u00E4vs mellan enhetsnamnet "{0}" och definitionen i enhetsdeklarationen.
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Tomt utrymme kr\u00E4vs mellan "NDATA" och notationsnamnet i deklarationen f\u00F6r enheten "{0}".
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Tomt utrymme kr\u00E4vs f\u00F6re "NDATA" i deklarationen f\u00F6r enheten "{0}".
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Notationsnamnet m\u00E5ste anges efter "NDATA" i deklarationen f\u00F6r enheten "{0}".
-+        EntityDeclUnterminated = Deklarationen f\u00F6r enheten "{0}" m\u00E5ste avslutas med ''>''.
-+	MSG_DUPLICATE_ENTITY_DEFINITION = Enheten "{0}" har deklarerats mer \u00E4n en g\u00E5ng.        
- # 4.2.2 External Entities
--        ExternalIDRequired = Den externa enhetsdeklarationen m\u00E5ste inledas med antingen \"SYSTEM\" eller \"PUBLIC\".
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan \"PUBLIC\" och den allm\u00E4nna identifieraren.
-+        ExternalIDRequired = Den externa enhetsdeklarationen m\u00E5ste inledas med antingen "SYSTEM" eller "PUBLIC".
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan "PUBLIC" och den allm\u00E4nna identifieraren.
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan den allm\u00E4nna identifieraren och systemidentifieraren.
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan \"SYSTEM\" och systemidentifieraren.
--        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragmentidentifieraren f\u00E5r inte anges som del av systemidentifieraren \"{0}\".
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan "SYSTEM" och systemidentifieraren.
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragmentidentifieraren f\u00E5r inte anges som del av systemidentifieraren "{0}".
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Tomt utrymme kr\u00E4vs efter \"''.
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Tomt utrymme kr\u00E4vs efter notationsnamnet "{0}" i notationsdeklarationen.
-+        ExternalIDorPublicIDRequired = Deklarationen f\u00F6r notationen "{0}" m\u00E5ste inkludera systemidentifierare eller allm\u00E4n identifierare.
-+        NotationDeclUnterminated = Deklarationen f\u00F6r notationen "{0}" m\u00E5ste avslutas med ''>''.
-         
- # Validation messages
--        DuplicateTypeInMixedContent = Elementtyp \"{1}\" har redan angetts i modellen med inneh\u00E5ll f\u00F6r elementdeklarationen \"{0}\".
--        ENTITIESInvalid = Attributv\u00E4rdet \"{1}\" av typen ENTITIES m\u00E5ste motsvara namnen p\u00E5 en eller flera otolkade enheter.
--        ENTITYInvalid = Attributv\u00E4rdet \"{1}\" av typen ENTITY m\u00E5ste motsvara namnet p\u00E5 en otolkad enhet.
--        IDDefaultTypeInvalid = Id-attributet \"{0}\" m\u00E5ste inneh\u00E5lla deklarerat standardv\u00E4rde \"#IMPLIED\" eller \"#REQUIRED\".
--        IDInvalid = Attributv\u00E4rdet \"{0}\" av typen ID m\u00E5ste vara ett namn.
--        IDInvalidWithNamespaces = Attributv\u00E4rdet \"{0}\" av typen ID m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
--        IDNotUnique = Attributv\u00E4rdet \"{0}\" av typen ID m\u00E5ste vara unikt inom dokumentet.
--        IDREFInvalid = Attributv\u00E4rdet \"{0}\" av typen IDREF m\u00E5ste vara ett namn.
--        IDREFInvalidWithNamespaces = Attributv\u00E4rdet \"{0}\" av typen IDREF m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
--        IDREFSInvalid = Attributv\u00E4rdet \"{0}\" av typen IDREFS m\u00E5ste vara ett eller flera namn.
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5ste inkludera korrekt kapslade deklarationer om enhetsreferensen anv\u00E4nds som fullst\u00E4ndig deklaration.
--        ImproperDeclarationNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5ste inkludera deklarationer som \u00E4r korrekt kapslade.
--        ImproperGroupNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5ste inkludera parentespar som \u00E4r korrekt kapslade.
--        INVALID_PE_IN_CONDITIONAL = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5st inkludera hela villkorsavsnittet eller endast INCLUDE eller IGNORE.
--        MSG_ATTRIBUTE_NOT_DECLARED = Attributet \"{1}\" m\u00E5ste deklareras f\u00F6r elementtyp \"{0}\".
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attributet \"{0}\" med v\u00E4rdet \"{1}\" m\u00E5ste ha ett v\u00E4rde fr\u00E5n listan \"{2}\".
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = V\u00E4rdet \"{1}\" f\u00F6r attributet \"{0}\" f\u00E5r inte \u00E4ndras vid normalisering (till \"{2}\") i ett frist\u00E5ende dokument.
--        MSG_CONTENT_INCOMPLETE = Inneh\u00E5llet i elementtyp \"{0}\" \u00E4r ofullst\u00E4ndigt, det m\u00E5ste matcha \"{1}\".
--        MSG_CONTENT_INVALID = Inneh\u00E5llet i elementtyp \"{0}\" m\u00E5ste matcha \"{1}\".
--        MSG_CONTENT_INVALID_SPECIFIED = Inneh\u00E5llet i elementtyp \"{0}\" m\u00E5ste matcha \"{1}\". Underordnade till typ \"{2}\" \u00E4r inte till\u00E5tna.
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attributet \"{1}\" f\u00F6r elementtyp \"{0}\" har ett standardv\u00E4rde och m\u00E5ste anges i ett frist\u00E5ende dokument.
--        MSG_DUPLICATE_ATTDEF = Attributet \"{1}\" har redan deklarerats f\u00F6r elementtyp \"{0}\".
--        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp \"{0}\" f\u00E5r deklareras endast en g\u00E5ng.
--        MSG_ELEMENT_NOT_DECLARED = Elementtyp \"{0}\" m\u00E5ste deklareras.
-+        DuplicateTypeInMixedContent = Elementtyp "{1}" har redan angetts i modellen med inneh\u00E5ll f\u00F6r elementdeklarationen "{0}".
-+        ENTITIESInvalid = Attributv\u00E4rdet "{1}" av typen ENTITIES m\u00E5ste motsvara namnen p\u00E5 en eller flera otolkade enheter.
-+        ENTITYInvalid = Attributv\u00E4rdet "{1}" av typen ENTITY m\u00E5ste motsvara namnet p\u00E5 en otolkad enhet.
-+        IDDefaultTypeInvalid = Id-attributet "{0}" m\u00E5ste inneh\u00E5lla deklarerat standardv\u00E4rde "#IMPLIED" eller "#REQUIRED".
-+        IDInvalid = Attributv\u00E4rdet "{0}" av typen ID m\u00E5ste vara ett namn.
-+        IDInvalidWithNamespaces = Attributv\u00E4rdet "{0}" av typen ID m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
-+        IDNotUnique = Attributv\u00E4rdet "{0}" av typen ID m\u00E5ste vara unikt inom dokumentet.
-+        IDREFInvalid = Attributv\u00E4rdet "{0}" av typen IDREF m\u00E5ste vara ett namn.
-+        IDREFInvalidWithNamespaces = Attributv\u00E4rdet "{0}" av typen IDREF m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
-+        IDREFSInvalid = Attributv\u00E4rdet "{0}" av typen IDREFS m\u00E5ste vara ett eller flera namn.
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5ste inkludera korrekt kapslade deklarationer om enhetsreferensen anv\u00E4nds som fullst\u00E4ndig deklaration.
-+        ImproperDeclarationNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5ste inkludera deklarationer som \u00E4r korrekt kapslade.
-+        ImproperGroupNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5ste inkludera parentespar som \u00E4r korrekt kapslade.
-+        INVALID_PE_IN_CONDITIONAL = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5st inkludera hela villkorsavsnittet eller endast INCLUDE eller IGNORE.
-+        MSG_ATTRIBUTE_NOT_DECLARED = Attributet "{1}" m\u00E5ste deklareras f\u00F6r elementtyp "{0}".
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attributet "{0}" med v\u00E4rdet "{1}" m\u00E5ste ha ett v\u00E4rde fr\u00E5n listan "{2}".
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = V\u00E4rdet "{1}" f\u00F6r attributet "{0}" f\u00E5r inte \u00E4ndras vid normalisering (till "{2}") i ett frist\u00E5ende dokument.
-+        MSG_CONTENT_INCOMPLETE = Inneh\u00E5llet i elementtyp "{0}" \u00E4r ofullst\u00E4ndigt, det m\u00E5ste matcha "{1}".
-+        MSG_CONTENT_INVALID = Inneh\u00E5llet i elementtyp "{0}" m\u00E5ste matcha "{1}".
-+        MSG_CONTENT_INVALID_SPECIFIED = Inneh\u00E5llet i elementtyp "{0}" m\u00E5ste matcha "{1}". Underordnade till typ "{2}" \u00E4r inte till\u00E5tna.
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attributet "{1}" f\u00F6r elementtyp "{0}" har ett standardv\u00E4rde och m\u00E5ste anges i ett frist\u00E5ende dokument.
-+        MSG_DUPLICATE_ATTDEF = Attributet "{1}" har redan deklarerats f\u00F6r elementtyp "{0}".
-+        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp "{0}" f\u00E5r deklareras endast en g\u00E5ng.
-+        MSG_ELEMENT_NOT_DECLARED = Elementtyp "{0}" m\u00E5ste deklareras.
-         MSG_GRAMMAR_NOT_FOUND = Dokumentet \u00E4r ogiltigt: hittade ingen grammatik.
--        MSG_ELEMENT_WITH_ID_REQUIRED = Ett element med identifieraren \"{0}\" m\u00E5ste finnas med i dokumentet.
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referens till den externa enheten \"{0}\" \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
--        MSG_FIXED_ATTVALUE_INVALID = Attributet \"{1}\" med v\u00E4rdet \"{2}\" m\u00E5ste ha v\u00E4rdet \"{3}\".
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp \"{0}\" har redan attributet \"{1}\" av id-typ, ett andra attribut \"{2}\" av samma typ \u00E4r inte till\u00E5tet.
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp \"{0}\" har redan attributet \"{1}\" av NOTATION-typ, ett andra attribut \"{2}\" av samma typ \u00E4r inte till\u00E5tet.
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notationen \"{1}\" m\u00E5ste deklareras vid referens i notationstyplistan f\u00F6r attributet \"{0}\".
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notationen \"{1}\" m\u00E5ste deklareras vid referens i otolkad enhetsdeklaration f\u00F6r \"{0}\".
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referensen till enheten \"{0}\" som har deklarerats i en externt tolkad enhet \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attributet \"{1}\" m\u00E5ste anges f\u00F6r elementtyp \"{0}\".
-+        MSG_ELEMENT_WITH_ID_REQUIRED = Ett element med identifieraren "{0}" m\u00E5ste finnas med i dokumentet.
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referens till den externa enheten "{0}" \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
-+        MSG_FIXED_ATTVALUE_INVALID = Attributet "{1}" med v\u00E4rdet "{2}" m\u00E5ste ha v\u00E4rdet "{3}".
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp "{0}" har redan attributet "{1}" av id-typ, ett andra attribut "{2}" av samma typ \u00E4r inte till\u00E5tet.
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp "{0}" har redan attributet "{1}" av NOTATION-typ, ett andra attribut "{2}" av samma typ \u00E4r inte till\u00E5tet.
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notationen "{1}" m\u00E5ste deklareras vid referens i notationstyplistan f\u00F6r attributet "{0}".
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notationen "{1}" m\u00E5ste deklareras vid referens i otolkad enhetsdeklaration f\u00F6r "{0}".
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referensen till enheten "{0}" som har deklarerats i en externt tolkad enhet \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attributet "{1}" m\u00E5ste anges f\u00F6r elementtyp "{0}".
-         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Tomt utrymme f\u00E5r inte f\u00F6rekomma mellan element som har deklarerats i en externt tolkad enhet med elementinneh\u00E5ll i frist\u00E5ende dokument.
--        NMTOKENInvalid = Attributv\u00E4rdet \"{0}\" av typen NMTOKEN m\u00E5ste vara ett namntecken.
--        NMTOKENSInvalid = Attributv\u00E4rdet \"{0}\" av typen NMTOKENS m\u00E5ste vara ett eller flera namntecken.
--        NoNotationOnEmptyElement = Elementtyp \"{0}\" med deklarationen EMPTY kan inte deklareras med attributet \"{1}\" av typen NOTATION.
--        RootElementTypeMustMatchDoctypedecl = Dokumentrotelementet \"{1}\" m\u00E5ste matcha DOCTYPE-roten \"{0}\".
--        UndeclaredElementInContentSpec = Modellen med inneh\u00E5ll f\u00F6r elementet \"{0}\" refererar till elementet \"{1}\" som inte har deklarerats.
--        UniqueNotationName = Deklarationen f\u00F6r notationen \"{0}\" \u00E4r inte unik. Ett namn f\u00E5r inte deklareras i fler \u00E4n en notationsdeklaration.
-+        NMTOKENInvalid = Attributv\u00E4rdet "{0}" av typen NMTOKEN m\u00E5ste vara ett namntecken.
-+        NMTOKENSInvalid = Attributv\u00E4rdet "{0}" av typen NMTOKENS m\u00E5ste vara ett eller flera namntecken.
-+        NoNotationOnEmptyElement = Elementtyp "{0}" med deklarationen EMPTY kan inte deklareras med attributet "{1}" av typen NOTATION.
-+        RootElementTypeMustMatchDoctypedecl = Dokumentrotelementet "{1}" m\u00E5ste matcha DOCTYPE-roten "{0}".
-+        UndeclaredElementInContentSpec = Modellen med inneh\u00E5ll f\u00F6r elementet "{0}" refererar till elementet "{1}" som inte har deklarerats.
-+        UniqueNotationName = Deklarationen f\u00F6r notationen "{0}" \u00E4r inte unik. Ett namn f\u00E5r inte deklareras i fler \u00E4n en notationsdeklaration.
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype-validerare: Behov att anropa initieringsmetod med giltig grammatikreferens utf\u00F6rdes inte. \t
--        ENTITYNotUnparsed = ENTITY \"{0}\" \u00E4r otolkat.
--        ENTITYNotValid = ENTITY \"{0}\" \u00E4r inte giltigt.
-+        ENTITYNotUnparsed = ENTITY "{0}" \u00E4r otolkat.
-+        ENTITYNotValid = ENTITY "{0}" \u00E4r inte giltigt.
-         EmptyList = V\u00E4rdet f\u00F6r typ ENTITIES, IDREFS och NMTOKENS f\u00E5r inte vara en tom lista.
+ class G1ParVerifyTask: public AbstractGangTask {
+@@ -3364,21 +3415,16 @@
+   }
+ };
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = Den externa enhetsreferensen \"&{0};\" till\u00E5ts inte i ett attributv\u00E4rde.
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = Den externa enhetsreferensen "&{0};" till\u00E5ts inte i ett attributv\u00E4rde.
-+        AccessExternalDTD = Extern DTD: Kunde inte l\u00E4sa extern DTD ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av accessExternalDTD-egenskapen.
-+        AccessExternalEntity = Extern enhet: Kunde inte l\u00E4sa externt dokument ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av accessExternalDTD-egenskapen.
+-void G1CollectedHeap::verify(bool silent) {
+-  verify(silent, VerifyOption_G1UsePrevMarking);
+-}
+-
+-void G1CollectedHeap::verify(bool silent,
+-                             VerifyOption vo) {
++void G1CollectedHeap::verify(bool silent, VerifyOption vo) {
+   if (SafepointSynchronize::is_at_safepoint()) {
+-    if (!silent) { gclog_or_tty->print("Roots (excluding permgen) "); }
+-    VerifyRootsClosure rootsCl(vo);
+-
+     assert(Thread::current()->is_VM_thread(),
+            "Expected to be executed serially by the VM thread at this point");
+ 
+-    CodeBlobToOopClosure blobsCl(&rootsCl, /*do_marking=*/ false);
++    if (!silent) { gclog_or_tty->print("Roots (excluding permgen) "); }
++    VerifyRootsClosure rootsCl(vo);
+ 
++    G1VerifyCodeRootOopClosure codeRootsCl(this, &rootsCl, vo);
++    G1VerifyCodeRootBlobClosure blobsCl(&codeRootsCl);
+     // We apply the relevant closures to all the oops in the
+     // system dictionary, the string table and the code cache.
+     const int so = SO_AllClasses | SO_Strings | SO_CodeCache;
+@@ -3473,6 +3519,34 @@
+   }
+ }
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = Enheten \"{0}\" har refererats, men \u00E4r inte deklarerad.
--        ReferenceToUnparsedEntity = Den otolkade enhetsreferensen \"&{0};\" \u00E4r inte till\u00E5ten.
--        RecursiveReference = Rekursiv enhetsreferens \"{0}\". (Referenss\u00F6kv\u00E4g: {1}),
--        RecursiveGeneralReference = Rekursiv allm\u00E4n enhetsreferens \"&{0};\". (Referenss\u00F6kv\u00E4g: {1}),
--        RecursivePEReference = Rekursiv parameterreferens \"%{0};\". (Referenss\u00F6kv\u00E4g: {1}),
-+        EntityNotDeclared = Enheten "{0}" har refererats, men \u00E4r inte deklarerad.
-+        ReferenceToUnparsedEntity = Den otolkade enhetsreferensen "&{0};" \u00E4r inte till\u00E5ten.
-+        RecursiveReference = Rekursiv enhetsreferens "{0}". (Referenss\u00F6kv\u00E4g: {1}),
-+        RecursiveGeneralReference = Rekursiv allm\u00E4n enhetsreferens "&{0};". (Referenss\u00F6kv\u00E4g: {1}),
-+        RecursivePEReference = Rekursiv parameterreferens "%{0};". (Referenss\u00F6kv\u00E4g: {1}),
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = Kodningen \"{0}\" st\u00F6ds inte.
-+        EncodingNotSupported = Kodningen "{0}" st\u00F6ds inte.
-         EncodingRequired = En tolkad enhet som inte \u00E4r kodad i varken UTF-8 eller UTF-16 m\u00E5ste ha en kodningsdeklaration.
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = Element eller attribut matchar inte QName-produktion: QName::=(NCName':')?NCName. 
--        ElementXMLNSPrefix = Elementet \"{0}\" kan inte anv\u00E4ndas med \"xmlns\" som prefix.
--        ElementPrefixUnbound = Prefixet \"{0}\" f\u00F6r elementet \"{1}\" \u00E4r inte bundet.
--        AttributePrefixUnbound = Prefixet \"{2}\" f\u00F6r attributet \"{1}\" som associeras med elementtyp \"{0}\" \u00E4r inte bundet.
--        EmptyPrefixedAttName = Ogiltigt v\u00E4rde f\u00F6r attributet \"{0}\". Namnrymdsbindningar som prefix kanske inte \u00E4r tomma.
--        PrefixDeclared = Namnrymdsprefixet \"{0}\" har inte deklarerats.
-+        ElementXMLNSPrefix = Elementet "{0}" kan inte anv\u00E4ndas med "xmlns" som prefix.
-+        ElementPrefixUnbound = Prefixet "{0}" f\u00F6r elementet "{1}" \u00E4r inte bundet.
-+        AttributePrefixUnbound = Prefixet "{2}" f\u00F6r attributet "{1}" som associeras med elementtyp "{0}" \u00E4r inte bundet.
-+        EmptyPrefixedAttName = Ogiltigt v\u00E4rde f\u00F6r attributet "{0}". Namnrymdsbindningar som prefix kanske inte \u00E4r tomma.
-+        PrefixDeclared = Namnrymdsprefixet "{0}" har inte deklarerats.
-         CantBindXMLNS = Prefixet "xmlns" kan inte bindas till en specifik namnrymd och namnrymden f\u00F6r "xmlns" kan inte heller bindas till ett specifikt prefix.
-         CantBindXML = Prefixet "xml" kan inte bindas till en namnrymd ut\u00F6ver den vanliga och namnrymden f\u00F6r "xml" kan inte heller bindas till n\u00E5got annat prefix \u00E4n "xml".
--        MSG_ATT_DEFAULT_INVALID = defaultValue \"{1}\" f\u00F6r attributet \"{0}\" \u00E4r inte till\u00E5tet vad g\u00E4ller de lexikala begr\u00E4nsningarna f\u00F6r denna attributtyp.
-+        MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" f\u00F6r attributet "{0}" \u00E4r inte till\u00E5tet vad g\u00E4ller de lexikala begr\u00E4nsningarna f\u00F6r denna attributtyp.
++void G1CollectedHeap::verify(bool silent) {
++  verify(silent, VerifyOption_G1UsePrevMarking);
++}
++
++double G1CollectedHeap::verify(bool guard, const char* msg) {
++  double verify_time_ms = 0.0;
++
++  if (guard && total_collections() >= VerifyGCStartAt) {
++    double verify_start = os::elapsedTime();
++    HandleMark hm;  // Discard invalid handles created during verification
++    prepare_for_verify();
++    Universe::verify(VerifyOption_G1UsePrevMarking, msg);
++    verify_time_ms = (os::elapsedTime() - verify_start) * 1000;
++  }
++
++  return verify_time_ms;
++}
++
++void G1CollectedHeap::verify_before_gc() {
++  double verify_time_ms = verify(VerifyBeforeGC, " VerifyBeforeGC:");
++  g1_policy()->phase_times()->record_verify_before_time_ms(verify_time_ms);
++}
++
++void G1CollectedHeap::verify_after_gc() {
++  double verify_time_ms = verify(VerifyAfterGC, " VerifyAfterGC:");
++  g1_policy()->phase_times()->record_verify_after_time_ms(verify_time_ms);
++}
++
+ class PrintRegionClosure: public HeapRegionClosure {
+   outputStream* _st;
+ public:
+@@ -3616,9 +3690,22 @@
+   AllocationProfiler::iterate_since_last_gc();
+   // Fill TLAB's and such
+   ensure_parsability(true);
++
++  if (G1SummarizeRSetStats && (G1SummarizeRSetStatsPeriod > 0) &&
++      (total_collections() % G1SummarizeRSetStatsPeriod == 0)) {
++    g1_rem_set()->print_periodic_summary_info("Before GC RS summary");
++  }
+ }
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+ void G1CollectedHeap::gc_epilogue(bool full /* Ignored */) {
++
++  if (G1SummarizeRSetStats &&
++      (G1SummarizeRSetStatsPeriod > 0) &&
++      // we are at the end of the GC. Total collections has already been increased.
++      ((total_collections() - 1) % G1SummarizeRSetStatsPeriod == 0)) {
++    g1_rem_set()->print_periodic_summary_info("After GC RS summary");
++  }
++
+   // FIXME: what is this about?
+   // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
+   // is set.
+@@ -3815,7 +3902,7 @@
+     return false;
+   }
  
+-  _gc_timer_stw->register_gc_start(os::elapsed_counter());
++  _gc_timer_stw->register_gc_start();
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=Parsern har p\u00E5tr\u00E4ffat fler \u00E4n \"{0}\" enhetstill\u00E4gg i dokumentet - applikationens gr\u00E4nsv\u00E4rde har uppn\u00E5tts.
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: Parsern har p\u00E5tr\u00E4ffat fler \u00E4n "{0}" enhetstill\u00E4gg i dokumentet - gr\u00E4nsv\u00E4rdet f\u00F6r JDK har uppn\u00E5tts.
-+        ElementAttributeLimit=JAXP00010002:  Elementet "{0}" har fler \u00E4n "{1}" attribut, "{1}" \u00E4r gr\u00E4nsv\u00E4rdet f\u00F6r JDK.
-+        MaxEntitySizeLimit=JAXP00010003: L\u00E4ngden p\u00E5 enheten "{0}" \u00E4r "{1}" som \u00F6verskriver gr\u00E4nsv\u00E4rdet p\u00E5 "{2}" som anges av "{3}".
-+        TotalEntitySizeLimit=JAXP00010004: Den ackumulerade storleken "{0}" f\u00F6r enheter \u00F6verskred gr\u00E4nsv\u00E4rdet p\u00E5 "{1}" som anges av "{2}".
-+        MaxXMLNameLimit=JAXP00010005: Namnet "{0}" \u00F6verskred gr\u00E4nsv\u00E4rdet p\u00E5 "{1}" som anges av "{2}".
+   _gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start());
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= Elementet \"{0}\" har fler \u00E4n \"{1}\" attribut, \"{1}\" \u00E4r applikationens gr\u00E4nsv\u00E4rde.
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,26 @@
--/*
-- * 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.
-- */
+@@ -3880,8 +3967,9 @@
+       append_secondary_free_list_if_not_empty_with_lock();
+     }
+ 
+-    assert(check_young_list_well_formed(),
+-      "young list should be well formed");
++    assert(check_young_list_well_formed(), "young list should be well formed");
++    assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue),
++           "sanity check");
+ 
+     // Don't dynamically change the number of GC threads this early.  A value of
+     // 0 is used to indicate serial work.  When parallel work is done,
+@@ -4193,15 +4281,10 @@
+ 
+     _gc_tracer_stw->report_evacuation_info(&evacuation_info);
+     _gc_tracer_stw->report_tenuring_threshold(_g1_policy->tenuring_threshold());
+-    _gc_timer_stw->register_gc_end(os::elapsed_counter());
++    _gc_timer_stw->register_gc_end();
+     _gc_tracer_stw->report_gc_end(_gc_timer_stw->gc_end(), _gc_timer_stw->time_partitions());
+   }
+ 
+-  if (G1SummarizeRSetStats &&
+-      (G1SummarizeRSetStatsPeriod > 0) &&
+-      (total_collections() % G1SummarizeRSetStatsPeriod == 0)) {
+-    g1_rem_set()->print_summary_info();
+-  }
+   // It should now be safe to tell the concurrent mark thread to start
+   // without its logging output interfering with the logging output
+   // that came from the pause.
+@@ -4482,7 +4565,7 @@
+   : _g1h(g1h),
+     _refs(g1h->task_queue(queue_num)),
+     _dcq(&g1h->dirty_card_queue_set()),
+-    _ct_bs((CardTableModRefBS*)_g1h->barrier_set()),
++    _ct_bs(g1h->g1_barrier_set()),
+     _g1_rem(g1h->g1_rem_set()),
+     _hash_seed(17), _queue_num(queue_num),
+     _term_attempts(0),
+@@ -4975,7 +5058,8 @@
+                                     scan_root_cl,
+                                     &push_heap_rs_cl,
+                                     scan_perm_cl,
+-                                    worker_id);
++                                    worker_id,
++                                    /* manages_code_roots */ true);
+       pss.end_strong_roots();
+ 
+       {
+@@ -5009,67 +5093,6 @@
+ 
+ // *** Common G1 Evacuation Stuff
+ 
+-// Closures that support the filtering of CodeBlobs scanned during
+-// external root scanning.
 -
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
+-// Closure applied to reference fields in code blobs (specifically nmethods)
+-// to determine whether an nmethod contains references that point into
+-// the collection set. Used as a predicate when walking code roots so
+-// that only nmethods that point into the collection set are added to the
+-// 'marked' list.
+-
+-class G1FilteredCodeBlobToOopClosure : public CodeBlobToOopClosure {
+-
+-  class G1PointsIntoCSOopClosure : public OopClosure {
+-    G1CollectedHeap* _g1;
+-    bool _points_into_cs;
+-  public:
+-    G1PointsIntoCSOopClosure(G1CollectedHeap* g1) :
+-      _g1(g1), _points_into_cs(false) { }
+-
+-    bool points_into_cs() const { return _points_into_cs; }
+-
+-    template 
+-    void do_oop_nv(T* p) {
+-      if (!_points_into_cs) {
+-        T heap_oop = oopDesc::load_heap_oop(p);
+-        if (!oopDesc::is_null(heap_oop) &&
+-            _g1->in_cset_fast_test(oopDesc::decode_heap_oop_not_null(heap_oop))) {
+-          _points_into_cs = true;
+-        }
+-      }
+-    }
+-
+-    virtual void do_oop(oop* p)        { do_oop_nv(p); }
+-    virtual void do_oop(narrowOop* p)  { do_oop_nv(p); }
+-  };
+-
+-  G1CollectedHeap* _g1;
+-
+-public:
+-  G1FilteredCodeBlobToOopClosure(G1CollectedHeap* g1, OopClosure* cl) :
+-    CodeBlobToOopClosure(cl, true), _g1(g1) { }
+-
+-  virtual void do_code_blob(CodeBlob* cb) {
+-    nmethod* nm = cb->as_nmethod_or_null();
+-    if (nm != NULL && !(nm->test_oops_do_mark())) {
+-      G1PointsIntoCSOopClosure predicate_cl(_g1);
+-      nm->oops_do(&predicate_cl);
+-
+-      if (predicate_cl.points_into_cs()) {
+-        // At least one of the reference fields or the oop relocations
+-        // in the nmethod points into the collection set. We have to
+-        // 'mark' this nmethod.
+-        // Note: Revisit the following if CodeBlobToOopClosure::do_code_blob()
+-        // or MarkingCodeBlobClosure::do_code_blob() change.
+-        if (!nm->test_set_oops_do_mark()) {
+-          do_newly_marked_nmethod(nm);
+-        }
+-      }
+-    }
+-  }
+-};
+-
+ // This method is run in a GC worker.
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +44,14 @@
-         InvalidCharInProlog = \u5728\u6587\u6863\u524D\u8A00\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
-         InvalidCharInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
- # 2.4 Character Data and Markup
--        CDEndInContent = \u9664\u975E\u4F7F\u7528\u5B57\u7B26\u5E8F\u5217 \"]]>\" \u6765\u6807\u8BB0 CDATA \u8282\u7684\u7ED3\u5C3E, \u5426\u5219\u8BE5\u5B57\u7B26\u5E8F\u5217\u4E0D\u80FD\u51FA\u73B0\u5728\u5185\u5BB9\u4E2D\u3002
-+        CDEndInContent = \u9664\u975E\u4F7F\u7528\u5B57\u7B26\u5E8F\u5217 "]]>" \u6765\u6807\u8BB0 CDATA \u8282\u7684\u7ED3\u5C3E, \u5426\u5219\u8BE5\u5B57\u7B26\u5E8F\u5217\u4E0D\u80FD\u51FA\u73B0\u5728\u5185\u5BB9\u4E2D\u3002
- # 2.7 CDATA Sections
--        CDSectUnterminated = CDATA \u8282\u5FC5\u987B\u4EE5 \"]]>\" \u7ED3\u5C3E\u3002
-+        CDSectUnterminated = CDATA \u8282\u5FC5\u987B\u4EE5 "]]>" \u7ED3\u5C3E\u3002
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = XML \u58F0\u660E\u53EA\u80FD\u51FA\u73B0\u5728\u6587\u6863\u7684\u6700\u5F00\u5934\u5904\u3002
--        EqRequiredInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D, \"{0}\" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
--        QuoteRequiredInXMLDecl = XML \u58F0\u660E\u4E2D \"{0}\" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
--        XMLDeclUnterminated = XML \u58F0\u660E\u5FC5\u987B\u4EE5 \"?>\" \u7ED3\u5C3E\u3002
-+        EqRequiredInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D, "{0}" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
-+        QuoteRequiredInXMLDecl = XML \u58F0\u660E\u4E2D "{0}" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
-+        XMLDeclUnterminated = XML \u58F0\u660E\u5FC5\u987B\u4EE5 "?>" \u7ED3\u5C3E\u3002
-         VersionInfoRequired = XML \u58F0\u660E\u4E2D\u9700\u8981\u6B64\u7248\u672C\u3002
-         SpaceRequiredBeforeVersionInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D\u7684\u7248\u672C\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
-         SpaceRequiredBeforeEncodingInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D\u7684\u7F16\u7801\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
-@@ -71,85 +67,86 @@
-         ReferenceIllegalInTrailingMisc=\u5C3E\u968F\u8282\u4E2D\u4E0D\u5141\u8BB8\u6709\u5F15\u7528\u3002
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = \u72EC\u7ACB\u6587\u6863\u58F0\u660E\u503C\u5FC5\u987B\u4E3A \"\u662F\" \u6216 \"\u5426\", \u4E0D\u80FD\u4E3A \"{0}\"\u3002
-+        SDDeclInvalid = \u72EC\u7ACB\u6587\u6863\u58F0\u660E\u503C\u5FC5\u987B\u4E3A "\u662F" \u6216 "\u5426", \u4E0D\u80FD\u4E3A "{0}"\u3002
-+        SDDeclNameInvalid = XML \u58F0\u660E\u4E2D\u7684\u72EC\u7ACB\u540D\u79F0\u53EF\u80FD\u62FC\u5199\u6709\u8BEF\u3002
- # 2.12 Language Identification
--        XMLLangInvalid = xml:lang \u5C5E\u6027\u503C \"{0}\" \u662F\u65E0\u6548\u7684\u8BED\u8A00\u6807\u8BC6\u7B26\u3002
-+        XMLLangInvalid = xml:lang \u5C5E\u6027\u503C "{0}" \u662F\u65E0\u6548\u7684\u8BED\u8A00\u6807\u8BC6\u7B26\u3002
- # 3. Logical Structures
--        ETagRequired = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5FC5\u987B\u7531\u5339\u914D\u7684\u7ED3\u675F\u6807\u8BB0 \"\" \u7EC8\u6B62\u3002
-+        ETagRequired = \u5143\u7D20\u7C7B\u578B "{0}" \u5FC5\u987B\u7531\u5339\u914D\u7684\u7ED3\u675F\u6807\u8BB0 "" \u7EC8\u6B62\u3002
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5FC5\u987B\u540E\u8DDF\u5C5E\u6027\u89C4\u8303 \">\" \u6216 \"/>\"\u3002
--        EqRequiredInAttribute = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027\u540D \"{1}\" \u5FC5\u987B\u540E\u8DDF '' = '' \u5B57\u7B26\u3002
--        OpenQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027 \"{1}\" \u5E94\u6709\u5DE6\u5F15\u53F7\u3002
--        CloseQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027 \"{1}\" \u5E94\u6709\u53F3\u5F15\u53F7\u3002
--        AttributeNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 \"{0}\" \u6307\u5B9A\u5C5E\u6027 \"{1}\"\u3002
--        AttributeNSNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 \"{0}\" \u6307\u5B9A\u7ED1\u5B9A\u5230\u540D\u79F0\u7A7A\u95F4 \"{2}\" \u7684\u5C5E\u6027 \"{1}\"\u3002
--        ETagUnterminated = \u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u7ED3\u675F\u6807\u8BB0\u5FC5\u987B\u4EE5 ''>'' \u5206\u9694\u7B26\u7ED3\u675F\u3002
-+        ElementUnterminated = \u5143\u7D20\u7C7B\u578B "{0}" \u5FC5\u987B\u540E\u8DDF\u5C5E\u6027\u89C4\u8303 ">" \u6216 "/>"\u3002
-+        EqRequiredInAttribute = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027\u540D "{1}" \u5FC5\u987B\u540E\u8DDF '' = '' \u5B57\u7B26\u3002
-+        OpenQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u5E94\u6709\u5DE6\u5F15\u53F7\u3002
-+        CloseQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u5E94\u6709\u53F3\u5F15\u53F7\u3002
-+        AttributeNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 "{0}" \u6307\u5B9A\u5C5E\u6027 "{1}"\u3002
-+        AttributeNSNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 "{0}" \u6307\u5B9A\u7ED1\u5B9A\u5230\u540D\u79F0\u7A7A\u95F4 "{2}" \u7684\u5C5E\u6027 "{1}"\u3002
-+        ETagUnterminated = \u5143\u7D20\u7C7B\u578B "{0}" \u7684\u7ED3\u675F\u6807\u8BB0\u5FC5\u987B\u4EE5 ''>'' \u5206\u9694\u7B26\u7ED3\u675F\u3002
-         MarkupNotRecognizedInContent = \u5143\u7D20\u5185\u5BB9\u5FC5\u987B\u7531\u683C\u5F0F\u6B63\u786E\u7684\u5B57\u7B26\u6570\u636E\u6216\u6807\u8BB0\u7EC4\u6210\u3002
-         DoctypeIllegalInContent = \u5185\u5BB9\u4E2D\u4E0D\u5141\u8BB8\u6709 DOCTYPE\u3002
- # 4.1 Character and Entity References
-         ReferenceUnterminated = \u5F15\u7528\u5FC5\u987B\u4EE5 ';' \u5206\u9694\u7B26\u7EC8\u6B62\u3002
- # 4.3.2 Well-Formed Parsed Entities
--        ReferenceNotInOneEntity = \u5F15\u7528\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5185\u3002
--        ElementEntityMismatch = \u5143\u7D20 \"{0}\" \u5FC5\u987B\u4ECE\u5934\u81F3\u5C3E\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
-+        ReferenceNotInOneEntity = \u5F15\u7528\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u89E3\u6790\u5B9E\u4F53\u5185\u3002
-+        ElementEntityMismatch = \u5143\u7D20 "{0}" \u5FC5\u987B\u4ECE\u5934\u81F3\u5C3E\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
-         MarkupEntityMismatch=XML \u6587\u6863\u7ED3\u6784\u5FC5\u987B\u4ECE\u5934\u81F3\u5C3E\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = \u5728 \"{1}\" \u5C5E\u6027\u503C\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{2}), \u5E76\u4E14\u5143\u7D20\u4E3A \"{0}\"\u3002
-+        InvalidCharInAttValue = \u5728 "{1}" \u5C5E\u6027\u503C\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{2}), \u5E76\u4E14\u5143\u7D20\u4E3A "{0}"\u3002
-         InvalidCharInComment = \u5728\u6CE8\u91CA\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
-         InvalidCharInPI = \u5728\u5904\u7406\u6307\u4EE4\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
-         InvalidCharInInternalSubset = \u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
-         InvalidCharInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = \"{1}\" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5355\u5F15\u53F7\u5B57\u7B26\u6216\u53CC\u5F15\u53F7\u5B57\u7B26\u5F00\u5934\u3002
--        LessthanInAttValue = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684 \"{1}\" \u5C5E\u6027\u503C\u4E0D\u80FD\u5305\u542B ''<'' \u5B57\u7B26\u3002
--        AttributeValueUnterminated = \"{1}\" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5339\u914D\u7684\u5F15\u53F7\u5B57\u7B26\u7ED3\u5C3E\u3002
-+        QuoteRequiredInAttValue = "{1}" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5355\u5F15\u53F7\u5B57\u7B26\u6216\u53CC\u5F15\u53F7\u5B57\u7B26\u5F00\u5934\u3002
-+        LessthanInAttValue = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684 "{1}" \u5C5E\u6027\u503C\u4E0D\u80FD\u5305\u542B ''<'' \u5B57\u7B26\u3002
-+        AttributeValueUnterminated = "{1}" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5339\u914D\u7684\u5F15\u53F7\u5B57\u7B26\u7ED3\u5C3E\u3002
- # 2.5 Comments
--        InvalidCommentStart = \u6CE8\u91CA\u5FC5\u987B\u4EE5 \"\" \u7ED3\u5C3E\u3002
-+        InvalidCommentStart = \u6CE8\u91CA\u5FC5\u987B\u4EE5 "" \u7ED3\u5C3E\u3002
-         COMMENT_NOT_IN_ONE_ENTITY = \u6CE8\u91CA\u6CA1\u6709\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
- # 2.6 Processing Instructions
-         PITargetRequired = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u4EE5\u76EE\u6807\u540D\u79F0\u5F00\u5934\u3002
-         SpaceRequiredInPI = \u5728\u5904\u7406\u6307\u4EE4\u76EE\u6807\u548C\u6570\u636E\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
--        PIUnterminated = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u4EE5 \"?>\" \u7ED3\u5C3E\u3002
--        ReservedPITarget = \u4E0D\u5141\u8BB8\u6709\u5339\u914D \"[xX][mM][lL]\" \u7684\u5904\u7406\u6307\u4EE4\u76EE\u6807\u3002
-+        PIUnterminated = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u4EE5 "?>" \u7ED3\u5C3E\u3002
-+        ReservedPITarget = \u4E0D\u5141\u8BB8\u6709\u5339\u914D "[xX][mM][lL]" \u7684\u5904\u7406\u6307\u4EE4\u76EE\u6807\u3002
-         PI_NOT_IN_ONE_ENTITY = \u5904\u7406\u6307\u4EE4\u6CA1\u6709\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = \u7248\u672C \"{0}\" \u65E0\u6548\u3002
--        VersionNotSupported = \u4E0D\u652F\u6301 XML \u7248\u672C \"{0}\", \u53EA\u652F\u6301 XML 1.0\u3002
--        VersionNotSupported11 = \u4E0D\u652F\u6301 XML \u7248\u672C \"{0}\", \u53EA\u652F\u6301 XML 1.0 \u548C XML 1.1\u3002
-+        VersionInfoInvalid = \u7248\u672C "{0}" \u65E0\u6548\u3002
-+        VersionNotSupported = \u4E0D\u652F\u6301 XML \u7248\u672C "{0}", \u53EA\u652F\u6301 XML 1.0\u3002
-+        VersionNotSupported11 = \u4E0D\u652F\u6301 XML \u7248\u672C "{0}", \u53EA\u652F\u6301 XML 1.0 \u548C XML 1.1\u3002
-         VersionMismatch= \u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u8F83\u9AD8\u7248\u672C\u7684\u53E6\u4E00\u4E2A\u5B9E\u4F53\u3002
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 \"&#\" \u540E\u9762\u3002
--        HexdigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u516D\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 \"&#x\" \u540E\u9762\u3002
-+        DigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 "&#" \u540E\u9762\u3002
-+        HexdigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u516D\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 "&#x" \u540E\u9762\u3002
-         SemicolonRequiredInCharRef = \u5B57\u7B26\u5F15\u7528\u5FC5\u987B\u4EE5 ';' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
--        InvalidCharRef = \u5B57\u7B26\u5F15\u7528 \"&#{0}\" \u662F\u65E0\u6548\u7684 XML \u5B57\u7B26\u3002
-+        InvalidCharRef = \u5B57\u7B26\u5F15\u7528 "&#{0}" \u662F\u65E0\u6548\u7684 XML \u5B57\u7B26\u3002
-         NameRequiredInReference = \u5728\u5B9E\u4F53\u5F15\u7528\u4E2D, \u5B9E\u4F53\u540D\u79F0\u5FC5\u987B\u7D27\u8DDF\u5728 '&' \u540E\u9762\u3002
--        SemicolonRequiredInReference = \u5BF9\u5B9E\u4F53 \"{0}\" \u7684\u5F15\u7528\u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
-+        SemicolonRequiredInReference = \u5BF9\u5B9E\u4F53 "{0}" \u7684\u5F15\u7528\u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
- # 4.3.1 The Text Declaration
--        TextDeclMustBeFirst = \u6587\u672C\u58F0\u660E\u53EA\u80FD\u51FA\u73B0\u5728\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u7684\u6700\u5F00\u5934\u5904\u3002
--        EqRequiredInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D, \"{0}\" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
--        QuoteRequiredInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D \"{0}\" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
--        CloseQuoteMissingInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D \"{0}\" \u540E\u9762\u8DDF\u968F\u7684\u503C\u7F3A\u5C11\u53F3\u5F15\u53F7\u3002
-+        TextDeclMustBeFirst = \u6587\u672C\u58F0\u660E\u53EA\u80FD\u51FA\u73B0\u5728\u5DF2\u89E3\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u7684\u6700\u5F00\u5934\u5904\u3002
-+        EqRequiredInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D, "{0}" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
-+        QuoteRequiredInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D "{0}" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
-+        CloseQuoteMissingInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D "{0}" \u540E\u9762\u8DDF\u968F\u7684\u503C\u7F3A\u5C11\u53F3\u5F15\u53F7\u3002
-         SpaceRequiredBeforeVersionInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D\u7684\u7248\u672C\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
-         SpaceRequiredBeforeEncodingInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D\u7684\u7F16\u7801\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
--        TextDeclUnterminated = \u6587\u672C\u58F0\u660E\u5FC5\u987B\u4EE5 \"?>\" \u7ED3\u5C3E\u3002
-+        TextDeclUnterminated = \u6587\u672C\u58F0\u660E\u5FC5\u987B\u4EE5 "?>" \u7ED3\u5C3E\u3002
-         EncodingDeclRequired = \u6587\u672C\u58F0\u660E\u4E2D\u9700\u8981\u7F16\u7801\u58F0\u660E\u3002
-         NoMorePseudoAttributes = \u4E0D\u5141\u8BB8\u4F7F\u7528\u66F4\u591A\u7684\u4F2A\u5C5E\u6027\u3002
-         MorePseudoAttributes = \u5E94\u8BE5\u6709\u66F4\u591A\u7684\u4F2A\u5C5E\u6027\u3002
-         PseudoAttrNameExpected = \u5E94\u8BE5\u6709\u4F2A\u5C5E\u6027\u540D\u3002
- # 4.3.2 Well-Formed Parsed Entities
--        CommentNotInOneEntity = \u6CE8\u91CA\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5185\u3002
--        PINotInOneEntity = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5185\u3002
-+        CommentNotInOneEntity = \u6CE8\u91CA\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u89E3\u6790\u5B9E\u4F53\u5185\u3002
-+        PINotInOneEntity = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u89E3\u6790\u5B9E\u4F53\u5185\u3002
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = \u7F16\u7801\u540D\u79F0 \"{0}\" \u65E0\u6548\u3002
--        EncodingByteOrderUnsupported = \u4E0D\u652F\u6301\u7F16\u7801 \"{0}\" \u7684\u7ED9\u5B9A\u5B57\u8282\u987A\u5E8F\u3002
-+        EncodingDeclInvalid = \u7F16\u7801\u540D\u79F0 "{0}" \u65E0\u6548\u3002
-+        EncodingByteOrderUnsupported = \u4E0D\u652F\u6301\u7F16\u7801 "{0}" \u7684\u7ED9\u5B9A\u5B57\u8282\u987A\u5E8F\u3002
-         InvalidByte = {1} \u5B57\u8282\u7684 UTF-8 \u5E8F\u5217\u7684\u5B57\u8282 {0} \u65E0\u6548\u3002
-         ExpectedByte = \u5E94\u4E3A {1} \u5B57\u8282\u7684 UTF-8 \u5E8F\u5217\u7684\u5B57\u8282 {0}\u3002
-         InvalidHighSurrogate = UTF-8 \u5E8F\u5217\u4E2D\u7684\u9AD8\u4EE3\u7406\u4F4D\u4E0D\u80FD\u8D85\u8FC7 0x10, \u4F46\u627E\u5230 0x{0}\u3002
--        OperationNotSupported = {1}\u8BFB\u8FDB\u7A0B\u4E0D\u652F\u6301\u64CD\u4F5C \"{0}\"\u3002
--        InvalidASCII = \u5B57\u8282 \"{0}\" \u4E0D\u662F (7 \u4F4D) ASCII \u5B57\u7B26\u96C6\u7684\u6210\u5458\u3002
-+        OperationNotSupported = {1}\u8BFB\u8FDB\u7A0B\u4E0D\u652F\u6301\u64CD\u4F5C "{0}"\u3002
-+        InvalidASCII = \u5B57\u8282 "{0}" \u4E0D\u662F (7 \u4F4D) ASCII \u5B57\u7B26\u96C6\u7684\u6210\u5458\u3002
-         CharConversionFailure = \u786E\u5B9A\u5C5E\u4E8E\u67D0\u4E2A\u7F16\u7801\u7684\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u5728\u8BE5\u7F16\u7801\u4E2D\u975E\u6CD5\u7684\u5E8F\u5217\u3002
-         
- # DTD Messages
-@@ -169,150 +166,150 @@
-         PubidCharIllegal = \u516C\u5171\u6807\u8BC6\u7B26\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u8BE5\u5B57\u7B26 (Unicode: 0x{0})\u3002
-         SpaceRequiredBetweenPublicAndSystem = \u5728 publicId \u548C systemId \u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u6863\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
--        PEReferenceWithinMarkup = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 \"%{0};\" \u4E0D\u80FD\u51FA\u73B0\u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u7684\u6807\u8BB0\u5185\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u6863\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 "'' \u7ED3\u5C3E\u3002
-+        PEReferenceWithinMarkup = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};" \u4E0D\u80FD\u51FA\u73B0\u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u7684\u6807\u8BB0\u5185\u3002
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u6587\u6863\u7C7B\u578B\u58F0\u660E\u5305\u542B\u6216\u6307\u5411\u7684\u6807\u8BB0\u58F0\u660E\u5FC5\u987B\u683C\u5F0F\u6B63\u786E\u3002
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\" \u7684\u5C5E\u6027\u58F0\u660E\u5FC5\u987B\u6307\u5B9A\u4E3A\u679A\u4E3E\u7C7B\u578B, \u5B83\u7684\u53EF\u80FD\u503C\u53EA\u6709 \"default\" \u548C \"preserve\"\u3002
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space" \u7684\u5C5E\u6027\u58F0\u660E\u5FC5\u987B\u6307\u5B9A\u4E3A\u679A\u4E3E\u7C7B\u578B, \u5B83\u7684\u53EF\u80FD\u503C\u53EA\u6709 "default" \u548C "preserve"\u3002
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u5728\u5143\u7D20\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u5728\u5143\u7D20\u7C7B\u578B\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u7C7B\u578B "{0}" \u540E\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u5728\u5143\u7D20\u7C7B\u578B\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u7C7B\u578B "{0}" \u540E\u9762\u9700\u8981\u6709\u7EA6\u675F\u6761\u4EF6\u3002
-+        ElementDeclUnterminated = \u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 ''('' \u5B57\u7B26\u6216\u5143\u7D20\u7C7B\u578B\u3002
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 ''('' \u5B57\u7B26\u6216\u5143\u7D20\u7C7B\u578B\u3002
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709\u5143\u7D20\u7C7B\u578B\u3002
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
--        MixedContentUnterminated = \u5F53\u5B50\u5143\u7D20\u7C7B\u578B\u53D7\u7EA6\u675F\u65F6, \u6DF7\u5408\u5185\u5BB9\u6A21\u578B \"{0}\" \u5FC5\u987B\u4EE5 \")*\" \u7ED3\u5C3E\u3002
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709\u5143\u7D20\u7C7B\u578B\u3002
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
-+        MixedContentUnterminated = \u5F53\u5B50\u5143\u7D20\u7C7B\u578B\u53D7\u7EA6\u675F\u65F6, \u6DF7\u5408\u5185\u5BB9\u6A21\u578B "{0}" \u5FC5\u987B\u4EE5 ")*" \u7ED3\u5C3E\u3002
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u5728\u5C5E\u6027\u5217\u8868\u58F0\u660E\u4E2D\u7684 \"\" \u7ED3\u5C3E\u3002
--        IgnoreSectUnterminated = \u6392\u9664\u7684\u6761\u4EF6\u8282\u5FC5\u987B\u4EE5 \"]]>\" \u7ED3\u5C3E\u3002
-+        IncludeSectUnterminated = \u5305\u542B\u7684\u6761\u4EF6\u8282\u5FC5\u987B\u4EE5 "]]>" \u7ED3\u5C3E\u3002
-+        IgnoreSectUnterminated = \u6392\u9664\u7684\u6761\u4EF6\u8282\u5FC5\u987B\u4EE5 "]]>" \u7ED3\u5C3E\u3002
- # 4.1 Character and Entity References
-         NameRequiredInPEReference = \u5728\u53C2\u6570\u5B9E\u4F53\u5F15\u7528\u4E2D, \u5B9E\u4F53\u540D\u79F0\u5FC5\u987B\u7D27\u8DDF\u5728 '%' \u540E\u9762\u3002
--        SemicolonRequiredInPEReference = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 \"%{0};\" \u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
-+        SemicolonRequiredInPEReference = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};" \u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u5728\u5B9E\u4F53\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
--	MSG_DUPLICATE_ENTITY_DEFINITION = \u5B9E\u4F53 \"{0}\" \u58F0\u660E\u4E86\u591A\u6B21\u3002        
-+        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \u5728\u5B9E\u4F53\u58F0\u660E\u4E2D\u7684\u5B9E\u4F53\u540D\u79F0 "{0}" \u548C\u5B9A\u4E49\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u5728\u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u4E2D\u7684 "NDATA" \u548C\u8BB0\u53F7\u540D\u79F0\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = \u5728\u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u4E2D\u7684 "NDATA" \u524D\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = \u5728\u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u4E2D\u7684 "NDATA" \u540E\u9762\u9700\u8981\u6709\u8BB0\u53F7\u540D\u79F0\u3002
-+        EntityDeclUnterminated = \u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
-+	MSG_DUPLICATE_ENTITY_DEFINITION = \u5B9E\u4F53 "{0}" \u58F0\u660E\u4E86\u591A\u6B21\u3002        
- # 4.2.2 External Entities
--        ExternalIDRequired = \u5916\u90E8\u5B9E\u4F53\u58F0\u660E\u5FC5\u987B\u4EE5 \"SYSTEM\" \u6216 \"PUBLIC\" \u5F00\u5934\u3002
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u5728 \"PUBLIC\" \u548C\u516C\u5171\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        ExternalIDRequired = \u5916\u90E8\u5B9E\u4F53\u58F0\u660E\u5FC5\u987B\u4EE5 "SYSTEM" \u6216 "PUBLIC" \u5F00\u5934\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u5728 "PUBLIC" \u548C\u516C\u5171\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u5728\u516C\u5171\u6807\u8BC6\u7B26\u548C\u7CFB\u7EDF\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u5728 \"SYSTEM\" \u548C\u7CFB\u7EDF\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
--        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5\u6807\u8BC6\u7B26\u4E0D\u80FD\u6307\u5B9A\u4E3A\u7CFB\u7EDF\u6807\u8BC6\u7B26 \"{0}\" \u7684\u4E00\u90E8\u5206\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u5728 "SYSTEM" \u548C\u7CFB\u7EDF\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5\u6807\u8BC6\u7B26\u4E0D\u80FD\u6307\u5B9A\u4E3A\u7CFB\u7EDF\u6807\u8BC6\u7B26 "{0}" \u7684\u4E00\u90E8\u5206\u3002
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8BB0\u53F7\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8BB0\u53F7\u58F0\u660E\u4E2D\u7684\u8BB0\u53F7\u540D\u79F0 "{0}" \u540E\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
-+        ExternalIDorPublicIDRequired = \u8BB0\u53F7 "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u5305\u542B\u7CFB\u7EDF\u6807\u8BC6\u7B26\u6216\u516C\u5171\u6807\u8BC6\u7B26\u3002
-+        NotationDeclUnterminated = \u8BB0\u53F7 "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
-         
- # Validation messages
--        DuplicateTypeInMixedContent = \u5728\u5143\u7D20\u58F0\u660E \"{0}\" \u7684\u5185\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7ECF\u6307\u5B9A\u4E86\u5143\u7D20\u7C7B\u578B \"{1}\"\u3002
--        ENTITIESInvalid = \u7C7B\u578B\u4E3A ENTITIES \u7684\u5C5E\u6027\u503C \"{1}\" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u7684\u540D\u79F0\u3002
--        ENTITYInvalid = \u7C7B\u578B\u4E3A ENTITY \u7684\u5C5E\u6027\u503C \"{1}\" \u5FC5\u987B\u662F\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u7684\u540D\u79F0\u3002
--        IDDefaultTypeInvalid = ID \u5C5E\u6027 \"{0}\" \u5FC5\u987B\u5177\u6709\u5DF2\u58F0\u660E\u7684\u9ED8\u8BA4\u503C \"#IMPLIED\" \u6216 \"#REQUIRED\"\u3002
--        IDInvalid = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u540D\u79F0\u3002
--        IDInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F NCName\u3002
--        IDNotUnique = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C \"{0}\" \u5728\u6587\u6863\u5185\u5FC5\u987B\u662F\u552F\u4E00\u7684\u3002
--        IDREFInvalid = \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u540D\u79F0\u3002
--        IDREFInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F NCName\u3002
--        IDREFSInvalid = \u7C7B\u578B\u4E3A IDREFS \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u3002
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u5F53\u5B9E\u4F53\u5F15\u7528\u7528\u4F5C\u5B8C\u6574\u58F0\u660E\u65F6, \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
--        ImproperDeclarationNesting = \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
--        ImproperGroupNesting = \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u62EC\u53F7\u5BF9\u3002
--        INVALID_PE_IN_CONDITIONAL = \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6574\u4E2A\u6761\u4EF6\u8282, \u6216\u8005\u4EC5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
--        MSG_ATTRIBUTE_NOT_DECLARED = \u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B \"{0}\" \u58F0\u660E\u5C5E\u6027 \"{1}\"\u3002
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u503C\u4E3A \"{1}\" \u7684\u5C5E\u6027 \"{0}\" \u5FC5\u987B\u5177\u6709\u5217\u8868 \"{2}\" \u4E2D\u7684\u503C\u3002
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D, \u5C5E\u6027 \"{0}\" \u7684\u503C \"{1}\" \u4E0D\u80FD\u901A\u8FC7\u89C4\u8303\u5316\u8FDB\u884C\u66F4\u6539 (\u66F4\u6539\u4E3A \"{2}\")\u3002
--        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5185\u5BB9\u4E0D\u5B8C\u6574, \u5B83\u5FC5\u987B\u5339\u914D \"{1}\"\u3002
--        MSG_CONTENT_INVALID = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D \"{1}\"\u3002
--        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D \"{1}\"\u3002\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A \"{2}\" \u7684\u5B50\u7EA7\u3002
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5C5E\u6027 \"{1}\" \u5177\u6709\u9ED8\u8BA4\u503C, \u5E76\u4E14\u5FC5\u987B\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u6307\u5B9A\u3002
--        MSG_DUPLICATE_ATTDEF = \u5DF2\u7ECF\u4E3A\u5143\u7D20\u7C7B\u578B \"{0}\" \u58F0\u660E\u5C5E\u6027 \"{1}\"\u3002
--        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u7C7B\u578B \"{0}\" \u4E0D\u80FD\u58F0\u660E\u591A\u6B21\u3002
--        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u987B\u58F0\u660E\u5143\u7D20\u7C7B\u578B \"{0}\"\u3002
-+        DuplicateTypeInMixedContent = \u5728\u5143\u7D20\u58F0\u660E "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7ECF\u6307\u5B9A\u4E86\u5143\u7D20\u7C7B\u578B "{1}"\u3002
-+        ENTITIESInvalid = \u7C7B\u578B\u4E3A ENTITIES \u7684\u5C5E\u6027\u503C "{1}" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u89E3\u6790\u5B9E\u4F53\u7684\u540D\u79F0\u3002
-+        ENTITYInvalid = \u7C7B\u578B\u4E3A ENTITY \u7684\u5C5E\u6027\u503C "{1}" \u5FC5\u987B\u662F\u672A\u89E3\u6790\u5B9E\u4F53\u7684\u540D\u79F0\u3002
-+        IDDefaultTypeInvalid = ID \u5C5E\u6027 "{0}" \u5FC5\u987B\u5177\u6709\u5DF2\u58F0\u660E\u7684\u9ED8\u8BA4\u503C "#IMPLIED" \u6216 "#REQUIRED"\u3002
-+        IDInvalid = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u540D\u79F0\u3002
-+        IDInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F NCName\u3002
-+        IDNotUnique = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C "{0}" \u5728\u6587\u6863\u5185\u5FC5\u987B\u662F\u552F\u4E00\u7684\u3002
-+        IDREFInvalid = \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u540D\u79F0\u3002
-+        IDREFInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F NCName\u3002
-+        IDREFSInvalid = \u7C7B\u578B\u4E3A IDREFS \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u3002
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u5F53\u5B9E\u4F53\u5F15\u7528\u7528\u4F5C\u5B8C\u6574\u58F0\u660E\u65F6, \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
-+        ImproperDeclarationNesting = \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
-+        ImproperGroupNesting = \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u62EC\u53F7\u5BF9\u3002
-+        INVALID_PE_IN_CONDITIONAL = \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6574\u4E2A\u6761\u4EF6\u8282, \u6216\u8005\u4EC5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
-+        MSG_ATTRIBUTE_NOT_DECLARED = \u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B "{0}" \u58F0\u660E\u5C5E\u6027 "{1}"\u3002
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u503C\u4E3A "{1}" \u7684\u5C5E\u6027 "{0}" \u5FC5\u987B\u5177\u6709\u5217\u8868 "{2}" \u4E2D\u7684\u503C\u3002
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D, \u5C5E\u6027 "{0}" \u7684\u503C "{1}" \u4E0D\u80FD\u901A\u8FC7\u89C4\u8303\u5316\u8FDB\u884C\u66F4\u6539 (\u66F4\u6539\u4E3A "{2}")\u3002
-+        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5185\u5BB9\u4E0D\u5B8C\u6574, \u5B83\u5FC5\u987B\u5339\u914D "{1}"\u3002
-+        MSG_CONTENT_INVALID = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D "{1}"\u3002
-+        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D "{1}"\u3002\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A "{2}" \u7684\u5B50\u7EA7\u3002
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5C5E\u6027 "{1}" \u5177\u6709\u9ED8\u8BA4\u503C, \u5E76\u4E14\u5FC5\u987B\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u6307\u5B9A\u3002
-+        MSG_DUPLICATE_ATTDEF = \u5DF2\u7ECF\u4E3A\u5143\u7D20\u7C7B\u578B "{0}" \u58F0\u660E\u5C5E\u6027 "{1}"\u3002
-+        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u7C7B\u578B "{0}" \u4E0D\u80FD\u58F0\u660E\u591A\u6B21\u3002
-+        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u987B\u58F0\u660E\u5143\u7D20\u7C7B\u578B "{0}"\u3002
-         MSG_GRAMMAR_NOT_FOUND = \u6587\u6863\u65E0\u6548: \u627E\u4E0D\u5230\u8BED\u6CD5\u3002
--        MSG_ELEMENT_WITH_ID_REQUIRED = \u6587\u6863\u4E2D\u5FC5\u987B\u5305\u542B\u6807\u8BC6\u7B26\u4E3A \"{0}\" \u7684\u5143\u7D20\u3002
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5916\u90E8\u5B9E\u4F53 \"{0}\"\u3002
--        MSG_FIXED_ATTVALUE_INVALID = \u503C\u4E3A \"{2}\" \u7684\u5C5E\u6027 \"{1}\" \u5FC5\u987B\u5177\u6709 \"{3}\" \u7684\u503C\u3002
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027 \"{1}\", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A ID \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 \"{2}\"\u3002
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 \"{1}\", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A NOTATION \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 \"{2}\"\u3002
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5728\u5C5E\u6027 \"{0}\" \u7684\u8BB0\u53F7\u7C7B\u578B\u5217\u8868\u4E2D\u5F15\u7528\u8BB0\u53F7 \"{1}\" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u5728 \"{0}\" \u7684\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u58F0\u660E\u4E2D\u5F15\u7528\u8BB0\u53F7 \"{1}\" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5B9E\u4F53 \"{0}\"\u3002
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u9700\u8981\u5C5E\u6027 \"{1}\", \u5E76\u4E14\u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B \"{0}\" \u6307\u5B9A\u8BE5\u5C5E\u6027\u3002
--        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5BF9\u4E8E\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u5177\u6709\u5143\u7D20\u5185\u5BB9\u7684\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5916\u90E8\u5B9E\u4F53, \u5728\u8BE5\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5143\u7D20\u4E4B\u95F4\u4E0D\u80FD\u51FA\u73B0\u7A7A\u683C\u3002
--        NMTOKENInvalid = \u7C7B\u578B\u4E3A NMTOKEN \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u540D\u79F0\u6807\u8BB0\u3002
--        NMTOKENSInvalid = \u7C7B\u578B\u4E3A NMTOKENS \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u6807\u8BB0\u3002
--        NoNotationOnEmptyElement = \u5DF2\u58F0\u660E\u4E3A EMPTY \u7684\u5143\u7D20\u7C7B\u578B \"{0}\" \u4E0D\u80FD\u58F0\u660E\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 \"{1}\"\u3002
--        RootElementTypeMustMatchDoctypedecl = \u6587\u6863\u6839\u5143\u7D20 \"{1}\" \u5FC5\u987B\u5339\u914D DOCTYPE \u6839 \"{0}\"\u3002
--        UndeclaredElementInContentSpec = \u5143\u7D20 \"{0}\" \u7684\u5185\u5BB9\u6A21\u578B\u5F15\u7528\u672A\u58F0\u660E\u7684\u5143\u7D20 \"{1}\"\u3002
--        UniqueNotationName = \u8BB0\u53F7 \"{0}\" \u7684\u58F0\u660E\u4E0D\u662F\u552F\u4E00\u7684\u3002\u4E0D\u80FD\u5728\u591A\u4E2A\u8BB0\u53F7\u58F0\u660E\u4E2D\u58F0\u660E\u6307\u5B9A\u7684\u540D\u79F0\u3002
-+        MSG_ELEMENT_WITH_ID_REQUIRED = \u6587\u6863\u4E2D\u5FC5\u987B\u5305\u542B\u6807\u8BC6\u7B26\u4E3A "{0}" \u7684\u5143\u7D20\u3002
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5916\u90E8\u5B9E\u4F53 "{0}"\u3002
-+        MSG_FIXED_ATTVALUE_INVALID = \u503C\u4E3A "{2}" \u7684\u5C5E\u6027 "{1}" \u5FC5\u987B\u5177\u6709 "{3}" \u7684\u503C\u3002
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B "{0}" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027 "{1}", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A ID \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 "{2}"\u3002
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B "{0}" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 "{1}", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A NOTATION \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 "{2}"\u3002
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5728\u5C5E\u6027 "{0}" \u7684\u8BB0\u53F7\u7C7B\u578B\u5217\u8868\u4E2D\u5F15\u7528\u8BB0\u53F7 "{1}" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u5728 "{0}" \u7684\u672A\u89E3\u6790\u5B9E\u4F53\u58F0\u660E\u4E2D\u5F15\u7528\u8BB0\u53F7 "{1}" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5DF2\u89E3\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5B9E\u4F53 "{0}"\u3002
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u9700\u8981\u5C5E\u6027 "{1}", \u5E76\u4E14\u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B "{0}" \u6307\u5B9A\u8BE5\u5C5E\u6027\u3002
-+        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5BF9\u4E8E\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u5177\u6709\u5143\u7D20\u5185\u5BB9\u7684\u5DF2\u89E3\u6790\u7684\u5916\u90E8\u5B9E\u4F53, \u5728\u8BE5\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5143\u7D20\u4E4B\u95F4\u4E0D\u80FD\u51FA\u73B0\u7A7A\u683C\u3002
-+        NMTOKENInvalid = \u7C7B\u578B\u4E3A NMTOKEN \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u540D\u79F0\u6807\u8BB0\u3002
-+        NMTOKENSInvalid = \u7C7B\u578B\u4E3A NMTOKENS \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u6807\u8BB0\u3002
-+        NoNotationOnEmptyElement = \u5DF2\u58F0\u660E\u4E3A EMPTY \u7684\u5143\u7D20\u7C7B\u578B "{0}" \u4E0D\u80FD\u58F0\u660E\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 "{1}"\u3002
-+        RootElementTypeMustMatchDoctypedecl = \u6587\u6863\u6839\u5143\u7D20 "{1}" \u5FC5\u987B\u5339\u914D DOCTYPE \u6839 "{0}"\u3002
-+        UndeclaredElementInContentSpec = \u5143\u7D20 "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u5F15\u7528\u672A\u58F0\u660E\u7684\u5143\u7D20 "{1}"\u3002
-+        UniqueNotationName = \u8BB0\u53F7 "{0}" \u7684\u58F0\u660E\u4E0D\u662F\u552F\u4E00\u7684\u3002\u4E0D\u80FD\u5728\u591A\u4E2A\u8BB0\u53F7\u58F0\u660E\u4E2D\u58F0\u660E\u6307\u5B9A\u7684\u540D\u79F0\u3002
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype \u9A8C\u8BC1\u7A0B\u5E8F: \u672A\u80FD\u4F7F\u7528\u6709\u6548\u7684\u8BED\u6CD5\u5F15\u7528\u8C03\u7528\u521D\u59CB\u5316\u65B9\u6CD5\u3002\t
--        ENTITYNotUnparsed = ENTITY \"{0}\" \u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u3002
--        ENTITYNotValid = ENTITY \"{0}\" \u65E0\u6548\u3002
-+        ENTITYNotUnparsed = ENTITY "{0}" \u4E0D\u662F\u672A\u89E3\u6790\u7684\u3002
-+        ENTITYNotValid = ENTITY "{0}" \u65E0\u6548\u3002
-         EmptyList = \u7C7B\u578B\u4E3A ENTITIES, IDREFS \u548C NMTOKENS \u7684\u503C\u4E0D\u80FD\u662F\u7A7A\u5217\u8868\u3002
+ void
+@@ -5079,7 +5102,8 @@
+                         OopClosure* scan_non_heap_roots,
+                         OopsInHeapRegionClosure* scan_rs,
+                         OopsInGenClosure* scan_perm,
+-                        int worker_i) {
++                        int worker_i,
++                        bool manages_code_roots) {
+ 
+   // First scan the strong roots, including the perm gen.
+   double ext_roots_start = os::elapsedTime();
+@@ -5089,15 +5113,17 @@
+   BufferingOopsInGenClosure buf_scan_perm(scan_perm);
+   buf_scan_perm.set_generation(perm_gen());
+ 
+-  // Walk the code cache w/o buffering, because StarTask cannot handle
+-  // unaligned oop locations.
+-  G1FilteredCodeBlobToOopClosure eager_scan_code_roots(this, scan_non_heap_roots);
++  assert(so & SO_CodeCache || scan_rs != NULL, "must scan code roots somehow");
++  // Walk the code cache/strong code roots w/o buffering, because StarTask
++  // cannot handle unaligned oop locations.
++  CodeBlobToOopClosure eager_scan_code_roots(scan_non_heap_roots, true /* do_marking */);
+ 
+   process_strong_roots(false, // no scoping; this is parallel code
+                        collecting_perm_gen, so,
+                        &buf_scan_non_heap_roots,
+                        &eager_scan_code_roots,
+-                       &buf_scan_perm);
++                       &buf_scan_perm,
++                       manages_code_roots);
+ 
+   // Now the CM ref_processor roots.
+   if (!_process_strong_tasks->is_task_claimed(G1H_PS_refProcessor_oops_do)) {
+@@ -5136,9 +5162,22 @@
+   }
+   g1_policy()->phase_times()->record_satb_filtering_time(worker_i, satb_filtering_ms);
+ 
++  // If this is an initial mark pause, and we're not scanning
++  // the entire code cache, we need to mark the oops in the
++  // strong code root lists for the regions that are not in
++  // the collection set.
++  // Note all threads participate in this set of root tasks.
++  double mark_strong_code_roots_ms = 0.0;
++  if (g1_policy()->during_initial_mark_pause() && !(so & SO_CodeCache)) {
++    double mark_strong_roots_start = os::elapsedTime();
++    mark_strong_code_roots(worker_i);
++    mark_strong_code_roots_ms = (os::elapsedTime() - mark_strong_roots_start) * 1000.0;
++  }
++  g1_policy()->phase_times()->record_strong_code_root_mark_time(worker_i, mark_strong_code_roots_ms);
++
+   // Now scan the complement of the collection set.
+   if (scan_rs != NULL) {
+-    g1_rem_set()->oops_into_collection_set_do(scan_rs, worker_i);
++    g1_rem_set()->oops_into_collection_set_do(scan_rs, &eager_scan_code_roots, worker_i);
+   }
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = \u5C5E\u6027\u503C\u4E2D\u4E0D\u5141\u8BB8\u91C7\u7528\u5916\u90E8\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = \u5C5E\u6027\u503C\u4E2D\u4E0D\u5141\u8BB8\u91C7\u7528\u5916\u90E8\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002
-+        AccessExternalDTD = \u5916\u90E8 DTD: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8 DTD ''{0}'', \u56E0\u4E3A accessExternalDTD \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u5BFC\u81F4\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
-+        AccessExternalEntity = \u5916\u90E8\u5B9E\u4F53: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8\u6587\u6863 ''{0}'', \u56E0\u4E3A accessExternalDTD \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u5BFC\u81F4\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
+   _process_strong_tasks->all_tasks_completed();
+@@ -5151,6 +5190,102 @@
+   SharedHeap::process_weak_roots(root_closure, &roots_in_blobs, non_root_closure);
+ }
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = \u5F15\u7528\u4E86\u5B9E\u4F53 \"{0}\", \u4F46\u672A\u58F0\u660E\u5B83\u3002
--        ReferenceToUnparsedEntity = \u4E0D\u5141\u8BB8\u4F7F\u7528\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002
--        RecursiveReference = \u9012\u5F52\u5B9E\u4F53\u5F15\u7528 \"{0}\"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
--        RecursiveGeneralReference = \u9012\u5F52\u4E00\u822C\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
--        RecursivePEReference = \u9012\u5F52\u53C2\u6570\u5B9E\u4F53\u5F15\u7528 \"%{0};\"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
-+        EntityNotDeclared = \u5F15\u7528\u4E86\u5B9E\u4F53 "{0}", \u4F46\u672A\u58F0\u660E\u5B83\u3002
-+        ReferenceToUnparsedEntity = \u4E0D\u5141\u8BB8\u4F7F\u7528\u672A\u89E3\u6790\u7684\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002
-+        RecursiveReference = \u9012\u5F52\u5B9E\u4F53\u5F15\u7528 "{0}"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
-+        RecursiveGeneralReference = \u9012\u5F52\u4E00\u822C\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
-+        RecursivePEReference = \u9012\u5F52\u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = \u4E0D\u652F\u6301\u7F16\u7801 \"{0}\"\u3002
--        EncodingRequired = \u5982\u679C\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u8FDB\u884C\u7F16\u7801, \u5219\u8BE5\u5B9E\u4F53\u5FC5\u987B\u5305\u542B\u7F16\u7801\u58F0\u660E\u3002
-+        EncodingNotSupported = \u4E0D\u652F\u6301\u7F16\u7801 "{0}"\u3002
-+        EncodingRequired = \u5982\u679C\u5DF2\u89E3\u6790\u7684\u5B9E\u4F53\u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u8FDB\u884C\u7F16\u7801, \u5219\u8BE5\u5B9E\u4F53\u5FC5\u987B\u5305\u542B\u7F16\u7801\u58F0\u660E\u3002
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = \u5143\u7D20\u6216\u5C5E\u6027\u4E0D\u5339\u914D QName \u751F\u4EA7: QName::=(NCName':')?NCName\u3002
--        ElementXMLNSPrefix = \u5143\u7D20 \"{0}\" \u4E0D\u80FD\u4F7F\u7528 \"xmlns\" \u4F5C\u4E3A\u524D\u7F00\u3002
--        ElementPrefixUnbound = \u5143\u7D20 \"{1}\" \u7684\u524D\u7F00 \"{0}\" \u672A\u7ED1\u5B9A\u3002
--        AttributePrefixUnbound = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027 \"{1}\" \u7684\u524D\u7F00 \"{2}\" \u672A\u7ED1\u5B9A\u3002
--        EmptyPrefixedAttName = \u5C5E\u6027 \"{0}\" \u7684\u503C\u65E0\u6548\u3002\u5E26\u524D\u7F00\u7684\u540D\u79F0\u7A7A\u95F4\u7ED1\u5B9A\u4E0D\u80FD\u4E3A\u7A7A\u3002
--        PrefixDeclared = \u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 \"{0}\"\u3002
-+        ElementXMLNSPrefix = \u5143\u7D20 "{0}" \u4E0D\u80FD\u4F7F\u7528 "xmlns" \u4F5C\u4E3A\u524D\u7F00\u3002
-+        ElementPrefixUnbound = \u5143\u7D20 "{1}" \u7684\u524D\u7F00 "{0}" \u672A\u7ED1\u5B9A\u3002
-+        AttributePrefixUnbound = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u7684\u524D\u7F00 "{2}" \u672A\u7ED1\u5B9A\u3002
-+        EmptyPrefixedAttName = \u5C5E\u6027 "{0}" \u7684\u503C\u65E0\u6548\u3002\u5E26\u524D\u7F00\u7684\u540D\u79F0\u7A7A\u95F4\u7ED1\u5B9A\u4E0D\u80FD\u4E3A\u7A7A\u3002
-+        PrefixDeclared = \u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 "{0}"\u3002
-         CantBindXMLNS = \u524D\u7F00 "xmlns" \u4E0D\u80FD\u663E\u5F0F\u7ED1\u5B9A\u5230\u4EFB\u4F55\u540D\u79F0\u7A7A\u95F4; "xmlns" \u7684\u540D\u79F0\u7A7A\u95F4\u4E5F\u4E0D\u80FD\u663E\u5F0F\u7ED1\u5B9A\u5230\u4EFB\u4F55\u524D\u7F00\u3002
-         CantBindXML = \u524D\u7F00 "xml" \u4E0D\u80FD\u7ED1\u5B9A\u5230\u9664\u5B83\u7684\u5E38\u7528\u540D\u79F0\u7A7A\u95F4\u5916\u7684\u4EFB\u4F55\u540D\u79F0\u7A7A\u95F4; "xml" \u7684\u540D\u79F0\u7A7A\u95F4\u4E5F\u4E0D\u80FD\u7ED1\u5B9A\u5230\u9664 "xml" \u5916\u7684\u4EFB\u4F55\u524D\u7F00\u3002
--        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027 \"{0}\" \u7684 defaultValue \"{1}\" \u975E\u6CD5, \u56E0\u4E3A\u6B64\u5C5E\u6027\u7C7B\u578B\u5177\u6709\u8BCD\u6C47\u7EA6\u675F\u6761\u4EF6\u3002
-+        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027 "{0}" \u7684 defaultValue "{1}" \u975E\u6CD5, \u56E0\u4E3A\u6B64\u5C5E\u6027\u7C7B\u578B\u5177\u6709\u8BCD\u6C47\u7EA6\u675F\u6761\u4EF6\u3002
++class G1StringSymbolTableUnlinkTask : public AbstractGangTask {
++private:
++  BoolObjectClosure* _is_alive;
++  int _initial_string_table_size;
++  int _initial_symbol_table_size;
++
++  bool  _process_strings;
++  int _strings_processed;
++  int _strings_removed;
++
++  bool  _process_symbols;
++  int _symbols_processed;
++  int _symbols_removed;
++
++  bool _do_in_parallel;
++public:
++  G1StringSymbolTableUnlinkTask(BoolObjectClosure* is_alive, bool process_strings, bool process_symbols) :
++    AbstractGangTask("Par String/Symbol table unlink"), _is_alive(is_alive),
++    _do_in_parallel(G1CollectedHeap::use_parallel_gc_threads()),
++    _process_strings(process_strings), _strings_processed(0), _strings_removed(0),
++    _process_symbols(process_symbols), _symbols_processed(0), _symbols_removed(0) {
++
++    _initial_string_table_size = StringTable::the_table()->table_size();
++    _initial_symbol_table_size = SymbolTable::the_table()->table_size();
++    if (process_strings) {
++      StringTable::clear_parallel_claimed_index();
++    }
++    if (process_symbols) {
++      SymbolTable::clear_parallel_claimed_index();
++    }
++  }
++
++  ~G1StringSymbolTableUnlinkTask() {
++    guarantee(!_process_strings || !_do_in_parallel || StringTable::parallel_claimed_index() >= _initial_string_table_size,
++              err_msg("claim value "INT32_FORMAT" after unlink less than initial string table size "INT32_FORMAT,
++                      StringTable::parallel_claimed_index(), _initial_string_table_size));
++    guarantee(!_process_symbols || !_do_in_parallel || SymbolTable::parallel_claimed_index() >= _initial_symbol_table_size,
++              err_msg("claim value "INT32_FORMAT" after unlink less than initial symbol table size "INT32_FORMAT,
++                      SymbolTable::parallel_claimed_index(), _initial_symbol_table_size));
++  }
++
++  void work(uint worker_id) {
++    if (_do_in_parallel) {
++      int strings_processed = 0;
++      int strings_removed = 0;
++      int symbols_processed = 0;
++      int symbols_removed = 0;
++      if (_process_strings) {
++        StringTable::possibly_parallel_unlink(_is_alive, &strings_processed, &strings_removed);
++        Atomic::add(strings_processed, &_strings_processed);
++        Atomic::add(strings_removed, &_strings_removed);
++      }
++      if (_process_symbols) {
++        SymbolTable::possibly_parallel_unlink(&symbols_processed, &symbols_removed);
++        Atomic::add(symbols_processed, &_symbols_processed);
++        Atomic::add(symbols_removed, &_symbols_removed);
++      }
++    } else {
++      if (_process_strings) {
++        StringTable::unlink(_is_alive, &_strings_processed, &_strings_removed);
++      }
++      if (_process_symbols) {
++        SymbolTable::unlink(&_symbols_processed, &_symbols_removed);
++      }
++    }
++  }
++
++  size_t strings_processed() const { return (size_t)_strings_processed; }
++  size_t strings_removed()   const { return (size_t)_strings_removed; }
++
++  size_t symbols_processed() const { return (size_t)_symbols_processed; }
++  size_t symbols_removed()   const { return (size_t)_symbols_removed; }
++};
++
++void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
++                                                     bool process_strings, bool process_symbols) {
++  uint n_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
++                   _g1h->workers()->active_workers() : 1);
++
++  G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
++  if (G1CollectedHeap::use_parallel_gc_threads()) {
++    set_par_threads(n_workers);
++    workers()->run_task(&g1_unlink_task);
++    set_par_threads(0);
++  } else {
++    g1_unlink_task.work(0);
++  }
++  if (G1TraceStringSymbolTableScrubbing) {
++    gclog_or_tty->print_cr("Cleaned string and symbol table, "
++                           "strings: "SIZE_FORMAT" processed, "SIZE_FORMAT" removed, "
++                           "symbols: "SIZE_FORMAT" processed, "SIZE_FORMAT" removed",
++                           g1_unlink_task.strings_processed(), g1_unlink_task.strings_removed(),
++                           g1_unlink_task.symbols_processed(), g1_unlink_task.symbols_removed());
++  }
++}
++
+ // Weak Reference Processing support
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +317,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+ // An always "is_alive" closure that is used to preserve referents.
+@@ -5761,9 +5896,6 @@
+   process_discovered_references(n_workers);
  
+   // Weak root processing.
+-  // Note: when JSR 292 is enabled and code blobs can contain
+-  // non-perm oops then we will need to process the code blobs
+-  // here too.
+   {
+     G1STWIsAliveClosure is_alive(this);
+     G1KeepAliveClosure keep_alive(this);
+@@ -5779,6 +5911,17 @@
+   hot_card_cache->reset_hot_cache();
+   hot_card_cache->set_use_cache(true);
+ 
++  // Migrate the strong code roots attached to each region in
++  // the collection set. Ideally we would like to do this
++  // after we have finished the scanning/evacuation of the
++  // strong code roots for a particular heap region.
++  migrate_strong_code_roots();
++
++  if (g1_policy()->during_initial_mark_pause()) {
++    // Reset the claim values set during marking the strong code roots
++    reset_heap_region_claim_values();
++  }
++
+   finalize_for_evac_failure();
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=\u8BED\u6CD5\u5206\u6790\u5668\u5728\u6B64\u6587\u6863\u4E2D\u9047\u5230\u591A\u4E2A \"{0}\" \u5B9E\u4F53\u6269\u5C55; \u8FD9\u662F\u5E94\u7528\u7A0B\u5E8F\u65BD\u52A0\u7684\u9650\u5236\u3002
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: \u89E3\u6790\u5668\u5728\u6B64\u6587\u6863\u4E2D\u9047\u5230\u591A\u4E2A "{0}" \u5B9E\u4F53\u6269\u5C55; \u8FD9\u662F JDK \u65BD\u52A0\u7684\u9650\u5236\u3002
-+        ElementAttributeLimit=JAXP00010002: \u5143\u7D20 "{0}" \u5177\u6709\u591A\u4E2A "{1}" \u5C5E\u6027, "{1}" \u662F JDK \u65BD\u52A0\u7684\u9650\u5236\u3002
-+        MaxEntitySizeLimit=JAXP00010003: \u5B9E\u4F53 "{0}" \u7684\u957F\u5EA6\u4E3A "{1}", \u8D85\u8FC7\u4E86 "{3}" \u8BBE\u7F6E\u7684 "{2}" \u9650\u5236\u3002
-+        TotalEntitySizeLimit=JAXP00010004: \u5B9E\u4F53\u7684\u7D2F\u8BA1\u5927\u5C0F "{0}" \u8D85\u8FC7\u4E86 "{2}" \u8BBE\u7F6E\u7684 "{1}" \u9650\u5236\u3002
-+        MaxXMLNameLimit=JAXP00010005: \u540D\u79F0 "{0}" \u8D85\u8FC7\u4E86 "{2}" \u8BBE\u7F6E\u7684 "{1}" \u9650\u5236\u3002
+   if (evacuation_failed()) {
+@@ -5912,11 +6055,11 @@
+ }
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= \u5143\u7D20 \"{0}\" \u5177\u6709\u591A\u4E2A \"{1}\" \u5C5E\u6027, \"{1}\" \u662F\u5E94\u7528\u7A0B\u5E8F\u65BD\u52A0\u7684\u9650\u5236\u3002
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties	2014-04-20 12:39:47.000000000 -0700
-@@ -1,30 +1,27 @@
--/*
-- * 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.
-- */
--
--/*
-- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
-- */
-+#
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
-+# 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.
-+#
+ class G1ParCleanupCTTask : public AbstractGangTask {
+-  CardTableModRefBS* _ct_bs;
++  G1SATBCardTableModRefBS* _ct_bs;
+   G1CollectedHeap* _g1h;
+   HeapRegion* volatile _su_head;
+ public:
+-  G1ParCleanupCTTask(CardTableModRefBS* ct_bs,
++  G1ParCleanupCTTask(G1SATBCardTableModRefBS* ct_bs,
+                      G1CollectedHeap* g1h) :
+     AbstractGangTask("G1 Par Cleanup CT Task"),
+     _ct_bs(ct_bs), _g1h(g1h) { }
+@@ -5939,9 +6082,9 @@
+ #ifndef PRODUCT
+ class G1VerifyCardTableCleanup: public HeapRegionClosure {
+   G1CollectedHeap* _g1h;
+-  CardTableModRefBS* _ct_bs;
++  G1SATBCardTableModRefBS* _ct_bs;
+ public:
+-  G1VerifyCardTableCleanup(G1CollectedHeap* g1h, CardTableModRefBS* ct_bs)
++  G1VerifyCardTableCleanup(G1CollectedHeap* g1h, G1SATBCardTableModRefBS* ct_bs)
+     : _g1h(g1h), _ct_bs(ct_bs) { }
+   virtual bool doHeapRegion(HeapRegion* r) {
+     if (r->is_survivor()) {
+@@ -5955,7 +6098,7 @@
+ 
+ void G1CollectedHeap::verify_not_dirty_region(HeapRegion* hr) {
+   // All of the region should be clean.
+-  CardTableModRefBS* ct_bs = (CardTableModRefBS*)barrier_set();
++  G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
+   MemRegion mr(hr->bottom(), hr->end());
+   ct_bs->verify_not_dirty_region(mr);
+ }
+@@ -5968,13 +6111,17 @@
+   // not dirty that area (one less thing to have to do while holding
+   // a lock). So we can only verify that [bottom(),pre_dummy_top()]
+   // is dirty.
+-  CardTableModRefBS* ct_bs = (CardTableModRefBS*) barrier_set();
++  G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
+   MemRegion mr(hr->bottom(), hr->pre_dummy_top());
+-  ct_bs->verify_dirty_region(mr);
++  if (hr->is_young()) {
++    ct_bs->verify_g1_young_region(mr);
++  } else {
++    ct_bs->verify_dirty_region(mr);
++  }
+ }
  
- # This file contains error and warning messages related to XML
- # The messages are arranged in key and value tuples in a ListResourceBundle.
-@@ -48,14 +45,14 @@
-         InvalidCharInProlog = \u5728\u6587\u4EF6\u5BA3\u544A\u96C6\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
- # 2.4 Character Data and Markup
--        CDEndInContent = \u5B57\u5143\u9806\u5E8F \"]]>\" \u4E0D\u53EF\u51FA\u73FE\u5728\u5167\u5BB9\u4E2D\uFF0C\u9664\u975E\u7528\u65BC\u6A19\u793A CDATA \u6BB5\u843D\u7684\u7D50\u5C3E\u3002
-+        CDEndInContent = \u5B57\u5143\u9806\u5E8F "]]>" \u4E0D\u53EF\u51FA\u73FE\u5728\u5167\u5BB9\u4E2D\uFF0C\u9664\u975E\u7528\u65BC\u6A19\u793A CDATA \u6BB5\u843D\u7684\u7D50\u5C3E\u3002
- # 2.7 CDATA Sections
--        CDSectUnterminated = CDATA \u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F \"]]>\"\u3002
-+        CDSectUnterminated = CDATA \u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F "]]>"\u3002
- # 2.8 Prolog and Document Type Declaration
-         XMLDeclMustBeFirst = XML \u5BA3\u544A\u50C5\u80FD\u51FA\u73FE\u5728\u6587\u4EF6\u7684\u958B\u982D\u3002
--        EqRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 \"{0}\" \u4E4B\u5F8C\u3002
--        QuoteRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C\"{0}\" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
--        XMLDeclUnterminated = XML \u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F \"?>\"\u3002
-+        EqRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 "{0}" \u4E4B\u5F8C\u3002
-+        QuoteRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C"{0}" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
-+        XMLDeclUnterminated = XML \u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F "?>"\u3002
-         VersionInfoRequired = XML \u5BA3\u544A\u4E2D\u9700\u8981\u7248\u672C\u3002
-         SpaceRequiredBeforeVersionInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C\u7248\u672C\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
-         SpaceRequiredBeforeEncodingInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C\u7DE8\u78BC\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
-@@ -71,90 +68,91 @@
-         ReferenceIllegalInTrailingMisc=\u5C3E\u7AEF\u6BB5\u843D\u4E2D\u4E0D\u5141\u8A31\u53C3\u7167\u3002
-         
- # 2.9 Standalone Document Declaration
--        SDDeclInvalid = \u7368\u7ACB\u6587\u4EF6\u5BA3\u544A\u503C\u5FC5\u9808\u662F \"yes\" \u6216 \"no\"\uFF0C\u800C\u975E \"{0}\"\u3002
-+        SDDeclInvalid = \u7368\u7ACB\u6587\u4EF6\u5BA3\u544A\u503C\u5FC5\u9808\u662F "yes" \u6216 "no"\uFF0C\u800C\u975E "{0}"\u3002
-+        SDDeclNameInvalid = XML \u5BA3\u544A\u4E2D\u7684\u7368\u7ACB\u540D\u7A31\u53EF\u80FD\u62FC\u932F\u4E86\u3002
- # 2.12 Language Identification
--        XMLLangInvalid = xml:lang \u5C6C\u6027\u503C \"{0}\" \u70BA\u7121\u6548\u7684\u8A9E\u8A00 ID\u3002
-+        XMLLangInvalid = xml:lang \u5C6C\u6027\u503C "{0}" \u70BA\u7121\u6548\u7684\u8A9E\u8A00 ID\u3002
- # 3. Logical Structures
--        ETagRequired = \u5143\u7D20\u985E\u578B \"{0}\" \u5FC5\u9808\u7531\u914D\u5C0D\u7684\u7D50\u675F\u6A19\u8A18 \"\" \u7D42\u6B62\u3002
-+        ETagRequired = \u5143\u7D20\u985E\u578B "{0}" \u5FC5\u9808\u7531\u914D\u5C0D\u7684\u7D50\u675F\u6A19\u8A18 "" \u7D42\u6B62\u3002
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ElementUnterminated = \u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5\u5C6C\u6027\u8A2D\u5B9A \">\" \u6216 \"/>\"\u3002
--        EqRequiredInAttribute = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027\u540D\u7A31 \"{1}\" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5 '' = '' \u5B57\u5143\u3002
--        OpenQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027 \"{1}\" \u9810\u671F\u6709\u958B\u982D\u5F15\u865F\u3002
--        CloseQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027 \"{1}\" \u9810\u671F\u6709\u7D50\u675F\u5F15\u865F\u3002
--        AttributeNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 \"{0}\" \u6307\u5B9A\u5C6C\u6027 \"{1}\"\u3002
--        AttributeNSNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 \"{0}\" \u6307\u5B9A\u9023\u7D50\u547D\u540D\u7A7A\u9593 \"{2}\" \u7684\u5C6C\u6027 \"{1}\"\u3002
--        ETagUnterminated = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u7D50\u675F\u6A19\u8A18\u7D50\u5C3E\u5FC5\u9808\u662F ''>'' \u5206\u754C\u5B57\u5143\u3002
-+        ElementUnterminated = \u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5\u5C6C\u6027\u8A2D\u5B9A ">" \u6216 "/>"\u3002
-+        EqRequiredInAttribute = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027\u540D\u7A31 "{1}" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5 '' = '' \u5B57\u5143\u3002
-+        OpenQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027 "{1}" \u9810\u671F\u6709\u958B\u982D\u5F15\u865F\u3002
-+        CloseQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027 "{1}" \u9810\u671F\u6709\u7D50\u675F\u5F15\u865F\u3002
-+        AttributeNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 "{0}" \u6307\u5B9A\u5C6C\u6027 "{1}"\u3002
-+        AttributeNSNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 "{0}" \u6307\u5B9A\u9023\u7D50\u547D\u540D\u7A7A\u9593 "{2}" \u7684\u5C6C\u6027 "{1}"\u3002
-+        ETagUnterminated = \u5143\u7D20\u985E\u578B "{0}" \u7684\u7D50\u675F\u6A19\u8A18\u7D50\u5C3E\u5FC5\u9808\u662F ''>'' \u5206\u754C\u5B57\u5143\u3002
-         MarkupNotRecognizedInContent = \u5143\u7D20\u7684\u5167\u5BB9\u5FC5\u9808\u7531\u683C\u5F0F\u6B63\u78BA\u7684\u4F4D\u63CF\u8FF0\u8CC7\u6599\u6216\u6A19\u8A18\u6240\u7D44\u6210\u3002
-         DoctypeIllegalInContent = \u5167\u5BB9\u4E0D\u5141\u8A31 DOCTYPE\u3002
- # 4.1 Character and Entity References
-         ReferenceUnterminated = \u53C3\u7167\u5FC5\u9808\u7531 ';' \u5206\u754C\u5B57\u5143\u7D42\u6B62\u3002
- # 4.3.2 Well-Formed Parsed Entities
--        ReferenceNotInOneEntity = \u53C3\u7167\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u500B\u9AD4\u5167\u3002
--        ElementEntityMismatch = \u5143\u7D20 \"{0}\" \u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
--        MarkupEntityMismatch=XML \u6587\u4EF6\u7D50\u69CB\u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
-+        ReferenceNotInOneEntity = \u53C3\u7167\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u5BE6\u9AD4\u5167\u3002
-+        ElementEntityMismatch = \u5143\u7D20 "{0}" \u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
-+        MarkupEntityMismatch=XML \u6587\u4EF6\u7D50\u69CB\u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
-         
- # Messages common to Document and DTD
- # 2.2 Characters
--        InvalidCharInAttValue = \u5728\u5C6C\u6027 \"{1}\" \u7684\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{2}) \u4E14\u5143\u7D20\u70BA \"{0}\"\u3002
-+        InvalidCharInAttValue = \u5728\u5C6C\u6027 "{1}" \u7684\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{2}) \u4E14\u5143\u7D20\u70BA "{0}"\u3002
-         InvalidCharInComment = \u5728\u8A3B\u89E3\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInPI = \u5728\u8655\u7406\u6307\u793A\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInInternalSubset = \u5728 DTD \u5167\u90E8\u5B50\u96C6\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
- # 2.3 Common Syntactic Constructs
--        QuoteRequiredInAttValue = \u5C6C\u6027 \"{1}\" \u7684\u503C\u958B\u982D\u5FC5\u9808\u70BA\u55AE\u5F15\u865F\u6216\u96D9\u5F15\u865F\u5B57\u5143\u3002
--        LessthanInAttValue = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5C6C\u6027 \"{1}\" \u7684\u503C\u4E0D\u53EF\u5305\u542B ''<'' \u5B57\u5143\u3002
--        AttributeValueUnterminated = \u5C6C\u6027 \"{1}\" \u7684\u503C\u7D50\u5C3E\u5FC5\u9808\u662F\u914D\u5C0D\u7684\u5F15\u865F\u5B57\u5143\u3002
-+        QuoteRequiredInAttValue = \u5C6C\u6027 "{1}" \u7684\u503C\u958B\u982D\u5FC5\u9808\u70BA\u55AE\u5F15\u865F\u6216\u96D9\u5F15\u865F\u5B57\u5143\u3002
-+        LessthanInAttValue = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5C6C\u6027 "{1}" \u7684\u503C\u4E0D\u53EF\u5305\u542B ''<'' \u5B57\u5143\u3002
-+        AttributeValueUnterminated = \u5C6C\u6027 "{1}" \u7684\u503C\u7D50\u5C3E\u5FC5\u9808\u662F\u914D\u5C0D\u7684\u5F15\u865F\u5B57\u5143\u3002
- # 2.5 Comments
--        InvalidCommentStart = \u8A3B\u89E3\u958B\u982D\u5FC5\u9808\u70BA \"\"\u3002
--        COMMENT_NOT_IN_ONE_ENTITY = \u8A3B\u89E3\u672A\u5305\u542B\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
-+        InvalidCommentStart = \u8A3B\u89E3\u958B\u982D\u5FC5\u9808\u70BA ""\u3002
-+        COMMENT_NOT_IN_ONE_ENTITY = \u8A3B\u89E3\u672A\u5305\u542B\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
- # 2.6 Processing Instructions
-         PITargetRequired = \u8655\u7406\u6307\u793A\u7684\u958B\u982D\u5FC5\u9808\u662F\u76EE\u6A19\u7684\u540D\u7A31\u3002
-         SpaceRequiredInPI = \u8655\u7406\u6307\u793A\u76EE\u6A19\u8207\u8CC7\u6599\u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
--        PIUnterminated = \u8655\u7406\u6307\u793A\u7D50\u5C3E\u5FC5\u9808\u662F \"?>\"\u3002
--        ReservedPITarget = \u4E0D\u5141\u8A31\u7B26\u5408 \"[xX][mM][lL]\" \u7684\u8655\u7406\u6307\u793A\u76EE\u6A19\u3002
--        PI_NOT_IN_ONE_ENTITY = \u8655\u7406\u6307\u793A\u672A\u5305\u542B\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
-+        PIUnterminated = \u8655\u7406\u6307\u793A\u7D50\u5C3E\u5FC5\u9808\u662F "?>"\u3002
-+        ReservedPITarget = \u4E0D\u5141\u8A31\u7B26\u5408 "[xX][mM][lL]" \u7684\u8655\u7406\u6307\u793A\u76EE\u6A19\u3002
-+        PI_NOT_IN_ONE_ENTITY = \u8655\u7406\u6307\u793A\u672A\u5305\u542B\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
- # 2.8 Prolog and Document Type Declaration
--        VersionInfoInvalid = \u7121\u6548\u7684\u7248\u672C \"{0}\"\u3002
--        VersionNotSupported = \u4E0D\u652F\u63F4 XML \u7248\u672C \"{0}\"\uFF0C\u50C5\u652F\u63F4 XML 1.0\u3002
--        VersionNotSupported11 = \u4E0D\u652F\u63F4 XML \u7248\u672C \"{0}\"\uFF0C\u50C5\u652F\u63F4 XML 1.0 \u8207 XML 1.1\u3002
--        VersionMismatch= \u500B\u9AD4\u4E0D\u53EF\u5305\u542B\u8F03\u65B0\u7248\u672C\u7684\u5176\u4ED6\u500B\u9AD4\u3002
-+        VersionInfoInvalid = \u7121\u6548\u7684\u7248\u672C "{0}"\u3002
-+        VersionNotSupported = \u4E0D\u652F\u63F4 XML \u7248\u672C "{0}"\uFF0C\u50C5\u652F\u63F4 XML 1.0\u3002
-+        VersionNotSupported11 = \u4E0D\u652F\u63F4 XML \u7248\u672C "{0}"\uFF0C\u50C5\u652F\u63F4 XML 1.0 \u8207 XML 1.1\u3002
-+        VersionMismatch= \u5BE6\u9AD4\u4E0D\u53EF\u5305\u542B\u8F03\u65B0\u7248\u672C\u7684\u5176\u4ED6\u5BE6\u9AD4\u3002
- # 4.1 Character and Entity References
--        DigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 \"&#\" \u4E4B\u5F8C\u3002
--        HexdigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u516D\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 \"&#x\" \u4E4B\u5F8C\u3002
-+        DigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 "&#" \u4E4B\u5F8C\u3002
-+        HexdigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u516D\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 "&#x" \u4E4B\u5F8C\u3002
-         SemicolonRequiredInCharRef = \u5B57\u5143\u53C3\u7167\u7684\u7D50\u5C3E\u5FC5\u9808\u662F ';' \u5206\u754C\u5B57\u5143\u3002
--        InvalidCharRef = \u5B57\u5143\u53C3\u7167 \"&#{0}\" \u70BA\u7121\u6548\u7684 XML \u5B57\u5143\u3002
--        NameRequiredInReference = \u5728\u500B\u9AD4\u53C3\u7167\u4E2D\uFF0C\u500B\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '&' \u4E4B\u5F8C\u3002
--        SemicolonRequiredInReference = \u500B\u9AD4 \"{0}\" \u7684\u53C3\u7167\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
-+        InvalidCharRef = \u5B57\u5143\u53C3\u7167 "&#{0}" \u70BA\u7121\u6548\u7684 XML \u5B57\u5143\u3002
-+        NameRequiredInReference = \u5728\u5BE6\u9AD4\u53C3\u7167\u4E2D\uFF0C\u5BE6\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '&' \u4E4B\u5F8C\u3002
-+        SemicolonRequiredInReference = \u5BE6\u9AD4 "{0}" \u7684\u53C3\u7167\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
- # 4.3.1 The Text Declaration
--        TextDeclMustBeFirst = \u6587\u5B57\u5BA3\u544A\u50C5\u80FD\u51FA\u73FE\u5728\u5916\u90E8\u5256\u6790\u500B\u9AD4\u7684\u958B\u982D\u3002
--        EqRequiredInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 \"{0}\" \u4E4B\u5F8C\u3002
--        QuoteRequiredInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D \"{0}\" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
--        CloseQuoteMissingInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u907A\u6F0F \"{0}\" \u4E4B\u5F8C\u7684\u503C\u7684\u7D50\u675F\u5F15\u865F\u3002
-+        TextDeclMustBeFirst = \u6587\u5B57\u5BA3\u544A\u50C5\u80FD\u51FA\u73FE\u5728\u5916\u90E8\u5256\u6790\u5BE6\u9AD4\u7684\u958B\u982D\u3002
-+        EqRequiredInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 "{0}" \u4E4B\u5F8C\u3002
-+        QuoteRequiredInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D "{0}" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
-+        CloseQuoteMissingInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u907A\u6F0F "{0}" \u4E4B\u5F8C\u7684\u503C\u7684\u7D50\u675F\u5F15\u865F\u3002
-         SpaceRequiredBeforeVersionInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u7248\u672C\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
-         SpaceRequiredBeforeEncodingInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u7DE8\u78BC\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
--        TextDeclUnterminated = \u6587\u5B57\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F \"?>\"\u3002
-+        TextDeclUnterminated = \u6587\u5B57\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F "?>"\u3002
-         EncodingDeclRequired = \u6587\u5B57\u5BA3\u544A\u4E2D\u9700\u8981\u7DE8\u78BC\u5BA3\u544A\u3002
-         NoMorePseudoAttributes = \u4E0D\u5141\u8A31\u66F4\u591A\u7684\u865B\u64EC\u5C6C\u6027\u3002
-         MorePseudoAttributes = \u9810\u671F\u66F4\u591A\u7684\u865B\u64EC\u5C6C\u6027\u3002
-         PseudoAttrNameExpected = \u9810\u671F\u4E00\u500B\u865B\u64EC\u5C6C\u6027\u540D\u7A31\u3002
- # 4.3.2 Well-Formed Parsed Entities
--        CommentNotInOneEntity = \u8A3B\u89E3\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u500B\u9AD4\u5167\u3002
--        PINotInOneEntity = \u8655\u7406\u6307\u793A\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u500B\u9AD4\u5167\u3002
-+        CommentNotInOneEntity = \u8A3B\u89E3\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u5BE6\u9AD4\u5167\u3002
-+        PINotInOneEntity = \u8655\u7406\u6307\u793A\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u5BE6\u9AD4\u5167\u3002
- # 4.3.3 Character Encoding in Entities
--        EncodingDeclInvalid = \u7121\u6548\u7684\u7DE8\u78BC\u540D\u7A31 \"{0}\"\u3002
--        EncodingByteOrderUnsupported = \u4E0D\u652F\u63F4\u7DE8\u78BC \"{0}\" \u7684\u6307\u5B9A\u4F4D\u5143\u7D44\u9806\u5E8F\u3002
-+        EncodingDeclInvalid = \u7121\u6548\u7684\u7DE8\u78BC\u540D\u7A31 "{0}"\u3002
-+        EncodingByteOrderUnsupported = \u4E0D\u652F\u63F4\u7DE8\u78BC "{0}" \u7684\u6307\u5B9A\u4F4D\u5143\u7D44\u9806\u5E8F\u3002
-         InvalidByte = {1}-byte UTF-8 \u5E8F\u5217\u7684\u7121\u6548\u4F4D\u5143\u7D44 {0}\u3002
-         ExpectedByte = {1}-byte UTF-8 \u5E8F\u5217\u9810\u671F\u7684\u4F4D\u5143\u7D44 {0}\u3002
-         InvalidHighSurrogate = UTF-8 \u5E8F\u5217\u4E2D\u9AD8\u66FF\u4EE3\u4F4D\u5143\u4E0D\u53EF\u8D85\u904E 0x10\uFF0C\u4F46\u627E\u5230 0x{0}\u3002
--        OperationNotSupported = {1} \u8B80\u53D6\u5668\u4E0D\u652F\u63F4\u4F5C\u696D \"{0}\"\u3002
--        InvalidASCII = \u7D44\u5143\u7D44 \"{0}\" \u4E0D\u662F (7 \u4F4D\u5143) ASCII \u5B57\u5143\u96C6\u7684\u6210\u54E1\u3002
--        CharConversionFailure = \u6C7A\u5B9A\u4F7F\u7528\u7279\u5B9A\u7DE8\u78BC\u7684\u500B\u9AD4\uFF0C\u5728\u8A72\u7DE8\u78BC\u4E2D\u4E0D\u53EF\u5305\u542B\u7121\u6548\u7684\u5E8F\u5217\u3002
-+        OperationNotSupported = {1} \u8B80\u53D6\u5668\u4E0D\u652F\u63F4\u4F5C\u696D "{0}"\u3002
-+        InvalidASCII = \u7D44\u5143\u7D44 "{0}" \u4E0D\u662F (7 \u4F4D\u5143) ASCII \u5B57\u5143\u96C6\u7684\u6210\u54E1\u3002
-+        CharConversionFailure = \u6C7A\u5B9A\u4F7F\u7528\u7279\u5B9A\u7DE8\u78BC\u7684\u5BE6\u9AD4\uFF0C\u5728\u8A72\u7DE8\u78BC\u4E2D\u4E0D\u53EF\u5305\u542B\u7121\u6548\u7684\u5E8F\u5217\u3002
-         
- # DTD Messages
- # 2.2 Characters
--        InvalidCharInEntityValue = \u5728\u6587\u5B57\u500B\u9AD4\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-+        InvalidCharInEntityValue = \u5728\u6587\u5B57\u5BE6\u9AD4\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInExternalSubset = \u5728 DTD \u5916\u90E8\u5B50\u96C6\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInIgnoreSect = \u5728\u6392\u9664\u7684\u689D\u4EF6\u6027\u6BB5\u843D\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-         InvalidCharInPublicID = \u5728\u516C\u7528 ID \u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
-@@ -169,150 +167,150 @@
-         PubidCharIllegal = \u516C\u7528 ID \u4E2D\u4E0D\u5141\u8A31\u5B57\u5143 (Unicode: 0x{0})\u3002
-         SpaceRequiredBetweenPublicAndSystem = publicId \u8207 systemId \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
- # 2.8 Prolog and Document Type Declaration
--        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u4E2D \"''\u3002
--        PEReferenceWithinMarkup = DTD \u5167\u90E8\u5B57\u96C6\u7684\u6A19\u8A18\u5167\u4E0D\u80FD\u51FA\u73FE\u53C3\u6578\u500B\u9AD4\u53C3\u7167 \"%{0};\"\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u4E2D "''\u3002
-+        PEReferenceWithinMarkup = DTD \u5167\u90E8\u5B57\u96C6\u7684\u6A19\u8A18\u5167\u4E0D\u80FD\u51FA\u73FE\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};"\u3002
-         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u6587\u4EF6\u985E\u578B\u5BA3\u544A\u5305\u542B\u6216\u6307\u5411\u7684\u6A19\u8A18\u5BA3\u544A\u5FC5\u9808\u683C\u5F0F\u6B63\u78BA\u3002
- # 2.10 White Space Handling
--        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\" \u7684\u5C6C\u6027\u5BA3\u544A\u5FC5\u9808\u6307\u5B9A\u70BA\u5217\u8209\u985E\u578B\uFF0C\u5176\u53EF\u80FD\u7684\u503C\u70BA \"default\" \u8207 \"preserve\"\u3002
-+        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space" \u7684\u5C6C\u6027\u5BA3\u544A\u5FC5\u9808\u6307\u5B9A\u70BA\u5217\u8209\u985E\u578B\uFF0C\u5176\u53EF\u80FD\u7684\u503C\u70BA "default" \u8207 "preserve"\u3002
- # 3.2 Element Type Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u5728\u5143\u7D20\u985E\u578B\u5BA3\u544A\u4E2D \"''\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u5728\u5143\u7D20\u985E\u578B\u5BA3\u544A\u4E2D\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5F8C\u9700\u8981\u7A7A\u683C\u3002
-+        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u5728\u5143\u7D20\u985E\u578B\u5BA3\u544A\u4E2D\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5F8C\u9700\u8981\u9650\u5236\u689D\u4EF6\u3002
-+        ElementDeclUnterminated = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u70BA ''>''\u3002
- # 3.2.1 Element Content
--        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B ''('' \u5B57\u5143\u6216\u5143\u7D20\u985E\u578B\u3002
--        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
-+        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B ''('' \u5B57\u5143\u6216\u5143\u7D20\u985E\u578B\u3002
-+        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
- # 3.2.2 Mixed Content
--        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B\u5143\u7D20\u985E\u578B\u3002
--        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
--        MixedContentUnterminated = \u5B50\u9805\u5143\u7D20\u7684\u985E\u578B\u53D7\u5230\u9650\u5236\u6642\uFF0C\u6DF7\u5408\u5167\u5BB9\u6A21\u578B \"{0}\" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA \")*\"\u3002
-+        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B\u5143\u7D20\u985E\u578B\u3002
-+        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
-+        MixedContentUnterminated = \u5B50\u9805\u5143\u7D20\u7684\u985E\u578B\u53D7\u5230\u9650\u5236\u6642\uFF0C\u6DF7\u5408\u5167\u5BB9\u6A21\u578B "{0}" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA ")*"\u3002
- # 3.3 Attribute-List Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u5728 attribute-list \u5BA3\u544A\u4E2D \"\"\u3002
--        IgnoreSectUnterminated = \u6392\u9664\u689D\u4EF6\u6027\u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F \"]]>\"\u3002
-+        IncludeSectUnterminated = \u5305\u542B\u689D\u4EF6\u6027\u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F "]]>"\u3002
-+        IgnoreSectUnterminated = \u6392\u9664\u689D\u4EF6\u6027\u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F "]]>"\u3002
- # 4.1 Character and Entity References
--        NameRequiredInPEReference = \u5728\u53C3\u6578\u500B\u9AD4\u53C3\u7167\u4E2D\uFF0C\u500B\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '%' \u4E4B\u5F8C\u3002
--        SemicolonRequiredInPEReference = \u53C3\u6578\u500B\u9AD4\u53C3\u7167 \"%{0};\" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
-+        NameRequiredInPEReference = \u5728\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167\u4E2D\uFF0C\u5BE6\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '%' \u4E4B\u5F8C\u3002
-+        SemicolonRequiredInPEReference = \u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
- # 4.2 Entity Declarations
--        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u5728\u500B\u9AD4\u5BA3\u544A\u4E2D \"''\u3002
--	MSG_DUPLICATE_ENTITY_DEFINITION = \u500B\u9AD4 \"{0}\" \u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002        
-+        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u5728\u5BE6\u9AD4\u5BA3\u544A\u4E2D "''\u3002
-+	MSG_DUPLICATE_ENTITY_DEFINITION = \u5BE6\u9AD4 "{0}" \u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002        
- # 4.2.2 External Entities
--        ExternalIDRequired = \u5916\u90E8\u500B\u9AD4\u5BA3\u544A\u7684\u958B\u982D\u5FC5\u9808\u70BA \"SYSTEM\" \u6216 \"PUBLIC\"\u3002
--        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \"PUBLIC\" \u8207\u516C\u7528 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
-+        ExternalIDRequired = \u5916\u90E8\u5BE6\u9AD4\u5BA3\u544A\u7684\u958B\u982D\u5FC5\u9808\u70BA "SYSTEM" \u6216 "PUBLIC"\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC" \u8207\u516C\u7528 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
-         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u516C\u7528 ID \u8207\u7CFB\u7D71 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
--        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \"SYSTEM\" \u8207\u7CFB\u7D71 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
--        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5 ID \u4E0D\u61C9\u6307\u5B9A\u70BA\u7CFB\u7D71 ID \"{0}\" \u7684\u4E00\u90E8\u5206\u3002
-+        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM" \u8207\u7CFB\u7D71 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
-+        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5 ID \u4E0D\u61C9\u6307\u5B9A\u70BA\u7CFB\u7D71 ID "{0}" \u7684\u4E00\u90E8\u5206\u3002
- # 4.7 Notation Declarations
--        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D \"''\u3002
-+        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D\u8868\u793A\u6CD5\u540D\u7A31 "{0}" \u4E4B\u5F8C\u9700\u8981\u7A7A\u683C\u3002
-+        ExternalIDorPublicIDRequired = \u8868\u793A\u6CD5 "{0}" \u7684\u5BA3\u544A\u5FC5\u9808\u5305\u542B\u7CFB\u7D71\u6216\u516C\u7528 ID\u3002
-+        NotationDeclUnterminated = \u8868\u793A\u6CD5 "{0}" \u7684\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u70BA ''>''\u3002
-         
- # Validation messages
--        DuplicateTypeInMixedContent = \u5143\u7D20\u5BA3\u544A \"{0}\" \u7684\u5167\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7D93\u6307\u5B9A\u5143\u7D20\u985E\u578B \"{1}\"\u3002
--        ENTITIESInvalid = \u985E\u578B ENTITIES \u7684\u5C6C\u6027\u503C \"{1}\" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u672A\u5256\u6790\u500B\u9AD4\u7684\u540D\u7A31\u3002
--        ENTITYInvalid = \u985E\u578B ENTITY \u7684\u5C6C\u6027\u503C \"{1}\" \u5FC5\u9808\u662F\u4E00\u500B\u672A\u5256\u6790\u500B\u9AD4\u7684\u540D\u7A31\u3002
--        IDDefaultTypeInvalid = ID \u5C6C\u6027 \"{0}\" \u5FC5\u9808\u5177\u6709 \"#IMPLIED\" \u6216 \"#REQUIRED\" \u7684\u5BA3\u544A\u9810\u8A2D\u3002
--        IDInvalid = \u985E\u578B ID \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u540D\u7A31\u3002
--        IDInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B ID \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F NCName\u3002
--        IDNotUnique = \u985E\u578B ID \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u6587\u4EF6\u5167\u7684\u552F\u4E00\u503C\u3002
--        IDREFInvalid = \u985E\u578B IDREF \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u540D\u7A31\u3002
--        IDREFInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B IDREF \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F NCName\u3002
--        IDREFSInvalid = \u985E\u578B IDREFS \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u3002
--        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u7576\u500B\u9AD4\u53C3\u7167\u7576\u4F5C\u5B8C\u6574\u5BA3\u544A\u6642\uFF0C\u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
--        ImproperDeclarationNesting = \u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
--        ImproperGroupNesting = \u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u6210\u5C0D\u62EC\u865F\u3002
--        INVALID_PE_IN_CONDITIONAL = \u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6574\u500B\u689D\u4EF6\u6027\u6BB5\u843D\u6216\u50C5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
--        MSG_ATTRIBUTE_NOT_DECLARED = \u5143\u7D20\u985E\u578B \"{0}\" \u5FC5\u9808\u5BA3\u544A\u5C6C\u6027 \"{1}\"\u3002
--        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5177\u6709\u503C \"{1}\" \u7684\u5C6C\u6027 \"{0}\" \u5FC5\u9808\u5177\u6709\u4F86\u81EA\u6E05\u55AE \"{2}\" \u7684\u503C\u3002
--        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5C6C\u6027 \"{0}\" \u7684\u503C \"{1}\" \u4E0D\u53EF\u900F\u904E\u6B63\u898F\u5316\u9032\u884C\u8B8A\u66F4 (\u6210\u70BA \"{2}\")\u3002
--        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5167\u5BB9\u4E0D\u5B8C\u6574\uFF0C\u5B83\u5FC5\u9808\u914D\u5C0D \"{1}\"\u3002
--        MSG_CONTENT_INVALID = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D \"{1}\"\u3002
--        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D \"{1}\"\u3002\u4E0D\u5141\u8A31\u985E\u578B \"{2}\" \u7684\u5B50\u9805\u3002
--        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027 \"{1}\" \u5177\u6709\u9810\u8A2D\u503C\uFF0C\u4E14\u5FC5\u9808\u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\u6307\u5B9A\u3002
--        MSG_DUPLICATE_ATTDEF = \u5143\u7D20\u985E\u578B \"{0}\" \u5DF2\u7D93\u5BA3\u544A\u5C6C\u6027 \"{1}\"\u3002
--        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u985E\u578B \"{0}\" \u4E0D\u53EF\u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002
--        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u9808\u5BA3\u544A\u5143\u7D20\u985E\u578B \"{0}\"\u3002
-+        DuplicateTypeInMixedContent = \u5143\u7D20\u5BA3\u544A "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7D93\u6307\u5B9A\u5143\u7D20\u985E\u578B "{1}"\u3002
-+        ENTITIESInvalid = \u985E\u578B ENTITIES \u7684\u5C6C\u6027\u503C "{1}" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u672A\u5256\u6790\u5BE6\u9AD4\u7684\u540D\u7A31\u3002
-+        ENTITYInvalid = \u985E\u578B ENTITY \u7684\u5C6C\u6027\u503C "{1}" \u5FC5\u9808\u662F\u4E00\u500B\u672A\u5256\u6790\u5BE6\u9AD4\u7684\u540D\u7A31\u3002
-+        IDDefaultTypeInvalid = ID \u5C6C\u6027 "{0}" \u5FC5\u9808\u5177\u6709 "#IMPLIED" \u6216 "#REQUIRED" \u7684\u5BA3\u544A\u9810\u8A2D\u3002
-+        IDInvalid = \u985E\u578B ID \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u540D\u7A31\u3002
-+        IDInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B ID \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F NCName\u3002
-+        IDNotUnique = \u985E\u578B ID \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u6587\u4EF6\u5167\u7684\u552F\u4E00\u503C\u3002
-+        IDREFInvalid = \u985E\u578B IDREF \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u540D\u7A31\u3002
-+        IDREFInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B IDREF \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F NCName\u3002
-+        IDREFSInvalid = \u985E\u578B IDREFS \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u3002
-+        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u7576\u5BE6\u9AD4\u53C3\u7167\u7576\u4F5C\u5B8C\u6574\u5BA3\u544A\u6642\uFF0C\u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
-+        ImproperDeclarationNesting = \u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
-+        ImproperGroupNesting = \u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u6210\u5C0D\u62EC\u865F\u3002
-+        INVALID_PE_IN_CONDITIONAL = \u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6574\u500B\u689D\u4EF6\u6027\u6BB5\u843D\u6216\u50C5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
-+        MSG_ATTRIBUTE_NOT_DECLARED = \u5143\u7D20\u985E\u578B "{0}" \u5FC5\u9808\u5BA3\u544A\u5C6C\u6027 "{1}"\u3002
-+        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5177\u6709\u503C "{1}" \u7684\u5C6C\u6027 "{0}" \u5FC5\u9808\u5177\u6709\u4F86\u81EA\u6E05\u55AE "{2}" \u7684\u503C\u3002
-+        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5C6C\u6027 "{0}" \u7684\u503C "{1}" \u4E0D\u53EF\u900F\u904E\u6B63\u898F\u5316\u9032\u884C\u8B8A\u66F4 (\u6210\u70BA "{2}")\u3002
-+        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5167\u5BB9\u4E0D\u5B8C\u6574\uFF0C\u5B83\u5FC5\u9808\u914D\u5C0D "{1}"\u3002
-+        MSG_CONTENT_INVALID = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D "{1}"\u3002
-+        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D "{1}"\u3002\u4E0D\u5141\u8A31\u985E\u578B "{2}" \u7684\u5B50\u9805\u3002
-+        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027 "{1}" \u5177\u6709\u9810\u8A2D\u503C\uFF0C\u4E14\u5FC5\u9808\u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\u6307\u5B9A\u3002
-+        MSG_DUPLICATE_ATTDEF = \u5143\u7D20\u985E\u578B "{0}" \u5DF2\u7D93\u5BA3\u544A\u5C6C\u6027 "{1}"\u3002
-+        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u985E\u578B "{0}" \u4E0D\u53EF\u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002
-+        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u9808\u5BA3\u544A\u5143\u7D20\u985E\u578B "{0}"\u3002
-         MSG_GRAMMAR_NOT_FOUND = \u6587\u4EF6\u7121\u6548: \u627E\u4E0D\u5230\u6587\u6CD5\u3002
--        MSG_ELEMENT_WITH_ID_REQUIRED = ID \u70BA \"{0}\" \u7684\u5143\u7D20\u5FC5\u9808\u51FA\u73FE\u5728\u6587\u4EF6\u4E2D\u3002
--        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u7368\u7ACB\u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u500B\u9AD4 \"{0}\"\u3002
--        MSG_FIXED_ATTVALUE_INVALID = \u5177\u6709\u503C \"{2}\" \u7684\u5C6C\u6027 \"{1}\" \u5FC5\u9808\u5177\u6709 \"{3}\" \u7684\u503C\u3002
--        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u985E\u578B \"{0}\" \u5DF2\u7D93\u5177\u6709\u985E\u578B ID \u7684\u5C6C\u6027 \"{1}\"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B ID \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 \"{2}\"\u3002
--        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u985E\u578B \"{0}\" \u5DF2\u7D93\u5177\u6709\u985E\u578B NOTATION \u7684\u5C6C\u6027 \"{1}\"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B NOTATION \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 \"{2}\"\u3002
--        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u82E5\u8981\u5728\u5C6C\u6027 \"{0}\" \u7684\u8868\u793A\u6CD5\u985E\u578B\u6E05\u55AE\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 \"{1}\"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
--        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u82E5\u8981\u5728 \"{0}\" \u7684\u672A\u5256\u6790\u500B\u9AD4\u5BA3\u544A\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 \"{1}\"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
--        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5256\u6790\u500B\u9AD4\u4E2D\u5BA3\u544A\u7684\u500B\u9AD4 \"{0}\"\u3002
--        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B \"{0}\" \u9700\u8981\u5C6C\u6027 \"{1}\" \u4E14\u5FC5\u9808\u4E88\u4EE5\u6307\u5B9A\u3002
--        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5177\u6709\u5143\u7D20\u5167\u5BB9\u7684\u5916\u90E8\u5256\u6790\u500B\u9AD4\u4E2D\u5BA3\u544A\u7684\u5143\u7D20\u4E4B\u9593\uFF0C\u4E0D\u53EF\u6709\u7A7A\u683C\u3002
--        NMTOKENInvalid = \u985E\u578B NMTOKEN \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u540D\u7A31\u8A18\u865F\u3002
--        NMTOKENSInvalid = \u985E\u578B NMTOKENS \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u8A18\u865F\u3002
--        NoNotationOnEmptyElement = \u5BA3\u544A EMPTY \u7684\u5143\u7D20\u985E\u578B \"{0}\" \u4E0D\u53EF\u5BA3\u544A\u985E\u578B NOTATION \u7684\u5C6C\u6027 \"{1}\"\u3002
--        RootElementTypeMustMatchDoctypedecl = \u6587\u4EF6\u6839\u5143\u7D20 \"{1}\" \u5FC5\u9808\u914D\u5C0D DOCTYPE \u6839 \"{0}\"\u3002
--        UndeclaredElementInContentSpec = \u5143\u7D20 \"{0}\" \u7684\u5167\u5BB9\u6A21\u578B\u53C3\u7167\u672A\u5BA3\u544A\u7684\u5143\u7D20 \"{1}\"\u3002
--        UniqueNotationName = \u8868\u793A\u6CD5 \"{0}\" \u7684\u5BA3\u544A\u4E26\u975E\u552F\u4E00\u3002\u6307\u5B9A\u7684 Name \u4E0D\u80FD\u5728\u4E00\u500B\u4EE5\u4E0A\u7684\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D\u5BA3\u544A\u3002
-+        MSG_ELEMENT_WITH_ID_REQUIRED = ID \u70BA "{0}" \u7684\u5143\u7D20\u5FC5\u9808\u51FA\u73FE\u5728\u6587\u4EF6\u4E2D\u3002
-+        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u7368\u7ACB\u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5BE6\u9AD4 "{0}"\u3002
-+        MSG_FIXED_ATTVALUE_INVALID = \u5177\u6709\u503C "{2}" \u7684\u5C6C\u6027 "{1}" \u5FC5\u9808\u5177\u6709 "{3}" \u7684\u503C\u3002
-+        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u985E\u578B "{0}" \u5DF2\u7D93\u5177\u6709\u985E\u578B ID \u7684\u5C6C\u6027 "{1}"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B ID \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 "{2}"\u3002
-+        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u985E\u578B "{0}" \u5DF2\u7D93\u5177\u6709\u985E\u578B NOTATION \u7684\u5C6C\u6027 "{1}"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B NOTATION \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 "{2}"\u3002
-+        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u82E5\u8981\u5728\u5C6C\u6027 "{0}" \u7684\u8868\u793A\u6CD5\u985E\u578B\u6E05\u55AE\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 "{1}"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
-+        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u82E5\u8981\u5728 "{0}" \u7684\u672A\u5256\u6790\u5BE6\u9AD4\u5BA3\u544A\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 "{1}"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
-+        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5256\u6790\u5BE6\u9AD4\u4E2D\u5BA3\u544A\u7684\u5BE6\u9AD4 "{0}"\u3002
-+        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B "{0}" \u9700\u8981\u5C6C\u6027 "{1}" \u4E14\u5FC5\u9808\u4E88\u4EE5\u6307\u5B9A\u3002
-+        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5177\u6709\u5143\u7D20\u5167\u5BB9\u7684\u5916\u90E8\u5256\u6790\u5BE6\u9AD4\u4E2D\u5BA3\u544A\u7684\u5143\u7D20\u4E4B\u9593\uFF0C\u4E0D\u53EF\u6709\u7A7A\u683C\u3002
-+        NMTOKENInvalid = \u985E\u578B NMTOKEN \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u540D\u7A31\u8A18\u865F\u3002
-+        NMTOKENSInvalid = \u985E\u578B NMTOKENS \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u8A18\u865F\u3002
-+        NoNotationOnEmptyElement = \u5BA3\u544A EMPTY \u7684\u5143\u7D20\u985E\u578B "{0}" \u4E0D\u53EF\u5BA3\u544A\u985E\u578B NOTATION \u7684\u5C6C\u6027 "{1}"\u3002
-+        RootElementTypeMustMatchDoctypedecl = \u6587\u4EF6\u6839\u5143\u7D20 "{1}" \u5FC5\u9808\u914D\u5C0D DOCTYPE \u6839 "{0}"\u3002
-+        UndeclaredElementInContentSpec = \u5143\u7D20 "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u53C3\u7167\u672A\u5BA3\u544A\u7684\u5143\u7D20 "{1}"\u3002
-+        UniqueNotationName = \u8868\u793A\u6CD5 "{0}" \u7684\u5BA3\u544A\u4E26\u975E\u552F\u4E00\u3002\u6307\u5B9A\u7684 Name \u4E0D\u80FD\u5728\u4E00\u500B\u4EE5\u4E0A\u7684\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D\u5BA3\u544A\u3002
-         ENTITYFailedInitializeGrammar =  ENTITYDatatype \u9A57\u8B49\u7A0B\u5F0F: \u5931\u6557\u3002\u9700\u8981\u4F7F\u7528\u6709\u6548\u7684\u6587\u6CD5\u53C3\u7167\u4F86\u547C\u53EB\u8D77\u59CB\u65B9\u6CD5\u3002 \t
--        ENTITYNotUnparsed = ENTITY \"{0}\" \u4E26\u975E\u672A\u7D93\u5256\u6790\u3002
--        ENTITYNotValid = ENTITY \"{0}\" \u7121\u6548\u3002
-+        ENTITYNotUnparsed = ENTITY "{0}" \u4E26\u975E\u672A\u7D93\u5256\u6790\u3002
-+        ENTITYNotValid = ENTITY "{0}" \u7121\u6548\u3002
-         EmptyList = \u985E\u578B ENTITIES\u3001IDREFS \u8207 NMTOKENS \u7684\u503C\u4E0D\u53EF\u70BA\u7A7A\u767D\u6E05\u55AE\u3002
+ void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
+-  CardTableModRefBS* ct_bs = (CardTableModRefBS*) barrier_set();
++  G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
+   for (HeapRegion* hr = head; hr != NULL; hr = hr->get_next_young_region()) {
+     verify_dirty_region(hr);
+   }
+@@ -5986,7 +6133,7 @@
+ #endif
  
- # Entity related messages
- # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
--        ReferenceToExternalEntity = \u5C6C\u6027\u503C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u500B\u9AD4 \"&{0};\"\u3002
--        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
--        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
-+        ReferenceToExternalEntity = \u5C6C\u6027\u503C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5BE6\u9AD4 "&{0};"\u3002
-+        AccessExternalDTD = \u5916\u90E8 DTD: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8 DTD ''{0}''\uFF0C\u56E0\u70BA accessExternalDTD \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
-+        AccessExternalEntity = \u5916\u90E8\u5BE6\u9AD4: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA accessExternalDTD \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
+ void G1CollectedHeap::cleanUpCardTable() {
+-  CardTableModRefBS* ct_bs = (CardTableModRefBS*) (barrier_set());
++  G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
+   double start = os::elapsedTime();
  
- # 4.1 Character and Entity References
--        EntityNotDeclared = \u53C3\u7167\u4E86\u500B\u9AD4 \"{0}\"\uFF0C\u4F46\u662F\u672A\u5BA3\u544A\u3002
--        ReferenceToUnparsedEntity = \u4E0D\u5141\u8A31\u672A\u5256\u6790\u7684\u500B\u9AD4\u53C3\u7167 \"&{0};\"\u3002
--        RecursiveReference = \u905E\u8FF4\u500B\u9AD4\u53C3\u7167 \"{0}\"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
--        RecursiveGeneralReference = \u905E\u8FF4\u4E00\u822C\u500B\u9AD4\u53C3\u7167 \"&{0};\"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
--        RecursivePEReference = \u905E\u8FF4\u53C3\u6578\u500B\u9AD4\u53C3\u7167 \"%{0};\"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
-+        EntityNotDeclared = \u53C3\u7167\u4E86\u5BE6\u9AD4 "{0}"\uFF0C\u4F46\u662F\u672A\u5BA3\u544A\u3002
-+        ReferenceToUnparsedEntity = \u4E0D\u5141\u8A31\u672A\u5256\u6790\u7684\u5BE6\u9AD4\u53C3\u7167 "&{0};"\u3002
-+        RecursiveReference = \u905E\u8FF4\u5BE6\u9AD4\u53C3\u7167 "{0}"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
-+        RecursiveGeneralReference = \u905E\u8FF4\u4E00\u822C\u5BE6\u9AD4\u53C3\u7167 "&{0};"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
-+        RecursivePEReference = \u905E\u8FF4\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
- # 4.3.3 Character Encoding in Entities
--        EncodingNotSupported = \u4E0D\u652F\u63F4\u7DE8\u78BC \"{0}\"\u3002
--        EncodingRequired = \u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u7DE8\u78BC\u7684\u5256\u6790\u500B\u9AD4\uFF0C\u5FC5\u9808\u5305\u542B\u7DE8\u78BC\u5BA3\u544A\u3002
-+        EncodingNotSupported = \u4E0D\u652F\u63F4\u7DE8\u78BC "{0}"\u3002
-+        EncodingRequired = \u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u7DE8\u78BC\u7684\u5256\u6790\u5BE6\u9AD4\uFF0C\u5FC5\u9808\u5305\u542B\u7DE8\u78BC\u5BA3\u544A\u3002
-         
- # Namespaces support
- # 4. Using Qualified Names
-         IllegalQName = \u5143\u7D20\u6216\u5C6C\u6027\u4E0D\u7B26\u5408 QName \u7522\u751F: QName::=(NCName':')?NCName\u3002 
--        ElementXMLNSPrefix = \u5143\u7D20 \"{0}\" \u4E0D\u80FD\u4F7F\u7528 \"xmlns\" \u4F5C\u70BA\u524D\u7F6E\u78BC\u3002
--        ElementPrefixUnbound = \u5143\u7D20 \"{1}\" \u7684\u524D\u7F6E\u78BC \"{0}\" \u672A\u9023\u7D50\u3002
--        AttributePrefixUnbound = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5C6C\u6027 \"{1}\" \u7684\u524D\u7F6E\u78BC \"{2}\" \u672A\u9023\u7D50\u3002
--        EmptyPrefixedAttName = \u5C6C\u6027 \"{0}\" \u7684\u503C\u7121\u6548\u3002\u524D\u7F6E\u7684\u547D\u540D\u7A7A\u9593\u9023\u7D50\u4E0D\u53EF\u70BA\u7A7A\u767D\u3002
--        PrefixDeclared = \u672A\u5BA3\u544A\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC \"{0}\"\u3002
-+        ElementXMLNSPrefix = \u5143\u7D20 "{0}" \u4E0D\u80FD\u4F7F\u7528 "xmlns" \u4F5C\u70BA\u524D\u7F6E\u78BC\u3002
-+        ElementPrefixUnbound = \u5143\u7D20 "{1}" \u7684\u524D\u7F6E\u78BC "{0}" \u672A\u9023\u7D50\u3002
-+        AttributePrefixUnbound = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5C6C\u6027 "{1}" \u7684\u524D\u7F6E\u78BC "{2}" \u672A\u9023\u7D50\u3002
-+        EmptyPrefixedAttName = \u5C6C\u6027 "{0}" \u7684\u503C\u7121\u6548\u3002\u524D\u7F6E\u7684\u547D\u540D\u7A7A\u9593\u9023\u7D50\u4E0D\u53EF\u70BA\u7A7A\u767D\u3002
-+        PrefixDeclared = \u672A\u5BA3\u544A\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC "{0}"\u3002
-         CantBindXMLNS = \u524D\u7F6E\u78BC "xmlns" \u7121\u6CD5\u660E\u78BA\u9023\u7D50\u4EFB\u4F55\u547D\u540D\u7A7A\u9593; "xmlns" \u7684\u547D\u540D\u7A7A\u9593\u4E5F\u7121\u6CD5\u660E\u78BA\u9023\u7D50\u4EFB\u4F55\u524D\u7F6E\u78BC\u3002
-         CantBindXML = \u524D\u7F6E\u78BC "xml" \u7121\u6CD5\u9023\u7D50\u4E00\u822C\u547D\u540D\u7A7A\u9593\u4E4B\u5916\u7684\u4EFB\u4F55\u547D\u540D\u7A7A\u9593; "xml" \u7684\u547D\u540D\u7A7A\u9593\u4E5F\u7121\u6CD5\u9023\u7D50 "xml" \u4E4B\u5916\u7684\u4EFB\u4F55\u547D\u540D\u7A7A\u9593\u3002
--        MSG_ATT_DEFAULT_INVALID = \u7531\u65BC\u6B64\u5C6C\u6027\u985E\u578B\u7684\u8A9E\u5F59\u9650\u5236\u689D\u4EF6\uFF0C\u5C6C\u6027 \"{0}\" \u7684 defaultValue \"{1}\" \u7121\u6548\u3002
-+        MSG_ATT_DEFAULT_INVALID = \u7531\u65BC\u6B64\u5C6C\u6027\u985E\u578B\u7684\u8A9E\u5F59\u9650\u5236\u689D\u4EF6\uFF0C\u5C6C\u6027 "{0}" \u7684 defaultValue "{1}" \u7121\u6548\u3002
+   {
+@@ -6575,3 +6722,234 @@
+   _humongous_set.verify_end();
+   _free_list.verify_end();
+ }
++
++// Optimized nmethod scanning
++
++class RegisterNMethodOopClosure: public OopClosure {
++  G1CollectedHeap* _g1h;
++  nmethod* _nm;
++
++  template  void do_oop_work(T* p) {
++    T heap_oop = oopDesc::load_heap_oop(p);
++    if (!oopDesc::is_null(heap_oop)) {
++      oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
++      HeapRegion* hr = _g1h->heap_region_containing(obj);
++      if (hr == NULL) {
++        // reference into perm gen - ignore.
++        assert(_g1h->is_in_permanent(obj), "must be a reference into perm gen");
++        return;
++      }
++      assert(!hr->continuesHumongous(),
++             err_msg("trying to add code root "PTR_FORMAT" in continuation of humongous region "HR_FORMAT
++                     " starting at "HR_FORMAT,
++                     _nm, HR_FORMAT_PARAMS(hr), HR_FORMAT_PARAMS(hr->humongous_start_region())));
++
++      // HeapRegion::add_strong_code_root() avoids adding duplicate
++      // entries but having duplicates is  OK since we "mark" nmethods
++      // as visited when we scan the strong code root lists during the GC.
++      hr->add_strong_code_root(_nm);
++      assert(hr->rem_set()->strong_code_roots_list_contains(_nm),
++             err_msg("failed to add code root "PTR_FORMAT" to remembered set of region "HR_FORMAT,
++                     _nm, HR_FORMAT_PARAMS(hr)));
++    }
++  }
++
++public:
++  RegisterNMethodOopClosure(G1CollectedHeap* g1h, nmethod* nm) :
++    _g1h(g1h), _nm(nm) {}
++
++  void do_oop(oop* p)       { do_oop_work(p); }
++  void do_oop(narrowOop* p) { do_oop_work(p); }
++};
++
++class UnregisterNMethodOopClosure: public OopClosure {
++  G1CollectedHeap* _g1h;
++  nmethod* _nm;
++
++  template  void do_oop_work(T* p) {
++    T heap_oop = oopDesc::load_heap_oop(p);
++    if (!oopDesc::is_null(heap_oop)) {
++      oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
++      HeapRegion* hr = _g1h->heap_region_containing(obj);
++      if (hr == NULL) {
++        // reference into perm gen - ignore.
++        assert(_g1h->is_in_permanent(obj), "must be a reference into perm gen");
++        return;
++      }
++      assert(!hr->continuesHumongous(),
++             err_msg("trying to remove code root "PTR_FORMAT" in continuation of humongous region "HR_FORMAT
++                     " starting at "HR_FORMAT,
++                     _nm, HR_FORMAT_PARAMS(hr), HR_FORMAT_PARAMS(hr->humongous_start_region())));
++
++      hr->remove_strong_code_root(_nm);
++      assert(!hr->rem_set()->strong_code_roots_list_contains(_nm),
++             err_msg("failed to remove code root "PTR_FORMAT" of region "HR_FORMAT,
++                     _nm, HR_FORMAT_PARAMS(hr)));    }
++  }
++
++public:
++  UnregisterNMethodOopClosure(G1CollectedHeap* g1h, nmethod* nm) :
++    _g1h(g1h), _nm(nm) {}
++
++  void do_oop(oop* p)       { do_oop_work(p); }
++  void do_oop(narrowOop* p) { do_oop_work(p); }
++};
++
++void G1CollectedHeap::register_nmethod(nmethod* nm) {
++  CollectedHeap::register_nmethod(nm);
++
++  guarantee(nm != NULL, "sanity");
++  RegisterNMethodOopClosure reg_cl(this, nm);
++  nm->oops_do(®_cl);
++}
++
++void G1CollectedHeap::unregister_nmethod(nmethod* nm) {
++  CollectedHeap::unregister_nmethod(nm);
++
++  guarantee(nm != NULL, "sanity");
++  UnregisterNMethodOopClosure reg_cl(this, nm);
++  nm->oops_do(®_cl, false, true);
++}
++
++class MigrateCodeRootsHeapRegionClosure: public HeapRegionClosure {
++public:
++  bool doHeapRegion(HeapRegion *hr) {
++    assert(!hr->isHumongous(),
++           err_msg("humongous region "HR_FORMAT" should not have been added to collection set",
++                   HR_FORMAT_PARAMS(hr)));
++    hr->migrate_strong_code_roots();
++    return false;
++  }
++};
++
++void G1CollectedHeap::migrate_strong_code_roots() {
++  MigrateCodeRootsHeapRegionClosure cl;
++  double migrate_start = os::elapsedTime();
++  collection_set_iterate(&cl);
++  double migration_time_ms = (os::elapsedTime() - migrate_start) * 1000.0;
++  g1_policy()->phase_times()->record_strong_code_root_migration_time(migration_time_ms);
++}
++
++// Mark all the code roots that point into regions *not* in the
++// collection set.
++//
++// Note we do not want to use a "marking" CodeBlobToOopClosure while
++// walking the the code roots lists of regions not in the collection
++// set. Suppose we have an nmethod (M) that points to objects in two
++// separate regions - one in the collection set (R1) and one not (R2).
++// Using a "marking" CodeBlobToOopClosure here would result in "marking"
++// nmethod M when walking the code roots for R1. When we come to scan
++// the code roots for R2, we would see that M is already marked and it
++// would be skipped and the objects in R2 that are referenced from M
++// would not be evacuated.
++
++class MarkStrongCodeRootCodeBlobClosure: public CodeBlobClosure {
++
++  class MarkStrongCodeRootOopClosure: public OopClosure {
++    ConcurrentMark* _cm;
++    HeapRegion* _hr;
++    uint _worker_id;
++
++    template  void do_oop_work(T* p) {
++      T heap_oop = oopDesc::load_heap_oop(p);
++      if (!oopDesc::is_null(heap_oop)) {
++        oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
++        // Only mark objects in the region (which is assumed
++        // to be not in the collection set).
++        if (_hr->is_in(obj)) {
++          _cm->grayRoot(obj, (size_t) obj->size(), _worker_id);
++        }
++      }
++    }
++
++  public:
++    MarkStrongCodeRootOopClosure(ConcurrentMark* cm, HeapRegion* hr, uint worker_id) :
++      _cm(cm), _hr(hr), _worker_id(worker_id) {
++      assert(!_hr->in_collection_set(), "sanity");
++    }
++
++    void do_oop(narrowOop* p) { do_oop_work(p); }
++    void do_oop(oop* p)       { do_oop_work(p); }
++  };
++
++  MarkStrongCodeRootOopClosure _oop_cl;
++
++public:
++  MarkStrongCodeRootCodeBlobClosure(ConcurrentMark* cm, HeapRegion* hr, uint worker_id):
++    _oop_cl(cm, hr, worker_id) {}
++
++  void do_code_blob(CodeBlob* cb) {
++    nmethod* nm = (cb == NULL) ? NULL : cb->as_nmethod_or_null();
++    if (nm != NULL) {
++      nm->oops_do(&_oop_cl);
++    }
++  }
++};
++
++class MarkStrongCodeRootsHRClosure: public HeapRegionClosure {
++  G1CollectedHeap* _g1h;
++  uint _worker_id;
++
++public:
++  MarkStrongCodeRootsHRClosure(G1CollectedHeap* g1h, uint worker_id) :
++    _g1h(g1h), _worker_id(worker_id) {}
++
++  bool doHeapRegion(HeapRegion *hr) {
++    HeapRegionRemSet* hrrs = hr->rem_set();
++    if (hr->continuesHumongous()) {
++      // Code roots should never be attached to a continuation of a humongous region
++      assert(hrrs->strong_code_roots_list_length() == 0,
++             err_msg("code roots should never be attached to continuations of humongous region "HR_FORMAT
++                     " starting at "HR_FORMAT", but has "INT32_FORMAT,
++                     HR_FORMAT_PARAMS(hr), HR_FORMAT_PARAMS(hr->humongous_start_region()),
++                     hrrs->strong_code_roots_list_length()));
++      return false;
++    }
++
++    if (hr->in_collection_set()) {
++      // Don't mark code roots into regions in the collection set here.
++      // They will be marked when we scan them.
++      return false;
++    }
++
++    MarkStrongCodeRootCodeBlobClosure cb_cl(_g1h->concurrent_mark(), hr, _worker_id);
++    hr->strong_code_roots_do(&cb_cl);
++    return false;
++  }
++};
++
++void G1CollectedHeap::mark_strong_code_roots(uint worker_id) {
++  MarkStrongCodeRootsHRClosure cl(this, worker_id);
++  if (G1CollectedHeap::use_parallel_gc_threads()) {
++    heap_region_par_iterate_chunked(&cl,
++                                    worker_id,
++                                    workers()->active_workers(),
++                                    HeapRegion::ParMarkRootClaimValue);
++  } else {
++    heap_region_iterate(&cl);
++  }
++}
++
++class RebuildStrongCodeRootClosure: public CodeBlobClosure {
++  G1CollectedHeap* _g1h;
++
++public:
++  RebuildStrongCodeRootClosure(G1CollectedHeap* g1h) :
++    _g1h(g1h) {}
++
++  void do_code_blob(CodeBlob* cb) {
++    nmethod* nm = (cb != NULL) ? cb->as_nmethod_or_null() : NULL;
++    if (nm == NULL) {
++      return;
++    }
++
++    if (ScavengeRootsInCode && nm->detect_scavenge_root_oops()) {
++      _g1h->register_nmethod(nm);
++    }
++  }
++};
++
++void G1CollectedHeap::rebuild_strong_code_roots() {
++  RebuildStrongCodeRootClosure blob_cl(this);
++  CodeCache::blobs_do(&blob_cl);
++}
+--- ./hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	2013-09-06 11:22:11.000000000 -0700
++++ ./hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	2014-06-06 19:56:20.000000000 -0700
+@@ -31,6 +31,7 @@
+ #include "gc_implementation/g1/g1HRPrinter.hpp"
+ #include "gc_implementation/g1/g1MonitoringSupport.hpp"
+ #include "gc_implementation/g1/g1RemSet.hpp"
++#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+ #include "gc_implementation/g1/g1YCTypes.hpp"
+ #include "gc_implementation/g1/heapRegionSeq.hpp"
+ #include "gc_implementation/g1/heapRegionSets.hpp"
+@@ -46,6 +47,7 @@
+ // may combine concurrent marking with parallel, incremental compaction of
+ // heap subsets that will yield large amounts of garbage.
+ 
++// Forward declarations
+ class HeapRegion;
+ class HRRSCleanupTask;
+ class PermanentGenerationSpec;
+@@ -69,6 +71,8 @@
+ class G1NewTracer;
+ class G1OldTracer;
+ class EvacuationFailedInfo;
++class nmethod;
++class Ticks;
+ 
+ typedef OverflowTaskQueue         RefToScanQueue;
+ typedef GenericTaskQueueSet RefToScanQueueSet;
+@@ -163,19 +167,6 @@
+     : G1AllocRegion("Mutator Alloc Region", false /* bot_updates */) { }
+ };
  
- # REVISIT: These need messages
-         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-@@ -320,8 +318,10 @@
-         InvalidCharInLiteral=InvalidCharInLiteral
+-// The G1 STW is alive closure.
+-// An instance is embedded into the G1CH and used as the
+-// (optional) _is_alive_non_header closure in the STW
+-// reference processor. It is also extensively used during
+-// reference processing during STW evacuation pauses.
+-class G1STWIsAliveClosure: public BoolObjectClosure {
+-  G1CollectedHeap* _g1;
+-public:
+-  G1STWIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
+-  void do_object(oop p) { assert(false, "Do not call."); }
+-  bool do_object_b(oop p);
+-};
+-
+ class SurvivorGCAllocRegion : public G1AllocRegion {
+ protected:
+   virtual HeapRegion* allocate_new_region(size_t word_size, bool force);
+@@ -194,6 +185,19 @@
+   : G1AllocRegion("Old GC Alloc Region", true /* bot_updates */) { }
+ };
  
++// The G1 STW is alive closure.
++// An instance is embedded into the G1CH and used as the
++// (optional) _is_alive_non_header closure in the STW
++// reference processor. It is also extensively used during
++// reference processing during STW evacuation pauses.
++class G1STWIsAliveClosure: public BoolObjectClosure {
++  G1CollectedHeap* _g1;
++public:
++  G1STWIsAliveClosure(G1CollectedHeap* g1) : _g1(g1) {}
++  void do_object(oop p) { assert(false, "Do not call."); }
++  bool do_object_b(oop p);
++};
++
+ class RefineCardTableEntryClosure;
  
--#Application can set the limit of number of entities that should be expanded by the parser.
--EntityExpansionLimitExceeded=\u5256\u6790\u5668\u5728\u6B64\u6587\u4EF6\u4E2D\u906D\u9047 \"{0}\" \u500B\u4EE5\u4E0A\u7684\u500B\u9AD4\u64F4\u5145; \u6B64\u70BA\u61C9\u7528\u7A0B\u5F0F\u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
-+# Implementation limits
-+        EntityExpansionLimitExceeded=JAXP00010001: \u5256\u6790\u5668\u5728\u6B64\u6587\u4EF6\u4E2D\u9047\u5230 "{0}" \u500B\u4EE5\u4E0A\u7684\u5BE6\u9AD4\u64F4\u5145; \u9019\u662F JDK \u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
-+        ElementAttributeLimit=JAXP00010002: \u5143\u7D20 "{0}" \u5177\u6709\u8D85\u904E "{1}" \u500B\u4EE5\u4E0A\u7684\u5C6C\u6027\uFF0C"{1}" \u662F JDK \u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
-+        MaxEntitySizeLimit=JAXP00010003: \u5BE6\u9AD4 "{0}" \u7684\u9577\u5EA6\u70BA "{1}"\uFF0C\u8D85\u904E "{3}" \u6240\u8A2D\u5B9A\u7684 "{2}" \u9650\u5236\u3002
-+        TotalEntitySizeLimit=JAXP00010004: \u5BE6\u9AD4\u7684\u7D2F\u7A4D\u5927\u5C0F "{0}" \u8D85\u904E "{2}" \u8A2D\u5B9A\u7684 "{1}" \u9650\u5236\u3002
-+        MaxXMLNameLimit=JAXP00010005: \u540D\u7A31 "{0}" \u8D85\u904E "{2}" \u8A2D\u5B9A\u7684 "{1}" \u9650\u5236\u3002
+ class G1CollectedHeap : public SharedHeap {
+@@ -747,7 +751,7 @@
+     return _old_marking_cycles_completed;
+   }
  
--# Application can set the limit of number of attributes of entity that should be expanded by the parser.
--ElementAttributeLimit= \u5143\u7D20 \"{0}\" \u5177\u6709\u8D85\u904E \"{1}\" \u500B\u4EE5\u4E0A\u7684\u5C6C\u6027\uFF0C\"{1}\" \u70BA\u61C9\u7528\u7A0B\u5F0F\u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	2014-04-20 12:39:47.000000000 -0700
-@@ -21,13 +21,13 @@
+-  void register_concurrent_cycle_start(jlong start_time);
++  void register_concurrent_cycle_start(const Ticks& start_time);
+   void register_concurrent_cycle_end();
+   void trace_heap_after_concurrent_cycle();
  
- package com.sun.org.apache.xerces.internal.impl.xs.models;
+@@ -792,8 +796,6 @@
  
-+import com.sun.org.apache.xerces.internal.impl.Constants;
- import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
--import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
--import com.sun.org.apache.xerces.internal.util.SecurityManager ;
- import com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode;
--import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
- import com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter;
--import com.sun.org.apache.xerces.internal.impl.Constants;
-+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
-+import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
-+import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
+   // The g1 remembered set of the heap.
+   G1RemSet* _g1_rem_set;
+-  // And it's mod ref barrier set, used to track updates for the above.
+-  ModRefBarrierSet* _mr_bs;
  
- /**
-  *
-@@ -68,7 +68,7 @@
+   // A set of cards that cover the objects for which the Rsets should be updated
+   // concurrently after the collection.
+@@ -835,7 +837,8 @@
+                                OopClosure* scan_non_heap_roots,
+                                OopsInHeapRegionClosure* scan_rs,
+                                OopsInGenClosure* scan_perm,
+-                               int worker_i);
++                               int worker_i,
++                               bool manages_code_roots = false);
  
-     // stores defaults for different security holes (maxOccurLimit in current context) if it has
-     // been set on the configuration.
--    private SecurityManager fSecurityManager = null;
-+    private XMLSecurityManager fSecurityManager = null;
+   // Apply "blk" to all the weak roots of the system.  These include
+   // JNI weak roots, the code cache, system dictionary, symbol table,
+@@ -1127,7 +1130,6 @@
  
-     /** default constructor */
-     public CMNodeFactory() {
-@@ -77,10 +77,10 @@
-     public void reset(XMLComponentManager componentManager){
-         fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
-         try {
--            fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER);
-+            fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);
-             //we are setting the limit of number of nodes to 3times the maxOccur value..
-             if(fSecurityManager != null){
--                maxNodeLimit = fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY ;
-+                maxNodeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY ;
-             }
-         }
-         catch (XMLConfigurationException e) {
-@@ -109,7 +109,8 @@
-     }
+   // The rem set and barrier set.
+   G1RemSet* g1_rem_set() const { return _g1_rem_set; }
+-  ModRefBarrierSet* mr_bs() const { return _mr_bs; }
  
-     public void nodeCountCheck(){
--        if( fSecurityManager != null && nodeCount++ > maxNodeLimit){
-+        if( fSecurityManager != null && !fSecurityManager.isNoLimit(maxNodeLimit) &&
-+                nodeCount++ > maxNodeLimit){
-             if(DEBUG){
-                 System.out.println("nodeCount = " + nodeCount ) ;
-                 System.out.println("nodeLimit = " + maxNodeLimit ) ;
-@@ -150,8 +151,9 @@
+   // The rem set iterator.
+   HeapRegionRemSetIterator* rem_set_iterator(int i) {
+@@ -1361,6 +1363,10 @@
  
-             if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
-                 propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
--                fSecurityManager = (SecurityManager)value;
--                maxNodeLimit = (fSecurityManager != null) ? fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY : 0 ;
-+                fSecurityManager = (XMLSecurityManager)value;
-+                maxNodeLimit = (fSecurityManager != null) ?
-+                        fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY : 0 ;
-                 return;
-             }
-             if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	2014-04-20 12:39:47.000000000 -0700
-@@ -40,6 +40,7 @@
- import com.sun.org.apache.xerces.internal.util.SymbolTable;
- import com.sun.org.apache.xerces.internal.util.XMLChar;
- import com.sun.org.apache.xerces.internal.util.XMLSymbols;
-+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
- import com.sun.org.apache.xerces.internal.xni.QName;
- import com.sun.org.apache.xerces.internal.xs.XSConstants;
- import java.util.HashMap;
-@@ -1194,8 +1195,8 @@
-                     if (!optimize) {
-                     //Revisit :: IMO this is not right place to check
-                     // maxOccurNodeLimit.
--                    int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getMaxOccurNodeLimit();
--                    if (max > maxOccurNodeLimit) {
-+                    int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT);
-+                    if (max > maxOccurNodeLimit && !fSchemaHandler.fSecureProcessing.isNoLimit(maxOccurNodeLimit)) {
-                         reportSchemaFatalError("maxOccurLimit", new Object[] {new Integer(maxOccurNodeLimit)}, element);
+   virtual bool is_in_closed_subset(const void* p) const;
  
-                         // reset max values in case processing continues on error
---- jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	2013-09-06 11:22:59.000000000 -0700
-+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	2014-04-20 12:39:47.000000000 -0700
-@@ -70,7 +70,6 @@
- import com.sun.org.apache.xerces.internal.util.DefaultErrorHandler;
- import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper;
- import com.sun.org.apache.xerces.internal.util.SAXInputSource;
--import com.sun.org.apache.xerces.internal.util.SecurityManager;
- import com.sun.org.apache.xerces.internal.util.StAXInputSource;
- import com.sun.org.apache.xerces.internal.util.StAXLocationWrapper;
- import com.sun.org.apache.xerces.internal.util.SymbolHash;
-@@ -78,6 +77,7 @@
- import com.sun.org.apache.xerces.internal.util.XMLSymbols;
- import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException;
- import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
-+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
- import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
- import com.sun.org.apache.xerces.internal.xni.QName;
- import com.sun.org.apache.xerces.internal.xni.XNIException;
-@@ -257,7 +257,7 @@
-      *
-      * 

Protected to allow access by any traverser.

- */ -- protected SecurityManager fSecureProcessing = null; -+ protected XMLSecurityManager fSecureProcessing = null; ++ G1SATBCardTableModRefBS* g1_barrier_set() { ++ return (G1SATBCardTableModRefBS*) barrier_set(); ++ } ++ + // This resets the card table to all zeros. It is used after + // a collection pause which used the card table to claim cards. + void cleanUpCardTable(); +@@ -1592,41 +1598,6 @@ - private String fAccessExternalSchema; - private String fAccessExternalDTD; -@@ -2251,12 +2251,12 @@ - } - catch (SAXException se) {} + virtual jlong millis_since_last_gc(); -- try { -- parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, fAccessExternalDTD); -- } catch (SAXNotRecognizedException exc) { -- System.err.println("Warning: " + parser.getClass().getName() + ": " + -- exc.getMessage()); -- } -+ try { -+ parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, fAccessExternalDTD); -+ } catch (SAXNotRecognizedException exc) { -+ System.err.println("Warning: " + parser.getClass().getName() + ": " + -+ exc.getMessage()); -+ } - } - // If XML names and Namespace URIs are already internalized we - // can avoid running them through the SymbolTable. -@@ -3509,7 +3509,7 @@ +- // Perform any cleanup actions necessary before allowing a verification. +- virtual void prepare_for_verify(); +- +- // Perform verification. +- +- // vo == UsePrevMarking -> use "prev" marking information, +- // vo == UseNextMarking -> use "next" marking information +- // vo == UseMarkWord -> use the mark word in the object header +- // +- // NOTE: Only the "prev" marking information is guaranteed to be +- // consistent most of the time, so most calls to this should use +- // vo == UsePrevMarking. +- // Currently, there is only one case where this is called with +- // vo == UseNextMarking, which is to verify the "next" marking +- // information at the end of remark. +- // Currently there is only one place where this is called with +- // vo == UseMarkWord, which is to verify the marking during a +- // full GC. +- void verify(bool silent, VerifyOption vo); +- +- // Override; it uses the "prev" marking information +- virtual void verify(bool silent); +- +- virtual void print_on(outputStream* st) const; +- virtual void print_extended_on(outputStream* st) const; +- +- virtual void print_gc_threads_on(outputStream* st) const; +- virtual void gc_threads_do(ThreadClosure* tc) const; +- +- // Override +- void print_tracing_info() const; +- +- // The following two methods are helpful for debugging RSet issues. +- void print_cset_rsets() PRODUCT_RETURN; +- void print_all_rsets() PRODUCT_RETURN; + + // Convenience function to be used in situations where the heap type can be + // asserted to be this type. +@@ -1684,7 +1655,6 @@ + // then call the region version of the same function. + + // Added if it is in permanent gen it isn't dead. +- // Added if it is NULL it isn't dead. + + bool is_obj_dead(const oop obj) const { + const HeapRegion* hr = heap_region_containing(obj); +@@ -1708,13 +1678,90 @@ + else return is_obj_ill(obj, hr); + } - fSecureProcessing = null; - if( componentManager!=null ) { -- fSecureProcessing = (SecurityManager) componentManager.getProperty(SECURE_PROCESSING, null); -+ fSecureProcessing = (XMLSecurityManager) componentManager.getProperty(SECURE_PROCESSING, null); - } ++ bool allocated_since_marking(oop obj, HeapRegion* hr, VerifyOption vo); ++ HeapWord* top_at_mark_start(HeapRegion* hr, VerifyOption vo); ++ bool is_marked(oop obj, VerifyOption vo); ++ const char* top_at_mark_start_str(VerifyOption vo); ++ ++ ConcurrentMark* concurrent_mark() const { return _cm; } ++ ++ // Refinement ++ ++ ConcurrentG1Refine* concurrent_g1_refine() const { return _cg1r; } ++ ++ // The dirty cards region list is used to record a subset of regions ++ // whose cards need clearing. The list if populated during the ++ // remembered set scanning and drained during the card table ++ // cleanup. Although the methods are reentrant, population/draining ++ // phases must not overlap. For synchronization purposes the last ++ // element on the list points to itself. ++ HeapRegion* _dirty_cards_region_list; ++ void push_dirty_cards_region(HeapRegion* hr); ++ HeapRegion* pop_dirty_cards_region(); ++ ++ // Optimized nmethod scanning support routines ++ ++ // Register the given nmethod with the G1 heap ++ virtual void register_nmethod(nmethod* nm); ++ ++ // Unregister the given nmethod from the G1 heap ++ virtual void unregister_nmethod(nmethod* nm); ++ ++ // Migrate the nmethods in the code root lists of the regions ++ // in the collection set to regions in to-space. In the event ++ // of an evacuation failure, nmethods that reference objects ++ // that were not successfullly evacuated are not migrated. ++ void migrate_strong_code_roots(); ++ ++ // During an initial mark pause, mark all the code roots that ++ // point into regions *not* in the collection set. ++ void mark_strong_code_roots(uint worker_id); ++ ++ // Rebuild the stong code root lists for each region ++ // after a full GC ++ void rebuild_strong_code_roots(); ++ ++ // Delete entries for dead interned string and clean up unreferenced symbols ++ // in symbol table, possibly in parallel. ++ void unlink_string_and_symbol_table(BoolObjectClosure* is_alive, bool unlink_strings = true, bool unlink_symbols = true); ++ ++ // Verification ++ ++ // The following is just to alert the verification code ++ // that a full collection has occurred and that the ++ // remembered sets are no longer up to date. ++ bool _full_collection; ++ void set_full_collection() { _full_collection = true;} ++ void clear_full_collection() {_full_collection = false;} ++ bool full_collection() {return _full_collection;} ++ ++ // Perform any cleanup actions necessary before allowing a verification. ++ virtual void prepare_for_verify(); ++ ++ // Perform verification. ++ ++ // vo == UsePrevMarking -> use "prev" marking information, ++ // vo == UseNextMarking -> use "next" marking information ++ // vo == UseMarkWord -> use the mark word in the object header ++ // ++ // NOTE: Only the "prev" marking information is guaranteed to be ++ // consistent most of the time, so most calls to this should use ++ // vo == UsePrevMarking. ++ // Currently, there is only one case where this is called with ++ // vo == UseNextMarking, which is to verify the "next" marking ++ // information at the end of remark. ++ // Currently there is only one place where this is called with ++ // vo == UseMarkWord, which is to verify the marking during a ++ // full GC. ++ void verify(bool silent, VerifyOption vo); ++ ++ // Override; it uses the "prev" marking information ++ virtual void verify(bool silent); ++ + // The methods below are here for convenience and dispatch the + // appropriate method depending on value of the given VerifyOption +- // parameter. The options for that parameter are: +- // +- // vo == UsePrevMarking -> use "prev" marking information, +- // vo == UseNextMarking -> use "next" marking information, +- // vo == UseMarkWord -> use mark word from object header ++ // parameter. The values for that parameter, and their meanings, ++ // are the same as those above. + + bool is_obj_dead_cond(const oop obj, + const HeapRegion* hr, +@@ -1739,31 +1786,20 @@ + return false; // keep some compilers happy + } - //set entity resolver ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -36,7 +36,7 @@ - import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator; - import com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer; - import com.sun.org.apache.xerces.internal.parsers.DOMParser; --import com.sun.org.apache.xerces.internal.util.SecurityManager; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager.Property; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager.State; -@@ -46,7 +46,6 @@ - import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; - import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource; - import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; --import javax.xml.XMLConstants; - import org.w3c.dom.DOMImplementation; - import org.w3c.dom.Document; - import org.xml.sax.EntityResolver; -@@ -110,7 +109,6 @@ - /** Property identifier: access to external schema */ - public static final String ACCESS_EXTERNAL_SCHEMA = XMLConstants.ACCESS_EXTERNAL_SCHEMA; +- bool allocated_since_marking(oop obj, HeapRegion* hr, VerifyOption vo); +- HeapWord* top_at_mark_start(HeapRegion* hr, VerifyOption vo); +- bool is_marked(oop obj, VerifyOption vo); +- const char* top_at_mark_start_str(VerifyOption vo); ++ // Printing + +- // The following is just to alert the verification code +- // that a full collection has occurred and that the +- // remembered sets are no longer up to date. +- bool _full_collection; +- void set_full_collection() { _full_collection = true;} +- void clear_full_collection() {_full_collection = false;} +- bool full_collection() {return _full_collection;} ++ virtual void print_on(outputStream* st) const; ++ virtual void print_extended_on(outputStream* st) const; + +- ConcurrentMark* concurrent_mark() const { return _cm; } +- ConcurrentG1Refine* concurrent_g1_refine() const { return _cg1r; } ++ virtual void print_gc_threads_on(outputStream* st) const; ++ virtual void gc_threads_do(ThreadClosure* tc) const; + +- // The dirty cards region list is used to record a subset of regions +- // whose cards need clearing. The list if populated during the +- // remembered set scanning and drained during the card table +- // cleanup. Although the methods are reentrant, population/draining +- // phases must not overlap. For synchronization purposes the last +- // element on the list points to itself. +- HeapRegion* _dirty_cards_region_list; +- void push_dirty_cards_region(HeapRegion* hr); +- HeapRegion* pop_dirty_cards_region(); ++ // Override ++ void print_tracing_info() const; ++ ++ // The following two methods are helpful for debugging RSet issues. ++ void print_cset_rsets() PRODUCT_RETURN; ++ void print_all_rsets() PRODUCT_RETURN; -- - private final DOMParser domParser; - private final Schema grammar; + public: + void stop_conc_gc_threads(); +@@ -1800,7 +1836,7 @@ + G1CollectedHeap* _g1h; + RefToScanQueue* _refs; + DirtyCardQueue _dcq; +- CardTableModRefBS* _ct_bs; ++ G1SATBCardTableModRefBS* _ct_bs; + G1RemSet* _g1_rem; + + G1ParGCAllocBuffer _surviving_alloc_buffer; +@@ -1839,7 +1875,7 @@ + void add_to_undo_waste(size_t waste) { _undo_waste += waste; } + + DirtyCardQueue& dirty_card_queue() { return _dcq; } +- CardTableModRefBS* ctbs() { return _ct_bs; } ++ G1SATBCardTableModRefBS* ctbs() { return _ct_bs; } + + template void immediate_rs_update(HeapRegion* from, T* p, int tid) { + if (!from->is_survivor()) { +--- ./hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp 2014-06-06 19:56:20.000000000 -0700 +@@ -29,6 +29,7 @@ + #include "gc_implementation/g1/g1CollectedHeap.hpp" + #include "gc_implementation/g1/g1AllocRegion.inline.hpp" + #include "gc_implementation/g1/g1CollectorPolicy.hpp" ++#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" + #include "gc_implementation/g1/heapRegionSeq.inline.hpp" + #include "utilities/taskqueue.hpp" + +@@ -131,7 +132,7 @@ + assert(containing_hr->is_in(end - 1), "it should also contain end - 1"); + + MemRegion mr(start, end); +- ((CardTableModRefBS*)_g1h->barrier_set())->dirty(mr); ++ g1_barrier_set()->g1_mark_as_young(mr); + } -@@ -125,6 +123,7 @@ - /** Initial EntityResolver */ - private final EntityResolver fInitEntityResolver; + inline RefToScanQueue* G1CollectedHeap::task_queue(int i) const { +--- ./hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -310,7 +310,8 @@ + void G1CollectorPolicy::initialize_flags() { + set_min_alignment(HeapRegion::GrainBytes); + size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name()); +- set_max_alignment(MAX2(card_table_alignment, min_alignment())); ++ size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size(); ++ set_max_alignment(MAX3(card_table_alignment, min_alignment(), page_size)); + if (SurvivorRatio < 1) { + vm_exit_during_initialization("Invalid survivor ratio specified"); + } +--- ./hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -41,11 +41,11 @@ + private: + G1CollectedHeap* _g1; + DirtyCardQueue *_dcq; +- CardTableModRefBS* _ct_bs; ++ G1SATBCardTableModRefBS* _ct_bs; -+ private XMLSecurityManager fSecurityManager; - private XMLSecurityPropertyManager fSecurityPropertyMgr; + public: + UpdateRSetDeferred(G1CollectedHeap* g1, DirtyCardQueue* dcq) : +- _g1(g1), _ct_bs((CardTableModRefBS*)_g1->barrier_set()), _dcq(dcq) {} ++ _g1(g1), _ct_bs(_g1->g1_barrier_set()), _dcq(dcq) {} + + virtual void do_oop(narrowOop* p) { do_oop_work(p); } + virtual void do_oop( oop* p) { do_oop_work(p); } +--- ./hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -161,6 +161,8 @@ + _last_update_rs_times_ms(_max_gc_threads, "%.1lf"), + _last_update_rs_processed_buffers(_max_gc_threads, "%d"), + _last_scan_rs_times_ms(_max_gc_threads, "%.1lf"), ++ _last_strong_code_root_scan_times_ms(_max_gc_threads, "%.1lf"), ++ _last_strong_code_root_mark_times_ms(_max_gc_threads, "%.1lf"), + _last_obj_copy_times_ms(_max_gc_threads, "%.1lf"), + _last_termination_times_ms(_max_gc_threads, "%.1lf"), + _last_termination_attempts(_max_gc_threads, SIZE_FORMAT), +@@ -182,6 +184,8 @@ + _last_update_rs_times_ms.reset(); + _last_update_rs_processed_buffers.reset(); + _last_scan_rs_times_ms.reset(); ++ _last_strong_code_root_scan_times_ms.reset(); ++ _last_strong_code_root_mark_times_ms.reset(); + _last_obj_copy_times_ms.reset(); + _last_termination_times_ms.reset(); + _last_termination_attempts.reset(); +@@ -197,6 +201,8 @@ + _last_update_rs_times_ms.verify(); + _last_update_rs_processed_buffers.verify(); + _last_scan_rs_times_ms.verify(); ++ _last_strong_code_root_scan_times_ms.verify(); ++ _last_strong_code_root_mark_times_ms.verify(); + _last_obj_copy_times_ms.verify(); + _last_termination_times_ms.verify(); + _last_termination_attempts.verify(); +@@ -210,6 +216,8 @@ + _last_satb_filtering_times_ms.get(i) + + _last_update_rs_times_ms.get(i) + + _last_scan_rs_times_ms.get(i) + ++ _last_strong_code_root_scan_times_ms.get(i) + ++ _last_strong_code_root_mark_times_ms.get(i) + + _last_obj_copy_times_ms.get(i) + + _last_termination_times_ms.get(i); + +@@ -239,6 +247,9 @@ + // Now subtract the time taken to fix up roots in generated code + misc_time_ms += _cur_collection_code_root_fixup_time_ms; + ++ // Strong code root migration time ++ misc_time_ms += _cur_strong_code_root_migration_time_ms; ++ + // Subtract the time taken to clean the card table from the + // current value of "other time" + misc_time_ms += _cur_clear_ct_time_ms; +@@ -257,9 +268,13 @@ + if (_last_satb_filtering_times_ms.sum() > 0.0) { + _last_satb_filtering_times_ms.print(2, "SATB Filtering (ms)"); + } ++ if (_last_strong_code_root_mark_times_ms.sum() > 0.0) { ++ _last_strong_code_root_mark_times_ms.print(2, "Code Root Marking (ms)"); ++ } + _last_update_rs_times_ms.print(2, "Update RS (ms)"); + _last_update_rs_processed_buffers.print(3, "Processed Buffers"); + _last_scan_rs_times_ms.print(2, "Scan RS (ms)"); ++ _last_strong_code_root_scan_times_ms.print(2, "Code Root Scanning (ms)"); + _last_obj_copy_times_ms.print(2, "Object Copy (ms)"); + _last_termination_times_ms.print(2, "Termination (ms)"); + if (G1Log::finest()) { +@@ -273,12 +288,17 @@ + if (_last_satb_filtering_times_ms.sum() > 0.0) { + _last_satb_filtering_times_ms.print(1, "SATB Filtering (ms)"); + } ++ if (_last_strong_code_root_mark_times_ms.sum() > 0.0) { ++ _last_strong_code_root_mark_times_ms.print(1, "Code Root Marking (ms)"); ++ } + _last_update_rs_times_ms.print(1, "Update RS (ms)"); + _last_update_rs_processed_buffers.print(2, "Processed Buffers"); + _last_scan_rs_times_ms.print(1, "Scan RS (ms)"); ++ _last_strong_code_root_scan_times_ms.print(1, "Code Root Scanning (ms)"); + _last_obj_copy_times_ms.print(1, "Object Copy (ms)"); + } + print_stats(1, "Code Root Fixup", _cur_collection_code_root_fixup_time_ms); ++ print_stats(1, "Code Root Migration", _cur_strong_code_root_migration_time_ms); + print_stats(1, "Clear CT", _cur_clear_ct_time_ms); + double misc_time_ms = pause_time_sec * MILLIUNITS - accounted_time_ms(); + print_stats(1, "Other", misc_time_ms); +--- ./hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -119,6 +119,8 @@ + WorkerDataArray _last_update_rs_times_ms; + WorkerDataArray _last_update_rs_processed_buffers; + WorkerDataArray _last_scan_rs_times_ms; ++ WorkerDataArray _last_strong_code_root_scan_times_ms; ++ WorkerDataArray _last_strong_code_root_mark_times_ms; + WorkerDataArray _last_obj_copy_times_ms; + WorkerDataArray _last_termination_times_ms; + WorkerDataArray _last_termination_attempts; +@@ -128,6 +130,7 @@ + + double _cur_collection_par_time_ms; + double _cur_collection_code_root_fixup_time_ms; ++ double _cur_strong_code_root_migration_time_ms; + + double _cur_clear_ct_time_ms; + double _cur_ref_proc_time_ms; +@@ -179,6 +182,14 @@ + _last_scan_rs_times_ms.set(worker_i, ms); + } - DocumentBuilderImpl(DocumentBuilderFactoryImpl dbf, Hashtable dbfAttrs, Hashtable features) -@@ -173,10 +172,10 @@ - fSecurityPropertyMgr = new XMLSecurityPropertyManager(); - domParser.setProperty(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); ++ void record_strong_code_root_scan_time(uint worker_i, double ms) { ++ _last_strong_code_root_scan_times_ms.set(worker_i, ms); ++ } ++ ++ void record_strong_code_root_mark_time(uint worker_i, double ms) { ++ _last_strong_code_root_mark_times_ms.set(worker_i, ms); ++ } ++ + void record_obj_copy_time(uint worker_i, double ms) { + _last_obj_copy_times_ms.set(worker_i, ms); + } +@@ -208,6 +219,10 @@ + _cur_collection_code_root_fixup_time_ms = ms; + } -- // If the secure processing feature is on set a security manager. -- if (secureProcessing) { -- domParser.setProperty(SECURITY_MANAGER, new SecurityManager()); -+ fSecurityManager = new XMLSecurityManager(secureProcessing); -+ domParser.setProperty(SECURITY_MANAGER, fSecurityManager); ++ void record_strong_code_root_migration_time(double ms) { ++ _cur_strong_code_root_migration_time_ms = ms; ++ } ++ + void record_ref_proc_time(double ms) { + _cur_ref_proc_time_ms = ms; + } +@@ -294,6 +309,14 @@ + return _last_scan_rs_times_ms.average(); + } -+ if (secureProcessing) { - /** - * If secure processing is explicitly set on the factory, the - * access properties will be set unless the corresponding -@@ -250,9 +249,9 @@ - String feature = (String) entry.getKey(); - boolean value = ((Boolean) entry.getValue()).booleanValue(); - domParser.setFeature(feature, value); -- } - } - } ++ double average_last_strong_code_root_scan_time(){ ++ return _last_strong_code_root_scan_times_ms.average(); ++ } ++ ++ double average_last_strong_code_root_mark_time(){ ++ return _last_strong_code_root_mark_times_ms.average(); ++ } ++ + double average_last_obj_copy_time() { + return _last_obj_copy_times_ms.average(); + } +--- ./hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -177,10 +177,8 @@ + GenMarkSweep::follow_mdo_weak_refs(); + assert(GenMarkSweep::_marking_stack.is_empty(), "just drained"); + +- // Visit interned string tables and delete unmarked oops +- StringTable::unlink(&GenMarkSweep::is_alive); +- // Clean up unreferenced symbols in symbol table. +- SymbolTable::unlink(); ++ // Delete entries for dead interned string and clean up unreferenced symbols in symbol table. ++ G1CollectedHeap::heap()->unlink_string_and_symbol_table(&GenMarkSweep::is_alive); + + assert(GenMarkSweep::_marking_stack.is_empty(), + "stack should be empty by now"); +@@ -188,7 +186,6 @@ + if (VerifyDuringGC) { + HandleMark hm; // handle scope + COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact); +- gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying "); + Universe::heap()->prepare_for_verify(); + // Note: we can verify only the heap here. When an object is + // marked, the previous value of the mark word (including +@@ -200,11 +197,13 @@ + // fail. At the end of the GC, the orginal mark word values + // (including hash values) are restored to the appropriate + // objects. +- Universe::heap()->verify(/* silent */ false, +- /* option */ VerifyOption_G1UseMarkWord); +- +- G1CollectedHeap* g1h = G1CollectedHeap::heap(); +- gclog_or_tty->print_cr("]"); ++ if (!VerifySilently) { ++ gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying "); + } ++ Universe::heap()->verify(VerifySilently, VerifyOption_G1UseMarkWord); ++ if (!VerifySilently) { ++ gclog_or_tty->print_cr("]"); ++ } + } - /** - * Set any DocumentBuilderFactory attributes of our underlying DOMParser -@@ -289,30 +288,33 @@ - // spec when schema validation is enabled - domParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); - } -- } -- } else if(JAXP_SCHEMA_SOURCE.equals(name)){ -- if( isValidating() ) { -- String value=(String)dbfAttrs.get(JAXP_SCHEMA_LANGUAGE); -- if(value !=null && W3C_XML_SCHEMA.equals(value)){ -- domParser.setProperty(name, val); -- }else{ -+ } -+ } else if(JAXP_SCHEMA_SOURCE.equals(name)){ -+ if( isValidating() ) { -+ String value=(String)dbfAttrs.get(JAXP_SCHEMA_LANGUAGE); -+ if(value !=null && W3C_XML_SCHEMA.equals(value)){ -+ domParser.setProperty(name, val); -+ }else{ - throw new IllegalArgumentException( - DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, - "jaxp-order-not-supported", - new Object[] {JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE})); -+ } -+ } -+ } else { -+ //check if the property is managed by security manager -+ if (fSecurityManager == null || -+ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, val)) { -+ //check if the property is managed by security property manager -+ if (fSecurityPropertyMgr == null || -+ !fSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, val)) { -+ //fall back to the existing property manager -+ domParser.setProperty(name, val); - } -- } -- } else { -- int index = fSecurityPropertyMgr.getIndex(name); -- if (index > -1) { -- fSecurityPropertyMgr.setValue(index, -- XMLSecurityPropertyManager.State.APIPROPERTY, (String)val); -- } else { -- // Let Xerces code handle the property -- domParser.setProperty(name, val); - } -- } -- } + gc_tracer()->report_object_count_after_gc(&GenMarkSweep::is_alive); +@@ -235,7 +234,7 @@ + public: + G1PrepareCompactClosure(CompactibleSpace* cs) + : _g1h(G1CollectedHeap::heap()), +- _mrbs(G1CollectedHeap::heap()->mr_bs()), ++ _mrbs(_g1h->g1_barrier_set()), + _cp(NULL, cs, cs->initialize_threshold()), + _humongous_proxy_set("G1MarkSweep Humongous Proxy Set") { } + +--- ./hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -34,6 +34,7 @@ + #include "gc_implementation/g1/g1OopClosures.inline.hpp" + #include "gc_implementation/g1/g1RemSet.inline.hpp" + #include "gc_implementation/g1/heapRegionSeq.inline.hpp" ++#include "gc_implementation/g1/heapRegionRemSet.hpp" + #include "memory/iterator.hpp" + #include "oops/oop.inline.hpp" + #include "utilities/intHisto.hpp" +@@ -73,7 +74,8 @@ + _ct_bs(ct_bs), _g1p(_g1->g1_policy()), + _cg1r(g1->concurrent_g1_refine()), + _cset_rs_update_cl(NULL), +- _cards_scanned(NULL), _total_cards_scanned(0) ++ _cards_scanned(NULL), _total_cards_scanned(0), ++ _prev_period_summary() + { + _seq_task = new SubTasksDone(NumSeqTasks); + guarantee(n_workers() > 0, "There should be some workers"); +@@ -81,6 +83,9 @@ + for (uint i = 0; i < n_workers(); i++) { + _cset_rs_update_cl[i] = NULL; + } ++ if (G1SummarizeRSetStats) { ++ _prev_period_summary.initialize(this); ++ } + } + + G1RemSet::~G1RemSet() { +@@ -101,15 +106,25 @@ + class ScanRSClosure : public HeapRegionClosure { + size_t _cards_done, _cards; + G1CollectedHeap* _g1h; + -+ } -+ } - } + OopsInHeapRegionClosure* _oc; ++ CodeBlobToOopClosure* _code_root_cl; ++ + G1BlockOffsetSharedArray* _bot_shared; +- CardTableModRefBS *_ct_bs; +- int _worker_i; +- int _block_size; +- bool _try_claimed; ++ G1SATBCardTableModRefBS *_ct_bs; ++ ++ double _strong_code_root_scan_time_sec; ++ int _worker_i; ++ int _block_size; ++ bool _try_claimed; ++ + public: +- ScanRSClosure(OopsInHeapRegionClosure* oc, int worker_i) : ++ ScanRSClosure(OopsInHeapRegionClosure* oc, ++ CodeBlobToOopClosure* code_root_cl, ++ int worker_i) : + _oc(oc), ++ _code_root_cl(code_root_cl), ++ _strong_code_root_scan_time_sec(0.0), + _cards(0), + _cards_done(0), + _worker_i(worker_i), +@@ -117,7 +132,7 @@ + { + _g1h = G1CollectedHeap::heap(); + _bot_shared = _g1h->bot_shared(); +- _ct_bs = (CardTableModRefBS*) (_g1h->barrier_set()); ++ _ct_bs = _g1h->g1_barrier_set(); + _block_size = MAX2(G1RSetScanBlockSize, 1); + } + +@@ -157,6 +172,12 @@ + card_start, card_start + G1BlockOffsetSharedArray::N_words); + } + ++ void scan_strong_code_roots(HeapRegion* r) { ++ double scan_start = os::elapsedTime(); ++ r->strong_code_roots_do(_code_root_cl); ++ _strong_code_root_scan_time_sec += (os::elapsedTime() - scan_start); ++ } ++ + bool doHeapRegion(HeapRegion* r) { + assert(r->in_collection_set(), "should only be called on elements of CS."); + HeapRegionRemSet* hrrs = r->rem_set(); +@@ -170,6 +191,7 @@ + // _try_claimed || r->claim_iter() + // is true: either we're supposed to work on claimed-but-not-complete + // regions, or we successfully claimed the region. ++ + HeapRegionRemSetIterator* iter = _g1h->rem_set_iterator(_worker_i); + hrrs->init_iterator(iter); + size_t card_index; +@@ -203,30 +225,43 @@ + } + } + if (!_try_claimed) { ++ // Scan the strong code root list attached to the current region ++ scan_strong_code_roots(r); ++ + hrrs->set_iter_complete(); } + return false; + } ++ ++ double strong_code_root_scan_time_sec() { ++ return _strong_code_root_scan_time_sec; ++ } ++ + size_t cards_done() { return _cards_done;} + size_t cards_looked_up() { return _cards;} + }; ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -34,8 +34,8 @@ - import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator; - import com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer; - import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.Status; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler; - import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent; -@@ -112,6 +112,7 @@ - /** Initial EntityResolver */ - private final EntityResolver fInitEntityResolver; +-void G1RemSet::scanRS(OopsInHeapRegionClosure* oc, int worker_i) { ++void G1RemSet::scanRS(OopsInHeapRegionClosure* oc, ++ CodeBlobToOopClosure* code_root_cl, ++ int worker_i) { + double rs_time_start = os::elapsedTime(); + HeapRegion *startRegion = _g1->start_cset_region_for_worker(worker_i); -+ private final XMLSecurityManager fSecurityManager; - private final XMLSecurityPropertyManager fSecurityPropertyMgr; +- ScanRSClosure scanRScl(oc, worker_i); ++ ScanRSClosure scanRScl(oc, code_root_cl, worker_i); - /** -@@ -130,10 +131,10 @@ - SAXParserImpl(SAXParserFactoryImpl spf, Hashtable features, boolean secureProcessing) - throws SAXException - { -+ fSecurityManager = new XMLSecurityManager(secureProcessing); - fSecurityPropertyMgr = new XMLSecurityPropertyManager(); -- - // Instantiate a SAXParser directly and not through SAX so that we use the right ClassLoader -- xmlReader = new JAXPSAXParser(this, fSecurityPropertyMgr); -+ xmlReader = new JAXPSAXParser(this, fSecurityPropertyMgr, fSecurityManager); + _g1->collection_set_iterate_from(startRegion, &scanRScl); + scanRScl.set_try_claimed(); + _g1->collection_set_iterate_from(startRegion, &scanRScl); - // JAXP "namespaceAware" == SAX Namespaces feature - // Note: there is a compatibility problem here with default values: -@@ -154,9 +155,9 @@ +- double scan_rs_time_sec = os::elapsedTime() - rs_time_start; ++ double scan_rs_time_sec = (os::elapsedTime() - rs_time_start) ++ - scanRScl.strong_code_root_scan_time_sec(); - xmlReader.setProperty0(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); +- assert( _cards_scanned != NULL, "invariant" ); ++ assert(_cards_scanned != NULL, "invariant"); + _cards_scanned[worker_i] = scanRScl.cards_done(); -- // If the secure processing feature is on set a security manager. -+ xmlReader.setProperty0(SECURITY_MANAGER, fSecurityManager); -+ - if (secureProcessing) { -- xmlReader.setProperty0(SECURITY_MANAGER, new SecurityManager()); - /** - * By default, secure processing is set, no external access is allowed. - * However, we need to check if it is actively set on the factory since we -@@ -164,6 +165,7 @@ - * the default value - */ - if (features != null) { -+ - Object temp = features.get(XMLConstants.FEATURE_SECURE_PROCESSING); - if (temp != null) { - boolean value = ((Boolean) temp).booleanValue(); -@@ -172,7 +174,6 @@ - XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); - fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA, - XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); -- - } - } - } -@@ -398,22 +399,34 @@ - private final HashMap fInitFeatures = new HashMap(); - private final HashMap fInitProperties = new HashMap(); - private final SAXParserImpl fSAXParser; -+ private XMLSecurityManager fSecurityManager; - private XMLSecurityPropertyManager fSecurityPropertyMgr; + _g1p->phase_times()->record_scan_rs_time(worker_i, scan_rs_time_sec * 1000.0); ++ _g1p->phase_times()->record_strong_code_root_scan_time(worker_i, ++ scanRScl.strong_code_root_scan_time_sec() * 1000.0); + } + // Closure used for updating RSets and recording references that +@@ -286,7 +321,8 @@ + } - public JAXPSAXParser() { -- this(null, null); -+ this(null, null, null); - } + void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc, +- int worker_i) { ++ CodeBlobToOopClosure* code_root_cl, ++ int worker_i) { + #if CARD_REPEAT_HISTO + ct_freq_update_histo_and_reset(); + #endif +@@ -326,7 +362,7 @@ + _g1p->phase_times()->record_update_rs_time(worker_i, 0.0); + } + if (G1UseParallelRSetScanning || (worker_i == 0)) { +- scanRS(oc, worker_i); ++ scanRS(oc, code_root_cl, worker_i); + } else { + _g1p->phase_times()->record_scan_rs_time(worker_i, 0.0); + } +@@ -472,12 +508,7 @@ + ScrubRSClosure(BitMap* region_bm, BitMap* card_bm) : + _g1h(G1CollectedHeap::heap()), + _region_bm(region_bm), _card_bm(card_bm), +- _ctbs(NULL) +- { +- ModRefBarrierSet* bs = _g1h->mr_bs(); +- guarantee(bs->is_a(BarrierSet::CardTableModRef), "Precondition"); +- _ctbs = (CardTableModRefBS*)bs; +- } ++ _ctbs(_g1h->g1_barrier_set()) {} -- JAXPSAXParser(SAXParserImpl saxParser, XMLSecurityPropertyManager spm) { -+ JAXPSAXParser(SAXParserImpl saxParser, XMLSecurityPropertyManager securityPropertyMgr, -+ XMLSecurityManager securityManager) { - super(); - fSAXParser = saxParser; -- fSecurityPropertyMgr = spm; -- -+ fSecurityManager = securityManager; -+ fSecurityPropertyMgr = securityPropertyMgr; - /** - * This class may be used directly. So initialize the security manager if - * it is null. - */ -+ if (fSecurityManager == null) { -+ fSecurityManager = new XMLSecurityManager(true); -+ try { -+ super.setProperty(SECURITY_MANAGER, fSecurityManager); -+ } catch (SAXException e) { -+ throw new UnsupportedOperationException( -+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(), -+ "property-not-recognized", new Object [] {SECURITY_MANAGER}), e); -+ } -+ } - if (fSecurityPropertyMgr == null) { - fSecurityPropertyMgr = new XMLSecurityPropertyManager(); - try { -@@ -421,7 +434,7 @@ - } catch (SAXException e) { - throw new UnsupportedOperationException( - SAXMessageFormatter.formatMessage(fConfiguration.getLocale(), -- "property-not-recognized", new Object [] {SECURITY_MANAGER}), e); -+ "property-not-recognized", new Object [] {XML_SECURITY_PROPERTY_MANAGER}), e); - } - } - } -@@ -439,7 +452,8 @@ - } - if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { - try { -- setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); -+ fSecurityManager.setSecureProcessing(value); -+ setProperty(SECURITY_MANAGER, fSecurityManager); - } - catch (SAXNotRecognizedException exc) { - // If the property is not supported -@@ -475,13 +489,7 @@ - throw new NullPointerException(); - } - if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { -- try { -- return (super.getProperty(SECURITY_MANAGER) != null); -- } -- // If the property is not supported the value must be false. -- catch (SAXException exc) { -- return false; -- } -+ return fSecurityManager.isSecureProcessing(); - } - return super.getFeature(name); - } -@@ -560,17 +568,21 @@ - if (fSAXParser != null && fSAXParser.fSchemaValidator != null) { - setSchemaValidatorProperty(name, value); - } -- /** Check to see if the property is managed by the property manager **/ -- int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(name) : -1; -- if (index > -1) { -- fSecurityPropertyMgr.setValue(index, -- XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); -- } else { -- if (!fInitProperties.containsKey(name)) { -- fInitProperties.put(name, super.getProperty(name)); + bool doHeapRegion(HeapRegion* r) { + if (!r->continuesHumongous()) { +@@ -700,47 +731,29 @@ + return has_refs_into_cset; + } + +-class HRRSStatsIter: public HeapRegionClosure { +- size_t _occupied; +- size_t _total_mem_sz; +- size_t _max_mem_sz; +- HeapRegion* _max_mem_sz_region; +-public: +- HRRSStatsIter() : +- _occupied(0), +- _total_mem_sz(0), +- _max_mem_sz(0), +- _max_mem_sz_region(NULL) +- {} ++void G1RemSet::print_periodic_summary_info(const char* header) { ++ G1RemSetSummary current; ++ current.initialize(this); + +- bool doHeapRegion(HeapRegion* r) { +- if (r->continuesHumongous()) return false; +- size_t mem_sz = r->rem_set()->mem_size(); +- if (mem_sz > _max_mem_sz) { +- _max_mem_sz = mem_sz; +- _max_mem_sz_region = r; +- } +- _total_mem_sz += mem_sz; +- size_t occ = r->rem_set()->occupied(); +- _occupied += occ; +- return false; +- } +- size_t total_mem_sz() { return _total_mem_sz; } +- size_t max_mem_sz() { return _max_mem_sz; } +- size_t occupied() { return _occupied; } +- HeapRegion* max_mem_sz_region() { return _max_mem_sz_region; } +-}; ++ _prev_period_summary.subtract_from(¤t); ++ print_summary_info(&_prev_period_summary, header); + +-class PrintRSThreadVTimeClosure : public ThreadClosure { +-public: +- virtual void do_thread(Thread *t) { +- ConcurrentG1RefineThread* crt = (ConcurrentG1RefineThread*) t; +- gclog_or_tty->print(" %5.2f", crt->vtime_accum()); +- } +-}; ++ _prev_period_summary.set(¤t); ++} + + void G1RemSet::print_summary_info() { +- G1CollectedHeap* g1 = G1CollectedHeap::heap(); ++ G1RemSetSummary current; ++ current.initialize(this); + -+ //check if the property is managed by security manager -+ if (fSecurityManager == null || -+ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { -+ //check if the property is managed by security property manager -+ if (fSecurityPropertyMgr == null || -+ !fSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { -+ //fall back to the existing property manager -+ if (!fInitProperties.containsKey(name)) { -+ fInitProperties.put(name, super.getProperty(name)); -+ } -+ super.setProperty(name, value); - } -- super.setProperty(name, value); - } ++ print_summary_info(¤t, " Cumulative RS summary"); ++} + - } - - public synchronized Object getProperty(String name) -@@ -583,9 +595,18 @@ - // JAXP 1.2 support - return fSAXParser.schemaLanguage; - } -- int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(name) : -1; -- if (index > -1) { -- return fSecurityPropertyMgr.getValueByIndex(index); ++void G1RemSet::print_summary_info(G1RemSetSummary * summary, const char * header) { ++ assert(summary != NULL, "just checking"); + -+ /** Check to see if the property is managed by the security manager **/ -+ String propertyValue = (fSecurityManager != null) ? -+ fSecurityManager.getLimitAsString(name) : null; -+ if (propertyValue != null) { -+ return propertyValue; -+ } else { -+ propertyValue = (fSecurityPropertyMgr != null) ? -+ fSecurityPropertyMgr.getValue(name) : null; -+ if (propertyValue != null) { -+ return propertyValue; -+ } - } ++ if (header != NULL) { ++ gclog_or_tty->print_cr("%s", header); ++ } - return super.getProperty(name); ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java 2014-04-20 12:39:46.000000000 -0700 -@@ -26,6 +26,7 @@ - package com.sun.org.apache.xerces.internal.jaxp.validation; + #if CARD_REPEAT_HISTO + gclog_or_tty->print_cr("\nG1 card_repeat count histogram: "); +@@ -748,52 +761,13 @@ + card_repeat_count.print_on(gclog_or_tty); + #endif - import com.sun.org.apache.xerces.internal.impl.Constants; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import java.io.IOException; +- gclog_or_tty->print_cr("\n Concurrent RS processed %d cards", +- _conc_refine_cards); +- DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); +- jint tot_processed_buffers = +- dcqs.processed_buffers_mut() + dcqs.processed_buffers_rs_thread(); +- gclog_or_tty->print_cr(" Of %d completed buffers:", tot_processed_buffers); +- gclog_or_tty->print_cr(" %8d (%5.1f%%) by conc RS threads.", +- dcqs.processed_buffers_rs_thread(), +- 100.0*(float)dcqs.processed_buffers_rs_thread()/ +- (float)tot_processed_buffers); +- gclog_or_tty->print_cr(" %8d (%5.1f%%) by mutator threads.", +- dcqs.processed_buffers_mut(), +- 100.0*(float)dcqs.processed_buffers_mut()/ +- (float)tot_processed_buffers); +- gclog_or_tty->print_cr(" Conc RS threads times(s)"); +- PrintRSThreadVTimeClosure p; +- gclog_or_tty->print(" "); +- g1->concurrent_g1_refine()->threads_do(&p); +- gclog_or_tty->print_cr(""); +- +- HRRSStatsIter blk; +- g1->heap_region_iterate(&blk); +- gclog_or_tty->print_cr(" Total heap region rem set sizes = "SIZE_FORMAT"K." +- " Max = "SIZE_FORMAT"K.", +- blk.total_mem_sz()/K, blk.max_mem_sz()/K); +- gclog_or_tty->print_cr(" Static structures = "SIZE_FORMAT"K," +- " free_lists = "SIZE_FORMAT"K.", +- HeapRegionRemSet::static_mem_size() / K, +- HeapRegionRemSet::fl_mem_size() / K); +- gclog_or_tty->print_cr(" "SIZE_FORMAT" occupied cards represented.", +- blk.occupied()); +- HeapRegion* max_mem_sz_region = blk.max_mem_sz_region(); +- HeapRegionRemSet* rem_set = max_mem_sz_region->rem_set(); +- gclog_or_tty->print_cr(" Max size region = "HR_FORMAT", " +- "size = "SIZE_FORMAT "K, occupied = "SIZE_FORMAT"K.", +- HR_FORMAT_PARAMS(max_mem_sz_region), +- (rem_set->mem_size() + K - 1)/K, +- (rem_set->occupied() + K - 1)/K); +- gclog_or_tty->print_cr(" Did %d coarsenings.", +- HeapRegionRemSet::n_coarsenings()); ++ summary->print_on(gclog_or_tty); + } - import javax.xml.transform.Result; -@@ -73,6 +74,19 @@ - SAXTransformerFactory tf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ? - (SAXTransformerFactory)SAXTransformerFactory.newInstance() - : (SAXTransformerFactory) TransformerFactory.newInstance(DEFAULT_TRANSFORMER_IMPL, StAXValidatorHelper.class.getClassLoader()); -+ XMLSecurityManager securityManager = (XMLSecurityManager)fComponentManager.getProperty(Constants.SECURITY_MANAGER); -+ if (securityManager != null) { -+ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { -+ if (securityManager.isSet(limit.ordinal())){ -+ tf.setAttribute(limit.apiProperty(), -+ securityManager.getLimitValueAsString(limit)); -+ } -+ } -+ if (securityManager.printEntityCountInfo()) { -+ tf.setAttribute(Constants.JDK_ENTITY_COUNT_INFO, "yes"); -+ } -+ } + void G1RemSet::prepare_for_verify() { + if (G1HRRSFlushLogBuffersOnVerify && + (VerifyBeforeGC || VerifyAfterGC) +- && !_g1->full_collection()) { ++ && (!_g1->full_collection() || G1VerifyRSetsDuringFullGC)) { + cleanupHRRS(); + _g1->set_refine_cte_cl_concurrency(false); + if (SafepointSynchronize::is_at_safepoint()) { +--- ./hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1RemSet.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -25,6 +25,8 @@ + #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP + #define SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSET_HPP + ++#include "gc_implementation/g1/g1RemSetSummary.hpp" + - identityTransformer1 = tf.newTransformer(); - identityTransformer2 = tf.newTransformerHandler(); - } catch (TransformerConfigurationException e) { ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java 2014-04-20 12:39:46.000000000 -0700 -@@ -20,28 +20,27 @@ + // A G1RemSet provides ways of iterating over pointers into a selected + // collection set. - package com.sun.org.apache.xerces.internal.jaxp.validation; +@@ -37,9 +39,11 @@ + // so that they can be used to update the individual region remsets. --import java.lang.ref.SoftReference; --import java.io.IOException; -- --import javax.xml.transform.Result; --import javax.xml.transform.Source; --import javax.xml.transform.sax.SAXTransformerFactory; --import javax.xml.transform.sax.TransformerHandler; --import javax.xml.transform.stream.StreamSource; --import javax.xml.transform.stream.StreamResult; --import javax.xml.transform.TransformerConfigurationException; --import javax.xml.transform.TransformerFactory; --import javax.xml.transform.TransformerFactoryConfigurationError; --import javax.xml.XMLConstants; -- - import com.sun.org.apache.xerces.internal.impl.Constants; - import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; - import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; - import com.sun.org.apache.xerces.internal.parsers.XML11Configuration; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.xni.XNIException; - import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; - import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException; - import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; -+import java.io.IOException; -+import java.lang.ref.SoftReference; -+import javax.xml.XMLConstants; -+import javax.xml.transform.Result; -+import javax.xml.transform.Source; -+import javax.xml.transform.TransformerConfigurationException; -+import javax.xml.transform.TransformerFactory; -+import javax.xml.transform.TransformerFactoryConfigurationError; -+import javax.xml.transform.sax.SAXTransformerFactory; -+import javax.xml.transform.sax.TransformerHandler; -+import javax.xml.transform.stream.StreamResult; -+import javax.xml.transform.stream.StreamSource; - import org.xml.sax.SAXException; + class G1RemSet: public CHeapObj { ++private: ++ G1RemSetSummary _prev_period_summary; + protected: + G1CollectedHeap* _g1; +- unsigned _conc_refine_cards; ++ size_t _conc_refine_cards; + uint n_workers(); - /** -@@ -86,6 +85,11 @@ - Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY; + protected: +@@ -66,6 +70,8 @@ + // references into the collection set. + OopsInHeapRegionClosure** _cset_rs_update_cl; - private static final String DEFAULT_TRANSFORMER_IMPL = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"; ++ // Print the given summary info ++ virtual void print_summary_info(G1RemSetSummary * summary, const char * header = NULL); + public: + // This is called to reset dual hash tables after the gc pause + // is finished and the initial hash table is no longer being +@@ -75,14 +81,23 @@ + G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs); + ~G1RemSet(); + +- // Invoke "blk->do_oop" on all pointers into the CS in objects in regions +- // outside the CS (having invoked "blk->set_region" to set the "from" +- // region correctly beforehand.) The "worker_i" param is for the +- // parallel case where the number of the worker thread calling this +- // function can be helpful in partitioning the work to be done. It +- // should be the same as the "i" passed to the calling thread's +- // work(i) function. In the sequential case this param will be ingored. +- void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, int worker_i); ++ // Invoke "blk->do_oop" on all pointers into the collection set ++ // from objects in regions outside the collection set (having ++ // invoked "blk->set_region" to set the "from" region correctly ++ // beforehand.) ++ // ++ // Invoke code_root_cl->do_code_blob on the unmarked nmethods ++ // on the strong code roots list for each region in the ++ // collection set. ++ // ++ // The "worker_i" param is for the parallel case where the id ++ // of the worker thread calling this function can be helpful in ++ // partitioning the work to be done. It should be the same as ++ // the "i" passed to the calling thread's work(i) function. ++ // In the sequential case this param will be ignored. ++ void oops_into_collection_set_do(OopsInHeapRegionClosure* blk, ++ CodeBlobToOopClosure* code_root_cl, ++ int worker_i); + + // Prepare for and cleanup after an oops_into_collection_set_do + // call. Must call each of these once before and after (in sequential +@@ -92,7 +107,10 @@ + void prepare_for_oops_into_collection_set_do(); + void cleanup_after_oops_into_collection_set_do(); + +- void scanRS(OopsInHeapRegionClosure* oc, int worker_i); ++ void scanRS(OopsInHeapRegionClosure* oc, ++ CodeBlobToOopClosure* code_root_cl, ++ int worker_i); ++ + void updateRS(DirtyCardQueue* into_cset_dcq, int worker_i); + + CardTableModRefBS* ct_bs() { return _ct_bs; } +@@ -123,11 +141,18 @@ + int worker_i, + bool check_for_refs_into_cset); + +- // Print any relevant summary info. ++ // Print accumulated summary info from the start of the VM. + virtual void print_summary_info(); + ++ // Print accumulated summary info from the last time called. ++ virtual void print_periodic_summary_info(const char* header); ++ + // Prepare remembered set for verification. + virtual void prepare_for_verify(); ++ ++ size_t conc_refine_cards() const { ++ return _conc_refine_cards; ++ } + }; + + class CountNonCleanMemRegionClosure: public MemRegionClosure { +--- ./hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,354 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ * ++ */ + -+ /** Property id: security manager. */ -+ private static final String SECURITY_MANAGER = -+ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++#include "precompiled.hpp" ++#include "gc_implementation/g1/concurrentG1Refine.hpp" ++#include "gc_implementation/g1/concurrentG1RefineThread.hpp" ++#include "gc_implementation/g1/heapRegion.hpp" ++#include "gc_implementation/g1/g1CollectedHeap.inline.hpp" ++#include "gc_implementation/g1/g1RemSet.inline.hpp" ++#include "gc_implementation/g1/g1RemSetSummary.hpp" ++#include "gc_implementation/g1/heapRegionRemSet.hpp" ++#include "runtime/thread.hpp" ++ ++class GetRSThreadVTimeClosure : public ThreadClosure { ++private: ++ G1RemSetSummary* _summary; ++ uint _counter; + - // - // Data - // -@@ -165,6 +169,9 @@ - - private XMLParserConfiguration initialize() { - XML11Configuration config = new XML11Configuration(); -+ if (fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { -+ config.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); -+ } - config.setProperty(ENTITY_RESOLVER, fComponentManager.getProperty(ENTITY_RESOLVER)); - config.setProperty(ERROR_HANDLER, fComponentManager.getProperty(ERROR_HANDLER)); - XMLErrorReporter errorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER); -@@ -182,6 +189,8 @@ - config.setDTDContentModelHandler(null); - config.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, - fComponentManager.getProperty(Constants.XML_SECURITY_PROPERTY_MANAGER)); -+ config.setProperty(Constants.SECURITY_MANAGER, -+ fComponentManager.getProperty(Constants.SECURITY_MANAGER)); - fConfiguration = new SoftReference(config); - return config; - } ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java 2014-04-20 12:39:46.000000000 -0700 -@@ -49,10 +49,10 @@ - import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; - import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.SymbolTable; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.URI; - import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; - import com.sun.org.apache.xerces.internal.util.XMLSymbols; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.Augmentations; - import com.sun.org.apache.xerces.internal.xni.NamespaceContext; -@@ -679,10 +679,12 @@ - SAXParserFactory.newInstance() : new SAXParserFactoryImpl(); - spf.setNamespaceAware(true); - try { -+ spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, -+ fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)); - reader = spf.newSAXParser().getXMLReader(); - // If this is a Xerces SAX parser, set the security manager if there is one - if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) { -- SecurityManager securityManager = (SecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); -+ XMLSecurityManager securityManager = (XMLSecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); - if (securityManager != null) { - try { - reader.setProperty(SECURITY_MANAGER, securityManager); ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2014-04-20 12:39:46.000000000 -0700 -@@ -41,10 +41,10 @@ - import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; - import com.sun.org.apache.xerces.internal.util.SAXInputSource; - import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.StAXInputSource; - import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XNIException; - import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; -@@ -79,7 +79,7 @@ - private static final String XMLGRAMMAR_POOL = - Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY; ++public: ++ GetRSThreadVTimeClosure(G1RemSetSummary * summary) : ThreadClosure(), _summary(summary), _counter(0) { ++ assert(_summary != NULL, "just checking"); ++ } ++ ++ virtual void do_thread(Thread* t) { ++ ConcurrentG1RefineThread* crt = (ConcurrentG1RefineThread*) t; ++ _summary->set_rs_thread_vtime(_counter, crt->vtime_accum()); ++ _counter++; ++ } ++}; ++ ++void G1RemSetSummary::update() { ++ _num_refined_cards = remset()->conc_refine_cards(); ++ DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); ++ _num_processed_buf_mutator = dcqs.processed_buffers_mut(); ++ _num_processed_buf_rs_threads = dcqs.processed_buffers_rs_thread(); ++ ++ _num_coarsenings = HeapRegionRemSet::n_coarsenings(); ++ ++ ConcurrentG1Refine * cg1r = G1CollectedHeap::heap()->concurrent_g1_refine(); ++ if (_rs_threads_vtimes != NULL) { ++ GetRSThreadVTimeClosure p(this); ++ cg1r->worker_threads_do(&p); ++ } ++ set_sampling_thread_vtime(cg1r->sampling_thread()->vtime_accum()); ++} ++ ++void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) { ++ assert(_rs_threads_vtimes != NULL, "just checking"); ++ assert(thread < _num_vtimes, "just checking"); ++ _rs_threads_vtimes[thread] = value; ++} ++ ++double G1RemSetSummary::rs_thread_vtime(uint thread) const { ++ assert(_rs_threads_vtimes != NULL, "just checking"); ++ assert(thread < _num_vtimes, "just checking"); ++ return _rs_threads_vtimes[thread]; ++} ++ ++void G1RemSetSummary::initialize(G1RemSet* remset) { ++ assert(_rs_threads_vtimes == NULL, "just checking"); ++ assert(remset != NULL, "just checking"); ++ ++ _remset = remset; ++ _num_vtimes = ConcurrentG1Refine::thread_num(); ++ _rs_threads_vtimes = NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC); ++ memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes); ++ ++ update(); ++} ++ ++void G1RemSetSummary::set(G1RemSetSummary* other) { ++ assert(other != NULL, "just checking"); ++ assert(remset() == other->remset(), "just checking"); ++ assert(_num_vtimes == other->_num_vtimes, "just checking"); ++ ++ _num_refined_cards = other->num_concurrent_refined_cards(); ++ ++ _num_processed_buf_mutator = other->num_processed_buf_mutator(); ++ _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads(); ++ ++ _num_coarsenings = other->_num_coarsenings; ++ ++ memcpy(_rs_threads_vtimes, other->_rs_threads_vtimes, sizeof(double) * _num_vtimes); ++ ++ set_sampling_thread_vtime(other->sampling_thread_vtime()); ++} ++ ++void G1RemSetSummary::subtract_from(G1RemSetSummary* other) { ++ assert(other != NULL, "just checking"); ++ assert(remset() == other->remset(), "just checking"); ++ assert(_num_vtimes == other->_num_vtimes, "just checking"); ++ ++ _num_refined_cards = other->num_concurrent_refined_cards() - _num_refined_cards; ++ ++ _num_processed_buf_mutator = other->num_processed_buf_mutator() - _num_processed_buf_mutator; ++ _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads() - _num_processed_buf_rs_threads; ++ ++ _num_coarsenings = other->num_coarsenings() - _num_coarsenings; ++ ++ for (uint i = 0; i < _num_vtimes; i++) { ++ set_rs_thread_vtime(i, other->rs_thread_vtime(i) - rs_thread_vtime(i)); ++ } ++ ++ _sampling_thread_vtime = other->sampling_thread_vtime() - _sampling_thread_vtime; ++} ++ ++static double percent_of(size_t numerator, size_t denominator) { ++ if (denominator != 0) { ++ return (double)numerator / denominator * 100.0f; ++ } else { ++ return 0.0f; ++ } ++} ++ ++static size_t round_to_K(size_t value) { ++ return value / K; ++} ++ ++class RegionTypeCounter VALUE_OBJ_CLASS_SPEC { ++private: ++ const char* _name; ++ ++ size_t _rs_mem_size; ++ size_t _cards_occupied; ++ size_t _amount; ++ ++ size_t _code_root_mem_size; ++ size_t _code_root_elems; ++ ++ double rs_mem_size_percent_of(size_t total) { ++ return percent_of(_rs_mem_size, total); ++ } ++ ++ double cards_occupied_percent_of(size_t total) { ++ return percent_of(_cards_occupied, total); ++ } ++ ++ double code_root_mem_size_percent_of(size_t total) { ++ return percent_of(_code_root_mem_size, total); ++ } ++ ++ double code_root_elems_percent_of(size_t total) { ++ return percent_of(_code_root_elems, total); ++ } ++ ++ size_t amount() const { return _amount; } ++ ++public: ++ ++ RegionTypeCounter(const char* name) : _name(name), _rs_mem_size(0), _cards_occupied(0), ++ _amount(0), _code_root_mem_size(0), _code_root_elems(0) { } ++ ++ void add(size_t rs_mem_size, size_t cards_occupied, size_t code_root_mem_size, ++ size_t code_root_elems) { ++ _rs_mem_size += rs_mem_size; ++ _cards_occupied += cards_occupied; ++ _code_root_mem_size += code_root_mem_size; ++ _code_root_elems += code_root_elems; ++ _amount++; ++ } ++ ++ size_t rs_mem_size() const { return _rs_mem_size; } ++ size_t cards_occupied() const { return _cards_occupied; } ++ ++ size_t code_root_mem_size() const { return _code_root_mem_size; } ++ size_t code_root_elems() const { return _code_root_elems; } ++ ++ void print_rs_mem_info_on(outputStream * out, size_t total) { ++ out->print_cr(" "SIZE_FORMAT_W(8)"K (%5.1f%%) by "SIZE_FORMAT" %s regions", ++ round_to_K(rs_mem_size()), rs_mem_size_percent_of(total), amount(), _name); ++ } ++ ++ void print_cards_occupied_info_on(outputStream * out, size_t total) { ++ out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) entries by "SIZE_FORMAT" %s regions", ++ cards_occupied(), cards_occupied_percent_of(total), amount(), _name); ++ } ++ ++ void print_code_root_mem_info_on(outputStream * out, size_t total) { ++ out->print_cr(" "SIZE_FORMAT_W(8)"K (%5.1f%%) by "SIZE_FORMAT" %s regions", ++ round_to_K(code_root_mem_size()), code_root_mem_size_percent_of(total), amount(), _name); ++ } ++ ++ void print_code_root_elems_info_on(outputStream * out, size_t total) { ++ out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) elements by "SIZE_FORMAT" %s regions", ++ code_root_elems(), code_root_elems_percent_of(total), amount(), _name); ++ } ++}; ++ ++ ++class HRRSStatsIter: public HeapRegionClosure { ++private: ++ RegionTypeCounter _young; ++ RegionTypeCounter _humonguous; ++ RegionTypeCounter _free; ++ RegionTypeCounter _old; ++ RegionTypeCounter _all; ++ ++ size_t _max_rs_mem_sz; ++ HeapRegion* _max_rs_mem_sz_region; ++ ++ size_t total_rs_mem_sz() const { return _all.rs_mem_size(); } ++ size_t total_cards_occupied() const { return _all.cards_occupied(); } ++ ++ size_t max_rs_mem_sz() const { return _max_rs_mem_sz; } ++ HeapRegion* max_rs_mem_sz_region() const { return _max_rs_mem_sz_region; } ++ ++ size_t _max_code_root_mem_sz; ++ HeapRegion* _max_code_root_mem_sz_region; ++ ++ size_t total_code_root_mem_sz() const { return _all.code_root_mem_size(); } ++ size_t total_code_root_elems() const { return _all.code_root_elems(); } ++ ++ size_t max_code_root_mem_sz() const { return _max_code_root_mem_sz; } ++ HeapRegion* max_code_root_mem_sz_region() const { return _max_code_root_mem_sz_region; } ++ ++public: ++ HRRSStatsIter() : _all("All"), _young("Young"), _humonguous("Humonguous"), ++ _free("Free"), _old("Old"), _max_code_root_mem_sz_region(NULL), _max_rs_mem_sz_region(NULL), ++ _max_rs_mem_sz(0), _max_code_root_mem_sz(0) ++ {} ++ ++ bool doHeapRegion(HeapRegion* r) { ++ HeapRegionRemSet* hrrs = r->rem_set(); ++ ++ // HeapRegionRemSet::mem_size() includes the ++ // size of the strong code roots ++ size_t rs_mem_sz = hrrs->mem_size(); ++ if (rs_mem_sz > _max_rs_mem_sz) { ++ _max_rs_mem_sz = rs_mem_sz; ++ _max_rs_mem_sz_region = r; ++ } ++ size_t occupied_cards = hrrs->occupied(); ++ size_t code_root_mem_sz = hrrs->strong_code_roots_mem_size(); ++ if (code_root_mem_sz > max_code_root_mem_sz()) { ++ _max_code_root_mem_sz_region = r; ++ } ++ size_t code_root_elems = hrrs->strong_code_roots_list_length(); ++ ++ RegionTypeCounter* current = NULL; ++ if (r->is_young()) { ++ current = &_young; ++ } else if (r->isHumongous()) { ++ current = &_humonguous; ++ } else if (r->is_empty()) { ++ current = &_free; ++ } else { ++ current = &_old; ++ } ++ current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems); ++ _all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems); ++ ++ return false; ++ } ++ ++ void print_summary_on(outputStream* out) { ++ RegionTypeCounter* counters[] = { &_young, &_humonguous, &_free, &_old, NULL }; ++ ++ out->print_cr("\n Current rem set statistics"); ++ out->print_cr(" Total per region rem sets sizes = "SIZE_FORMAT"K." ++ " Max = "SIZE_FORMAT"K.", ++ round_to_K(total_rs_mem_sz()), round_to_K(max_rs_mem_sz())); ++ for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { ++ (*current)->print_rs_mem_info_on(out, total_rs_mem_sz()); ++ } ++ ++ out->print_cr(" Static structures = "SIZE_FORMAT"K," ++ " free_lists = "SIZE_FORMAT"K.", ++ round_to_K(HeapRegionRemSet::static_mem_size()), ++ round_to_K(HeapRegionRemSet::fl_mem_size())); ++ ++ out->print_cr(" "SIZE_FORMAT" occupied cards represented.", ++ total_cards_occupied()); ++ for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { ++ (*current)->print_cards_occupied_info_on(out, total_cards_occupied()); ++ } ++ ++ // Largest sized rem set region statistics ++ HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set(); ++ out->print_cr(" Region with largest rem set = "HR_FORMAT", " ++ "size = "SIZE_FORMAT "K, occupied = "SIZE_FORMAT"K.", ++ HR_FORMAT_PARAMS(max_rs_mem_sz_region()), ++ round_to_K(rem_set->mem_size()), ++ round_to_K(rem_set->occupied())); ++ ++ // Strong code root statistics ++ HeapRegionRemSet* max_code_root_rem_set = max_code_root_mem_sz_region()->rem_set(); ++ out->print_cr(" Total heap region code root sets sizes = "SIZE_FORMAT"K." ++ " Max = "SIZE_FORMAT"K.", ++ round_to_K(total_code_root_mem_sz()), ++ round_to_K(max_code_root_rem_set->strong_code_roots_mem_size())); ++ for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { ++ (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz()); ++ } ++ ++ out->print_cr(" "SIZE_FORMAT" code roots represented.", ++ total_code_root_elems()); ++ for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { ++ (*current)->print_code_root_elems_info_on(out, total_code_root_elems()); ++ } ++ ++ out->print_cr(" Region with largest amount of code roots = "HR_FORMAT", " ++ "size = "SIZE_FORMAT "K, num_elems = "SIZE_FORMAT".", ++ HR_FORMAT_PARAMS(max_code_root_mem_sz_region()), ++ round_to_K(max_code_root_rem_set->strong_code_roots_mem_size()), ++ round_to_K(max_code_root_rem_set->strong_code_roots_list_length())); ++ } ++}; ++ ++void G1RemSetSummary::print_on(outputStream* out) { ++ out->print_cr("\n Recent concurrent refinement statistics"); ++ out->print_cr(" Processed "SIZE_FORMAT" cards", ++ num_concurrent_refined_cards()); ++ out->print_cr(" Of "SIZE_FORMAT" completed buffers:", num_processed_buf_total()); ++ out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by concurrent RS threads.", ++ num_processed_buf_total(), ++ percent_of(num_processed_buf_rs_threads(), num_processed_buf_total())); ++ out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by mutator threads.", ++ num_processed_buf_mutator(), ++ percent_of(num_processed_buf_mutator(), num_processed_buf_total())); ++ out->print_cr(" Did "SIZE_FORMAT" coarsenings.", num_coarsenings()); ++ out->print_cr(" Concurrent RS threads times (s)"); ++ out->print(" "); ++ for (uint i = 0; i < _num_vtimes; i++) { ++ out->print(" %5.2f", rs_thread_vtime(i)); ++ } ++ out->cr(); ++ out->print_cr(" Concurrent sampling threads times (s)"); ++ out->print_cr(" %5.2f", sampling_thread_vtime()); ++ ++ HRRSStatsIter blk; ++ G1CollectedHeap::heap()->heap_region_iterate(&blk); ++ blk.print_summary_on(out); ++} +--- ./hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,118 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ * ++ */ ++ ++#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSETSUMMARY_HPP ++#define SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSETSUMMARY_HPP ++ ++#include "utilities/ostream.hpp" ++ ++class G1RemSet; ++ ++// A G1RemSetSummary manages statistical information about the G1RemSet ++ ++class G1RemSetSummary VALUE_OBJ_CLASS_SPEC { ++private: ++ friend class GetRSThreadVTimeClosure; ++ ++ G1RemSet* _remset; ++ ++ G1RemSet* remset() const { ++ return _remset; ++ } ++ ++ size_t _num_refined_cards; ++ size_t _num_processed_buf_mutator; ++ size_t _num_processed_buf_rs_threads; ++ ++ size_t _num_coarsenings; ++ ++ double* _rs_threads_vtimes; ++ size_t _num_vtimes; ++ ++ double _sampling_thread_vtime; ++ ++ void set_rs_thread_vtime(uint thread, double value); ++ void set_sampling_thread_vtime(double value) { ++ _sampling_thread_vtime = value; ++ } ++ ++ void free_and_null() { ++ if (_rs_threads_vtimes) { ++ FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes, mtGC); ++ _rs_threads_vtimes = NULL; ++ _num_vtimes = 0; ++ } ++ } ++ ++ // update this summary with current data from various places ++ void update(); ++ ++public: ++ G1RemSetSummary() : _remset(NULL), _num_refined_cards(0), ++ _num_processed_buf_mutator(0), _num_processed_buf_rs_threads(0), _num_coarsenings(0), ++ _rs_threads_vtimes(NULL), _num_vtimes(0), _sampling_thread_vtime(0.0f) { ++ } ++ ++ ~G1RemSetSummary() { ++ free_and_null(); ++ } ++ ++ // set the counters in this summary to the values of the others ++ void set(G1RemSetSummary* other); ++ // subtract all counters from the other summary, and set them in the current ++ void subtract_from(G1RemSetSummary* other); ++ ++ // initialize and get the first sampling ++ void initialize(G1RemSet* remset); ++ ++ void print_on(outputStream* out); ++ ++ double rs_thread_vtime(uint thread) const; ++ ++ double sampling_thread_vtime() const { ++ return _sampling_thread_vtime; ++ } ++ ++ size_t num_concurrent_refined_cards() const { ++ return _num_refined_cards; ++ } ++ ++ size_t num_processed_buf_mutator() const { ++ return _num_processed_buf_mutator; ++ } ++ ++ size_t num_processed_buf_rs_threads() const { ++ return _num_processed_buf_rs_threads; ++ } ++ ++ size_t num_processed_buf_total() const { ++ return num_processed_buf_mutator() + num_processed_buf_rs_threads(); ++ } ++ ++ size_t num_coarsenings() const { ++ return _num_coarsenings; ++ } ++}; ++ ++#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1REMSETSUMMARY_HPP +--- ./hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -76,6 +76,46 @@ + } + } -- /** Property identifier: SecurityManager. */ -+ /** Property identifier: XMLSecurityManager. */ - private static final String SECURITY_MANAGER = - Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++bool G1SATBCardTableModRefBS::mark_card_deferred(size_t card_index) { ++ jbyte val = _byte_map[card_index]; ++ // It's already processed ++ if ((val & (clean_card_mask_val() | deferred_card_val())) == deferred_card_val()) { ++ return false; ++ } ++ ++ if (val == g1_young_gen) { ++ // the card is for a young gen region. We don't need to keep track of all pointers into young ++ return false; ++ } ++ ++ // Cached bit can be installed either on a clean card or on a claimed card. ++ jbyte new_val = val; ++ if (val == clean_card_val()) { ++ new_val = (jbyte)deferred_card_val(); ++ } else { ++ if (val & claimed_card_val()) { ++ new_val = val | (jbyte)deferred_card_val(); ++ } ++ } ++ if (new_val != val) { ++ Atomic::cmpxchg(new_val, &_byte_map[card_index], val); ++ } ++ return true; ++} ++ ++void G1SATBCardTableModRefBS::g1_mark_as_young(const MemRegion& mr) { ++ jbyte *const first = byte_for(mr.start()); ++ jbyte *const last = byte_after(mr.last()); ++ ++ memset(first, g1_young_gen, last - first); ++} ++ ++#ifndef PRODUCT ++void G1SATBCardTableModRefBS::verify_g1_young_region(MemRegion mr) { ++ verify_region(mr, g1_young_gen, true); ++} ++#endif ++ + G1SATBCardTableLoggingModRefBS:: + G1SATBCardTableLoggingModRefBS(MemRegion whole_heap, + int max_covered_regions) : +@@ -88,7 +128,11 @@ + void + G1SATBCardTableLoggingModRefBS::write_ref_field_work(void* field, + oop new_val) { +- jbyte* byte = byte_for(field); ++ volatile jbyte* byte = byte_for(field); ++ if (*byte == g1_young_gen) { ++ return; ++ } ++ OrderAccess::storeload(); + if (*byte != dirty_card) { + *byte = dirty_card; + Thread* thr = Thread::current(); +@@ -120,7 +164,7 @@ -@@ -87,7 +87,6 @@ - private static final String XML_SECURITY_PROPERTY_MANAGER = - Constants.XML_SECURITY_PROPERTY_MANAGER; + void + G1SATBCardTableLoggingModRefBS::invalidate(MemRegion mr, bool whole_heap) { +- jbyte* byte = byte_for(mr.start()); ++ volatile jbyte* byte = byte_for(mr.start()); + jbyte* last_byte = byte_for(mr.last()); + Thread* thr = Thread::current(); + if (whole_heap) { +@@ -129,25 +173,35 @@ + byte++; + } + } else { +- // Enqueue if necessary. +- if (thr->is_Java_thread()) { +- JavaThread* jt = (JavaThread*)thr; +- while (byte <= last_byte) { +- if (*byte != dirty_card) { +- *byte = dirty_card; +- jt->dirty_card_queue().enqueue(byte); ++ // skip all consecutive young cards ++ for (; byte <= last_byte && *byte == g1_young_gen; byte++); ++ ++ if (byte <= last_byte) { ++ OrderAccess::storeload(); ++ // Enqueue if necessary. ++ if (thr->is_Java_thread()) { ++ JavaThread* jt = (JavaThread*)thr; ++ for (; byte <= last_byte; byte++) { ++ if (*byte == g1_young_gen) { ++ continue; ++ } ++ if (*byte != dirty_card) { ++ *byte = dirty_card; ++ jt->dirty_card_queue().enqueue(byte); ++ } + } +- byte++; +- } +- } else { +- MutexLockerEx x(Shared_DirtyCardQ_lock, +- Mutex::_no_safepoint_check_flag); +- while (byte <= last_byte) { +- if (*byte != dirty_card) { +- *byte = dirty_card; +- _dcqs.shared_dirty_card_queue()->enqueue(byte); ++ } else { ++ MutexLockerEx x(Shared_DirtyCardQ_lock, ++ Mutex::_no_safepoint_check_flag); ++ for (; byte <= last_byte; byte++) { ++ if (*byte == g1_young_gen) { ++ continue; ++ } ++ if (*byte != dirty_card) { ++ *byte = dirty_card; ++ _dcqs.shared_dirty_card_queue()->enqueue(byte); ++ } + } +- byte++; + } + } + } +--- ./hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -37,7 +37,14 @@ + // snapshot-at-the-beginning marking. -- - // - // Data - // -@@ -108,7 +107,7 @@ - private ErrorHandlerWrapper fErrorHandlerWrapper; + class G1SATBCardTableModRefBS: public CardTableModRefBSForCTRS { ++protected: ++ enum G1CardValues { ++ g1_young_gen = CT_MR_BS_last_reserved << 1 ++ }; ++ + public: ++ static int g1_young_card_val() { return g1_young_gen; } ++ + // Add "pre_val" to a set of objects that may have been disconnected from the + // pre-marking object graph. + static void enqueue(oop pre_val); +@@ -88,6 +95,45 @@ + write_ref_array_pre_work(dst, count); + } + } ++ ++/* ++ Claimed and deferred bits are used together in G1 during the evacuation ++ pause. These bits can have the following state transitions: ++ 1. The claimed bit can be put over any other card state. Except that ++ the "dirty -> dirty and claimed" transition is checked for in ++ G1 code and is not used. ++ 2. Deferred bit can be set only if the previous state of the card ++ was either clean or claimed. mark_card_deferred() is wait-free. ++ We do not care if the operation is be successful because if ++ it does not it will only result in duplicate entry in the update ++ buffer because of the "cache-miss". So it's not worth spinning. ++ */ ++ ++ bool is_card_claimed(size_t card_index) { ++ jbyte val = _byte_map[card_index]; ++ return (val & (clean_card_mask_val() | claimed_card_val())) == claimed_card_val(); ++ } ++ ++ void set_card_claimed(size_t card_index) { ++ jbyte val = _byte_map[card_index]; ++ if (val == clean_card_val()) { ++ val = (jbyte)claimed_card_val(); ++ } else { ++ val |= (jbyte)claimed_card_val(); ++ } ++ _byte_map[card_index] = val; ++ } ++ ++ void verify_g1_young_region(MemRegion mr) PRODUCT_RETURN; ++ void g1_mark_as_young(const MemRegion& mr); ++ ++ bool mark_card_deferred(size_t card_index); ++ ++ bool is_card_deferred(size_t card_index) { ++ jbyte val = _byte_map[card_index]; ++ return (val & (clean_card_mask_val() | deferred_card_val())) == deferred_card_val(); ++ } ++ + }; - /** The SecurityManager. */ -- private SecurityManager fSecurityManager; -+ private XMLSecurityManager fSecurityManager; + // Adds card-table logging to the post-barrier. +--- ./hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -71,6 +71,9 @@ + diagnostic(bool, G1TraceConcRefinement, false, \ + "Trace G1 concurrent refinement") \ + \ ++ experimental(bool, G1TraceStringSymbolTableScrubbing, false, \ ++ "Trace information string and symbol table scrubbing.") \ ++ \ + product(double, G1ConcMarkStepDurationMillis, 10.0, \ + "Target duration of individual concurrent marking steps " \ + "in milliseconds.") \ +@@ -332,7 +335,14 @@ + \ + develop(bool, G1EvacuationFailureALotDuringMixedGC, true, \ + "Force use of evacuation failure handling during mixed " \ +- "evacuation pauses") ++ "evacuation pauses") \ ++ \ ++ diagnostic(bool, G1VerifyRSetsDuringFullGC, false, \ ++ "If true, perform verification of each heap region's " \ ++ "remembered set when verifying the heap during a full GC.") \ ++ \ ++ diagnostic(bool, G1VerifyHeapRegionCodeRoots, false, \ ++ "Verify the code root lists attached to each heap region.") + + G1_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG) + +--- ./hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -23,6 +23,7 @@ + */ - /** The Security property manager. */ - private XMLSecurityPropertyManager fSecurityPropertyMgr; -@@ -122,8 +121,6 @@ - * Note the default value (false) is the safe option.. - */ - private final boolean fUseServicesMechanism; + #include "precompiled.hpp" ++#include "code/nmethod.hpp" + #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" + #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" + #include "gc_implementation/g1/g1OopClosures.inline.hpp" +@@ -50,144 +51,6 @@ + OopClosure* oc) : + _r_bottom(r->bottom()), _r_end(r->end()), _oc(oc) { } + +-class VerifyLiveClosure: public OopClosure { +-private: +- G1CollectedHeap* _g1h; +- CardTableModRefBS* _bs; +- oop _containing_obj; +- bool _failures; +- int _n_failures; +- VerifyOption _vo; +-public: +- // _vo == UsePrevMarking -> use "prev" marking information, +- // _vo == UseNextMarking -> use "next" marking information, +- // _vo == UseMarkWord -> use mark word from object header. +- VerifyLiveClosure(G1CollectedHeap* g1h, VerifyOption vo) : +- _g1h(g1h), _bs(NULL), _containing_obj(NULL), +- _failures(false), _n_failures(0), _vo(vo) +- { +- BarrierSet* bs = _g1h->barrier_set(); +- if (bs->is_a(BarrierSet::CardTableModRef)) +- _bs = (CardTableModRefBS*)bs; +- } - +- void set_containing_obj(oop obj) { +- _containing_obj = obj; +- } - - public XMLSchemaFactory() { - this(true); - } -@@ -141,7 +138,7 @@ - fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper); +- bool failures() { return _failures; } +- int n_failures() { return _n_failures; } +- +- virtual void do_oop(narrowOop* p) { do_oop_work(p); } +- virtual void do_oop( oop* p) { do_oop_work(p); } +- +- void print_object(outputStream* out, oop obj) { +-#ifdef PRODUCT +- klassOop k = obj->klass(); +- const char* class_name = instanceKlass::cast(k)->external_name(); +- out->print_cr("class name %s", class_name); +-#else // PRODUCT +- obj->print_on(out); +-#endif // PRODUCT +- } +- +- template +- void do_oop_work(T* p) { +- assert(_containing_obj != NULL, "Precondition"); +- assert(!_g1h->is_obj_dead_cond(_containing_obj, _vo), +- "Precondition"); +- T heap_oop = oopDesc::load_heap_oop(p); +- if (!oopDesc::is_null(heap_oop)) { +- oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); +- bool failed = false; +- if (!_g1h->is_in_closed_subset(obj) || _g1h->is_obj_dead_cond(obj, _vo)) { +- MutexLockerEx x(ParGCRareEvent_lock, +- Mutex::_no_safepoint_check_flag); +- +- if (!_failures) { +- gclog_or_tty->print_cr(""); +- gclog_or_tty->print_cr("----------"); +- } +- if (!_g1h->is_in_closed_subset(obj)) { +- HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); +- gclog_or_tty->print_cr("Field "PTR_FORMAT +- " of live obj "PTR_FORMAT" in region " +- "["PTR_FORMAT", "PTR_FORMAT")", +- p, (void*) _containing_obj, +- from->bottom(), from->end()); +- print_object(gclog_or_tty, _containing_obj); +- gclog_or_tty->print_cr("points to obj "PTR_FORMAT" not in the heap", +- (void*) obj); +- } else { +- HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); +- HeapRegion* to = _g1h->heap_region_containing((HeapWord*)obj); +- gclog_or_tty->print_cr("Field "PTR_FORMAT +- " of live obj "PTR_FORMAT" in region " +- "["PTR_FORMAT", "PTR_FORMAT")", +- p, (void*) _containing_obj, +- from->bottom(), from->end()); +- print_object(gclog_or_tty, _containing_obj); +- gclog_or_tty->print_cr("points to dead obj "PTR_FORMAT" in region " +- "["PTR_FORMAT", "PTR_FORMAT")", +- (void*) obj, to->bottom(), to->end()); +- print_object(gclog_or_tty, obj); +- } +- gclog_or_tty->print_cr("----------"); +- gclog_or_tty->flush(); +- _failures = true; +- failed = true; +- _n_failures++; +- } +- +- if (!_g1h->full_collection()) { +- HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); +- HeapRegion* to = _g1h->heap_region_containing(obj); +- if (from != NULL && to != NULL && +- from != to && +- !to->isHumongous()) { +- jbyte cv_obj = *_bs->byte_for_const(_containing_obj); +- jbyte cv_field = *_bs->byte_for_const(p); +- const jbyte dirty = CardTableModRefBS::dirty_card_val(); +- +- bool is_bad = !(from->is_young() +- || to->rem_set()->contains_reference(p) +- || !G1HRRSFlushLogBuffersOnVerify && // buffers were not flushed +- (_containing_obj->is_objArray() ? +- cv_field == dirty +- : cv_obj == dirty || cv_field == dirty)); +- if (is_bad) { +- MutexLockerEx x(ParGCRareEvent_lock, +- Mutex::_no_safepoint_check_flag); +- +- if (!_failures) { +- gclog_or_tty->print_cr(""); +- gclog_or_tty->print_cr("----------"); +- } +- gclog_or_tty->print_cr("Missing rem set entry:"); +- gclog_or_tty->print_cr("Field "PTR_FORMAT" " +- "of obj "PTR_FORMAT", " +- "in region "HR_FORMAT, +- p, (void*) _containing_obj, +- HR_FORMAT_PARAMS(from)); +- _containing_obj->print_on(gclog_or_tty); +- gclog_or_tty->print_cr("points to obj "PTR_FORMAT" " +- "in region "HR_FORMAT, +- (void*) obj, +- HR_FORMAT_PARAMS(to)); +- obj->print_on(gclog_or_tty); +- gclog_or_tty->print_cr("Obj head CTE = %d, field CTE = %d.", +- cv_obj, cv_field); +- gclog_or_tty->print_cr("----------"); +- gclog_or_tty->flush(); +- _failures = true; +- if (!failed) _n_failures++; +- } +- } +- } +- } +- } +-}; +- + template + HeapWord* walk_mem_region_loop(ClosureType* cl, G1CollectedHeap* g1h, + HeapRegion* hr, +@@ -314,6 +177,11 @@ + region_size = MAX_REGION_SIZE; + } - // Enable secure processing feature by default -- fSecurityManager = new SecurityManager(); -+ fSecurityManager = new XMLSecurityManager(true); - fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); ++ if (region_size != G1HeapRegionSize) { ++ // Update the flag to make sure that PrintFlagsFinal logs the correct value ++ FLAG_SET_ERGO(uintx, G1HeapRegionSize, region_size); ++ } ++ + // And recalculate the log. + region_size_log = log2_long((jlong) region_size); - fSecurityPropertyMgr = new XMLSecurityPropertyManager(); -@@ -301,7 +298,7 @@ - "FeatureNameNull", null)); - } - if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { -- return (fSecurityManager != null); -+ return (fSecurityManager !=null && fSecurityManager.isSecureProcessing()); - } - try { - return fXMLSchemaLoader.getFeature(name); -@@ -365,17 +362,15 @@ - SAXMessageFormatter.formatMessage(null, - "jaxp-secureprocessing-feature", null)); - } -- if (value) { -- fSecurityManager = new SecurityManager(); +@@ -363,7 +231,7 @@ + if (!par) { + // If this is parallel, this will be done later. + HeapRegionRemSet* hrrs = rem_set(); +- if (hrrs != NULL) hrrs->clear(); ++ hrrs->clear(); + _claimed = InitialClaimValue; + } + zero_marked_bytes(); +@@ -504,6 +372,7 @@ + _rem_set(NULL), _recorded_rs_length(0), _predicted_elapsed_time_ms(0), + _predicted_bytes_to_copy(0) + { ++ _rem_set = new HeapRegionRemSet(sharedOffsetArray, this); + _orig_end = mr.end(); + // Note that initialize() will set the start of the unmarked area of the + // region. +@@ -511,8 +380,6 @@ + set_top(bottom()); + set_saved_mark(); + +- _rem_set = new HeapRegionRemSet(sharedOffsetArray, this); +- + assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant."); + } -+ fSecurityManager.setSecureProcessing(value); -+ if (value) { - if (Constants.IS_JDK8_OR_ABOVE) { - fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD, - XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); - fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA, - XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); - } -- } else { -- fSecurityManager = null; - } +@@ -732,6 +599,161 @@ + return NULL; + } - fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); -@@ -410,9 +405,17 @@ - "ProperyNameNull", null)); - } - if (name.equals(SECURITY_MANAGER)) { -- fSecurityManager = (SecurityManager) object; -+ fSecurityManager = XMLSecurityManager.convert(object, fSecurityManager); - fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); - return; -+ } else if (name.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { -+ if (object == null) { -+ fSecurityPropertyMgr = new XMLSecurityPropertyManager(); -+ } else { -+ fSecurityPropertyMgr = (XMLSecurityPropertyManager)object; -+ } -+ fXMLSchemaLoader.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); -+ return; - } - else if (name.equals(XMLGRAMMAR_POOL)) { - throw new SAXNotSupportedException( -@@ -420,12 +423,15 @@ - "property-not-supported", new Object [] {name})); - } - try { -- int index = fSecurityPropertyMgr.getIndex(name); -- if (index > -1) { -- fSecurityPropertyMgr.setValue(index, -- XMLSecurityPropertyManager.State.APIPROPERTY, (String)object); -- } else { -- fXMLSchemaLoader.setProperty(name, object); -+ //check if the property is managed by security manager -+ if (fSecurityManager == null || -+ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, object)) { -+ //check if the property is managed by security property manager -+ if (fSecurityPropertyMgr == null || -+ !fSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, object)) { -+ //fall back to the existing property manager -+ fXMLSchemaLoader.setProperty(name, object); -+ } - } - } - catch (XMLConfigurationException e) { ---- jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2014-04-20 12:39:46.000000000 -0700 -@@ -39,9 +39,9 @@ - import com.sun.org.apache.xerces.internal.util.NamespaceSupport; - import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; - import com.sun.org.apache.xerces.internal.util.PropertyState; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.SymbolTable; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.NamespaceContext; - import com.sun.org.apache.xerces.internal.xni.XNIException; -@@ -181,7 +181,7 @@ - private final HashMap fInitProperties = new HashMap(); ++// Code roots support ++ ++void HeapRegion::add_strong_code_root(nmethod* nm) { ++ HeapRegionRemSet* hrrs = rem_set(); ++ hrrs->add_strong_code_root(nm); ++} ++ ++void HeapRegion::remove_strong_code_root(nmethod* nm) { ++ HeapRegionRemSet* hrrs = rem_set(); ++ hrrs->remove_strong_code_root(nm); ++} ++ ++void HeapRegion::migrate_strong_code_roots() { ++ assert(in_collection_set(), "only collection set regions"); ++ assert(!isHumongous(), ++ err_msg("humongous region "HR_FORMAT" should not have been added to collection set", ++ HR_FORMAT_PARAMS(this))); ++ ++ HeapRegionRemSet* hrrs = rem_set(); ++ hrrs->migrate_strong_code_roots(); ++} ++ ++void HeapRegion::strong_code_roots_do(CodeBlobClosure* blk) const { ++ HeapRegionRemSet* hrrs = rem_set(); ++ hrrs->strong_code_roots_do(blk); ++} ++ ++class VerifyStrongCodeRootOopClosure: public OopClosure { ++ const HeapRegion* _hr; ++ nmethod* _nm; ++ bool _failures; ++ bool _has_oops_in_region; ++ ++ template void do_oop_work(T* p) { ++ T heap_oop = oopDesc::load_heap_oop(p); ++ if (!oopDesc::is_null(heap_oop)) { ++ oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); ++ ++ // Note: not all the oops embedded in the nmethod are in the ++ // current region. We only look at those which are. ++ if (_hr->is_in(obj)) { ++ // Object is in the region. Check that its less than top ++ if (_hr->top() <= (HeapWord*)obj) { ++ // Object is above top ++ gclog_or_tty->print_cr("Object "PTR_FORMAT" in region " ++ "["PTR_FORMAT", "PTR_FORMAT") is above " ++ "top "PTR_FORMAT, ++ obj, _hr->bottom(), _hr->end(), _hr->top()); ++ _failures = true; ++ return; ++ } ++ // Nmethod has at least one oop in the current region ++ _has_oops_in_region = true; ++ } ++ } ++ } ++ ++public: ++ VerifyStrongCodeRootOopClosure(const HeapRegion* hr, nmethod* nm): ++ _hr(hr), _failures(false), _has_oops_in_region(false) {} ++ ++ void do_oop(narrowOop* p) { do_oop_work(p); } ++ void do_oop(oop* p) { do_oop_work(p); } ++ ++ bool failures() { return _failures; } ++ bool has_oops_in_region() { return _has_oops_in_region; } ++}; ++ ++class VerifyStrongCodeRootCodeBlobClosure: public CodeBlobClosure { ++ const HeapRegion* _hr; ++ bool _failures; ++public: ++ VerifyStrongCodeRootCodeBlobClosure(const HeapRegion* hr) : ++ _hr(hr), _failures(false) {} ++ ++ void do_code_blob(CodeBlob* cb) { ++ nmethod* nm = (cb == NULL) ? NULL : cb->as_nmethod_or_null(); ++ if (nm != NULL) { ++ // Verify that the nemthod is live ++ if (!nm->is_alive()) { ++ gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has dead nmethod " ++ PTR_FORMAT" in its strong code roots", ++ _hr->bottom(), _hr->end(), nm); ++ _failures = true; ++ } else { ++ VerifyStrongCodeRootOopClosure oop_cl(_hr, nm); ++ nm->oops_do(&oop_cl); ++ if (!oop_cl.has_oops_in_region()) { ++ gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has nmethod " ++ PTR_FORMAT" in its strong code roots " ++ "with no pointers into region", ++ _hr->bottom(), _hr->end(), nm); ++ _failures = true; ++ } else if (oop_cl.failures()) { ++ gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] has other " ++ "failures for nmethod "PTR_FORMAT, ++ _hr->bottom(), _hr->end(), nm); ++ _failures = true; ++ } ++ } ++ } ++ } ++ ++ bool failures() { return _failures; } ++}; ++ ++void HeapRegion::verify_strong_code_roots(VerifyOption vo, bool* failures) const { ++ if (!G1VerifyHeapRegionCodeRoots) { ++ // We're not verifying code roots. ++ return; ++ } ++ if (vo == VerifyOption_G1UseMarkWord) { ++ // Marking verification during a full GC is performed after class ++ // unloading, code cache unloading, etc so the strong code roots ++ // attached to each heap region are in an inconsistent state. They won't ++ // be consistent until the strong code roots are rebuilt after the ++ // actual GC. Skip verifying the strong code roots in this particular ++ // time. ++ assert(VerifyDuringGC, "only way to get here"); ++ return; ++ } ++ ++ HeapRegionRemSet* hrrs = rem_set(); ++ int strong_code_roots_length = hrrs->strong_code_roots_list_length(); ++ ++ // if this region is empty then there should be no entries ++ // on its strong code root list ++ if (is_empty()) { ++ if (strong_code_roots_length > 0) { ++ gclog_or_tty->print_cr("region ["PTR_FORMAT","PTR_FORMAT"] is empty " ++ "but has "INT32_FORMAT" code root entries", ++ bottom(), end(), strong_code_roots_length); ++ *failures = true; ++ } ++ return; ++ } ++ ++ if (continuesHumongous()) { ++ if (strong_code_roots_length > 0) { ++ gclog_or_tty->print_cr("region "HR_FORMAT" is a continuation of a humongous " ++ "region but has "INT32_FORMAT" code root entries", ++ HR_FORMAT_PARAMS(this), strong_code_roots_length); ++ *failures = true; ++ } ++ return; ++ } ++ ++ VerifyStrongCodeRootCodeBlobClosure cb_cl(this); ++ strong_code_roots_do(&cb_cl); ++ ++ if (cb_cl.failures()) { ++ *failures = true; ++ } ++} ++ + void HeapRegion::print() const { print_on(gclog_or_tty); } + void HeapRegion::print_on(outputStream* st) const { + if (isHumongous()) { +@@ -760,10 +782,143 @@ + G1OffsetTableContigSpace::print_on(st); + } - /** Stores the initial security manager. */ -- private final SecurityManager fInitSecurityManager; -+ private XMLSecurityManager fInitSecurityManager; +-void HeapRegion::verify() const { +- bool dummy = false; +- verify(VerifyOption_G1UsePrevMarking, /* failures */ &dummy); +-} ++class VerifyLiveClosure: public OopClosure { ++private: ++ G1CollectedHeap* _g1h; ++ CardTableModRefBS* _bs; ++ oop _containing_obj; ++ bool _failures; ++ int _n_failures; ++ VerifyOption _vo; ++public: ++ // _vo == UsePrevMarking -> use "prev" marking information, ++ // _vo == UseNextMarking -> use "next" marking information, ++ // _vo == UseMarkWord -> use mark word from object header. ++ VerifyLiveClosure(G1CollectedHeap* g1h, VerifyOption vo) : ++ _g1h(g1h), _bs(NULL), _containing_obj(NULL), ++ _failures(false), _n_failures(0), _vo(vo) ++ { ++ BarrierSet* bs = _g1h->barrier_set(); ++ if (bs->is_a(BarrierSet::CardTableModRef)) ++ _bs = (CardTableModRefBS*)bs; ++ } ++ ++ void set_containing_obj(oop obj) { ++ _containing_obj = obj; ++ } ++ ++ bool failures() { return _failures; } ++ int n_failures() { return _n_failures; } ++ ++ virtual void do_oop(narrowOop* p) { do_oop_work(p); } ++ virtual void do_oop( oop* p) { do_oop_work(p); } ++ ++ void print_object(outputStream* out, oop obj) { ++#ifdef PRODUCT ++ klassOop k = obj->klass(); ++ const char* class_name = instanceKlass::cast(k)->external_name(); ++ out->print_cr("class name %s", class_name); ++#else // PRODUCT ++ obj->print_on(out); ++#endif // PRODUCT ++ } ++ ++ template ++ void do_oop_work(T* p) { ++ assert(_containing_obj != NULL, "Precondition"); ++ assert(!_g1h->is_obj_dead_cond(_containing_obj, _vo), ++ "Precondition"); ++ T heap_oop = oopDesc::load_heap_oop(p); ++ if (!oopDesc::is_null(heap_oop)) { ++ oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); ++ bool failed = false; ++ if (!_g1h->is_in_closed_subset(obj) || _g1h->is_obj_dead_cond(obj, _vo)) { ++ MutexLockerEx x(ParGCRareEvent_lock, ++ Mutex::_no_safepoint_check_flag); ++ ++ if (!_failures) { ++ gclog_or_tty->print_cr(""); ++ gclog_or_tty->print_cr("----------"); ++ } ++ if (!_g1h->is_in_closed_subset(obj)) { ++ HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); ++ gclog_or_tty->print_cr("Field "PTR_FORMAT ++ " of live obj "PTR_FORMAT" in region " ++ "["PTR_FORMAT", "PTR_FORMAT")", ++ p, (void*) _containing_obj, ++ from->bottom(), from->end()); ++ print_object(gclog_or_tty, _containing_obj); ++ gclog_or_tty->print_cr("points to obj "PTR_FORMAT" not in the heap", ++ (void*) obj); ++ } else { ++ HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); ++ HeapRegion* to = _g1h->heap_region_containing((HeapWord*)obj); ++ gclog_or_tty->print_cr("Field "PTR_FORMAT ++ " of live obj "PTR_FORMAT" in region " ++ "["PTR_FORMAT", "PTR_FORMAT")", ++ p, (void*) _containing_obj, ++ from->bottom(), from->end()); ++ print_object(gclog_or_tty, _containing_obj); ++ gclog_or_tty->print_cr("points to dead obj "PTR_FORMAT" in region " ++ "["PTR_FORMAT", "PTR_FORMAT")", ++ (void*) obj, to->bottom(), to->end()); ++ print_object(gclog_or_tty, obj); ++ } ++ gclog_or_tty->print_cr("----------"); ++ gclog_or_tty->flush(); ++ _failures = true; ++ failed = true; ++ _n_failures++; ++ } ++ ++ if (!_g1h->full_collection() || G1VerifyRSetsDuringFullGC) { ++ HeapRegion* from = _g1h->heap_region_containing((HeapWord*)p); ++ HeapRegion* to = _g1h->heap_region_containing(obj); ++ if (from != NULL && to != NULL && ++ from != to && ++ !to->isHumongous()) { ++ jbyte cv_obj = *_bs->byte_for_const(_containing_obj); ++ jbyte cv_field = *_bs->byte_for_const(p); ++ const jbyte dirty = CardTableModRefBS::dirty_card_val(); ++ ++ bool is_bad = !(from->is_young() ++ || to->rem_set()->contains_reference(p) ++ || !G1HRRSFlushLogBuffersOnVerify && // buffers were not flushed ++ (_containing_obj->is_objArray() ? ++ cv_field == dirty ++ : cv_obj == dirty || cv_field == dirty)); ++ if (is_bad) { ++ MutexLockerEx x(ParGCRareEvent_lock, ++ Mutex::_no_safepoint_check_flag); ++ ++ if (!_failures) { ++ gclog_or_tty->print_cr(""); ++ gclog_or_tty->print_cr("----------"); ++ } ++ gclog_or_tty->print_cr("Missing rem set entry:"); ++ gclog_or_tty->print_cr("Field "PTR_FORMAT" " ++ "of obj "PTR_FORMAT", " ++ "in region "HR_FORMAT, ++ p, (void*) _containing_obj, ++ HR_FORMAT_PARAMS(from)); ++ _containing_obj->print_on(gclog_or_tty); ++ gclog_or_tty->print_cr("points to obj "PTR_FORMAT" " ++ "in region "HR_FORMAT, ++ (void*) obj, ++ HR_FORMAT_PARAMS(to)); ++ obj->print_on(gclog_or_tty); ++ gclog_or_tty->print_cr("Obj head CTE = %d, field CTE = %d.", ++ cv_obj, cv_field); ++ gclog_or_tty->print_cr("----------"); ++ gclog_or_tty->flush(); ++ _failures = true; ++ if (!failed) _n_failures++; ++ } ++ } ++ } ++ } ++ } ++}; - /** Stores the initial security property manager. */ - private final XMLSecurityPropertyManager fSecurityPropertyMgr; -@@ -221,12 +221,6 @@ - fComponents.put(ENTITY_RESOLVER, null); - fComponents.put(ERROR_HANDLER, null); + // This really ought to be commoned up into OffsetTableContigSpace somehow. + // We would need a mechanism to make that code skip dead objects. +@@ -903,6 +1058,13 @@ + *failures = true; + return; + } ++ ++ verify_strong_code_roots(vo, failures); ++} ++ ++void HeapRegion::verify() const { ++ bool dummy = false; ++ verify(VerifyOption_G1UsePrevMarking, /* failures */ &dummy); + } -- if (System.getSecurityManager() != null) { -- _isSecureMode = true; -- setProperty(SECURITY_MANAGER, new SecurityManager()); -- } else { -- fComponents.put(SECURITY_MANAGER, null); -- } - fComponents.put(SYMBOL_TABLE, new SymbolTable()); + // G1OffsetTableContigSpace code; copied from space.cpp. Hope this can go +--- ./hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -51,6 +51,7 @@ + class HeapRegionRemSetIterator; + class HeapRegion; + class HeapRegionSetBase; ++class nmethod; + + #define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" + #define HR_FORMAT_PARAMS(_hr_) \ +@@ -374,7 +375,8 @@ + RebuildRSClaimValue = 5, + ParEvacFailureClaimValue = 6, + AggregateCountClaimValue = 7, +- VerifyCountClaimValue = 8 ++ VerifyCountClaimValue = 8, ++ ParMarkRootClaimValue = 9 + }; + + inline HeapWord* par_allocate_no_bot_updates(size_t word_size) { +@@ -801,6 +803,25 @@ + + virtual void reset_after_compaction(); + ++ // Routines for managing a list of code roots (attached to the ++ // this region's RSet) that point into this heap region. ++ void add_strong_code_root(nmethod* nm); ++ void remove_strong_code_root(nmethod* nm); ++ ++ // During a collection, migrate the successfully evacuated ++ // strong code roots that referenced into this region to the ++ // new regions that they now point into. Unsuccessfully ++ // evacuated code roots are not migrated. ++ void migrate_strong_code_roots(); ++ ++ // Applies blk->do_code_blob() to each of the entries in ++ // the strong code roots list for this region ++ void strong_code_roots_do(CodeBlobClosure* blk) const; ++ ++ // Verify that the entries on the strong code root list for this ++ // region are live and include at least one pointer into this region. ++ void verify_strong_code_roots(VerifyOption vo, bool* failures) const; ++ + void print() const; + void print_on(outputStream* st) const; + +--- ./hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -33,6 +33,7 @@ + #include "oops/oop.inline.hpp" + #include "utilities/bitMap.inline.hpp" + #include "utilities/globalDefinitions.hpp" ++#include "utilities/growableArray.hpp" + + class PerRegionTable: public CHeapObj { + friend class OtherRegionsTable; +@@ -706,10 +707,11 @@ + // Cast away const in this case. + MutexLockerEx x((Mutex*)&_m, Mutex::_no_safepoint_check_flag); + size_t sum = 0; +- PerRegionTable * cur = _first_all_fine_prts; +- while (cur != NULL) { +- sum += cur->mem_size(); +- cur = cur->next(); ++ // all PRTs are of the same size so it is sufficient to query only one of them. ++ if (_first_all_fine_prts != NULL) { ++ assert(_last_all_fine_prts != NULL && ++ _first_all_fine_prts->mem_size() == _last_all_fine_prts->mem_size(), "check that mem_size() is constant"); ++ sum += _first_all_fine_prts->mem_size() * _n_fine_entries; + } + sum += (sizeof(PerRegionTable*) * _max_fine_entries); + sum += (_coarse_map.size_in_words() * HeapWordSize); +@@ -845,7 +847,7 @@ + + HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, + HeapRegion* hr) +- : _bosa(bosa), _other_regions(hr) { ++ : _bosa(bosa), _strong_code_roots_list(NULL), _other_regions(hr) { + reset_for_par_iteration(); + } - // setup grammar pool -@@ -241,15 +235,21 @@ - addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer); - addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer); +@@ -909,6 +911,12 @@ + } + + void HeapRegionRemSet::clear() { ++ if (_strong_code_roots_list != NULL) { ++ delete _strong_code_roots_list; ++ } ++ _strong_code_roots_list = new (ResourceObj::C_HEAP, mtGC) ++ GrowableArray(10, 0, NULL, true); ++ + _other_regions.clear(); + assert(occupied() == 0, "Should be clear."); + reset_for_par_iteration(); +@@ -926,6 +934,126 @@ + _other_regions.scrub(ctbs, region_bm, card_bm); + } -- // if the secure processing feature is set to true, add a security manager to the configuration -- Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); -- if (Boolean.TRUE.equals(secureProcessing)) { -- fInitSecurityManager = new SecurityManager(); -+ boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); -+ if (System.getSecurityManager() != null) { -+ _isSecureMode = true; -+ secureProcessing = true; - } -- else { -- fInitSecurityManager = null; + -+ fInitSecurityManager = (XMLSecurityManager) -+ grammarContainer.getProperty(SECURITY_MANAGER); -+ if (fInitSecurityManager != null ) { -+ fInitSecurityManager.setSecureProcessing(secureProcessing); -+ } else { -+ fInitSecurityManager = new XMLSecurityManager(secureProcessing); - } -- fComponents.put(SECURITY_MANAGER, fInitSecurityManager); ++// Code roots support + -+ setProperty(SECURITY_MANAGER, fInitSecurityManager); ++void HeapRegionRemSet::add_strong_code_root(nmethod* nm) { ++ assert(nm != NULL, "sanity"); ++ // Search for the code blob from the RHS to avoid ++ // duplicate entries as much as possible ++ if (_strong_code_roots_list->find_from_end(nm) < 0) { ++ // Code blob isn't already in the list ++ _strong_code_roots_list->push(nm); ++ } ++} ++ ++void HeapRegionRemSet::remove_strong_code_root(nmethod* nm) { ++ assert(nm != NULL, "sanity"); ++ int idx = _strong_code_roots_list->find(nm); ++ if (idx >= 0) { ++ _strong_code_roots_list->remove_at(idx); ++ } ++ // Check that there were no duplicates ++ guarantee(_strong_code_roots_list->find(nm) < 0, "duplicate entry found"); ++} ++ ++class NMethodMigrationOopClosure : public OopClosure { ++ G1CollectedHeap* _g1h; ++ HeapRegion* _from; ++ nmethod* _nm; ++ ++ uint _num_self_forwarded; ++ ++ template void do_oop_work(T* p) { ++ T heap_oop = oopDesc::load_heap_oop(p); ++ if (!oopDesc::is_null(heap_oop)) { ++ oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); ++ if (obj->is_perm()) { ++ // reference into perm gen - ignore. ++ return; ++ } else if (_from->is_in(obj)) { ++ // Reference still points into the source region. ++ // Since roots are immediately evacuated this means that ++ // we must have self forwarded the object ++ assert(obj->is_forwarded(), ++ err_msg("code roots should be immediately evacuated. " ++ "Ref: "PTR_FORMAT", " ++ "Obj: "PTR_FORMAT", " ++ "Region: "HR_FORMAT, ++ p, (void*) obj, HR_FORMAT_PARAMS(_from))); ++ assert(obj->forwardee() == obj, ++ err_msg("not self forwarded? obj = "PTR_FORMAT, (void*)obj)); ++ ++ // The object has been self forwarded. ++ // Note, if we're during an initial mark pause, there is ++ // no need to explicitly mark object. It will be marked ++ // during the regular evacuation failure handling code. ++ _num_self_forwarded++; ++ } else { ++ // The reference points into a promotion or to-space region ++ HeapRegion* to = _g1h->heap_region_containing(obj); ++ to->rem_set()->add_strong_code_root(_nm); ++ } ++ } ++ } ++ ++public: ++ NMethodMigrationOopClosure(G1CollectedHeap* g1h, HeapRegion* from, nmethod* nm): ++ _g1h(g1h), _from(from), _nm(nm), _num_self_forwarded(0) {} ++ ++ void do_oop(narrowOop* p) { do_oop_work(p); } ++ void do_oop(oop* p) { do_oop_work(p); } ++ ++ uint retain() { return _num_self_forwarded > 0; } ++}; ++ ++void HeapRegionRemSet::migrate_strong_code_roots() { ++ assert(hr()->in_collection_set(), "only collection set regions"); ++ assert(!hr()->isHumongous(), ++ err_msg("humongous region "HR_FORMAT" should not have been added to the collection set", ++ HR_FORMAT_PARAMS(hr()))); ++ ++ ResourceMark rm; ++ ++ // List of code blobs to retain for this region ++ GrowableArray to_be_retained(10); ++ G1CollectedHeap* g1h = G1CollectedHeap::heap(); ++ ++ while (_strong_code_roots_list->is_nonempty()) { ++ nmethod *nm = _strong_code_roots_list->pop(); ++ if (nm != NULL) { ++ NMethodMigrationOopClosure oop_cl(g1h, hr(), nm); ++ nm->oops_do(&oop_cl); ++ if (oop_cl.retain()) { ++ to_be_retained.push(nm); ++ } ++ } ++ } ++ ++ // Now push any code roots we need to retain ++ assert(to_be_retained.is_empty() || hr()->evacuation_failed(), ++ "Retained nmethod list must be empty or " ++ "evacuation of this region failed"); ++ ++ while (to_be_retained.is_nonempty()) { ++ nmethod* nm = to_be_retained.pop(); ++ assert(nm != NULL, "sanity"); ++ add_strong_code_root(nm); ++ } ++} ++ ++void HeapRegionRemSet::strong_code_roots_do(CodeBlobClosure* blk) const { ++ for (int i = 0; i < _strong_code_roots_list->length(); i += 1) { ++ nmethod* nm = _strong_code_roots_list->at(i); ++ blk->do_code_blob(nm); ++ } ++} ++ ++size_t HeapRegionRemSet::strong_code_roots_mem_size() { ++ return sizeof(GrowableArray) + ++ _strong_code_roots_list->max_length() * sizeof(nmethod*); ++} ++ + //-------------------- Iteration -------------------- - //pass on properties set on SchemaFactory - fSecurityPropertyMgr = (XMLSecurityPropertyManager) -@@ -281,7 +281,7 @@ - return FeatureState.is(fUseGrammarPoolOnly); - } - else if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) { -- return FeatureState.is(getProperty(SECURITY_MANAGER) != null); -+ return FeatureState.is(fInitSecurityManager.isSecureProcessing()); - } - else if (SCHEMA_ELEMENT_DEFAULT.equals(featureId)) { - return FeatureState.is(true); //pre-condition: VALIDATION and SCHEMA_VALIDATION are always true -@@ -311,7 +311,8 @@ - if (_isSecureMode && !value) { - throw new XMLConfigurationException(Status.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); - } -- setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); -+ fInitSecurityManager.setSecureProcessing(value); -+ setProperty(SECURITY_MANAGER, fInitSecurityManager); + HeapRegionRemSetIterator:: +--- ./hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -37,6 +37,7 @@ + class HeapRegionRemSetIterator; + class PerRegionTable; + class SparsePRT; ++class nmethod; + + // Essentially a wrapper around SparsePRTCleanupTask. See + // sparsePRT.hpp for more details. +@@ -191,6 +192,10 @@ + G1BlockOffsetSharedArray* _bosa; + G1BlockOffsetSharedArray* bosa() const { return _bosa; } + ++ // A list of code blobs (nmethods) whose code contains pointers into ++ // the region that owns this RSet. ++ GrowableArray* _strong_code_roots_list; ++ + OtherRegionsTable _other_regions; + + enum ParIterState { Unclaimed, Claimed, Complete }; +@@ -285,11 +290,13 @@ + void init_iterator(HeapRegionRemSetIterator* iter) const; + + // The actual # of bytes this hr_remset takes up. ++ // Note also includes the strong code root set. + size_t mem_size() { + return _other_regions.mem_size() + // This correction is necessary because the above includes the second + // part. +- + sizeof(this) - sizeof(OtherRegionsTable); ++ + (sizeof(this) - sizeof(OtherRegionsTable)) ++ + strong_code_roots_mem_size(); + } - if (value && Constants.IS_JDK8_OR_ABOVE) { - fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD, -@@ -390,10 +391,20 @@ - fComponents.put(propertyId, value); - return; - } -- if (!fInitProperties.containsKey(propertyId)) { -- fInitProperties.put(propertyId, super.getProperty(propertyId)); + // Returns the memory occupancy of all static data structures associated +@@ -307,6 +314,37 @@ + bool contains_reference(OopOrNarrowOopStar from) const { + return _other_regions.contains_reference(from); + } + -+ //check if the property is managed by security manager -+ if (fInitSecurityManager == null || -+ !fInitSecurityManager.setLimit(propertyId, XMLSecurityManager.State.APIPROPERTY, value)) { -+ //check if the property is managed by security property manager -+ if (fSecurityPropertyMgr == null || -+ !fSecurityPropertyMgr.setValue(propertyId, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { -+ //fall back to the existing property manager -+ if (!fInitProperties.containsKey(propertyId)) { -+ fInitProperties.put(propertyId, super.getProperty(propertyId)); -+ } -+ super.setProperty(propertyId, value); -+ } - } -- super.setProperty(propertyId, value); - } - - /** ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java 2014-04-20 12:39:46.000000000 -0700 -@@ -20,18 +20,15 @@ ++ // Routines for managing the list of code roots that point into ++ // the heap region that owns this RSet. ++ void add_strong_code_root(nmethod* nm); ++ void remove_strong_code_root(nmethod* nm); ++ ++ // During a collection, migrate the successfully evacuated strong ++ // code roots that referenced into the region that owns this RSet ++ // to the RSets of the new regions that they now point into. ++ // Unsuccessfully evacuated code roots are not migrated. ++ void migrate_strong_code_roots(); ++ ++ // Applies blk->do_code_blob() to each of the entries in ++ // the strong code roots list ++ void strong_code_roots_do(CodeBlobClosure* blk) const; ++ ++ // Returns the number of elements in the strong code roots list ++ int strong_code_roots_list_length() { ++ return _strong_code_roots_list->length(); ++ } ++ ++ // Returns true if the strong code roots contains the given ++ // nmethod. ++ bool strong_code_roots_list_contains(nmethod* nm) { ++ return _strong_code_roots_list->contains(nm); ++ } ++ ++ // Returns the amount of memory, in bytes, currently ++ // consumed by the strong code roots. ++ size_t strong_code_roots_mem_size(); ++ + void print() const; - package com.sun.org.apache.xerces.internal.parsers; + // Called during a stop-world phase to perform any deferred cleanups. +--- ./hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -79,6 +79,10 @@ --import java.io.IOException; --import java.util.Locale; -- - import com.sun.org.apache.xerces.internal.impl.Constants; --import com.sun.org.apache.xerces.internal.util.Status; --import com.sun.org.apache.xerces.internal.xs.PSVIProvider; --import com.sun.org.apache.xerces.internal.util.EntityResolverWrapper; - import com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper; -+import com.sun.org.apache.xerces.internal.util.EntityResolverWrapper; - import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; - import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; -+import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.SymbolHash; - import com.sun.org.apache.xerces.internal.util.XMLSymbols; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.xni.Augmentations; - import com.sun.org.apache.xerces.internal.xni.NamespaceContext; - import com.sun.org.apache.xerces.internal.xni.QName; -@@ -48,15 +45,17 @@ - import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; - import com.sun.org.apache.xerces.internal.xs.AttributePSVI; - import com.sun.org.apache.xerces.internal.xs.ElementPSVI; -+import com.sun.org.apache.xerces.internal.xs.PSVIProvider; -+import java.io.IOException; -+import java.util.Locale; -+import javax.xml.XMLConstants; - import org.xml.sax.AttributeList; --import org.xml.sax.Attributes; - import org.xml.sax.ContentHandler; - import org.xml.sax.DTDHandler; - import org.xml.sax.DocumentHandler; - import org.xml.sax.EntityResolver; - import org.xml.sax.ErrorHandler; - import org.xml.sax.InputSource; --import org.xml.sax.Locator; - import org.xml.sax.Parser; - import org.xml.sax.SAXException; - import org.xml.sax.SAXNotRecognizedException; -@@ -131,6 +130,10 @@ - protected static final String DOM_NODE = - Constants.SAX_PROPERTY_PREFIX + Constants.DOM_NODE_PROPERTY; + void reset() { if (_buf != NULL) _index = _sz; } -+ /** Property id: security manager. */ -+ private static final String SECURITY_MANAGER = -+ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++ void enqueue(volatile void* ptr) { ++ enqueue((void*)(ptr)); ++ } + - /** Recognized properties. */ - private static final String[] RECOGNIZED_PROPERTIES = { - LEXICAL_HANDLER, -@@ -1645,19 +1648,13 @@ - // Drop through and perform default processing - // - } -- -- // -- // Xerces Features -- // -- -- /* -- else if (featureId.startsWith(XERCES_FEATURES_PREFIX)) { -- String feature = featureId.substring(XERCES_FEATURES_PREFIX.length()); -- // -- // Drop through and perform default processing -- // -+ else if (featureId.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { -+ if (state) { -+ if (fConfiguration.getProperty(SECURITY_MANAGER )==null) { -+ fConfiguration.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); -+ } -+ } - } -- */ + // Enqueues the given "obj". + void enqueue(void* ptr) { + if (!_active) return; +--- ./hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -923,7 +923,7 @@ - // - // Default handling ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java 2014-04-20 12:39:46.000000000 -0700 -@@ -29,6 +29,7 @@ - import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; - import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.SymbolTable; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XNIException; - import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; -@@ -531,7 +532,54 @@ - */ - public void setProperty(String propertyId, Object value) - throws SAXNotRecognizedException, SAXNotSupportedException { -+ /** -+ * It's possible for users to set a security manager through the interface. -+ * If it's the old SecurityManager, convert it to the new XMLSecurityManager -+ */ -+ if (propertyId.equals(Constants.SECURITY_MANAGER)) { -+ securityManager = XMLSecurityManager.convert(value, securityManager); -+ setProperty0(Constants.SECURITY_MANAGER, securityManager); -+ return; -+ } -+ if (propertyId.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { -+ if (value == null) { -+ securityPropertyManager = new XMLSecurityPropertyManager(); -+ } else { -+ securityPropertyManager = (XMLSecurityPropertyManager)value; -+ } -+ setProperty0(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); -+ return; -+ } + GenCollectedHeap* gch = GenCollectedHeap::heap(); + +- _gc_timer->register_gc_start(os::elapsed_counter()); ++ _gc_timer->register_gc_start(); + + assert(gch->kind() == CollectedHeap::GenCollectedHeap, + "not a CMS generational heap"); +@@ -1100,7 +1100,7 @@ + gch->trace_heap_after_gc(&gc_tracer); + gc_tracer.report_tenuring_threshold(tenuring_threshold()); + +- _gc_timer->register_gc_end(os::elapsed_counter()); ++ _gc_timer->register_gc_end(); + + gc_tracer.report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions()); + } +--- ./hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -90,14 +90,16 @@ + og_min_size, og_max_size, + yg_min_size, yg_max_size); + +- // The ReservedSpace ctor used below requires that the page size for the perm +- // gen is <= the page size for the rest of the heap (young + old gens). + const size_t og_page_sz = os::page_size_for_region(yg_min_size + og_min_size, + yg_max_size + og_max_size, + 8); +- const size_t pg_page_sz = MIN2(os::page_size_for_region(pg_min_size, +- pg_max_size, 16), +- og_page_sz); ++ ++ // Use the same page size for both perm gen and old gen, ++ // to allow large pages to be allocated when the heap is reserved ++ // for the implementations that can't 'commit' large pages. ++ // NEEDS_CLEANUP. ReservedHeapSpace/ReservedSpace that takes both ++ // a prefix and a suffix alignment can now be removed. ++ const size_t pg_page_sz = og_page_sz; + + const size_t pg_align = set_alignment(_perm_gen_alignment, pg_page_sz); + const size_t og_align = set_alignment(_old_gen_alignment, og_page_sz); +@@ -138,12 +140,9 @@ + total_reserved = add_and_check_overflow(total_reserved, og_max_size); + total_reserved = add_and_check_overflow(total_reserved, yg_max_size); + +- char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop); ++ assert(is_size_aligned(total_reserved, og_align), "Must be"); + +- // The main part of the heap (old gen + young gen) can often use a larger page +- // size than is needed or wanted for the perm gen. Use the "compound +- // alignment" ReservedSpace ctor to avoid having to use the same page size for +- // all gens. ++ char* addr = Universe::preferred_heap_base(total_reserved, og_align, Universe::UnscaledNarrowOop); + + ReservedHeapSpace heap_rs(pg_max_size, pg_align, og_max_size + yg_max_size, + og_align, addr); +@@ -153,12 +152,12 @@ + // Failed to reserve at specified address - the requested memory + // region is taken already, for example, by 'java' launcher. + // Try again to reserver heap higher. +- addr = Universe::preferred_heap_base(total_reserved, Universe::ZeroBasedNarrowOop); ++ addr = Universe::preferred_heap_base(total_reserved, og_align, Universe::ZeroBasedNarrowOop); + ReservedHeapSpace heap_rs0(pg_max_size, pg_align, og_max_size + yg_max_size, + og_align, addr); + if (addr != NULL && !heap_rs0.is_reserved()) { + // Failed to reserve at specified address again - give up. +- addr = Universe::preferred_heap_base(total_reserved, Universe::HeapBasedNarrowOop); ++ addr = Universe::preferred_heap_base(total_reserved, og_align, Universe::HeapBasedNarrowOop); + assert(addr == NULL, ""); + ReservedHeapSpace heap_rs1(pg_max_size, pg_align, og_max_size + yg_max_size, + og_align, addr); +--- ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -24,6 +24,7 @@ + + #include "precompiled.hpp" + #include "gc_implementation/parallelScavenge/generationSizer.hpp" ++#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" + #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp" + #include "gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp" + #include "gc_implementation/parallelScavenge/psScavenge.hpp" +@@ -78,6 +79,38 @@ + _old_gen_policy_is_ready = false; + } + ++size_t PSAdaptiveSizePolicy::calculate_free_based_on_live(size_t live, uintx ratio_as_percentage) { ++ // We want to calculate how much free memory there can be based on the ++ // amount of live data currently in the old gen. Using the formula: ++ // ratio * (free + live) = free ++ // Some equation solving later we get: ++ // free = (live * ratio) / (1 - ratio) + -+ if (securityManager == null) { -+ securityManager = new XMLSecurityManager(true); -+ setProperty0(Constants.SECURITY_MANAGER, securityManager); -+ } ++ const double ratio = ratio_as_percentage / 100.0; ++ const double ratio_inverse = 1.0 - ratio; ++ const double tmp = live * ratio; ++ size_t free = (size_t)(tmp / ratio_inverse); + -+ if (securityPropertyManager == null) { -+ securityPropertyManager = new XMLSecurityPropertyManager(); -+ setProperty0(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); -+ } -+ int index = securityPropertyManager.getIndex(propertyId); ++ return free; ++} + -+ if (index > -1) { -+ /** -+ * this is a direct call to this parser, not a subclass since -+ * internally the support of this property is done through -+ * XMLSecurityPropertyManager -+ */ -+ securityPropertyManager.setValue(index, XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); -+ } else { -+ //check if the property is managed by security manager -+ if (!securityManager.setLimit(propertyId, XMLSecurityManager.State.APIPROPERTY, value)) { -+ //fall back to the default configuration to handle the property -+ setProperty0(propertyId, value); -+ } -+ } -+ } ++size_t PSAdaptiveSizePolicy::calculated_old_free_size_in_bytes() const { ++ size_t free_size = (size_t)(_promo_size + avg_promoted()->padded_average()); ++ size_t live = ParallelScavengeHeap::heap()->old_gen()->used_in_bytes(); ++ ++ if (MinHeapFreeRatio != 0) { ++ size_t min_free = calculate_free_based_on_live(live, MinHeapFreeRatio); ++ free_size = MAX2(free_size, min_free); ++ } ++ ++ if (MaxHeapFreeRatio != 100) { ++ size_t max_free = calculate_free_based_on_live(live, MaxHeapFreeRatio); ++ free_size = MIN2(max_free, free_size); ++ } ++ ++ return free_size; ++} ++ + void PSAdaptiveSizePolicy::major_collection_begin() { + // Update the interval time + _major_timer.stop(); +@@ -1107,3 +1140,18 @@ + st, + PSScavenge::tenuring_threshold()); + } ++ ++#ifndef PRODUCT ++ ++void TestOldFreeSpaceCalculation_test() { ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 20) == 25, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 50) == 100, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 60) == 150, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(100, 75) == 300, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 20) == 100, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 50) == 400, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 60) == 600, "Calculation of free memory failed"); ++ assert(PSAdaptiveSizePolicy::calculate_free_based_on_live(400, 75) == 1200, "Calculation of free memory failed"); ++} ++ ++#endif /* !PRODUCT */ +--- ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -238,7 +238,6 @@ + void major_collection_begin(); + void major_collection_end(size_t amount_live, GCCause::Cause gc_cause); -+ public void setProperty0(String propertyId, Object value) -+ throws SAXNotRecognizedException, SAXNotSupportedException { - try { - fConfiguration.setProperty(propertyId, value); - } ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java 2014-04-20 12:39:46.000000000 -0700 -@@ -38,7 +38,6 @@ - import com.sun.org.apache.xerces.internal.util.PropertyState; - import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.SymbolTable; --import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XMLLocator; - import com.sun.org.apache.xerces.internal.xni.XNIException; - import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; -@@ -189,6 +188,9 @@ - protected static final String XML_SECURITY_PROPERTY_MANAGER = - Constants.XML_SECURITY_PROPERTY_MANAGER; +- // + void tenured_allocation(size_t size) { + _avg_pretenured->sample(size); + } +@@ -246,9 +245,9 @@ + // Accessors + // NEEDS_CLEANUP should use sizes.hpp -+ /** Property identifier: Security manager. */ -+ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; +- size_t calculated_old_free_size_in_bytes() const { +- return (size_t)(_promo_size + avg_promoted()->padded_average()); +- } ++ static size_t calculate_free_based_on_live(size_t live, uintx ratio_as_percentage); + - // debugging ++ size_t calculated_old_free_size_in_bytes() const; - /** Set to true and recompile to print exception stack trace. */ -@@ -334,6 +336,7 @@ - JAXP_SCHEMA_SOURCE, - JAXP_SCHEMA_LANGUAGE, - LOCALE, -+ SECURITY_MANAGER, - XML_SECURITY_PROPERTY_MANAGER - }; - addRecognizedProperties(recognizedProperties); -@@ -411,8 +414,6 @@ - // do nothing - // REVISIT: What is the right thing to do? -Ac - } -- -- setProperty(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); - } // (SymbolTable,XMLGrammarPool) + size_t average_old_live_in_bytes() const { + return (size_t) avg_old_live()->average(); +--- ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -116,7 +116,7 @@ + assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity"); + GCCause::Cause gc_cause = heap->gc_cause(); - // ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java 2014-04-20 12:39:46.000000000 -0700 -@@ -36,7 +36,6 @@ - import com.sun.org.apache.xerces.internal.util.PropertyState; - import com.sun.org.apache.xerces.internal.util.Status; - import com.sun.org.apache.xerces.internal.util.SymbolTable; --import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XMLLocator; - import com.sun.org.apache.xerces.internal.xni.XNIException; - import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; -@@ -162,6 +161,9 @@ - protected static final String XML_SECURITY_PROPERTY_MANAGER = - Constants.XML_SECURITY_PROPERTY_MANAGER; +- _gc_timer->register_gc_start(os::elapsed_counter()); ++ _gc_timer->register_gc_start(); + _gc_tracer->report_gc_start(gc_cause, _gc_timer->gc_start()); -+ /** Property identifier: Security manager. */ -+ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; -+ - // debugging + PSAdaptiveSizePolicy* size_policy = heap->size_policy(); +@@ -149,8 +149,7 @@ - /** Set to true and recompile to print exception stack trace. */ -@@ -316,6 +318,7 @@ - DATATYPE_VALIDATOR_FACTORY, - VALIDATION_MANAGER, - LOCALE, -+ SECURITY_MANAGER, - XML_SECURITY_PROPERTY_MANAGER - }; - addRecognizedProperties(recognizedProperties); -@@ -372,8 +375,6 @@ - // do nothing - // REVISIT: What is the right thing to do? -Ac - } -- -- setProperty(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); - } // (SymbolTable,XMLGrammarPool) + if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyBeforeGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyBeforeGC:"); + } - // ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java 2014-04-20 12:39:46.000000000 -0700 -@@ -22,6 +22,7 @@ + // Verify object start arrays +@@ -359,8 +358,7 @@ - import com.sun.org.apache.xerces.internal.impl.Constants; - import com.sun.org.apache.xerces.internal.util.SymbolTable; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; - import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; -@@ -76,7 +77,7 @@ - XMLGRAMMAR_POOL, - }; + if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyAfterGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyAfterGC:"); + } -- XMLSecurityPropertyManager securityPropertyManager; -+ - // - // Constructors - // -@@ -130,11 +131,36 @@ - */ - public void setProperty(String name, Object value) - throws SAXNotRecognizedException, SAXNotSupportedException { -+ /** -+ * It's possible for users to set a security manager through the interface. -+ * If it's the old SecurityManager, convert it to the new XMLSecurityManager -+ */ -+ if (name.equals(Constants.SECURITY_MANAGER)) { -+ securityManager = XMLSecurityManager.convert(value, securityManager); -+ super.setProperty(Constants.SECURITY_MANAGER, securityManager); -+ return; -+ } -+ if (name.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { -+ if (value == null) { -+ securityPropertyManager = new XMLSecurityPropertyManager(); -+ } else { -+ securityPropertyManager = (XMLSecurityPropertyManager)value; -+ } -+ super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); -+ return; -+ } -+ -+ if (securityManager == null) { -+ securityManager = new XMLSecurityManager(true); -+ super.setProperty(Constants.SECURITY_MANAGER, securityManager); -+ } -+ - if (securityPropertyManager == null) { - securityPropertyManager = new XMLSecurityPropertyManager(); -+ super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); - } -- int index = securityPropertyManager.getIndex(name); + // Re-verify object start arrays +@@ -386,7 +384,7 @@ + ParallelTaskTerminator::print_termination_counts(); + #endif -+ int index = securityPropertyManager.getIndex(name); - if (index > -1) { - /** - * this is a direct call to this parser, not a subclass since -@@ -142,9 +168,12 @@ - * XMLSecurityPropertyManager - */ - securityPropertyManager.setValue(index, XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); -- super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); - } else { -- super.setProperty(name, value); -+ //check if the property is managed by security manager -+ if (!securityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { -+ //fall back to the default configuration to handle the property -+ super.setProperty(name, value); -+ } - } - } - } // class SAXParser ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java 2014-04-20 12:39:46.000000000 -0700 -@@ -23,8 +23,8 @@ - import com.sun.org.apache.xerces.internal.impl.Constants; - import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; - import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.SymbolTable; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; +- _gc_timer->register_gc_end(os::elapsed_counter()); ++ _gc_timer->register_gc_end(); - /** - * This configuration allows Xerces to behave in a security-conscious manner; that is, -@@ -44,6 +44,7 @@ - * - * @author Neil Graham, IBM - * -+ * @version $Id: SecurityConfiguration.java,v 1.6 2010-11-01 04:40:09 joehw Exp $ - */ - public class SecurityConfiguration extends XIncludeAwareParserConfiguration - { -@@ -107,7 +108,7 @@ - super(symbolTable, grammarPool, parentSettings); + _gc_tracer->report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions()); - // create the SecurityManager property: -- setProperty(SECURITY_MANAGER_PROPERTY, new SecurityManager()); -+ setProperty(SECURITY_MANAGER_PROPERTY, new XMLSecurityManager(true)); - } // (SymbolTable,XMLGrammarPool) +--- ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1034,8 +1034,7 @@ - } // class SecurityConfiguration ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java 2014-04-20 12:39:46.000000000 -0700 -@@ -52,6 +52,7 @@ - import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; - import com.sun.org.apache.xerces.internal.util.PropertyState; - import com.sun.org.apache.xerces.internal.util.SymbolTable; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler; - import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler; -@@ -279,6 +280,8 @@ - private static final String XML_SECURITY_PROPERTY_MANAGER = - Constants.XML_SECURITY_PROPERTY_MANAGER; + if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyBeforeGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyBeforeGC:"); + } -+ /** Property identifier: Security manager. */ -+ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; + // Verify object start arrays +@@ -2041,7 +2040,7 @@ - // debugging + ParallelScavengeHeap* heap = gc_heap(); -@@ -289,33 +292,33 @@ - // Data - // +- _gc_timer.register_gc_start(os::elapsed_counter()); ++ _gc_timer.register_gc_start(); + _gc_tracer.report_gc_start(heap->gc_cause(), _gc_timer.gc_start()); -- protected SymbolTable fSymbolTable; -+ protected SymbolTable fSymbolTable; - protected XMLInputSource fInputSource; - protected ValidationManager fValidationManager; -- protected XMLVersionDetector fVersionDetector; -+ protected XMLVersionDetector fVersionDetector; - protected XMLLocator fLocator; -- protected Locale fLocale; -+ protected Locale fLocale; + TimeStamp marking_start; +@@ -2248,8 +2247,7 @@ -- /** XML 1.0 Components. */ -- protected ArrayList fComponents; -+ /** XML 1.0 Components. */ -+ protected ArrayList fComponents; + if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyAfterGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyAfterGC:"); + } -- /** XML 1.1. Components. */ -- protected ArrayList fXML11Components = null; -+ /** XML 1.1. Components. */ -+ protected ArrayList fXML11Components = null; + // Re-verify object start arrays +@@ -2285,7 +2283,7 @@ + ParallelTaskTerminator::print_termination_counts(); + #endif -- /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */ -- protected ArrayList fCommonComponents = null; -+ /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */ -+ protected ArrayList fCommonComponents = null; +- _gc_timer.register_gc_end(os::elapsed_counter()); ++ _gc_timer.register_gc_end(); -- /** The document handler. */ -- protected XMLDocumentHandler fDocumentHandler; -+ /** The document handler. */ -+ protected XMLDocumentHandler fDocumentHandler; + _gc_tracer.report_dense_prefix(dense_prefix(old_space_id)); + _gc_tracer.report_gc_end(_gc_timer.gc_end(), _gc_timer.time_partitions()); +--- ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2013-09-06 11:22:11.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -266,7 +266,7 @@ + assert(_preserved_mark_stack.is_empty(), "should be empty"); + assert(_preserved_oop_stack.is_empty(), "should be empty"); -- /** The DTD handler. */ -- protected XMLDTDHandler fDTDHandler; -+ /** The DTD handler. */ -+ protected XMLDTDHandler fDTDHandler; +- _gc_timer.register_gc_start(os::elapsed_counter()); ++ _gc_timer.register_gc_start(); -- /** The DTD content model handler. */ -- protected XMLDTDContentModelHandler fDTDContentModelHandler; -+ /** The DTD content model handler. */ -+ protected XMLDTDContentModelHandler fDTDContentModelHandler; + TimeStamp scavenge_entry; + TimeStamp scavenge_midpoint; +@@ -325,8 +325,7 @@ -- /** Last component in the document pipeline */ -- protected XMLDocumentSource fLastComponent; -+ /** Last component in the document pipeline */ -+ protected XMLDocumentSource fLastComponent; + if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyBeforeGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyBeforeGC:"); + } - /** - * True if a parse is in progress. This state is needed because -@@ -495,31 +498,31 @@ - fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE); - fFeatures.put(NORMALIZE_DATA, Boolean.TRUE); - fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE); -- fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE); -- fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE); -- fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE); -- fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE); -- fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE); -- fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE); -+ fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE); -+ fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE); -+ fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE); -+ fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE); -+ fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE); -+ fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE); - fFeatures.put(PARSER_SETTINGS, Boolean.TRUE); - fFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); + { +@@ -536,8 +535,19 @@ + counters->update_survivor_overflowed(_survivor_overflow); + } - // add default recognized properties - final String[] recognizedProperties = - { -- SYMBOL_TABLE, -- ERROR_HANDLER, -- ENTITY_RESOLVER, -+ SYMBOL_TABLE, -+ ERROR_HANDLER, -+ ENTITY_RESOLVER, - ERROR_REPORTER, - ENTITY_MANAGER, - DOCUMENT_SCANNER, - DTD_SCANNER, - DTD_PROCESSOR, - DTD_VALIDATOR, -- DATATYPE_VALIDATOR_FACTORY, -- VALIDATION_MANAGER, -- SCHEMA_VALIDATOR, -- XML_STRING, -+ DATATYPE_VALIDATOR_FACTORY, -+ VALIDATION_MANAGER, -+ SCHEMA_VALIDATOR, -+ XML_STRING, - XMLGRAMMAR_POOL, - JAXP_SCHEMA_SOURCE, - JAXP_SCHEMA_LANGUAGE, -@@ -531,19 +534,20 @@ - SCHEMA_NONS_LOCATION, - LOCALE, - SCHEMA_DV_FACTORY, -+ SECURITY_MANAGER, - XML_SECURITY_PROPERTY_MANAGER - }; - addRecognizedProperties(recognizedProperties); ++ size_t max_young_size = young_gen->max_size(); ++ ++ // Deciding a free ratio in the young generation is tricky, so if ++ // MinHeapFreeRatio or MaxHeapFreeRatio are in use (implicating ++ // that the old generation size may have been limited because of them) we ++ // should then limit our young generation size using NewRatio to have it ++ // follow the old generation size. ++ if (MinHeapFreeRatio != 0 || MaxHeapFreeRatio != 100) { ++ max_young_size = MIN2(old_gen->capacity_in_bytes() / NewRatio, young_gen->max_size()); ++ } ++ + size_t survivor_limit = +- size_policy->max_survivor_size(young_gen->max_size()); ++ size_policy->max_survivor_size(max_young_size); + _tenuring_threshold = + size_policy->compute_survivor_space_size_and_threshold( + _survivor_overflow, +@@ -560,8 +570,7 @@ + // Do call at minor collections? + // Don't check if the size_policy is ready at this + // level. Let the size_policy check that internally. +- if (UseAdaptiveSizePolicy && +- UseAdaptiveGenerationSizePolicyAtMinorCollection && ++ if (UseAdaptiveGenerationSizePolicyAtMinorCollection && + ((gc_cause != GCCause::_java_lang_system_gc) || + UseAdaptiveSizePolicyWithSystemGC)) { + +@@ -570,7 +579,7 @@ + young_gen->from_space()->capacity_in_bytes() + + young_gen->to_space()->capacity_in_bytes(), + "Sizes of space in young gen are out-of-bounds"); +- size_t max_eden_size = young_gen->max_size() - ++ size_t max_eden_size = max_young_size - + young_gen->from_space()->capacity_in_bytes() - + young_gen->to_space()->capacity_in_bytes(); + size_policy->compute_generation_free_space(young_gen->used_in_bytes(), +@@ -661,8 +670,7 @@ + + if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyAfterGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyAfterGC:"); + } -- if (symbolTable == null) { -- symbolTable = new SymbolTable(); -- } -- fSymbolTable = symbolTable; -- fProperties.put(SYMBOL_TABLE, fSymbolTable); -+ if (symbolTable == null) { -+ symbolTable = new SymbolTable(); -+ } -+ fSymbolTable = symbolTable; -+ fProperties.put(SYMBOL_TABLE, fSymbolTable); + heap->print_heap_after_gc(); +@@ -689,7 +697,7 @@ + #endif - fGrammarPool = grammarPool; - if (fGrammarPool != null) { -- fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); -+ fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); - } - fEntityManager = new XMLEntityManager(); -@@ -579,8 +583,6 @@ +- _gc_timer.register_gc_end(os::elapsed_counter()); ++ _gc_timer.register_gc_end(); - fVersionDetector = new XMLVersionDetector(); + _gc_tracer.report_gc_end(_gc_timer.gc_end(), _gc_timer.time_partitions()); + +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTimer.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTimer.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,52 +25,55 @@ + #include "precompiled.hpp" + #include "gc_implementation/shared/gcTimer.hpp" + #include "utilities/growableArray.hpp" ++#include "utilities/ticks.inline.hpp" + +-void GCTimer::register_gc_start(jlong time) { ++// the "time" parameter for most functions ++// has a default value set by Ticks::now() ++ ++void GCTimer::register_gc_start(const Ticks& time) { + _time_partitions.clear(); + _gc_start = time; + } + +-void GCTimer::register_gc_end(jlong time) { ++void GCTimer::register_gc_end(const Ticks& time) { + assert(!_time_partitions.has_active_phases(), + "We should have ended all started phases, before ending the GC"); + + _gc_end = time; + } + +-void GCTimer::register_gc_pause_start(const char* name, jlong time) { ++void GCTimer::register_gc_pause_start(const char* name, const Ticks& time) { + _time_partitions.report_gc_phase_start(name, time); + } + +-void GCTimer::register_gc_pause_end(jlong time) { ++void GCTimer::register_gc_pause_end(const Ticks& time) { + _time_partitions.report_gc_phase_end(time); + } + +-void GCTimer::register_gc_phase_start(const char* name, jlong time) { ++void GCTimer::register_gc_phase_start(const char* name, const Ticks& time) { + _time_partitions.report_gc_phase_start(name, time); + } + +-void GCTimer::register_gc_phase_end(jlong time) { ++void GCTimer::register_gc_phase_end(const Ticks& time) { + _time_partitions.report_gc_phase_end(time); + } -- fProperties.put(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); - - // add message formatters - if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) { - XMLMessageFormatter xmft = new XMLMessageFormatter(); ---- jaxp/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java 2014-04-20 12:39:46.000000000 -0700 -@@ -23,6 +23,8 @@ - import java.io.IOException; +-void STWGCTimer::register_gc_start(jlong time) { ++void STWGCTimer::register_gc_start(const Ticks& time) { + GCTimer::register_gc_start(time); + register_gc_pause_start("GC Pause", time); + } - import com.sun.org.apache.xerces.internal.impl.Constants; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; - import com.sun.org.apache.xerces.internal.xni.XNIException; - import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; - import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; -@@ -78,6 +80,13 @@ - /** The parser configuration. */ - protected XMLParserConfiguration fConfiguration; +-void STWGCTimer::register_gc_end(jlong time) { ++void STWGCTimer::register_gc_end(const Ticks& time) { + register_gc_pause_end(time); + GCTimer::register_gc_end(time); + } -+ /** The XML Security Manager. */ -+ XMLSecurityManager securityManager; +-void ConcurrentGCTimer::register_gc_pause_start(const char* name, jlong time) { +- GCTimer::register_gc_pause_start(name, time); ++void ConcurrentGCTimer::register_gc_pause_start(const char* name) { ++ GCTimer::register_gc_pause_start(name); + } + +-void ConcurrentGCTimer::register_gc_pause_end(jlong time) { +- GCTimer::register_gc_pause_end(time); ++void ConcurrentGCTimer::register_gc_pause_end() { ++ GCTimer::register_gc_pause_end(); + } + + void PhasesStack::clear() { +@@ -111,11 +114,11 @@ + void TimePartitions::clear() { + _phases->clear(); + _active_phases.clear(); +- _sum_of_pauses = 0; +- _longest_pause = 0; ++ _sum_of_pauses = Tickspan(); ++ _longest_pause = Tickspan(); + } + +-void TimePartitions::report_gc_phase_start(const char* name, jlong time) { ++void TimePartitions::report_gc_phase_start(const char* name, const Ticks& time) { + assert(_phases->length() <= 1000, "Too many recored phases?"); + + int level = _active_phases.count(); +@@ -133,13 +136,13 @@ + void TimePartitions::update_statistics(GCPhase* phase) { + // FIXME: This should only be done for pause phases + if (phase->level() == 0) { +- jlong pause = phase->end() - phase->start(); ++ const Tickspan pause = phase->end() - phase->start(); + _sum_of_pauses += pause; + _longest_pause = MAX2(pause, _longest_pause); + } + } + +-void TimePartitions::report_gc_phase_end(jlong time) { ++void TimePartitions::report_gc_phase_end(const Ticks& time) { + int phase_index = _active_phases.pop(); + GCPhase* phase = _phases->adr_at(phase_index); + phase->set_end(time); +@@ -157,14 +160,6 @@ + return _phases->adr_at(index); + } + +-jlong TimePartitions::sum_of_pauses() { +- return _sum_of_pauses; +-} +- +-jlong TimePartitions::longest_pause() { +- return _longest_pause; +-} +- + bool TimePartitions::has_active_phases() { + return _active_phases.count() > 0; + } +@@ -194,7 +189,7 @@ + max_nested_pause_phases(); + } + +- static void validate_pause_phase(GCPhase* phase, int level, const char* name, jlong start, jlong end) { ++ static void validate_pause_phase(GCPhase* phase, int level, const char* name, const Ticks& start, const Ticks& end) { + assert(phase->level() == level, "Incorrect level"); + assert(strcmp(phase->name(), name) == 0, "Incorrect name"); + assert(phase->start() == start, "Incorrect start"); +@@ -209,8 +204,8 @@ + TimePartitionPhasesIterator iter(&time_partitions); + + validate_pause_phase(iter.next(), 0, "PausePhase", 2, 8); +- assert(time_partitions.sum_of_pauses() == 8-2, "Incorrect"); +- assert(time_partitions.longest_pause() == 8-2, "Incorrect"); ++ assert(time_partitions.sum_of_pauses() == Ticks(8) - Ticks(2), "Incorrect"); ++ assert(time_partitions.longest_pause() == Ticks(8) - Ticks(2), "Incorrect"); + + assert(!iter.has_next(), "Too many elements"); + } +@@ -227,8 +222,8 @@ + validate_pause_phase(iter.next(), 0, "PausePhase1", 2, 3); + validate_pause_phase(iter.next(), 0, "PausePhase2", 4, 6); + +- assert(time_partitions.sum_of_pauses() == 3, "Incorrect"); +- assert(time_partitions.longest_pause() == 2, "Incorrect"); ++ assert(time_partitions.sum_of_pauses() == Ticks(3) - Ticks(0), "Incorrect"); ++ assert(time_partitions.longest_pause() == Ticks(2) - Ticks(0), "Incorrect"); + + assert(!iter.has_next(), "Too many elements"); + } +@@ -245,8 +240,8 @@ + validate_pause_phase(iter.next(), 0, "PausePhase", 2, 5); + validate_pause_phase(iter.next(), 1, "SubPhase", 3, 4); + +- assert(time_partitions.sum_of_pauses() == 3, "Incorrect"); +- assert(time_partitions.longest_pause() == 3, "Incorrect"); ++ assert(time_partitions.sum_of_pauses() == Ticks(3) - Ticks(0), "Incorrect"); ++ assert(time_partitions.longest_pause() == Ticks(3) - Ticks(0), "Incorrect"); + + assert(!iter.has_next(), "Too many elements"); + } +@@ -269,8 +264,8 @@ + validate_pause_phase(iter.next(), 2, "SubPhase2", 4, 7); + validate_pause_phase(iter.next(), 3, "SubPhase3", 5, 6); + +- assert(time_partitions.sum_of_pauses() == 7, "Incorrect"); +- assert(time_partitions.longest_pause() == 7, "Incorrect"); ++ assert(time_partitions.sum_of_pauses() == Ticks(7) - Ticks(0), "Incorrect"); ++ assert(time_partitions.longest_pause() == Ticks(7) - Ticks(0), "Incorrect"); + + assert(!iter.has_next(), "Too many elements"); + } +@@ -298,8 +293,8 @@ + validate_pause_phase(iter.next(), 1, "SubPhase3", 7, 8); + validate_pause_phase(iter.next(), 1, "SubPhase4", 9, 10); + +- assert(time_partitions.sum_of_pauses() == 9, "Incorrect"); +- assert(time_partitions.longest_pause() == 9, "Incorrect"); ++ assert(time_partitions.sum_of_pauses() == Ticks(9) - Ticks(0), "Incorrect"); ++ assert(time_partitions.longest_pause() == Ticks(9) - Ticks(0), "Incorrect"); + + assert(!iter.has_next(), "Too many elements"); + } +@@ -336,8 +331,8 @@ + validate_pause_phase(iter.next(), 2, "SubPhase22", 12, 13); + validate_pause_phase(iter.next(), 1, "SubPhase3", 15, 16); + +- assert(time_partitions.sum_of_pauses() == 15, "Incorrect"); +- assert(time_partitions.longest_pause() == 15, "Incorrect"); ++ assert(time_partitions.sum_of_pauses() == Ticks(15) - Ticks(0), "Incorrect"); ++ assert(time_partitions.longest_pause() == Ticks(15) - Ticks(0), "Incorrect"); + + assert(!iter.has_next(), "Too many elements"); + } +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTimer.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTimer.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -28,6 +28,7 @@ + #include "memory/allocation.hpp" + #include "prims/jni_md.h" + #include "utilities/macros.hpp" ++#include "utilities/ticks.hpp" + + class ConcurrentPhase; + class GCPhase; +@@ -45,21 +46,21 @@ + class GCPhase { + const char* _name; + int _level; +- jlong _start; +- jlong _end; ++ Ticks _start; ++ Ticks _end; + + public: + void set_name(const char* name) { _name = name; } +- const char* name() { return _name; } ++ const char* name() const { return _name; } + +- int level() { return _level; } ++ int level() const { return _level; } + void set_level(int level) { _level = level; } + +- jlong start() { return _start; } +- void set_start(jlong time) { _start = time; } ++ const Ticks start() const { return _start; } ++ void set_start(const Ticks& time) { _start = time; } + +- jlong end() { return _end; } +- void set_end(jlong time) { _end = time; } ++ const Ticks end() const { return _end; } ++ void set_end(const Ticks& time) { _end = time; } + + virtual void accept(PhaseVisitor* visitor) = 0; + }; +@@ -102,22 +103,22 @@ + GrowableArray* _phases; + PhasesStack _active_phases; + +- jlong _sum_of_pauses; +- jlong _longest_pause; ++ Tickspan _sum_of_pauses; ++ Tickspan _longest_pause; + + public: + TimePartitions(); + ~TimePartitions(); + void clear(); + +- void report_gc_phase_start(const char* name, jlong time); +- void report_gc_phase_end(jlong time); ++ void report_gc_phase_start(const char* name, const Ticks& time); ++ void report_gc_phase_end(const Ticks& time); + + int num_phases() const; + GCPhase* phase_at(int index) const; + +- jlong sum_of_pauses(); +- jlong longest_pause(); ++ const Tickspan sum_of_pauses() const { return _sum_of_pauses; } ++ const Tickspan longest_pause() const { return _longest_pause; } + + bool has_active_phases(); + private: +@@ -133,40 +134,37 @@ + class GCTimer : public ResourceObj { + NOT_PRODUCT(friend class GCTimerTest;) + protected: +- jlong _gc_start; +- jlong _gc_end; ++ Ticks _gc_start; ++ Ticks _gc_end; + TimePartitions _time_partitions; + + public: +- virtual void register_gc_start(jlong time); +- virtual void register_gc_end(jlong time); ++ virtual void register_gc_start(const Ticks& time = Ticks::now()); ++ virtual void register_gc_end(const Ticks& time = Ticks::now()); + +- void register_gc_phase_start(const char* name, jlong time); +- void register_gc_phase_end(jlong time); ++ void register_gc_phase_start(const char* name, const Ticks& time); ++ void register_gc_phase_end(const Ticks& time); + +- jlong gc_start() { return _gc_start; } +- jlong gc_end() { return _gc_end; } ++ const Ticks gc_start() const { return _gc_start; } ++ const Ticks gc_end() const { return _gc_end; } + + TimePartitions* time_partitions() { return &_time_partitions; } + +- long longest_pause(); +- long sum_of_pauses(); +- + protected: +- void register_gc_pause_start(const char* name, jlong time); +- void register_gc_pause_end(jlong time); ++ void register_gc_pause_start(const char* name, const Ticks& time = Ticks::now()); ++ void register_gc_pause_end(const Ticks& time = Ticks::now()); + }; + + class STWGCTimer : public GCTimer { + public: +- virtual void register_gc_start(jlong time); +- virtual void register_gc_end(jlong time); ++ virtual void register_gc_start(const Ticks& time = Ticks::now()); ++ virtual void register_gc_end(const Ticks& time = Ticks::now()); + }; + + class ConcurrentGCTimer : public GCTimer { + public: +- void register_gc_pause_start(const char* name, jlong time); +- void register_gc_pause_end(jlong time); ++ void register_gc_pause_start(const char* name); ++ void register_gc_pause_end(); + }; + + class TimePartitionPhasesIterator { +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTrace.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTrace.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -33,6 +33,7 @@ + #include "memory/referenceProcessorStats.hpp" + #include "runtime/os.hpp" + #include "utilities/globalDefinitions.hpp" ++#include "utilities/ticks.inline.hpp" + + #ifndef SERIALGC + #include "gc_implementation/g1/evacuationInfo.hpp" +@@ -46,7 +47,7 @@ + return GCTracer_next_gc_id++; + } + +-void GCTracer::report_gc_start_impl(GCCause::Cause cause, jlong timestamp) { ++void GCTracer::report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp) { + assert_unset_gc_id(); + + GCId gc_id = create_new_gc_id(); +@@ -55,7 +56,7 @@ + _shared_gc_info.set_start_timestamp(timestamp); + } + +-void GCTracer::report_gc_start(GCCause::Cause cause, jlong timestamp) { ++void GCTracer::report_gc_start(GCCause::Cause cause, const Ticks& timestamp) { + assert_unset_gc_id(); + + report_gc_start_impl(cause, timestamp); +@@ -65,7 +66,7 @@ + return _shared_gc_info.id() != SharedGCInfo::UNSET_GCID; + } + +-void GCTracer::report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions) { ++void GCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) { + assert_set_gc_id(); + + _shared_gc_info.set_sum_of_pauses(time_partitions->sum_of_pauses()); +@@ -76,7 +77,7 @@ + send_garbage_collection_event(); + } + +-void GCTracer::report_gc_end(jlong timestamp, TimePartitions* time_partitions) { ++void GCTracer::report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions) { + assert_set_gc_id(); + + report_gc_end_impl(timestamp, time_partitions); +@@ -97,10 +98,10 @@ + const GCId _gc_id; + const double _size_threshold_percentage; + const size_t _total_size_in_words; +- const jlong _timestamp; ++ const Ticks _timestamp; + + public: +- ObjectCountEventSenderClosure(GCId gc_id, size_t total_size_in_words, jlong timestamp) : ++ ObjectCountEventSenderClosure(GCId gc_id, size_t total_size_in_words, const Ticks& timestamp) : + _gc_id(gc_id), + _size_threshold_percentage(ObjectCountCutOffPercent / 100), + _total_size_in_words(total_size_in_words), +@@ -154,8 +155,7 @@ + ObjectCountFilter object_filter(is_alive_cl); + HeapInspection::populate_table(&cit, false, &object_filter); + +- jlong timestamp = os::elapsed_counter(); +- ObjectCountEventSenderClosure event_sender(_shared_gc_info.id(), cit.size_of_instances_in_words(), timestamp); ++ ObjectCountEventSenderClosure event_sender(_shared_gc_info.id(), cit.size_of_instances_in_words(), Ticks::now()); + cit.iterate(&event_sender); + } + } +@@ -168,7 +168,7 @@ + send_perm_gen_summary_event(when, perm_gen_summary); + } + +-void YoungGCTracer::report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions) { ++void YoungGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) { + assert_set_gc_id(); + assert(_tenuring_threshold != UNSET_TENURING_THRESHOLD, "Tenuring threshold has not been reported"); + +@@ -188,14 +188,14 @@ + _tenuring_threshold = tenuring_threshold; + } + +-void OldGCTracer::report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions) { ++void OldGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) { + assert_set_gc_id(); + + GCTracer::report_gc_end_impl(timestamp, time_partitions); + send_old_gc_event(); + } + +-void ParallelOldTracer::report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions) { ++void ParallelOldTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) { + assert_set_gc_id(); + + OldGCTracer::report_gc_end_impl(timestamp, time_partitions); +@@ -221,7 +221,7 @@ + _g1_young_gc_info.set_type(type); + } + +-void G1NewTracer::report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions) { ++void G1NewTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) { + assert_set_gc_id(); + + YoungGCTracer::report_gc_end_impl(timestamp, time_partitions); +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTrace.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTrace.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -34,6 +34,7 @@ + #ifndef SERIALGC + #include "gc_implementation/g1/g1YCTypes.hpp" + #endif ++#include "utilities/ticks.hpp" + + typedef uint GCId; + +@@ -46,8 +47,6 @@ + class BoolObjectClosure; + + class SharedGCInfo VALUE_OBJ_CLASS_SPEC { +- static const jlong UNSET_TIMESTAMP = -1; +- + public: + static const GCId UNSET_GCID = (GCId)-1; + +@@ -55,23 +54,30 @@ + GCId _id; + GCName _name; + GCCause::Cause _cause; +- jlong _start_timestamp; +- jlong _end_timestamp; +- jlong _sum_of_pauses; +- jlong _longest_pause; ++ Ticks _start_timestamp; ++ Ticks _end_timestamp; ++ Tickspan _sum_of_pauses; ++ Tickspan _longest_pause; + + public: +- SharedGCInfo(GCName name) : _id(UNSET_GCID), _name(name), _cause(GCCause::_last_gc_cause), +- _start_timestamp(UNSET_TIMESTAMP), _end_timestamp(UNSET_TIMESTAMP), _sum_of_pauses(0), _longest_pause(0) {} ++ SharedGCInfo(GCName name) : ++ _id(UNSET_GCID), ++ _name(name), ++ _cause(GCCause::_last_gc_cause), ++ _start_timestamp(), ++ _end_timestamp(), ++ _sum_of_pauses(), ++ _longest_pause() { ++ } + + void set_id(GCId id) { _id = id; } + GCId id() const { return _id; } + +- void set_start_timestamp(jlong timestamp) { _start_timestamp = timestamp; } +- jlong start_timestamp() const { return _start_timestamp; } ++ void set_start_timestamp(const Ticks& timestamp) { _start_timestamp = timestamp; } ++ const Ticks start_timestamp() const { return _start_timestamp; } + +- void set_end_timestamp(jlong timestamp) { _end_timestamp = timestamp; } +- jlong end_timestamp() const { return _end_timestamp; } ++ void set_end_timestamp(const Ticks& timestamp) { _end_timestamp = timestamp; } ++ const Ticks end_timestamp() const { return _end_timestamp; } + + void set_name(GCName name) { _name = name; } + GCName name() const { return _name; } +@@ -79,11 +85,11 @@ + void set_cause(GCCause::Cause cause) { _cause = cause; } + GCCause::Cause cause() const { return _cause; } + +- void set_sum_of_pauses(jlong duration) { _sum_of_pauses = duration; } +- jlong sum_of_pauses() const { return _sum_of_pauses; } ++ void set_sum_of_pauses(const Tickspan& duration) { _sum_of_pauses = duration; } ++ const Tickspan sum_of_pauses() const { return _sum_of_pauses; } + +- void set_longest_pause(jlong duration) { _longest_pause = duration; } +- jlong longest_pause() const { return _longest_pause; } ++ void set_longest_pause(const Tickspan& duration) { _longest_pause = duration; } ++ const Tickspan longest_pause() const { return _longest_pause; } + }; + + class ParallelOldGCInfo VALUE_OBJ_CLASS_SPEC { +@@ -115,8 +121,8 @@ + SharedGCInfo _shared_gc_info; + + public: +- void report_gc_start(GCCause::Cause cause, jlong timestamp); +- void report_gc_end(jlong timestamp, TimePartitions* time_partitions); ++ void report_gc_start(GCCause::Cause cause, const Ticks& timestamp); ++ void report_gc_end(const Ticks& timestamp, TimePartitions* time_partitions); + void report_gc_heap_summary(GCWhen::Type when, const GCHeapSummary& heap_summary, const PermGenSummary& perm_gen_summary) const; + void report_gc_reference_stats(const ReferenceProcessorStats& rp) const; + void report_object_count_after_gc(BoolObjectClosure* object_filter); +@@ -125,8 +131,8 @@ + + protected: + GCTracer(GCName name) : _shared_gc_info(name) {} +- virtual void report_gc_start_impl(GCCause::Cause cause, jlong timestamp); +- virtual void report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions); ++ virtual void report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp); ++ virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); + + private: + void send_garbage_collection_event() const; +@@ -143,7 +149,7 @@ + + protected: + YoungGCTracer(GCName name) : GCTracer(name), _tenuring_threshold(UNSET_TENURING_THRESHOLD) {} +- virtual void report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions); ++ virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); + + public: + void report_promotion_failed(const PromotionFailedInfo& pf_info); +@@ -157,7 +163,7 @@ + class OldGCTracer : public GCTracer { + protected: + OldGCTracer(GCName name) : GCTracer(name) {} +- virtual void report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions); ++ virtual void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); + + public: + void report_concurrent_mode_failure(); +@@ -175,7 +181,7 @@ + void report_dense_prefix(void* dense_prefix); + + protected: +- void report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions); ++ void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); + + private: + void send_parallel_old_event() const; +@@ -209,7 +215,7 @@ + G1NewTracer() : YoungGCTracer(G1New) {} + + void report_yc_type(G1YCType type); +- void report_gc_end_impl(jlong timestamp, TimePartitions* time_partitions); ++ void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions); + void report_evacuation_info(EvacuationInfo* info); + void report_evacuation_failed(EvacuationFailedInfo& ef_info); + +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -28,8 +28,10 @@ + #include "gc_implementation/shared/gcTrace.hpp" + #include "gc_implementation/shared/gcWhen.hpp" + #include "gc_implementation/shared/copyFailedInfo.hpp" ++#include "runtime/os.hpp" + #include "trace/traceBackend.hpp" + #include "trace/tracing.hpp" ++ + #ifndef SERIALGC + #include "gc_implementation/g1/evacuationInfo.hpp" + #include "gc_implementation/g1/g1YCTypes.hpp" +@@ -109,7 +111,7 @@ + if (e.should_commit()) { + e.set_gcId(_shared_gc_info.id()); + e.set_data(to_trace_struct(pf_info)); +- e.set_thread(pf_info.thread()->thread_id()); ++ e.set_thread((uint64_t) pf_info.thread()->thread_id()); + e.commit(); + } + } +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,11 +43,13 @@ + # include "thread_bsd.inline.hpp" + #endif + ++#include "utilities/ticks.inline.hpp" + -+ /** The XML Security Property Manager. */ -+ XMLSecurityPropertyManager securityPropertyManager; + + GCTraceTime::GCTraceTime(const char* title, bool doit, bool print_cr, GCTimer* timer) : +- _title(title), _doit(doit), _print_cr(print_cr), _timer(timer) { ++ _title(title), _doit(doit), _print_cr(print_cr), _timer(timer), _start_counter() { + if (_doit || _timer != NULL) { +- _start_counter = os::elapsed_counter(); ++ _start_counter.stamp(); + } + + if (_timer != NULL) { +@@ -66,10 +68,10 @@ + } + + GCTraceTime::~GCTraceTime() { +- jlong stop_counter = 0; ++ Ticks stop_counter; + + if (_doit || _timer != NULL) { +- stop_counter = os::elapsed_counter(); ++ stop_counter.stamp(); + } + + if (_timer != NULL) { +@@ -77,11 +79,12 @@ + } + + if (_doit) { +- double seconds = TimeHelper::counter_to_seconds(stop_counter - _start_counter); ++ const Tickspan duration = stop_counter - _start_counter; ++ double duration_in_seconds = TicksToTimeHelper::seconds(duration); + if (_print_cr) { +- gclog_or_tty->print_cr(", %3.7f secs]", seconds); ++ gclog_or_tty->print_cr(", %3.7f secs]", duration_in_seconds); + } else { +- gclog_or_tty->print(", %3.7f secs]", seconds); ++ gclog_or_tty->print(", %3.7f secs]", duration_in_seconds); + } + gclog_or_tty->flush(); + } +--- ./hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/gcTraceTime.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -26,6 +26,7 @@ + #define SHARE_VM_GC_IMPLEMENTATION_SHARED_GCTRACETIME_HPP + + #include "prims/jni_md.h" ++#include "utilities/ticks.hpp" + + class GCTimer; + +@@ -34,7 +35,7 @@ + bool _doit; + bool _print_cr; + GCTimer* _timer; +- jlong _start_counter; ++ Ticks _start_counter; + + public: + GCTraceTime(const char* title, bool doit, bool print_cr, GCTimer* timer); +--- ./hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -28,8 +28,10 @@ + #include "memory/heapInspection.hpp" + #include "trace/tracing.hpp" + #include "utilities/globalDefinitions.hpp" ++#include "utilities/ticks.hpp" + +-void ObjectCountEventSender::send(const KlassInfoEntry* entry, GCId gc_id, jlong timestamp) { ++void ObjectCountEventSender::send(const KlassInfoEntry* entry, GCId gc_id, const Ticks& timestamp) { ++#if INCLUDE_TRACE + assert(Tracing::is_event_enabled(EventObjectCountAfterGC::eventId), + "Only call this method if the event is enabled"); + +@@ -40,6 +42,8 @@ + event.set_totalSize(entry->words() * BytesPerWord); + event.set_endtime(timestamp); + event.commit(); ++ ++#endif + } + + bool ObjectCountEventSender::should_send_event() { +--- ./hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_implementation/shared/objectCountEventSender.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -29,10 +29,11 @@ + #include "memory/allocation.hpp" + + class KlassInfoEntry; ++class Ticks; + + class ObjectCountEventSender : public AllStatic { + public: +- static void send(const KlassInfoEntry* entry, GCId gc_id, jlong timestamp); ++ static void send(const KlassInfoEntry* entry, GCId gc_id, const Ticks& timestamp); + static bool should_send_event(); + }; + +--- ./hotspot/src/share/vm/gc_interface/collectedHeap.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_interface/collectedHeap.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -121,6 +121,14 @@ + } + } + ++void CollectedHeap::register_nmethod(nmethod* nm) { ++ assert_locked_or_safepoint(CodeCache_lock); ++} + ++void CollectedHeap::unregister_nmethod(nmethod* nm) { ++ assert_locked_or_safepoint(CodeCache_lock); ++} + - // - // Constructors - // -@@ -118,6 +127,15 @@ - */ - public void parse(XMLInputSource inputSource) - throws XNIException, IOException { -+ // null indicates that the parser is called directly, initialize them -+ if (securityManager == null) { -+ securityManager = new XMLSecurityManager(true); -+ fConfiguration.setProperty(Constants.SECURITY_MANAGER, securityManager); -+ } -+ if (securityPropertyManager == null) { -+ securityPropertyManager = new XMLSecurityPropertyManager(); -+ fConfiguration.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); -+ } + void CollectedHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) { + const GCHeapSummary& heap_summary = create_heap_summary(); + const PermGenSummary& perm_summary = create_perm_gen_summary(); +--- ./hotspot/src/share/vm/gc_interface/collectedHeap.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/gc_interface/collectedHeap.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -49,6 +49,7 @@ + class Thread; + class ThreadClosure; + class VirtualSpaceSummary; ++class nmethod; - reset(); - fConfiguration.parse(inputSource); ---- jaxp/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java 2014-04-20 12:39:46.000000000 -0700 -@@ -61,8 +61,6 @@ + class GCMessage : public FormatBuffer<1024> { + public: +@@ -667,6 +668,11 @@ + void print_heap_before_gc(); + void print_heap_after_gc(); - package com.sun.org.apache.xerces.internal.util; - import com.sun.org.apache.xerces.internal.impl.Constants; --import java.security.AccessController; --import java.security.PrivilegedAction; - /** - * This class is a container for parser settings that relate to - * security, or more specifically, it is intended to be used to prevent denial-of-service -@@ -79,7 +77,6 @@ ++ // Registering and unregistering an nmethod (compiled code) with the heap. ++ // Override with specific mechanism for each specialized heap type. ++ virtual void register_nmethod(nmethod* nm); ++ virtual void unregister_nmethod(nmethod* nm); ++ + void trace_heap_before_gc(GCTracer* gc_tracer); + void trace_heap_after_gc(GCTracer* gc_tracer); + +--- ./hotspot/src/share/vm/interpreter/interpreterRuntime.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/interpreter/interpreterRuntime.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * @author Neil Graham, IBM + * This code is free software; you can redistribute it and/or modify it +@@ -1222,3 +1222,24 @@ + size_of_arguments * Interpreter::stackElementSize); + IRT_END + #endif ++ ++// This is a support of the JVMTI PopFrame interface. ++// Make sure it is an invokestatic of a polymorphic intrinsic that has a member_name argument ++// and return it as a vm_result so that it can be reloaded in the list of invokestatic parameters. ++// The dmh argument is a reference to a DirectMethoHandle that has a member name field. ++IRT_ENTRY(void, InterpreterRuntime::member_name_arg_or_null(JavaThread* thread, address dmh, ++ methodOopDesc* method, address bcp)) ++ Bytecodes::Code code = Bytecodes::code_at(method, bcp); ++ if (code != Bytecodes::_invokestatic) { ++ return; ++ } ++ constantPoolOopDesc* cpool = method->constants(); ++ int cp_index = Bytes::get_native_u2(bcp + 1) + constantPoolOopDesc::CPCACHE_INDEX_TAG; ++ Symbol* cname = cpool->klass_name_at(cpool->klass_ref_index_at(cp_index)); ++ Symbol* mname = cpool->name_ref_at(cp_index); ++ ++ if (MethodHandles::has_member_arg(cname, mname)) { ++ oop member_name = java_lang_invoke_DirectMethodHandle::member((oop)dmh); ++ thread->set_vm_result(member_name); ++ } ++IRT_END +--- ./hotspot/src/share/vm/interpreter/interpreterRuntime.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/interpreter/interpreterRuntime.hpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * -- * @version $Id: SecurityManager.java,v 1.5 2010-11-01 04:40:14 joehw Exp $ - */ - public final class SecurityManager { + * This code is free software; you can redistribute it and/or modify it +@@ -106,6 +106,7 @@ + static void create_exception(JavaThread* thread, char* name, char* message); + static void create_klass_exception(JavaThread* thread, char* name, oopDesc* obj); + static address exception_handler_for_exception(JavaThread* thread, oopDesc* exception); ++ static void member_name_arg_or_null(JavaThread* thread, address dmh, methodOopDesc* m, address bcp); + static void throw_pending_exception(JavaThread* thread); + + // Statics & fields +--- ./hotspot/src/share/vm/memory/cardTableModRefBS.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/cardTableModRefBS.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -400,60 +400,6 @@ + inline_write_ref_field(field, newVal); + } -@@ -179,48 +176,40 @@ +-/* +- Claimed and deferred bits are used together in G1 during the evacuation +- pause. These bits can have the following state transitions: +- 1. The claimed bit can be put over any other card state. Except that +- the "dirty -> dirty and claimed" transition is checked for in +- G1 code and is not used. +- 2. Deferred bit can be set only if the previous state of the card +- was either clean or claimed. mark_card_deferred() is wait-free. +- We do not care if the operation is be successful because if +- it does not it will only result in duplicate entry in the update +- buffer because of the "cache-miss". So it's not worth spinning. +- */ +- +- +-bool CardTableModRefBS::claim_card(size_t card_index) { +- jbyte val = _byte_map[card_index]; +- assert(val != dirty_card_val(), "Shouldn't claim a dirty card"); +- while (val == clean_card_val() || +- (val & (clean_card_mask_val() | claimed_card_val())) != claimed_card_val()) { +- jbyte new_val = val; +- if (val == clean_card_val()) { +- new_val = (jbyte)claimed_card_val(); +- } else { +- new_val = val | (jbyte)claimed_card_val(); +- } +- jbyte res = Atomic::cmpxchg(new_val, &_byte_map[card_index], val); +- if (res == val) { +- return true; +- } +- val = res; +- } +- return false; +-} +- +-bool CardTableModRefBS::mark_card_deferred(size_t card_index) { +- jbyte val = _byte_map[card_index]; +- // It's already processed +- if ((val & (clean_card_mask_val() | deferred_card_val())) == deferred_card_val()) { +- return false; +- } +- // Cached bit can be installed either on a clean card or on a claimed card. +- jbyte new_val = val; +- if (val == clean_card_val()) { +- new_val = (jbyte)deferred_card_val(); +- } else { +- if (val & claimed_card_val()) { +- new_val = val | (jbyte)deferred_card_val(); +- } +- } +- if (new_val != val) { +- Atomic::cmpxchg(new_val, &_byte_map[card_index], val); +- } +- return true; +-} - private void readSystemProperties(){ + void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp, + MemRegion mr, +--- ./hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/cardTableModRefBS.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -344,34 +344,10 @@ + _byte_map[card_index] = dirty_card_val(); + } -- //TODO: also read SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT -- try { -- String value = getSystemProperty(Constants.ENTITY_EXPANSION_LIMIT); -- if(value != null && !value.equals("")){ -- entityExpansionLimit = Integer.parseInt(value); -- if (entityExpansionLimit < 0) -- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; -- } -- else -- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; -- }catch(Exception ex){} +- bool is_card_claimed(size_t card_index) { +- jbyte val = _byte_map[card_index]; +- return (val & (clean_card_mask_val() | claimed_card_val())) == claimed_card_val(); +- } - -- try { -- String value = getSystemProperty(Constants.MAX_OCCUR_LIMIT); -- if(value != null && !value.equals("")){ -- maxOccurLimit = Integer.parseInt(value); -- if (maxOccurLimit < 0) -- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; -- } -- else -- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; -- }catch(Exception ex){} +- void set_card_claimed(size_t card_index) { +- jbyte val = _byte_map[card_index]; +- if (val == clean_card_val()) { +- val = (jbyte)claimed_card_val(); +- } else { +- val |= (jbyte)claimed_card_val(); +- } +- _byte_map[card_index] = val; +- } - -- try { -- String value = getSystemProperty(Constants.SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT); -- if(value != null && !value.equals("")){ -- fElementAttributeLimit = Integer.parseInt(value); -- if ( fElementAttributeLimit < 0) -- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; -- } -- else -- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; -+ try { -+ String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT); -+ if(value != null && !value.equals("")){ -+ entityExpansionLimit = Integer.parseInt(value); -+ if (entityExpansionLimit < 0) -+ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; -+ } -+ else -+ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; -+ }catch(Exception ex){} +- bool claim_card(size_t card_index); +- + bool is_card_clean(size_t card_index) { + return _byte_map[card_index] == clean_card_val(); + } + +- bool is_card_deferred(size_t card_index) { +- jbyte val = _byte_map[card_index]; +- return (val & (clean_card_mask_val() | deferred_card_val())) == deferred_card_val(); +- } +- +- bool mark_card_deferred(size_t card_index); +- + // Card marking array base (adjusted for heap low boundary) + // This would be the 0th element of _byte_map, if the heap started at 0x0. + // But since the heap starts at some higher address, this points to somewhere +--- ./hotspot/src/share/vm/memory/collectorPolicy.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/collectorPolicy.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -230,6 +230,8 @@ + alignment = lcm(os::large_page_size(), alignment); + } + ++ assert(alignment >= min_alignment(), "Must be"); + -+ try { -+ String value = System.getProperty(Constants.MAX_OCCUR_LIMIT); -+ if(value != null && !value.equals("")){ -+ maxOccurLimit = Integer.parseInt(value); -+ if (maxOccurLimit < 0) -+ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; -+ } -+ else -+ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; -+ }catch(Exception ex){} + return alignment; + } + +--- ./hotspot/src/share/vm/memory/defNewGeneration.cpp 2013-09-06 11:22:12.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/defNewGeneration.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -538,7 +538,7 @@ + + GenCollectedHeap* gch = GenCollectedHeap::heap(); + +- _gc_timer->register_gc_start(os::elapsed_counter()); ++ _gc_timer->register_gc_start(); + DefNewTracer gc_tracer; + gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start()); + +@@ -682,7 +682,7 @@ + gch->trace_heap_after_gc(&gc_tracer); + gc_tracer.report_tenuring_threshold(tenuring_threshold()); + +- _gc_timer->register_gc_end(os::elapsed_counter()); ++ _gc_timer->register_gc_end(); + + gc_tracer.report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions()); + } +@@ -1004,6 +1004,9 @@ + // have to use it here, as well. + HeapWord* result = eden()->par_allocate(word_size); + if (result != NULL) { ++ if (CMSEdenChunksRecordAlways && _next_gen != NULL) { ++ _next_gen->sample_eden_chunk(); ++ } + return result; + } + do { +@@ -1034,13 +1037,19 @@ + // circular dependency at compile time. + if (result == NULL) { + result = allocate_from_space(word_size); ++ } else if (CMSEdenChunksRecordAlways && _next_gen != NULL) { ++ _next_gen->sample_eden_chunk(); + } + return result; + } + + HeapWord* DefNewGeneration::par_allocate(size_t word_size, + bool is_tlab) { +- return eden()->par_allocate(word_size); ++ HeapWord* res = eden()->par_allocate(word_size); ++ if (CMSEdenChunksRecordAlways && _next_gen != NULL) { ++ _next_gen->sample_eden_chunk(); ++ } ++ return res; + } + + void DefNewGeneration::gc_prologue(bool full) { +--- ./hotspot/src/share/vm/memory/genCollectedHeap.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/genCollectedHeap.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -99,17 +99,19 @@ + guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize"); + + // The heap must be at least as aligned as generations. +- size_t alignment = Generation::GenGrain; ++ size_t gen_alignment = Generation::GenGrain; + + _gen_specs = gen_policy()->generations(); + PermanentGenerationSpec *perm_gen_spec = + collector_policy()->permanent_generation(); + ++ size_t heap_alignment = collector_policy()->max_alignment(); + -+ try { -+ String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT); -+ if(value != null && !value.equals("")){ -+ fElementAttributeLimit = Integer.parseInt(value); -+ if ( fElementAttributeLimit < 0) -+ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; -+ } -+ else -+ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; + // Make sure the sizes are all aligned. + for (i = 0; i < _n_gens; i++) { +- _gen_specs[i]->align(alignment); ++ _gen_specs[i]->align(gen_alignment); + } +- perm_gen_spec->align(alignment); ++ perm_gen_spec->align(heap_alignment); + + // If we are dumping the heap, then allocate a wasted block of address + // space in order to push the heap to a lower address. This extra +@@ -130,9 +132,9 @@ + char* heap_address; + size_t total_reserved = 0; + int n_covered_regions = 0; +- ReservedSpace heap_rs(0); ++ ReservedSpace heap_rs; + +- heap_address = allocate(alignment, perm_gen_spec, &total_reserved, ++ heap_address = allocate(heap_alignment, perm_gen_spec, &total_reserved, + &n_covered_regions, &heap_rs); + + if (UseSharedSpaces) { +@@ -142,7 +144,7 @@ + } + FileMapInfo* mapinfo = FileMapInfo::current_info(); + mapinfo->fail_continue("Unable to reserve shared region."); +- allocate(alignment, perm_gen_spec, &total_reserved, &n_covered_regions, ++ allocate(heap_alignment, perm_gen_spec, &total_reserved, &n_covered_regions, + &heap_rs); + } + } +@@ -207,19 +209,21 @@ + const size_t pageSize = UseLargePages ? + os::large_page_size() : os::vm_page_size(); - }catch(Exception ex){} ++ assert(alignment % pageSize == 0, "Must be"); ++ + for (int i = 0; i < _n_gens; i++) { + total_reserved = add_and_check_overflow(total_reserved, _gen_specs[i]->max_size()); + n_covered_regions += _gen_specs[i]->n_covered_regions(); + } - } +- assert(total_reserved % pageSize == 0, +- err_msg("Gen size; total_reserved=" SIZE_FORMAT ", pageSize=" +- SIZE_FORMAT, total_reserved, pageSize)); ++ assert(total_reserved % alignment == 0, ++ err_msg("Gen size; total_reserved=" SIZE_FORMAT ", alignment=" ++ SIZE_FORMAT, total_reserved, alignment)); + total_reserved = add_and_check_overflow(total_reserved, perm_gen_spec->max_size()); +- assert(total_reserved % pageSize == 0, +- err_msg("Perm size; total_reserved=" SIZE_FORMAT ", pageSize=" ++ assert(total_reserved % alignment == 0, ++ err_msg("Perm size; total_reserved=" SIZE_FORMAT ", alignment=" + SIZE_FORMAT ", perm gen max=" SIZE_FORMAT, total_reserved, +- pageSize, perm_gen_spec->max_size())); ++ alignment, perm_gen_spec->max_size())); + + n_covered_regions += perm_gen_spec->n_covered_regions(); + +@@ -229,7 +233,9 @@ + total_reserved = add_and_check_overflow(total_reserved, misc); + + if (UseLargePages) { ++ assert(misc == 0, "CDS does not support Large Pages"); + assert(total_reserved != 0, "total_reserved cannot be 0"); ++ assert(is_size_aligned(total_reserved, os::large_page_size()), "Must be"); + total_reserved = round_up_and_check_overflow(total_reserved, os::large_page_size()); + } -- private String getSystemProperty(final String propName) { -- return AccessController.doPrivileged(new PrivilegedAction() { -- public String run() { -- return System.getProperty(propName); -- } -- }); -- } - } // class SecurityManager ---- jaxp/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java 2014-04-20 12:39:46.000000000 -0700 -@@ -173,7 +173,7 @@ - for (int i = 0; i < length; i++) { - code = code * 37 + symbol.charAt(i); +@@ -250,7 +256,7 @@ + } else { + heap_address = NULL; // any address will do. + if (UseCompressedOops) { +- heap_address = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop); ++ heap_address = Universe::preferred_heap_base(total_reserved, alignment, Universe::UnscaledNarrowOop); + *_total_reserved = total_reserved; + *_n_covered_regions = n_covered_regions; + *heap_rs = ReservedHeapSpace(total_reserved, alignment, +@@ -260,13 +266,13 @@ + // Failed to reserve at specified address - the requested memory + // region is taken already, for example, by 'java' launcher. + // Try again to reserver heap higher. +- heap_address = Universe::preferred_heap_base(total_reserved, Universe::ZeroBasedNarrowOop); ++ heap_address = Universe::preferred_heap_base(total_reserved, alignment, Universe::ZeroBasedNarrowOop); + *heap_rs = ReservedHeapSpace(total_reserved, alignment, + UseLargePages, heap_address); + + if (heap_address != NULL && !heap_rs->is_reserved()) { + // Failed to reserve at specified address again - give up. +- heap_address = Universe::preferred_heap_base(total_reserved, Universe::HeapBasedNarrowOop); ++ heap_address = Universe::preferred_heap_base(total_reserved, alignment, Universe::HeapBasedNarrowOop); + assert(heap_address == NULL, ""); + *heap_rs = ReservedHeapSpace(total_reserved, alignment, + UseLargePages, heap_address); +@@ -538,8 +544,7 @@ + prepare_for_verify(); + prepared_for_verification = true; + } +- gclog_or_tty->print(" VerifyBeforeGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyBeforeGC:"); + } + COMPILER2_PRESENT(DerivedPointerTable::clear()); + +@@ -610,8 +615,7 @@ + if (VerifyAfterGC && i >= VerifyGCLevel && + total_collections() >= VerifyGCStartAt) { + HandleMark hm; // Discard invalid handles created during verification +- gclog_or_tty->print(" VerifyAfterGC:"); +- Universe::verify(); ++ Universe::verify(" VerifyAfterGC:"); } -- return code & 0x7FFFFFF; -+ return code & 0x7FFFFFFF; - } // hash(String):int + if (PrintGCDetails) { +@@ -932,12 +936,13 @@ + // Returns "TRUE" iff "p" points into the committed areas of the heap. + bool GenCollectedHeap::is_in(const void* p) const { + #ifndef ASSERT +- guarantee(VerifyBeforeGC || +- VerifyDuringGC || +- VerifyBeforeExit || +- PrintAssembly || +- tty->count() != 0 || // already printing +- VerifyAfterGC || ++ guarantee(VerifyBeforeGC || ++ VerifyDuringGC || ++ VerifyBeforeExit || ++ VerifyDuringStartup || ++ PrintAssembly || ++ tty->count() != 0 || // already printing ++ VerifyAfterGC || + VMError::fatal_error_in_progress(), "too expensive"); + + #endif +--- ./hotspot/src/share/vm/memory/generation.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/generation.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,16 +476,16 @@ + x(ref_processor(), gch->reserved_region()); -@@ -194,7 +194,7 @@ - for (int i = 0; i < length; i++) { - code = code * 37 + buffer[offset + i]; - } -- return code & 0x7FFFFFF; -+ return code & 0x7FFFFFFF; + STWGCTimer* gc_timer = GenMarkSweep::gc_timer(); +- gc_timer->register_gc_start(os::elapsed_counter()); ++ gc_timer->register_gc_start(); - } // hash(char[],int,int):int + SerialOldTracer* gc_tracer = GenMarkSweep::gc_tracer(); + gc_tracer->report_gc_start(gch->gc_cause(), gc_timer->gc_start()); ---- jaxp/src/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java 2014-04-20 12:39:46.000000000 -0700 -@@ -48,7 +48,8 @@ - // - // Constants - // -- private static final String DEFAULT_INTERNAL_CLASSES = "com.sun.org.apache."; -+ private static final String JAXP_INTERNAL = "com.sun.org.apache"; -+ private static final String STAX_INTERNAL = "com.sun.xml.internal"; + GenMarkSweep::invoke_at_safepoint(_level, ref_processor(), clear_all_soft_refs); - // name of default properties file to look for in JDK's jre/lib directory - private static final String DEFAULT_PROPERTIES_FILENAME = "xerces.properties"; -@@ -288,12 +289,8 @@ - public static Class findProviderClass(String className, boolean doFallback) - throws ClassNotFoundException, ConfigurationError - { -- if (System.getSecurityManager()!=null) { -- return Class.forName(className); -- } else { -- return findProviderClass (className, -+ return findProviderClass (className, - findClassLoader (), doFallback); -- } +- gc_timer->register_gc_end(os::elapsed_counter()); ++ gc_timer->register_gc_end(); + +- gc_tracer->report_gc_end(os::elapsed_counter(), gc_timer->time_partitions()); ++ gc_tracer->report_gc_end(gc_timer->gc_end(), gc_timer->time_partitions()); + + SpecializationStats::print(); + } +--- ./hotspot/src/share/vm/memory/generation.hpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/generation.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -457,6 +457,7 @@ + // expected to be GC worker thread-local, with the worker index + // indicated by "thr_num". + virtual void* get_data_recorder(int thr_num) { return NULL; } ++ virtual void sample_eden_chunk() {} + + // Some generations may require some cleanup actions before allowing + // a verification. +--- ./hotspot/src/share/vm/memory/iterator.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/iterator.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -70,7 +70,7 @@ + } + + void CodeBlobToOopClosure::do_newly_marked_nmethod(nmethod* nm) { +- nm->oops_do(_cl, /*do_strong_roots_only=*/ true); ++ nm->oops_do(_cl, /*do_strong_roots_only=*/ true, /*allow_zombie=*/ false); + } + + void CodeBlobToOopClosure::do_code_blob(CodeBlob* cb) { +--- ./hotspot/src/share/vm/memory/sharedHeap.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/sharedHeap.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -64,7 +64,8 @@ + } + _sh = this; // ch is static, should be set only once. + if ((UseParNewGC || +- (UseConcMarkSweepGC && CMSParallelRemarkEnabled) || ++ (UseConcMarkSweepGC && (CMSParallelInitialMarkEnabled || ++ CMSParallelRemarkEnabled)) || + UseG1GC) && + ParallelGCThreads > 0) { + _workers = new FlexibleWorkGang("Parallel GC Threads", ParallelGCThreads, +@@ -148,7 +149,8 @@ + ScanningOption so, + OopClosure* roots, + CodeBlobClosure* code_roots, +- OopsInGenClosure* perm_blk) { ++ OopsInGenClosure* perm_blk, ++ bool manages_code_roots) { + StrongRootsScope srs(this, activate_scope); + // General strong roots. + assert(_strong_roots_parity != 0, "must have called prologue code"); +@@ -216,7 +218,7 @@ + CodeCache::blobs_do(code_roots); + } + } else if (so & (SO_SystemClasses|SO_AllClasses)) { +- if (!collecting_perm_gen) { ++ if (!manages_code_roots && !collecting_perm_gen) { + // If we are collecting from class statics, but we are not going to + // visit all of the CodeCache, collect from the non-perm roots if any. + // This makes the code cache function temporarily as a source of strong +--- ./hotspot/src/share/vm/memory/sharedHeap.hpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/sharedHeap.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -267,7 +267,8 @@ + ScanningOption so, + OopClosure* roots, + CodeBlobClosure* code_roots, +- OopsInGenClosure* perm_blk); ++ OopsInGenClosure* perm_blk, ++ bool manages_code_roots = false); + + // Apply "blk" to all the weak roots of the system. These include + // JNI weak roots, the code cache, system dictionary, symbol table, +--- ./hotspot/src/share/vm/memory/universe.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/universe.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -826,17 +826,23 @@ + // 32Gb + // OopEncodingHeapMax == NarrowOopHeapMax << LogMinObjAlignmentInBytes; + +-char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) { ++char* Universe::preferred_heap_base(size_t heap_size, size_t alignment, NARROW_OOP_MODE mode) { ++ assert(is_size_aligned((size_t)OopEncodingHeapMax, alignment), "Must be"); ++ assert(is_size_aligned((size_t)NarrowOopHeapMax, alignment), "Must be"); ++ assert(is_size_aligned(heap_size, alignment), "Must be"); ++ ++ uintx heap_base_min_address_aligned = align_size_up(HeapBaseMinAddress, alignment); ++ + size_t base = 0; + #ifdef _LP64 + if (UseCompressedOops) { + assert(mode == UnscaledNarrowOop || + mode == ZeroBasedNarrowOop || + mode == HeapBasedNarrowOop, "mode is invalid"); +- const size_t total_size = heap_size + HeapBaseMinAddress; ++ const size_t total_size = heap_size + heap_base_min_address_aligned; + // Return specified base for the first request. + if (!FLAG_IS_DEFAULT(HeapBaseMinAddress) && (mode == UnscaledNarrowOop)) { +- base = HeapBaseMinAddress; ++ base = heap_base_min_address_aligned; + } else if (total_size <= OopEncodingHeapMax && (mode != HeapBasedNarrowOop)) { + if (total_size <= NarrowOopHeapMax && (mode == UnscaledNarrowOop) && + (Universe::narrow_oop_shift() == 0)) { +@@ -882,6 +888,8 @@ } - /** - * Find a Class using the specified ClassLoader -@@ -306,7 +303,8 @@ - //restrict the access to package as speicified in java.security policy - SecurityManager security = System.getSecurityManager(); - if (security != null) { -- if (className.startsWith(DEFAULT_INTERNAL_CLASSES)) { -+ if (className.startsWith(JAXP_INTERNAL) || -+ className.startsWith(STAX_INTERNAL)) { - cl = null; - } else { - final int lastDot = className.lastIndexOf("."); -@@ -318,7 +316,7 @@ - Class providerClass; - if (cl == null) { - //use the bootstrap ClassLoader. -- providerClass = Class.forName(className); -+ providerClass = Class.forName(className, false, ObjectFactory.class.getClassLoader()); - } else { - try { - providerClass = cl.loadClass(className); ---- jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java 2014-04-20 12:39:46.000000000 -0700 -@@ -0,0 +1,237 @@ -+/* -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. -+ * -+ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. -+ * -+ * The contents of this file are subject to the terms of either the GNU -+ * General Public License Version 2 only ("GPL") or the Common Development -+ * and Distribution License("CDDL") (collectively, the "License"). You -+ * may not use this file except in compliance with the License. You can -+ * obtain a copy of the License at -+ * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html -+ * or packager/legal/LICENSE.txt. See the License for the specific -+ * language governing permissions and limitations under the License. -+ * -+ * When distributing the software, include this License Header Notice in each -+ * file and include the License file at packager/legal/LICENSE.txt. -+ * -+ * GPL Classpath Exception: -+ * Oracle designates this particular file as subject to the "Classpath" -+ * exception as provided by Oracle in the GPL Version 2 section of the License -+ * file that accompanied this code. -+ * -+ * Modifications: -+ * If applicable, add the following below the License Header, with the fields -+ * enclosed by brackets [] replaced by your own identifying information: -+ * "Portions Copyright [year] [name of copyright owner]" -+ * -+ * Contributor(s): -+ * If you wish your version of this file to be governed by only the CDDL or -+ * only the GPL Version 2, indicate your decision by adding "[Contributor] -+ * elects to include this software in this distribution under the [CDDL or GPL -+ * Version 2] license." If you don't indicate a single choice of license, a -+ * recipient has the option to distribute your version of this file under -+ * either the CDDL, the GPL Version 2 or to extend the choice of license to -+ * its licensees as provided above. However, if you add GPL Version 2 code -+ * and therefore, elected the GPL Version 2 license, then the option applies -+ * only if the new code is made subject to such option by the copyright -+ * holder. -+ */ -+package com.sun.org.apache.xerces.internal.utils; -+ -+import com.sun.org.apache.xerces.internal.impl.Constants; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; -+import java.util.Formatter; -+import java.util.HashMap; -+import java.util.Map; -+ -+/** -+ * A helper for analyzing entity expansion limits -+ * -+ * @author Joe Wang Oracle Corp. -+ * -+ */ -+public final class XMLLimitAnalyzer { -+ -+ /** -+ * Map old property names with the new ones -+ */ -+ public static enum NameMap { -+ ENTITY_EXPANSION_LIMIT(Constants.SP_ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT), -+ MAX_OCCUR_NODE_LIMIT(Constants.SP_MAX_OCCUR_LIMIT, Constants.MAX_OCCUR_LIMIT), -+ ELEMENT_ATTRIBUTE_LIMIT(Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, Constants.ELEMENT_ATTRIBUTE_LIMIT); -+ -+ final String newName; -+ final String oldName; -+ -+ NameMap(String newName, String oldName) { -+ this.newName = newName; -+ this.oldName = oldName; -+ } -+ -+ String getOldName(String newName) { -+ if (newName.equals(this.newName)) { -+ return oldName; -+ } -+ return null; -+ } -+ } -+ -+ /** -+ * Max value accumulated for each property -+ */ -+ private final int[] values; -+ /** -+ * Names of the entities corresponding to their max values -+ */ -+ private final String[] names; -+ /** -+ * Total value of accumulated entities -+ */ -+ private final int[] totalValue; -+ -+ /** -+ * Maintain values of the top 10 elements in the process of parsing -+ */ -+ private final Map[] caches; + } + #endif + -+ private String entityStart, entityEnd; -+ /** -+ * Default constructor. Establishes default values for known security -+ * vulnerabilities. -+ */ -+ public XMLLimitAnalyzer() { -+ values = new int[Limit.values().length]; -+ totalValue = new int[Limit.values().length]; -+ names = new String[Limit.values().length]; -+ caches = new Map[Limit.values().length]; -+ } ++ assert(is_ptr_aligned((char*)base, alignment), "Must be"); + return (char*)base; // also return NULL (don't care) for 32-bit VM + } + +@@ -1366,7 +1374,7 @@ + st->print_cr("}"); + } + +-void Universe::verify(bool silent, VerifyOption option) { ++void Universe::verify(VerifyOption option, const char* prefix, bool silent) { + if (SharedSkipVerify) { + return; + } +@@ -1387,11 +1395,12 @@ + HandleMark hm; // Handles created during verification can be zapped + _verify_count++; + ++ if (!silent) gclog_or_tty->print(prefix); + if (!silent) gclog_or_tty->print("[Verifying "); + if (!silent) gclog_or_tty->print("threads "); + Threads::verify(); ++ if (!silent) gclog_or_tty->print("heap "); + heap()->verify(silent, option); +- + if (!silent) gclog_or_tty->print("syms "); + SymbolTable::verify(); + if (!silent) gclog_or_tty->print("strs "); +--- ./hotspot/src/share/vm/memory/universe.hpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/memory/universe.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -380,7 +380,7 @@ + + static NARROW_OOP_MODE narrow_oop_mode(); + +- static char* preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode); ++ static char* preferred_heap_base(size_t heap_size, size_t alignment, NARROW_OOP_MODE mode); + + // Historic gc information + static size_t get_heap_capacity_at_last_gc() { return _heap_capacity_at_last_gc; } +@@ -419,12 +419,12 @@ + + // Debugging + static bool verify_in_progress() { return _verify_in_progress; } +- static void verify(bool silent, VerifyOption option); +- static void verify(bool silent) { +- verify(silent, VerifyOption_Default /* option */); ++ static void verify(VerifyOption option, const char* prefix, bool silent = VerifySilently); ++ static void verify(const char* prefix, bool silent = VerifySilently) { ++ verify(VerifyOption_Default, prefix, silent); + } +- static void verify() { +- verify(false /* silent */); ++ static void verify(bool silent = VerifySilently) { ++ verify("", silent); + } + + static int verify_count() { return _verify_count; } +--- ./hotspot/src/share/vm/oops/constantPoolOop.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/oops/constantPoolOop.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1026,24 +1026,13 @@ + + case JVM_CONSTANT_InvokeDynamic: + { +- int k1 = invoke_dynamic_bootstrap_method_ref_index_at(index1); +- int k2 = cp2->invoke_dynamic_bootstrap_method_ref_index_at(index2); +- bool match = compare_entry_to(k1, cp2, k2, CHECK_false); +- if (!match) return false; +- k1 = invoke_dynamic_name_and_type_ref_index_at(index1); +- k2 = cp2->invoke_dynamic_name_and_type_ref_index_at(index2); +- match = compare_entry_to(k1, cp2, k2, CHECK_false); +- if (!match) return false; +- int argc = invoke_dynamic_argument_count_at(index1); +- if (argc == cp2->invoke_dynamic_argument_count_at(index2)) { +- for (int j = 0; j < argc; j++) { +- k1 = invoke_dynamic_argument_index_at(index1, j); +- k2 = cp2->invoke_dynamic_argument_index_at(index2, j); +- match = compare_entry_to(k1, cp2, k2, CHECK_false); +- if (!match) return false; +- } +- return true; // got through loop; all elements equal +- } ++ int k1 = invoke_dynamic_name_and_type_ref_index_at(index1); ++ int k2 = cp2->invoke_dynamic_name_and_type_ref_index_at(index2); ++ int i1 = invoke_dynamic_bootstrap_specifier_index(index1); ++ int i2 = cp2->invoke_dynamic_bootstrap_specifier_index(index2); ++ bool match = compare_entry_to(k1, cp2, k2, CHECK_false) && ++ compare_operand_to(i1, cp2, i2, CHECK_false); ++ return match; + } break; + + case JVM_CONSTANT_UnresolvedString: +@@ -1078,32 +1067,77 @@ + } // end compare_entry_to() + + +-// Copy this constant pool's entries at start_i to end_i (inclusive) +-// to the constant pool to_cp's entries starting at to_i. A total of +-// (end_i - start_i) + 1 entries are copied. +-void constantPoolOopDesc::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, +- constantPoolHandle to_cp, int to_i, TRAPS) { ++// Resize the operands array with delta_len and delta_size. ++// Used in RedefineClasses for CP merge. ++void constantPoolOopDesc::resize_operands(int delta_len, int delta_size, TRAPS) { ++ int old_len = operand_array_length(operands()); ++ int new_len = old_len + delta_len; ++ int min_len = (delta_len > 0) ? old_len : new_len; ++ ++ int old_size = operands()->length(); ++ int new_size = old_size + delta_size; ++ int min_size = (delta_size > 0) ? old_size : new_size; ++ ++ typeArrayHandle new_ops = oopFactory::new_permanent_intArray(new_size, CHECK); ++ ++ // Set index in the resized array for existing elements only ++ for (int idx = 0; idx < min_len; idx++) { ++ int offset = operand_offset_at(idx); // offset in original array ++ operand_offset_at_put(new_ops(), idx, offset + 2*delta_len); // offset in resized array ++ } ++ // Copy the bootstrap specifiers only ++ Copy::conjoint_memory_atomic(operands()->short_at_addr(2*old_len), ++ new_ops->short_at_addr(2*new_len), ++ (min_size - 2*min_len) * sizeof(u2)); ++ // Explicit deallocation of old operands array is not needed for 7u ++ set_operands(new_ops()); ++} // end resize_operands() ++ ++ ++// Extend the operands array with the length and size of the ext_cp operands. ++// Used in RedefineClasses for CP merge. ++void constantPoolOopDesc::extend_operands(constantPoolHandle ext_cp, TRAPS) { ++ int delta_len = operand_array_length(ext_cp->operands()); ++ if (delta_len == 0) { ++ return; // nothing to do ++ } ++ int delta_size = ext_cp->operands()->length(); + -+ /** -+ * Add the value to the current max count for the specified property -+ * To find the max value of all entities, set no limit -+ * -+ * @param limit the type of the property -+ * @param entityName the name of the entity -+ * @param value the value of the entity -+ */ -+ public void addValue(Limit limit, String entityName, int value) { -+ addValue(limit.ordinal(), entityName, value); -+ } ++ assert(delta_len > 0 && delta_size > 0, "extended operands array must be bigger"); + -+ /** -+ * Add the value to the current count by the index of the property -+ * @param index the index of the property -+ * @param entityName the name of the entity -+ * @param value the value of the entity -+ */ -+ public void addValue(int index, String entityName, int value) { -+ if (index == Limit.ENTITY_EXPANSION_LIMIT.ordinal() || -+ index == Limit.MAX_OCCUR_NODE_LIMIT.ordinal() || -+ index == Limit.ELEMENT_ATTRIBUTE_LIMIT.ordinal()) { -+ totalValue[index] += value; -+ return; -+ } ++ if (operand_array_length(operands()) == 0) { ++ typeArrayHandle new_ops = oopFactory::new_permanent_intArray(delta_size, CHECK); ++ // The first element index defines the offset of second part ++ operand_offset_at_put(new_ops(), 0, 2*delta_len); // offset in new array ++ set_operands(new_ops()); ++ } else { ++ resize_operands(delta_len, delta_size, CHECK); ++ } + +- int dest_i = to_i; // leave original alone for debug purposes ++} // end extend_operands() + +- for (int src_i = start_i; src_i <= end_i; /* see loop bottom */ ) { +- copy_entry_to(from_cp, src_i, to_cp, dest_i, CHECK); + +- switch (from_cp->tag_at(src_i).value()) { +- case JVM_CONSTANT_Double: +- case JVM_CONSTANT_Long: +- // double and long take two constant pool entries +- src_i += 2; +- dest_i += 2; +- break; +- +- default: +- // all others take one constant pool entry +- src_i++; +- dest_i++; +- break; +- } ++// Shrink the operands array to a smaller array with new_len length. ++// Used in RedefineClasses for CP merge. ++void constantPoolOopDesc::shrink_operands(int new_len, TRAPS) { ++ int old_len = operand_array_length(operands()); ++ if (new_len == old_len) { ++ return; // nothing to do + } ++ assert(new_len < old_len, "shrunken operands array must be smaller"); ++ ++ int free_base = operand_next_offset_at(new_len - 1); ++ int delta_len = new_len - old_len; ++ int delta_size = 2*delta_len + free_base - operands()->length(); ++ ++ resize_operands(delta_len, delta_size, CHECK); ++ ++} // end shrink_operands() ++ ++ ++void constantPoolOopDesc::copy_operands(constantPoolHandle from_cp, ++ constantPoolHandle to_cp, ++ TRAPS) { + + int from_oplen = operand_array_length(from_cp->operands()); + int old_oplen = operand_array_length(to_cp->operands()); +@@ -1116,7 +1150,7 @@ + int from_len = from_cp->operands()->length(); + int old_off = old_oplen * sizeof(u2); + int from_off = from_oplen * sizeof(u2); +- typeArrayHandle new_operands = oopFactory::new_permanent_shortArray(old_len + from_len, CHECK); ++ typeArrayHandle new_operands = oopFactory::new_permanent_intArray(old_len + from_len, CHECK); + int fillp = 0, len = 0; + // first part of dest + Copy::conjoint_memory_atomic(to_cp->operands()->short_at_addr(0), +@@ -1124,7 +1158,7 @@ + (len = old_off) * sizeof(u2)); + fillp += len; + // first part of src +- Copy::conjoint_memory_atomic(to_cp->operands()->short_at_addr(0), ++ Copy::conjoint_memory_atomic(from_cp->operands()->short_at_addr(0), + new_operands->short_at_addr(fillp), + (len = from_off) * sizeof(u2)); + fillp += len; +@@ -1134,7 +1168,7 @@ + (len = old_len - old_off) * sizeof(u2)); + fillp += len; + // second part of src +- Copy::conjoint_memory_atomic(to_cp->operands()->short_at_addr(from_off), ++ Copy::conjoint_memory_atomic(from_cp->operands()->short_at_addr(from_off), + new_operands->short_at_addr(fillp), + (len = from_len - from_off) * sizeof(u2)); + fillp += len; +@@ -1152,8 +1186,39 @@ + to_cp->set_operands(new_operands()); + } + } ++} // end copy_operands() + +-} // end copy_cp_to() + -+ Map cache; -+ if (caches[index] == null) { -+ cache = new HashMap(10); -+ caches[index] = cache; -+ } else { -+ cache = caches[index]; -+ } ++// Copy this constant pool's entries at start_i to end_i (inclusive) ++// to the constant pool to_cp's entries starting at to_i. A total of ++// (end_i - start_i) + 1 entries are copied. ++void constantPoolOopDesc::copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, ++ constantPoolHandle to_cp, int to_i, TRAPS) { + -+ int accumulatedValue = value; -+ if (cache.containsKey(entityName)) { -+ accumulatedValue += cache.get(entityName).intValue(); -+ cache.put(entityName, Integer.valueOf(accumulatedValue)); -+ } else { -+ cache.put(entityName, Integer.valueOf(value)); -+ } + -+ if (accumulatedValue > values[index]) { -+ values[index] = accumulatedValue; -+ names[index] = entityName; -+ } ++ int dest_i = to_i; // leave original alone for debug purposes + ++ for (int src_i = start_i; src_i <= end_i; /* see loop bottom */ ) { ++ copy_entry_to(from_cp, src_i, to_cp, dest_i, CHECK); + -+ if (index == Limit.GENEAL_ENTITY_SIZE_LIMIT.ordinal() || -+ index == Limit.PARAMETER_ENTITY_SIZE_LIMIT.ordinal()) { -+ totalValue[Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()] += value; -+ } -+ } ++ switch (from_cp->tag_at(src_i).value()) { ++ case JVM_CONSTANT_Double: ++ case JVM_CONSTANT_Long: ++ // double and long take two constant pool entries ++ src_i += 2; ++ dest_i += 2; ++ break; + -+ /** -+ * Return the value of the current max count for the specified property -+ * -+ * @param limit the property -+ * @return the value of the property -+ */ -+ public int getValue(Limit limit) { -+ return values[limit.ordinal()]; ++ default: ++ // all others take one constant pool entry ++ src_i++; ++ dest_i++; ++ break; + } ++ } ++ copy_operands(from_cp, to_cp, CHECK); + -+ public int getValue(int index) { -+ return values[index]; -+ } -+ /** -+ * Return the total value accumulated so far -+ * -+ * @param limit the property -+ * @return the accumulated value of the property -+ */ -+ public int getTotalValue(Limit limit) { -+ return totalValue[limit.ordinal()]; -+ } ++} // end copy_cp_to_impl() + + + // Copy this constant pool's entry at from_i to the constant pool +@@ -1337,6 +1402,46 @@ + } // end find_matching_entry() + + ++// Compare this constant pool's bootstrap specifier at idx1 to the constant pool ++// cp2's bootstrap specifier at idx2. ++bool constantPoolOopDesc::compare_operand_to(int idx1, constantPoolHandle cp2, int idx2, TRAPS) { ++ int k1 = operand_bootstrap_method_ref_index_at(idx1); ++ int k2 = cp2->operand_bootstrap_method_ref_index_at(idx2); ++ bool match = compare_entry_to(k1, cp2, k2, CHECK_false); + -+ public int getTotalValue(int index) { -+ return totalValue[index]; ++ if (!match) { ++ return false; ++ } ++ int argc = operand_argument_count_at(idx1); ++ if (argc == cp2->operand_argument_count_at(idx2)) { ++ for (int j = 0; j < argc; j++) { ++ k1 = operand_argument_index_at(idx1, j); ++ k2 = cp2->operand_argument_index_at(idx2, j); ++ match = compare_entry_to(k1, cp2, k2, CHECK_false); ++ if (!match) { ++ return false; ++ } + } -+ /** -+ * Return the current max value (count or length) by the index of a property -+ * @param index the index of a property -+ * @return count of a property -+ */ -+ public int getValueByIndex(int index) { -+ return values[index]; ++ return true; // got through loop; all elements equal ++ } ++ return false; ++} // end compare_operand_to() ++ ++// Search constant pool search_cp for a bootstrap specifier that matches ++// this constant pool's bootstrap specifier at pattern_i index. ++// Return the index of a matching bootstrap specifier or (-1) if there is no match. ++int constantPoolOopDesc::find_matching_operand(int pattern_i, ++ constantPoolHandle search_cp, int search_len, TRAPS) { ++ for (int i = 0; i < search_len; i++) { ++ bool found = compare_operand_to(pattern_i, search_cp, i, CHECK_(-1)); ++ if (found) { ++ return i; + } ++ } ++ return -1; // bootstrap specifier not found; return unused index (-1) ++} // end find_matching_operand() + -+ public void startEntity(String name) { -+ entityStart = name; -+ } + -+ public boolean isTracking(String name) { -+ if (entityStart == null) { -+ return false; -+ } -+ return entityStart.equals(name); -+ } -+ /** -+ * Stop tracking the entity -+ * @param limit the limit property -+ * @param name the name of an entity -+ */ -+ public void endEntity(Limit limit, String name) { -+ entityStart = ""; -+ Map cache = caches[limit.ordinal()]; -+ if (cache != null) { -+ cache.remove(name); -+ } + #ifndef PRODUCT + + const char* constantPoolOopDesc::printable_name_at(int which) { +--- ./hotspot/src/share/vm/oops/constantPoolOop.hpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/oops/constantPoolOop.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -565,6 +565,47 @@ + _indy_argc_offset = 1, // u2 argc + _indy_argv_offset = 2 // u2 argv[argc] + }; ++ ++ // These functions are used in RedefineClasses for CP merge ++ ++ int operand_offset_at(int bootstrap_specifier_index) { ++ assert(0 <= bootstrap_specifier_index && ++ bootstrap_specifier_index < operand_array_length(operands()), ++ "Corrupted CP operands"); ++ return operand_offset_at(operands(), bootstrap_specifier_index); ++ } ++ int operand_bootstrap_method_ref_index_at(int bootstrap_specifier_index) { ++ int offset = operand_offset_at(bootstrap_specifier_index); ++ return operands()->short_at(offset + _indy_bsm_offset); ++ } ++ int operand_argument_count_at(int bootstrap_specifier_index) { ++ int offset = operand_offset_at(bootstrap_specifier_index); ++ int argc = operands()->short_at(offset + _indy_argc_offset); ++ return argc; ++ } ++ int operand_argument_index_at(int bootstrap_specifier_index, int j) { ++ int offset = operand_offset_at(bootstrap_specifier_index); ++ return operands()->short_at(offset + _indy_argv_offset + j); ++ } ++ int operand_next_offset_at(int bootstrap_specifier_index) { ++ int offset = operand_offset_at(bootstrap_specifier_index) + _indy_argv_offset ++ + operand_argument_count_at(bootstrap_specifier_index); ++ return offset; ++ } ++ // Compare a bootsrap specifier in the operands arrays ++ bool compare_operand_to(int bootstrap_specifier_index1, constantPoolHandle cp2, ++ int bootstrap_specifier_index2, TRAPS); ++ // Find a bootsrap specifier in the operands array ++ int find_matching_operand(int bootstrap_specifier_index, constantPoolHandle search_cp, ++ int operands_cur_len, TRAPS); ++ // Resize the operands array with delta_len and delta_size ++ void resize_operands(int delta_len, int delta_size, TRAPS); ++ // Extend the operands array with the length and size of the ext_cp operands ++ void extend_operands(constantPoolHandle ext_cp, TRAPS); ++ // Shrink the operands array to a smaller array with new_len length ++ void shrink_operands(int new_len, TRAPS); ++ ++ + int invoke_dynamic_bootstrap_method_ref_index_at(int which) { + assert(tag_at(which).is_invoke_dynamic(), "Corrupted constant pool"); + int op_base = invoke_dynamic_operand_base(which); +@@ -755,6 +796,7 @@ + copy_cp_to_impl(h_this, start_i, end_i, to_cp, to_i, THREAD); + } + static void copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, constantPoolHandle to_cp, int to_i, TRAPS); ++ static void copy_operands(constantPoolHandle from_cp, constantPoolHandle to_cp, TRAPS); + static void copy_entry_to(constantPoolHandle from_cp, int from_i, constantPoolHandle to_cp, int to_i, TRAPS); + int find_matching_entry(int pattern_i, constantPoolHandle search_cp, TRAPS); + int orig_length() const { return _orig_length; } +--- ./hotspot/src/share/vm/oops/instanceKlass.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/oops/instanceKlass.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1901,6 +1901,17 @@ + FreeHeap(jmeths); + } + ++ // Deallocate MemberNameTable ++ { ++ Mutex* lock_or_null = SafepointSynchronize::is_at_safepoint() ? NULL : MemberNameTable_lock; ++ MutexLockerEx ml(lock_or_null, Mutex::_no_safepoint_check_flag); ++ MemberNameTable* mnt = member_names(); ++ if (mnt != NULL) { ++ delete mnt; ++ set_member_names(NULL); + } ++ } + -+ public void debugPrint(XMLSecurityManager securityManager) { -+ Formatter formatter = new Formatter(); -+ System.out.println(formatter.format("%30s %15s %15s %15s %30s", -+ "Property","Limit","Total size","Size","Entity Name")); + int* indices = methods_cached_itable_indices_acquire(); + if (indices != (int*)NULL) { + release_set_methods_cached_itable_indices(NULL); +@@ -2333,6 +2344,30 @@ + return NULL; + } + ++void instanceKlass::add_member_name(int index, Handle mem_name) { ++ jweak mem_name_wref = JNIHandles::make_weak_global(mem_name); ++ MutexLocker ml(MemberNameTable_lock); ++ assert(0 <= index && index < idnum_allocated_count(), "index is out of bounds"); ++ DEBUG_ONLY(No_Safepoint_Verifier nsv); + -+ for (Limit limit : Limit.values()) { -+ formatter = new Formatter(); -+ System.out.println(formatter.format("%30s %15d %15d %15d %30s", -+ limit.name(), -+ securityManager.getLimit(limit), -+ totalValue[limit.ordinal()], -+ values[limit.ordinal()], -+ names[limit.ordinal()])); -+ } -+ } ++ if (_member_names == NULL) { ++ _member_names = new (ResourceObj::C_HEAP, mtClass) MemberNameTable(idnum_allocated_count()); ++ } ++ _member_names->add_member_name(index, mem_name_wref); +} ---- jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java 2014-04-20 12:39:46.000000000 -0700 -@@ -0,0 +1,540 @@ -+/* -+ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. -+ * 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.org.apache.xerces.internal.utils; -+ -+import com.sun.org.apache.xerces.internal.impl.Constants; -+import com.sun.org.apache.xerces.internal.util.SecurityManager; -+ -+/** -+ * This class manages standard and implementation-specific limitations. -+ * -+ */ -+public final class XMLSecurityManager { + -+ /** -+ * States of the settings of a property, in the order: default value, value -+ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system -+ * properties, and jaxp api properties -+ */ -+ public static enum State { -+ //this order reflects the overriding order ++oop instanceKlass::get_member_name(int index) { ++ MutexLocker ml(MemberNameTable_lock); ++ assert(0 <= index && index < idnum_allocated_count(), "index is out of bounds"); ++ DEBUG_ONLY(No_Safepoint_Verifier nsv); + -+ DEFAULT("default"), FSP("FEATURE_SECURE_PROCESSING"), -+ JAXPDOTPROPERTIES("jaxp.properties"), SYSTEMPROPERTY("system property"), -+ APIPROPERTY("property"); ++ if (_member_names == NULL) { ++ return NULL; ++ } ++ oop mem_name =_member_names->get_member_name(index); ++ return mem_name; ++} + -+ final String literal; -+ State(String literal) { -+ this.literal = literal; -+ } + // ----------------------------------------------------------------------------------------------------- + #ifndef PRODUCT + +--- ./hotspot/src/share/vm/oops/instanceKlass.hpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/oops/instanceKlass.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -94,6 +94,7 @@ + class nmethodBucket; + class PreviousVersionNode; + class JvmtiCachedClassFieldMap; ++class MemberNameTable; + + // This is used in iterators below. + class FieldClosure: public StackObj { +@@ -265,6 +266,7 @@ + int _vtable_len; // length of Java vtable (in words) + int _itable_len; // length of Java itable (in words) + OopMapCache* volatile _oop_map_cache; // OopMapCache for all methods in the klass (allocated lazily) ++ MemberNameTable* _member_names; // Member names + JNIid* _jni_ids; // First JNI identifier for static fields in this class + jmethodID* _methods_jmethod_ids; // jmethodIDs corresponding to method_idnum, or NULL if none + int* _methods_cached_itable_indices; // itable_index cache for JNI invoke corresponding to methods idnum, or NULL +@@ -972,6 +974,12 @@ + // jvm support + jint compute_modifier_flags(TRAPS) const; + ++ // JSR-292 support ++ MemberNameTable* member_names() { return _member_names; } ++ void set_member_names(MemberNameTable* member_names) { _member_names = member_names; } ++ void add_member_name(int index, Handle member_name); ++ oop get_member_name(int index); + -+ String literal() { -+ return literal; -+ } + public: + // JVMTI support + jint jvmti_class_status() const; +--- ./hotspot/src/share/vm/oops/objArrayKlass.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/oops/objArrayKlass.cpp 2014-04-19 01:27:07.000000000 -0700 +@@ -149,7 +149,7 @@ + if (element_is_null || + Klass::cast((new_val->klass()))->is_subtype_of(bound)) { + bs->write_ref_field_pre(p, new_val); +- *p = *from; ++ *p = element; + } else { + // We must do a barrier to cover the partial copy. + const size_t pd = pointer_delta(p, dst, (size_t)heapOopSize); +--- ./hotspot/src/share/vm/opto/bytecodeInfo.cpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/bytecodeInfo.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -103,7 +103,7 @@ + // Allows targeted inlining + if(callee_method->should_inline()) { + *wci_result = *(WarmCallInfo::always_hot()); +- if (PrintInlining && Verbose) { ++ if (C->print_inlining() && Verbose) { + CompileTask::print_inline_indent(inline_level()); + tty->print_cr("Inlined method is hot: "); + } +@@ -117,7 +117,7 @@ + if(callee_method->interpreter_throwout_count() > InlineThrowCount && + size < InlineThrowMaxSize ) { + wci_result->set_profit(wci_result->profit() * 100); +- if (PrintInlining && Verbose) { ++ if (C->print_inlining() && Verbose) { + CompileTask::print_inline_indent(inline_level()); + tty->print_cr("Inlined method with many throws (throws=%d):", callee_method->interpreter_throwout_count()); + } +@@ -468,7 +468,7 @@ + C->log()->inline_fail(inline_msg); + } + } +- if (PrintInlining) { ++ if (C->print_inlining()) { + C->print_inlining(callee_method, inline_level(), caller_bci, inline_msg); + if (callee_method == NULL) tty->print(" callee not monotonic or profiled"); + if (Verbose && callee_method) { +@@ -517,7 +517,7 @@ + + #ifndef PRODUCT + if (UseOldInlining && InlineWarmCalls +- && (PrintOpto || PrintOptoInlining || PrintInlining)) { ++ && (PrintOpto || C->print_inlining())) { + bool cold = wci.is_cold(); + bool hot = !cold && wci.is_hot(); + bool old_cold = !success; +@@ -594,7 +594,7 @@ + callee_method->is_compiled_lambda_form()) { + max_inline_level_adjust += 1; // don't count method handle calls from java.lang.invoke implem + } +- if (max_inline_level_adjust != 0 && PrintInlining && (Verbose || WizardMode)) { ++ if (max_inline_level_adjust != 0 && C->print_inlining() && (Verbose || WizardMode)) { + CompileTask::print_inline_indent(inline_level()); + tty->print_cr(" \\-> discounting inline depth"); + } +--- ./hotspot/src/share/vm/opto/c2_globals.hpp 2013-09-06 11:22:13.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/c2_globals.hpp 2014-06-06 19:56:23.000000000 -0700 +@@ -173,6 +173,9 @@ + product_pd(intx, LoopUnrollLimit, \ + "Unroll loop bodies with node count less than this") \ + \ ++ product(intx, LoopMaxUnroll, 16, \ ++ "Maximum number of unrolls for main loop") \ ++ \ + product(intx, LoopUnrollMin, 4, \ + "Minimum number of unroll loop bodies before checking progress" \ + "of rounds of unroll,optimize,..") \ +--- ./hotspot/src/share/vm/opto/callGenerator.hpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/callGenerator.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -158,8 +158,9 @@ + virtual void print_inlining_late(const char* msg) { ShouldNotReachHere(); } + + static void print_inlining(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) { +- if (PrintInlining) ++ if (C->print_inlining()) { + C->print_inlining(callee, inline_level, bci, msg); + } -+ -+ /** -+ * Limits managed by the security manager -+ */ -+ public static enum Limit { -+ -+ ENTITY_EXPANSION_LIMIT(Constants.JDK_ENTITY_EXPANSION_LIMIT, Constants.SP_ENTITY_EXPANSION_LIMIT, 0, 64000), -+ MAX_OCCUR_NODE_LIMIT(Constants.JDK_MAX_OCCUR_LIMIT, Constants.SP_MAX_OCCUR_LIMIT, 0, 5000), -+ ELEMENT_ATTRIBUTE_LIMIT(Constants.JDK_ELEMENT_ATTRIBUTE_LIMIT, Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), -+ TOTAL_ENTITY_SIZE_LIMIT(Constants.JDK_TOTAL_ENTITY_SIZE_LIMIT, Constants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), -+ GENEAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENEAL_ENTITY_SIZE_LIMIT, Constants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), -+ PARAMETER_ENTITY_SIZE_LIMIT(Constants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, Constants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); -+ -+ final String apiProperty; -+ final String systemProperty; -+ final int defaultValue; -+ final int secureValue; -+ -+ Limit(String apiProperty, String systemProperty, int value, int secureValue) { -+ this.apiProperty = apiProperty; -+ this.systemProperty = systemProperty; -+ this.defaultValue = value; -+ this.secureValue = secureValue; -+ } -+ -+ public boolean equalsAPIPropertyName(String propertyName) { -+ return (propertyName == null) ? false : apiProperty.equals(propertyName); -+ } -+ -+ public boolean equalsSystemPropertyName(String propertyName) { -+ return (propertyName == null) ? false : systemProperty.equals(propertyName); -+ } -+ -+ public String apiProperty() { -+ return apiProperty; -+ } -+ -+ String systemProperty() { -+ return systemProperty; -+ } -+ -+ int defaultValue() { -+ return defaultValue; -+ } -+ -+ int secureValue() { -+ return secureValue; -+ } + } + }; + +--- ./hotspot/src/share/vm/opto/coalesce.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/coalesce.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -135,20 +135,26 @@ + // After cloning some rematerialized instruction, clone any MachProj's that + // follow it. Example: Intel zero is XOR, kills flags. Sparc FP constants + // use G3 as an address temp. +-int PhaseChaitin::clone_projs( Block *b, uint idx, Node *con, Node *copy, uint &maxlrg ) { +- Block *bcon = _cfg._bbs[con->_idx]; +- uint cindex = bcon->find_node(con); +- Node *con_next = bcon->_nodes[cindex+1]; +- if( con_next->in(0) != con || !con_next->is_MachProj() ) +- return false; // No MachProj's follow +- +- // Copy kills after the cloned constant +- Node *kills = con_next->clone(); +- kills->set_req( 0, copy ); +- b->_nodes.insert( idx, kills ); +- _cfg._bbs.map( kills->_idx, b ); +- new_lrg( kills, maxlrg++ ); +- return true; ++int PhaseChaitin::clone_projs(Block* b, uint idx, Node* orig, Node* copy, uint& max_lrg_id) { ++ assert(b->find_node(copy) == (idx - 1), "incorrect insert index for copy kill projections"); ++ DEBUG_ONLY( Block* borig = _cfg._bbs[orig->_idx]; ) ++ int found_projs = 0; ++ uint cnt = orig->outcnt(); ++ for (uint i = 0; i < cnt; i++) { ++ Node* proj = orig->raw_out(i); ++ if (proj->is_MachProj()) { ++ assert(proj->outcnt() == 0, "only kill projections are expected here"); ++ assert(_cfg._bbs[proj->_idx] == borig, "incorrect block for kill projections"); ++ found_projs++; ++ // Copy kill projections after the cloned node ++ Node* kills = proj->clone(); ++ kills->set_req(0, copy); ++ b->_nodes.insert(idx++, kills); ++ _cfg._bbs.map(kills->_idx, b); ++ new_lrg(kills, max_lrg_id++); + } ++ } ++ return found_projs; + } + + //------------------------------compact---------------------------------------- +@@ -464,8 +470,7 @@ + copy = m->clone(); + // Insert the copy in the basic block, just before us + b->_nodes.insert( l++, copy ); +- if( _phc.clone_projs( b, l, m, copy, _phc._maxlrg ) ) +- l++; ++ l += _phc.clone_projs(b, l, m, copy, _phc._maxlrg); + } else { + const RegMask *rm = C->matcher()->idealreg2spillmask[m->ideal_reg()]; + copy = new (C) MachSpillCopyNode( m, *rm, *rm ); +--- ./hotspot/src/share/vm/opto/compile.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/compile.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -642,7 +642,7 @@ + _inlining_progress(false), + _inlining_incrementally(false), + _print_inlining_list(NULL), +- _print_inlining(0) { ++ _print_inlining_idx(0) { + C = this; + + CompileWrapper cw(this); +@@ -667,6 +667,8 @@ + set_print_assembly(print_opto_assembly); + set_parsed_irreducible_loop(false); + #endif ++ set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining)); ++ set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics")); + + if (ProfileTraps) { + // Make sure the method being compiled gets its own MDO, +@@ -698,7 +700,7 @@ + PhaseGVN gvn(node_arena(), estimated_size); + set_initial_gvn(&gvn); + +- if (PrintInlining || PrintIntrinsics NOT_PRODUCT( || PrintOptoInlining)) { ++ if (print_inlining() || print_intrinsics()) { + _print_inlining_list = new (comp_arena())GrowableArray(comp_arena(), 1, 1, PrintInliningBuffer()); + } + { // Scope for timing the parser +@@ -832,6 +834,7 @@ + } + #endif + ++ NOT_PRODUCT( verify_barriers(); ) + // Now that we know the size of all the monitors we can add a fixed slot + // for the original deopt pc. + +@@ -924,7 +927,7 @@ + _inlining_progress(false), + _inlining_incrementally(false), + _print_inlining_list(NULL), +- _print_inlining(0) { ++ _print_inlining_idx(0) { + C = this; + + #ifndef PRODUCT +@@ -3237,6 +3240,72 @@ + } + } + } + -+ /** -+ * Map old property names with the new ones -+ */ -+ public static enum NameMap { -+ -+ ENTITY_EXPANSION_LIMIT(Constants.SP_ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT), -+ MAX_OCCUR_NODE_LIMIT(Constants.SP_MAX_OCCUR_LIMIT, Constants.MAX_OCCUR_LIMIT), -+ ELEMENT_ATTRIBUTE_LIMIT(Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, Constants.ELEMENT_ATTRIBUTE_LIMIT); -+ final String newName; -+ final String oldName; ++// Verify GC barriers consistency ++// Currently supported: ++// - G1 pre-barriers (see GraphKit::g1_write_barrier_pre()) ++void Compile::verify_barriers() { ++ if (UseG1GC) { ++ // Verify G1 pre-barriers ++ const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() + PtrQueue::byte_offset_of_active()); ++ ++ ResourceArea *area = Thread::current()->resource_area(); ++ Unique_Node_List visited(area); ++ Node_List worklist(area); ++ // We're going to walk control flow backwards starting from the Root ++ worklist.push(_root); ++ while (worklist.size() > 0) { ++ Node* x = worklist.pop(); ++ if (x == NULL || x == top()) continue; ++ if (visited.member(x)) { ++ continue; ++ } else { ++ visited.push(x); ++ } + -+ NameMap(String newName, String oldName) { -+ this.newName = newName; -+ this.oldName = oldName; ++ if (x->is_Region()) { ++ for (uint i = 1; i < x->req(); i++) { ++ worklist.push(x->in(i)); + } -+ -+ String getOldName(String newName) { -+ if (newName.equals(this.newName)) { -+ return oldName; ++ } else { ++ worklist.push(x->in(0)); ++ // We are looking for the pattern: ++ // /->ThreadLocal ++ // If->Bool->CmpI->LoadB->AddP->ConL(marking_offset) ++ // \->ConI(0) ++ // We want to verify that the If and the LoadB have the same control ++ // See GraphKit::g1_write_barrier_pre() ++ if (x->is_If()) { ++ IfNode *iff = x->as_If(); ++ if (iff->in(1)->is_Bool() && iff->in(1)->in(1)->is_Cmp()) { ++ CmpNode *cmp = iff->in(1)->in(1)->as_Cmp(); ++ if (cmp->Opcode() == Op_CmpI && cmp->in(2)->is_Con() && cmp->in(2)->bottom_type()->is_int()->get_con() == 0 ++ && cmp->in(1)->is_Load()) { ++ LoadNode* load = cmp->in(1)->as_Load(); ++ if (load->Opcode() == Op_LoadB && load->in(2)->is_AddP() && load->in(2)->in(2)->Opcode() == Op_ThreadLocal ++ && load->in(2)->in(3)->is_Con() ++ && load->in(2)->in(3)->bottom_type()->is_intptr_t()->get_con() == marking_offset) { ++ ++ Node* if_ctrl = iff->in(0); ++ Node* load_ctrl = load->in(0); ++ ++ if (if_ctrl != load_ctrl) { ++ // Skip possible CProj->NeverBranch in infinite loops ++ if ((if_ctrl->is_Proj() && if_ctrl->Opcode() == Op_CProj) ++ && (if_ctrl->in(0)->is_MultiBranch() && if_ctrl->in(0)->Opcode() == Op_NeverBranch)) { ++ if_ctrl = if_ctrl->in(0)->in(0); ++ } ++ } ++ assert(load_ctrl != NULL && if_ctrl == load_ctrl, "controls must match"); ++ } + } -+ return null; ++ } + } ++ } + } -+ private static final int NO_LIMIT = 0; -+ /** -+ * Values of the properties -+ */ -+ private final int[] values; -+ /** -+ * States of the settings for each property -+ */ -+ private State[] states; -+ /** -+ * Flag indicating if secure processing is set -+ */ -+ boolean secureProcessing; -+ -+ /** -+ * States that determine if properties are set explicitly -+ */ -+ private boolean[] isSet; -+ -+ -+ /** -+ * Index of the special entityCountInfo property -+ */ -+ private int indexEntityCountInfo = 10000; -+ private String printEntityCountInfo = ""; -+ -+ /** -+ * Default constructor. Establishes default values for known security -+ * vulnerabilities. -+ */ -+ public XMLSecurityManager() { -+ this(false); -+ } ++ } ++} + -+ /** -+ * Instantiate Security Manager in accordance with the status of -+ * secure processing -+ * @param secureProcessing -+ */ -+ public XMLSecurityManager(boolean secureProcessing) { -+ values = new int[Limit.values().length]; -+ states = new State[Limit.values().length]; -+ isSet = new boolean[Limit.values().length]; -+ this.secureProcessing = secureProcessing; -+ for (Limit limit : Limit.values()) { -+ if (secureProcessing) { -+ values[limit.ordinal()] = limit.secureValue; -+ states[limit.ordinal()] = State.FSP; -+ } else { -+ values[limit.ordinal()] = limit.defaultValue(); -+ states[limit.ordinal()] = State.DEFAULT; -+ } -+ } -+ //read system properties or jaxp.properties -+ readSystemProperties(); + #endif + + // The Compile object keeps track of failure reasons separately from the ciEnv. +@@ -3510,7 +3579,7 @@ + } + + void Compile::dump_inlining() { +- if (PrintInlining || PrintIntrinsics NOT_PRODUCT( || PrintOptoInlining)) { ++ if (print_inlining() || print_intrinsics()) { + // Print inlining message for candidates that we couldn't inline + // for lack of space or non constant receiver + for (int i = 0; i < _late_inlines.length(); i++) { +@@ -3534,7 +3603,7 @@ + } + } + for (int i = 0; i < _print_inlining_list->length(); i++) { +- tty->print(_print_inlining_list->at(i).ss()->as_string()); ++ tty->print(_print_inlining_list->adr_at(i)->ss()->as_string()); + } + } + } +--- ./hotspot/src/share/vm/opto/compile.hpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/compile.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + #include "runtime/deoptimization.hpp" + #include "runtime/vmThread.hpp" + #include "trace/tracing.hpp" ++#include "utilities/ticks.hpp" + + class Block; + class Bundle; +@@ -284,6 +285,8 @@ + bool _do_method_data_update; // True if we generate code to update methodDataOops + int _AliasLevel; // Locally-adjusted version of AliasLevel flag. + bool _print_assembly; // True if we should dump assembly code for this compilation ++ bool _print_inlining; // True if we should print inlining for this compilation ++ bool _print_intrinsics; // True if we should print intrinsics for this compilation + #ifndef PRODUCT + bool _trace_opto_output; + bool _parsed_irreducible_loop; // True if ciTypeFlow detected irreducible loops during parsing +@@ -384,7 +387,7 @@ + }; + + GrowableArray* _print_inlining_list; +- int _print_inlining; ++ int _print_inlining_idx; + + // Only keep nodes in the expensive node list that need to be optimized + void cleanup_expensive_nodes(PhaseIterGVN &igvn); +@@ -396,24 +399,24 @@ + public: + + outputStream* print_inlining_stream() const { +- return _print_inlining_list->at(_print_inlining).ss(); ++ return _print_inlining_list->adr_at(_print_inlining_idx)->ss(); + } + + void print_inlining_skip(CallGenerator* cg) { +- if (PrintInlining) { +- _print_inlining_list->at(_print_inlining).set_cg(cg); +- _print_inlining++; +- _print_inlining_list->insert_before(_print_inlining, PrintInliningBuffer()); ++ if (_print_inlining) { ++ _print_inlining_list->adr_at(_print_inlining_idx)->set_cg(cg); ++ _print_inlining_idx++; ++ _print_inlining_list->insert_before(_print_inlining_idx, PrintInliningBuffer()); + } + } + + void print_inlining_insert(CallGenerator* cg) { +- if (PrintInlining) { ++ if (_print_inlining) { + for (int i = 0; i < _print_inlining_list->length(); i++) { +- if (_print_inlining_list->at(i).cg() == cg) { ++ if (_print_inlining_list->adr_at(i)->cg() == cg) { + _print_inlining_list->insert_before(i+1, PrintInliningBuffer()); +- _print_inlining = i+1; +- _print_inlining_list->at(i).set_cg(NULL); ++ _print_inlining_idx = i+1; ++ _print_inlining_list->adr_at(i)->set_cg(NULL); + return; + } + } +@@ -536,6 +539,10 @@ + int AliasLevel() const { return _AliasLevel; } + bool print_assembly() const { return _print_assembly; } + void set_print_assembly(bool z) { _print_assembly = z; } ++ bool print_inlining() const { return _print_inlining; } ++ void set_print_inlining(bool z) { _print_inlining = z; } ++ bool print_intrinsics() const { return _print_intrinsics; } ++ void set_print_intrinsics(bool z) { _print_intrinsics = z; } + // check the CompilerOracle for special behaviours for this compile + bool method_has_option(const char * option) { + return method() != NULL && method()->has_option(option); +@@ -550,20 +557,19 @@ + bool has_method_handle_invokes() const { return _has_method_handle_invokes; } + void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; } + +- jlong _latest_stage_start_counter; ++ Ticks _latest_stage_start_counter; + + void begin_method() { + #ifndef PRODUCT + if (_printer) _printer->begin_method(this); + #endif +- C->_latest_stage_start_counter = os::elapsed_counter(); ++ C->_latest_stage_start_counter.stamp(); + } + + void print_method(CompilerPhaseType cpt, int level = 1) { +- EventCompilerPhase event(UNTIMED); ++ EventCompilerPhase event; + if (event.should_commit()) { + event.set_starttime(C->_latest_stage_start_counter); +- event.set_endtime(os::elapsed_counter()); + event.set_phase((u1) cpt); + event.set_compileID(C->_compile_id); + event.set_phaseLevel(level); +@@ -574,14 +580,13 @@ + #ifndef PRODUCT + if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level); + #endif +- C->_latest_stage_start_counter = os::elapsed_counter(); ++ C->_latest_stage_start_counter.stamp(); + } + + void end_method(int level = 1) { +- EventCompilerPhase event(UNTIMED); ++ EventCompilerPhase event; + if (event.should_commit()) { + event.set_starttime(C->_latest_stage_start_counter); +- event.set_endtime(os::elapsed_counter()); + event.set_phase((u1) PHASE_END); + event.set_compileID(C->_compile_id); + event.set_phaseLevel(level); +@@ -1091,6 +1096,9 @@ + // Print bytecodes, including the scope inlining tree + void print_codes(); + ++ // Verify GC barrier patterns ++ void verify_barriers() PRODUCT_RETURN; ++ + // End-of-run dumps. + static void print_statistics() PRODUCT_RETURN; + +--- ./hotspot/src/share/vm/opto/doCall.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/doCall.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -42,9 +42,9 @@ + #include "runtime/sharedRuntime.hpp" + + void trace_type_profile(Compile* C, ciMethod *method, int depth, int bci, ciMethod *prof_method, ciKlass *prof_klass, int site_count, int receiver_count) { +- if (TraceTypeProfile || PrintInlining NOT_PRODUCT(|| PrintOptoInlining)) { ++ if (TraceTypeProfile || C->print_inlining()) { + outputStream* out = tty; +- if (!PrintInlining) { ++ if (!C->print_inlining()) { + if (NOT_PRODUCT(!PrintOpto &&) !PrintCompilation) { + method->print_short_name(); + tty->cr(); +--- ./hotspot/src/share/vm/opto/graphKit.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/graphKit.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -3596,7 +3596,7 @@ + Node* marking = __ load(__ ctrl(), marking_adr, TypeInt::INT, active_type, Compile::AliasIdxRaw); + + // if (!marking) +- __ if_then(marking, BoolTest::ne, zero); { ++ __ if_then(marking, BoolTest::ne, zero, unlikely); { + BasicType index_bt = TypeX_X->basic_type(); + assert(sizeof(size_t) == type2aelembytes(index_bt), "Loading G1 PtrQueue::_index with wrong size."); + Node* index = __ load(__ ctrl(), index_adr, TypeX_X, index_bt, Compile::AliasIdxRaw); +@@ -3604,7 +3604,7 @@ + if (do_load) { + // load original value + // alias_idx correct?? +- pre_val = __ load(no_ctrl, adr, val_type, bt, alias_idx); ++ pre_val = __ load(__ ctrl(), adr, val_type, bt, alias_idx); + } + + // if (pre_val != NULL) +@@ -3701,7 +3701,8 @@ + Node* no_base = __ top(); + float likely = PROB_LIKELY(0.999); + float unlikely = PROB_UNLIKELY(0.999); +- Node* zero = __ ConI(0); ++ Node* young_card = __ ConI((jint)G1SATBCardTableModRefBS::g1_young_card_val()); ++ Node* dirty_card = __ ConI((jint)CardTableModRefBS::dirty_card_val()); + Node* zeroX = __ ConX(0); + + // Get the alias_index for raw card-mark memory +@@ -3757,8 +3758,16 @@ + // load the original value of the card + Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw); + +- __ if_then(card_val, BoolTest::ne, zero); { +- g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf); ++ __ if_then(card_val, BoolTest::ne, young_card); { ++ sync_kit(ideal); ++ // Use Op_MemBarVolatile to achieve the effect of a StoreLoad barrier. ++ insert_mem_bar(Op_MemBarVolatile, oop_store); ++ __ sync_kit(this); ++ ++ Node* card_val_reload = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw); ++ __ if_then(card_val_reload, BoolTest::ne, dirty_card); { ++ g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf); ++ } __ end_if(); + } __ end_if(); + } __ end_if(); + } __ end_if(); +--- ./hotspot/src/share/vm/opto/library_call.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/library_call.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -525,7 +525,7 @@ + Compile* C = kit.C; + int nodes = C->unique(); + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + char buf[1000]; + const char* str = vmIntrinsics::short_name_as_C_string(intrinsic_id(), buf, sizeof(buf)); + tty->print_cr("Intrinsic %s", str); +@@ -536,7 +536,7 @@ + + // Try to inline the intrinsic. + if (kit.try_to_inline()) { +- if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ++ if (C->print_intrinsics() || C->print_inlining()) { + C->print_inlining(callee, jvms->depth() - 1, bci, is_virtual() ? "(intrinsic, virtual)" : "(intrinsic)"); + } + C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_worked); +@@ -552,7 +552,7 @@ + } + + // The intrinsic bailed out +- if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ++ if (C->print_intrinsics() || C->print_inlining()) { + if (jvms->has_method()) { + // Not a root compile. + const char* msg = is_virtual() ? "failed to inline (intrinsic, virtual)" : "failed to inline (intrinsic)"; +@@ -574,7 +574,7 @@ + int nodes = C->unique(); + #ifndef PRODUCT + assert(is_predicted(), "sanity"); +- if ((PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + char buf[1000]; + const char* str = vmIntrinsics::short_name_as_C_string(intrinsic_id(), buf, sizeof(buf)); + tty->print_cr("Predicate for intrinsic %s", str); +@@ -585,7 +585,7 @@ + + Node* slow_ctl = kit.try_to_predicate(); + if (!kit.failing()) { +- if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ++ if (C->print_intrinsics() || C->print_inlining()) { + C->print_inlining(callee, jvms->depth() - 1, bci, is_virtual() ? "(intrinsic, virtual)" : "(intrinsic)"); + } + C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_worked); +@@ -599,7 +599,7 @@ + } + + // The intrinsic bailed out +- if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ++ if (C->print_intrinsics() || C->print_inlining()) { + if (jvms->has_method()) { + // Not a root compile. + const char* msg = "failed to generate predicate for intrinsic"; +@@ -2262,7 +2262,7 @@ + const TypeOopPtr* tjp = TypeOopPtr::make_from_klass(sharpened_klass); + + #ifndef PRODUCT +- if (PrintIntrinsics || PrintInlining || PrintOptoInlining) { ++ if (C->print_intrinsics() || C->print_inlining()) { + tty->print(" from base type: "); adr_type->dump(); + tty->print(" sharpened value: "); tjp->dump(); + } +@@ -3158,7 +3158,7 @@ + if (mirror_con == NULL) return false; // cannot happen? + + #ifndef PRODUCT +- if (PrintIntrinsics || PrintInlining || PrintOptoInlining) { ++ if (C->print_intrinsics() || C->print_inlining()) { + ciType* k = mirror_con->java_mirror_type(); + if (k) { + tty->print("Inlining %s on constant Class ", vmIntrinsics::name_at(intrinsic_id())); +@@ -3846,7 +3846,7 @@ + // Method.invoke() and auxiliary frames. + bool LibraryCallKit::inline_native_Reflection_getCallerClass() { + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining || PrintOptoInlining) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + tty->print_cr("Attempting to inline sun.reflect.Reflection.getCallerClass"); + } + #endif +@@ -3858,7 +3858,7 @@ + const TypeInt* caller_depth_type = _gvn.type(caller_depth_node)->isa_int(); + if (caller_depth_type == NULL || !caller_depth_type->is_con()) { + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining || PrintOptoInlining) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + tty->print_cr(" Bailing out because caller depth was not a constant"); + } + #endif +@@ -3873,7 +3873,7 @@ + int caller_depth = caller_depth_type->get_con() - 1; + if (caller_depth < 0) { + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining || PrintOptoInlining) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + tty->print_cr(" Bailing out because caller depth was %d", caller_depth); + } + #endif +@@ -3882,7 +3882,7 @@ + + if (!jvms()->has_method()) { + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining || PrintOptoInlining) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + tty->print_cr(" Bailing out because intrinsic was inlined at top level"); + } + #endif +@@ -3919,7 +3919,7 @@ + + if (inlining_depth == 0) { + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining || PrintOptoInlining) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + tty->print_cr(" Bailing out because caller depth (%d) exceeded inlining depth (%d)", caller_depth_type->get_con(), _depth); + tty->print_cr(" JVM state at this point:"); + for (int i = _depth; i >= 1; i--) { +@@ -3939,7 +3939,7 @@ + set_result(makecon(TypeInstPtr::make(caller_mirror))); + + #ifndef PRODUCT +- if ((PrintIntrinsics || PrintInlining || PrintOptoInlining) && Verbose) { ++ if ((C->print_intrinsics() || C->print_inlining()) && Verbose) { + tty->print_cr(" Succeeded: caller = %s.%s, caller depth = %d, depth = %d", caller_klass->name()->as_utf8(), caller_jvms->method()->name()->as_utf8(), caller_depth_type->get_con(), _depth); + tty->print_cr(" JVM state at this point:"); + for (int i = _depth; i >= 1; i--) { +--- ./hotspot/src/share/vm/opto/loopTransform.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/loopTransform.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -623,8 +623,6 @@ + } + + +-#define MAX_UNROLL 16 // maximum number of unrolls for main loop +- + //------------------------------policy_unroll---------------------------------- + // Return TRUE or FALSE if the loop should be unrolled or not. Unroll if + // the loop is a CountedLoop and the body is small enough. +@@ -641,7 +639,7 @@ + if (cl->trip_count() <= (uint)(cl->is_normal_loop() ? 2 : 1)) return false; + + int future_unroll_ct = cl->unrolled_count() * 2; +- if (future_unroll_ct > MAX_UNROLL) return false; ++ if (future_unroll_ct > LoopMaxUnroll) return false; + + // Check for initial stride being a small enough constant + if (abs(cl->stride_con()) > (1<<2)*future_unroll_ct) return false; +@@ -1956,7 +1954,7 @@ + // Find loads off the surviving projection; remove their control edge + for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) { + Node* cd = dp->fast_out(i); // Control-dependent node +- if( cd->is_Load() ) { // Loads can now float around in the loop ++ if (cd->is_Load() && cd->depends_only_on_test()) { // Loads can now float around in the loop + // Allow the load to float around in the loop, or before it + // but NOT before the pre-loop. + _igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL +--- ./hotspot/src/share/vm/opto/matcher.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/matcher.cpp 2014-04-19 01:27:07.000000000 -0700 +@@ -464,17 +464,17 @@ + C->FIRST_STACK_mask().Clear(); + + // Add in the incoming argument area +- OptoReg::Name init = OptoReg::add(_old_SP, C->out_preserve_stack_slots()); +- for (i = init; i < _in_arg_limit; i = OptoReg::add(i,1)) ++ OptoReg::Name init_in = OptoReg::add(_old_SP, C->out_preserve_stack_slots()); ++ for (i = init_in; i < _in_arg_limit; i = OptoReg::add(i,1)) { + C->FIRST_STACK_mask().Insert(i); +- ++ } + // Add in all bits past the outgoing argument area + guarantee(RegMask::can_represent_arg(OptoReg::add(_out_arg_limit,-1)), + "must be able to represent all call arguments in reg mask"); +- init = _out_arg_limit; +- for (i = init; RegMask::can_represent(i); i = OptoReg::add(i,1)) ++ OptoReg::Name init = _out_arg_limit; ++ for (i = init; RegMask::can_represent(i); i = OptoReg::add(i,1)) { + C->FIRST_STACK_mask().Insert(i); +- ++ } + // Finally, set the "infinite stack" bit. + C->FIRST_STACK_mask().set_AllStack(); + +@@ -506,16 +506,36 @@ + idealreg2spillmask[Op_VecS]->OR(C->FIRST_STACK_mask()); + } + if (Matcher::vector_size_supported(T_FLOAT,2)) { ++ // For VecD we need dual alignment and 8 bytes (2 slots) for spills. ++ // RA guarantees such alignment since it is needed for Double and Long values. + *idealreg2spillmask[Op_VecD] = *idealreg2regmask[Op_VecD]; + idealreg2spillmask[Op_VecD]->OR(aligned_stack_mask); + } + if (Matcher::vector_size_supported(T_FLOAT,4)) { ++ // For VecX we need quadro alignment and 16 bytes (4 slots) for spills. ++ // ++ // RA can use input arguments stack slots for spills but until RA ++ // we don't know frame size and offset of input arg stack slots. ++ // ++ // Exclude last input arg stack slots to avoid spilling vectors there ++ // otherwise vector spills could stomp over stack slots in caller frame. ++ OptoReg::Name in = OptoReg::add(_in_arg_limit, -1); ++ for (int k = 1; (in >= init_in) && (k < RegMask::SlotsPerVecX); k++) { ++ aligned_stack_mask.Remove(in); ++ in = OptoReg::add(in, -1); + } -+ -+ /** -+ * Setting FEATURE_SECURE_PROCESSING explicitly -+ */ -+ public void setSecureProcessing(boolean secure) { -+ secureProcessing = secure; -+ for (Limit limit : Limit.values()) { -+ if (secure) { -+ setLimit(limit.ordinal(), State.FSP, limit.secureValue()); -+ } else { -+ setLimit(limit.ordinal(), State.FSP, limit.defaultValue()); -+ } -+ } + aligned_stack_mask.clear_to_sets(RegMask::SlotsPerVecX); + assert(aligned_stack_mask.is_AllStack(), "should be infinite stack"); + *idealreg2spillmask[Op_VecX] = *idealreg2regmask[Op_VecX]; + idealreg2spillmask[Op_VecX]->OR(aligned_stack_mask); + } + if (Matcher::vector_size_supported(T_FLOAT,8)) { ++ // For VecY we need octo alignment and 32 bytes (8 slots) for spills. ++ OptoReg::Name in = OptoReg::add(_in_arg_limit, -1); ++ for (int k = 1; (in >= init_in) && (k < RegMask::SlotsPerVecY); k++) { ++ aligned_stack_mask.Remove(in); ++ in = OptoReg::add(in, -1); + } + aligned_stack_mask.clear_to_sets(RegMask::SlotsPerVecY); + assert(aligned_stack_mask.is_AllStack(), "should be infinite stack"); + *idealreg2spillmask[Op_VecY] = *idealreg2regmask[Op_VecY]; +--- ./hotspot/src/share/vm/opto/memnode.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/memnode.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1957,6 +1957,11 @@ + if (t != NULL) { + // constant oop => constant klass + if (offset == java_lang_Class::array_klass_offset_in_bytes()) { ++ if (t->is_void()) { ++ // We cannot create a void array. Since void is a primitive type return null ++ // klass. Users of this result need to do a null check on the returned klass. ++ return TypePtr::NULL_PTR; ++ } + return TypeKlassPtr::make(ciArrayKlass::make(t)); + } + if (!t->is_klass()) { +--- ./hotspot/src/share/vm/opto/memnode.hpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/memnode.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -204,6 +204,17 @@ + protected: + const Type* load_array_final_field(const TypeKlassPtr *tkls, + ciKlass* klass) const; ++ // depends_only_on_test is almost always true, and needs to be almost always ++ // true to enable key hoisting & commoning optimizations. However, for the ++ // special case of RawPtr loads from TLS top & end, and other loads performed by ++ // GC barriers, the control edge carries the dependence preventing hoisting past ++ // a Safepoint instead of the memory edge. (An unfortunate consequence of having ++ // Safepoints not set Raw Memory; itself an unfortunate consequence of having Nodes ++ // which produce results (new raw memory state) inside of loops preventing all ++ // manner of other optimizations). Basically, it's ugly but so is the alternative. ++ // See comment in macro.cpp, around line 125 expand_allocate_common(). ++ virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; } + -+ /** -+ * Return the state of secure processing -+ * @return the state of secure processing -+ */ -+ public boolean isSecureProcessing() { -+ return secureProcessing; -+ } + }; + + //------------------------------LoadBNode-------------------------------------- +@@ -370,16 +381,6 @@ + virtual uint ideal_reg() const { return Op_RegP; } + virtual int store_Opcode() const { return Op_StoreP; } + virtual BasicType memory_type() const { return T_ADDRESS; } +- // depends_only_on_test is almost always true, and needs to be almost always +- // true to enable key hoisting & commoning optimizations. However, for the +- // special case of RawPtr loads from TLS top & end, the control edge carries +- // the dependence preventing hoisting past a Safepoint instead of the memory +- // edge. (An unfortunate consequence of having Safepoints not set Raw +- // Memory; itself an unfortunate consequence of having Nodes which produce +- // results (new raw memory state) inside of loops preventing all manner of +- // other optimizations). Basically, it's ugly but so is the alternative. +- // See comment in macro.cpp, around line 125 expand_allocate_common(). +- virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; } + }; + + +@@ -393,16 +394,6 @@ + virtual uint ideal_reg() const { return Op_RegN; } + virtual int store_Opcode() const { return Op_StoreN; } + virtual BasicType memory_type() const { return T_NARROWOOP; } +- // depends_only_on_test is almost always true, and needs to be almost always +- // true to enable key hoisting & commoning optimizations. However, for the +- // special case of RawPtr loads from TLS top & end, the control edge carries +- // the dependence preventing hoisting past a Safepoint instead of the memory +- // edge. (An unfortunate consequence of having Safepoints not set Raw +- // Memory; itself an unfortunate consequence of having Nodes which produce +- // results (new raw memory state) inside of loops preventing all manner of +- // other optimizations). Basically, it's ugly but so is the alternative. +- // See comment in macro.cpp, around line 125 expand_allocate_common(). +- virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; } + }; + + //------------------------------LoadKlassNode---------------------------------- +--- ./hotspot/src/share/vm/opto/output.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/output.cpp 2014-04-19 01:27:07.000000000 -0700 +@@ -345,6 +345,11 @@ + uint* jmp_offset = NEW_RESOURCE_ARRAY(uint,nblocks); + uint* jmp_size = NEW_RESOURCE_ARRAY(uint,nblocks); + int* jmp_nidx = NEW_RESOURCE_ARRAY(int ,nblocks); + ++ // Collect worst case block paddings ++ int* block_worst_case_pad = NEW_RESOURCE_ARRAY(int, nblocks); ++ memset(block_worst_case_pad, 0, nblocks * sizeof(int)); + -+ /** -+ * Set limit by property name and state -+ * @param propertyName property name -+ * @param state the state of the property -+ * @param value the value of the property -+ * @return true if the property is managed by the security manager; false -+ * if otherwise. -+ */ -+ public boolean setLimit(String propertyName, State state, Object value) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ setLimit(index, state, value); -+ return true; -+ } -+ return false; -+ } + DEBUG_ONLY( uint *jmp_target = NEW_RESOURCE_ARRAY(uint,nblocks); ) + DEBUG_ONLY( uint *jmp_rule = NEW_RESOURCE_ARRAY(uint,nblocks); ) + +@@ -461,6 +466,7 @@ + last_avoid_back_to_back_adr += max_loop_pad; + } + blk_size += max_loop_pad; ++ block_worst_case_pad[i + 1] = max_loop_pad; + } + } + +@@ -500,9 +506,16 @@ + if (bnum > i) { // adjust following block's offset + offset -= adjust_block_start; + } + -+ /** -+ * Set the value for a specific limit. -+ * -+ * @param limit the limit -+ * @param state the state of the property -+ * @param value the value of the property -+ */ -+ public void setLimit(Limit limit, State state, int value) { -+ setLimit(limit.ordinal(), state, value); -+ } ++ // This block can be a loop header, account for the padding ++ // in the previous block. ++ int block_padding = block_worst_case_pad[i]; ++ assert(i == 0 || block_padding == 0 || br_offs >= block_padding, "Should have at least a padding on top"); + // In the following code a nop could be inserted before + // the branch which will increase the backward distance. +- bool needs_padding = ((uint)br_offs == last_may_be_short_branch_adr); ++ bool needs_padding = ((uint)(br_offs - block_padding) == last_may_be_short_branch_adr); ++ assert(!needs_padding || jmp_offset[i] == 0, "padding only branches at the beginning of block"); + -+ /** -+ * Set the value of a property by its index -+ * -+ * @param index the index of the property -+ * @param state the state of the property -+ * @param value the value of the property -+ */ -+ public void setLimit(int index, State state, Object value) { -+ if (index == indexEntityCountInfo) { -+ printEntityCountInfo = (String)value; -+ } else { -+ int temp; -+ if (Integer.class.isAssignableFrom(value.getClass())) { -+ temp = ((Integer)value).intValue(); -+ } else { -+ temp = Integer.parseInt((String) value); -+ if (temp < 0) { -+ temp = 0; -+ } -+ } -+ setLimit(index, state, temp); -+ } + if (needs_padding && offset <= 0) + offset -= nop_size; + +--- ./hotspot/src/share/vm/opto/reg_split.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/opto/reg_split.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -391,10 +391,15 @@ + #endif + // See if the cloned def kills any flags, and copy those kills as well + uint i = insidx+1; +- if( clone_projs( b, i, def, spill, maxlrg ) ) { ++ int found_projs = clone_projs(b, i, def, spill, maxlrg); ++ if (found_projs > 0) { + // Adjust the point where we go hi-pressure +- if( i <= b->_ihrp_index ) b->_ihrp_index++; +- if( i <= b->_fhrp_index ) b->_fhrp_index++; ++ if (i <= b->_ihrp_index) { ++ b->_ihrp_index += found_projs; + } -+ -+ /** -+ * Set the value of a property by its index -+ * -+ * @param index the index of the property -+ * @param state the state of the property -+ * @param value the value of the property -+ */ -+ public void setLimit(int index, State state, int value) { -+ if (index == indexEntityCountInfo) { -+ //if it's explicitly set, it's treated as yes no matter the value -+ printEntityCountInfo = Constants.JDK_YES; -+ } else { -+ //only update if it shall override -+ if (state.compareTo(states[index]) >= 0) { -+ values[index] = value; -+ states[index] = state; -+ isSet[index] = true; -+ } -+ } ++ if (i <= b->_fhrp_index) { ++ b->_fhrp_index += found_projs; + } + } + + return spill; +--- ./hotspot/src/share/vm/prims/jni.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/jni.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -5042,14 +5042,22 @@ + tty->print_cr("Running test: " #unit_test_function_call); \ + unit_test_function_call + ++// Forward declaration ++void TestReservedSpace_test(); ++void TestReserveMemorySpecial_test(); ++void TestOldFreeSpaceCalculation_test(); ++ + void execute_internal_vm_tests() { + if (ExecuteInternalVMTests) { + tty->print_cr("Running internal VM tests"); ++ run_unit_test(TestReservedSpace_test()); ++ run_unit_test(TestReserveMemorySpecial_test()); + run_unit_test(GCTimerAllTest::all()); + run_unit_test(arrayOopDesc::test_max_array_length()); + run_unit_test(CollectedHeap::test_is_in()); + run_unit_test(QuickSort::test_quick_sort()); + run_unit_test(AltHashing::test_alt_hash()); ++ run_unit_test(TestOldFreeSpaceCalculation_test()); + tty->print_cr("All internal VM tests passed"); + } + } +--- ./hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp 2013-09-06 11:22:14.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -204,7 +204,7 @@ + + write_attribute_name_index("Code"); + write_u4(size); +- write_u2(method->max_stack()); ++ write_u2(method->verifier_max_stack()); + write_u2(method->max_locals()); + write_u4(code_size); + copy_bytecodes(method, (unsigned char*)writeable_address(code_size)); +--- ./hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 @@ + #include "prims/jvmtiImpl.hpp" + #include "prims/jvmtiRedefineClasses.hpp" + #include "prims/methodComparator.hpp" ++#include "prims/methodHandles.hpp" + #include "runtime/deoptimization.hpp" + #include "runtime/relocator.hpp" + #include "utilities/bitMap.inline.hpp" +@@ -262,76 +263,23 @@ + case JVM_CONSTANT_NameAndType: + { + int name_ref_i = scratch_cp->name_ref_index_at(scratch_i); +- int new_name_ref_i = 0; +- bool match = (name_ref_i < *merge_cp_length_p) && +- scratch_cp->compare_entry_to(name_ref_i, *merge_cp_p, name_ref_i, +- THREAD); +- if (!match) { +- // forward reference in *merge_cp_p or not a direct match +- +- int found_i = scratch_cp->find_matching_entry(name_ref_i, *merge_cp_p, +- THREAD); +- if (found_i != 0) { +- guarantee(found_i != name_ref_i, +- "compare_entry_to() and find_matching_entry() do not agree"); +- +- // Found a matching entry somewhere else in *merge_cp_p so +- // just need a mapping entry. +- new_name_ref_i = found_i; +- map_index(scratch_cp, name_ref_i, found_i); +- } else { +- // no match found so we have to append this entry to *merge_cp_p +- append_entry(scratch_cp, name_ref_i, merge_cp_p, merge_cp_length_p, +- THREAD); +- // The above call to append_entry() can only append one entry +- // so the post call query of *merge_cp_length_p is only for +- // the sake of consistency. +- new_name_ref_i = *merge_cp_length_p - 1; +- } +- } ++ int new_name_ref_i = find_or_append_indirect_entry(scratch_cp, name_ref_i, merge_cp_p, ++ merge_cp_length_p, THREAD); + + int signature_ref_i = scratch_cp->signature_ref_index_at(scratch_i); +- int new_signature_ref_i = 0; +- match = (signature_ref_i < *merge_cp_length_p) && +- scratch_cp->compare_entry_to(signature_ref_i, *merge_cp_p, +- signature_ref_i, THREAD); +- if (!match) { +- // forward reference in *merge_cp_p or not a direct match +- +- int found_i = scratch_cp->find_matching_entry(signature_ref_i, +- *merge_cp_p, THREAD); +- if (found_i != 0) { +- guarantee(found_i != signature_ref_i, +- "compare_entry_to() and find_matching_entry() do not agree"); +- +- // Found a matching entry somewhere else in *merge_cp_p so +- // just need a mapping entry. +- new_signature_ref_i = found_i; +- map_index(scratch_cp, signature_ref_i, found_i); +- } else { +- // no match found so we have to append this entry to *merge_cp_p +- append_entry(scratch_cp, signature_ref_i, merge_cp_p, +- merge_cp_length_p, THREAD); +- // The above call to append_entry() can only append one entry +- // so the post call query of *merge_cp_length_p is only for +- // the sake of consistency. +- new_signature_ref_i = *merge_cp_length_p - 1; +- } +- } ++ int new_signature_ref_i = find_or_append_indirect_entry(scratch_cp, signature_ref_i, ++ merge_cp_p, merge_cp_length_p, ++ THREAD); + + // If the referenced entries already exist in *merge_cp_p, then + // both new_name_ref_i and new_signature_ref_i will both be 0. + // In that case, all we are appending is the current entry. +- if (new_name_ref_i == 0) { +- new_name_ref_i = name_ref_i; +- } else { ++ if (new_name_ref_i != name_ref_i) { + RC_TRACE(0x00080000, + ("NameAndType entry@%d name_ref_index change: %d to %d", + *merge_cp_length_p, name_ref_i, new_name_ref_i)); + } +- if (new_signature_ref_i == 0) { +- new_signature_ref_i = signature_ref_i; +- } else { ++ if (new_signature_ref_i != signature_ref_i) { + RC_TRACE(0x00080000, + ("NameAndType entry@%d signature_ref_index change: %d to %d", + *merge_cp_length_p, signature_ref_i, new_signature_ref_i)); +@@ -353,76 +301,11 @@ + case JVM_CONSTANT_Methodref: + { + int klass_ref_i = scratch_cp->uncached_klass_ref_index_at(scratch_i); +- int new_klass_ref_i = 0; +- bool match = (klass_ref_i < *merge_cp_length_p) && +- scratch_cp->compare_entry_to(klass_ref_i, *merge_cp_p, klass_ref_i, +- THREAD); +- if (!match) { +- // forward reference in *merge_cp_p or not a direct match +- +- int found_i = scratch_cp->find_matching_entry(klass_ref_i, *merge_cp_p, +- THREAD); +- if (found_i != 0) { +- guarantee(found_i != klass_ref_i, +- "compare_entry_to() and find_matching_entry() do not agree"); +- +- // Found a matching entry somewhere else in *merge_cp_p so +- // just need a mapping entry. +- new_klass_ref_i = found_i; +- map_index(scratch_cp, klass_ref_i, found_i); +- } else { +- // no match found so we have to append this entry to *merge_cp_p +- append_entry(scratch_cp, klass_ref_i, merge_cp_p, merge_cp_length_p, +- THREAD); +- // The above call to append_entry() can only append one entry +- // so the post call query of *merge_cp_length_p is only for +- // the sake of consistency. Without the optimization where we +- // use JVM_CONSTANT_UnresolvedClass, then up to two entries +- // could be appended. +- new_klass_ref_i = *merge_cp_length_p - 1; +- } +- } +- +- int name_and_type_ref_i = +- scratch_cp->uncached_name_and_type_ref_index_at(scratch_i); +- int new_name_and_type_ref_i = 0; +- match = (name_and_type_ref_i < *merge_cp_length_p) && +- scratch_cp->compare_entry_to(name_and_type_ref_i, *merge_cp_p, +- name_and_type_ref_i, THREAD); +- if (!match) { +- // forward reference in *merge_cp_p or not a direct match +- +- int found_i = scratch_cp->find_matching_entry(name_and_type_ref_i, +- *merge_cp_p, THREAD); +- if (found_i != 0) { +- guarantee(found_i != name_and_type_ref_i, +- "compare_entry_to() and find_matching_entry() do not agree"); +- +- // Found a matching entry somewhere else in *merge_cp_p so +- // just need a mapping entry. +- new_name_and_type_ref_i = found_i; +- map_index(scratch_cp, name_and_type_ref_i, found_i); +- } else { +- // no match found so we have to append this entry to *merge_cp_p +- append_entry(scratch_cp, name_and_type_ref_i, merge_cp_p, +- merge_cp_length_p, THREAD); +- // The above call to append_entry() can append more than +- // one entry so the post call query of *merge_cp_length_p +- // is required in order to get the right index for the +- // JVM_CONSTANT_NameAndType entry. +- new_name_and_type_ref_i = *merge_cp_length_p - 1; +- } +- } +- +- // If the referenced entries already exist in *merge_cp_p, then +- // both new_klass_ref_i and new_name_and_type_ref_i will both be +- // 0. In that case, all we are appending is the current entry. +- if (new_klass_ref_i == 0) { +- new_klass_ref_i = klass_ref_i; +- } +- if (new_name_and_type_ref_i == 0) { +- new_name_and_type_ref_i = name_and_type_ref_i; +- } ++ int new_klass_ref_i = find_or_append_indirect_entry(scratch_cp, klass_ref_i, ++ merge_cp_p, merge_cp_length_p, THREAD); ++ int name_and_type_ref_i = scratch_cp->uncached_name_and_type_ref_index_at(scratch_i); ++ int new_name_and_type_ref_i = find_or_append_indirect_entry(scratch_cp, name_and_type_ref_i, ++ merge_cp_p, merge_cp_length_p, THREAD); + + const char *entry_name; + switch (scratch_cp->tag_at(scratch_i).value()) { +@@ -465,7 +348,79 @@ + (*merge_cp_length_p)++; + } break; + +- // At this stage, Class or UnresolvedClass could be here, but not ++ // this is an indirect CP entry so it needs special handling ++ case JVM_CONSTANT_MethodType: ++ { ++ int ref_i = scratch_cp->method_type_index_at(scratch_i); ++ int new_ref_i = find_or_append_indirect_entry(scratch_cp, ref_i, merge_cp_p, ++ merge_cp_length_p, THREAD); ++ if (new_ref_i != ref_i) { ++ RC_TRACE(0x00080000, ++ ("MethodType entry@%d ref_index change: %d to %d", ++ *merge_cp_length_p, ref_i, new_ref_i)); ++ } ++ (*merge_cp_p)->method_type_index_at_put(*merge_cp_length_p, new_ref_i); ++ if (scratch_i != *merge_cp_length_p) { ++ // The new entry in *merge_cp_p is at a different index than ++ // the new entry in scratch_cp so we need to map the index values. ++ map_index(scratch_cp, scratch_i, *merge_cp_length_p); ++ } ++ (*merge_cp_length_p)++; ++ } break; + -+ /** -+ * Return the value of the specified property -+ * -+ * @param propertyName the property name -+ * @return the value of the property as a string. If a property is managed -+ * by this manager, its value shall not be null. -+ */ -+ public String getLimitAsString(String propertyName) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ return getLimitValueByIndex(index); -+ } ++ // this is an indirect CP entry so it needs special handling ++ case JVM_CONSTANT_MethodHandle: ++ { ++ int ref_kind = scratch_cp->method_handle_ref_kind_at(scratch_i); ++ int ref_i = scratch_cp->method_handle_index_at(scratch_i); ++ int new_ref_i = find_or_append_indirect_entry(scratch_cp, ref_i, merge_cp_p, ++ merge_cp_length_p, THREAD); ++ if (new_ref_i != ref_i) { ++ RC_TRACE(0x00080000, ++ ("MethodHandle entry@%d ref_index change: %d to %d", ++ *merge_cp_length_p, ref_i, new_ref_i)); ++ } ++ (*merge_cp_p)->method_handle_index_at_put(*merge_cp_length_p, ref_kind, new_ref_i); ++ if (scratch_i != *merge_cp_length_p) { ++ // The new entry in *merge_cp_p is at a different index than ++ // the new entry in scratch_cp so we need to map the index values. ++ map_index(scratch_cp, scratch_i, *merge_cp_length_p); ++ } ++ (*merge_cp_length_p)++; ++ } break; + -+ return null; -+ } -+ /** -+ * Return the value of the specified property -+ * -+ * @param limit the property -+ * @return the value of the property -+ */ -+ public int getLimit(Limit limit) { -+ return values[limit.ordinal()]; -+ } ++ // this is an indirect CP entry so it needs special handling ++ case JVM_CONSTANT_InvokeDynamic: ++ { ++ // Index of the bootstrap specifier in the operands array ++ int old_bs_i = scratch_cp->invoke_dynamic_bootstrap_specifier_index(scratch_i); ++ int new_bs_i = find_or_append_operand(scratch_cp, old_bs_i, merge_cp_p, ++ merge_cp_length_p, THREAD); ++ // The bootstrap method NameAndType_info index ++ int old_ref_i = scratch_cp->invoke_dynamic_name_and_type_ref_index_at(scratch_i); ++ int new_ref_i = find_or_append_indirect_entry(scratch_cp, old_ref_i, merge_cp_p, ++ merge_cp_length_p, THREAD); ++ if (new_bs_i != old_bs_i) { ++ RC_TRACE(0x00080000, ++ ("InvokeDynamic entry@%d bootstrap_method_attr_index change: %d to %d", ++ *merge_cp_length_p, old_bs_i, new_bs_i)); ++ } ++ if (new_ref_i != old_ref_i) { ++ RC_TRACE(0x00080000, ++ ("InvokeDynamic entry@%d name_and_type_index change: %d to %d", ++ *merge_cp_length_p, old_ref_i, new_ref_i)); ++ } + -+ /** -+ * Return the value of a property by its ordinal -+ * -+ * @param limit the property -+ * @return value of a property -+ */ -+ public String getLimitValueAsString(Limit limit) { -+ return Integer.toString(values[limit.ordinal()]); -+ } ++ (*merge_cp_p)->invoke_dynamic_at_put(*merge_cp_length_p, new_bs_i, new_ref_i); ++ if (scratch_i != *merge_cp_length_p) { ++ // The new entry in *merge_cp_p is at a different index than ++ // the new entry in scratch_cp so we need to map the index values. ++ map_index(scratch_cp, scratch_i, *merge_cp_length_p); ++ } ++ (*merge_cp_length_p)++; ++ } break; + -+ /** -+ * Return the value of a property by its ordinal -+ * -+ * @param index the index of a property -+ * @return limit of a property as a string -+ */ -+ public String getLimitValueByIndex(int index) { -+ if (index == indexEntityCountInfo) { -+ return printEntityCountInfo; -+ } ++ // At this stage, Class or UnresolvedClass could be here, but not + // ClassIndex + case JVM_CONSTANT_ClassIndex: // fall through + +@@ -492,6 +447,134 @@ + } // end append_entry() + + ++int VM_RedefineClasses::find_or_append_indirect_entry(constantPoolHandle scratch_cp, ++ int ref_i, constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS) { + -+ return Integer.toString(values[index]); -+ } ++ int new_ref_i = ref_i; ++ bool match = (ref_i < *merge_cp_length_p) && ++ scratch_cp->compare_entry_to(ref_i, *merge_cp_p, ref_i, THREAD); + -+ /** -+ * Return the state of the limit property -+ * -+ * @param limit the limit -+ * @return the state of the limit property -+ */ -+ public State getState(Limit limit) { -+ return states[limit.ordinal()]; ++ if (!match) { ++ // forward reference in *merge_cp_p or not a direct match ++ int found_i = scratch_cp->find_matching_entry(ref_i, *merge_cp_p, THREAD); ++ if (found_i != 0) { ++ guarantee(found_i != ref_i, "compare_entry_to() and find_matching_entry() do not agree"); ++ // Found a matching entry somewhere else in *merge_cp_p so just need a mapping entry. ++ new_ref_i = found_i; ++ map_index(scratch_cp, ref_i, found_i); ++ } else { ++ // no match found so we have to append this entry to *merge_cp_p ++ append_entry(scratch_cp, ref_i, merge_cp_p, merge_cp_length_p, THREAD); ++ // The above call to append_entry() can only append one entry ++ // so the post call query of *merge_cp_length_p is only for ++ // the sake of consistency. ++ new_ref_i = *merge_cp_length_p - 1; + } ++ } + -+ /** -+ * Return the state of the limit property -+ * -+ * @param limit the limit -+ * @return the state of the limit property -+ */ -+ public String getStateLiteral(Limit limit) { -+ return states[limit.ordinal()].literal(); -+ } ++ return new_ref_i; ++} // end find_or_append_indirect_entry() + -+ /** -+ * Get the index by property name -+ * -+ * @param propertyName property name -+ * @return the index of the property if found; return -1 if not -+ */ -+ public int getIndex(String propertyName) { -+ for (Limit limit : Limit.values()) { -+ if (limit.equalsAPIPropertyName(propertyName)) { -+ //internally, ordinal is used as index -+ return limit.ordinal(); -+ } -+ } -+ //special property to return entity count info -+ if (propertyName.equals(Constants.JDK_ENTITY_COUNT_INFO)) { -+ return indexEntityCountInfo; -+ } -+ return -1; -+ } + -+ /** -+ * Check if there's no limit defined by the Security Manager -+ * @param limit -+ * @return -+ */ -+ public boolean isNoLimit(int limit) { -+ return limit==NO_LIMIT; ++// Append a bootstrap specifier into the merge_cp operands that is semantically equal ++// to the scratch_cp operands bootstrap specifier passed by the old_bs_i index. ++// Recursively append new merge_cp entries referenced by the new bootstrap specifier. ++void VM_RedefineClasses::append_operand(constantPoolHandle scratch_cp, int old_bs_i, ++ constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS) { ++ ++ int old_ref_i = scratch_cp->operand_bootstrap_method_ref_index_at(old_bs_i); ++ int new_ref_i = find_or_append_indirect_entry(scratch_cp, old_ref_i, merge_cp_p, ++ merge_cp_length_p, THREAD); ++ if (new_ref_i != old_ref_i) { ++ RC_TRACE(0x00080000, ++ ("operands entry@%d bootstrap method ref_index change: %d to %d", ++ _operands_cur_length, old_ref_i, new_ref_i)); ++ } ++ ++ typeArrayOop merge_ops = (*merge_cp_p)->operands(); ++ int new_bs_i = _operands_cur_length; ++ // We have _operands_cur_length == 0 when the merge_cp operands is empty yet. ++ // However, the operand_offset_at(0) was set in the extend_operands() call. ++ int new_base = (new_bs_i == 0) ? (*merge_cp_p)->operand_offset_at(0) ++ : (*merge_cp_p)->operand_next_offset_at(new_bs_i - 1); ++ int argc = scratch_cp->operand_argument_count_at(old_bs_i); ++ ++ constantPoolOopDesc::operand_offset_at_put(merge_ops, _operands_cur_length, new_base); ++ merge_ops->short_at_put(new_base++, new_ref_i); ++ merge_ops->short_at_put(new_base++, argc); ++ ++ for (int i = 0; i < argc; i++) { ++ int old_arg_ref_i = scratch_cp->operand_argument_index_at(old_bs_i, i); ++ int new_arg_ref_i = find_or_append_indirect_entry(scratch_cp, old_arg_ref_i, merge_cp_p, ++ merge_cp_length_p, THREAD); ++ merge_ops->short_at_put(new_base++, new_arg_ref_i); ++ if (new_arg_ref_i != old_arg_ref_i) { ++ RC_TRACE(0x00080000, ++ ("operands entry@%d bootstrap method argument ref_index change: %d to %d", ++ _operands_cur_length, old_arg_ref_i, new_arg_ref_i)); + } -+ /** -+ * Check if the size (length or count) of the specified limit property is -+ * over the limit -+ * -+ * @param limit the type of the limit property -+ * @param entityName the name of the entity -+ * @param size the size (count or length) of the entity -+ * @return true if the size is over the limit, false otherwise -+ */ -+ public boolean isOverLimit(Limit limit, String entityName, int size, -+ XMLLimitAnalyzer limitAnalyzer) { -+ return isOverLimit(limit.ordinal(), entityName, size, limitAnalyzer); ++ } ++ if (old_bs_i != _operands_cur_length) { ++ // The bootstrap specifier in *merge_cp_p is at a different index than ++ // that in scratch_cp so we need to map the index values. ++ map_operand_index(old_bs_i, new_bs_i); ++ } ++ _operands_cur_length++; ++} // end append_operand() ++ ++ ++int VM_RedefineClasses::find_or_append_operand(constantPoolHandle scratch_cp, ++ int old_bs_i, constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS) { ++ ++ int new_bs_i = old_bs_i; // bootstrap specifier index ++ bool match = (old_bs_i < _operands_cur_length) && ++ scratch_cp->compare_operand_to(old_bs_i, *merge_cp_p, old_bs_i, THREAD); ++ ++ if (!match) { ++ // forward reference in *merge_cp_p or not a direct match ++ int found_i = scratch_cp->find_matching_operand(old_bs_i, *merge_cp_p, ++ _operands_cur_length, THREAD); ++ if (found_i != -1) { ++ guarantee(found_i != old_bs_i, "compare_operand_to() and find_matching_operand() disagree"); ++ // found a matching operand somewhere else in *merge_cp_p so just need a mapping ++ new_bs_i = found_i; ++ map_operand_index(old_bs_i, found_i); ++ } else { ++ // no match found so we have to append this bootstrap specifier to *merge_cp_p ++ append_operand(scratch_cp, old_bs_i, merge_cp_p, merge_cp_length_p, THREAD); ++ new_bs_i = _operands_cur_length - 1; + } ++ } ++ return new_bs_i; ++} // end find_or_append_operand() + -+ /** -+ * Check if the value (length or count) of the specified limit property is -+ * over the limit -+ * -+ * @param index the index of the limit property -+ * @param entityName the name of the entity -+ * @param size the size (count or length) of the entity -+ * @return true if the size is over the limit, false otherwise -+ */ -+ public boolean isOverLimit(int index, String entityName, int size, -+ XMLLimitAnalyzer limitAnalyzer) { -+ if (values[index] == NO_LIMIT) { -+ return false; -+ } -+ if (size > values[index]) { -+ limitAnalyzer.addValue(index, entityName, size); -+ return true; -+ } -+ return false; -+ } + -+ /** -+ * Check against cumulated value -+ * -+ * @param limit the type of the limit property -+ * @param size the size (count or length) of the entity -+ * @return true if the size is over the limit, false otherwise -+ */ -+ public boolean isOverLimit(Limit limit, XMLLimitAnalyzer limitAnalyzer) { -+ return isOverLimit(limit.ordinal(), limitAnalyzer); ++void VM_RedefineClasses::finalize_operands_merge(constantPoolHandle merge_cp, TRAPS) { ++ if (merge_cp->operands() == NULL) { ++ return; ++ } ++ // Shrink the merge_cp operands ++ merge_cp->shrink_operands(_operands_cur_length, CHECK); ++ ++ if (RC_TRACE_ENABLED(0x00040000)) { ++ // don't want to loop unless we are tracing ++ int count = 0; ++ for (int i = 1; i < _operands_index_map_p->length(); i++) { ++ int value = _operands_index_map_p->at(i); ++ if (value != -1) { ++ RC_TRACE_WITH_THREAD(0x00040000, THREAD, ++ ("operands_index_map[%d]: old=%d new=%d", count, i, value)); ++ count++; ++ } + } ++ } ++ // Clean-up ++ _operands_index_map_p = NULL; ++ _operands_cur_length = 0; ++ _operands_index_map_count = 0; ++} // end finalize_operands_merge() + -+ public boolean isOverLimit(int index, XMLLimitAnalyzer limitAnalyzer) { -+ if (values[index] == NO_LIMIT) { -+ return false; -+ } + -+ if (index==Limit.ELEMENT_ATTRIBUTE_LIMIT.ordinal() || -+ index==Limit.ENTITY_EXPANSION_LIMIT.ordinal() || -+ index==Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()) { -+ return (limitAnalyzer.getTotalValue(index) > values[index]); -+ } else { -+ return (limitAnalyzer.getValue(index) > values[index]); -+ } -+ } + void VM_RedefineClasses::swap_all_method_annotations(int i, int j, instanceKlassHandle scratch_class) { + typeArrayOop save; + +@@ -777,6 +860,27 @@ + } // end find_new_index() + + ++// Find new bootstrap specifier index value for old bootstrap specifier index ++// value by seaching the index map. Returns zero (-1) if there is no mapped ++// value for the old bootstrap specifier index. ++int VM_RedefineClasses::find_new_operand_index(int old_index) { ++ if (_operands_index_map_count == 0) { ++ // map is empty so nothing can be found ++ return -1; ++ } + -+ public void debugPrint(XMLLimitAnalyzer limitAnalyzer) { -+ if (printEntityCountInfo.equals(Constants.JDK_YES)) { -+ limitAnalyzer.debugPrint(this); -+ } -+ } ++ if (old_index == -1 || old_index >= _operands_index_map_p->length()) { ++ // The old_index is out of range so it is not mapped. ++ // This should not happen in regular constant pool merging use. ++ return -1; ++ } + ++ int value = _operands_index_map_p->at(old_index); + -+ /** -+ * Indicate if a property is set explicitly -+ * @param index -+ * @return -+ */ -+ public boolean isSet(int index) { -+ return isSet[index]; -+ } ++ return value; ++} // end find_new_operand_index() + -+ public boolean printEntityCountInfo() { -+ return printEntityCountInfo.equals(Constants.JDK_YES); -+ } + -+ /** -+ * Read from system properties, or those in jaxp.properties -+ */ -+ private void readSystemProperties() { + // Returns true if the current mismatch is due to a resolved/unresolved + // class pair. Otherwise, returns false. + bool VM_RedefineClasses::is_unresolved_class_mismatch(constantPoolHandle cp1, +@@ -1042,6 +1146,25 @@ + } // end map_index() + + ++// Map old_index to new_index as needed. ++void VM_RedefineClasses::map_operand_index(int old_index, int new_index) { ++ if (find_new_operand_index(old_index) != -1) { ++ // old_index is already mapped ++ return; ++ } + -+ for (Limit limit : Limit.values()) { -+ if (!getSystemProperty(limit, limit.systemProperty())) { -+ //if system property is not found, try the older form if any -+ for (NameMap nameMap : NameMap.values()) { -+ String oldName = nameMap.getOldName(limit.systemProperty()); -+ if (oldName != null) { -+ getSystemProperty(limit, oldName); -+ } -+ } -+ } -+ } ++ if (old_index == new_index) { ++ // no mapping is needed ++ return; ++ } + -+ } ++ _operands_index_map_p->at_put(old_index, new_index); ++ _operands_index_map_count++; + -+ /** -+ * Read from system properties, or those in jaxp.properties -+ * -+ * @param property the type of the property -+ * @param sysPropertyName the name of system property -+ */ -+ private boolean getSystemProperty(Limit limit, String sysPropertyName) { -+ try { -+ String value = SecuritySupport.getSystemProperty(sysPropertyName); -+ if (value != null && !value.equals("")) { -+ values[limit.ordinal()] = Integer.parseInt(value); -+ states[limit.ordinal()] = State.SYSTEMPROPERTY; -+ return true; -+ } ++ RC_TRACE(0x00040000, ("mapped bootstrap specifier at index %d to %d", old_index, new_index)); ++} // end map_index() + -+ value = SecuritySupport.readJAXPProperty(sysPropertyName); -+ if (value != null && !value.equals("")) { -+ values[limit.ordinal()] = Integer.parseInt(value); -+ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; -+ return true; -+ } -+ } catch (NumberFormatException e) { -+ //invalid setting -+ throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty()); -+ } -+ return false; -+ } + + // Merge old_cp and scratch_cp and return the results of the merge via + // merge_cp_p. The number of entries in *merge_cp_p is returned via + // merge_cp_length_p. The entries in old_cp occupy the same locations +@@ -1113,6 +1236,9 @@ + } + } // end for each old_cp entry + ++ constantPoolOopDesc::copy_operands(old_cp, *merge_cp_p, CHECK_0); ++ (*merge_cp_p)->extend_operands(scratch_cp, CHECK_0); + -+ /** -+ * Convert a value set through setProperty to XMLSecurityManager. -+ * If the value is an instance of XMLSecurityManager, use it to override the default; -+ * If the value is an old SecurityManager, convert to the new XMLSecurityManager. -+ * -+ * @param value user specified security manager -+ * @param securityManager an instance of XMLSecurityManager -+ * @return an instance of the new security manager XMLSecurityManager -+ */ -+ static public XMLSecurityManager convert(Object value, XMLSecurityManager securityManager) { -+ if (value == null) { -+ if (securityManager == null) { -+ securityManager = new XMLSecurityManager(true); -+ } -+ return securityManager; -+ } -+ if (XMLSecurityManager.class.isAssignableFrom(value.getClass())) { -+ return (XMLSecurityManager)value; -+ } else { -+ if (securityManager == null) { -+ securityManager = new XMLSecurityManager(true); -+ } -+ if (SecurityManager.class.isAssignableFrom(value.getClass())) { -+ SecurityManager origSM = (SecurityManager)value; -+ securityManager.setLimit(Limit.MAX_OCCUR_NODE_LIMIT, State.APIPROPERTY, origSM.getMaxOccurNodeLimit()); -+ securityManager.setLimit(Limit.ENTITY_EXPANSION_LIMIT, State.APIPROPERTY, origSM.getEntityExpansionLimit()); -+ securityManager.setLimit(Limit.ELEMENT_ATTRIBUTE_LIMIT, State.APIPROPERTY, origSM.getElementAttrLimit()); -+ } -+ return securityManager; -+ } -+ } -+} ---- jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java 2014-04-20 12:39:46.000000000 -0700 -@@ -91,6 +91,24 @@ - readSystemProperties(); + // We don't need to sanity check that *merge_cp_length_p is within + // *merge_cp_p bounds since we have the minimum on-entry check above. + (*merge_cp_length_p) = old_i; +@@ -1235,6 +1361,7 @@ + ("after pass 1b: merge_cp_len=%d, scratch_i=%d, index_map_len=%d", + *merge_cp_length_p, scratch_i, _index_map_count)); + } ++ finalize_operands_merge(*merge_cp_p, THREAD); + + return true; + } // end merge_constant_pools() +@@ -1282,8 +1409,17 @@ + _index_map_count = 0; + _index_map_p = new intArray(scratch_cp->length(), -1); + ++ _operands_cur_length = constantPoolOopDesc::operand_array_length(old_cp->operands()); ++ _operands_index_map_count = 0; ++ _operands_index_map_p = new intArray( ++ constantPoolOopDesc::operand_array_length(scratch_cp->operands()), -1); ++ ++ // reference to the cp holder is needed for copy_operands() ++ merge_cp->set_pool_holder(scratch_class()); + bool result = merge_constant_pools(old_cp, scratch_cp, &merge_cp, + &merge_cp_length, THREAD); ++ merge_cp->set_pool_holder(NULL); ++ + if (!result) { + // The merge can fail due to memory allocation failure or due + // to robustness checks. +@@ -1326,7 +1462,7 @@ + // Replace the new constant pool with a shrunken copy of the + // merged constant pool; the previous new constant pool will + // get GCed. +- set_new_constant_pool(scratch_class, merge_cp, merge_cp_length, true, ++ set_new_constant_pool(scratch_class, merge_cp, merge_cp_length, + THREAD); + // drop local ref to the merged constant pool + merge_cp()->set_is_conc_safe(true); +@@ -1357,7 +1493,7 @@ + // merged constant pool so now the rewritten bytecodes have + // valid references; the previous new constant pool will get + // GCed. +- set_new_constant_pool(scratch_class, merge_cp, merge_cp_length, true, ++ set_new_constant_pool(scratch_class, merge_cp, merge_cp_length, + THREAD); + merge_cp()->set_is_conc_safe(true); + } +@@ -1540,6 +1676,7 @@ + case Bytecodes::_getfield : // fall through + case Bytecodes::_getstatic : // fall through + case Bytecodes::_instanceof : // fall through ++ case Bytecodes::_invokedynamic : // fall through + case Bytecodes::_invokeinterface: // fall through + case Bytecodes::_invokespecial : // fall through + case Bytecodes::_invokestatic : // fall through +@@ -2343,30 +2480,30 @@ + // smaller constant pool is associated with scratch_class. + void VM_RedefineClasses::set_new_constant_pool( + instanceKlassHandle scratch_class, constantPoolHandle scratch_cp, +- int scratch_cp_length, bool shrink, TRAPS) { +- assert(!shrink || scratch_cp->length() >= scratch_cp_length, "sanity check"); +- +- if (shrink) { +- // scratch_cp is a merged constant pool and has enough space for a +- // worst case merge situation. We want to associate the minimum +- // sized constant pool with the klass to save space. +- constantPoolHandle smaller_cp(THREAD, +- oopFactory::new_constantPool(scratch_cp_length, +- oopDesc::IsUnsafeConc, +- THREAD)); +- // preserve orig_length() value in the smaller copy +- int orig_length = scratch_cp->orig_length(); +- assert(orig_length != 0, "sanity check"); +- smaller_cp->set_orig_length(orig_length); +- scratch_cp->copy_cp_to(1, scratch_cp_length - 1, smaller_cp, 1, THREAD); +- scratch_cp = smaller_cp; +- smaller_cp()->set_is_conc_safe(true); +- } ++ int scratch_cp_length, TRAPS) { ++ assert(scratch_cp->length() >= scratch_cp_length, "sanity check"); + +- // attach new constant pool to klass +- scratch_cp->set_pool_holder(scratch_class()); ++ // scratch_cp is a merged constant pool and has enough space for a ++ // worst case merge situation. We want to associate the minimum ++ // sized constant pool with the klass to save space. ++ constantPoolHandle smaller_cp(THREAD, ++ oopFactory::new_constantPool(scratch_cp_length, ++ oopDesc::IsUnsafeConc, ++ THREAD)); ++ // preserve orig_length() value in the smaller copy ++ int orig_length = scratch_cp->orig_length(); ++ assert(orig_length != 0, "sanity check"); ++ smaller_cp->set_orig_length(orig_length); + + // attach klass to new constant pool ++ // reference to the cp holder is needed for copy_operands() ++ smaller_cp->set_pool_holder(scratch_class()); ++ ++ scratch_cp->copy_cp_to(1, scratch_cp_length - 1, smaller_cp, 1, THREAD); ++ scratch_cp = smaller_cp; ++ smaller_cp()->set_is_conc_safe(true); ++ ++ // attach new constant pool to klass + scratch_class->set_constants(scratch_cp()); + + int i; // for portability +@@ -3310,6 +3447,16 @@ + // that reference methods of the evolved class. + SystemDictionary::classes_do(adjust_cpool_cache_and_vtable, THREAD); + ++ // JSR-292 support ++ MemberNameTable* mnt = the_class->member_names(); ++ if (mnt != NULL) { ++ bool trace_name_printed = false; ++ mnt->adjust_method_entries(_matching_old_methods, ++ _matching_new_methods, ++ _matching_methods_length, ++ &trace_name_printed); ++ } ++ + if (the_class->oop_map_cache() != NULL) { + // Flush references to any obsolete methods from the oop map cache + // so that obsolete methods are not pinned. +--- ./hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp 2014-06-06 19:56:20.000000000 -0700 +@@ -370,6 +370,13 @@ + // _index_map_p contains any entries. + int _index_map_count; + intArray * _index_map_p; ++ ++ // _operands_index_map_count is just an optimization for knowing if ++ // _operands_index_map_p contains any entries. ++ int _operands_cur_length; ++ int _operands_index_map_count; ++ intArray * _operands_index_map_p; ++ + // ptr to _class_count scratch_classes + instanceKlassHandle * _scratch_classes; + jvmtiError _res; +@@ -431,16 +438,24 @@ + // and in all direct and indirect subclasses. + void increment_class_counter(instanceKlass *ik, TRAPS); + +- // Support for constant pool merging (these routines are in alpha +- // order): ++ // Support for constant pool merging (these routines are in alpha order): + void append_entry(constantPoolHandle scratch_cp, int scratch_i, + constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); ++ void append_operand(constantPoolHandle scratch_cp, int scratch_bootstrap_spec_index, ++ constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); ++ void finalize_operands_merge(constantPoolHandle merge_cp, TRAPS); ++ int find_or_append_indirect_entry(constantPoolHandle scratch_cp, int scratch_i, ++ constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); ++ int find_or_append_operand(constantPoolHandle scratch_cp, int scratch_bootstrap_spec_index, ++ constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); + int find_new_index(int old_index); ++ int find_new_operand_index(int old_bootstrap_spec_index); + bool is_unresolved_class_mismatch(constantPoolHandle cp1, int index1, + constantPoolHandle cp2, int index2); + bool is_unresolved_string_mismatch(constantPoolHandle cp1, int index1, + constantPoolHandle cp2, int index2); + void map_index(constantPoolHandle scratch_cp, int old_index, int new_index); ++ void map_operand_index(int old_bootstrap_spec_index, int new_bootstrap_spec_index); + bool merge_constant_pools(constantPoolHandle old_cp, + constantPoolHandle scratch_cp, constantPoolHandle *merge_cp_p, + int *merge_cp_length_p, TRAPS); +@@ -474,7 +489,7 @@ + address& stackmap_addr_ref, address stackmap_end, u2 frame_i, + u1 frame_size, TRAPS); + void set_new_constant_pool(instanceKlassHandle scratch_class, +- constantPoolHandle scratch_cp, int scratch_cp_length, bool shrink, TRAPS); ++ constantPoolHandle scratch_cp, int scratch_cp_length, TRAPS); + + void flush_dependent_code(instanceKlassHandle k_h, TRAPS); + +--- ./hotspot/src/share/vm/prims/methodHandles.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/methodHandles.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 @@ + #include "interpreter/oopMapCache.hpp" + #include "memory/allocation.inline.hpp" + #include "memory/oopFactory.hpp" ++#include "prims/jvmtiRedefineClassesTrace.hpp" + #include "prims/methodHandles.hpp" + #include "runtime/compilationPolicy.hpp" + #include "runtime/javaCalls.hpp" +@@ -123,7 +124,9 @@ + return Handle(THREAD, k->allocate_instance(THREAD)); + } + +-oop MethodHandles::init_MemberName(oop mname_oop, oop target_oop) { ++oop MethodHandles::init_MemberName(Handle mname, Handle target) { ++ Thread* thread = Thread::current(); ++ oop target_oop = target(); + klassOop target_klass = target_oop->klass(); + if (target_klass == SystemDictionary::reflect_Field_klass()) { + oop clazz = java_lang_reflect_Field::clazz(target_oop); // fd.field_holder() +@@ -131,24 +134,24 @@ + int mods = java_lang_reflect_Field::modifiers(target_oop); + oop type = java_lang_reflect_Field::type(target_oop); + oop name = java_lang_reflect_Field::name(target_oop); +- klassOop k = java_lang_Class::as_klassOop(clazz); +- intptr_t offset = instanceKlass::cast(k)->field_offset(slot); +- return init_field_MemberName(mname_oop, k, accessFlags_from(mods), type, name, offset); ++ KlassHandle k(thread, java_lang_Class::as_klassOop(clazz)); ++ intptr_t offset = instanceKlass::cast(k())->field_offset(slot); ++ return init_field_MemberName(mname, k, accessFlags_from(mods), type, name, offset); + } else if (target_klass == SystemDictionary::reflect_Method_klass()) { + oop clazz = java_lang_reflect_Method::clazz(target_oop); + int slot = java_lang_reflect_Method::slot(target_oop); +- klassOop k = java_lang_Class::as_klassOop(clazz); +- if (k != NULL && Klass::cast(k)->oop_is_instance()) { +- methodOop m = instanceKlass::cast(k)->method_with_idnum(slot); +- return init_method_MemberName(mname_oop, m, true, k); ++ KlassHandle k(thread, java_lang_Class::as_klassOop(clazz)); ++ if (!k.is_null() && k->oop_is_instance()) { ++ methodOop m = instanceKlass::cast(k())->method_with_idnum(slot); ++ return init_method_MemberName(mname, m, true, k); + } + } else if (target_klass == SystemDictionary::reflect_Constructor_klass()) { + oop clazz = java_lang_reflect_Constructor::clazz(target_oop); + int slot = java_lang_reflect_Constructor::slot(target_oop); +- klassOop k = java_lang_Class::as_klassOop(clazz); +- if (k != NULL && Klass::cast(k)->oop_is_instance()) { +- methodOop m = instanceKlass::cast(k)->method_with_idnum(slot); +- return init_method_MemberName(mname_oop, m, false, k); ++ KlassHandle k(thread, java_lang_Class::as_klassOop(clazz)); ++ if (!k.is_null() && k->oop_is_instance()) { ++ methodOop m = instanceKlass::cast(k())->method_with_idnum(slot); ++ return init_method_MemberName(mname, m, false, k); + } + } else if (target_klass == SystemDictionary::MemberName_klass()) { + // Note: This only works if the MemberName has already been resolved. +@@ -156,17 +159,18 @@ + int flags = java_lang_invoke_MemberName::flags(target_oop); + oop vmtarget = java_lang_invoke_MemberName::vmtarget(target_oop); + intptr_t vmindex = java_lang_invoke_MemberName::vmindex(target_oop); +- klassOop k = java_lang_Class::as_klassOop(clazz); ++ KlassHandle k(thread, java_lang_Class::as_klassOop(clazz)); + int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK; + if (vmtarget == NULL) return NULL; // not resolved + if ((flags & IS_FIELD) != 0) { + assert(vmtarget->is_klass(), "field vmtarget is klassOop"); + int basic_mods = (ref_kind_is_static(ref_kind) ? JVM_ACC_STATIC : 0); + // FIXME: how does k (receiver_limit) contribute? +- return init_field_MemberName(mname_oop, klassOop(vmtarget), accessFlags_from(basic_mods), NULL, NULL, vmindex); ++ KlassHandle k_vmtarget(thread, klassOop(vmtarget)); ++ return init_field_MemberName(mname, k_vmtarget, accessFlags_from(basic_mods), NULL, NULL, vmindex); + } else if ((flags & (IS_METHOD | IS_CONSTRUCTOR)) != 0) { + assert(vmtarget->is_method(), "method or constructor vmtarget is methodOop"); +- return init_method_MemberName(mname_oop, methodOop(vmtarget), ref_kind_does_dispatch(ref_kind), k); ++ return init_method_MemberName(mname, methodOop(vmtarget), ref_kind_does_dispatch(ref_kind), k); + } else { + return NULL; } +@@ -174,31 +178,34 @@ + return NULL; + } -+ -+ /** -+ * Set limit by property name and state -+ * @param propertyName property name -+ * @param state the state of the property -+ * @param value the value of the property -+ * @return true if the property is managed by the security property manager; -+ * false if otherwise. -+ */ -+ public boolean setValue(String propertyName, State state, Object value) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ setValue(index, state, (String)value); -+ return true; +-oop MethodHandles::init_method_MemberName(oop mname_oop, methodOop m, bool do_dispatch, +- klassOop receiver_limit) { ++oop MethodHandles::init_method_MemberName(Handle mname, methodOop m, bool do_dispatch, ++ KlassHandle resolved_klass_h) { ++ klassOop resolved_klass = resolved_klass_h(); + AccessFlags mods = m->access_flags(); + int flags = (jushort)( mods.as_short() & JVM_RECOGNIZED_METHOD_MODIFIERS ); + int vmindex = methodOopDesc::nonvirtual_vtable_index; // implies never any dispatch +- klassOop mklass = m->method_holder(); +- if (receiver_limit == NULL) +- receiver_limit = mklass; ++ bool is_itable_call = false; ++ klassOop m_klass = m->method_holder(); ++ // resolved_klass is a copy of CallInfo::resolved_klass, if available ++ if (resolved_klass == NULL) ++ resolved_klass = m_klass; + if (m->is_initializer()) { + flags |= IS_CONSTRUCTOR | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT); + } else if (mods.is_static()) { + flags |= IS_METHOD | (JVM_REF_invokeStatic << REFERENCE_KIND_SHIFT); +- } else if (receiver_limit != mklass && +- !Klass::cast(receiver_limit)->is_subtype_of(mklass)) { ++ } else if (resolved_klass != m_klass && ++ !Klass::cast(resolved_klass)->is_subtype_of(m_klass)) { + return NULL; // bad receiver limit +- } else if (Klass::cast(receiver_limit)->is_interface() && +- Klass::cast(mklass)->is_interface()) { ++ } else if (Klass::cast(resolved_klass)->is_interface() && ++ Klass::cast(m_klass)->is_interface()) { + flags |= IS_METHOD | (JVM_REF_invokeInterface << REFERENCE_KIND_SHIFT); +- receiver_limit = mklass; // ignore passed-in limit; interfaces are interconvertible + vmindex = klassItable::compute_itable_index(m); +- } else if (mklass != receiver_limit && Klass::cast(mklass)->is_interface()) { ++ is_itable_call = true; ++ } else if (m_klass != resolved_klass && Klass::cast(m_klass)->is_interface()) { + flags |= IS_METHOD | (JVM_REF_invokeVirtual << REFERENCE_KIND_SHIFT); + // it is a miranda method, so m->vtable_index is not what we want + ResourceMark rm; +- klassVtable* vt = instanceKlass::cast(receiver_limit)->vtable(); ++ klassVtable* vt = instanceKlass::cast(resolved_klass)->vtable(); + vmindex = vt->index_of_miranda(m->name(), m->signature()); + } else if (!do_dispatch || m->can_be_statically_bound()) { + flags |= IS_METHOD | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT); +@@ -207,10 +214,37 @@ + vmindex = m->vtable_index(); + } + ++ if (vmindex >= 0 && !is_itable_call) { ++ if (Klass::cast(m_klass)->is_interface()) { ++ // This is a vtable call to an interface method (abstract "miranda method"). ++ // The vtable index is meaningless without a class (not interface) receiver type, so get one. ++ // (LinkResolver should help us figure this out.) ++ KlassHandle m_klass_non_interface = resolved_klass; ++ if (m_klass_non_interface->is_interface()) { ++ m_klass_non_interface = SystemDictionary::Object_klass(); ++#ifdef ASSERT ++ { ResourceMark rm; ++ methodOop m2 = m_klass_non_interface->vtable()->method_at(vmindex); ++ assert(m->name() == m2->name() && m->signature() == m2->signature(), ++ err_msg("at %d, %s != %s", vmindex, ++ m->name_and_sig_as_C_string(), m2->name_and_sig_as_C_string())); + } -+ return false; ++#endif //ASSERT ++ } ++ if (!m->is_public()) { ++ assert(m->is_public(), "virtual call must be to public interface method"); ++ return NULL; // elicit an error later in product build ++ } ++ assert(Klass::cast(resolved_klass)->is_subtype_of(m_klass_non_interface()), "virtual call must be type-safe"); ++ m_klass = m_klass_non_interface(); + } ++ } + - /** - * Set the value for a specific property. - * -@@ -119,6 +137,23 @@ - states[index] = state; ++ oop mname_oop = mname(); + java_lang_invoke_MemberName::set_flags(mname_oop, flags); + java_lang_invoke_MemberName::set_vmtarget(mname_oop, m); + java_lang_invoke_MemberName::set_vmindex(mname_oop, vmindex); // vtable/itable index +- java_lang_invoke_MemberName::set_clazz(mname_oop, Klass::cast(receiver_limit)->java_mirror()); ++ java_lang_invoke_MemberName::set_clazz(mname_oop, Klass::cast(m_klass)->java_mirror()); + // Note: name and type can be lazily computed by resolve_MemberName, + // if Java code needs them as resolved String and MethodType objects. + // The clazz must be eagerly stored, because it provides a GC +@@ -218,11 +252,12 @@ + // If relevant, the vtable or itable value is stored as vmindex. + // This is done eagerly, since it is readily available without + // constructing any new objects. +- // TO DO: maybe intern mname_oop +- return mname_oop; ++ instanceKlass::cast(m->method_holder())->add_member_name(m->method_idnum(), mname); ++ ++ return mname(); + } + +-Handle MethodHandles::init_method_MemberName(oop mname_oop, CallInfo& info, TRAPS) { ++Handle MethodHandles::init_method_MemberName(Handle mname, CallInfo& info, TRAPS) { + Handle empty; + if (info.resolved_appendix().not_null()) { + // The resolved MemberName must not be accompanied by an appendix argument, +@@ -242,23 +277,24 @@ + } else { + vmindex = info.vtable_index(); + } +- oop res = init_method_MemberName(mname_oop, m(), (vmindex >= 0), defc()); ++ oop res = init_method_MemberName(mname, m(), (vmindex >= 0), defc()); + assert(res == NULL || (java_lang_invoke_MemberName::vmindex(res) == vmindex), ""); + return Handle(THREAD, res); + } + +-oop MethodHandles::init_field_MemberName(oop mname_oop, klassOop field_holder, ++oop MethodHandles::init_field_MemberName(Handle mname, KlassHandle field_holder, + AccessFlags mods, oop type, oop name, + intptr_t offset, bool is_setter) { + int flags = (jushort)( mods.as_short() & JVM_RECOGNIZED_FIELD_MODIFIERS ); + flags |= IS_FIELD | ((mods.is_static() ? JVM_REF_getStatic : JVM_REF_getField) << REFERENCE_KIND_SHIFT); + if (is_setter) flags += ((JVM_REF_putField - JVM_REF_getField) << REFERENCE_KIND_SHIFT); +- oop vmtarget = field_holder; ++ oop vmtarget = field_holder(); + int vmindex = offset; // determines the field uniquely when combined with static bit ++ oop mname_oop = mname(); + java_lang_invoke_MemberName::set_flags(mname_oop, flags); + java_lang_invoke_MemberName::set_vmtarget(mname_oop, vmtarget); + java_lang_invoke_MemberName::set_vmindex(mname_oop, vmindex); +- java_lang_invoke_MemberName::set_clazz(mname_oop, Klass::cast(field_holder)->java_mirror()); ++ java_lang_invoke_MemberName::set_clazz(mname_oop, field_holder()->java_mirror()); + if (name != NULL) + java_lang_invoke_MemberName::set_name(mname_oop, name); + if (type != NULL) +@@ -270,11 +306,10 @@ + // because they unambiguously identify the field. + // Although the fieldDescriptor::_index would also identify the field, + // we do not use it, because it is harder to decode. +- // TO DO: maybe intern mname_oop +- return mname_oop; ++ return mname(); + } + +-Handle MethodHandles::init_field_MemberName(oop mname_oop, FieldAccessInfo& info, TRAPS) { ++Handle MethodHandles::init_field_MemberName(Handle mname, FieldAccessInfo& info, TRAPS) { + return Handle(); + #if 0 + KlassHandle field_holder = info.klass(); +@@ -571,7 +606,7 @@ + // An unresolved member name is a mere symbolic reference. + // Resolving it plants a vmtarget/vmindex in it, + // which refers dirctly to JVM internals. +-Handle MethodHandles::resolve_MemberName(Handle mname, TRAPS) { ++Handle MethodHandles::resolve_MemberName(Handle mname, KlassHandle caller, TRAPS) { + Handle empty; + assert(java_lang_invoke_MemberName::is_instance(mname()), ""); + +@@ -650,21 +685,49 @@ + if (ref_kind == JVM_REF_invokeStatic) { + //do_dispatch = false; // no need, since statics are never dispatched + LinkResolver::resolve_static_call(result, +- defc, name, type, KlassHandle(), false, false, THREAD); ++ defc, name, type, caller, caller.not_null(), false, THREAD); + } else if (ref_kind == JVM_REF_invokeInterface) { + LinkResolver::resolve_interface_call(result, Handle(), defc, +- defc, name, type, KlassHandle(), false, false, THREAD); ++ defc, name, type, caller, caller.not_null(), false, THREAD); + } else if (mh_invoke_id != vmIntrinsics::_none) { + assert(!is_signature_polymorphic_static(mh_invoke_id), ""); + LinkResolver::resolve_handle_call(result, +- defc, name, type, KlassHandle(), THREAD); ++ defc, name, type, caller, THREAD); + } else if (ref_kind == JVM_REF_invokeSpecial) { + do_dispatch = false; // force non-virtual linkage + LinkResolver::resolve_special_call(result, +- defc, name, type, KlassHandle(), false, THREAD); ++ defc, name, type, caller, caller.not_null(), THREAD); ++ // CR 8029533: ++ // As a corner case, invokespecial can return a method *below* its resolved_klass. ++ // Since method search *starts* at the resolved_klass, the eventual ++ // method is almost always in a supertype *above* the resolved_klass. ++ // This pattern breaks when an invokespecial "over-reaches" beyond an ++ // immediate super to a method overridden by a super class. ++ // In that case, the selected method will be below the resolved_klass. ++ // (This is the behavior enabled by the famous ACC_SUPER classfile flag.) ++ // ++ // Downstream of this code, we make assumptions about resolved_klass being below m. ++ // (See init_method_MemberName, the comment "bad receiver limit".) ++ // We basically want to patch result._resolved_klass to be m.method_holder(). ++ // The simplest way to get this happier outcome is to re-resolve. ++ if (!HAS_PENDING_EXCEPTION && ++ caller.not_null() && ++ result.resolved_method().not_null()) { ++ // this is the m_klass value that will be checked later: ++ klassOop m_klass = result.resolved_method()->method_holder(); ++ if (m_klass != result.resolved_klass()() && ++ Klass::cast(m_klass)->is_subtype_of(result.resolved_klass()())) { ++ KlassHandle adjusted_defc(THREAD, m_klass); ++ LinkResolver::resolve_special_call(result, ++ adjusted_defc, name, type, caller, caller.not_null(), THREAD); ++ assert(HAS_PENDING_EXCEPTION // if there is something like an OOM, pass it up to caller ++ || result.resolved_method()->method_holder() == adjusted_defc(), ++ "same method, different resolved_klass"); ++ } ++ } + } else if (ref_kind == JVM_REF_invokeVirtual) { + LinkResolver::resolve_virtual_call(result, Handle(), defc, +- defc, name, type, KlassHandle(), false, false, THREAD); ++ defc, name, type, caller, caller.not_null(), false, THREAD); + } else { + assert(false, err_msg("ref_kind=%d", ref_kind)); + } +@@ -672,7 +735,7 @@ + return empty; + } + } +- return init_method_MemberName(mname(), result, THREAD); ++ return init_method_MemberName(mname, result, THREAD); + } + case IS_CONSTRUCTOR: + { +@@ -681,7 +744,7 @@ + assert(!HAS_PENDING_EXCEPTION, ""); + if (name == vmSymbols::object_initializer_name()) { + LinkResolver::resolve_special_call(result, +- defc, name, type, KlassHandle(), false, THREAD); ++ defc, name, type, caller, caller.not_null(), THREAD); + } else { + break; // will throw after end of switch } +@@ -690,7 +753,7 @@ + } + } + assert(result.is_statically_bound(), ""); +- return init_method_MemberName(mname(), result, THREAD); ++ return init_method_MemberName(mname, result, THREAD); } + case IS_FIELD: + { +@@ -703,7 +766,7 @@ + oop name = field_name_or_null(fd.name()); + bool is_setter = (ref_kind_is_valid(ref_kind) && ref_kind_is_setter(ref_kind)); + mname = Handle(THREAD, +- init_field_MemberName(mname(), sel_klass->as_klassOop(), ++ init_field_MemberName(mname, sel_klass, + fd.access_flags(), type, name, fd.offset(), is_setter)); + return mname; + } +@@ -795,16 +858,16 @@ + THROW_MSG(vmSymbols::java_lang_InternalError(), "unrecognized MemberName format"); + } + +-int MethodHandles::find_MemberNames(klassOop k, ++int MethodHandles::find_MemberNames(KlassHandle k, + Symbol* name, Symbol* sig, +- int mflags, klassOop caller, +- int skip, objArrayOop results) { +- DEBUG_ONLY(No_Safepoint_Verifier nsv); +- // this code contains no safepoints! ++ int mflags, KlassHandle caller, ++ int skip, objArrayHandle results) { + + // %%% take caller into account! + +- if (k == NULL || !Klass::cast(k)->oop_is_instance()) return -1; ++ Thread* thread = Thread::current(); + ++ if (k.is_null() || !k->oop_is_instance()) return -1; + + int rfill = 0, rlimit = results->length(), rskip = skip; + // overflow measurement: +@@ -832,7 +895,7 @@ + } + + if ((match_flags & IS_FIELD) != 0) { +- for (FieldStream st(k, local_only, !search_intfc); !st.eos(); st.next()) { ++ for (FieldStream st(k(), local_only, !search_intfc); !st.eos(); st.next()) { + if (name != NULL && st.name() != name) + continue; + if (sig != NULL && st.signature() != sig) +@@ -841,15 +904,15 @@ + if (rskip > 0) { + --rskip; + } else if (rfill < rlimit) { +- oop result = results->obj_at(rfill++); +- if (!java_lang_invoke_MemberName::is_instance(result)) ++ Handle result(thread, results->obj_at(rfill++)); ++ if (!java_lang_invoke_MemberName::is_instance(result())) + return -99; // caller bug! + oop type = field_signature_type_or_null(st.signature()); + oop name = field_name_or_null(st.name()); +- oop saved = MethodHandles::init_field_MemberName(result, st.klass()->as_klassOop(), ++ oop saved = MethodHandles::init_field_MemberName(result, st.klass(), + st.access_flags(), type, name, + st.offset()); +- if (saved != result) ++ if (saved != result()) + results->obj_at_put(rfill-1, saved); // show saved instance to user + } else if (++overflow >= overflow_limit) { + match_flags = 0; break; // got tired of looking at overflow +@@ -882,7 +945,7 @@ + } else { + // caller will accept either sort; no need to adjust name + } +- for (MethodStream st(k, local_only, !search_intfc); !st.eos(); st.next()) { ++ for (MethodStream st(k(), local_only, !search_intfc); !st.eos(); st.next()) { + methodOop m = st.method(); + Symbol* m_name = m->name(); + if (m_name == clinit_name) +@@ -895,11 +958,11 @@ + if (rskip > 0) { + --rskip; + } else if (rfill < rlimit) { +- oop result = results->obj_at(rfill++); +- if (!java_lang_invoke_MemberName::is_instance(result)) ++ Handle result(thread, results->obj_at(rfill++)); ++ if (!java_lang_invoke_MemberName::is_instance(result())) + return -99; // caller bug! +- oop saved = MethodHandles::init_method_MemberName(result, m, true, NULL); +- if (saved != result) ++ oop saved = MethodHandles::init_method_MemberName(result, m, true, KlassHandle()); ++ if (saved != result()) + results->obj_at_put(rfill-1, saved); // show saved instance to user + } else if (++overflow >= overflow_limit) { + match_flags = 0; break; // got tired of looking at overflow +@@ -911,6 +974,85 @@ + return rfill + overflow; + } + ++//------------------------------------------------------------------------------ ++// MemberNameTable ++// + -+ /** -+ * Return the value of the specified property -+ * -+ * @param propertyName the property name -+ * @return the value of the property as a string -+ */ -+ public String getValue(String propertyName) { -+ int index = getIndex(propertyName); -+ if (index > -1) { -+ return getValueByIndex(index); -+ } ++MemberNameTable::MemberNameTable(int methods_cnt) ++ : GrowableArray(methods_cnt, true) { ++ assert_locked_or_safepoint(MemberNameTable_lock); ++} + -+ return null; ++MemberNameTable::~MemberNameTable() { ++ assert_locked_or_safepoint(MemberNameTable_lock); ++ int len = this->length(); ++ ++ for (int idx = 0; idx < len; idx++) { ++ jweak ref = this->at(idx); ++ JNIHandles::destroy_weak_global(ref); ++ } ++} ++ ++void MemberNameTable::add_member_name(int index, jweak mem_name_wref) { ++ assert_locked_or_safepoint(MemberNameTable_lock); ++ this->at_put_grow(index, mem_name_wref); ++} ++ ++// Return a member name oop or NULL. ++oop MemberNameTable::get_member_name(int index) { ++ assert_locked_or_safepoint(MemberNameTable_lock); ++ jweak ref = this->at(index); ++ oop mem_name = JNIHandles::resolve(ref); ++ return mem_name; ++} ++ ++oop MemberNameTable::find_member_name_by_method(methodOop old_method) { ++ assert_locked_or_safepoint(MemberNameTable_lock); ++ oop found = NULL; ++ int len = this->length(); ++ ++ for (int idx = 0; idx < len; idx++) { ++ oop mem_name = JNIHandles::resolve(this->at(idx)); ++ if (mem_name == NULL) { ++ continue; ++ } ++ methodOop method = (methodOop)java_lang_invoke_MemberName::vmtarget(mem_name); ++ if (method == old_method) { ++ found = mem_name; ++ break; + } ++ } ++ return found; ++} + - /** - * Return the value of the specified property - * ---- jaxp/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java 2013-09-06 11:23:00.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java 2014-04-20 12:39:47.000000000 -0700 -@@ -37,7 +37,6 @@ - import com.sun.org.apache.xerces.internal.util.HTTPInputSource; - import com.sun.org.apache.xerces.internal.util.IntStack; - import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; --import com.sun.org.apache.xerces.internal.util.SecurityManager; - import com.sun.org.apache.xerces.internal.util.SymbolTable; - import com.sun.org.apache.xerces.internal.util.URI; - import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; -@@ -45,6 +44,7 @@ - import com.sun.org.apache.xerces.internal.util.XMLChar; - import com.sun.org.apache.xerces.internal.util.XMLSymbols; - import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException; -+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; - import com.sun.org.apache.xerces.internal.xni.Augmentations; - import com.sun.org.apache.xerces.internal.xni.NamespaceContext; - import com.sun.org.apache.xerces.internal.xni.QName; -@@ -289,7 +289,7 @@ - protected SymbolTable fSymbolTable; - protected XMLErrorReporter fErrorReporter; - protected XMLEntityResolver fEntityResolver; -- protected SecurityManager fSecurityManager; -+ protected XMLSecurityManager fSecurityManager; - protected XMLSecurityPropertyManager fSecurityPropertyMgr; ++// It is called at safepoint only ++void MemberNameTable::adjust_method_entries(methodOop* old_methods, methodOop* new_methods, ++ int methods_length, bool *trace_name_printed) { ++ assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint"); ++ // search the MemberNameTable for uses of either obsolete or EMCP methods ++ for (int j = 0; j < methods_length; j++) { ++ methodOop old_method = old_methods[j]; ++ methodOop new_method = new_methods[j]; ++ oop mem_name = find_member_name_by_method(old_method); ++ if (mem_name != NULL) { ++ java_lang_invoke_MemberName::adjust_vmtarget(mem_name, new_method); ++ ++ if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { ++ if (!(*trace_name_printed)) { ++ // RC_TRACE_MESG macro has an embedded ResourceMark ++ RC_TRACE_MESG(("adjust: name=%s", ++ Klass::cast(old_method->method_holder())->external_name())); ++ *trace_name_printed = true; ++ } ++ // RC_TRACE macro has an embedded ResourceMark ++ RC_TRACE(0x00400000, ("MemberName method update: %s(%s)", ++ new_method->name()->as_C_string(), ++ new_method->signature()->as_C_string())); ++ } ++ } ++ } ++} ++ + // + // Here are the native methods in java.lang.invoke.MethodHandleNatives + // They are the private interface between this JVM and the HotSpot-specific +@@ -1002,8 +1144,8 @@ + if (mname_jh == NULL) { THROW_MSG(vmSymbols::java_lang_InternalError(), "mname is null"); } + if (target_jh == NULL) { THROW_MSG(vmSymbols::java_lang_InternalError(), "target is null"); } + Handle mname(THREAD, JNIHandles::resolve_non_null(mname_jh)); +- oop target_oop = JNIHandles::resolve_non_null(target_jh); +- MethodHandles::init_MemberName(mname(), target_oop); ++ Handle target(THREAD, JNIHandles::resolve_non_null(target_jh)); ++ MethodHandles::init_MemberName(mname, target); + } + JVM_END - // these are needed for text include processing -@@ -517,8 +517,8 @@ +@@ -1025,7 +1167,12 @@ + if (VerifyMethodHandles && caller_jh != NULL && + java_lang_invoke_MemberName::clazz(mname()) != NULL) { + klassOop reference_klass = java_lang_Class::as_klassOop(java_lang_invoke_MemberName::clazz(mname())); +- if (reference_klass != NULL) { ++ if (reference_klass != NULL && Klass::cast(reference_klass)->oop_is_objArray()) { ++ reference_klass = objArrayKlass::cast(reference_klass)->bottom_klass(); ++ } ++ ++ // Reflection::verify_class_access can only handle instance classes. ++ if (reference_klass != NULL && Klass::cast(reference_klass)->oop_is_instance()) { + // Emulate LinkResolver::check_klass_accessability. + klassOop caller = java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(caller_jh)); + if (!Reflection::verify_class_access(caller, +@@ -1036,7 +1183,11 @@ + } + } - // Get security manager. - try { -- SecurityManager value = -- (SecurityManager)componentManager.getProperty( -+ XMLSecurityManager value = -+ (XMLSecurityManager)componentManager.getProperty( - SECURITY_MANAGER); +- Handle resolved = MethodHandles::resolve_MemberName(mname, CHECK_NULL); ++ KlassHandle caller(THREAD, ++ caller_jh == NULL ? (klassOop) NULL : ++ java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(caller_jh))); ++ Handle resolved = MethodHandles::resolve_MemberName(mname, caller, CHECK_NULL); ++ + if (resolved.is_null()) { + int flags = java_lang_invoke_MemberName::flags(mname()); + int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK; +@@ -1109,11 +1260,12 @@ + } else if (vmtarget->is_klass()) { + x = Klass::cast((klassOop) vmtarget())->java_mirror(); + } else { +- Handle mname2 = MethodHandles::new_MemberName(CHECK_NULL); +- if (vmtarget->is_method()) +- x = MethodHandles::init_method_MemberName(mname2(), methodOop(vmtarget()), false, NULL); +- else ++ if (vmtarget->is_method()) { ++ x = mname(); ++ } else { ++ Handle mname2 = MethodHandles::new_MemberName(CHECK_NULL); + x = MethodHandles::init_MemberName(mname2(), vmtarget()); ++ } + } + result->obj_at_put(1, x); + return JNIHandles::make_local(env, result()); +@@ -1156,8 +1308,8 @@ + // %%% TO DO + } - if (value != null) { -@@ -674,7 +674,7 @@ - return; - } - if (propertyId.equals(SECURITY_MANAGER)) { -- fSecurityManager = (SecurityManager)value; -+ fSecurityManager = (XMLSecurityManager)value; - if (fChildConfig != null) { - fChildConfig.setProperty(propertyId, value); - } ---- jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java 2013-09-06 11:23:01.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java 2014-04-20 12:39:47.000000000 -0700 -@@ -20,6 +20,7 @@ +- int res = MethodHandles::find_MemberNames(k(), name, sig, mflags, +- caller(), skip, results()); ++ int res = MethodHandles::find_MemberNames(k, name, sig, mflags, ++ caller, skip, results); + // TO DO: expand at least some of the MemberNames, to avoid massive callbacks + return res; + } +--- ./hotspot/src/share/vm/prims/methodHandles.hpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/methodHandles.hpp 2014-06-06 19:56:20.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -39,7 +39,6 @@ + // in java.lang.invoke and sun.invoke. + // See also javaClasses for layouts java_lang_invoke_Method{Handle,Type,Type::Form}. + public: +- public: + static bool enabled() { return _enabled; } + static void set_enabled(bool z); - package com.sun.org.apache.xerces.internal.xni.parser; +@@ -51,21 +50,21 @@ -+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; - import java.io.IOException; - import com.sun.org.apache.xerces.internal.xni.XNIException; + public: + // working with member names +- static Handle resolve_MemberName(Handle mname, TRAPS); // compute vmtarget/vmindex from name/type ++ static Handle resolve_MemberName(Handle mname, KlassHandle caller, TRAPS); // compute vmtarget/vmindex from name/type + static void expand_MemberName(Handle mname, int suppress, TRAPS); // expand defc/name/type if missing + static Handle new_MemberName(TRAPS); // must be followed by init_MemberName +- static oop init_MemberName(oop mname_oop, oop target_oop); // compute vmtarget/vmindex from target +- static oop init_method_MemberName(oop mname_oop, methodOop m, bool do_dispatch, +- klassOop receiver_limit); +- static oop init_field_MemberName(oop mname_oop, klassOop field_holder, ++ static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target ++ static oop init_method_MemberName(Handle mname_h, methodOop m, bool do_dispatch, ++ KlassHandle resolved_klass_h); ++ static oop init_field_MemberName(Handle mname_h, KlassHandle field_holder_h, + AccessFlags mods, oop type, oop name, + intptr_t offset, bool is_setter = false); +- static Handle init_method_MemberName(oop mname_oop, CallInfo& info, TRAPS); +- static Handle init_field_MemberName(oop mname_oop, FieldAccessInfo& info, TRAPS); ++ static Handle init_method_MemberName(Handle mname_h, CallInfo& info, TRAPS); ++ static Handle init_field_MemberName(Handle mname_h, FieldAccessInfo& info, TRAPS); + static int method_ref_kind(methodOop m, bool do_dispatch_if_possible = true); +- static int find_MemberNames(klassOop k, Symbol* name, Symbol* sig, +- int mflags, klassOop caller, +- int skip, objArrayOop results); ++ static int find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig, ++ int mflags, KlassHandle caller, ++ int skip, objArrayHandle results); + // bit values for suppress argument to expand_MemberName: + enum { _suppress_defc = 1, _suppress_name = 2, _suppress_type = 4 }; + +@@ -230,4 +229,26 @@ + void generate(); + }; -@@ -95,4 +96,5 @@ - public boolean scanDTDExternalSubset(boolean complete) - throws IOException, XNIException; ++//------------------------------------------------------------------------------ ++// MemberNameTable ++// ++ ++class MemberNameTable : public GrowableArray { ++ public: ++ MemberNameTable(int methods_cnt); ++ ~MemberNameTable(); ++ ++ void add_member_name(int index, jweak mem_name_ref); ++ oop get_member_name(int index); ++ ++ public: ++ // RedefineClasses() API support: ++ // If a MemberName refers to old_method then update it ++ // to refer to new_method. ++ void adjust_method_entries(methodOop* old_methods, methodOop* new_methods, ++ int methods_length, bool *trace_name_printed); ++ private: ++ oop find_member_name_by_method(methodOop old_method); ++}; ++ + #endif // SHARE_VM_PRIMS_METHODHANDLES_HPP +--- ./hotspot/src/share/vm/prims/whitebox.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/prims/whitebox.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -27,6 +27,8 @@ + #include "memory/universe.hpp" + #include "oops/oop.inline.hpp" + ++#include "code/codeCache.hpp" ++ + #include "classfile/symbolTable.hpp" + + #include "prims/whitebox.hpp" +@@ -131,6 +133,13 @@ + return MemTracker::wbtest_wait_for_data_merge(); + WB_END + ++WB_ENTRY(void, WB_DeoptimizeAll(JNIEnv* env, jobject o)) ++ MutexLockerEx mu(Compile_lock); ++ CodeCache::mark_all_nmethods_for_deoptimization(); ++ VM_Deoptimize op; ++ VMThread::execute(&op); ++WB_END ++ + //Some convenience methods to deal with objects from java + int WhiteBox::offset_for_field(const char* field_name, oop object, + Symbol* signature_symbol) { +@@ -204,6 +213,7 @@ + {CC"NMTUncommitMemory", CC"(JJ)V", (void*)&WB_NMTUncommitMemory }, + {CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory }, + {CC"NMTWaitForDataMerge", CC"()Z", (void*)&WB_NMTWaitForDataMerge}, ++ {CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll }, + }; -+ public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer); - } // interface XMLDTDScanner ---- jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java 2013-09-06 11:23:02.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java 2014-04-20 12:39:47.000000000 -0700 -@@ -24,20 +24,17 @@ - package com.sun.org.apache.xml.internal.resolver; + #undef CC +--- ./hotspot/src/share/vm/runtime/arguments.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/arguments.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1447,6 +1447,17 @@ + } + FLAG_SET_DEFAULT(UseParallelGC, true); - import com.sun.org.apache.xerces.internal.utils.SecuritySupport; -+import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver; -+import com.sun.org.apache.xml.internal.resolver.helpers.Debug; - import java.io.InputStream; -- --import java.net.URL; - import java.net.MalformedURLException; -- -+import java.net.URL; - import java.util.MissingResourceException; - import java.util.PropertyResourceBundle; - import java.util.ResourceBundle; - import java.util.StringTokenizer; - import java.util.Vector; -- --import com.sun.org.apache.xml.internal.resolver.helpers.Debug; --import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver; --import com.sun.org.apache.xml.internal.resolver.Catalog; -+import sun.reflect.misc.ReflectUtil; ++ if (UseAdaptiveSizePolicy) { ++ // We don't want to limit adaptive heap sizing's freedom to adjust the heap ++ // unless the user actually sets these flags. ++ if (FLAG_IS_DEFAULT(MinHeapFreeRatio)) { ++ FLAG_SET_DEFAULT(MinHeapFreeRatio, 0); ++ } ++ if (FLAG_IS_DEFAULT(MaxHeapFreeRatio)) { ++ FLAG_SET_DEFAULT(MaxHeapFreeRatio, 100); ++ } ++ } ++ + // If no heap maximum was requested explicitly, use some reasonable fraction + // of the physical memory, up to a maximum of 1GB. + if (UseParallelGC) { +@@ -1719,7 +1730,7 @@ + } - /** - * CatalogManager provides an interface to the catalog properties. -@@ -687,7 +684,7 @@ - catalog = new Catalog(); - } else { - try { -- catalog = (Catalog) Class.forName(catalogClassName).newInstance(); -+ catalog = (Catalog) ReflectUtil.forName(catalogClassName).newInstance(); - } catch (ClassNotFoundException cnfe) { - debug.message(1,"Catalog class named '" - + catalogClassName ---- jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java 2013-09-06 11:23:02.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java 2014-04-20 12:39:47.000000000 -0700 -@@ -23,24 +23,21 @@ + bool Arguments::verify_percentage(uintx value, const char* name) { +- if (value <= 100) { ++ if (is_percentage(value)) { + return true; + } + jio_fprintf(defaultStream::error_stream(), +@@ -1768,6 +1779,34 @@ + } + } - package com.sun.org.apache.xml.internal.resolver.readers; ++bool Arguments::verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio) { ++ if (!is_percentage(min_heap_free_ratio)) { ++ err_msg.print("MinHeapFreeRatio must have a value between 0 and 100"); ++ return false; ++ } ++ if (min_heap_free_ratio > MaxHeapFreeRatio) { ++ err_msg.print("MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or " ++ "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")", min_heap_free_ratio, ++ MaxHeapFreeRatio); ++ return false; ++ } ++ return true; ++} ++ ++bool Arguments::verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio) { ++ if (!is_percentage(max_heap_free_ratio)) { ++ err_msg.print("MaxHeapFreeRatio must have a value between 0 and 100"); ++ return false; ++ } ++ if (max_heap_free_ratio < MinHeapFreeRatio) { ++ err_msg.print("MaxHeapFreeRatio (" UINTX_FORMAT ") must be greater than or " ++ "equal to MinHeapFreeRatio (" UINTX_FORMAT ")", max_heap_free_ratio, ++ MinHeapFreeRatio); ++ return false; ++ } ++ return true; ++} ++ + // Check consistency of GC selection + bool Arguments::check_gc_consistency() { + check_gclog_consistency(); +@@ -1852,15 +1891,19 @@ + "AdaptiveSizePolicyWeight"); + status = status && verify_percentage(AdaptivePermSizeWeight, "AdaptivePermSizeWeight"); + status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance"); +- status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio"); +- status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio"); + +- if (MinHeapFreeRatio > MaxHeapFreeRatio) { +- jio_fprintf(defaultStream::error_stream(), +- "MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or " +- "equal to MaxHeapFreeRatio (" UINTX_FORMAT ")\n", +- MinHeapFreeRatio, MaxHeapFreeRatio); +- status = false; ++ { ++ // Using "else if" below to avoid printing two error messages if min > max. ++ // This will also prevent us from reporting both min>100 and max>100 at the ++ // same time, but that is less annoying than printing two identical errors IMHO. ++ FormatBuffer<80> err_msg(""); ++ if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) { ++ jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); ++ status = false; ++ } else if (!verify_MaxHeapFreeRatio(err_msg, MaxHeapFreeRatio)) { ++ jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); ++ status = false; ++ } + } + // Keeping the heap 100% free is hard ;-) so limit it to 99%. + MinHeapFreeRatio = MIN2(MinHeapFreeRatio, (uintx) 99); +@@ -1943,11 +1986,12 @@ + // than just disable the lock verification. This will be fixed under + // bug 4788986. + if (UseConcMarkSweepGC && FLSVerifyAllHeapReferences) { +- if (VerifyGCStartAt == 0) { ++ if (VerifyDuringStartup) { + warning("Heap verification at start-up disabled " + "(due to current incompatibility with FLSVerifyAllHeapReferences)"); +- VerifyGCStartAt = 1; // Disable verification at start-up ++ VerifyDuringStartup = false; // Disable verification at start-up + } ++ + if (VerifyBeforeExit) { + warning("Heap verification at shutdown disabled " + "(due to current incompatibility with FLSVerifyAllHeapReferences)"); +@@ -2549,7 +2593,9 @@ + FLAG_SET_CMDLINE(uintx, MaxNewSize, NewSize); + } --import java.util.Hashtable; -+import com.sun.org.apache.xml.internal.resolver.Catalog; -+import com.sun.org.apache.xml.internal.resolver.CatalogException; -+import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces; - import java.io.IOException; - import java.io.InputStream; -+import java.net.MalformedURLException; - import java.net.URL; - import java.net.URLConnection; --import java.net.MalformedURLException; -- --import javax.xml.parsers.DocumentBuilderFactory; -+import java.util.Hashtable; - import javax.xml.parsers.DocumentBuilder; -+import javax.xml.parsers.DocumentBuilderFactory; - import javax.xml.parsers.ParserConfigurationException; -- --import com.sun.org.apache.xml.internal.resolver.Catalog; --import com.sun.org.apache.xml.internal.resolver.CatalogException; --import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; --import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces; -- --import org.xml.sax.SAXException; - import org.w3c.dom.*; -+import org.xml.sax.SAXException; -+import sun.reflect.misc.ReflectUtil; ++#ifndef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. + FLAG_SET_DEFAULT(UseLargePages, true); ++#endif - /** - * A DOM-based CatalogReader. -@@ -199,7 +196,7 @@ - DOMCatalogParser domParser = null; + // Increase some data structure sizes for efficiency + FLAG_SET_CMDLINE(uintx, BaseFootPrintEstimate, MaxHeapSize); +@@ -3111,6 +3157,10 @@ + UNSUPPORTED_OPTION(UseG1GC, "G1 GC"); + #endif - try { -- domParser = (DOMCatalogParser) Class.forName(domParserClass).newInstance(); -+ domParser = (DOMCatalogParser) ReflectUtil.forName(domParserClass).newInstance(); - } catch (ClassNotFoundException cnfe) { - catalog.getCatalogManager().debug.message(1, "Cannot load XML Catalog Parser class", domParserClass); - throw new CatalogException(CatalogException.UNPARSEABLE); ---- jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java 2013-09-06 11:23:02.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java 2014-04-20 12:39:47.000000000 -0700 -@@ -23,19 +23,21 @@ ++#ifdef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. ++ UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages"); ++#endif ++ + #ifndef PRODUCT + if (TraceBytecodesAt != 0) { + TraceBytecodes = true; +--- ./hotspot/src/share/vm/runtime/arguments.hpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/arguments.hpp 2014-06-06 19:56:20.000000000 -0700 +@@ -27,6 +27,7 @@ - package com.sun.org.apache.xml.internal.resolver.readers; + #include "runtime/java.hpp" + #include "runtime/perfData.hpp" ++#include "utilities/debug.hpp" + #include "utilities/top.hpp" --import java.util.Hashtable; --import java.io.IOException; -+import com.sun.org.apache.xml.internal.resolver.Catalog; -+import com.sun.org.apache.xml.internal.resolver.CatalogException; -+import com.sun.org.apache.xml.internal.resolver.CatalogManager; -+import com.sun.org.apache.xml.internal.resolver.helpers.Debug; - import java.io.FileNotFoundException; -+import java.io.IOException; - import java.io.InputStream; -+import java.net.MalformedURLException; - import java.net.URL; - import java.net.URLConnection; --import java.net.MalformedURLException; - import java.net.UnknownHostException; -- -+import java.util.Hashtable; - import javax.xml.parsers.ParserConfigurationException; --import javax.xml.parsers.SAXParserFactory; - import javax.xml.parsers.SAXParser; -- -+import javax.xml.parsers.SAXParserFactory; - import org.xml.sax.AttributeList; - import org.xml.sax.Attributes; - import org.xml.sax.ContentHandler; -@@ -45,12 +47,7 @@ - import org.xml.sax.Locator; - import org.xml.sax.Parser; - import org.xml.sax.SAXException; -- --import com.sun.org.apache.xml.internal.resolver.Catalog; --import com.sun.org.apache.xml.internal.resolver.CatalogManager; --import com.sun.org.apache.xml.internal.resolver.CatalogException; --import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; --import com.sun.org.apache.xml.internal.resolver.helpers.Debug; -+import sun.reflect.misc.ReflectUtil; + // Arguments parses the command line and recognizes options +@@ -350,6 +351,9 @@ + static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { + return is_bad_option(option, ignore, NULL); + } ++ static bool is_percentage(uintx val) { ++ return val <= 100; ++ } + static bool verify_interval(uintx val, uintx min, + uintx max, const char* name); + static bool verify_min_value(intx val, intx min, const char* name); +@@ -411,6 +415,12 @@ + public: + // Parses the arguments + static jint parse(const JavaVMInitArgs* args); ++ // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error ++ // message is returned in the provided buffer. ++ static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio); ++ // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error ++ // message is returned in the provided buffer. ++ static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio); + // Check for consistency in the selection of the garbage collector. + static bool check_gc_consistency(); + // Check consistecy or otherwise of VM argument settings +--- ./hotspot/src/share/vm/runtime/atomic.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/atomic.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -54,6 +54,12 @@ + #ifdef TARGET_OS_ARCH_windows_x86 + # include "atomic_windows_x86.inline.hpp" + #endif ++#ifdef TARGET_OS_ARCH_bsd_x86 ++# include "atomic_bsd_x86.inline.hpp" ++#endif ++#ifdef TARGET_OS_ARCH_bsd_zero ++# include "atomic_bsd_zero.inline.hpp" ++#endif + #ifdef TARGET_OS_ARCH_linux_arm + # include "atomic_linux_arm.inline.hpp" + #endif +--- ./hotspot/src/share/vm/runtime/frame.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/frame.cpp 2014-06-06 19:56:20.000000000 -0700 +@@ -23,6 +23,7 @@ + */ - /** - * A SAX-based CatalogReader. -@@ -246,7 +243,7 @@ - } - parser.parse(new InputSource(is), spHandler); + #include "precompiled.hpp" ++#include "compiler/abstractCompiler.hpp" + #include "gc_interface/collectedHeap.inline.hpp" + #include "interpreter/interpreter.hpp" + #include "interpreter/oopMapCache.hpp" +@@ -559,7 +560,7 @@ + + st->print("%s frame (sp=" INTPTR_FORMAT " unextended sp=" INTPTR_FORMAT, print_name(), sp(), unextended_sp()); + if (sp() != NULL) +- st->print(", fp=" INTPTR_FORMAT ", pc=" INTPTR_FORMAT, fp(), pc()); ++ st->print(", fp=" INTPTR_FORMAT ", real_fp=" INTPTR_FORMAT ", pc=" INTPTR_FORMAT, fp(), real_fp(), pc()); + + if (StubRoutines::contains(pc())) { + st->print_cr(")"); +@@ -720,10 +721,14 @@ + } else if (_cb->is_buffer_blob()) { + st->print("v ~BufferBlob::%s", ((BufferBlob *)_cb)->name()); + } else if (_cb->is_nmethod()) { +- methodOop m = ((nmethod *)_cb)->method(); ++ nmethod* nm = (nmethod*)_cb; ++ methodOop m = nm->method(); + if (m != NULL) { + m->name_and_sig_as_C_string(buf, buflen); +- st->print("J %s", buf); ++ st->print("J %d%s %s %s (%d bytes) @ " PTR_FORMAT " [" PTR_FORMAT "+0x%x]", ++ nm->compile_id(), (nm->is_osr_method() ? "%" : ""), ++ ((nm->compiler() != NULL) ? nm->compiler()->name() : ""), ++ buf, m->code_size(), _pc, _cb->code_begin(), _pc - _cb->code_begin()); } else { -- Parser parser = (Parser) Class.forName(parserClass).newInstance(); -+ Parser parser = (Parser) ReflectUtil.forName(parserClass).newInstance(); - parser.setDocumentHandler(this); - if (bResolver != null) { - parser.setEntityResolver(bResolver); -@@ -352,7 +349,7 @@ + st->print("J " PTR_FORMAT, pc()); + } +--- ./hotspot/src/share/vm/runtime/globals.hpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/globals.hpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1697,6 +1697,9 @@ + product(bool, CMSAbortSemantics, false, \ + "Whether abort-on-overflow semantics is implemented") \ + \ ++ product(bool, CMSParallelInitialMarkEnabled, false, \ ++ "Use the parallel initial mark.") \ ++ \ + product(bool, CMSParallelRemarkEnabled, true, \ + "Whether parallel remark enabled (only if ParNewGC)") \ + \ +@@ -1708,6 +1711,14 @@ + "Whether to always record survivor space PLAB bdries" \ + " (effective only if CMSParallelSurvivorRemarkEnabled)") \ + \ ++ product(bool, CMSEdenChunksRecordAlways, false, \ ++ "Whether to always record eden chunks used for " \ ++ "the parallel initial mark or remark of eden" ) \ ++ \ ++ product(bool, CMSPrintEdenSurvivorChunks, false, \ ++ "Print the eden and the survivor chunks used for the parallel " \ ++ "initial mark or remark of the eden/survivor spaces") \ ++ \ + product(bool, CMSConcurrentMTEnabled, true, \ + "Whether multi-threaded concurrent work enabled (if ParNewGC)") \ + \ +@@ -1917,6 +1928,9 @@ + notproduct(bool, ExecuteInternalVMTests, false, \ + "Enable execution of internal VM tests.") \ + \ ++ notproduct(bool, VerboseInternalVMTests, false, \ ++ "Turn on logging for internal VM tests.") \ ++ \ + product_pd(bool, UseTLAB, "Use thread-local object allocation") \ + \ + product_pd(bool, ResizeTLAB, \ +@@ -2126,6 +2140,13 @@ + product(intx, PrefetchFieldsAhead, -1, \ + "How many fields ahead to prefetch in oop scan (<= 0 means off)") \ + \ ++ diagnostic(bool, VerifySilently, false, \ ++ "Don't print print the verification progress") \ ++ \ ++ diagnostic(bool, VerifyDuringStartup, false, \ ++ "Verify memory system before executing any Java code " \ ++ "during VM initialization") \ ++ \ + diagnostic(bool, VerifyBeforeExit, trueInDebug, \ + "Verify system before exiting") \ + \ +@@ -3010,10 +3031,10 @@ + product_pd(uintx, MaxPermSize, \ + "Maximum size of permanent generation (in bytes)") \ + \ +- product(uintx, MinHeapFreeRatio, 40, \ ++ manageable(uintx, MinHeapFreeRatio, 40, \ + "Min percentage of heap free after GC to avoid expansion") \ + \ +- product(uintx, MaxHeapFreeRatio, 70, \ ++ manageable(uintx, MaxHeapFreeRatio, 70, \ + "Max percentage of heap free after GC to avoid shrinking") \ + \ + product(intx, SoftRefLRUPolicyMSPerMB, 1000, \ +--- ./hotspot/src/share/vm/runtime/mutexLocker.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/mutexLocker.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -57,6 +57,7 @@ + Mutex* JNIGlobalHandle_lock = NULL; + Mutex* JNIHandleBlockFreeList_lock = NULL; + Mutex* JNICachedItableIndex_lock = NULL; ++Mutex* MemberNameTable_lock = NULL; + Mutex* JmethodIdCreation_lock = NULL; + Mutex* JfieldIdCreation_lock = NULL; + Monitor* JNICritical_lock = NULL; +@@ -133,13 +134,15 @@ - try { - saxParser = (SAXCatalogParser) -- Class.forName(saxParserClass).newInstance(); -+ ReflectUtil.forName(saxParserClass).newInstance(); + Mutex* Management_lock = NULL; + Monitor* Service_lock = NULL; +-Mutex* Stacktrace_lock = NULL; ++Monitor* PeriodicTask_lock = NULL; - saxParser.setCatalog(catalog); - saxParser.startDocument(); -@@ -413,7 +410,7 @@ +-Monitor* JfrQuery_lock = NULL; ++#ifdef INCLUDE_TRACE ++Mutex* JfrStacktrace_lock = NULL; + Monitor* JfrMsg_lock = NULL; + Mutex* JfrBuffer_lock = NULL; + Mutex* JfrStream_lock = NULL; +-Monitor* PeriodicTask_lock = NULL; ++Mutex* JfrThreadGroups_lock = NULL; ++#endif - try { - saxParser = (SAXCatalogParser) -- Class.forName(saxParserClass).newInstance(); -+ ReflectUtil.forName(saxParserClass).newInstance(); + #define MAX_NUM_MUTEX 128 + static Monitor * _mutex_array[MAX_NUM_MUTEX]; +@@ -215,7 +218,6 @@ + def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching. + def(ObjAllocPost_lock , Monitor, special, false); + def(Service_lock , Monitor, special, true ); // used for service thread operations +- def(Stacktrace_lock , Mutex, special, true ); // used for JFR stacktrace database + def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs. - saxParser.setCatalog(catalog); - saxParser.startDocument(); ---- jaxp/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java 2013-09-06 11:23:02.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java 2014-04-20 12:39:47.000000000 -0700 -@@ -22,6 +22,11 @@ - */ - package com.sun.org.apache.xml.internal.serializer; + def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread +@@ -262,6 +264,7 @@ + def(Heap_lock , Monitor, nonleaf+1, false); + def(JfieldIdCreation_lock , Mutex , nonleaf+1, true ); // jfieldID, Used in VM_Operation + def(JNICachedItableIndex_lock , Mutex , nonleaf+1, false); // Used to cache an itable index during JNI invoke ++ def(MemberNameTable_lock , Mutex , nonleaf+1, false); // Used to protect MemberNameTable + + def(CompiledIC_lock , Mutex , nonleaf+2, false); // locks VtableStubs_lock, InlineCacheBuffer_lock + def(CompileTaskAlloc_lock , Mutex , nonleaf+2, true ); +@@ -278,12 +281,17 @@ + def(MethodCompileQueue_lock , Monitor, nonleaf+4, true ); + def(Debug2_lock , Mutex , nonleaf+4, true ); + def(Debug3_lock , Mutex , nonleaf+4, true ); +- def(CompileThread_lock , Monitor, nonleaf+5, false ); ++ def(CompileThread_lock , Monitor, nonleaf+5, false); ++ def(PeriodicTask_lock , Monitor, nonleaf+5, true); -+import com.sun.org.apache.xalan.internal.utils.SecuritySupport; -+import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; -+import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver; -+import com.sun.org.apache.xml.internal.serializer.utils.Utils; -+import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; - import java.io.BufferedReader; - import java.io.InputStream; - import java.io.InputStreamReader; -@@ -29,19 +34,11 @@ - import java.net.URL; - import java.util.Enumeration; - import java.util.HashMap; -+import java.util.Locale; - import java.util.PropertyResourceBundle; - import java.util.ResourceBundle; --import java.security.AccessController; --import java.security.PrivilegedAction; -- - import javax.xml.transform.TransformerException; ++#ifdef INCLUDE_TRACE + def(JfrMsg_lock , Monitor, leaf, true); + def(JfrBuffer_lock , Mutex, nonleaf+1, true); ++ def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); + def(JfrStream_lock , Mutex, nonleaf+2, true); +- def(PeriodicTask_lock , Monitor, nonleaf+5, true); ++ def(JfrStacktrace_lock , Mutex, special, true ); ++#endif ++ + } --import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; --import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver; --import com.sun.org.apache.xml.internal.serializer.utils.Utils; --import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; --import com.sun.org.apache.xalan.internal.utils.ObjectFactory; -- - /** - * This class provides services that tell if a character should have - * special treatement, such as entity reference substitution or normalization -@@ -176,13 +173,19 @@ - // file - // 3) try treating the resource a URI + GCMutexLocker::GCMutexLocker(Monitor * mutex) { +--- ./hotspot/src/share/vm/runtime/mutexLocker.hpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/mutexLocker.hpp 2014-06-06 19:56:23.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -51,6 +51,7 @@ + extern Mutex* JNIGlobalHandle_lock; // a lock on creating JNI global handles + extern Mutex* JNIHandleBlockFreeList_lock; // a lock on the JNI handle block free list + extern Mutex* JNICachedItableIndex_lock; // a lock on caching an itable index during JNI invoke ++extern Mutex* MemberNameTable_lock; // a lock on the MemberNameTable updates + extern Mutex* JmethodIdCreation_lock; // a lock on creating JNI method identifiers + extern Mutex* JfieldIdCreation_lock; // a lock on creating JNI static field identifiers + extern Monitor* JNICritical_lock; // a lock used while entering and exiting JNI critical regions, allows GC to sometimes get in +@@ -135,13 +136,15 @@ -- if (internal) { -- try { -+ try { -+ if (internal) { - // Load entity property files by using PropertyResourceBundle, - // cause of security issure for applets - entities = PropertyResourceBundle.getBundle(entitiesResource); -- } catch (Exception e) {} -- } -+ } else { -+ ClassLoader cl = SecuritySupport.getContextClassLoader(); -+ if (cl != null) { -+ entities = PropertyResourceBundle.getBundle(entitiesResource, -+ Locale.getDefault(), cl); -+ } -+ } -+ } catch (Exception e) {} + extern Mutex* Management_lock; // a lock used to serialize JVM management + extern Monitor* Service_lock; // a lock used for service thread operation +-extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table ++extern Monitor* PeriodicTask_lock; // protects the periodic task structure - if (entities != null) { - Enumeration keys = entities.getKeys(); -@@ -198,6 +201,7 @@ - set(S_CARRIAGERETURN); - } else { - InputStream is = null; -+ String err = null; +-extern Monitor* JfrQuery_lock; // protects JFR use ++#ifdef INCLUDE_TRACE ++extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table + extern Monitor* JfrMsg_lock; // protects JFR messaging + extern Mutex* JfrBuffer_lock; // protects JFR buffer operations + extern Mutex* JfrStream_lock; // protects JFR stream access +-extern Monitor* PeriodicTask_lock; // protects the periodic task structure ++extern Mutex* JfrThreadGroups_lock; // protects JFR access to Thread Groups ++#endif - // Load user specified resource file by using URL loading, it - // requires a valid URI as parameter -@@ -205,18 +209,22 @@ - if (internal) { - is = CharInfo.class.getResourceAsStream(entitiesResource); - } else { -- ClassLoader cl = ObjectFactory.findClassLoader(); -- if (cl == null) { -- is = ClassLoader.getSystemResourceAsStream(entitiesResource); -- } else { -- is = cl.getResourceAsStream(entitiesResource); -+ ClassLoader cl = SecuritySupport.getContextClassLoader(); -+ if (cl != null) { -+ try { -+ is = cl.getResourceAsStream(entitiesResource); -+ } catch (Exception e) { -+ err = e.getMessage(); -+ } - } + // A MutexLocker provides mutual exclusion with respect to a given mutex + // for the scope which contains the locker. The lock is an OS lock, not +--- ./hotspot/src/share/vm/runtime/objectMonitor.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/objectMonitor.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -1684,7 +1684,7 @@ + } + iterator->_notified = 1 ; + Thread * Self = THREAD; +- iterator->_notifier_tid = Self->osthread()->thread_id(); ++ iterator->_notifier_tid = (jlong) Self->osthread()->thread_id(); - if (is == null) { - try { - URL url = new URL(entitiesResource); - is = url.openStream(); -- } catch (Exception e) {} -+ } catch (Exception e) { -+ err = e.getMessage(); -+ } - } - } + ObjectWaiter * List = _EntryList ; + if (List != NULL) { +@@ -1810,7 +1810,7 @@ + guarantee (iterator->_notified == 0, "invariant") ; + iterator->_notified = 1 ; + Thread * Self = THREAD; +- iterator->_notifier_tid = Self->osthread()->thread_id(); ++ iterator->_notifier_tid = (jlong) Self->osthread()->thread_id(); + if (Policy != 4) { + iterator->TState = ObjectWaiter::TS_ENTER ; + } +--- ./hotspot/src/share/vm/runtime/os.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/os.cpp 2014-06-06 19:56:22.000000000 -0700 +@@ -399,13 +399,6 @@ + if (_native_java_library == NULL) { + vm_exit_during_initialization("Unable to load native library", ebuf); + } +- +-#if defined(__OpenBSD__) +- // Work-around OpenBSD's lack of $ORIGIN support by pre-loading libnet.so +- // ignore errors +- dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "net"); +- dll_load(buffer, ebuf, sizeof(ebuf)); +-#endif + } + static jboolean onLoaded = JNI_FALSE; + if (onLoaded) { +@@ -1139,9 +1132,6 @@ + "%/lib/jce.jar:" + "%/lib/charsets.jar:" + "%/lib/jfr.jar:" +-#ifdef __APPLE__ +- "%/lib/JObjC.jar:" +-#endif + "%/classes"; + char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep); + if (sysclasspath == NULL) return false; +--- ./hotspot/src/share/vm/runtime/os.hpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/os.hpp 2014-06-06 19:56:23.000000000 -0700 +@@ -30,6 +30,9 @@ + #include "runtime/extendedPC.hpp" + #include "runtime/handles.hpp" + #include "utilities/top.hpp" ++#ifdef TARGET_OS_FAMILY_bsd ++# include "jvm_bsd.h" ++#endif + #ifdef TARGET_OS_FAMILY_linux + # include "jvm_linux.h" + # include +@@ -330,8 +333,8 @@ + + static char* non_memory_address_word(); + // reserve, commit and pin the entire memory region +- static char* reserve_memory_special(size_t size, char* addr = NULL, +- bool executable = false); ++ static char* reserve_memory_special(size_t size, size_t alignment, ++ char* addr, bool executable); + static bool release_memory_special(char* addr, size_t bytes); + static void large_page_init(); + static size_t large_page_size(); +@@ -755,8 +758,8 @@ + # include "os_windows.hpp" + #endif + #ifdef TARGET_OS_FAMILY_bsd +-# include "os_posix.hpp" + # include "os_bsd.hpp" ++# include "os_posix.hpp" + #endif + #ifdef TARGET_OS_ARCH_linux_x86 + # include "os_linux_x86.hpp" +--- ./hotspot/src/share/vm/runtime/reflection.cpp 2013-09-06 11:22:15.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/reflection.cpp 2014-01-18 12:16:14.000000000 -0800 +@@ -460,7 +460,7 @@ + // doesn't have a classloader. + if ((current_class == NULL) || + (current_class == new_class) || +- (instanceKlass::cast(new_class)->is_public()) || ++ (Klass::cast(new_class)->is_public()) || + is_same_class_package(current_class, new_class)) { + return true; + } +--- ./hotspot/src/share/vm/runtime/sweeper.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/sweeper.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + #include "runtime/vm_operations.hpp" + #include "trace/tracing.hpp" + #include "utilities/events.hpp" ++#include "utilities/ticks.inline.hpp" + #include "utilities/xmlstream.hpp" + + #ifdef ASSERT +@@ -148,12 +149,12 @@ + + int NMethodSweeper::_number_of_flushes = 0; // Total of full traversals caused by full cache + int NMethodSweeper::_total_nof_methods_reclaimed = 0; +-jlong NMethodSweeper::_total_time_sweeping = 0; +-jlong NMethodSweeper::_total_time_this_sweep = 0; +-jlong NMethodSweeper::_peak_sweep_time = 0; +-jlong NMethodSweeper::_peak_sweep_fraction_time = 0; +-jlong NMethodSweeper::_total_disconnect_time = 0; +-jlong NMethodSweeper::_peak_disconnect_time = 0; ++Tickspan NMethodSweeper::_total_time_sweeping; ++Tickspan NMethodSweeper::_total_time_this_sweep; ++Tickspan NMethodSweeper::_peak_sweep_time; ++Tickspan NMethodSweeper::_peak_sweep_fraction_time; ++Tickspan NMethodSweeper::_total_disconnect_time; ++Tickspan NMethodSweeper::_peak_disconnect_time; + + class MarkActivationClosure: public CodeBlobClosure { + public: +@@ -192,7 +193,7 @@ + _invocations = NmethodSweepFraction; + _current = CodeCache::first_nmethod(); + _traversals += 1; +- _total_time_this_sweep = 0; ++ _total_time_this_sweep = Tickspan(); + + if (PrintMethodFlushing) { + tty->print_cr("### Sweep: stack traversal %d", _traversals); +@@ -256,8 +257,7 @@ + } -@@ -224,7 +232,7 @@ - throw new RuntimeException( - Utils.messages.createMessage( - MsgKey.ER_RESOURCE_COULD_NOT_FIND, -- new Object[] {entitiesResource, entitiesResource})); -+ new Object[] {entitiesResource, err})); - } + void NMethodSweeper::sweep_code_cache() { +- +- jlong sweep_start_counter = os::elapsed_counter(); ++ Ticks sweep_start_counter = Ticks::now(); - // Fix Bugzilla#4000: force reading in UTF-8 -@@ -456,64 +464,56 @@ - return isCleanTextASCII[value]; + _flushed_count = 0; + _zombified_count = 0; +@@ -322,8 +322,8 @@ } + } --// In the future one might want to use the array directly and avoid --// the method call, but I think the JIT alreay inlines this well enough --// so don't do it (for now) - bjm --// public final boolean[] getASCIIClean() --// { --// return isCleanTextASCII; --// } -- -- -- private static CharInfo getCharInfoBasedOnPrivilege( -- final String entitiesFileName, final String method, -- final boolean internal){ -- return (CharInfo) AccessController.doPrivileged( -- new PrivilegedAction() { -- public Object run() { -- return new CharInfo(entitiesFileName, -- method, internal);} -- }); -+ -+ /** -+ * Read an internal resource file that describes the mapping of -+ * characters to entity references; Construct a CharInfo object. -+ * -+ * @param entitiesFileName Name of entities resource file that should -+ * be loaded, which describes the mapping of characters to entity references. -+ * @param method the output method type, which should be one of "xml", "html", and "text". -+ * @return an instance of CharInfo -+ * -+ * @xsl.usage internal -+ */ -+ static CharInfo getCharInfoInternal(String entitiesFileName, String method) -+ { -+ CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName); -+ if (charInfo != null) { -+ return charInfo; -+ } -+ -+ charInfo = new CharInfo(entitiesFileName, method, true); -+ m_getCharInfoCache.put(entitiesFileName, charInfo); -+ return charInfo; +- jlong sweep_end_counter = os::elapsed_counter(); +- jlong sweep_time = sweep_end_counter - sweep_start_counter; ++ const Ticks sweep_end_counter = Ticks::now(); ++ const Tickspan sweep_time = sweep_end_counter - sweep_start_counter; + _total_time_sweeping += sweep_time; + _total_time_this_sweep += sweep_time; + _peak_sweep_fraction_time = MAX2(sweep_time, _peak_sweep_fraction_time); +@@ -344,7 +344,7 @@ + + #ifdef ASSERT + if(PrintMethodFlushing) { +- tty->print_cr("### sweeper: sweep time(%d): " INT64_FORMAT, _invocations, (jlong)sweep_time); ++ tty->print_cr("### sweeper: sweep time(%d): " INT64_FORMAT, _invocations, (jlong)sweep_time.value()); + } + #endif + +@@ -529,7 +529,7 @@ } + } - /** -- * Factory that reads in a resource file that describes the mapping of -- * characters to entity references. -+ * Constructs a CharInfo object using the following process to try reading -+ * the entitiesFileName parameter: -+ * -+ * 1) attempt to load it as a ResourceBundle -+ * 2) try using the class loader to find the specified file -+ * 3) try opening it as an URI - * -- * Resource files must be encoded in UTF-8 and have a format like: -+ * In case of 2 and 3, the resource file must be encoded in UTF-8 and have the -+ * following format: - *
-      * # First char # is a comment
-      * Entity numericValue
-      * quot 34
-      * amp 38
-      * 
-- * (Note: Why don't we just switch to .properties files? Oct-01 -sc) - * -- * @param entitiesResource Name of entities resource file that should -- * be loaded, which describes that mapping of characters to entity references. -- * @param method the output method type, which should be one of "xml", "html", "text"... -- * -- * @xsl.usage internal -+ * @param entitiesFileName Name of entities resource file that should -+ * be loaded, which describes the mapping of characters to entity references. -+ * @param method the output method type, which should be one of "xml", "html", and "text". -+ * @return an instance of CharInfo - */ - static CharInfo getCharInfo(String entitiesFileName, String method) - { -- CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName); -- if (charInfo != null) { -- return charInfo; -- } -- -- // try to load it internally - cache -- try { -- charInfo = getCharInfoBasedOnPrivilege(entitiesFileName, -- method, true); -- m_getCharInfoCache.put(entitiesFileName, charInfo); -- return charInfo; -- } catch (Exception e) {} -- -- // try to load it externally - do not cache - try { -- return getCharInfoBasedOnPrivilege(entitiesFileName, -- method, false); -+ return new CharInfo(entitiesFileName, method, false); - } catch (Exception e) {} +- jlong disconnect_start_counter = os::elapsed_counter(); ++ Ticks disconnect_start_counter = Ticks::now(); - String absoluteEntitiesFileName; -@@ -530,8 +530,7 @@ - } - } + // Traverse the code cache trying to dump the oldest nmethods + uint curr_max_comp_id = CompileBroker::get_compilation_id(); +@@ -577,8 +577,8 @@ + CompileBroker::set_should_compile_new_jobs(CompileBroker::stop_compilation); + } -- return getCharInfoBasedOnPrivilege(entitiesFileName, -- method, false); -+ return new CharInfo(absoluteEntitiesFileName, method, false); - } +- jlong disconnect_end_counter = os::elapsed_counter(); +- jlong disconnect_time = disconnect_end_counter - disconnect_start_counter; ++ const Ticks disconnect_end_counter = Ticks::now(); ++ const Tickspan disconnect_time = disconnect_end_counter - disconnect_start_counter; + _total_disconnect_time += disconnect_time; + _peak_disconnect_time = MAX2(disconnect_time, _peak_disconnect_time); - /** Table of user-specified char infos. */ ---- jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java 2013-09-06 11:23:02.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java 2014-04-20 12:39:47.000000000 -0700 -@@ -60,7 +60,7 @@ - */ - private static final CharInfo m_htmlcharInfo = - // new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE); -- CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML); -+ CharInfo.getCharInfoInternal(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML); +@@ -597,7 +597,7 @@ + #ifdef ASSERT - /** A digital search trie for fast, case insensitive lookup of ElemDesc objects. */ - static final Trie m_elementFlags = new Trie(); ---- jaxp/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java 2013-09-06 11:23:02.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java 2014-04-20 12:39:47.000000000 -0700 -@@ -58,7 +58,7 @@ - */ - private static CharInfo m_xmlcharInfo = - // new CharInfo(CharInfo.XML_ENTITIES_RESOURCE); -- CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML); -+ CharInfo.getCharInfoInternal(CharInfo.XML_ENTITIES_RESOURCE, Method.XML); + if(PrintMethodFlushing && Verbose) { +- tty->print_cr("### sweeper: unload time: " INT64_FORMAT, (jlong)disconnect_time); ++ tty->print_cr("### sweeper: unload time: " INT64_FORMAT, (jlong)disconnect_time.value()); + } + #endif + } +--- ./hotspot/src/share/vm/runtime/sweeper.hpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/sweeper.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,6 +25,7 @@ + #ifndef SHARE_VM_RUNTIME_SWEEPER_HPP + #define SHARE_VM_RUNTIME_SWEEPER_HPP + ++#include "utilities/ticks.hpp" + // An NmethodSweeper is an incremental cleaner for: + // - cleanup inline caches + // - reclamation of unreferences zombie nmethods +@@ -56,12 +57,12 @@ + // Stat counters + static int _number_of_flushes; // Total of full traversals caused by full cache + static int _total_nof_methods_reclaimed; // Accumulated nof methods flushed +- static jlong _total_time_sweeping; // Accumulated time sweeping +- static jlong _total_time_this_sweep; // Total time this sweep +- static jlong _peak_sweep_time; // Peak time for a full sweep +- static jlong _peak_sweep_fraction_time; // Peak time sweeping one fraction +- static jlong _total_disconnect_time; // Total time cleaning code mem +- static jlong _peak_disconnect_time; // Peak time cleaning code mem ++ static Tickspan _total_time_sweeping; // Accumulated time sweeping ++ static Tickspan _total_time_this_sweep; // Total time this sweep ++ static Tickspan _peak_sweep_time; // Peak time for a full sweep ++ static Tickspan _peak_sweep_fraction_time; // Peak time sweeping one fraction ++ static Tickspan _total_disconnect_time; // Total time cleaning code mem ++ static Tickspan _peak_disconnect_time; // Peak time cleaning code mem + + static void process_nmethod(nmethod *nm); + +@@ -71,13 +72,14 @@ + static long traversal_count() { return _traversals; } + static int number_of_flushes() { return _number_of_flushes; } + static int total_nof_methods_reclaimed() { return _total_nof_methods_reclaimed; } +- static jlong total_time_sweeping() { return _total_time_sweeping; } +- static jlong peak_sweep_time() { return _peak_sweep_time; } +- static jlong peak_sweep_fraction_time() { return _peak_sweep_fraction_time; } +- static jlong total_disconnect_time() { return _total_disconnect_time; } +- static jlong peak_disconnect_time() { return _peak_disconnect_time; } ++ static const Tickspan total_time_sweeping() { return _total_time_sweeping; } ++ static const Tickspan peak_sweep_time() { return _peak_sweep_time; } ++ static const Tickspan peak_sweep_fraction_time() { return _peak_sweep_fraction_time; } ++ static const Tickspan total_disconnect_time() { return _total_disconnect_time; } ++ static const Tickspan peak_disconnect_time() { return _peak_disconnect_time; } + + #ifdef ASSERT ++ static bool is_sweeping(nmethod* which) { return _current == which; } + // Keep track of sweeper activity in the ring buffer + static void record_sweep(nmethod* nm, int line); + static void report_events(int id, address entry); +--- ./hotspot/src/share/vm/runtime/thread.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/thread.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -3416,9 +3416,10 @@ + } - /** - * Default constructor. ---- jaxp/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java 2013-09-06 11:23:03.000000000 -0700 -+++ jaxp/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java 2014-04-20 12:39:48.000000000 -0700 -@@ -25,12 +25,15 @@ - import com.sun.org.apache.xalan.internal.XalanConstants; - import com.sun.org.apache.xalan.internal.utils.FactoryImpl; - import com.sun.org.apache.xalan.internal.utils.SecuritySupport; -+import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; - import java.util.HashMap; -+ - import javax.xml.XMLConstants; - import javax.xml.parsers.FactoryConfigurationError; - import javax.xml.parsers.ParserConfigurationException; - import javax.xml.parsers.SAXParserFactory; - import org.xml.sax.SAXException; -+import org.xml.sax.SAXNotRecognizedException; - import org.xml.sax.XMLReader; - import org.xml.sax.helpers.XMLReaderFactory; + assert (Universe::is_fully_initialized(), "not initialized"); +- if (VerifyBeforeGC && VerifyGCStartAt == 0) { +- Universe::heap()->prepare_for_verify(); +- Universe::verify(); // make sure we're starting with a clean slate ++ if (VerifyDuringStartup) { ++ // Make sure we're starting with a clean slate. ++ VM_Verify verify_op; ++ VMThread::execute(&verify_op); + } -@@ -63,11 +66,15 @@ - private HashMap m_inUse; + EXCEPTION_MARK; +@@ -3504,11 +3505,12 @@ + java_lang_Thread::set_thread_status(thread_object, + java_lang_Thread::RUNNABLE); - private boolean m_useServicesMechanism = true; +- // The VM preresolve methods to these classes. Make sure that get initialized +- initialize_class(vmSymbols::java_lang_reflect_Method(), CHECK_0); +- initialize_class(vmSymbols::java_lang_ref_Finalizer(), CHECK_0); + // The VM creates & returns objects of this class. Make sure it's initialized. + initialize_class(vmSymbols::java_lang_Class(), CHECK_0); + -+ private boolean _secureProcessing; - /** - * protocols allowed for external DTD references in source file and/or stylesheet. - */ - private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; ++ // The VM preresolves methods to these classes. Make sure that they get initialized ++ initialize_class(vmSymbols::java_lang_reflect_Method(), CHECK_0); ++ initialize_class(vmSymbols::java_lang_ref_Finalizer(), CHECK_0); + call_initializeSystemClass(CHECK_0); -+ private XMLSecurityManager _xmlSecurityManager; + // get the Java runtime name after java.lang.System is initialized +--- ./hotspot/src/share/vm/runtime/virtualspace.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/virtualspace.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -42,8 +42,19 @@ + + + // ReservedSpace + - /** - * Hidden constructor - */ -@@ -118,7 +125,12 @@ - // TransformerFactory creates a reader via the - // XMLReaderFactory if setXMLReader is not used - reader = XMLReaderFactory.createXMLReader(); -- -+ try { -+ reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _secureProcessing); -+ } catch (SAXNotRecognizedException e) { -+ System.err.println("Warning: " + reader.getClass().getName() + ": " -+ + e.getMessage()); -+ } - } catch (Exception e) { - try { - // If unable to create an instance, let's try to use -@@ -164,6 +176,21 @@ - + se.getMessage()); - } ++// Dummy constructor ++ReservedSpace::ReservedSpace() : _base(NULL), _size(0), _noaccess_prefix(0), ++ _alignment(0), _special(false), _executable(false) { ++} ++ + ReservedSpace::ReservedSpace(size_t size) { +- initialize(size, 0, false, NULL, 0, false); ++ size_t page_size = os::page_size_for_region(size, size, 1); ++ bool large_pages = page_size != (size_t)os::vm_page_size(); ++ // Don't force the alignment to be large page aligned, ++ // since that will waste memory. ++ size_t alignment = os::vm_allocation_granularity(); ++ initialize(size, alignment, large_pages, NULL, 0, false); + } -+ try { -+ if (_xmlSecurityManager != null) { -+ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { -+ reader.setProperty(limit.apiProperty(), -+ _xmlSecurityManager.getLimitValueAsString(limit)); -+ } -+ if (_xmlSecurityManager.printEntityCountInfo()) { -+ reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); -+ } -+ } -+ } catch (SAXException se) { -+ System.err.println("Warning: " + reader.getClass().getName() + ": " -+ + se.getMessage()); -+ } -+ - return reader; - } + ReservedSpace::ReservedSpace(size_t size, size_t alignment, +@@ -323,16 +334,18 @@ -@@ -195,11 +222,22 @@ - } + if (special) { - /** -+ * Set feature -+ */ -+ public void setFeature(String name, boolean value) { -+ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { -+ _secureProcessing = value; -+ } -+ } -+ -+ /** - * Get property value - */ -- public String getProperty(String name) { -+ public Object getProperty(String name) { - if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { - return _accessExternalDTD; -+ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { -+ return _xmlSecurityManager; - } - return null; - } -@@ -207,9 +245,11 @@ - /** - * Set property. - */ -- public void setProperty(String name, String value) { -+ public void setProperty(String name, Object value) { - if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { - _accessExternalDTD = (String)value; -+ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { -+ _xmlSecurityManager = (XMLSecurityManager)value; - } - } - } ---- jaxp/src/javax/xml/stream/FactoryFinder.java 2013-09-06 11:23:04.000000000 -0700 -+++ jaxp/src/javax/xml/stream/FactoryFinder.java 2014-04-20 12:39:48.000000000 -0700 -@@ -204,13 +204,15 @@ - * a property name - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. -+ * @param standardId Indicate whether the factoryId is standard -+ * or user specified. - * - * Package private so this code can be shared. - */ -- static Object find(String factoryId, String fallbackClassName) -+ static Object find(String factoryId, String fallbackClassName, boolean standardId) - throws ConfigurationError - { -- return find(factoryId, null, fallbackClassName); -+ return find(factoryId, null, fallbackClassName, standardId); - } +- base = os::reserve_memory_special(size, requested_address, executable); ++ base = os::reserve_memory_special(size, alignment, requested_address, executable); - /** -@@ -227,23 +229,34 @@ - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. - * -+ * @param standardId Indicate whether the factoryId is standard -+ * or user specified. -+ * - * Package private so this code can be shared. - */ -- static Object find(String factoryId, ClassLoader cl, String fallbackClassName) -+ static Object find(String factoryId, ClassLoader cl, String fallbackClassName, -+ boolean standardId) - throws ConfigurationError - { - dPrint("find factoryId =" + factoryId); + if (base != NULL) { + if (failed_to_reserve_as_requested(base, requested_address, size, true)) { + // OS ignored requested address. Try different address. + return; + } +- // Check alignment constraints ++ // Check alignment constraints. + assert((uintptr_t) base % alignment == 0, +- "Large pages returned a non-aligned address"); ++ err_msg("Large pages returned a non-aligned address, base: " ++ PTR_FORMAT " alignment: " PTR_FORMAT, ++ base, (void*)(uintptr_t)alignment)); + _special = true; + } else { + // failed; try to reserve regular memory below +@@ -928,4 +941,188 @@ + tty->print_cr(" - [low_b, high_b]: [" INTPTR_FORMAT ", " INTPTR_FORMAT "]", low_boundary(), high_boundary()); + } - // Use the system property first - try { -- String systemProp = ss.getSystemProperty(factoryId); -+ String systemProp; -+ if (standardId) { -+ systemProp = ss.getSystemProperty(factoryId); -+ } else { -+ systemProp = System.getProperty(factoryId); -+ } + - if (systemProp != null) { - dPrint("found system property, value=" + systemProp); - return newInstance(systemProp, null, true); - } - } - catch (SecurityException se) { -- if (debug) se.printStackTrace(); -+ throw new ConfigurationError( -+ "Failed to read factoryId '" + factoryId + "'", se); - } - - // Try read $java.home/lib/stax.properties followed by ---- jaxp/src/javax/xml/stream/XMLEventFactory.java 2013-09-06 11:23:04.000000000 -0700 -+++ jaxp/src/javax/xml/stream/XMLEventFactory.java 2014-04-20 12:39:48.000000000 -0700 -@@ -60,9 +60,7 @@ - public static XMLEventFactory newInstance() - throws FactoryConfigurationError - { -- return (XMLEventFactory) FactoryFinder.find( -- JAXPFACTORYID, -- DEFAULIMPL); -+ return (XMLEventFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); - } ++/////////////// Unit tests /////////////// ++ ++#ifndef PRODUCT ++ ++#define test_log(...) \ ++ do {\ ++ if (VerboseInternalVMTests) { \ ++ tty->print_cr(__VA_ARGS__); \ ++ tty->flush(); \ ++ }\ ++ } while (false) ++ ++class TestReservedSpace : AllStatic { ++ public: ++ static void small_page_write(void* addr, size_t size) { ++ size_t page_size = os::vm_page_size(); ++ ++ char* end = (char*)addr + size; ++ for (char* p = (char*)addr; p < end; p += page_size) { ++ *p = 1; ++ } ++ } ++ ++ static void release_memory_for_test(ReservedSpace rs) { ++ if (rs.special()) { ++ guarantee(os::release_memory_special(rs.base(), rs.size()), "Shouldn't fail"); ++ } else { ++ guarantee(os::release_memory(rs.base(), rs.size()), "Shouldn't fail"); ++ } ++ } ++ ++ static void test_reserved_space1(size_t size, size_t alignment) { ++ test_log("test_reserved_space1(%p)", (void*) (uintptr_t) size); ++ ++ assert(is_size_aligned(size, alignment), "Incorrect input parameters"); ++ ++ ReservedSpace rs(size, // size ++ alignment, // alignment ++ UseLargePages, // large ++ NULL, // requested_address ++ 0); // noacces_prefix ++ ++ test_log(" rs.special() == %d", rs.special()); ++ ++ assert(rs.base() != NULL, "Must be"); ++ assert(rs.size() == size, "Must be"); ++ ++ assert(is_ptr_aligned(rs.base(), alignment), "aligned sizes should always give aligned addresses"); ++ assert(is_size_aligned(rs.size(), alignment), "aligned sizes should always give aligned addresses"); ++ ++ if (rs.special()) { ++ small_page_write(rs.base(), size); ++ } ++ ++ release_memory_for_test(rs); ++ } ++ ++ static void test_reserved_space2(size_t size) { ++ test_log("test_reserved_space2(%p)", (void*)(uintptr_t)size); ++ ++ assert(is_size_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned"); ++ ++ ReservedSpace rs(size); ++ ++ test_log(" rs.special() == %d", rs.special()); ++ ++ assert(rs.base() != NULL, "Must be"); ++ assert(rs.size() == size, "Must be"); ++ ++ if (rs.special()) { ++ small_page_write(rs.base(), size); ++ } ++ ++ release_memory_for_test(rs); ++ } ++ ++ static void test_reserved_space3(size_t size, size_t alignment, bool maybe_large) { ++ test_log("test_reserved_space3(%p, %p, %d)", ++ (void*)(uintptr_t)size, (void*)(uintptr_t)alignment, maybe_large); ++ ++ assert(is_size_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned"); ++ assert(is_size_aligned(size, alignment), "Must be at least aligned against alignment"); ++ ++ bool large = maybe_large && UseLargePages && size >= os::large_page_size(); ++ ++ ReservedSpace rs(size, alignment, large, false); ++ ++ test_log(" rs.special() == %d", rs.special()); ++ ++ assert(rs.base() != NULL, "Must be"); ++ assert(rs.size() == size, "Must be"); ++ ++ if (rs.special()) { ++ small_page_write(rs.base(), size); ++ } ++ ++ release_memory_for_test(rs); ++ } ++ ++ ++ static void test_reserved_space1() { ++ size_t size = 2 * 1024 * 1024; ++ size_t ag = os::vm_allocation_granularity(); ++ ++ test_reserved_space1(size, ag); ++ test_reserved_space1(size * 2, ag); ++ test_reserved_space1(size * 10, ag); ++ } ++ ++ static void test_reserved_space2() { ++ size_t size = 2 * 1024 * 1024; ++ size_t ag = os::vm_allocation_granularity(); ++ ++ test_reserved_space2(size * 1); ++ test_reserved_space2(size * 2); ++ test_reserved_space2(size * 10); ++ test_reserved_space2(ag); ++ test_reserved_space2(size - ag); ++ test_reserved_space2(size); ++ test_reserved_space2(size + ag); ++ test_reserved_space2(size * 2); ++ test_reserved_space2(size * 2 - ag); ++ test_reserved_space2(size * 2 + ag); ++ test_reserved_space2(size * 3); ++ test_reserved_space2(size * 3 - ag); ++ test_reserved_space2(size * 3 + ag); ++ test_reserved_space2(size * 10); ++ test_reserved_space2(size * 10 + size / 2); ++ } ++ ++ static void test_reserved_space3() { ++ size_t ag = os::vm_allocation_granularity(); ++ ++ test_reserved_space3(ag, ag , false); ++ test_reserved_space3(ag * 2, ag , false); ++ test_reserved_space3(ag * 3, ag , false); ++ test_reserved_space3(ag * 2, ag * 2, false); ++ test_reserved_space3(ag * 4, ag * 2, false); ++ test_reserved_space3(ag * 8, ag * 2, false); ++ test_reserved_space3(ag * 4, ag * 4, false); ++ test_reserved_space3(ag * 8, ag * 4, false); ++ test_reserved_space3(ag * 16, ag * 4, false); ++ ++ if (UseLargePages) { ++ size_t lp = os::large_page_size(); ++ ++ // Without large pages ++ test_reserved_space3(lp, ag * 4, false); ++ test_reserved_space3(lp * 2, ag * 4, false); ++ test_reserved_space3(lp * 4, ag * 4, false); ++ test_reserved_space3(lp, lp , false); ++ test_reserved_space3(lp * 2, lp , false); ++ test_reserved_space3(lp * 3, lp , false); ++ test_reserved_space3(lp * 2, lp * 2, false); ++ test_reserved_space3(lp * 4, lp * 2, false); ++ test_reserved_space3(lp * 8, lp * 2, false); ++ ++ // With large pages ++ test_reserved_space3(lp, ag * 4 , true); ++ test_reserved_space3(lp * 2, ag * 4, true); ++ test_reserved_space3(lp * 4, ag * 4, true); ++ test_reserved_space3(lp, lp , true); ++ test_reserved_space3(lp * 2, lp , true); ++ test_reserved_space3(lp * 3, lp , true); ++ test_reserved_space3(lp * 2, lp * 2, true); ++ test_reserved_space3(lp * 4, lp * 2, true); ++ test_reserved_space3(lp * 8, lp * 2, true); ++ } ++ } ++ ++ static void test_reserved_space() { ++ test_reserved_space1(); ++ test_reserved_space2(); ++ test_reserved_space3(); ++ } ++}; ++ ++void TestReservedSpace_test() { ++ TestReservedSpace::test_reserved_space(); ++} ++ ++#endif // PRODUCT ++ + #endif +--- ./hotspot/src/share/vm/runtime/virtualspace.hpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/virtualspace.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -90,6 +90,7 @@ - /** -@@ -93,9 +91,7 @@ - public static XMLEventFactory newFactory() - throws FactoryConfigurationError - { -- return (XMLEventFactory) FactoryFinder.find( -- JAXPFACTORYID, -- DEFAULIMPL); -+ return (XMLEventFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + public: + // Constructor ++ ReservedSpace(); + ReservedSpace(size_t size); + ReservedSpace(size_t size, size_t alignment, bool large, + char* requested_address = NULL, +--- ./hotspot/src/share/vm/runtime/vmThread.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/vmThread.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -305,7 +305,7 @@ + os::check_heap(); + // Silent verification so as not to pollute normal output, + // unless we really asked for it. +- Universe::verify(!(PrintGCDetails || Verbose)); ++ Universe::verify(!(PrintGCDetails || Verbose) || VerifySilently); } - /** -@@ -118,7 +114,8 @@ - throws FactoryConfigurationError { - try { - //do not fallback if given classloader can't find the class, throw exception -- return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, null); -+ return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, -+ null, factoryId.equals(JAXPFACTORYID) ? true : false); - } catch (FactoryFinder.ConfigurationError e) { - throw new FactoryConfigurationError(e.getException(), - e.getMessage()); -@@ -145,7 +142,8 @@ - throws FactoryConfigurationError { - try { - //do not fallback if given classloader can't find the class, throw exception -- return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, null); -+ return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, -+ null, factoryId.equals(JAXPFACTORYID) ? true : false); - } catch (FactoryFinder.ConfigurationError e) { - throw new FactoryConfigurationError(e.getException(), - e.getMessage()); ---- jaxp/src/javax/xml/stream/XMLInputFactory.java 2013-09-06 11:23:04.000000000 -0700 -+++ jaxp/src/javax/xml/stream/XMLInputFactory.java 2014-04-20 12:39:48.000000000 -0700 -@@ -139,6 +139,7 @@ - public static final String ALLOCATOR= - "javax.xml.stream.allocator"; - -+ static final String JAXPFACTORYID = "javax.xml.stream.XMLInputFactory"; - static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLInputFactoryImpl"; - - protected XMLInputFactory(){} -@@ -150,9 +151,7 @@ - public static XMLInputFactory newInstance() - throws FactoryConfigurationError - { -- return (XMLInputFactory) FactoryFinder.find( -- "javax.xml.stream.XMLInputFactory", -- DEFAULIMPL); -+ return (XMLInputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); - } + CompileBroker::set_should_block(); +@@ -390,7 +390,7 @@ + // Only write caller thread information for non-concurrent vm operations. + // For concurrent vm operations, the thread id is set to 0 indicating thread is unknown. + // This is because the caller thread could have exited already. +- event.set_caller(is_concurrent ? 0 : op->calling_thread()->osthread()->thread_id()); ++ event.set_caller(is_concurrent ? 0 : (uint64_t) op->calling_thread()->osthread()->thread_id()); + event.commit(); + } - /** -@@ -183,9 +182,7 @@ - public static XMLInputFactory newFactory() - throws FactoryConfigurationError - { -- return (XMLInputFactory) FactoryFinder.find( -- "javax.xml.stream.XMLInputFactory", -- DEFAULIMPL); -+ return (XMLInputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); - } +--- ./hotspot/src/share/vm/runtime/vm_operations.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/vm_operations.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -189,7 +189,8 @@ + } - /** -@@ -208,7 +205,8 @@ - throws FactoryConfigurationError { - try { - //do not fallback if given classloader can't find the class, throw exception -- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); -+ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, -+ null, factoryId.equals(JAXPFACTORYID) ? true : false); - } catch (FactoryFinder.ConfigurationError e) { - throw new FactoryConfigurationError(e.getException(), - e.getMessage()); -@@ -235,7 +233,8 @@ - throws FactoryConfigurationError { - try { - //do not fallback if given classloader can't find the class, throw exception -- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); -+ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, -+ null, factoryId.equals(JAXPFACTORYID) ? true : false); - } catch (FactoryFinder.ConfigurationError e) { - throw new FactoryConfigurationError(e.getException(), - e.getMessage()); ---- jaxp/src/javax/xml/stream/XMLOutputFactory.java 2013-09-06 11:23:04.000000000 -0700 -+++ jaxp/src/javax/xml/stream/XMLOutputFactory.java 2014-04-20 12:39:48.000000000 -0700 -@@ -115,6 +115,7 @@ - public static final String IS_REPAIRING_NAMESPACES= - "javax.xml.stream.isRepairingNamespaces"; + void VM_Verify::doit() { +- Universe::verify(); ++ Universe::heap()->prepare_for_verify(); ++ Universe::verify(_silent); + } -+ static final String JAXPFACTORYID = "javax.xml.stream.XMLOutputFactory"; - static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl"; + bool VM_PrintThreads::doit_prologue() { +--- ./hotspot/src/share/vm/runtime/vm_operations.hpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/runtime/vm_operations.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -303,9 +303,9 @@ - protected XMLOutputFactory(){} -@@ -126,8 +127,7 @@ - public static XMLOutputFactory newInstance() - throws FactoryConfigurationError - { -- return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", -- DEFAULIMPL); -+ return (XMLOutputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + class VM_Verify: public VM_Operation { + private: +- KlassHandle _dependee; ++ bool _silent; + public: +- VM_Verify() {} ++ VM_Verify(bool silent = VerifySilently) : _silent(silent) {} + VMOp_Type type() const { return VMOp_Verify; } + void doit(); + }; +--- ./hotspot/src/share/vm/services/attachListener.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/services/attachListener.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -282,6 +282,20 @@ + return JNI_ERR; + } } ++ ++ if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) { ++ FormatBuffer<80> err_msg(""); ++ if (!Arguments::verify_MaxHeapFreeRatio(err_msg, value)) { ++ out->print_cr(err_msg.buffer()); ++ return JNI_ERR; ++ } ++ } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) { ++ FormatBuffer<80> err_msg(""); ++ if (!Arguments::verify_MinHeapFreeRatio(err_msg, value)) { ++ out->print_cr(err_msg.buffer()); ++ return JNI_ERR; ++ } ++ } + bool res = CommandLineFlags::uintxAtPut((char*)name, &value, ATTACH_ON_DEMAND); + if (! res) { + out->print_cr("setting flag %s failed", name); +@@ -470,7 +484,17 @@ + vmSymbols::threadgroup_string_void_signature(), + thread_group, + string, +- CHECK); ++ THREAD); ++ ++ if (HAS_PENDING_EXCEPTION) { ++ tty->print_cr("Exception in VM (AttachListener::init) : "); ++ java_lang_Throwable::print(PENDING_EXCEPTION, tty); ++ tty->cr(); ++ ++ CLEAR_PENDING_EXCEPTION; ++ ++ return; ++ } - /** -@@ -158,8 +158,7 @@ - public static XMLOutputFactory newFactory() - throws FactoryConfigurationError - { -- return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", -- DEFAULIMPL); -+ return (XMLOutputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); - } + KlassHandle group(THREAD, SystemDictionary::ThreadGroup_klass()); + JavaCalls::call_special(&result, +@@ -479,7 +503,17 @@ + vmSymbols::add_method_name(), + vmSymbols::thread_void_signature(), + thread_oop, // ARG 1 +- CHECK); ++ THREAD); ++ ++ if (HAS_PENDING_EXCEPTION) { ++ tty->print_cr("Exception in VM (AttachListener::init) : "); ++ java_lang_Throwable::print(PENDING_EXCEPTION, tty); ++ tty->cr(); ++ ++ CLEAR_PENDING_EXCEPTION; ++ ++ return; ++ } - /** -@@ -181,7 +180,8 @@ - throws FactoryConfigurationError { - try { - //do not fallback if given classloader can't find the class, throw exception -- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); -+ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, -+ null, factoryId.equals(JAXPFACTORYID) ? true : false); - } catch (FactoryFinder.ConfigurationError e) { - throw new FactoryConfigurationError(e.getException(), - e.getMessage()); -@@ -210,7 +210,8 @@ - throws FactoryConfigurationError { - try { - //do not fallback if given classloader can't find the class, throw exception -- return (XMLOutputFactory) FactoryFinder.find(factoryId, classLoader, null); -+ return (XMLOutputFactory) FactoryFinder.find(factoryId, classLoader, -+ null, factoryId.equals(JAXPFACTORYID) ? true : false); - } catch (FactoryFinder.ConfigurationError e) { - throw new FactoryConfigurationError(e.getException(), - e.getMessage()); ---- jaxws/.hgtags 2013-09-06 11:23:51.000000000 -0700 -+++ jaxws/.hgtags 2014-04-20 12:39:43.000000000 -0700 -@@ -123,6 +123,7 @@ - 05469dd4c3662c454f8a019e492543add60795cc jdk7-b146 - c01bfd68d0528bc88348813c4d75d7f5c62bc4e2 jdk7u1-b01 - d13b1f877bb5ed8dceb2f7ec10365d1db5f70b2d jdk7-b147 -+ce6378e3c791c56b98cbf161804a07d0225b41c0 7u0 - 4c24f7019ce939a452154a83151294ad7da66a9d jdk7u1-b02 - 272778f529d11081f548f37fcd6a7aec0b11a8dd jdk7u1-b03 - 48b06a6e6f46e5bcd610f4bed57cd5067cf31f8c jdk7u1-b04 -@@ -302,6 +303,22 @@ - 0cd0d4e7331f7fc9f9ee77f2275113571bcf67cf jdk7u25-b09 - 105cdfd4f40837917d0065e3e58052d2854df7da jdk7u25-b10 - 6de7fec036abf91ce962c74f11a6266491df3fd8 jdk7u25-b11 -+a367ebf0c21512867f4ab5cdd206dd8c7817c004 jdk7u14-b16 -+74c34f35912d8d7145b3ff34fefea2d2f189f2b4 jdk7u14-b17 -+c93a35b3638f45de91013d65543217a002577684 jdk7u14-b18 -+82be38857de3b2f6d8def98034f3e7b0827fd9f0 jdk7u14-b19 -+82be38857de3b2f6d8def98034f3e7b0827fd9f0 jdk7u14-b19 -+d63b21e6c3d29305400dbfc1500090cab89f25d1 jdk7u14-b19 -+dd695ad6c5ec797fe61db31600a3fd2dbc62247b jdk7u14-b20 -+97bbac299eb801709a924fe777b3ee9c96829d8b jdk7u14-b21 -+6e74b3e1773cfbac99998431a5a54c70baaf1dc5 jdk7u14-b22 -+e9bbdf789d2b512550e0ca80629980e96f02146d jdk7u40-b23 -+adaf9cf486fab1b14c5af9fc6525565760bb9c11 jdk7u40-b24 -+aafab1efbd4ced5e05695aa1887813f9f5de9d5c jdk7u40-b25 -+6581f9739031120bb7515d3b09fa3501653d11af jdk7u40-b26 -+46ebac943288218b14d7ce3df23aa42a70fa4cf9 jdk7u40-b27 -+016957700ac905ebf3432ae8ba17d3576a51e585 jdk7u40-b28 -+15a82c84d9f7f6c99310380d4766fc68a3882671 jdk7u40-b29 - 4c5d242efa0d6e0cdb688e41e722bff671dfbfec jdk7u25-b12 - 6b4a165221304d809f678a18f51c7a8cb042d60b jdk7u25-b13 - 03073e4e6d3f600102d31e862154f56730838b11 jdk7u25-b14 -@@ -343,3 +360,60 @@ - 89f6c9663d75d9e4b672aed16f885b84232e9c93 jdk7u40-b42 - 3ee85b3793de16855e20272336a3565af8477b6b jdk7u40-b43 - cbeef786ce489096c39ec5effee4f8f9e770b4af jdk7u40-b60 -+4ee34d2cf2d84d0e1f5f20381ade525665ae424c jdk7u40-b61 -+b42a4cb742cf76f6c02d105349a7e8111ab8d68b jdk7u40-b62 -+000becfcb945d8592cfdef6ef1704b532af56762 jdk7u45-b01 -+817632baca26f7566e36c7708455494c15113d88 jdk7u45-b02 -+f65baba9400aec6cb29bc06b3139623bb4663225 jdk7u45-b03 -+80ff2468f520ed1940915815ceb85e05bd2bc568 jdk7u45-b04 -+1128d3934b643660a219532aa1ca554877d89375 jdk7u45-b05 -+8da3d41d946925a07a9f1001795959bfdb4c02c6 jdk7u45-b06 -+38f5b376c38035f13ede456f158ee26d0cf8d99c jdk7u45-b07 -+86f3efd1edae3c0f47ad14bef992e7566eaa94d4 jdk7u45-b08 -+ab835f7247e40dd7fb457830eaa31c550b434413 jdk7u45-b09 -+bbd594e6cf45ebfc37c71e217772b7f37a9c5750 jdk7u45-b10 -+c01eab96821e3c0315c4637e61a8015cbfe63b6a jdk7u45-b11 -+05f1274a8aa019584b4ceb05c73fc89bf7b7f4de jdk7u45-b12 -+3271849829b7c8ac32f6bb17b763d8a85a1a0a32 jdk7u45-b13 -+842dd63be9c633b8448e1837a5bb7b803dfdaad9 jdk7u45-b14 -+93a3fb090be58a5a45464f866a7093f24205dae2 jdk7u45-b15 -+5524cced32d3959d95ed414add230273bc10c38d jdk7u45-b16 -+a8baf22b5972e269a97f7b3b7eec2ad63a8c5aed jdk7u45-b17 -+65b0f3ccdc8bcff0d79e1b543a8cefb817529b3f jdk7u45-b18 -+c32c6a662d18d7195fc02125178c7543ce09bb00 jdk7u45-b30 -+6802a1c098c48b2c8336e06f1565254759025bab jdk7u45-b31 -+e040abab3625fbced33b30cba7c0307236268211 jdk7u45-b33 -+e7df5d6b23c64509672d262187f51cde14db4e66 jdk7u45-b34 -+c654ba4b2392c2913f45b495a2ea0c53cc348d98 jdk7u45-b35 -+5524cced32d3959d95ed414add230273bc10c38d jdk7u51-b00 -+db9e3328f393313e52cbf3fee5236aa2429028d0 jdk7u51-b01 -+92a4787cb3617005a329fb49247c550e8d7eb47a jdk7u51-b02 -+2240523feb968d7921e22f6730c299246a4125d0 jdk7u51-b03 -+c4f7cc35e47a4db7f380d62127dd2b49713f5552 jdk7u51-b04 -+f8f0617c0310b638855add08df58c5b9cd7e2dcb jdk7u51-b05 -+49fc29e8890c52e771beb3fd9bf3cbb9ecbf5f5e jdk7u51-b06 -+da128632f015df99d0f6a53547484dbe44f722fb jdk7u51-b07 -+71a314d55844bd6fe18aed56ce065b8df5c5cb82 jdk7u51-b08 -+3b53d5ea0aec473b637cd0e49f227304bac848a7 jdk7u51-b09 -+53a566a724e59f31bbd25a6a21f0f36adb36e82b jdk7u51-b10 -+708507f4795cad1f0cf7e19ff2dc16fe9d441754 jdk7u51-b11 -+7c7c2ea4b6808d0abf7fd48d11440d75b0c08d3a jdk7u51-b12 -+81a1b110f70c37d2c2f0de7c0ef3bd2d04aba475 jdk7u51-b13 -+5dbeb9983f104be717da35c9b14923d71dd248d7 jdk7u51-b30 -+eb79f394916efba85f4f6c7ef562966699f2c1e8 jdk7u51-b31 -+7c7c2ea4b6808d0abf7fd48d11440d75b0c08d3a jdk7u55-b00 -+c5eb0c2a0f9715b510bc641506fb90df9bf05ab0 jdk7u55-b01 -+a257072fc2aa482abd6ffa28e235dbe532af6d00 jdk7u55-b02 -+2916fdfc475bf29bc702887bf5ba02df67c98916 jdk7u55-b03 -+f4759b4547602b3bc865db8c5f356f46979c6389 jdk7u55-b04 -+8a8dfdbc66149b89f804c5a50e4692c2520569ae jdk7u55-b05 -+2696d6747826cea92a97b2d80be4a59ff99462bd jdk7u55-b06 -+1ad971afe2b5db93420654fa65b23f827760fed7 jdk7u55-b07 -+57ba92e96b7fb6f4543038c1daa390c45d8a9d84 jdk7u55-b08 -+c9d8555964a581486f4c8e1bf5f5db678eb3b9f2 jdk7u55-b09 -+0f469a7307b98e911aaaab8cad781eab3bd94ad6 jdk7u55-b09 -+1080e907d64ab63c6138b1a61d9e5b826e83634a jdk7u55-b10 -+0db5b891d1ba10211da0a8158551b35f00da7684 jdk7u55-b11 -+3834eb921dfd8d29d917a0c57bb9fdd9aa58c209 jdk7u55-b12 -+3b0da73591b1ea23c48aa7babc34ed776fc183f0 jdk7u55-b13 -+5d726bf8fedc1f10d250e980653315919b7602f2 jdk7u55-b30 ---- jaxws/src/share/jaf_classes/javax/activation/CommandMap.java 2013-09-06 11:23:51.000000000 -0700 -+++ jaxws/src/share/jaf_classes/javax/activation/CommandMap.java 2014-04-20 12:39:39.000000000 -0700 + { MutexLocker mu(Threads_lock); + JavaThread* listener_thread = new JavaThread(&attach_listener_thread_entry); +--- ./hotspot/src/share/vm/services/gcNotifier.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/services/gcNotifier.cpp 2014-01-18 12:16:14.000000000 -0800 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * 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,6 +25,9 @@ +@@ -209,11 +209,11 @@ + GCNotificationRequest *request = getRequest(); + if (request != NULL) { + NotificationMark nm(request); +- Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, THREAD); ++ Handle objGcInfo = createGcInfo(request->gcManager, request->gcStatInfo, CHECK); - package javax.activation; +- Handle objName = java_lang_String::create_from_platform_dependent_str(request->gcManager->name(), CHECK); +- Handle objAction = java_lang_String::create_from_platform_dependent_str(request->gcAction, CHECK); +- Handle objCause = java_lang_String::create_from_platform_dependent_str(request->gcCause, CHECK); ++ Handle objName = java_lang_String::create_from_str(request->gcManager->name(), CHECK); ++ Handle objAction = java_lang_String::create_from_str(request->gcAction, CHECK); ++ Handle objCause = java_lang_String::create_from_str(request->gcCause, CHECK); -+import java.util.Map; -+import java.util.WeakHashMap; + klassOop k = Management::sun_management_GarbageCollectorImpl_klass(CHECK); + instanceKlassHandle gc_mbean_klass(THREAD, k); +--- ./hotspot/src/share/vm/services/management.cpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/services/management.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -851,8 +851,6 @@ + total_used += u.used(); + total_committed += u.committed(); + +- // if any one of the memory pool has undefined init_size or max_size, +- // set it to -1 + if (u.init_size() == (size_t)-1) { + has_undefined_init_size = true; + } +@@ -869,6 +867,15 @@ + } + } + ++ // if any one of the memory pool has undefined init_size or max_size, ++ // set it to -1 ++ if (has_undefined_init_size) { ++ total_init = (size_t)-1; ++ } ++ if (has_undefined_max_size) { ++ total_max = (size_t)-1; ++ } + + // In our current implementation, we make sure that all non-heap + // pools have defined init and max sizes. Heap pools do not matter, + // as we never use total_init and total_max for them. +@@ -1793,6 +1800,18 @@ + succeed = CommandLineFlags::intxAtPut(name, &ivalue, MANAGEMENT); + } else if (flag->is_uintx()) { + uintx uvalue = (uintx)new_value.j; ++ ++ if (strncmp(name, "MaxHeapFreeRatio", 17) == 0) { ++ FormatBuffer<80> err_msg(""); ++ if (!Arguments::verify_MaxHeapFreeRatio(err_msg, uvalue)) { ++ THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); ++ } ++ } else if (strncmp(name, "MinHeapFreeRatio", 17) == 0) { ++ FormatBuffer<80> err_msg(""); ++ if (!Arguments::verify_MinHeapFreeRatio(err_msg, uvalue)) { ++ THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), err_msg.buffer()); ++ } ++ } + succeed = CommandLineFlags::uintxAtPut(name, &uvalue, MANAGEMENT); + } else if (flag->is_uint64_t()) { + uint64_t uvalue = (uint64_t)new_value.j; +--- ./hotspot/src/share/vm/services/memTracker.hpp 2013-09-06 11:22:16.000000000 -0700 ++++ ./hotspot/src/share/vm/services/memTracker.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -302,6 +302,13 @@ + } + } - /** - * The CommandMap class provides an interface to a registry of -@@ -38,6 +41,8 @@ - */ - public abstract class CommandMap { - private static CommandMap defaultCommandMap = null; -+ private static Map map = -+ new WeakHashMap(); ++ static inline void record_virtual_memory_release(address addr, size_t size, ++ Thread* thread = NULL) { ++ if (is_on()) { ++ Tracker tkr(Tracker::Release, thread); ++ tkr.record(addr, size); ++ } ++ } - /** - * Get the default CommandMap. -@@ -56,11 +61,18 @@ - * - * @return the CommandMap - */ -- public static CommandMap getDefaultCommandMap() { -- if (defaultCommandMap == null) -- defaultCommandMap = new MailcapCommandMap(); + // record memory type on virtual memory base address + static inline void record_virtual_memory_type(address base, MEMFLAGS flags, +--- ./hotspot/src/share/vm/trace/noTraceBackend.hpp 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/noTraceBackend.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -25,9 +25,7 @@ + #define SHARE_VM_TRACE_NOTRACEBACKEND_HPP + + #include "prims/jni.h" - -- return defaultCommandMap; -+ public static synchronized CommandMap getDefaultCommandMap() { -+ if (defaultCommandMap != null) -+ return defaultCommandMap; -+ -+ // fetch per-thread-context-class-loader default -+ ClassLoader tccl = SecuritySupport.getContextClassLoader(); -+ CommandMap def = map.get(tccl); -+ if (def == null) { -+ def = new MailcapCommandMap(); -+ map.put(tccl, def); -+ } -+ return def; - } +-typedef jlong TracingTime; +-typedef jlong RelativeTracingTime; ++#include "trace/traceTime.hpp" - /** -@@ -71,7 +83,7 @@ - * @exception SecurityException if the caller doesn't have permission - * to change the default - */ -- public static void setDefaultCommandMap(CommandMap commandMap) { -+ public static synchronized void setDefaultCommandMap(CommandMap commandMap) { - SecurityManager security = System.getSecurityManager(); - if (security != null) { - try { -@@ -79,13 +91,16 @@ - security.checkSetFactory(); - } catch (SecurityException ex) { - // otherwise, we also allow it if this code and the -- // factory come from the same class loader (e.g., -+ // factory come from the same (non-system) class loader (e.g., - // the JAF classes were loaded with the applet classes). -- if (CommandMap.class.getClassLoader() != -+ if (CommandMap.class.getClassLoader() == null || -+ CommandMap.class.getClassLoader() != - commandMap.getClass().getClassLoader()) - throw ex; - } - } -+ // remove any per-thread-context-class-loader CommandMap -+ map.remove(SecuritySupport.getContextClassLoader()); - defaultCommandMap = commandMap; - } + class NoTraceBackend { + public: +@@ -44,5 +42,3 @@ + typedef NoTraceBackend Tracing; + + #endif +- +- +--- ./hotspot/src/share/vm/trace/trace.xml 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/trace.xml 2014-06-06 19:56:21.000000000 -0700 +@@ -169,8 +169,8 @@ + + + +- +- ++ ++ + + + + class TraceEvent : public StackObj { +- protected: +- jlong _startTime; +- jlong _endTime; +- + private: + bool _started; + #ifdef ASSERT +@@ -52,6 +49,18 @@ + bool _ignore_check; + #endif + ++ protected: ++ jlong _startTime; ++ jlong _endTime; + -+ if (transferFlavors == emptyFlavors) -+ return transferFlavors; -+ else -+ return transferFlavors.clone(); ++ void set_starttime(const TracingTime& time) { ++ _startTime = time; ++ } ++ ++ void set_endtime(const TracingTime& time) { ++ _endTime = time; ++ } + + public: + TraceEvent(EventStartTime timing=TIMED) : + _startTime(0), +@@ -90,7 +99,7 @@ + return; + } + if (_endTime == 0) { +- static_cast(this)->set_endtime(Tracing::time()); ++ static_cast(this)->set_endtime(Tracing::time()); } + if (static_cast(this)->should_write()) { + static_cast(this)->writeEvent(); +@@ -98,12 +107,12 @@ + set_commited(); + } - /** ---- jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java 2013-09-06 11:23:51.000000000 -0700 -+++ jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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 @@ - package javax.activation; +- void set_starttime(jlong time) { +- _startTime = time; ++ void set_starttime(const Ticks& time) { ++ _startTime = time.value(); + } - import java.io.File; -+import java.util.Map; -+import java.util.WeakHashMap; +- void set_endtime(jlong time) { +- _endTime = time; ++ void set_endtime(const Ticks& time) { ++ _endTime = time.value(); + } - /** - * The FileTypeMap is an abstract class that provides a data typing -@@ -48,6 +50,8 @@ - public abstract class FileTypeMap { + TraceEventId id() const { +--- ./hotspot/src/share/vm/trace/traceEventClasses.xsl 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/traceEventClasses.xsl 2014-06-06 19:56:21.000000000 -0700 +@@ -1,6 +1,6 @@ + + - private static FileTypeMap defaultMap = null; -+ private static Map map = -+ new WeakHashMap(); + +- + ++ - /** - * The default constructor. -@@ -78,11 +82,11 @@ - * Sets the default FileTypeMap for the system. This instance - * will be returned to callers of getDefaultFileTypeMap. - * -- * @param map The FileTypeMap. -+ * @param fileTypeMap The FileTypeMap. - * @exception SecurityException if the caller doesn't have permission - * to change the default - */ -- public static void setDefaultFileTypeMap(FileTypeMap map) { -+ public static synchronized void setDefaultFileTypeMap(FileTypeMap fileTypeMap) { - SecurityManager security = System.getSecurityManager(); - if (security != null) { - try { -@@ -90,14 +94,17 @@ - security.checkSetFactory(); - } catch (SecurityException ex) { - // otherwise, we also allow it if this code and the -- // factory come from the same class loader (e.g., -+ // factory come from the same (non-system) class loader (e.g., - // the JAF classes were loaded with the applet classes). -- if (FileTypeMap.class.getClassLoader() != -- map.getClass().getClassLoader()) -+ if (FileTypeMap.class.getClassLoader() == null || -+ FileTypeMap.class.getClassLoader() != -+ fileTypeMap.getClass().getClassLoader()) - throw ex; - } - } -- defaultMap = map; -+ // remove any per-thread-context-class-loader FileTypeMap -+ map.remove(SecuritySupport.getContextClassLoader()); -+ defaultMap = fileTypeMap; - } + + +@@ -40,6 +40,7 @@ + #include "runtime/handles.inline.hpp" + #include "tracefiles/traceTypes.hpp" + #include "trace/traceEvent.hpp" ++#include "utilities/ticks.hpp" - /** -@@ -109,10 +116,17 @@ - * @return The default FileTypeMap - * @see javax.activation.FileTypeMap#setDefaultFileTypeMap - */ -- public static FileTypeMap getDefaultFileTypeMap() { -- // XXX - probably should be synchronized -- if (defaultMap == null) -- defaultMap = new MimetypesFileTypeMap(); -- return defaultMap; -+ public static synchronized FileTypeMap getDefaultFileTypeMap() { -+ if (defaultMap != null) -+ return defaultMap; -+ -+ // fetch per-thread-context-class-loader default -+ ClassLoader tccl = SecuritySupport.getContextClassLoader(); -+ FileTypeMap def = map.get(tccl); -+ if (def == null) { -+ def = new MimetypesFileTypeMap(); -+ map.put(tccl, def); -+ } -+ return def; - } - } ---- jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java 2013-09-06 11:23:51.000000000 -0700 -+++ jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java 2014-04-20 12:39:39.000000000 -0700 + #if INCLUDE_TRACE + +@@ -54,8 +55,8 @@ + class TraceEvent { + public: + TraceEvent() {} +- void set_starttime(jlong time) const {} +- void set_endtime(jlong time) const {} ++ void set_starttime(const Ticks& time) {} ++ void set_endtime(const Ticks& time) {} + bool should_commit() const { return false; } + void commit() const {} + }; +@@ -174,20 +175,21 @@ + + + #if INCLUDE_TRACE +- ++ + #else +- ++ + #endif + + +- ++ + #if INCLUDE_TRACE +- ++ + #else +- ++ + #endif + + ++ + + + +@@ -227,7 +229,17 @@ + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + ts.print(", "); +--- ./hotspot/src/share/vm/trace/traceEventIds.xsl 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/traceEventIds.xsl 2014-06-06 19:56:21.000000000 -0700 +@@ -1,6 +1,6 @@ + + + + +- + ++ + + + +--- ./hotspot/src/share/vm/trace/traceMacros.hpp 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/traceMacros.hpp 2014-06-06 19:56:21.000000000 -0700 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -120,11 +120,7 @@ - public class MailcapCommandMap extends CommandMap { - /* - * We manage a collection of databases, searched in order. -- * The default database is shared between all instances -- * of this class. -- * XXX - Can we safely share more databases between instances? - */ -- private static MailcapFile defDB = null; - private MailcapFile[] DB; - private static final int PROG = 0; // programmatically added entries - -@@ -164,14 +160,10 @@ - loadAllResources(dbv, "META-INF/mailcap"); - - LogSupport.log("MailcapCommandMap: load DEF"); -- synchronized (MailcapCommandMap.class) { -- // see if another instance has created this yet. -- if (defDB == null) -- defDB = loadResource("/META-INF/mailcap.default"); -- } -+ mf = loadResource("/META-INF/mailcap.default"); - -- if (defDB != null) -- dbv.add(defDB); -+ if (mf != null) -+ dbv.add(mf); - - DB = new MailcapFile[dbv.size()]; - DB = (MailcapFile[])dbv.toArray(DB); ---- jaxws/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java 2013-09-06 11:23:51.000000000 -0700 -+++ jaxws/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java 2014-04-20 12:39:39.000000000 -0700 +--- ./hotspot/src/share/vm/trace/traceTime.hpp 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/traceTime.hpp 2014-06-06 19:56:21.000000000 -0700 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -69,11 +69,7 @@ - public class MimetypesFileTypeMap extends FileTypeMap { - /* - * We manage a collection of databases, searched in order. -- * The default database is shared between all instances -- * of this class. -- * XXX - Can we safely share more databases between instances? - */ -- private static MimeTypeFile defDB = null; - private MimeTypeFile[] DB; - private static final int PROG = 0; // programmatically added entries +@@ -28,6 +28,5 @@ + #include "prims/jni.h" -@@ -114,14 +110,10 @@ - loadAllResources(dbv, "META-INF/mime.types"); + typedef jlong TracingTime; +-typedef jlong RelativeTracingTime; - LogSupport.log("MimetypesFileTypeMap: load DEF"); -- synchronized (MimetypesFileTypeMap.class) { -- // see if another instance has created this yet. -- if (defDB == null) -- defDB = loadResource("/META-INF/mimetypes.default"); -- } -+ mf = loadResource("/META-INF/mimetypes.default"); +-#endif ++#endif // SHARE_VM_TRACE_TRACETIME_HPP +--- ./hotspot/src/share/vm/trace/traceTypes.xsl 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/traceTypes.xsl 2014-06-06 19:56:21.000000000 -0700 +@@ -1,6 +1,6 @@ + + + + +- + ++ + + + +@@ -32,11 +32,13 @@ + #ifndef TRACEFILES_JFRTYPES_HPP + #define TRACEFILES_JFRTYPES_HPP + +-#include "trace/traceDataTypes.hpp" +-#include "utilities/globalDefinitions.hpp" +-#include "oops/symbol.hpp" ++ + #include "oops/klassOop.hpp" + #include "oops/methodOop.hpp" ++#include "oops/symbol.hpp" ++#include "trace/traceDataTypes.hpp" ++#include "utilities/globalDefinitions.hpp" ++#include "utilities/ticks.hpp" + + enum JVMContentType { + _not_a_content_type = (JVM_CONTENT_TYPES_START - 1), +--- ./hotspot/src/share/vm/trace/tracetypes.xml 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/trace/tracetypes.xml 2014-06-06 19:56:23.000000000 -0700 +@@ -60,7 +60,7 @@ + + + ++ type="thread_id_t" builtin_type="OSTHREAD"> + + -- if (defDB != null) -- dbv.addElement(defDB); -+ if (mf != null) -+ dbv.addElement(mf); +@@ -249,13 +249,13 @@ + + +- ++ + ++ type="Ticks" sizeop="sizeof(s8)"/> + +- +- ++ ++ + + + - DB = new MimeTypeFile[dbv.size()]; - dbv.copyInto(DB); ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/APTNavigator.java 2013-09-06 11:23:52.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/APTNavigator.java 2014-04-20 12:39:38.000000000 -0700 + +- ++ + + + { -- -+public final class APTNavigator implements Navigator { - private final AnnotationProcessorEnvironment env; +--- ./hotspot/src/share/vm/utilities/globalDefinitions.hpp 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/utilities/globalDefinitions.hpp 2014-06-06 19:56:23.000000000 -0700 +@@ -373,6 +373,14 @@ - private final PrimitiveType primitiveByte; -@@ -277,8 +276,9 @@ - return clazz.getPackage().getQualifiedName(); - } + #define align_size_up_(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1)) -- public TypeDeclaration findClass(String className, TypeDeclaration referencePoint) { -- return env.getTypeDeclaration(className); -+ @Override -+ public TypeDeclaration loadObjectFactory(TypeDeclaration referencePoint, String packageName) { -+ return env.getTypeDeclaration(packageName + ".ObjectFactory"); - } ++inline bool is_size_aligned(size_t size, size_t alignment) { ++ return align_size_up_(size, alignment) == size; ++} ++ ++inline bool is_ptr_aligned(void* ptr, size_t alignment) { ++ return align_size_up_((intptr_t)ptr, (intptr_t)alignment) == (intptr_t)ptr; ++} ++ + inline intptr_t align_size_up(intptr_t size, intptr_t alignment) { + return align_size_up_(size, alignment); + } +@@ -383,6 +391,14 @@ + return align_size_down_(size, alignment); + } - public boolean isBridgeMethod(MethodDeclaration method) { ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,86 @@ ++inline void* align_ptr_up(void* ptr, size_t alignment) { ++ return (void*)align_size_up((intptr_t)ptr, (intptr_t)alignment); ++} ++ ++inline void* align_ptr_down(void* ptr, size_t alignment) { ++ return (void*)align_size_down((intptr_t)ptr, (intptr_t)alignment); ++} ++ + // Align objects by rounding up their size, in HeapWord units. + + #define align_object_size_(size) align_size_up_(size, MinObjAlignment) +--- ./hotspot/src/share/vm/utilities/growableArray.hpp 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/utilities/growableArray.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -194,6 +194,7 @@ + + void clear() { _len = 0; } + int length() const { return _len; } ++ int max_length() const { return _max; } + void trunc_to(int l) { assert(l <= _len,"cannot increase length"); _len = l; } + bool is_empty() const { return _len == 0; } + bool is_nonempty() const { return _len != 0; } +@@ -281,6 +282,13 @@ + return -1; + } + ++ int find_from_end(const E& elem) const { ++ for (int i = _len-1; i >= 0; i--) { ++ if (_data[i] == elem) return i; ++ } ++ return -1; ++ } ++ + int find(void* token, bool f(void*, E)) const { + for (int i = 0; i < _len; i++) { + if (f(token, _data[i])) return i; +--- ./hotspot/src/share/vm/utilities/ticks.cpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/src/share/vm/utilities/ticks.cpp 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,68 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -15263,236 +21514,63 @@ + * 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.tools.internal.ws.wsdl.parser; -+ -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; -+ -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { -+ -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; -+ -+ private WeakHashMap CACHE = new WeakHashMap(); ++#include "precompiled.hpp" ++#include "runtime/os.hpp" ++#include "utilities/ticks.inline.hpp" + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); -+ } -+ return instance; -+ } ++#ifdef ASSERT ++ const jlong Ticks::invalid_time_stamp = -2; // 0xFFFF FFFF`FFFF FFFE ++#endif + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); -+ } ++void Ticks::stamp() { ++ _stamp_ticks = os::elapsed_counter(); ++} + -+ protected abstract V initialValue() throws Exception; ++const Ticks Ticks::now() { ++ Ticks t; ++ t.stamp(); ++ return t; ++} + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); -+ } -+ } ++Tickspan::Tickspan(const Ticks& end, const Ticks& start) { ++ assert(end.value() != Ticks::invalid_time_stamp, "end is unstamped!"); ++ assert(start.value() != Ticks::invalid_time_stamp, "start is unstamped!"); + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); -+ } ++ assert(end >= start, "negative time!"); + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); -+ } ++ _span_ticks = end.value() - start.value(); +} + ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++template ++static ReturnType time_conversion(const Tickspan& span, TicksToTimeHelper::Unit unit) { ++ assert(TicksToTimeHelper::SECONDS == unit || ++ TicksToTimeHelper::MILLISECONDS == unit, "invalid unit!"); + ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java 2013-09-06 11:23:54.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -65,8 +65,15 @@ - * @author Vivek Pandey - */ - public class Internalizer { -- private static final XPathFactory xpf = XPathFactory.newInstance(); -- private final XPath xpath = xpf.newXPath(); ++ ReturnType frequency_per_unit = (ReturnType)os::elapsed_frequency() / (ReturnType)unit; + -+ private static final ContextClassloaderLocal xpf = new ContextClassloaderLocal() { -+ @Override -+ protected XPathFactory initialValue() throws Exception { -+ return XPathFactory.newInstance(); -+ } -+ }; ++ return (ReturnType) ((ReturnType)span.value() / frequency_per_unit); ++} + -+ private final XPath xpath = xpf.get().newXPath(); - private final WsimportOptions options; - private final DOMForest forest; - private final ErrorReceiver errorReceiver; ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java 2013-09-06 11:23:54.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * 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,8 +56,14 @@ - */ - public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { - -- private static final XPathFactory xpf = XPathFactory.newInstance(); -- private final XPath xpath = xpf.newXPath(); -+ private static final ContextClassloaderLocal xpf = new ContextClassloaderLocal() { -+ @Override -+ protected XPathFactory initialValue() throws Exception { -+ return XPathFactory.newInstance(); -+ } -+ }; ++double TicksToTimeHelper::seconds(const Tickspan& span) { ++ return time_conversion(span, SECONDS); ++} + -+ private final XPath xpath = xpf.get().newXPath(); - - public JAXWSBindingExtensionHandler(Map extensionHandlerMap) { - super(extensionHandlerMap); ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java 2013-09-06 11:23:55.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,7 +30,6 @@ - import com.sun.codemodel.internal.JType; - import com.sun.tools.internal.xjc.outline.Aspect; - import com.sun.tools.internal.xjc.outline.Outline; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - - /** - * @author Kohsuke Kawaguchi -@@ -69,6 +68,6 @@ - } - - public String fullName() { -- return Navigator.REFLECTION.getTypeName(t); -+ return Utils.REFLECTION_NAVIGATOR.getTypeName(t); - } - } ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java 2013-09-06 11:23:55.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,7 +56,7 @@ - EagerNType ent = (EagerNType) nt; - if (base instanceof EagerNClass) { - EagerNClass enc = (EagerNClass) base; -- return create(REFLECTION.getBaseClass(ent.t, enc.c)); -+ return create(Utils.REFLECTION_NAVIGATOR.getBaseClass(ent.t, enc.c)); - } - // lazy class can never be a base type of an eager type - return null; -@@ -176,7 +176,7 @@ - public NType getTypeArgument(NType nt, int i) { - if (nt instanceof EagerNType) { - EagerNType ent = (EagerNType) nt; -- return create(REFLECTION.getTypeArgument(ent.t,i)); -+ return create(Utils.REFLECTION_NAVIGATOR.getTypeArgument(ent.t,i)); - } - if (nt instanceof NClassByJClass) { - NClassByJClass nnt = (NClassByJClass) nt; -@@ -189,7 +189,7 @@ - public boolean isParameterizedType(NType nt) { - if (nt instanceof EagerNType) { - EagerNType ent = (EagerNType) nt; -- return REFLECTION.isParameterizedType(ent.t); -+ return Utils.REFLECTION_NAVIGATOR.isParameterizedType(ent.t); - } - if (nt instanceof NClassByJClass) { - NClassByJClass nnt = (NClassByJClass) nt; -@@ -303,8 +303,8 @@ - throw new UnsupportedOperationException(); - } - -- public NClass findClass(String className, NClass referencePoint) { -- // TODO: implement this method later -+ @Override -+ public NClass loadObjectFactory(NClass referencePoint, String pkg) { - throw new UnsupportedOperationException(); - } - ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,85 @@ ++jlong TicksToTimeHelper::milliseconds(const Tickspan& span) { ++ return time_conversion(span, MILLISECONDS); ++} +--- ./hotspot/src/share/vm/utilities/ticks.hpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/src/share/vm/utilities/ticks.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,111 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -15507,80 +21585,106 @@ + * 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.tools.internal.xjc.model.nav; ++#ifndef SHARE_VM_UTILITIES_TICKS_HPP ++#define SHARE_VM_UTILITIES_TICKS_HPP + -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++#include "memory/allocation.hpp" ++#include "utilities/globalDefinitions.hpp" + -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++class Ticks; + -+/** -+ * Utils class. -+ * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. -+ * -+ * Has *package private* access to avoid inappropriate usage. -+ */ -+/* package */ final class Utils { ++class Tickspan VALUE_OBJ_CLASS_SPEC { ++ friend class Ticks; ++ friend Tickspan operator-(const Ticks& end, const Ticks& start); + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ private: ++ jlong _span_ticks; + -+ /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. -+ */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ Tickspan(const Ticks& end, const Ticks& start); + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; -+ try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; -+ } -+ } ++ public: ++ Tickspan() : _span_ticks(0) {} + -+ /** -+ * private constructor to avoid util class instantiating -+ */ -+ private Utils() { -+ } -+} ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,86 @@ -+/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ Tickspan& operator+=(const Tickspan& rhs) { ++ _span_ticks += rhs._span_ticks; ++ return *this; ++ } ++ ++ jlong value() const { ++ return _span_ticks; ++ } ++ ++}; ++ ++class Ticks VALUE_OBJ_CLASS_SPEC { ++ private: ++ jlong _stamp_ticks; ++ ++ public: ++ Ticks() : _stamp_ticks(0) { ++ assert((_stamp_ticks = invalid_time_stamp) == invalid_time_stamp, ++ "initial unstamped time value assignment"); ++ } ++ ++ Ticks& operator+=(const Tickspan& span) { ++ _stamp_ticks += span.value(); ++ return *this; ++ } ++ ++ Ticks& operator-=(const Tickspan& span) { ++ _stamp_ticks -= span.value(); ++ return *this; ++ } ++ ++ void stamp(); ++ ++ jlong value() const { ++ return _stamp_ticks; ++ } ++ ++ static const Ticks now(); ++ ++#ifdef ASSERT ++ static const jlong invalid_time_stamp; ++#endif ++ ++#ifndef PRODUCT ++ // only for internal use by GC VM tests ++ friend class TimePartitionPhasesIteratorTest; ++ friend class GCTimerTest; ++ ++ private: ++ // implicit type conversion ++ Ticks(int ticks) : _stamp_ticks(ticks) {} ++ ++#endif // !PRODUCT ++ ++}; ++ ++class TicksToTimeHelper : public AllStatic { ++ public: ++ enum Unit { ++ SECONDS = 1, ++ MILLISECONDS = 1000 ++ }; ++ static double seconds(const Tickspan& span); ++ static jlong milliseconds(const Tickspan& span); ++}; ++ ++#endif // SHARE_VM_UTILITIES_TICKS_HPP +--- ./hotspot/src/share/vm/utilities/ticks.inline.hpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/src/share/vm/utilities/ticks.inline.hpp 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -15595,207 +21699,226 @@ + * 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.tools.internal.xjc.reader.internalizer; ++#ifndef SHARE_VM_UTILITIES_TICKS_INLINE_HPP ++#define SHARE_VM_UTILITIES_TICKS_INLINE_HPP + -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++#include "utilities/ticks.hpp" + -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { ++inline Tickspan operator+(Tickspan lhs, const Tickspan& rhs) { ++ lhs += rhs; ++ return lhs; ++} + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++inline bool operator==(const Tickspan& lhs, const Tickspan& rhs) { ++ return lhs.value() == rhs.value(); ++} + -+ private WeakHashMap CACHE = new WeakHashMap(); ++inline bool operator!=(const Tickspan& lhs, const Tickspan& rhs) { ++ return !operator==(lhs,rhs); ++} + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); -+ } -+ return instance; -+ } ++inline bool operator<(const Tickspan& lhs, const Tickspan& rhs) { ++ return lhs.value() < rhs.value(); ++} + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); -+ } ++inline bool operator>(const Tickspan& lhs, const Tickspan& rhs) { ++ return operator<(rhs,lhs); ++} + -+ protected abstract V initialValue() throws Exception; ++inline bool operator<=(const Tickspan& lhs, const Tickspan& rhs) { ++ return !operator>(lhs,rhs); ++} + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); -+ } -+ } ++inline bool operator>=(const Tickspan& lhs, const Tickspan& rhs) { ++ return !operator<(lhs,rhs); ++} + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++inline Ticks operator+(Ticks lhs, const Tickspan& span) { ++ lhs += span; ++ return lhs; ++} ++ ++inline Ticks operator-(Ticks lhs, const Tickspan& span) { ++ lhs -= span; ++ return lhs; ++} ++ ++inline Tickspan operator-(const Ticks& end, const Ticks& start) { ++ return Tickspan(end, start); ++} ++ ++inline bool operator==(const Ticks& lhs, const Ticks& rhs) { ++ return lhs.value() == rhs.value(); ++} ++ ++inline bool operator!=(const Ticks& lhs, const Ticks& rhs) { ++ return !operator==(lhs,rhs); ++} ++ ++inline bool operator<(const Ticks& lhs, const Ticks& rhs) { ++ return lhs.value() < rhs.value(); ++} ++ ++inline bool operator>(const Ticks& lhs, const Ticks& rhs) { ++ return operator<(rhs,lhs); ++} ++ ++inline bool operator<=(const Ticks& lhs, const Ticks& rhs) { ++ return !operator>(lhs,rhs); ++} ++ ++inline bool operator>=(const Ticks& lhs, const Ticks& rhs) { ++ return !operator<(lhs,rhs); ++} ++ ++#endif // SHARE_VM_UTILITIES_TICKS_INLINE_HPP +--- ./hotspot/src/share/vm/utilities/vmError.cpp 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/src/share/vm/utilities/vmError.cpp 2014-06-06 19:56:23.000000000 -0700 +@@ -583,6 +583,13 @@ + while (count++ < StackPrintLimit) { + fr.print_on_error(st, buf, sizeof(buf)); + st->cr(); ++ // Compiled code may use EBP register on x86 so it looks like ++ // non-walkable C frame. Use frame.sender() for java frames. ++ if (_thread && _thread->is_Java_thread() && fr.is_java_frame()) { ++ RegisterMap map((JavaThread*)_thread, false); // No update ++ fr = fr.sender(&map); ++ continue; ++ } + if (os::is_first_C_frame(&fr)) break; + fr = os::get_sender_for_C_frame(&fr); + } +--- ./hotspot/test/compiler/5091921/Test7005594.sh 2013-09-06 11:22:17.000000000 -0700 ++++ ./hotspot/test/compiler/5091921/Test7005594.sh 2014-06-06 19:56:22.000000000 -0700 +@@ -60,6 +60,9 @@ + # Windows/MKS + MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'` + MEM="$(($machine_memory / 1024))" ++elif [ -n `sysctl -n hw.physmem64 2> /dev/null` -o -n `sysctl -n hw.physmem 2> /dev/null` ]; ++ # BSD ++ MEM=`sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }'` + else + echo "Unable to determine amount of physical memory on the machine" + fi +--- ./hotspot/test/compiler/8004051/Test8004051.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/8004051/Test8004051.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,56 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8004051 ++ * @bug 8005722 ++ * @summary assert(_oprs_len[mode] < maxNumberOfOperands) failed: array overflow ++ * ++ * @run main/othervm -Xcomp -client Test8004051 ++ */ ++ ++public class Test8004051 { ++ public static void main(String[] argv) { ++ Object o = new Object(); ++ fillPrimRect(1.1f, 1.2f, 1.3f, 1.4f, ++ o, o, ++ 1.5f, 1.6f, 1.7f, 1.8f, ++ 2.0f, 2.1f, 2.2f, 2.3f, ++ 2.4f, 2.5f, 2.6f, 2.7f, ++ 100, 101); ++ System.out.println("Test passed, test did not assert"); + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ static boolean fillPrimRect(float x, float y, float w, float h, ++ Object rectTex, Object wrapTex, ++ float bx, float by, float bw, float bh, ++ float f1, float f2, float f3, float f4, ++ float f5, float f6, float f7, float f8, ++ int i1, int i2 ) { ++ System.out.println(x + " " + y + " " + w + " " + h + " " + ++ bx + " " + by + " " + bw + " " + bh); ++ return true; + } +} +--- ./hotspot/test/compiler/codegen/LoadWithMask.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/codegen/LoadWithMask.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,44 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} -+ ---- jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java 2013-09-06 11:23:56.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -75,9 +75,14 @@ - - private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/"; - -- private static final XPathFactory xpf = XPathFactory.newInstance(); -+ private static final ContextClassloaderLocal xpf = new ContextClassloaderLocal() { -+ @Override -+ protected XPathFactory initialValue() throws Exception { -+ return XPathFactory.newInstance(); -+ } -+ }; - -- private final XPath xpath = xpf.newXPath(); -+ private final XPath xpath = xpf.get().newXPath(); - - /** - * Internalize all <jaxb:bindings> customizations in the given forest. ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java 2013-09-06 11:23:57.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * 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,9 +27,14 @@ - - import java.math.BigDecimal; - import java.math.BigInteger; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - import java.util.Calendar; -+import java.util.Collections; - import java.util.GregorianCalendar; -+import java.util.Map; - import java.util.TimeZone; -+import java.util.WeakHashMap; - - import javax.xml.bind.DatatypeConverter; - import javax.xml.bind.DatatypeConverterInterface; -@@ -352,7 +357,7 @@ - - public static GregorianCalendar _parseDateTime(CharSequence s) { - String val = WhiteSpaceProcessor.trim(s).toString(); -- return datatypeFactory.newXMLGregorianCalendar(val).toGregorianCalendar(); -+ return getDatatypeFactory().newXMLGregorianCalendar(val).toGregorianCalendar(); - } - - public static String _printDateTime(Calendar val) { -@@ -718,14 +723,30 @@ - } - return false; - } -- private static final DatatypeFactory datatypeFactory; - -- static { -- try { -- datatypeFactory = DatatypeFactory.newInstance(); -- } catch (DatatypeConfigurationException e) { -- throw new Error(e); -+ private static final Map DF_CACHE = Collections.synchronizedMap(new WeakHashMap()); ++/* ++ * @test ++ * @bug 8032207 ++ * @summary Invalid node sizing for loadUS2L_immI16 and loadI2L_immI ++ * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,LoadWithMask.foo LoadWithMask ++ * ++ */ ++public class LoadWithMask { ++ static int x[] = new int[1]; ++ static long foo() { ++ return x[0] & 0xfff0ffff; ++ } + -+ public static DatatypeFactory getDatatypeFactory() { -+ ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction() { -+ public ClassLoader run() { -+ return Thread.currentThread().getContextClassLoader(); -+ } -+ }); -+ DatatypeFactory df = DF_CACHE.get(tccl); -+ if (df == null) { -+ synchronized (DatatypeConverterImpl.class) { -+ df = DF_CACHE.get(tccl); -+ if (df == null) { // to prevent multiple initialization -+ try { -+ df = DatatypeFactory.newInstance(); -+ } catch (DatatypeConfigurationException e) { -+ throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e); -+ } -+ DF_CACHE.put(tccl, df); -+ } -+ } - } -+ return df; - } - - private static final class CalendarFormatter { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,48 @@ ++ public static void main(String[] args) { ++ x[0] = -1; ++ long l = 0; ++ for (int i = 0; i < 100000; ++i) { ++ l = foo(); ++ } ++ } ++} +--- ./hotspot/test/compiler/codegen/LoadWithMask2.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/codegen/LoadWithMask2.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -15812,129 +21935,135 @@ + * questions. + */ + -+package com.sun.xml.internal.bind; ++/* ++ * @test ++ * @bug 8031743 ++ * @summary loadI2L_immI broken for negative memory values ++ * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,*.foo* LoadWithMask2 ++ * ++ */ ++public class LoadWithMask2 { ++ static int x; ++ static long foo1() { ++ return x & 0xfffffffe; ++ } ++ static long foo2() { ++ return x & 0xff000000; ++ } ++ static long foo3() { ++ return x & 0x8abcdef1; ++ } + -+import java.text.MessageFormat; -+import java.util.ResourceBundle; ++ public static void main(String[] args) { ++ x = -1; ++ long l = 0; ++ for (int i = 0; i < 100000; ++i) { ++ l = foo1() & foo2() & foo3(); ++ } ++ if (l > 0) { ++ System.out.println("FAILED"); ++ System.exit(97); ++ } ++ System.out.println("PASSED"); ++ } ++} +--- ./hotspot/test/compiler/gcbarriers/G1CrashTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/gcbarriers/G1CrashTest.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ * ++ */ + +/** -+ * Message resources ++ * @test ++ * @bug 8023472 ++ * @summary C2 optimization breaks with G1 ++ * ++ * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -Dcount=100000 G1CrashTest ++ * ++ * @author pbiswal@palantir.com + */ -+enum Messages { -+ FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args -+ ; + -+ private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName()); ++public class G1CrashTest { ++ static Object[] set = new Object[11]; ++ ++ public static void main(String[] args) throws InterruptedException { ++ for (int j = 0; j < Integer.getInteger("count"); j++) { ++ Object key = new Object(); ++ insertKey(key); ++ if (j > set.length / 2) { ++ Object[] oldKeys = set; ++ set = new Object[2 * set.length - 1]; ++ for (Object o : oldKeys) { ++ if (o != null) ++ insertKey(o); ++ } ++ } ++ } ++ } + -+ @Override -+ public String toString() { -+ return format(); ++ static void insertKey(Object key) { ++ int hash = key.hashCode() & 0x7fffffff; ++ int index = hash % set.length; ++ Object cur = set[index]; ++ if (cur == null) ++ set[index] = key; ++ else ++ insertKeyRehash(key, index, hash, cur); + } + -+ public String format( Object... args ) { -+ return MessageFormat.format( rb.getString(name()), args ); ++ static void insertKeyRehash(Object key, int index, int hash, Object cur) { ++ int loopIndex = index; ++ int firstRemoved = -1; ++ do { ++ if (cur == "dead") ++ firstRemoved = 1; ++ index--; ++ if (index < 0) ++ index += set.length; ++ cur = set[index]; ++ if (cur == null) { ++ if (firstRemoved != -1) ++ set[firstRemoved] = "dead"; ++ else ++ set[index] = key; ++ return; ++ } ++ } while (index != loopIndex); ++ if (firstRemoved != -1) ++ set[firstRemoved] = null; + } +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+ -+FAILED_TO_INITIALE_DATATYPE_FACTORY = \ -+ Failed to initialize JAXP 1.3 DatatypeFactory class. ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2013-09-06 11:23:57.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -45,7 +45,6 @@ - import com.sun.xml.internal.bind.api.impl.NameConverter; - import com.sun.xml.internal.bind.v2.ContextFactory; - import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; - - /** -@@ -404,7 +403,7 @@ - * @since 2.0 FCS - */ - public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) { -- return Navigator.REFLECTION.getBaseClass(type,baseType); -+ return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType); - } - - ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java 2013-09-06 11:23:57.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,8 +31,6 @@ - - import javax.xml.namespace.QName; - --import com.sun.xml.internal.bind.v2.model.nav.Navigator; -- - /** - * A reference to a JAXB-bound type. - * -@@ -104,11 +102,10 @@ - // if we are to reinstitute this check, check JAXB annotations only - // assert annotations.length==0; // not designed to work with adapters. - -- Type base = Navigator.REFLECTION.getBaseClass(type, Collection.class); -+ Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(type, Collection.class); - if(base==null) - return this; // not a collection - -- return new TypeReference(tagName, -- Navigator.REFLECTION.getTypeArgument(base,0)); -+ return new TypeReference(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0)); - } - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,85 @@ +--- ./hotspot/test/compiler/print/PrintInlining.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/print/PrintInlining.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -15951,330 +22080,217 @@ + * questions. + */ + -+package com.sun.xml.internal.bind.api; -+ -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; -+ -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++/* ++ * @test ++ * @bug 8022585 ++ * @summary VM crashes when ran with -XX:+PrintInlining ++ * @run main/othervm -Xcomp -XX:+PrintInlining PrintInlining ++ * ++ */ + -+/** -+ * Utils class. ++public class PrintInlining { ++ public static void main(String[] args) { ++ System.out.println("Passed"); ++ } ++} +--- ./hotspot/test/compiler/reflection/ArrayNewInstanceOfVoid.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/reflection/ArrayNewInstanceOfVoid.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,44 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * 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. + * -+ * Has *package private* access to avoid inappropriate usage. ++ * 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 */ final class Utils { + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++/* ++ * @test ++ * @bug 8029366 ++ * @summary ShouldNotReachHere error when creating an array with component type of void ++ */ + -+ /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. -+ */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++public class ArrayNewInstanceOfVoid { ++ public static void main(String[] args) { ++ for (int i = 0; i < 100_000; i++) { ++ test(); ++ } ++ } + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; ++ private static void test() { + try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; ++ java.lang.reflect.Array.newInstance(void.class, 2); ++ } catch (IllegalArgumentException e) { ++ // expected + } + } ++} +--- ./hotspot/test/compiler/regalloc/C1ObjectSpillInLogicOp.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/compiler/regalloc/C1ObjectSpillInLogicOp.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,45 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ /** -+ * private constructor to avoid util class instantiating -+ */ -+ private Utils() { ++/* ++ * @test ++ * @bug 8027751 ++ * @summary C1 crashes generating G1 post-barrier in Unsafe.getAndSetObject() intrinsic because of the new value spill ++ * @run main/othervm -XX:+UseG1GC C1ObjectSpillInLogicOp ++ * ++ * G1 barriers use logical operators (xor) on T_OBJECT mixed with T_LONG or T_INT. ++ * The current implementation of logical operations on x86 in C1 doesn't allow for long operands to be on stack. ++ * There is a special code in the register allocator that forces long arguments in registers on x86. However T_OBJECT ++ * can be spilled just fine, and in that case the xor emission will fail. ++ */ ++ ++import java.util.concurrent.atomic.*; ++public class C1ObjectSpillInLogicOp { ++ static public void main(String[] args) { ++ AtomicReferenceArray x = new AtomicReferenceArray(128); ++ Integer y = new Integer(0); ++ for (int i = 0; i < 50000; i++) { ++ x.getAndSet(i % x.length(), y); + } ++ } +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -60,7 +60,6 @@ - PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY, // 2 args - - INVALID_XML_ENUM_VALUE, // 2 arg -- FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args - NO_IMAGE_WRITER, // 1 arg - - ILLEGAL_MIME_TYPE, // 2 args ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # - # This code is free software; you can redistribute it and/or modify it -@@ -86,9 +86,6 @@ - INVALID_XML_ENUM_VALUE = \ - "{0}" is not a valid value for {1}. - --FAILED_TO_INITIALE_DATATYPE_FACTORY = \ -- Failed to initialize JAXP 1.3 DatatypeFactory class. -- - NO_IMAGE_WRITER = \ - No javax.imageio.ImageWriter is available for the specified MIME type "{0}" - ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java 2014-04-20 12:39:38.000000000 -0700 -@@ -235,7 +235,7 @@ - String pkg = nav.getPackageName(ci.getClazz()); - if(!registries.containsKey(pkg)) { - // insert the package's object factory -- C c = loadObjectFactory(ci, pkg); -+ C c = nav.loadObjectFactory(clazz, pkg); - if(c!=null) - addRegistry(c,(Locatable)p); - } -@@ -264,15 +264,6 @@ - return r; - } - -- private C loadObjectFactory(ClassInfoImpl ci, String pkg) { -- try { -- return nav.findClass(pkg + ".ObjectFactory", ci.getClazz()); -- } catch (SecurityException ignored) { -- // treat SecurityException in same way as ClassNotFoundException in this case -- return null; -- } -- } -- - /** - * Checks the uniqueness of the type name. - */ ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,6 @@ - - import java.lang.reflect.Type; - --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; - import com.sun.xml.internal.bind.v2.runtime.Transducer; - -@@ -36,7 +35,7 @@ - */ - final class RuntimeAnyTypeImpl extends AnyTypeImpl implements RuntimeNonElement { - private RuntimeAnyTypeImpl() { -- super(Navigator.REFLECTION); -+ super(Utils.REFLECTION_NAVIGATOR); - } - - public Transducer getTransducer() { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -60,9 +60,7 @@ - import javax.imageio.stream.ImageOutputStream; - import javax.xml.bind.ValidationEvent; - import javax.xml.bind.helpers.ValidationEventImpl; --import javax.xml.datatype.DatatypeConfigurationException; - import javax.xml.datatype.DatatypeConstants; --import javax.xml.datatype.DatatypeFactory; - import javax.xml.datatype.Duration; - import javax.xml.datatype.XMLGregorianCalendar; - import javax.xml.namespace.QName; -@@ -565,7 +563,8 @@ - - public XMLGregorianCalendar parse(CharSequence lexical) throws SAXException { - try { -- return datatypeFactory.newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396) -+ return DatatypeConverterImpl.getDatatypeFactory() -+ .newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396) - } catch (Exception e) { - UnmarshallingContext.getInstance().handleError(e); - return null; -@@ -835,7 +834,7 @@ - - public Duration parse(CharSequence lexical) { - TODO.checkSpec("JSR222 Issue #42"); -- return datatypeFactory.newDuration(lexical.toString()); -+ return DatatypeConverterImpl.getDatatypeFactory().newDuration(lexical.toString()); - } - }); - primaryList.add( -@@ -876,21 +875,6 @@ - } - } - -- -- /** -- * Cached instance of {@link DatatypeFactory} to create -- * {@link XMLGregorianCalendar} and {@link Duration}. -- */ -- private static final DatatypeFactory datatypeFactory = init(); -- -- private static DatatypeFactory init() { -- try { -- return DatatypeFactory.newInstance(); -- } catch (DatatypeConfigurationException e) { -- throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e); -- } -- } +--- ./hotspot/test/gc/8000311/Test8000311.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/8000311/Test8000311.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,42 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 Test8000311 ++ * @key gc ++ * @bug 8000311 ++ * @summary G1: ParallelGCThreads==0 broken ++ * @run main/othervm -XX:+UseG1GC -XX:ParallelGCThreads=0 -XX:+ResizePLAB -XX:+ExplicitGCInvokesConcurrent Test8000311 ++ * @author filipp.zhinkin@oracle.com ++ */ ++ ++import java.util.*; ++ ++public class Test8000311 { ++ public static void main(String args[]) { ++ for(int i = 0; i<100; i++) { ++ byte[] garbage = new byte[1000]; ++ System.gc(); ++ } ++ } ++} +--- ./hotspot/test/gc/TestVerifyBeforeGCDuringStartup.java 2013-09-06 11:22:19.000000000 -0700 ++++ ./hotspot/test/gc/TestVerifyBeforeGCDuringStartup.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,45 +0,0 @@ +-/* +- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +- * 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. +- */ - - private static void checkXmlGregorianCalendarFieldRef(QName type, - XMLGregorianCalendar cal)throws javax.xml.bind.MarshalException{ - StringBuilder buf = new StringBuilder(); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -42,7 +42,6 @@ - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException; - import com.sun.xml.internal.bind.v2.runtime.Transducer; - import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; -@@ -122,7 +121,7 @@ - } - - public Class getType() { -- return Navigator.REFLECTION.erasure(super.getType()); -+ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(super.getType()); - } - - public RuntimeClassInfo getScope() { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,8 +37,6 @@ - import com.sun.xml.internal.bind.v2.model.annotation.Locatable; - import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; - import com.sun.xml.internal.bind.v2.model.core.ID; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; --import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; -@@ -75,7 +73,7 @@ - public final @Nullable JAXBContextImpl context; - - public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map subclassReplacements, String defaultNamespaceRemap) { -- super(annotationReader, Navigator.REFLECTION, subclassReplacements, defaultNamespaceRemap); -+ super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap); - this.context = context; - } - -@@ -109,10 +107,6 @@ - return new RuntimeArrayInfoImpl(this, upstream, (Class)arrayType); - } - -- public ReflectionNavigator getNavigator() { -- return (ReflectionNavigator)nav; -- } +-/* @test TestVerifyBeforeGCDuringStartup.java +- * @key gc +- * @bug 8010463 +- * @summary Simple test run with -XX:+VerifyBeforeGC -XX:-UseTLAB to verify 8010463 +- * @library /testlibrary +- */ - - @Override - protected RuntimeTypeInfoSetImpl createTypeInfoSet() { - return new RuntimeTypeInfoSetImpl(reader); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -34,9 +34,6 @@ - - import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader; - import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet; --import com.sun.xml.internal.bind.v2.model.core.NonElement; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; --import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; - -@@ -47,7 +44,7 @@ - */ - final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl implements RuntimeTypeInfoSet { - public RuntimeTypeInfoSetImpl(AnnotationReader reader) { -- super(Navigator.REFLECTION,reader,RuntimeBuiltinLeafInfoImpl.LEAVES); -+ super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES); - } - - @Override -@@ -55,10 +52,6 @@ - return RuntimeAnyTypeImpl.theInstance; - } - -- public ReflectionNavigator getNavigator() { -- return (ReflectionNavigator)super.getNavigator(); -- } +-import com.oracle.java.testlibrary.OutputAnalyzer; +-import com.oracle.java.testlibrary.ProcessTools; - - public RuntimeNonElement getTypeInfo( Type type ) { - return (RuntimeNonElement)super.getTypeInfo(type); - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,85 @@ +-public class TestVerifyBeforeGCDuringStartup { +- public static void main(String args[]) throws Exception { +- ProcessBuilder pb = +- ProcessTools.createJavaProcessBuilder(System.getProperty("test.vm.opts"), +- "-XX:-UseTLAB", +- "-XX:+UnlockDiagnosticVMOptions", +- "-XX:+VerifyBeforeGC", "-version"); +- OutputAnalyzer output = new OutputAnalyzer(pb.start()); +- output.shouldContain("[Verifying"); +- output.shouldHaveExitValue(0); +- } +-} +--- ./hotspot/test/gc/TestVerifyDuringStartup.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/TestVerifyDuringStartup.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -16291,306 +22307,257 @@ + * questions. + */ + -+package com.sun.xml.internal.bind.v2.model.impl; ++/* @test TestVerifyDuringStartup.java ++ * @key gc ++ * @bug 8010463 ++ * @summary Simple test run with -XX:+VerifyDuringStartup -XX:-UseTLAB to verify 8010463 ++ * @library /testlibrary ++ */ + -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++import com.oracle.java.testlibrary.OutputAnalyzer; ++import com.oracle.java.testlibrary.ProcessTools; ++ ++public class TestVerifyDuringStartup { ++ public static void main(String args[]) throws Exception { ++ ProcessBuilder pb = ++ ProcessTools.createJavaProcessBuilder(System.getProperty("test.vm.opts"), ++ "-XX:-UseTLAB", ++ "-XX:+UnlockDiagnosticVMOptions", ++ "-XX:+VerifyDuringStartup", "-version"); ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); ++ output.shouldContain("[Verifying"); ++ output.shouldHaveExitValue(0); ++ } ++} +--- ./hotspot/test/gc/TestVerifySilently.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/TestVerifySilently.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,84 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++/* @test TestVerifySilently.java ++ * @key gc ++ * @bug 8032771 ++ * @summary Test silent verification. ++ * @library /testlibrary ++ */ ++ ++import com.oracle.java.testlibrary.OutputAnalyzer; ++import com.oracle.java.testlibrary.ProcessTools; ++import java.util.ArrayList; ++import java.util.Collections; ++ ++class RunSystemGC { ++ public static void main(String args[]) throws Exception { ++ System.gc(); ++ } ++} ++ ++ ++public class TestVerifySilently { ++ private static String[] getTestJavaOpts() { ++ String testVmOptsStr = System.getProperty("test.java.opts"); ++ if (!testVmOptsStr.isEmpty()) { ++ return testVmOptsStr.split(" "); ++ } else { ++ return new String[] {}; ++ } ++ } ++ ++ private static OutputAnalyzer runTest(boolean verifySilently) throws Exception { ++ ArrayList vmOpts = new ArrayList(); ++ ++ Collections.addAll(vmOpts, getTestJavaOpts()); ++ Collections.addAll(vmOpts, new String[] {"-XX:+UnlockDiagnosticVMOptions", ++ "-XX:+VerifyDuringStartup", ++ "-XX:+VerifyBeforeGC", ++ "-XX:+VerifyAfterGC", ++ "-XX:" + (verifySilently ? "+":"-") + "VerifySilently", ++ RunSystemGC.class.getName()}); ++ ProcessBuilder pb = ++ ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()])); ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); ++ ++ System.out.println("Output:\n" + output.getOutput()); ++ return output; ++ } ++ ++ ++ public static void main(String args[]) throws Exception { ++ ++ OutputAnalyzer output; ++ ++ output = runTest(false); ++ output.shouldContain("[Verifying"); ++ output.shouldHaveExitValue(0); ++ ++ output = runTest(true); ++ output.shouldNotContain("[Verifying"); ++ output.shouldHaveExitValue(0); ++ } ++} +--- ./hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,64 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + +/** -+ * Utils class. ++ * @test TestDynMaxHeapFreeRatio ++ * @bug 8028391 ++ * @summary Verify that MaxHeapFreeRatio flag is manageable ++ * @library /testlibrary ++ * @run main TestDynMaxHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 TestDynMaxHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:-UseAdaptiveSizePolicy TestDynMaxHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 TestDynMaxHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=51 -XX:MaxHeapFreeRatio=52 TestDynMaxHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=75 -XX:MaxHeapFreeRatio=100 TestDynMaxHeapFreeRatio ++ */ ++import com.oracle.java.testlibrary.TestDynamicVMOption; ++import com.oracle.java.testlibrary.DynamicVMOptionChecker; ++ ++public class TestDynMaxHeapFreeRatio extends TestDynamicVMOption { ++ ++ public static final String MinFreeRatioFlagName = "MinHeapFreeRatio"; ++ public static final String MaxFreeRatioFlagName = "MaxHeapFreeRatio"; ++ ++ public TestDynMaxHeapFreeRatio() { ++ super(MaxFreeRatioFlagName); ++ } ++ ++ public void test() { ++ ++ int minHeapFreeValue = DynamicVMOptionChecker.getIntValue(MinFreeRatioFlagName); ++ System.out.println(MinFreeRatioFlagName + " = " + minHeapFreeValue); ++ ++ testPercentageValues(); ++ ++ checkInvalidValue(Integer.toString(minHeapFreeValue - 1)); ++ checkValidValue(Integer.toString(minHeapFreeValue)); ++ checkValidValue("100"); ++ } ++ ++ public static void main(String args[]) throws Exception { ++ new TestDynMaxHeapFreeRatio().test(); ++ } ++ ++} +--- ./hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,62 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * 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. + * -+ * Has *package private* access to avoid inappropriate usage. ++ * 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 */ final class Utils { + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++/** ++ * @test TestDynMinHeapFreeRatio ++ * @bug 8028391 ++ * @summary Verify that MinHeapFreeRatio flag is manageable ++ * @library /testlibrary ++ * @run main TestDynMinHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 TestDynMinHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:-UseAdaptiveSizePolicy TestDynMinHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 TestDynMinHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=51 -XX:MaxHeapFreeRatio=52 TestDynMinHeapFreeRatio ++ * @run main/othervm -XX:MinHeapFreeRatio=75 -XX:MaxHeapFreeRatio=100 TestDynMinHeapFreeRatio ++ */ ++import com.oracle.java.testlibrary.TestDynamicVMOption; ++import com.oracle.java.testlibrary.DynamicVMOptionChecker; + -+ /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. -+ */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++public class TestDynMinHeapFreeRatio extends TestDynamicVMOption { + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; -+ try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; -+ } ++ public static final String MinFreeRatioFlagName = "MinHeapFreeRatio"; ++ public static final String MaxFreeRatioFlagName = "MaxHeapFreeRatio"; ++ ++ public TestDynMinHeapFreeRatio() { ++ super(MinFreeRatioFlagName); + } + -+ /** -+ * private constructor to avoid util class instantiating -+ */ -+ private Utils() { ++ public void test() { ++ int maxHeapFreeValue = DynamicVMOptionChecker.getIntValue(MaxFreeRatioFlagName); ++ System.out.println(MaxFreeRatioFlagName + " = " + maxHeapFreeValue); ++ ++ testPercentageValues(); ++ ++ checkInvalidValue(Integer.toString(maxHeapFreeValue + 1)); ++ checkValidValue(Integer.toString(maxHeapFreeValue)); ++ checkValidValue("0"); ++ } ++ ++ public static void main(String args[]) throws Exception { ++ new TestDynMinHeapFreeRatio().test(); + } +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -240,10 +240,6 @@ - */ - T getComponentType(T t); - -- -- /** The singleton instance. */ -- public static final ReflectionNavigator REFLECTION = new ReflectionNavigator(); -- - /** - * Gets the i-th type argument from a parameterized type. - * -@@ -357,14 +353,14 @@ - String getPackageName(C clazz); - - /** -- * Finds the class/interface/enum/annotation of the given name. -+ * Finds ObjectFactory for the given referencePoint. - * - * @param referencePoint - * The class that refers to the specified class. - * @return - * null if not found. - */ -- C findClass(String className, C referencePoint); -+ C loadObjectFactory(C referencePoint, String packageName); - - /** - * Returns true if this method is a bridge method as defined in JLS. ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,16 +44,19 @@ - * {@link Navigator} implementation for {@code java.lang.reflect}. - * - */ --public final class ReflectionNavigator implements Navigator { -+/*package*/final class ReflectionNavigator implements Navigator { - -- /** -- * Singleton. -- * -- * Use {@link Navigator#REFLECTION} -- */ -- ReflectionNavigator() { -+// ---------- Singleton ----------------- -+ private static final ReflectionNavigator INSTANCE = new ReflectionNavigator(); -+ -+ /*package*/static ReflectionNavigator getInstance() { // accessible through reflection from Utils classes -+ return INSTANCE; - } - -+ private ReflectionNavigator() { -+ } -+// --------------------------------------- -+ - public Class getSuperClass(Class clazz) { - if (clazz == Object.class) { - return null; -@@ -64,6 +67,7 @@ - } - return sc; - } -+ - private static final TypeVisitor baseClassFinder = new TypeVisitor() { - - public Type onClass(Class c, Class sup) { -@@ -496,7 +500,7 @@ - c.getDeclaredConstructor(); - return true; - } catch (NoSuchMethodException e) { -- return false; -+ return false; // todo: do this WITHOUT exception throw - } - } - -@@ -544,13 +548,15 @@ - } - } - -- public Class findClass(String className, Class referencePoint) { -+ @Override -+ public Class loadObjectFactory(Class referencePoint, String pkg) { -+ String clName = pkg + ".ObjectFactory"; -+ ClassLoader cl = referencePoint.getClassLoader(); -+ if (cl == null) -+ cl = ClassLoader.getSystemClassLoader(); -+ - try { -- ClassLoader cl = referencePoint.getClassLoader(); -- if (cl == null) { -- cl = ClassLoader.getSystemClassLoader(); -- } -- return cl.loadClass(className); -+ return cl.loadClass(clName); - } catch (ClassNotFoundException e) { - return null; - } -@@ -569,7 +575,7 @@ - // class Base { - // T getX() { ... } - // } -- // to be overrided. Handling this correctly needs a careful implementation -+ // to be overriden. Handling this correctly needs a careful implementation - - String name = method.getName(); - Class[] params = method.getParameterTypes(); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,8 +33,6 @@ - import javax.xml.namespace.QName; - - import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet; --import com.sun.xml.internal.bind.v2.model.core.NonElement; --import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; - - /** - * {@link TypeInfoSet} refined for runtime. -@@ -52,5 +50,4 @@ - RuntimeElementInfo getElementInfo( Class scope, QName name ); - Map getElementMappings( Class scope ); - Iterable getAllElements(); -- ReflectionNavigator getNavigator(); - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -36,7 +36,6 @@ - - import com.sun.xml.internal.bind.api.AccessorException; - import com.sun.xml.internal.bind.v2.model.core.PropertyKind; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; - import com.sun.xml.internal.bind.v2.runtime.property.Property; -@@ -81,10 +80,10 @@ - this.property = PropertyFactory.create(grammar,rei.getProperty()); - - tagName = rei.getElementName(); -- expectedType = Navigator.REFLECTION.erasure(rei.getContentInMemoryType()); -+ expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); - scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); - -- Class type = Navigator.REFLECTION.erasure(rei.getType()); -+ Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); - if(type==JAXBElement.class) - constructor = null; - else { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -90,7 +90,6 @@ - import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl; - import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; - import com.sun.xml.internal.bind.v2.model.nav.Navigator; --import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo; -@@ -358,7 +357,7 @@ - beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) ); - - // build bridges -- ReflectionNavigator nav = typeSet.getNavigator(); -+ Navigator nav = typeSet.getNavigator(); - - for (TypeReference tr : typeRefs) { - XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class); -@@ -366,7 +365,7 @@ - XmlList xl = tr.get(XmlList.class); - - // eventually compute the in-memory type -- Class erasedType = nav.erasure(tr.type); -+ Class erasedType = (Class) nav.erasure(tr.type); - - if(xjta!=null) { - a = new Adapter(xjta.value(),nav); -@@ -377,7 +376,7 @@ - } - - if(a!=null) { -- erasedType = nav.erasure(a.defaultType); -+ erasedType = (Class) nav.erasure(a.defaultType); - } - - Name name = nameBuilder.createElementName(tr.tagName); -@@ -873,7 +872,7 @@ - // this is a special class we introduced for JAX-WS that we *don't* want in the schema - } else { - NonElement typeInfo = getXmlType(tis,tr); -- xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type),typeInfo); -+ xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo); - } - } - return xsdgen; ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,85 @@ +--- ./hotspot/test/gc/g1/TestHumongousCodeCacheRoots.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/g1/TestHumongousCodeCacheRoots.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,143 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -16607,188 +22574,223 @@ + * questions. + */ + -+package com.sun.xml.internal.bind.v2.runtime; ++/* ++ * @test ++ * @key regression ++ * @key gc ++ * @bug 8027756 ++ * @library /testlibrary /testlibrary/whitebox ++ * @build TestHumongousCodeCacheRoots ++ * @run main ClassFileInstaller sun.hotspot.WhiteBox ++ * @summary Humongous objects may have references from the code cache ++ * @run main TestHumongousCodeCacheRoots ++*/ + -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++import com.oracle.java.testlibrary.*; ++import sun.hotspot.WhiteBox; + -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++import java.util.ArrayList; ++import java.util.Arrays; + -+/** -+ * Utils class. ++class TestHumongousCodeCacheRootsHelper { ++ ++ static final int n = 1000000; ++ static final int[] AA = new int[n]; ++ static final int[] BB = new int[n]; ++ ++ public static void main(String args[]) throws Exception { ++ // do some work so that the compiler compiles this method, inlining the ++ // reference to the integer array (which is a humonguous object) into ++ // the code cache. ++ for(int i = 0; i < n; i++) { ++ AA[i] = 0; ++ BB[i] = 0; ++ } ++ // trigger a GC that checks that the verification code allows humongous ++ // objects with code cache roots; objects should be all live here. ++ System.gc(); ++ ++ // deoptimize everyhing: this should make all compiled code zombies. ++ WhiteBox wb = WhiteBox.getWhiteBox(); ++ wb.deoptimizeAll(); ++ ++ // trigger a GC that checks that the verification code allows humongous ++ // objects with code cache roots; objects should be all live here. ++ System.gc(); ++ ++ // wait a little for the code cache sweeper to try to clean up zombie nmethods ++ // and unregister the code roots. ++ try { Thread.sleep(5000); } catch (InterruptedException ex) { } ++ ++ // do some work on the arrays to make sure that they need to be live after the GCs ++ for(int i = 0; i < n; i++) { ++ AA[i] = 1; ++ BB[i] = 10; ++ } ++ ++ System.out.println(); ++ } ++} ++ ++public class TestHumongousCodeCacheRoots { ++ ++ /** ++ * Executes a class in a new VM process with the given parameters. ++ * @param vmargs Arguments to the VM to run ++ * @param classname Name of the class to run ++ * @param arguments Arguments to the class ++ * @param useTestDotJavaDotOpts Use test.java.opts as part of the VM argument string ++ * @return The OutputAnalyzer with the results for the invocation. ++ */ ++ public static OutputAnalyzer runWhiteBoxTest(String[] vmargs, String classname, String[] arguments, boolean useTestDotJavaDotOpts) throws Exception { ++ ArrayList finalargs = new ArrayList(); ++ ++ String[] whiteboxOpts = new String[] { ++ "-Xbootclasspath/a:.", ++ "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", ++ "-cp", System.getProperty("java.class.path"), ++ }; ++ ++ if (useTestDotJavaDotOpts) { ++ // System.getProperty("test.java.opts") is '' if no options is set, ++ // we need to skip such a result ++ String[] externalVMOpts = new String[0]; ++ if (System.getProperty("test.java.opts") != null && System.getProperty("test.java.opts").length() != 0) { ++ externalVMOpts = System.getProperty("test.java.opts").split(" "); ++ } ++ finalargs.addAll(Arrays.asList(externalVMOpts)); ++ } ++ ++ finalargs.addAll(Arrays.asList(vmargs)); ++ finalargs.addAll(Arrays.asList(whiteboxOpts)); ++ finalargs.add(classname); ++ finalargs.addAll(Arrays.asList(arguments)); ++ ++ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(finalargs.toArray(new String[0])); ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); ++ output.shouldHaveExitValue(0); ++ ++ return output; ++ } ++ ++ public static void runTest(String compiler, String[] other) throws Exception { ++ ArrayList joined = new ArrayList(); ++ joined.add(compiler); ++ joined.addAll(Arrays.asList(other)); ++ runWhiteBoxTest(joined.toArray(new String[0]), TestHumongousCodeCacheRootsHelper.class.getName(), ++ new String[] {}, false); ++ } ++ ++ public static void main(String[] args) throws Exception { ++ final String[] baseArguments = new String[] { ++ "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1M", "-Xmx100M", // make sure we get a humongous region ++ "-XX:+UnlockDiagnosticVMOptions", ++ "-XX:InitiatingHeapOccupancyPercent=1", // strong code root marking ++ "-XX:+G1VerifyHeapRegionCodeRoots", "-XX:+VerifyAfterGC", // make sure that verification is run ++ "-XX:NmethodSweepFraction=1", "-XX:NmethodSweepCheckInterval=1", // make the code cache sweep more predictable ++ }; ++ runTest("-client", baseArguments); ++ runTest("-server", baseArguments); ++ } ++} ++ +--- ./hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,92 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * 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. + * -+ * Has *package private* access to avoid inappropriate usage. ++ * 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 */ final class Utils { + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++/** ++ * @test TestPrintRegionRememberedSetInfo ++ * @key gc ++ * @bug 8014240 ++ * @summary Test output of G1PrintRegionRememberedSetInfo ++ * @library /testlibrary ++ * @run main TestPrintRegionRememberedSetInfo ++ * @author thomas.schatzl@oracle.com ++ */ + -+ /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. -+ */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++import com.oracle.java.testlibrary.*; ++import java.lang.Thread; ++import java.util.ArrayList; ++import java.util.Arrays; + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; ++class RunAndWaitForMarking { ++ public static void main(String[] args) { ++ System.gc(); + try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; ++ Thread.sleep(200); ++ } catch (InterruptedException e) { + } + } ++} + -+ /** -+ * private constructor to avoid util class instantiating -+ */ -+ private Utils() { ++public class TestPrintRegionRememberedSetInfo { ++ ++ public static String runTest(String arg) throws Exception { ++ ArrayList finalargs = new ArrayList(); ++ String[] defaultArgs = new String[] { ++ "-XX:+UseG1GC", ++ "-Xmx10m", ++ "-XX:+ExplicitGCInvokesConcurrent", ++ "-XX:+UnlockDiagnosticVMOptions", ++ "-XX:+G1PrintRegionLivenessInfo", ++ "-XX:G1HeapRegionSize=1M", ++ "-XX:InitiatingHeapOccupancyPercent=0", ++ }; ++ ++ finalargs.addAll(Arrays.asList(defaultArgs)); ++ finalargs.add(arg); ++ ++ finalargs.add(RunAndWaitForMarking.class.getName()); ++ ++ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( ++ finalargs.toArray(new String[0])); ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); ++ output.shouldHaveExitValue(0); ++ ++ String result = output.getStdout(); ++ return result; ++ } ++ ++ public static void main(String[] args) throws Exception { ++ String result; ++ ++ result = runTest("-XX:+G1PrintRegionLivenessInfo"); ++ // check that we got region statistics output ++ if (result.indexOf("PHASE") == -1) { ++ throw new RuntimeException("Unexpected output from -XX:+PrintRegionLivenessInfo found."); ++ } ++ ++ result = runTest("-XX:-G1PrintRegionLivenessInfo"); ++ if (result.indexOf("remset") != -1) { ++ throw new RuntimeException("Should find remembered set information in output."); ++ } + } +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -33,7 +33,6 @@ - - import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; - import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; --import com.sun.xml.internal.bind.v2.util.ClassLoaderRetriever; - - import org.xml.sax.SAXException; - -@@ -153,7 +152,6 @@ - } - } - -- - /** - * Reference to FI's XMLStreamWriter class, if FI can be loaded. - */ -@@ -162,9 +160,8 @@ - - private static Class initFIStAXWriterClass() { - try { -- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); -- Class llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter", true, loader); -- Class sds = loader.loadClass("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer"); -+ Class llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter"); -+ Class sds = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer"); - // Check if StAXDocumentSerializer implements LowLevelFastInfosetStreamWriter - if (llfisw.isAssignableFrom(sds)) - return sds; -@@ -179,8 +176,7 @@ - try { - if (FI_STAX_WRITER_CLASS == null) - return null; -- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); -- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput", true, loader); -+ Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput"); - return c.getConstructor(FI_STAX_WRITER_CLASS, JAXBContextImpl.class); - } catch (Throwable e) { - return null; -@@ -195,8 +191,7 @@ - - private static Class initStAXExWriterClass() { - try { -- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); -- return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx",true,loader); -+ return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx"); - } catch (Throwable e) { - return null; - } -@@ -204,8 +199,7 @@ - - private static Constructor initStAXExOutputClass() { - try { -- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); -- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput",true, loader); -+ Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput"); - return c.getConstructor(STAXEX_WRITER_CLASS); - } catch (Throwable e) { - return null; ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,6 @@ - - - import com.sun.xml.internal.bind.api.AccessorException; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; - import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; - import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; -@@ -49,7 +48,7 @@ - - assert prop.isCollection(); - lister = Lister.create( -- Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),prop.getAdapter()); -+ Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()),prop.id(),prop.getAdapter()); - assert lister!=null; - acc = prop.getAccessor().optimize(context); - assert acc!=null; ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -42,7 +42,6 @@ - import com.sun.xml.internal.bind.v2.ClassFactory; - import com.sun.xml.internal.bind.v2.util.QNameMap; - import com.sun.xml.internal.bind.v2.model.core.PropertyKind; --import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo; - import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; - import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo; -@@ -98,7 +97,8 @@ - this.valueBeanInfo = context.getOrCreate(prop.getValueType()); - - // infer the implementation class -- Class sig = ReflectionNavigator.REFLECTION.erasure(prop.getRawType()); -+ //noinspection unchecked -+ Class sig = (Class) Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()); - mapImplClass = ClassFactory.inferImplClass(sig,knownImplClasses); - // TODO: error check for mapImplClass==null - // what is the error reporting path for this part of the code? ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java 2014-04-20 12:39:38.000000000 -0700 ++ +--- ./hotspot/test/gc/g1/TestSummarizeRSetStats.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/g1/TestSummarizeRSetStats.java 2014-06-06 19:56:21.000000000 -0700 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -16796,9 +22798,7 @@ + * + * 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. ++ * 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 @@ -16815,169 +22815,78 @@ + * questions. + */ + -+package com.sun.xml.internal.bind.v2.runtime.property; -+ -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; -+ -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; -+ -+/** -+ * Utils class. -+ * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++/* ++ * @test TestSummarizeRSetStats.java ++ * @bug 8013895 ++ * @library /testlibrary ++ * @build TestSummarizeRSetStatsTools TestSummarizeRSetStats ++ * @summary Verify output of -XX:+G1SummarizeRSetStats ++ * @run main TestSummarizeRSetStats + * -+ * Has *package private* access to avoid inappropriate usage. ++ * Test the output of G1SummarizeRSetStats in conjunction with G1SummarizeRSetStatsPeriod. + */ -+/* package */ final class Utils { + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++public class TestSummarizeRSetStats { + -+ /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. -+ */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ public static void main(String[] args) throws Exception { ++ String result; + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; -+ try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; ++ if (!TestSummarizeRSetStatsTools.testingG1GC()) { ++ return; + } -+ } + -+ /** -+ * private constructor to avoid util class instantiating -+ */ -+ private Utils() { ++ // no remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(null, 0); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 0, 0); ++ ++ // no remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(null, 2); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 0, 0); ++ ++ // no remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:G1SummarizeRSetStatsPeriod=1" }, 3); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 0, 0); ++ ++ // single remembered set summary output at the end ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats" }, 0); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 0); ++ ++ // single remembered set summary output at the end ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats" }, 2); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 0); ++ ++ // single remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 0); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 0); ++ ++ // two times remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 1); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 2); ++ ++ // four times remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 3); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 6); ++ ++ // three times remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=2" }, 3); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 4); ++ ++ // single remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=100" }, 3); ++ TestSummarizeRSetStatsTools.expectRSetSummaries(result, 1, 2); + } +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java 2013-09-06 11:23:58.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -48,7 +48,6 @@ - import com.sun.xml.internal.bind.api.JAXBRIContext; - import com.sun.xml.internal.bind.v2.model.core.Adapter; - import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; - import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory; - import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader; -@@ -193,7 +192,7 @@ - - public final Accessor adapt(Adapter adapter) { - return new AdaptedAccessor( -- (Class) Navigator.REFLECTION.erasure(adapter.defaultType), -+ (Class) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType), - this, - adapter.adapterType); - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java 2013-09-06 11:23:59.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -51,7 +51,6 @@ - import com.sun.xml.internal.bind.v2.TODO; - import com.sun.xml.internal.bind.v2.model.core.Adapter; - import com.sun.xml.internal.bind.v2.model.core.ID; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; - import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher; - import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext; -@@ -116,7 +115,7 @@ - public static - Lister create(Type fieldType,ID idness, Adapter adapter) { - -- Class rawType = Navigator.REFLECTION.erasure(fieldType); -+ Class rawType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(fieldType); - Class itemType; - - Lister l; -@@ -125,9 +124,9 @@ - l = getArrayLister(itemType); - } else - if( Collection.class.isAssignableFrom(rawType) ) { -- Type bt = Navigator.REFLECTION.getBaseClass(fieldType,Collection.class); -+ Type bt = Utils.REFLECTION_NAVIGATOR.getBaseClass(fieldType,Collection.class); - if(bt instanceof ParameterizedType) -- itemType = Navigator.REFLECTION.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]); -+ itemType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]); - else - itemType = Object.class; - l = new CollectionLister(getImplClass(rawType)); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java 2013-09-06 11:23:59.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -39,7 +39,6 @@ - import com.sun.xml.internal.bind.api.AccessorException; - import com.sun.xml.internal.bind.v2.model.core.ID; - import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef; - import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; - import com.sun.xml.internal.bind.v2.runtime.Name; -@@ -144,8 +143,7 @@ - - if(prop.isCollection()) { - return new ListTransducedAccessorImpl(xducer,prop.getAccessor(), -- Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(), -- prop.getAdapter())); -+ Lister.create(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter())); - } - - if(prop.id()==ID.IDREF) ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,85 @@ ++ +--- ./hotspot/test/gc/g1/TestSummarizeRSetStatsPerRegion.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/g1/TestSummarizeRSetStatsPerRegion.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,55 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -16994,290 +22903,134 @@ + * questions. + */ + -+package com.sun.xml.internal.bind.v2.runtime.reflect; ++/* ++ * @test TestSummarizeRSetStatsPerRegion.java ++ * @bug 8014078 ++ * @library /testlibrary ++ * @build TestSummarizeRSetStatsTools TestSummarizeRSetStatsPerRegion ++ * @summary Verify output of -XX:+G1SummarizeRSetStats in regards to per-region type output ++ * @run main TestSummarizeRSetStatsPerRegion ++ */ + -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++import com.oracle.java.testlibrary.*; ++import java.lang.Thread; ++import java.util.ArrayList; ++import java.util.Arrays; + -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++public class TestSummarizeRSetStatsPerRegion { + -+/** -+ * Utils class. ++ public static void main(String[] args) throws Exception { ++ String result; ++ ++ if (!TestSummarizeRSetStatsTools.testingG1GC()) { ++ return; ++ } ++ ++ // single remembered set summary output at the end ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats" }, 0); ++ TestSummarizeRSetStatsTools.expectPerRegionRSetSummaries(result, 1, 0); ++ ++ // two times remembered set summary output ++ result = TestSummarizeRSetStatsTools.runTest(new String[] { "-XX:+G1SummarizeRSetStats", "-XX:G1SummarizeRSetStatsPeriod=1" }, 1); ++ TestSummarizeRSetStatsTools.expectPerRegionRSetSummaries(result, 1, 2); ++ } ++} +--- ./hotspot/test/gc/g1/TestSummarizeRSetStatsThreads.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/g1/TestSummarizeRSetStatsThreads.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,83 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * 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. + * -+ * Has *package private* access to avoid inappropriate usage. ++ * 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 */ final class Utils { + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++/* ++ * @test TestSummarizeRSetStatsThreads ++ * @bug 8025441 ++ * @summary Ensure that various values of worker threads/concurrent ++ * refinement threads do not crash the VM. ++ * @key gc ++ * @library /testlibrary ++ */ + -+ /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. -+ */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; -+ try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; -+ } -+ } ++import com.oracle.java.testlibrary.ProcessTools; ++import com.oracle.java.testlibrary.OutputAnalyzer; + -+ /** -+ * private constructor to avoid util class instantiating -+ */ -+ private Utils() { -+ } -+} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java 2013-09-06 11:23:59.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -33,7 +33,6 @@ - import javax.xml.stream.XMLStreamReader; - - import com.sun.xml.internal.bind.WhiteSpaceProcessor; --import com.sun.xml.internal.bind.v2.util.ClassLoaderRetriever; - - import org.xml.sax.Attributes; - import org.xml.sax.SAXException; -@@ -337,9 +336,8 @@ - - private static Class initFIStAXReaderClass() { - try { -- ClassLoader cl = getClassLoader(); -- Class fisr = cl.loadClass("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader"); -- Class sdp = cl.loadClass("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser"); -+ Class fisr = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader"); -+ Class sdp = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser"); - // Check if StAXDocumentParser implements FastInfosetStreamReader - if (fisr.isAssignableFrom(sdp)) - return sdp; -@@ -355,7 +353,7 @@ - if (FI_STAX_READER_CLASS == null) - return null; - -- Class c = getClassLoader().loadClass( -+ Class c = Class.forName( - "com.sun.xml.internal.bind.v2.runtime.unmarshaller.FastInfosetConnector"); - return c.getConstructor(FI_STAX_READER_CLASS,XmlVisitor.class); - } catch (Throwable e) { -@@ -371,7 +369,7 @@ - - private static Class initStAXExReader() { - try { -- return getClassLoader().loadClass("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx"); -+ return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx"); - } catch (Throwable e) { - return null; - } -@@ -379,15 +377,10 @@ - - private static Constructor initStAXExConnector() { - try { -- Class c = getClassLoader().loadClass("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector"); -+ Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector"); - return c.getConstructor(STAX_EX_READER_CLASS,XmlVisitor.class); - } catch (Throwable e) { - return null; - } - } -- -- public static ClassLoader getClassLoader() { -- return ClassLoaderRetriever.getClassLoader(); -- } -- - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java 2013-09-06 11:24:01.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -62,61 +62,6 @@ - Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, - "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); - -- static { -- try { -- CommandMap map = CommandMap.getDefaultCommandMap(); -- if (map instanceof MailcapCommandMap) { -- MailcapCommandMap mailMap = (MailcapCommandMap) map; -- String hndlrStr = ";;x-java-content-handler="; -- mailMap.addMailcap( -- "text/xml" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); -- mailMap.addMailcap( -- "application/xml" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); -- mailMap.addMailcap( -- "application/fastinfoset" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler"); -- /* Image DataContentHandler handles all image types -- mailMap.addMailcap( -- "image/jpeg" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.JpegDataContentHandler"); -- mailMap.addMailcap( -- "image/gif" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.GifDataContentHandler"); */ -- /*mailMap.addMailcap( -- "multipart/*" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");*/ -- mailMap.addMailcap( -- "image/*" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler"); -- mailMap.addMailcap( -- "text/plain" -- + hndlrStr -- + "com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler"); -- } else { -- throw new SOAPExceptionImpl("Default CommandMap is not a MailcapCommandMap"); -- } -- } catch (Throwable t) { -- log.log( -- Level.SEVERE, -- "SAAJ0508.soap.cannot.register.handlers", -- t); -- if (t instanceof RuntimeException) { -- throw (RuntimeException) t; -- } else { -- throw new RuntimeException(t.getLocalizedMessage()); -- } -- } -- }; -- - private final MimeHeaders headers; - private MimeBodyPart rawContent = null; - private DataHandler dataHandler = null; -@@ -126,6 +71,12 @@ - - public AttachmentPartImpl() { - headers = new MimeHeaders(); ++public class TestSummarizeRSetStatsThreads { + -+ // initialization from here should cover most of cases; -+ // if not, it would be necessary to call -+ // AttachmentPartImpl.initializeJavaActivationHandlers() -+ // explicitly by programmer -+ initializeJavaActivationHandlers(); - } - - public AttachmentPartImpl(MIMEPart part) { -@@ -263,7 +214,7 @@ - log.log( - Level.FINE, - "SAAJ0580.soap.set.Content-Type", -- new String[] { dataHandler.getContentType()}); -+ new String[] { dataHandler.getContentType() }); - setMimeHeader("Content-Type", dataHandler.getContentType()); - } - -@@ -405,7 +356,7 @@ - throw new SOAPExceptionImpl(e.getLocalizedMessage()); - } finally { - try { -- decoded.close(); -+ decoded.close(); - } catch (IOException ex) { - throw new SOAPException(ex); - } -@@ -608,4 +559,43 @@ - return headers; - } - --} -+ public static void initializeJavaActivationHandlers() { -+ // DataHandler.writeTo() may search for DCH. So adding some default ones. -+ try { -+ CommandMap map = CommandMap.getDefaultCommandMap(); -+ if (map instanceof MailcapCommandMap) { -+ MailcapCommandMap mailMap = (MailcapCommandMap) map; ++ private static void runTest(int refinementThreads, int workerThreads) throws Exception { ++ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", ++ "-XX:+UnlockDiagnosticVMOptions", ++ "-XX:+G1SummarizeRSetStats", ++ "-XX:G1ConcRefinementThreads=" + refinementThreads, ++ "-XX:ParallelGCThreads=" + workerThreads, ++ "-version"); + -+ // registering our DCH since javamail's DCH doesn't handle -+ if (!cmdMapInitialized(mailMap)) { -+ mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); -+ mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); -+ mailMap.addMailcap("application/fastinfoset;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler"); -+ mailMap.addMailcap("multipart/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler"); -+ mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler"); -+ mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler"); -+ } -+ } -+ } catch (Throwable t) { -+ // ignore the exception. -+ } -+ } ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); + -+ private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { ++ // check output to contain the string "Concurrent RS threads times (s)" followed by ++ // the correct number of values in the next line. + -+ // checking fastinfoset handler, since this one is specific to SAAJ -+ CommandInfo[] commands = mailMap.getAllCommands("application/fastinfoset"); -+ if (commands == null || commands.length == 0) { -+ return false; -+ } ++ // a zero in refinement thread numbers indicates that the value in ParallelGCThreads should be used. ++ // Additionally use at least one thread. ++ int expectedNumRefinementThreads = refinementThreads == 0 ? workerThreads : refinementThreads; ++ expectedNumRefinementThreads = Math.max(1, expectedNumRefinementThreads); ++ // create the pattern made up of n copies of a floating point number pattern ++ String numberPattern = String.format("%0" + expectedNumRefinementThreads + "d", 0) ++ .replace("0", "\\s+\\d+\\.\\d+"); ++ String pattern = "Concurrent RS threads times \\(s\\)$" + numberPattern + "$"; ++ Matcher m = Pattern.compile(pattern, Pattern.MULTILINE).matcher(output.getStdout()); + -+ String saajClassName = "com.sun.xml.internal.ws.binding.FastInfosetDataContentHandler"; -+ for (CommandInfo command : commands) { -+ String commandClass = command.getCommandClass(); -+ if (saajClassName.equals(commandClass)) { -+ return true; -+ } -+ } -+ return false; ++ if (!m.find()) { ++ throw new Exception("Could not find correct output for concurrent RS threads times in stdout," + ++ " should match the pattern \"" + pattern + "\", but stdout is \n" + output.getStdout()); ++ } ++ output.shouldHaveExitValue(0); ++ } ++ ++ public static void main(String[] args) throws Exception { ++ if (!TestSummarizeRSetStatsTools.testingG1GC()) { ++ return; + } ++ // different valid combinations of number of refinement and gc worker threads ++ runTest(0, 0); ++ runTest(0, 5); ++ runTest(5, 0); ++ runTest(10, 10); ++ runTest(1, 2); ++ runTest(4, 3); ++ } +} -\ No newline at end of file ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,86 @@ +--- ./hotspot/test/gc/g1/TestSummarizeRSetStatsTools.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/gc/g1/TestSummarizeRSetStatsTools.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,154 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -17294,229 +23047,420 @@ + * questions. + */ + -+package com.sun.xml.internal.messaging.saaj.soap; ++/* ++ * Common helpers for TestSummarizeRSetStats* tests ++ */ + -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++import sun.management.ManagementFactoryHelper; ++import com.sun.management.HotSpotDiagnosticMXBean; ++import com.sun.management.VMOption; + -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { ++import com.oracle.java.testlibrary.*; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; ++import java.lang.Thread; ++import java.util.ArrayList; ++import java.util.Arrays; + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++class VerifySummaryOutput { ++ // 4M size, both are directly allocated into the old gen ++ static Object[] largeObject1 = new Object[1024 * 1024]; ++ static Object[] largeObject2 = new Object[1024 * 1024]; + -+ private WeakHashMap CACHE = new WeakHashMap(); ++ static int[] temp; + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); ++ public static void main(String[] args) { ++ // create some cross-references between these objects ++ for (int i = 0; i < largeObject1.length; i++) { ++ largeObject1[i] = largeObject2; ++ } ++ ++ for (int i = 0; i < largeObject2.length; i++) { ++ largeObject2[i] = largeObject1; ++ } ++ ++ int numGCs = Integer.parseInt(args[0]); ++ ++ if (numGCs > 0) { ++ // try to force a minor collection: the young gen is 4M, the ++ // amount of data allocated below is roughly that (4*1024*1024 + ++ // some header data) ++ for (int i = 0; i < 1024 ; i++) { ++ temp = new int[1024]; ++ } ++ } ++ ++ for (int i = 0; i < numGCs - 1; i++) { ++ System.gc(); + } -+ return instance; + } ++} + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); ++public class TestSummarizeRSetStatsTools { ++ ++ // the VM is currently run using G1GC, i.e. trying to test G1 functionality. ++ public static boolean testingG1GC() { ++ HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean(); ++ ++ VMOption option = diagnostic.getVMOption("UseG1GC"); ++ if (option.getValue().equals("false")) { ++ System.out.println("Skipping this test. It is only a G1 test."); ++ return false; ++ } ++ return true; + } + -+ protected abstract V initialValue() throws Exception; ++ public static String runTest(String[] additionalArgs, int numGCs) throws Exception { ++ ArrayList finalargs = new ArrayList(); ++ String[] defaultArgs = new String[] { ++ "-XX:+UseG1GC", ++ "-XX:+UseCompressedOops", ++ "-Xmn4m", ++ "-Xmx20m", ++ "-XX:InitiatingHeapOccupancyPercent=100", // we don't want the additional GCs due to initial marking ++ "-XX:+PrintGC", ++ "-XX:+UnlockDiagnosticVMOptions", ++ "-XX:G1HeapRegionSize=1M", ++ }; + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ finalargs.addAll(Arrays.asList(defaultArgs)); ++ ++ if (additionalArgs != null) { ++ finalargs.addAll(Arrays.asList(additionalArgs)); + } ++ ++ finalargs.add(VerifySummaryOutput.class.getName()); ++ finalargs.add(String.valueOf(numGCs)); ++ ++ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( ++ finalargs.toArray(new String[0])); ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); ++ ++ output.shouldHaveExitValue(0); ++ ++ String result = output.getStdout(); ++ return result; + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++ private static void checkCounts(int expected, int actual, String which) throws Exception { ++ if (expected != actual) { ++ throw new Exception("RSet summaries mention " + which + " regions an incorrect number of times. Expected " + expected + ", got " + actual); ++ } + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ public static void expectPerRegionRSetSummaries(String result, int expectedCumulative, int expectedPeriodic) throws Exception { ++ expectRSetSummaries(result, expectedCumulative, expectedPeriodic); ++ int actualYoung = result.split("Young regions").length - 1; ++ int actualHumonguous = result.split("Humonguous regions").length - 1; ++ int actualFree = result.split("Free regions").length - 1; ++ int actualOther = result.split("Old regions").length - 1; ++ ++ // the strings we check for above are printed four times per summary ++ int expectedPerRegionTypeInfo = (expectedCumulative + expectedPeriodic) * 4; ++ ++ checkCounts(expectedPerRegionTypeInfo, actualYoung, "Young"); ++ checkCounts(expectedPerRegionTypeInfo, actualHumonguous, "Humonguous"); ++ checkCounts(expectedPerRegionTypeInfo, actualFree, "Free"); ++ checkCounts(expectedPerRegionTypeInfo, actualOther, "Old"); ++ } ++ ++ public static void expectRSetSummaries(String result, int expectedCumulative, int expectedPeriodic) throws Exception { ++ int actualTotal = result.split("concurrent refinement").length - 1; ++ int actualCumulative = result.split("Cumulative RS summary").length - 1; ++ ++ if (expectedCumulative != actualCumulative) { ++ throw new Exception("Incorrect amount of RSet summaries at the end. Expected " + expectedCumulative + ", got " + actualCumulative); ++ } ++ ++ if (expectedPeriodic != (actualTotal - actualCumulative)) { ++ throw new Exception("Incorrect amount of per-period RSet summaries at the end. Expected " + expectedPeriodic + ", got " + (actualTotal - actualCumulative)); ++ } + } +} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +--- ./hotspot/test/runtime/6929067/Test6929067.sh 2013-09-06 11:22:19.000000000 -0700 ++++ ./hotspot/test/runtime/6929067/Test6929067.sh 2014-06-06 19:56:21.000000000 -0700 +@@ -3,6 +3,7 @@ + ## + ## @test Test6929067.sh + ## @bug 6929067 ++## @bug 8021296 + ## @summary Stack guard pages should be removed when thread is detached + ## @compile T.java + ## @run shell Test6929067.sh +@@ -21,6 +22,11 @@ + OS=`uname -s` + case "$OS" in + Linux) ++ gcc_cmd=`which gcc` ++ if [ "x$gcc_cmd" == "x" ]; then ++ echo "WARNING: gcc not found. Cannot execute test." 2>&1 ++ exit 0; ++ fi + NULL=/dev/null + PS=":" + FS="/" +@@ -119,10 +125,10 @@ + # Check to ensure you have a /usr/lib/libpthread.so if you don't please look + # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. + +-gcc -DLINUX ${COMP_FLAG} -o invoke \ +- -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ +- -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \ +- -ljvm -lpthread invoke.c ++$gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \ ++ -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ ++ -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \ ++ -ljvm -lpthread invoke.c + + ./invoke + exit $? +--- ./hotspot/test/runtime/7107135/Test7107135.sh 2013-09-06 11:22:19.000000000 -0700 ++++ ./hotspot/test/runtime/7107135/Test7107135.sh 2014-06-06 19:56:21.000000000 -0700 +@@ -27,6 +27,7 @@ + ## + ## @test Test7107135.sh + ## @bug 7107135 ++## @bug 8021296 + ## @summary Stack guard pages lost after loading library with executable stack. + ## @run shell Test7107135.sh + ## +@@ -45,6 +46,11 @@ + case "$OS" in + Linux) + echo "Testing on Linux" ++ gcc_cmd=`which gcc` ++ if [ "x$gcc_cmd" == "x" ]; then ++ echo "WARNING: gcc not found. Cannot execute test." 2>&1 ++ exit 0; ++ fi + ;; + *) + NULL=NUL +@@ -62,7 +68,10 @@ + cp ${TESTSRC}${FS}*.java ${THIS_DIR} + ${TESTJAVA}${FS}bin${FS}javac *.java + +-gcc -fPIC -shared -c -o test.o -I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux ${TESTSRC}${FS}test.c ++$gcc_cmd -fPIC -shared -c -o test.o \ ++ -I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \ ++ ${TESTSRC}${FS}test.c ++ + ld -shared -z execstack -o libtest-rwx.so test.o + ld -shared -z noexecstack -o libtest-rw.so test.o + +--- ./hotspot/test/runtime/7110720/Test7110720.sh 2013-09-06 11:22:20.000000000 -0700 ++++ ./hotspot/test/runtime/7110720/Test7110720.sh 2014-06-06 19:56:22.000000000 -0700 +@@ -28,7 +28,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | Darwin | *BSD ) + FS="/" + RM=/bin/rm + CP=/bin/cp +--- ./hotspot/test/runtime/7158800/Test7158800.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/runtime/7158800/Test7158800.sh 2014-06-06 19:56:22.000000000 -0700 +@@ -0,0 +1,91 @@ ++#!/bin/sh ++# ++# 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. ++# +# -+# 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. ++# Run test for InternTest.java +# -+# 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). ++ ++if [ "${TESTSRC}" = "" ] ++then TESTSRC=. ++fi ++ ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ echo "TESTJAVA not set, selecting " ${TESTJAVA} ++ echo "If this is incorrect, try setting the variable manually." ++fi ++ ++if [ "${TESTCLASSES}" = "" ] ++then ++ echo "TESTCLASSES not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++# set platform-dependent variables ++OS=`uname -s` ++case "$OS" in ++ SunOS | Linux | *BSD ) ++ NULL=/dev/null ++ PS=":" ++ FS="/" ++ ;; ++ Windows_* ) ++ NULL=NUL ++ PS=";" ++ FS="\\" ++ ;; ++ * ) ++ echo "Unrecognized system!" ++ exit 1; ++ ;; ++esac ++ ++JEMMYPATH=${CPAPPEND} ++CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH ++ ++THIS_DIR=`pwd` ++ ++${TESTJAVA}${FS}bin${FS}java -fullversion ++ ++${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}InternTest.java ++ ++cp ${TESTSRC}${FS}badstrings.txt . ++ ++${TESTJAVA}${FS}bin${FS}java -XX:+PrintStringTableStatistics -XX:+TraceSafepointCleanupTime InternTest bad > test.out 2>&1 & ++C_PID=$! ++ ++sleep 60 ++ ++ps | grep ${C_PID} | grep -v grep ++ ++if [ $? = 0 ] ++then ++ kill -9 ${C_PID} ++ echo "Test Failed" ++ exit 1 ++else ++ echo "Test Passed" ++ exit 0 ++fi +--- ./hotspot/test/runtime/jsig/Test8017498.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/runtime/jsig/Test8017498.sh 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,94 @@ ++#!/bin/sh ++ +# -+# 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. ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# -+# 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. ++# 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. +# -+# Error messages for StaticCache utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java 2013-09-06 11:24:01.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * 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,14 @@ - - package com.sun.xml.internal.messaging.saaj.soap; - --import java.util.logging.Logger; -+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; -+import com.sun.xml.internal.messaging.saaj.util.JAXMStreamSource; -+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; -+import com.sun.xml.internal.messaging.saaj.util.ParserPool; -+import com.sun.xml.internal.messaging.saaj.util.RejectDoctypeSaxFilter; -+import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer; -+import org.xml.sax.InputSource; -+import org.xml.sax.XMLReader; - - import javax.xml.parsers.SAXParser; - import javax.xml.soap.SOAPException; -@@ -34,14 +41,7 @@ - import javax.xml.transform.dom.DOMResult; - import javax.xml.transform.sax.SAXSource; - import javax.xml.transform.stream.StreamSource; -- --import org.xml.sax.InputSource; --import org.xml.sax.XMLReader; -- --import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; --import com.sun.xml.internal.messaging.saaj.util.*; -- --import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer; -+import java.util.logging.Logger; - - /** - * EnvelopeFactory creates SOAP Envelope objects using different -@@ -50,14 +50,19 @@ - public class EnvelopeFactory { - - protected static final Logger -- log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, -- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); -+ log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, -+ "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); - -- private static ParserPool parserPool = new ParserPool(5); -+ private static ContextClassloaderLocal parserPool = -+ new ContextClassloaderLocal() { -+ @Override -+ protected ParserPool initialValue() throws Exception { -+ return new ParserPool(5); -+ } -+ }; - - public static Envelope createEnvelope(Source src, SOAPPartImpl soapPart) -- throws SOAPException -- { -+ throws SOAPException { - // Insert SAX filter to disallow Document Type Declarations since - // they are not legal in SOAP - SAXParser saxParser = null; -@@ -73,15 +78,15 @@ - } - } - try { -- saxParser = parserPool.get(); -+ saxParser = parserPool.get().get(); - } catch (Exception e) { - log.severe("SAAJ0601.util.newSAXParser.exception"); - throw new SOAPExceptionImpl( -- "Couldn't get a SAX parser while constructing a envelope", -- e); -+ "Couldn't get a SAX parser while constructing a envelope", -+ e); - } - InputSource is = SAXSource.sourceToInputSource(src); -- if (is.getEncoding()== null && soapPart.getSourceCharsetEncoding() != null) { -+ if (is.getEncoding() == null && soapPart.getSourceCharsetEncoding() != null) { - is.setEncoding(soapPart.getSourceCharsetEncoding()); - } - XMLReader rejectFilter; -@@ -90,15 +95,15 @@ - } catch (Exception ex) { - log.severe("SAAJ0510.soap.cannot.create.envelope"); - throw new SOAPExceptionImpl( -- "Unable to create envelope from given source: ", -- ex); -+ "Unable to create envelope from given source: ", -+ ex); - } - src = new SAXSource(rejectFilter, is); - } - - try { - Transformer transformer = -- EfficientStreamingTransformer.newTransformer(); -+ EfficientStreamingTransformer.newTransformer(); - DOMResult result = new DOMResult(soapPart); - transformer.transform(src, result); - -@@ -110,11 +115,11 @@ - } - log.severe("SAAJ0511.soap.cannot.create.envelope"); - throw new SOAPExceptionImpl( -- "Unable to create envelope from given source: ", -- ex); -+ "Unable to create envelope from given source: ", -+ ex); - } finally { - if (saxParser != null) { -- parserPool.returnParser(saxParser); -+ parserPool.get().returnParser(saxParser); - } - } - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,86 @@ ++## ++## @test Test8017498.sh ++## @bug 8017498 ++## @bug 8020791 ++## @bug 8021296 ++## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX ++## @run shell/timeout=30 Test8017498.sh ++## ++ ++if [ "${TESTSRC}" = "" ] ++then ++ TESTSRC=${PWD} ++ echo "TESTSRC not set. Using "${TESTSRC}" as default" ++fi ++echo "TESTSRC=${TESTSRC}" ++## Adding common setup Variables for running shell tests. ++. ${TESTSRC}/../../test_env.sh ++ ++# set platform-dependent variables ++OS=`uname -s` ++case "$OS" in ++ Linux) ++ echo "Testing on Linux" ++ gcc_cmd=`which gcc` ++ if [ "x$gcc_cmd" == "x" ]; then ++ echo "WARNING: gcc not found. Cannot execute test." 2>&1 ++ exit 0; ++ fi ++ if [ "$VM_BITS" = "64" ] ++ then ++ MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so ++ else ++ MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so ++ fi ++ echo MY_LD_PRELOAD = ${MY_LD_PRELOAD} ++ ;; ++ *) ++ echo "Test passed; only valid for Linux" ++ exit 0; ++ ;; ++esac ++ ++THIS_DIR=. ++ ++cp ${TESTSRC}${FS}*.java ${THIS_DIR} ++${TESTJAVA}${FS}bin${FS}javac *.java ++ ++$gcc_cmd -DLINUX -fPIC -shared \ ++ -o ${TESTSRC}${FS}libTestJNI.so \ ++ -I${TESTJAVA}${FS}include \ ++ -I${TESTJAVA}${FS}include${FS}linux \ ++ ${TESTSRC}${FS}TestJNI.c ++ ++# run the java test in the background ++cmd="LD_PRELOAD=$MY_LD_PRELOAD \ ++ ${TESTJAVA}${FS}bin${FS}java \ ++ -Djava.library.path=${TESTSRC}${FS} -server TestJNI 100" ++echo "$cmd > test.out 2>&1" ++eval $cmd > test.out 2>&1 ++ ++grep "old handler" test.out > ${NULL} ++if [ $? = 0 ] ++then ++ echo "Test Passed" ++ exit 0 ++fi ++ ++echo "Test Failed" ++exit 1 +--- ./hotspot/test/runtime/jsig/TestJNI.c 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/runtime/jsig/TestJNI.c 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,55 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -17533,159 +23477,48 @@ + * questions. + */ + -+package com.sun.xml.internal.stream.buffer; -+ -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; -+ -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { -+ -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; -+ -+ private WeakHashMap CACHE = new WeakHashMap(); ++#include ++#include ++#include ++#include + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); -+ } -+ return instance; -+ } ++#ifdef __cplusplus ++extern "C" { ++#endif + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); -+ } ++void sig_handler(int sig, siginfo_t *info, ucontext_t *context) { + -+ protected abstract V initialValue() throws Exception; ++ printf( " HANDLER (1) " ); ++} + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); -+ } -+ } ++JNIEXPORT void JNICALL Java_TestJNI_doSomething(JNIEnv *env, jclass klass, jint val) { ++ struct sigaction act; ++ struct sigaction oact; + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); -+ } ++ act.sa_flags = SA_ONSTACK|SA_RESTART|SA_SIGINFO; ++ sigfillset(&act.sa_mask); ++ act.sa_handler = SIG_DFL; ++ act.sa_sigaction = (void (*)())sig_handler; ++ sigaction(0x20+val, &act, &oact); + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); -+ } ++ printf( " doSomething(%d) " , val); ++ printf( " old handler = %p " , oact.sa_handler); +} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties 2014-04-20 12:39:38.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++#ifdef __cplusplus ++} ++#endif + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java 2013-09-06 11:24:03.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java 2014-04-20 12:39:38.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -370,7 +370,12 @@ - writeTo(handler, errorHandler, isFragment()); - } - -- private static final TransformerFactory trnsformerFactory = TransformerFactory.newInstance(); -+ private static final ContextClassloaderLocal trnsformerFactory = new ContextClassloaderLocal() { -+ @Override -+ protected TransformerFactory initialValue() throws Exception { -+ return TransformerFactory.newInstance(); -+ } -+ }; - - /** - * Writes out the contents of this buffer as DOM node and append that to the given node. -@@ -382,7 +387,7 @@ - */ - public final Node writeTo(Node n) throws XMLStreamBufferException { - try { -- Transformer t = trnsformerFactory.newTransformer(); -+ Transformer t = trnsformerFactory.get().newTransformer(); - t.transform(new XMLStreamBufferSource(this), new DOMResult(n)); - return n.getLastChild(); - } catch (TransformerException e) { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java 2013-09-06 11:24:04.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -232,7 +232,7 @@ - public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException { - T t = resolve(p); - try { -- return m.invoke(t, args ); -+ return MethodUtil.invoke(t, m, args ); - } finally { - postInvoke(p,t); - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,94 @@ +--- ./hotspot/test/runtime/jsig/TestJNI.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/runtime/jsig/TestJNI.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -17702,87 +23535,35 @@ + * questions. + */ + -+package com.sun.xml.internal.ws.api.server; -+ -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.util.logging.Level; -+import java.util.logging.Logger; -+ -+/** -+ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks -+ * to java.lang,reflect.Method.invoke() -+ * -+ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! -+ */ -+class MethodUtil { -+ -+ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); -+ private static final Method INVOKE_METHOD; -+ ++public class TestJNI { + static { -+ Method method; -+ try { -+ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); -+ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); -+ } -+ } catch (Throwable t) { -+ method = null; -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); -+ } -+ } -+ INVOKE_METHOD = method; ++ System.loadLibrary("TestJNI"); + } -+ -+ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { -+ if (INVOKE_METHOD != null) { -+ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); -+ } ++ public static native void doSomething(int val); ++ public static void main(String[] args) { ++ int intArg = 43; ++ if (args.length > 0) { + try { -+ return INVOKE_METHOD.invoke(null, method, target, args); -+ } catch (InvocationTargetException ite) { -+ // unwrap invocation exception added by reflection code ... -+ throw unwrapException(ite); -+ } -+ } else { -+ // other then Oracle JDK ... -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); -+ } -+ return method.invoke(target, args); -+ } -+ } -+ -+ private static InvocationTargetException unwrapException(InvocationTargetException ite) { -+ Throwable targetException = ite.getTargetException(); -+ if (targetException != null && targetException instanceof InvocationTargetException) { -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); ++ intArg = Integer.parseInt(args[0]); ++ } catch (NumberFormatException e) { ++ System.err.println("arg " + args[0] + " must be an integer"); ++ System.exit(1); + } -+ return (InvocationTargetException) targetException; -+ } else { -+ return ite; + } ++ TestJNI.doSomething(intArg); + } -+ +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,86 @@ ++ +--- ./hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,389 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -17799,366 +23580,407 @@ + * questions. + */ + -+package com.sun.xml.internal.ws.api.streaming; ++/* @test TestLargePagesFlags ++ * @summary Tests how large pages are choosen depending on the given large pages flag combinations. ++ * @library /testlibrary ++ * @run main TestLargePagesFlags ++ */ + -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++import com.oracle.java.testlibrary.OutputAnalyzer; ++import com.oracle.java.testlibrary.Platform; ++import com.oracle.java.testlibrary.ProcessTools; ++import java.util.ArrayList; + -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { ++public class TestLargePagesFlags { + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ public static void main(String [] args) throws Exception { ++ if (!Platform.isLinux()) { ++ System.out.println("Skipping. TestLargePagesFlags has only been implemented for Linux."); ++ return; ++ } + -+ private WeakHashMap CACHE = new WeakHashMap(); ++ testUseTransparentHugePages(); ++ testUseHugeTLBFS(); ++ testUseSHM(); ++ testCombinations(); ++ } + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); -+ } -+ return instance; ++ public static void testUseTransparentHugePages() throws Exception { ++ if (!canUse(UseTransparentHugePages(true))) { ++ System.out.println("Skipping testUseTransparentHugePages"); ++ return; + } + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); ++ // -XX:-UseLargePages overrides all other flags. ++ new FlagTester() ++ .use(UseLargePages(false), ++ UseTransparentHugePages(true)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Explicitly turn on UseTransparentHugePages. ++ new FlagTester() ++ .use(UseTransparentHugePages(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(true), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseTransparentHugePages(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(true), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Setting a specific large pages flag will turn ++ // off heuristics to choose large pages type. ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseTransparentHugePages(false)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Don't turn on UseTransparentHugePages ++ // unless the user explicitly asks for them. ++ new FlagTester() ++ .use(UseLargePages(true)) ++ .expect( ++ UseTransparentHugePages(false)); ++ } ++ ++ public static void testUseHugeTLBFS() throws Exception { ++ if (!canUse(UseHugeTLBFS(true))) { ++ System.out.println("Skipping testUseHugeTLBFS"); ++ return; + } + -+ protected abstract V initialValue() throws Exception; ++ // -XX:-UseLargePages overrides all other flags. ++ new FlagTester() ++ .use(UseLargePages(false), ++ UseHugeTLBFS(true)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Explicitly turn on UseHugeTLBFS. ++ new FlagTester() ++ .use(UseHugeTLBFS(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(true), ++ UseSHM(false)); ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseHugeTLBFS(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(true), ++ UseSHM(false)); ++ ++ // Setting a specific large pages flag will turn ++ // off heuristics to choose large pages type. ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseHugeTLBFS(false)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Using UseLargePages will default to UseHugeTLBFS large pages. ++ new FlagTester() ++ .use(UseLargePages(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(true), ++ UseSHM(false)); ++ } + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); -+ } ++ public static void testUseSHM() throws Exception { ++ if (!canUse(UseSHM(true))) { ++ System.out.println("Skipping testUseSHM"); ++ return; + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++ // -XX:-UseLargePages overrides all other flags. ++ new FlagTester() ++ .use(UseLargePages(false), ++ UseSHM(true)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Explicitly turn on UseSHM. ++ new FlagTester() ++ .use(UseSHM(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(true)) ; ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseSHM(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(true)) ; ++ ++ // Setting a specific large pages flag will turn ++ // off heuristics to choose large pages type. ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseSHM(false)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ // Setting UseLargePages can allow the system to choose ++ // UseHugeTLBFS instead of UseSHM, but never UseTransparentHugePages. ++ new FlagTester() ++ .use(UseLargePages(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false)); ++ } ++ ++ public static void testCombinations() throws Exception { ++ if (!canUse(UseSHM(true)) || !canUse(UseHugeTLBFS(true))) { ++ System.out.println("Skipping testUseHugeTLBFSAndUseSHMCombination"); ++ return; + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ // UseHugeTLBFS takes precedence over SHM. ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseHugeTLBFS(true), ++ UseSHM(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(true), ++ UseSHM(false)); ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseHugeTLBFS(false), ++ UseSHM(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(true)); ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseHugeTLBFS(true), ++ UseSHM(false)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(true), ++ UseSHM(false)); ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseHugeTLBFS(false), ++ UseSHM(false)) ++ .expect( ++ UseLargePages(false), ++ UseTransparentHugePages(false), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ ++ if (!canUse(UseTransparentHugePages(true))) { ++ return; + } -+} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ // UseTransparentHugePages takes precedence. ++ ++ new FlagTester() ++ .use(UseLargePages(true), ++ UseTransparentHugePages(true), ++ UseHugeTLBFS(true), ++ UseSHM(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(true), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ ++ new FlagTester() ++ .use(UseTransparentHugePages(true), ++ UseHugeTLBFS(true), ++ UseSHM(true)) ++ .expect( ++ UseLargePages(true), ++ UseTransparentHugePages(true), ++ UseHugeTLBFS(false), ++ UseSHM(false)); ++ } + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java 2013-09-06 11:24:04.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -61,29 +61,32 @@ - /** - * Singleton instance. - */ -- private static volatile @NotNull XMLStreamReaderFactory theInstance; -+ private static volatile ContextClassloaderLocal streamReader = -+ new ContextClassloaderLocal() { - -- static { -- XMLInputFactory xif = getXMLInputFactory(); -- XMLStreamReaderFactory f=null; -+ @Override -+ protected XMLStreamReaderFactory initialValue() { -+ XMLInputFactory xif = getXMLInputFactory(); -+ XMLStreamReaderFactory f=null; - -- // this system property can be used to disable the pooling altogether, -- // in case someone hits an issue with pooling in the production system. -- if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) -- f = Zephyr.newInstance(xif); -+ // this system property can be used to disable the pooling altogether, -+ // in case someone hits an issue with pooling in the production system. -+ if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) -+ f = Zephyr.newInstance(xif); - -- if(f==null) { -- // is this Woodstox? -- if(xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) -- f = new Woodstox(xif); -- } -+ if(f==null) { -+ // is this Woodstox? -+ if(xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) -+ f = new Woodstox(xif); -+ } - -- if(f==null) -- f = new Default(); -+ if(f==null) -+ f = new Default(); - -- theInstance = f; -- LOGGER.fine("XMLStreamReaderFactory instance is = "+theInstance); -- } -+ LOGGER.fine("XMLStreamReaderFactory instance is = "+f); -+ return f; ++ private static class FlagTester { ++ private Flag [] useFlags; ++ ++ public FlagTester use(Flag... useFlags) { ++ this.useFlags = useFlags; ++ return this; ++ } ++ ++ public void expect(Flag... expectedFlags) throws Exception { ++ if (useFlags == null) { ++ throw new IllegalStateException("Must run use() before expect()"); ++ } ++ ++ OutputAnalyzer output = executeNewJVM(useFlags); ++ ++ for (Flag flag : expectedFlags) { ++ System.out.println("Looking for: " + flag.flagString()); ++ String strValue = output.firstMatch(".* " + flag.name() + " .* :?= (\\S+).*", 1); ++ ++ if (strValue == null) { ++ throw new RuntimeException("Flag " + flag.name() + " couldn't be found"); + } -+ }; - - private static XMLInputFactory getXMLInputFactory() { - XMLInputFactory xif = null; -@@ -109,11 +112,11 @@ - */ - public static void set(XMLStreamReaderFactory f) { - if(f==null) throw new IllegalArgumentException(); -- theInstance = f; -+ streamReader.set(f); - } - - public static XMLStreamReaderFactory get() { -- return theInstance; -+ return streamReader.get(); - } - - public static XMLStreamReader create(InputSource source, boolean rejectDTDs) { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java 2013-09-06 11:24:04.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -57,39 +57,41 @@ - /** - * Singleton instance. - */ -- private static volatile @NotNull XMLStreamWriterFactory theInstance; -+ private static volatile ContextClassloaderLocal writerFactory = -+ new ContextClassloaderLocal() { - -- -- static { -- XMLOutputFactory xof = null; -- if (Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".woodstox")) { -- try { -- xof = (XMLOutputFactory)Class.forName("com.ctc.wstx.stax.WstxOutputFactory").newInstance(); -- } catch (Exception e) { -- // Ignore and fallback to default XMLOutputFactory -+ @Override -+ protected XMLStreamWriterFactory initialValue() { -+ XMLOutputFactory xof = null; -+ if (Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".woodstox")) { -+ try { -+ xof = (XMLOutputFactory)Class.forName("com.ctc.wstx.stax.WstxOutputFactory").newInstance(); -+ } catch (Exception e) { -+ // Ignore and fallback to default XMLOutputFactory -+ } -+ } -+ if (xof == null) { -+ xof = XMLOutputFactory.newInstance(); - } -- } -- if (xof == null) { -- xof = XMLOutputFactory.newInstance(); -- } - -- XMLStreamWriterFactory f=null; -+ XMLStreamWriterFactory f=null; - -- // this system property can be used to disable the pooling altogether, -- // in case someone hits an issue with pooling in the production system. -- if(!Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".noPool")) -- f = Zephyr.newInstance(xof); -- if(f==null) { -- // is this Woodstox? -- if(xof.getClass().getName().equals("com.ctc.wstx.stax.WstxOutputFactory")) -- f = new NoLock(xof); -- } -- if (f == null) -- f = new Default(xof); -+ // this system property can be used to disable the pooling altogether, -+ // in case someone hits an issue with pooling in the production system. -+ if(!Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".noPool")) -+ f = Zephyr.newInstance(xof); -+ if(f==null) { -+ // is this Woodstox? -+ if(xof.getClass().getName().equals("com.ctc.wstx.stax.WstxOutputFactory")) -+ f = new NoLock(xof); -+ } -+ if (f == null) -+ f = new Default(xof); - -- theInstance = f; -- LOGGER.fine("XMLStreamWriterFactory instance is = "+theInstance); -- } -+ LOGGER.fine("XMLStreamWriterFactory instance is = "+ f); -+ return f; ++ ++ if (!flag.value().equals(strValue)) { ++ throw new RuntimeException("Wrong value for: " + flag.name() ++ + " expected: " + flag.value() ++ + " got: " + strValue); + } -+ }; - - /** - * See {@link #create(OutputStream)} for the contract. -@@ -152,7 +154,7 @@ - * Gets the singleton instance. - */ - public static @NotNull XMLStreamWriterFactory get() { -- return theInstance; -+ return writerFactory.get(); - } - - /** -@@ -164,7 +166,7 @@ - */ - public static void set(@NotNull XMLStreamWriterFactory f) { - if(f==null) throw new IllegalArgumentException(); -- theInstance = f; -+ writerFactory.set(f); - } - - /** ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java 2013-09-06 11:24:04.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,9 @@ - import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; - import com.sun.xml.internal.ws.developer.BindingTypeFeature; - -+import javax.activation.CommandInfo; -+import javax.activation.CommandMap; -+import javax.activation.MailcapCommandMap; - import javax.xml.ws.Service; - import javax.xml.ws.WebServiceFeature; - import javax.xml.ws.soap.AddressingFeature; -@@ -109,9 +112,15 @@ - return addressingVersion; - } - -- public final - @NotNull -- Codec createCodec() { -+ public final Codec createCodec() { ++ } + -+ // initialization from here should cover most of cases; -+ // if not, it would be necessary to call -+ // BindingImpl.initializeJavaActivationHandlers() -+ // explicitly by programmer -+ initializeJavaActivationHandlers(); ++ output.shouldHaveExitValue(0); ++ } ++ } + - return bindingId.createEncoder(this); - } - -@@ -169,4 +178,48 @@ - public void addFeature(@NotNull WebServiceFeature newFeature) { - features.add(newFeature); - } ++ private static OutputAnalyzer executeNewJVM(Flag... flags) throws Exception { ++ ArrayList args = new ArrayList<>(); ++ for (Flag flag : flags) { ++ args.add(flag.flagString()); ++ } ++ args.add("-XX:+PrintFlagsFinal"); ++ args.add("-version"); + -+ public static void initializeJavaActivationHandlers() { -+ // DataHandler.writeTo() may search for DCH. So adding some default ones. -+ try { -+ CommandMap map = CommandMap.getDefaultCommandMap(); -+ if (map instanceof MailcapCommandMap) { -+ MailcapCommandMap mailMap = (MailcapCommandMap) map; ++ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args.toArray(new String[args.size()])); ++ OutputAnalyzer output = new OutputAnalyzer(pb.start()); + -+ // registering our DCH since javamail's DCH doesn't handle -+ if (!cmdMapInitialized(mailMap)) { -+ mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.ws.encoding.XmlDataContentHandler"); -+ mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.ws.encoding.XmlDataContentHandler"); -+ mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.ws.encoding.ImageDataContentHandler"); -+ mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.ws.encoding.StringDataContentHandler"); -+ } -+ } -+ } catch (Throwable t) { -+ // ignore the exception. -+ } ++ return output; ++ } ++ ++ private static boolean canUse(Flag flag) { ++ try { ++ new FlagTester().use(flag).expect(flag); ++ } catch (Exception e) { ++ return false; + } + -+ private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { -+ CommandInfo[] commands = mailMap.getAllCommands("text/xml"); -+ if (commands == null || commands.length == 0) { -+ return false; -+ } ++ return true; ++ } + -+ // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; -+ // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers -+ // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here -+ // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. -+ // This is also reason for duplication of Handler's code by JAX-WS -+ String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; -+ String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; -+ for (CommandInfo command : commands) { -+ String commandClass = command.getCommandClass(); -+ if (saajClassName.equals(commandClass) || -+ jaxwsClassName.equals(commandClass)) { -+ return true; -+ } -+ } -+ return false; ++ private static Flag UseLargePages(boolean value) { ++ return new BooleanFlag("UseLargePages", value); ++ } ++ ++ private static Flag UseTransparentHugePages(boolean value) { ++ return new BooleanFlag("UseTransparentHugePages", value); ++ } ++ ++ private static Flag UseHugeTLBFS(boolean value) { ++ return new BooleanFlag("UseHugeTLBFS", value); ++ } ++ ++ private static Flag UseSHM(boolean value) { ++ return new BooleanFlag("UseSHM", value); ++ } ++ ++ private static class BooleanFlag implements Flag { ++ private String name; ++ private boolean value; ++ ++ BooleanFlag(String name, boolean value) { ++ this.name = name; ++ this.value = value; ++ } ++ ++ public String flagString() { ++ return "-XX:" + (value ? "+" : "-") + name; ++ } ++ ++ public String name() { ++ return name; ++ } ++ ++ public String value() { ++ return Boolean.toString(value); ++ } ++ } ++ ++ private static interface Flag { ++ public String flagString(); ++ public String name(); ++ public String value(); ++ } ++} +--- ./hotspot/test/testlibrary/OutputAnalyzerTest.java 2013-09-06 11:22:20.000000000 -0700 ++++ ./hotspot/test/testlibrary/OutputAnalyzerTest.java 2014-06-06 19:56:21.000000000 -0700 +@@ -172,5 +172,22 @@ + } catch (RuntimeException e) { + // expected + } ++ ++ { ++ String aaaa = "aaaa"; ++ String result = output.firstMatch(aaaa); ++ if (!aaaa.equals(result)) { ++ throw new Exception("firstMatch(String) faild to match. Expected: " + aaaa + " got: " + result); ++ } + } + ++ { ++ String aa = "aa"; ++ String aa_grouped_aa = aa + "(" + aa + ")"; ++ String result = output.firstMatch(aa_grouped_aa, 1); ++ if (!aa.equals(result)) { ++ throw new Exception("firstMatch(String, int) failed to match. Expected: " + aa + " got: " + result); ++ } ++ } + } } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,94 @@ +--- ./hotspot/test/testlibrary/com/oracle/java/testlibrary/DynamicVMOptionChecker.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/testlibrary/com/oracle/java/testlibrary/DynamicVMOptionChecker.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,111 @@ +/* -+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -18174,164 +23996,147 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ ++package com.oracle.java.testlibrary; + -+package com.sun.xml.internal.ws.client.sei; -+ -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++import com.sun.management.HotSpotDiagnosticMXBean; ++import com.sun.management.VMOption; ++import java.lang.management.ManagementFactory; + +/** -+ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks -+ * to java.lang,reflect.Method.invoke() -+ *

-+ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! ++ * Simple class to check writeability, invalid and valid values for VMOption + */ -+class MethodUtil { ++public class DynamicVMOptionChecker { + -+ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); -+ private static final Method INVOKE_METHOD; ++ /** ++ * Reads VM option from PlatformMXBean and parse it to integer value ++ * ++ * @param name of option ++ * @return parsed value ++ */ ++ public static int getIntValue(String name) { + -+ static { -+ Method method; -+ try { -+ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); -+ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); -+ } -+ } catch (Throwable t) { -+ method = null; -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); -+ } ++ VMOption option = ManagementFactory. ++ getPlatformMXBean(HotSpotDiagnosticMXBean.class). ++ getVMOption(name); ++ ++ return Integer.parseInt(option.getValue()); ++ } ++ ++ /** ++ * Checks that VM option is dynamically writable ++ * ++ * @param name ++ * @throws RuntimeException if option if not writable ++ * @return always true ++ */ ++ public static boolean checkIsWritable(String name) { ++ VMOption option = ManagementFactory. ++ getPlatformMXBean(HotSpotDiagnosticMXBean.class). ++ getVMOption(name); ++ ++ if (!option.isWriteable()) { ++ throw new RuntimeException(name + " is not writable"); + } -+ INVOKE_METHOD = method; ++ ++ return true; + } + -+ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { -+ if (INVOKE_METHOD != null) { -+ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); -+ } -+ try { -+ return INVOKE_METHOD.invoke(null, method, target, args); -+ } catch (InvocationTargetException ite) { -+ // unwrap invocation exception added by reflection code ... -+ throw unwrapException(ite); -+ } -+ } else { -+ // other then Oracle JDK ... -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); -+ } -+ return method.invoke(target, args); ++ /** ++ * Checks that value cannot be set ++ * ++ * @param name of flag ++ * @param value string representation of value to set ++ * @throws RuntimeException on error - when expected exception hasn't been thrown ++ */ ++ public static void checkInvalidValue(String name, String value) { ++ // should throw ++ try { ++ ManagementFactory. ++ getPlatformMXBean(HotSpotDiagnosticMXBean.class). ++ setVMOption(name, value); ++ ++ } catch (IllegalArgumentException e) { ++ return; + } ++ ++ throw new RuntimeException("Expected IllegalArgumentException was not thrown, " + name + "= " + value); + } + -+ private static InvocationTargetException unwrapException(InvocationTargetException ite) { -+ Throwable targetException = ite.getTargetException(); -+ if (targetException != null && targetException instanceof InvocationTargetException) { -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); -+ } -+ return (InvocationTargetException) targetException; -+ } else { -+ return ite; ++ /** ++ * Checks that value can be set ++ * ++ * @param name of flag to set ++ * @param value string representation of value to set ++ * @throws RuntimeException on error - when value in VM is not equal to origin ++ */ ++ public static void checkValidValue(String name, String value) { ++ ManagementFactory. ++ getPlatformMXBean(HotSpotDiagnosticMXBean.class). ++ setVMOption(name, value); ++ ++ VMOption option = ManagementFactory. ++ getPlatformMXBean(HotSpotDiagnosticMXBean.class). ++ getVMOption(name); ++ ++ if (!option.getValue().equals(value)) { ++ throw new RuntimeException("Actual value of " + name + " \"" + option.getValue() ++ + "\" not equal origin \"" + value + "\""); + } + } + +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java 2013-09-06 11:24:05.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,17 +28,20 @@ - import com.sun.istack.internal.NotNull; - import com.sun.istack.internal.Nullable; - import com.sun.xml.internal.ws.api.SOAPVersion; --import com.sun.xml.internal.ws.api.client.WSPortInfo; - import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; -+import com.sun.xml.internal.ws.api.client.WSPortInfo; - import com.sun.xml.internal.ws.api.message.Header; - import com.sun.xml.internal.ws.api.message.Headers; - import com.sun.xml.internal.ws.api.message.Packet; - import com.sun.xml.internal.ws.api.model.MEP; - import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; --import com.sun.xml.internal.ws.api.pipe.Tube; - import com.sun.xml.internal.ws.api.pipe.Fiber; -+import com.sun.xml.internal.ws.api.pipe.Tube; - import com.sun.xml.internal.ws.binding.BindingImpl; --import com.sun.xml.internal.ws.client.*; -+import com.sun.xml.internal.ws.client.RequestContext; -+import com.sun.xml.internal.ws.client.ResponseContextReceiver; -+import com.sun.xml.internal.ws.client.Stub; -+import com.sun.xml.internal.ws.client.WSServiceDelegate; - import com.sun.xml.internal.ws.model.JavaMethodImpl; - import com.sun.xml.internal.ws.model.SOAPSEIModel; - import com.sun.xml.internal.ws.wsdl.OperationDispatcher; -@@ -47,6 +50,8 @@ - import java.lang.reflect.InvocationHandler; - import java.lang.reflect.InvocationTargetException; - import java.lang.reflect.Method; -+import java.lang.reflect.Modifier; -+import java.lang.reflect.Proxy; - import java.util.HashMap; - import java.util.Map; - -@@ -124,13 +129,14 @@ - private final Map methodHandlers = new HashMap(); - - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { -+ validateInputs(proxy, method); - MethodHandler handler = methodHandlers.get(method); - if (handler != null) { - return handler.invoke(proxy, args); - } else { - // we handle the other method invocations by ourselves - try { -- return method.invoke(this, args); -+ return MethodUtil.invoke(this, method, args); - } catch (IllegalAccessException e) { - // impossible - throw new AssertionError(e); -@@ -142,6 +148,17 @@ - } - } +--- ./hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java 2013-09-06 11:22:20.000000000 -0700 ++++ ./hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java 2014-06-06 19:56:21.000000000 -0700 +@@ -241,7 +241,38 @@ + } -+ private void validateInputs(Object proxy, Method method) { -+ if (proxy == null || !Proxy.isProxyClass(proxy.getClass())) { -+ throw new IllegalStateException("Passed object is not proxy!"); -+ } -+ Class declaringClass = method.getDeclaringClass(); -+ if (method == null || declaringClass == null -+ || Modifier.isStatic(method.getModifiers())) { -+ throw new IllegalStateException("Invoking static method is not allowed!"); -+ } + /** +- * Verifiy the exit value of the process ++ * Get the captured group of the first string matching the pattern. ++ * stderr is searched before stdout. ++ * ++ * @param pattern The multi-line pattern to match ++ * @param group The group to capture ++ * @return The matched string or null if no match was found ++ */ ++ public String firstMatch(String pattern, int group) { ++ Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr); ++ Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); ++ if (stderrMatcher.find()) { ++ return stderrMatcher.group(group); ++ } ++ if (stdoutMatcher.find()) { ++ return stdoutMatcher.group(group); + } ++ return null; ++ } + - public final Packet doProcess(Packet request, RequestContext rc, ResponseContextReceiver receiver) { - return super.process(request, rc, receiver); - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,86 @@ ++ /** ++ * Get the first string matching the pattern. ++ * stderr is searched before stdout. ++ * ++ * @param pattern The multi-line pattern to match ++ * @return The matched string or null if no match was found ++ */ ++ public String firstMatch(String pattern) { ++ return firstMatch(pattern, 0); ++ } ++ ++ /** ++ * Verify the exit value of the process + * + * @param expectedExitValue Expected exit value from process + * @throws RuntimeException If the exit value from the process did not match the expected value +--- ./hotspot/test/testlibrary/com/oracle/java/testlibrary/TestDynamicVMOption.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./hotspot/test/testlibrary/com/oracle/java/testlibrary/TestDynamicVMOption.java 2014-06-06 19:56:21.000000000 -0700 +@@ -0,0 +1,95 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -18347,325 +24152,922 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ -+ -+package com.sun.xml.internal.ws.developer; -+ -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++package com.oracle.java.testlibrary; + +/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ * Simple class to check writeability, invalid and valid values for concrete VMOption + */ -+abstract class ContextClassloaderLocal { ++public class TestDynamicVMOption { + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ private final String name; ++ private final int value; + -+ private WeakHashMap CACHE = new WeakHashMap(); ++ /** ++ * Constructor ++ * ++ * @param name of VM option to test ++ */ ++ public TestDynamicVMOption(String name) { ++ this.name = name; ++ this.value = DynamicVMOptionChecker.getIntValue(name); ++ System.out.println(this.name + " = " + this.value); ++ } + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); -+ } -+ return instance; ++ /** ++ * Checks that this value can accept valid percentage values and cannot accept invalid percentage values ++ * ++ * @throws RuntimeException ++ */ ++ public void testPercentageValues() { ++ checkInvalidValue(Integer.toString(Integer.MIN_VALUE)); ++ checkInvalidValue(Integer.toString(Integer.MAX_VALUE)); ++ checkInvalidValue("-10"); ++ checkInvalidValue("190"); + } + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); ++ /** ++ * Reads VM option from PlatformMXBean and parse it to integer value ++ * ++ * @return value ++ */ ++ public int getIntValue() { ++ return DynamicVMOptionChecker.getIntValue(this.name); + } + -+ protected abstract V initialValue() throws Exception; -+ -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); -+ } ++ /** ++ * Checks that this VM option is dynamically writable ++ * ++ * @throws RuntimeException if option if not writable ++ * @return true ++ */ ++ public boolean checkIsWritable() throws RuntimeException { ++ return DynamicVMOptionChecker.checkIsWritable(this.name); + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++ /** ++ * Checks that value for this VM option cannot be set ++ * ++ * @param value to check ++ * @throws RuntimeException on error - when expected exception hasn't been thrown ++ */ ++ public void checkInvalidValue(String value) { ++ DynamicVMOptionChecker.checkInvalidValue(this.name, value); + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ /** ++ * Checks that value for this VM option can be set ++ * ++ * @param value to check ++ * @throws RuntimeException on error - when value in VM is not equal to origin ++ */ ++ public void checkValidValue(String value) { ++ DynamicVMOptionChecker.checkValidValue(this.name, value); + } ++ +} +--- ./hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java 2013-09-06 11:22:20.000000000 -0700 ++++ ./hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java 2014-06-06 19:56:21.000000000 -0700 +@@ -78,4 +78,7 @@ + public native void NMTUncommitMemory(long addr, long size); + public native void NMTReleaseMemory(long addr, long size); + public native boolean NMTWaitForDataMerge(); ++ ++ // Compiler ++ public native void deoptimizeAll(); + } +--- ./jaxp/.hgtags 2013-09-06 11:22:52.000000000 -0700 ++++ ./jaxp/.hgtags 2014-06-06 19:56:13.000000000 -0700 +@@ -123,6 +123,7 @@ + bcd31fa1e3c6f51b4fdd427ef905188cdac57164 jdk7-b146 + 067fb18071e3872698f6218724958bd0cebf30a3 jdk7u1-b01 + fc268cd1dd5d2e903ccd4b0275e1f9c2461ed30c jdk7-b147 ++3170972bd3928a331c4c64a5c0c9632077fb399a 7u0 + 104ca42e1e7ca66b074a4619ce6420f15d8f454d jdk7u1-b02 + 64e323faadf65018c1ffc8bb9c97f7b664e87347 jdk7u1-b03 + 2256c20e66857f80cacda14ffdbc0979c929d7f8 jdk7u1-b04 +@@ -302,6 +303,22 @@ + 5952538d55e624132f97400332a50b71880c874c jdk7u25-b09 + aa00dd983dd0f5b07269d0648a0325e9b3e0d957 jdk7u25-b10 + 0fb6d76bcd2e8d54d0a69e1c3d2a85d84b3e17a4 jdk7u25-b11 ++7b47e1a26f7cbb8d8d22ea165f2d7fbbbd354c77 jdk7u14-b16 ++77ac1ef42b2fd47cc87b9800f63efdd4cf2fa05d jdk7u14-b17 ++d47975f80a24b55410fa2e2c5f50f3405d83fe73 jdk7u14-b18 ++331e489ecb7b19fa98c60324f7ce5d168284a8c8 jdk7u14-b19 ++331e489ecb7b19fa98c60324f7ce5d168284a8c8 jdk7u14-b19 ++c3c9f04cf10c2fe576b208f6a8ca3777b1d31145 jdk7u14-b19 ++5e1fee011646b4a3ff29b7b9cdc208e0a0577cb4 jdk7u14-b20 ++d1c8bb1cbc9183fc994b5fedf26886ceda0d59f9 jdk7u14-b21 ++d1c6afebdfe28eb07eb2d03a6911a0f33b619165 jdk7u14-b22 ++0e4c549d3635122145ac88bad7b98716976ca49e jdk7u40-b23 ++d17acb2ee133811baa8eae3436a8c191fc433da1 jdk7u40-b24 ++52bcce690998b4ad91abddae118847f4358c6110 jdk7u40-b25 ++cd764ada36b50e2096ba35b4c27ca8f83b3db964 jdk7u40-b26 ++7626b3fbc822fd4efd5ba3b5fc18f2fef5749597 jdk7u40-b27 ++9186b6efd2b2eafa7fee5be1b043f59f25db12a6 jdk7u40-b28 ++740942c76fb668a04bf89feccf069f6958651d54 jdk7u40-b29 + 5e87aee78c91efa65bd5aeb37bcc1c1c637a7f0c jdk7u25-b12 + 83b80c094befd08cbac4247d9b8f12c6a039f23f jdk7u25-b13 + 68cc0d2a49f09b5c611b2775f2e66de1022bdedc jdk7u25-b14 +@@ -343,3 +360,84 @@ + 66363323f14d85d4ab28e883a3323b9d72dea5fd jdk7u40-b42 + c0bd71414ea513f54f23965936a837fca093ac91 jdk7u40-b43 + 91bc4534851265291bb3b16452a0968d6909979f jdk7u40-b60 ++d9b92749a0f4c8e6c6f4fe11210c2a02d70bae74 jdk7u60-b00 ++c500d4ec41ff2117eabfa33e640b6df2f21deb3d jdk7u40-b61 ++9e3f8ab9d17be6b1a4a097fcc5bc5412013d3e86 jdk7u40-b62 ++1a7e2024963d3a8d6cde209de0967ac43418b82a jdk7u45-b01 ++72b314bf2ee171bec2157f737ba3bf77fbdf1118 jdk7u45-b02 ++399c58bf22ad35a3527a286123497615100746b2 jdk7u45-b03 ++e66ea9257ba8a77fc64f6f2924584b183767d82b jdk7u45-b04 ++3a6dce39c05c254aba9f3ae57c035bf3facfe8b9 jdk7u45-b05 ++a7b1dcabdebbdbf40040a1c6f8411d2f8d25bb37 jdk7u45-b06 ++abb39bc40bcc91c7f8ebc2867e98f302d9bc8417 jdk7u45-b07 ++72295e1b27e61751cc323b5e4d6781bf7afae0a4 jdk7u45-b08 ++255d92f5ed98915a025484360963d7d09bd77313 jdk7u45-b09 ++28a18e725bb39d47e920ef910f435321fb891a88 jdk7u45-b10 ++3d3b4da34d583e86a3b90b8f69927a37d40f5b57 jdk7u45-b11 ++2ac5c9749223f205cd081ecd0028b2f3ea13f8f8 jdk7u45-b12 ++18a009fdfba2bbc5036f96cbefffcdefe9580bb1 jdk7u45-b13 ++d577bae705f208661733e09a4875d79255897b7b jdk7u45-b14 ++daadec741c9bc5067897eb8803123d0af6c5ebc3 jdk7u45-b15 ++0a8b95184728548be4b20876e05f76e0262e4195 jdk7u45-b16 ++2586d303503b5bb6fd39dc0ce572d6e858caf41c jdk7u45-b17 ++4beb90ab48f7fd46c7a9afbe66f8cccb230699ba jdk7u45-b18 ++a456c78a50e201a65c9f63565c8291b84a4fbd32 jdk7u45-b30 ++3c34f244296e98d8ebb94973c752f3395612391a jdk7u45-b31 ++056494e83d15cd1c546d32a3b35bdb6f670b3876 jdk7u45-b33 ++b5a83862ed2ab9cc2de3719e38c72519481a4bbb jdk7u45-b34 ++7fda9b300e07738116b2b95b568229bdb4b31059 jdk7u45-b35 ++0a8b95184728548be4b20876e05f76e0262e4195 jdk7u51-b00 ++2450ace952f45202e5a3fd4f6a8356a196fe029e jdk7u51-b01 ++68def851cc6b17944756f1986734b323d8569571 jdk7u51-b02 ++0df316a3b3111427500a86f3282293dd566ae936 jdk7u51-b03 ++42be8e6266ab1733a890b21cf6cd6c2e1a48972d jdk7u51-b04 ++0655a95d16094971df14171e1c5f841c3a6bd081 jdk7u51-b05 ++13a15fc9b6bf7ac065958e038648fbe9952fd9fa jdk7u51-b06 ++8e4523e579bf86e514b9c82843b440cb79606b41 jdk7u51-b07 ++783ceae9b7369168216d5344475d92de910351e8 jdk7u51-b08 ++7875c882a7516366147bffcaaea550c4089f2fc7 jdk7u51-b09 ++65798d05674dc9453c5935c018d012b11c8697f8 jdk7u51-b10 ++70b5691c44d2830efd4301856e6223fa43894462 jdk7u51-b11 ++807946db29f42477e8d8390be01c7e27280bc85c jdk7u51-b12 ++114654a331e2f97a048d7ed43d06d7512e20e2c1 jdk7u51-b13 ++3161567adae93d12c64b79592bda3046f0c0a22d jdk7u51-b30 ++e85ee81daec2ea2fa21bf804d03431b0664c6dff jdk7u51-b31 ++1a6c3258ad218bf286c47d65e4cd80eb6763f8df jdk7u51-b33 ++9cdc04d76eb19a871c739625acd801ed1b24bed9 jdk7u51-b34 ++807946db29f42477e8d8390be01c7e27280bc85c jdk7u55-b00 ++bb7779a8fc4d14719e907b8890a2665476cf45ae jdk7u55-b01 ++8275dc4db7f852edb331ae48d663d08b9ab2b5c7 jdk7u55-b02 ++381e73f93a83e8d3bfd7dbf79f4f363a8fd6442f jdk7u55-b03 ++c72c57f71c2ba6362d9ccfbf4743947b9ecefcac jdk7u55-b04 ++5592b0c44617022e3c136eedfa1e98d4f254c964 jdk7u55-b05 ++c59d714090080ad2e06f0ca5e8d354403059d8ce jdk7u55-b06 ++125ea54089add3a16898b801a9989bf6cca05da6 jdk7u55-b07 ++39337c00cb3ce29b4d67f6d247c3fa80f16cb49f jdk7u55-b08 ++537f4f609132f3d6a4ce506c98f1dbd57f1320f8 jdk7u55-b09 ++997bdd44d5de4aee319ff0a0d2892a912d9de6f5 jdk7u55-b09 ++606483a43e8b6317d84922b9ed2b2c30d9e77419 jdk7u55-b10 ++f3f02e67d867ae25cd4f3b9bc39a4fd17f593126 jdk7u55-b11 ++708a1872f5bb8ba58ecc9fcbf4e12e6fa4783998 jdk7u55-b12 ++14719f73596f5c90e3f46c0f4312f32e5b105edd jdk7u55-b13 ++01f26830f88cf4f10897416fe1f4f372efcdecf5 jdk7u55-b30 ++26187a65c765b3177f1b7ff0638259bf66f9ec47 jdk7u55-b14 ++5be97f6c25d9eb3ef0a05fc860964cb3d27134b0 jdk7u55-b31 ++d9b92749a0f4c8e6c6f4fe11210c2a02d70bae74 jdk7u60-b00 ++ad39e88c503948fc4fc01e97c75b6e3c24599d23 jdk7u60-b01 ++050986fd54e3ec4515032ee938bc59e86772b6c0 jdk7u60-b02 ++359b79d99538d17eeb90927a1e4883fcec31661f jdk7u60-b03 ++7215972c2c30d0fa469a459a3e4fcee6bc93991d jdk7u60-b04 ++673ea3822e59de18ae5771de7a280c6ae435ef86 jdk7u60-b05 ++fd1cb0040a1d05086ca3bf32f10e1efd43f05116 jdk7u60-b06 ++cd7c8fa7a057e62e094cdde78dd632de54cedb8c jdk7u60-b07 ++b19c0f18b5a508be894aead53617688342690b01 jdk7u60-b08 ++4bfece8a5148947d268611cc1b4485e92960064e jdk7u60-b09 ++28a6c0b3b22580101bf750383c2e48d34dea2124 jdk7u60-b10 ++e57490e0b99917ea8e1da1bb4d0c57fd5b7705f9 jdk7u60-b11 ++a9574b35f0af409fa1665aadd9b2997a0f9878dc jdk7u60-b12 ++92cf0b5c1c3e9b61d36671d8fb5070716e0f016b jdk7u60-b13 ++2814f43a6c73414dcb2b799e1a52d5b44688590d jdk7u60-b14 ++10eed57b66336660f71f7524f2283478bdf373dc jdk7u60-b15 ++fefd2d5c524b0be78876d9b98d926abda2828e79 jdk7u60-b16 ++ba6b0b5dfe5a0f50fac95c488c8a5400ea07d4f8 jdk7u60-b18 ++ba6b0b5dfe5a0f50fac95c488c8a5400ea07d4f8 jdk7u60-b17 +--- ./jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java 2014-06-06 19:56:13.000000000 -0700 +@@ -39,33 +39,138 @@ + // + // Constants + // +- // Oracle Feature: ++ //Xerces security manager ++ public static final String SECURITY_MANAGER = ++ "http://apache.org/xml/properties/security-manager"; + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ // ++ // Implementation limits: API properties ++ // ++ /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ ++ public static final String ORACLE_JAXP_PROPERTY_PREFIX = ++ "http://www.oracle.com/xml/jaxp/properties/"; + /** +- *

Use Service Mechanism

+- * +- *
    +- *
  • ++ * JDK entity expansion limit; Note that the existing system property ++ * "entityExpansionLimit" with no prefix is still observed ++ */ ++ public static final String JDK_ENTITY_EXPANSION_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit"; + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java 2013-09-06 11:24:05.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -64,7 +64,12 @@ - @XmlType(name = "EndpointReferenceType", namespace = MemberSubmissionEndpointReference.MSNS) - public final class MemberSubmissionEndpointReference extends EndpointReference implements MemberSubmissionAddressingConstants { - -- private final static JAXBContext msjc = MemberSubmissionEndpointReference.getMSJaxbContext(); -+ private final static ContextClassloaderLocal msjc = new ContextClassloaderLocal() { -+ @Override -+ protected JAXBContext initialValue() throws Exception { -+ return MemberSubmissionEndpointReference.getMSJaxbContext(); -+ } -+ }; ++ /** ++ * JDK element attribute limit; Note that the existing system property ++ * "elementAttributeLimit" with no prefix is still observed ++ */ ++ public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit"; ++ ++ /** ++ * JDK maxOccur limit; Note that the existing system property ++ * "maxOccurLimit" with no prefix is still observed ++ */ ++ public static final String JDK_MAX_OCCUR_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit"; ++ ++ /** ++ * JDK total entity size limit ++ */ ++ public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit"; ++ ++ /** ++ * JDK maximum general entity size limit ++ */ ++ public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; ++ /** ++ * JDK maximum parameter entity size limit ++ */ ++ public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit"; ++ /** ++ * JDK maximum XML name limit ++ */ ++ public static final String JDK_XML_NAME_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit"; ++ /** ++ * JDK property indicating whether the parser shall print out entity ++ * count information ++ * Value: a string "yes" means print, "no" or any other string means not. ++ */ ++ public static final String JDK_ENTITY_COUNT_INFO = ++ ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo"; ++ ++ // ++ // Implementation limits: corresponding System Properties of the above ++ // API properties ++ // ++ /** ++ * JDK entity expansion limit; Note that the existing system property ++ * "entityExpansionLimit" with no prefix is still observed ++ */ ++ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit"; ++ ++ /** ++ * JDK element attribute limit; Note that the existing system property ++ * "elementAttributeLimit" with no prefix is still observed ++ */ ++ public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit"; ++ ++ /** ++ * JDK maxOccur limit; Note that the existing system property ++ * "maxOccurLimit" with no prefix is still observed ++ */ ++ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit"; ++ ++ /** ++ * JDK total entity size limit ++ */ ++ public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit"; ++ ++ /** ++ * JDK maximum general entity size limit ++ */ ++ public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; ++ /** ++ * JDK maximum parameter entity size limit ++ */ ++ public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit"; ++ /** ++ * JDK maximum XML name limit ++ */ ++ public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit"; ++ ++ //legacy System Properties ++ public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; ++ public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; ++ public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; ++ ++ /** ++ * A string "yes" that can be used for properties such as getEntityCountInfo ++ */ ++ public static final String JDK_YES = "yes"; ++ ++ // Oracle Feature: ++ /** ++ *

    Use Service Mechanism

    ++ * ++ *
      ++ *
    • + * {@code true} instruct an object to use service mechanism to + * find a service implementation. This is the default behavior. + *
    • + *
    • + * {@code false} instruct an object to skip service mechanism and + * use the default implementation for that service. +- *
    • +- *
    +- */ +- ++ *
  • ++ *
++ */ + public static final String ORACLE_FEATURE_SERVICE_MECHANISM = "http://www.oracle.com/feature/use-service-mechanism"; - public MemberSubmissionEndpointReference() { - } -@@ -85,7 +90,7 @@ - throw new WebServiceException("Source parameter can not be null on constructor"); +- /** Oracle JAXP property prefix ("http://www.oracle.com/xml/jaxp/properties/"). */ +- public static final String ORACLE_JAXP_PROPERTY_PREFIX = +- "http://www.oracle.com/xml/jaxp/properties/"; - try { -- Unmarshaller unmarshaller = MemberSubmissionEndpointReference.msjc.createUnmarshaller(); -+ Unmarshaller unmarshaller = MemberSubmissionEndpointReference.msjc.get().createUnmarshaller(); - MemberSubmissionEndpointReference epr = unmarshaller.unmarshal(source,MemberSubmissionEndpointReference.class).getValue(); + //System Properties corresponding to ACCESS_EXTERNAL_* properties + public static final String SP_ACCESS_EXTERNAL_STYLESHEET = "javax.xml.accessExternalStylesheet"; + public static final String SP_ACCESS_EXTERNAL_DTD = "javax.xml.accessExternalDTD"; - this.addr = epr.addr; -@@ -104,7 +109,7 @@ +- + //all access keyword + public static final String ACCESS_EXTERNAL_ALL = "all"; - public void writeTo(Result result) { - try { -- Marshaller marshaller = MemberSubmissionEndpointReference.msjc.createMarshaller(); -+ Marshaller marshaller = MemberSubmissionEndpointReference.msjc.get().createMarshaller(); - //marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); - marshaller.marshal(this, result); - } catch (JAXBException e) { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java 2013-09-06 11:24:05.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -34,9 +34,6 @@ - import com.sun.xml.internal.ws.api.pipe.ContentType; - import com.sun.xml.internal.ws.developer.StreamingAttachmentFeature; +@@ -83,6 +188,19 @@ + ORACLE_JAXP_PROPERTY_PREFIX + "xmlSecurityPropertyManager"; --import javax.activation.CommandMap; --import javax.activation.MailcapCommandMap; --import javax.activation.DataContentHandler; - import java.io.IOException; - import java.io.InputStream; - import java.io.OutputStream; -@@ -62,33 +59,6 @@ + /** ++ * Feature enableExtensionFunctions ++ */ ++ public static final String ORACLE_ENABLE_EXTENSION_FUNCTION = ++ ORACLE_JAXP_PROPERTY_PREFIX + "enableExtensionFunctions"; ++ public static final String SP_ORACLE_ENABLE_EXTENSION_FUNCTION = "javax.xml.enableExtensionFunctions"; ++ ++ /** ++ * Values for a feature ++ */ ++ public static final String FEATURE_TRUE = "true"; ++ public static final String FEATURE_FALSE = "false"; ++ ++ /** + * Check if we're in jdk8 or above + */ + public static final boolean IS_JDK8_OR_ABOVE = isJavaVersionAtLeast(8); +--- ./jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java 2014-01-18 12:16:08.000000000 -0800 +@@ -52,6 +52,8 @@ */ - abstract class MimeCodec implements Codec { + public class ExsltStrings extends ExsltBase + { ++ static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"; ++ + /** + * The str:align function aligns a string within another string. + *

+@@ -225,7 +227,7 @@ + token = str.substring(fromIndex); + } -- static { -- // DataHandler.writeTo() may search for DCH. So adding some default ones. -- try { -- CommandMap map = CommandMap.getDefaultCommandMap(); -- if (map instanceof MailcapCommandMap) { -- MailcapCommandMap mailMap = (MailcapCommandMap) map; -- String hndlrStr = ";;x-java-content-handler="; -- // registering our DCH since javamail's DCH doesn't handle -- // Source -- mailMap.addMailcap( -- "text/xml" + hndlrStr + XmlDataContentHandler.class.getName()); -- mailMap.addMailcap( -- "application/xml" + hndlrStr + XmlDataContentHandler.class.getName()); -- if (map.createDataContentHandler("image/*") == null) { -- mailMap.addMailcap( -- "image/*" + hndlrStr + ImageDataContentHandler.class.getName()); -- } -- if (map.createDataContentHandler("text/plain") == null) { -- mailMap.addMailcap( -- "text/plain" + hndlrStr + StringDataContentHandler.class.getName()); -- } +- Document doc = DocumentHolder.m_doc; ++ Document doc = getDocument(); + synchronized (doc) + { + Element element = doc.createElement("token"); +@@ -289,7 +291,7 @@ + { + StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims); + +- Document doc = DocumentHolder.m_doc; ++ Document doc = getDocument(); + synchronized (doc) + { + while (lTokenizer.hasMoreTokens()) +@@ -305,7 +307,7 @@ + else + { + +- Document doc = DocumentHolder.m_doc; ++ Document doc = getDocument(); + synchronized (doc) + { + for (int i = 0; i < toTokenize.length(); i++) +@@ -327,31 +329,23 @@ + { + return tokenize(toTokenize, " \t\n\r"); + } ++ + /** +- * This class is not loaded until first referenced (see Java Language +- * Specification by Gosling/Joy/Steele, section 12.4.1) +- * +- * The static members are created when this class is first referenced, as a +- * lazy initialization not needing checking against null or any +- * synchronization. +- * ++ * @return an instance of DOM Document + */ +- private static class DocumentHolder +- { +- // Reuse the Document object to reduce memory usage. +- private static final Document m_doc; +- static { +- try +- { +- m_doc =DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); - } -- } catch (Throwable t) { -- // ignore the exception. -- } -- } - - public static final String MULTIPART_RELATED_MIME_TYPE = "multipart/related"; - - private String boundary; ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java 2013-09-06 11:24:05.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -59,6 +59,12 @@ - import java.lang.reflect.Constructor; - import java.lang.reflect.Field; - import java.lang.reflect.Method; -+import java.lang.reflect.ReflectPermission; -+import java.security.AccessControlContext; -+import java.security.AccessController; -+import java.security.Permissions; -+import java.security.PrivilegedAction; -+import java.security.ProtectionDomain; - import java.util.Iterator; - import java.util.Map; - import java.util.logging.Level; -@@ -546,10 +552,40 @@ - // ignore +- catch(ParserConfigurationException pce) +- { +- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); ++ private static Document getDocument() ++ { ++ try ++ { ++ if (System.getSecurityManager() == null) { ++ return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); ++ } else { ++ return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument(); + } +- ++ } ++ catch(ParserConfigurationException pce) ++ { ++ throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); } + } +- + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java 2014-01-18 12:16:08.000000000 -0800 +@@ -56,6 +56,7 @@ + */ + public class Extensions + { ++ static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"; + /** + * Constructor Extensions + * +@@ -114,23 +115,14 @@ -- try { -- JAXB_CONTEXT = (JAXBRIContext)JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); -- } catch (JAXBException e) { -- throw new Error(e); // this must be a bug in our code -+ JAXB_CONTEXT = createJAXBContext(); -+ } -+ -+ private static JAXBRIContext createJAXBContext() { -+ -+ // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages -+ if (isJDKRuntime()) { -+ Permissions permissions = new Permissions(); -+ permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault")); -+ permissions.add(new ReflectPermission("suppressAccessChecks")); -+ return AccessController.doPrivileged( -+ new PrivilegedAction() { -+ @Override -+ public JAXBRIContext run() { -+ try { -+ return (JAXBRIContext) JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); -+ } catch (JAXBException e) { -+ throw new Error(e); -+ } -+ } -+ }, -+ new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)}) -+ ); -+ -+ } else { -+ try { -+ return (JAXBRIContext) JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); -+ } catch (JAXBException e) { -+ throw new Error(e); -+ } + // This no longer will work right since the DTM. + // Document myDoc = myProcessor.getContextNode().getOwnerDocument(); +- try +- { +- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); +- DocumentBuilder db = dbf.newDocumentBuilder(); +- Document myDoc = db.newDocument(); ++ Document myDoc = getDocument(); + +- Text textNode = myDoc.createTextNode(textNodeValue); +- DocumentFragment docFrag = myDoc.createDocumentFragment(); ++ Text textNode = myDoc.createTextNode(textNodeValue); ++ DocumentFragment docFrag = myDoc.createDocumentFragment(); + +- docFrag.appendChild(textNode); ++ docFrag.appendChild(textNode); + +- return new NodeSet(docFrag); +- } +- catch(ParserConfigurationException pce) +- { +- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); +- } ++ return new NodeSet(docFrag); + } + } + +@@ -249,8 +241,7 @@ + public static NodeList tokenize(String toTokenize, String delims) + { + +- Document doc = DocumentHolder.m_doc; +- ++ Document doc = getDocument(); + + StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims); + NodeSet resultSet = new NodeSet(); +@@ -308,17 +299,7 @@ + public static Node checkEnvironment(ExpressionContext myContext) + { + +- Document factoryDocument; +- try +- { +- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); +- DocumentBuilder db = dbf.newDocumentBuilder(); +- factoryDocument = db.newDocument(); +- } +- catch(ParserConfigurationException pce) +- { +- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); +- } ++ Document factoryDocument = getDocument(); + + Node resultNode = null; + try +@@ -391,30 +372,21 @@ + } + + /** +- * This class is not loaded until first referenced (see Java Language +- * Specification by Gosling/Joy/Steele, section 12.4.1) +- * +- * The static members are created when this class is first referenced, as a +- * lazy initialization not needing checking against null or any +- * synchronization. +- * ++ * @return an instance of DOM Document + */ +- private static class DocumentHolder +- { +- // Reuse the Document object to reduce memory usage. +- private static final Document m_doc; +- static ++ private static Document getDocument() ++ { ++ try + { +- try +- { +- m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); +- } +- +- catch(ParserConfigurationException pce) +- { +- throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); ++ if (System.getSecurityManager() == null) { ++ return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); ++ } else { ++ return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument(); + } +- ++ } ++ catch(ParserConfigurationException pce) ++ { ++ throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce); } } -+ -+ private static boolean isJDKRuntime() { -+ return SOAPFaultBuilder.class.getName().contains("internal"); -+ } } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java 2013-09-06 11:24:06.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,7 +28,6 @@ - import com.sun.istack.internal.NotNull; - import com.sun.xml.internal.bind.api.CompositeStructure; - import com.sun.xml.internal.bind.api.TypeReference; --import com.sun.xml.internal.bind.v2.model.nav.Navigator; - import com.sun.xml.internal.ws.api.BindingID; - import com.sun.xml.internal.ws.api.SOAPVersion; - import com.sun.xml.internal.ws.api.model.ExceptionType; -@@ -735,7 +734,7 @@ - //set the actual type argument of Holder in the TypeReference - if (isHolder) { - if(clazzType==Holder.class){ -- clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); -+ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); - } - } - Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; -@@ -932,7 +931,7 @@ - //set the actual type argument of Holder in the TypeReference - if (isHolder) { - if (clazzType==Holder.class) -- clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); -+ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); - } - Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; - for (Annotation annotation : pannotations[pos]) { -@@ -1172,7 +1171,7 @@ - //set the actual type argument of Holder in the TypeReference - if (isHolder) { - if (clazzType==Holder.class) -- clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); -+ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); - } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ - Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; -@@ -1258,14 +1257,14 @@ - private Class getAsyncReturnType(Method method, Class returnType) { - if(Response.class.isAssignableFrom(returnType)){ - Type ret = method.getGenericReturnType(); -- return Navigator.REFLECTION.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]); -+ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]); - }else{ - Type[] types = method.getGenericParameterTypes(); - Class[] params = method.getParameterTypes(); - int i = 0; - for(Class cls : params){ - if(AsyncHandler.class.isAssignableFrom(cls)){ -- return Navigator.REFLECTION.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]); -+ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]); - } - i++; - } ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,85 @@ + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java 2014-06-06 19:56:13.000000000 -0700 +@@ -472,7 +472,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1413,13 +1419,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java 2014-06-06 19:56:13.000000000 -0700 +@@ -471,7 +471,13 @@ + + // Error messages... + +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /** Error message ID that has a null message, but takes in a single object. */ + {"ER0000" , "{0}" }, +@@ -1412,13 +1418,6 @@ + + }; + +- /** Get the lookup table for error messages. +- * +- * @return The int to message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + // ================= INFRASTRUCTURE ====================== + +--- ./jaxp/src/com/sun/org/apache/xalan/internal/utils/FeatureManager.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/utils/FeatureManager.java 2014-06-06 19:56:13.000000000 -0700 +@@ -0,0 +1,124 @@ +/* -+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it @@ -18689,218 +25091,110 @@ + * questions. + */ + -+package com.sun.xml.internal.ws.model; ++package com.sun.org.apache.xalan.internal.utils; + -+import com.sun.xml.internal.bind.v2.model.nav.Navigator; + -+import java.lang.reflect.Field; -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.lang.reflect.Type; -+import java.util.logging.Level; -+import java.util.logging.Logger; ++import com.sun.org.apache.xalan.internal.XalanConstants; + +/** -+ * Utils class. -+ * -+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * This class manages security related properties + * -+ * Has *package private* access to avoid inappropriate usage. + */ -+/* package */ final class Utils { ++public final class FeatureManager extends FeaturePropertyBase { + -+ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ /** ++ * States of the settings of a property, in the order: default value, value ++ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system ++ * properties, and jaxp api properties ++ */ ++ public static enum State { ++ //this order reflects the overriding order ++ DEFAULT, FSP, JAXPDOTPROPERTIES, SYSTEMPROPERTY, APIPROPERTY ++ } + + /** -+ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ * Xalan Features + */ -+ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ public static enum Feature { ++ ORACLE_ENABLE_EXTENSION_FUNCTION(XalanConstants.ORACLE_ENABLE_EXTENSION_FUNCTION, ++ "true"); + -+ static { // we statically initializing REFLECTION_NAVIGATOR property -+ Class refNav = null; -+ try { -+ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); -+ //noinspection unchecked -+ Method getInstance = refNav.getDeclaredMethod("getInstance"); -+ getInstance.setAccessible(true); -+ //noinspection unchecked -+ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("Can't find ReflectionNavigator class"); -+ } catch (InvocationTargetException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); -+ } catch (IllegalAccessException e) { -+ e.printStackTrace(); -+ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); -+ } catch (SecurityException e) { -+ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); -+ throw e; ++ final String name; ++ final String defaultValue; ++ ++ Feature(String name, String value) { ++ this.name = name; ++ this.defaultValue = value; ++ } ++ ++ public boolean equalsName(String propertyName) { ++ return (propertyName == null) ? false : name.equals(propertyName); ++ } ++ ++ String defaultValue() { ++ return defaultValue; + } + } + + /** -+ * private constructor to avoid util class instantiating ++ * Default constructor. Establishes default values + */ -+ private Utils() { ++ public FeatureManager() { ++ values = new String[Feature.values().length]; ++ for (Feature feature : Feature.values()) { ++ values[feature.ordinal()] = feature.defaultValue(); ++ } ++ //read system properties or jaxp.properties ++ readSystemProperties(); + } -+} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java 2013-09-06 11:24:06.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -61,7 +61,7 @@ - - private static final AbstractWrapperBeanGenerator RUNTIME_GENERATOR = - new RuntimeWrapperBeanGenerator(new RuntimeInlineAnnotationReader(), -- Navigator.REFLECTION, FIELD_FACTORY); -+ Utils.REFLECTION_NAVIGATOR, FIELD_FACTORY); - - private static final class RuntimeWrapperBeanGenerator extends AbstractWrapperBeanGenerator { - ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,92 @@ -+/* -+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. -+ * 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.xml.internal.ws.policy.privateutil; -+ -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.util.logging.Level; -+import java.util.logging.Logger; + -+/** -+ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks -+ * to java.lang,reflect.Method.invoke() -+ */ -+class MethodUtil { + -+ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); -+ private static final Method INVOKE_METHOD; ++ /** ++ * Check if the feature is enabled ++ * @param feature name of the feature ++ * @return true if enabled, false otherwise ++ */ ++ public boolean isFeatureEnabled(Feature feature) { ++ return Boolean.parseBoolean(values[feature.ordinal()]); ++ } + -+ static { -+ Method method; -+ try { -+ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); -+ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); -+ } -+ } catch (Throwable t) { -+ method = null; -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); -+ } -+ } -+ INVOKE_METHOD = method; ++ /** ++ * Check if the feature is enabled ++ * @param propertyName name of the feature ++ * @return true if enabled, false otherwise ++ */ ++ public boolean isFeatureEnabled(String propertyName) { ++ return Boolean.parseBoolean(values[getIndex(propertyName)]); + } + -+ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { -+ if (INVOKE_METHOD != null) { -+ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); -+ } -+ try { -+ return INVOKE_METHOD.invoke(null, method, target, args); -+ } catch (InvocationTargetException ite) { -+ // unwrap invocation exception added by reflection code ... -+ throw unwrapException(ite); -+ } -+ } else { -+ // other then Oracle JDK ... -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); ++ /** ++ * Get the index by property name ++ * @param propertyName property name ++ * @return the index of the property if found; return -1 if not ++ */ ++ public int getIndex(String propertyName){ ++ for (Feature feature : Feature.values()) { ++ if (feature.equalsName(propertyName)) { ++ return feature.ordinal(); + } -+ return method.invoke(target, args); + } ++ return -1; + } + -+ private static InvocationTargetException unwrapException(InvocationTargetException ite) { -+ Throwable targetException = ite.getTargetException(); -+ if (targetException != null && targetException instanceof InvocationTargetException) { -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); -+ } -+ return (InvocationTargetException) targetException; -+ } else { -+ return ite; -+ } ++ /** ++ * Read from system properties, or those in jaxp.properties ++ */ ++ private void readSystemProperties() { ++ getSystemProperty(Feature.ORACLE_ENABLE_EXTENSION_FUNCTION, ++ XalanConstants.SP_ORACLE_ENABLE_EXTENSION_FUNCTION); + } + +} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java 2013-09-06 11:24:07.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -282,13 +282,13 @@ - /** - * Reflection utilities wrapper - */ -- public static class Reflection { -+ static class Reflection { - private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtils.Reflection.class); - - /** - * Reflectively invokes specified method on the specified target - */ -- public static T invoke(final Object target, final String methodName, -+ static T invoke(final Object target, final String methodName, - final Class resultClass, final Object... parameters) throws RuntimePolicyUtilsException { - Class[] parameterTypes; - if (parameters != null && parameters.length > 0) { -@@ -311,7 +311,7 @@ - final Object[] parameters, final Class[] parameterTypes) throws RuntimePolicyUtilsException { - try { - final Method method = target.getClass().getMethod(methodName, parameterTypes); -- final Object result = method.invoke(target, parameters); -+ final Object result = MethodUtil.invoke(target, method,parameters); - - return resultClass.cast(result); - } catch (IllegalArgumentException e) { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,86 @@ +--- ./jaxp/src/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java 2014-06-06 19:56:13.000000000 -0700 +@@ -0,0 +1,215 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it @@ -18924,151 +25218,266 @@ + * questions. + */ + -+package com.sun.xml.internal.ws.policy.sourcemodel.attach; ++package com.sun.org.apache.xalan.internal.utils; + -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++import com.sun.org.apache.xalan.internal.XalanConstants; + +/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ * This is the base class for features and properties ++ * + */ -+abstract class ContextClassloaderLocal { -+ -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; -+ -+ private WeakHashMap CACHE = new WeakHashMap(); ++public abstract class FeaturePropertyBase { + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); ++ /** ++ * States of the settings of a property, in the order: default value, value ++ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system ++ * properties, and jaxp api properties ++ */ ++ public static enum State { ++ //this order reflects the overriding order ++ DEFAULT, FSP, JAXPDOTPROPERTIES, SYSTEMPROPERTY, APIPROPERTY ++ } ++ ++ ++ /** ++ * Values of the properties as defined in enum Properties ++ */ ++ String[] values = null; ++ /** ++ * States of the settings for each property in Properties above ++ */ ++ State[] states = {State.DEFAULT, State.DEFAULT}; ++ ++ ++ /** ++ * Set the value for a specific property. ++ * ++ * @param property the property ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setValue(Enum property, State state, String value) { ++ //only update if it shall override ++ if (state.compareTo(states[property.ordinal()]) >= 0) { ++ values[property.ordinal()] = value; ++ states[property.ordinal()] = state; + } -+ return instance; + } + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); ++ /** ++ * Set the value of a property by its index ++ * @param index the index of the property ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setValue(int index, State state, String value) { ++ //only update if it shall override ++ if (state.compareTo(states[index]) >= 0) { ++ values[index] = value; ++ states[index] = state; ++ } + } + -+ protected abstract V initialValue() throws Exception; ++ /** ++ * Set value by property name and state ++ * @param propertyName property name ++ * @param state the state of the property ++ * @param value the value of the property ++ * @return true if the property is managed by the security property manager; ++ * false if otherwise. ++ */ ++ public boolean setValue(String propertyName, State state, Object value) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ setValue(index, state, (String)value); ++ return true; ++ } ++ return false; ++ } + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ /** ++ * Set value by property name and state ++ * @param propertyName property name ++ * @param state the state of the property ++ * @param value the value of the property ++ * @return true if the property is managed by the security property manager; ++ * false if otherwise. ++ */ ++ public boolean setValue(String propertyName, State state, boolean value) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ if (value) { ++ setValue(index, state, XalanConstants.FEATURE_TRUE); ++ } else { ++ setValue(index, state, XalanConstants.FEATURE_FALSE); ++ } ++ return true; + } ++ return false; + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++ /** ++ * Return the value of the specified property ++ * ++ * @param property the property ++ * @return the value of the property ++ */ ++ public String getValue(Enum property) { ++ return values[property.ordinal()]; + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ /** ++ * Return the value of the specified property ++ * ++ * @param property the property ++ * @return the value of the property ++ */ ++ public String getValue(String property) { ++ int index = getIndex(property); ++ if (index > -1) { ++ return getValueByIndex(index); ++ } ++ return null; + } -+} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ /** ++ * Return the value of the specified property. ++ * ++ * @param propertyName the property name ++ * @return the value of the property as a string. If a property is managed ++ * by this manager, its value shall not be null. ++ */ ++ public String getValueAsString(String propertyName) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ return getValueByIndex(index); ++ } + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java 2013-09-06 11:24:07.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -83,7 +83,13 @@ - private static final QName POLICY = new QName("http://www.w3.org/ns/ws-policy", "Policy"); - private static final QName URI = new QName("http://www.w3.org/ns/ws-policy", "URI"); - private static final QName POLICIES = new QName(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "Policies"); -- private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputFactory.newInstance(); -+ private static final ContextClassloaderLocal XML_INPUT_FACTORY = new ContextClassloaderLocal() { -+ @Override -+ protected XMLInputFactory initialValue() throws Exception { -+ return XMLInputFactory.newInstance(); ++ return null; ++ } ++ ++ /** ++ * Return the value of a property by its ordinal ++ * @param index the index of a property ++ * @return value of a property ++ */ ++ public String getValueByIndex(int index) { ++ return values[index]; ++ } ++ ++ /** ++ * Get the index by property name ++ * @param propertyName property name ++ * @return the index of the property if found; return -1 if not ++ */ ++ public abstract int getIndex(String propertyName); ++ ++ public > int getIndex(Class property, String propertyName) { ++ for (Enum enumItem : property.getEnumConstants()) { ++ if (enumItem.toString().equals(propertyName)) { ++ //internally, ordinal is used as index ++ return enumItem.ordinal(); ++ } + } ++ return -1; + }; + - private static final PolicyModelUnmarshaller POLICY_UNMARSHALLER = PolicyModelUnmarshaller.getXmlUnmarshaller(); ++ ++ /** ++ * Read from system properties, or those in jaxp.properties ++ * ++ * @param property the property ++ * @param systemProperty the name of the system property ++ */ ++ void getSystemProperty(Enum property, String systemProperty) { ++ try { ++ String value = SecuritySupport.getSystemProperty(systemProperty); ++ if (value != null) { ++ values[property.ordinal()] = value; ++ states[property.ordinal()] = State.SYSTEMPROPERTY; ++ return; ++ } ++ ++ value = SecuritySupport.readJAXPProperty(systemProperty); ++ if (value != null) { ++ values[property.ordinal()] = value; ++ states[property.ordinal()] = State.JAXPDOTPROPERTIES; ++ } ++ } catch (NumberFormatException e) { ++ //invalid setting ignored ++ } ++ } ++} +--- ./jaxp/src/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java 2014-04-19 01:27:01.000000000 -0700 +@@ -54,8 +54,8 @@ + // + // Constants + // +- private static final String XALAN_INTERNAL = "com.sun.org.apache.xalan.internal"; +- private static final String XERCES_INTERNAL = "com.sun.org.apache.xerces.internal"; ++ private static final String JAXP_INTERNAL = "com.sun.org.apache"; ++ private static final String STAX_INTERNAL = "com.sun.xml.internal"; - private final Map map = new HashMap(); -@@ -93,7 +99,7 @@ - public static Map unmarshal(final Reader source) throws PolicyException { - LOGGER.entering(source); - try { -- XMLEventReader reader = XML_INPUT_FACTORY.createXMLEventReader(source); -+ XMLEventReader reader = XML_INPUT_FACTORY.get().createXMLEventReader(source); - ExternalAttachmentsUnmarshaller instance = new ExternalAttachmentsUnmarshaller(); - final Map map = instance.unmarshal(reader, null); - LOGGER.exiting(map); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java 2013-09-06 11:24:07.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -157,7 +157,7 @@ - if (!method.isAccessible()) { - method.setAccessible(true); - } -- method.invoke(instance,args); -+ MethodUtil.invoke(instance,method,args); - } catch (IllegalAccessException e) { - throw new ServerRtException("server.rt.err",e); - } catch (InvocationTargetException e) { ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MethodUtil.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,94 @@ + // name of default properties file to look for in JDK's jre/lib directory + private static final String DEFAULT_PROPERTIES_FILENAME = +@@ -497,12 +497,8 @@ + public static Class findProviderClass(String className, boolean doFallback) + throws ClassNotFoundException, ConfigurationError + { +- if (System.getSecurityManager()!=null) { +- return Class.forName(className); +- } else { +- return findProviderClass (className, ++ return findProviderClass (className, + findClassLoader (), doFallback); +- } + } + + /** +@@ -517,8 +513,8 @@ + SecurityManager security = System.getSecurityManager(); + try{ + if (security != null){ +- if (className.startsWith(XALAN_INTERNAL) || +- className.startsWith(XERCES_INTERNAL)) { ++ if (className.startsWith(JAXP_INTERNAL) || ++ className.startsWith(STAX_INTERNAL)) { + cl = null; + } else { + final int lastDot = className.lastIndexOf("."); +@@ -533,16 +529,7 @@ + + Class providerClass; + if (cl == null) { +- // XXX Use the bootstrap ClassLoader. There is no way to +- // load a class using the bootstrap ClassLoader that works +- // in both JDK 1.1 and Java 2. However, this should still +- // work b/c the following should be true: +- // +- // (cl == null) iff current ClassLoader == null +- // +- // Thus Class.forName(String) will use the current +- // ClassLoader which will be the bootstrap ClassLoader. +- providerClass = Class.forName(className); ++ providerClass = Class.forName(className, false, ObjectFactory.class.getClassLoader()); + } else { + try { + providerClass = cl.loadClass(className); +--- ./jaxp/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java 2014-04-19 01:27:01.000000000 -0700 +@@ -57,7 +57,7 @@ + return securitySupport; + } + +- static ClassLoader getContextClassLoader() { ++ public static ClassLoader getContextClassLoader() { + return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + ClassLoader cl = null; +--- ./jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java 2014-06-06 19:56:13.000000000 -0700 +@@ -0,0 +1,435 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -19094,6227 +25503,23538 @@ + * questions. + */ + -+package com.sun.xml.internal.ws.server; ++package com.sun.org.apache.xalan.internal.utils; ++ ++import com.sun.org.apache.xalan.internal.XalanConstants; + -+import java.lang.reflect.InvocationTargetException; -+import java.lang.reflect.Method; -+import java.util.logging.Level; -+import java.util.logging.Logger; + +/** -+ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks -+ * to java.lang,reflect.Method.invoke() ++ * This class is not the same as that in Xerces. It is used to manage the ++ * state of corresponding Xerces properties and pass the values over to ++ * the Xerces Security Manager. ++ * ++ * @author Joe Wang Oracle Corp. + * -+ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! + */ -+class MethodUtil { ++public final class XMLSecurityManager { + -+ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); -+ private static final Method INVOKE_METHOD; ++ /** ++ * States of the settings of a property, in the order: default value, value ++ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system ++ * properties, and jaxp api properties ++ */ ++ public static enum State { ++ //this order reflects the overriding order + -+ static { -+ Method method; -+ try { -+ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); -+ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); -+ } -+ } catch (Throwable t) { -+ method = null; -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); -+ } -+ } -+ INVOKE_METHOD = method; -+ } ++ DEFAULT("default"), FSP("FEATURE_SECURE_PROCESSING"), ++ JAXPDOTPROPERTIES("jaxp.properties"), SYSTEMPROPERTY("system property"), ++ APIPROPERTY("property"); + -+ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { -+ if (INVOKE_METHOD != null) { -+ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); -+ } -+ try { -+ return INVOKE_METHOD.invoke(null, method, target, args); -+ } catch (InvocationTargetException ite) { -+ // unwrap invocation exception added by reflection code ... -+ throw unwrapException(ite); -+ } -+ } else { -+ // other then Oracle JDK ... -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); -+ } -+ return method.invoke(target, args); ++ final String literal; ++ State(String literal) { ++ this.literal = literal; + } -+ } + -+ private static InvocationTargetException unwrapException(InvocationTargetException ite) { -+ Throwable targetException = ite.getTargetException(); -+ if (targetException != null && targetException instanceof InvocationTargetException) { -+ if (LOGGER.isLoggable(Level.FINE)) { -+ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); -+ } -+ return (InvocationTargetException) targetException; -+ } else { -+ return ite; ++ String literal() { ++ return literal; + } + } + -+} ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,86 @@ -+/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+ * 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. -+ */ ++ /** ++ * Limits managed by the security manager ++ */ ++ public static enum Limit { + -+package com.sun.xml.internal.ws.spi; ++ ENTITY_EXPANSION_LIMIT(XalanConstants.JDK_ENTITY_EXPANSION_LIMIT, ++ XalanConstants.SP_ENTITY_EXPANSION_LIMIT, 0, 64000), ++ MAX_OCCUR_NODE_LIMIT(XalanConstants.JDK_MAX_OCCUR_LIMIT, ++ XalanConstants.SP_MAX_OCCUR_LIMIT, 0, 5000), ++ ELEMENT_ATTRIBUTE_LIMIT(XalanConstants.JDK_ELEMENT_ATTRIBUTE_LIMIT, ++ XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), ++ TOTAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_TOTAL_ENTITY_SIZE_LIMIT, ++ XalanConstants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), ++ GENEAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENEAL_ENTITY_SIZE_LIMIT, ++ XalanConstants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), ++ PARAMETER_ENTITY_SIZE_LIMIT(XalanConstants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, ++ XalanConstants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); + -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++ final String apiProperty; ++ final String systemProperty; ++ final int defaultValue; ++ final int secureValue; + -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { ++ Limit(String apiProperty, String systemProperty, int value, int secureValue) { ++ this.apiProperty = apiProperty; ++ this.systemProperty = systemProperty; ++ this.defaultValue = value; ++ this.secureValue = secureValue; ++ } + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ public boolean equalsAPIPropertyName(String propertyName) { ++ return (propertyName == null) ? false : apiProperty.equals(propertyName); ++ } + -+ private WeakHashMap CACHE = new WeakHashMap(); ++ public boolean equalsSystemPropertyName(String propertyName) { ++ return (propertyName == null) ? false : systemProperty.equals(propertyName); ++ } + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); ++ public String apiProperty() { ++ return apiProperty; + } -+ return instance; -+ } + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); -+ } ++ String systemProperty() { ++ return systemProperty; ++ } + -+ protected abstract V initialValue() throws Exception; ++ int defaultValue() { ++ return defaultValue; ++ } + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ int secureValue() { ++ return secureValue; + } + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); -+ } ++ /** ++ * Map old property names with the new ones ++ */ ++ public static enum NameMap { + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ ENTITY_EXPANSION_LIMIT(XalanConstants.SP_ENTITY_EXPANSION_LIMIT, ++ XalanConstants.ENTITY_EXPANSION_LIMIT), ++ MAX_OCCUR_NODE_LIMIT(XalanConstants.SP_MAX_OCCUR_LIMIT, ++ XalanConstants.MAX_OCCUR_LIMIT), ++ ELEMENT_ATTRIBUTE_LIMIT(XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, ++ XalanConstants.ELEMENT_ATTRIBUTE_LIMIT); ++ final String newName; ++ final String oldName; ++ ++ NameMap(String newName, String oldName) { ++ this.newName = newName; ++ this.oldName = oldName; ++ } ++ ++ String getOldName(String newName) { ++ if (newName.equals(this.newName)) { ++ return oldName; ++ } ++ return null; ++ } + } -+} ++ /** ++ * Values of the properties ++ */ ++ private final int[] values; ++ /** ++ * States of the settings for each property ++ */ ++ private State[] states; ++ /** ++ * States that determine if properties are set explicitly ++ */ ++ private boolean[] isSet; + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for StaticCache utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} -+ ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java 2013-09-06 11:24:07.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -77,7 +77,12 @@ - */ - public class ProviderImpl extends Provider { - -- private final static JAXBContext eprjc = getEPRJaxbContext(); -+ private final static ContextClassloaderLocal eprjc = new ContextClassloaderLocal() { -+ @Override -+ protected JAXBContext initialValue() throws Exception { -+ return getEPRJaxbContext(); -+ } -+ }; - - /** - * Convenient singleton instance. -@@ -140,7 +145,7 @@ - return AccessController.doPrivileged(new PrivilegedAction() { - public EndpointReference run() { - try { -- Unmarshaller unmarshaller = eprjc.createUnmarshaller(); -+ Unmarshaller unmarshaller = eprjc.get().createUnmarshaller(); - return (EndpointReference) unmarshaller.unmarshal(eprInfoset); - } catch (JAXBException e) { - throw new WebServiceException("Error creating Marshaller or marshalling.", e); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,86 @@ -+/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+ * 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.xml.internal.ws.util.xml; -+ -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; -+ -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ /** ++ * Index of the special entityCountInfo property ++ */ ++ private int indexEntityCountInfo = 10000; ++ private String printEntityCountInfo = ""; + -+ private WeakHashMap CACHE = new WeakHashMap(); ++ /** ++ * Default constructor. Establishes default values for known security ++ * vulnerabilities. ++ */ ++ public XMLSecurityManager() { ++ this(false); ++ } + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); ++ /** ++ * Instantiate Security Manager in accordance with the status of ++ * secure processing ++ * @param secureProcessing ++ */ ++ public XMLSecurityManager(boolean secureProcessing) { ++ values = new int[Limit.values().length]; ++ states = new State[Limit.values().length]; ++ isSet = new boolean[Limit.values().length]; ++ for (Limit limit : Limit.values()) { ++ if (secureProcessing) { ++ values[limit.ordinal()] = limit.secureValue(); ++ states[limit.ordinal()] = State.FSP; ++ } else { ++ values[limit.ordinal()] = limit.defaultValue(); ++ states[limit.ordinal()] = State.DEFAULT; ++ } + } -+ return instance; ++ //read system properties or jaxp.properties ++ readSystemProperties(); + } + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); ++ /** ++ * Setting FEATURE_SECURE_PROCESSING explicitly ++ */ ++ public void setSecureProcessing(boolean secure) { ++ for (Limit limit : Limit.values()) { ++ if (secure) { ++ setLimit(limit.ordinal(), State.FSP, limit.secureValue()); ++ } else { ++ setLimit(limit.ordinal(), State.FSP, limit.defaultValue()); ++ } ++ } + } + -+ protected abstract V initialValue() throws Exception; -+ -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ /** ++ * Set limit by property name and state ++ * @param propertyName property name ++ * @param state the state of the property ++ * @param value the value of the property ++ * @return true if the property is managed by the security manager; false ++ * if otherwise. ++ */ ++ public boolean setLimit(String propertyName, State state, Object value) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ setLimit(index, state, value); ++ return true; + } ++ return false; + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++ /** ++ * Set the value for a specific limit. ++ * ++ * @param limit the limit ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setLimit(Limit limit, State state, int value) { ++ setLimit(limit.ordinal(), state, value); + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; -+ } -+ }); ++ /** ++ * Set the value of a property by its index ++ * ++ * @param index the index of the property ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setLimit(int index, State state, Object value) { ++ if (index == indexEntityCountInfo) { ++ //if it's explicitly set, it's treated as yes no matter the value ++ printEntityCountInfo = (String)value; ++ } else { ++ int temp = 0; ++ try { ++ temp = Integer.parseInt((String) value); ++ if (temp < 0) { ++ temp = 0; ++ } ++ } catch (NumberFormatException e) {} ++ setLimit(index, state, temp); } + } -+} -+ ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for StaticCache utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java 2013-09-06 11:24:08.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -199,20 +199,28 @@ - } - } - -- static final TransformerFactory transformerFactory = TransformerFactory.newInstance(); -- -- static final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); -+ static final ContextClassloaderLocal transformerFactory = new ContextClassloaderLocal() { -+ @Override -+ protected TransformerFactory initialValue() throws Exception { -+ return TransformerFactory.newInstance(); -+ } -+ }; - -- static { -- saxParserFactory.setNamespaceAware(true); -- } -+ static final ContextClassloaderLocal saxParserFactory = new ContextClassloaderLocal() { -+ @Override -+ protected SAXParserFactory initialValue() throws Exception { -+ SAXParserFactory factory = SAXParserFactory.newInstance(); -+ factory.setNamespaceAware(true); -+ return factory; ++ /** ++ * Set the value of a property by its index ++ * ++ * @param index the index of the property ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setLimit(int index, State state, int value) { ++ if (index == indexEntityCountInfo) { ++ //if it's explicitly set, it's treated as yes no matter the value ++ printEntityCountInfo = XalanConstants.JDK_YES; ++ } else { ++ //only update if it shall override ++ if (state.compareTo(states[index]) >= 0) { ++ values[index] = value; ++ states[index] = state; ++ isSet[index] = true; ++ } + } -+ }; - - /** - * Creates a new identity transformer. - */ - public static Transformer newTransformer() { - try { -- return transformerFactory.newTransformer(); -+ return transformerFactory.get().newTransformer(); - } catch (TransformerConfigurationException tex) { - throw new IllegalStateException("Unable to create a JAXP transformer"); - } -@@ -227,9 +235,9 @@ - // work around a bug in JAXP in JDK6u4 and earlier where the namespace processing - // is not turned on by default - StreamSource ssrc = (StreamSource) src; -- TransformerHandler th = ((SAXTransformerFactory) transformerFactory).newTransformerHandler(); -+ TransformerHandler th = ((SAXTransformerFactory) transformerFactory.get()).newTransformerHandler(); - th.setResult(result); -- XMLReader reader = saxParserFactory.newSAXParser().getXMLReader(); -+ XMLReader reader = saxParserFactory.get().newSAXParser().getXMLReader(); - reader.setContentHandler(th); - reader.setProperty(LEXICAL_HANDLER_PROPERTY, th); - reader.parse(toInputSource(ssrc)); ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,86 @@ -+/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+ * 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.xml.internal.xsom.util; + -+import java.security.AccessController; -+import java.security.PrivilegedAction; -+import java.text.MessageFormat; -+import java.util.ResourceBundle; -+import java.util.WeakHashMap; ++ /** ++ * Return the value of the specified property. ++ * ++ * @param propertyName the property name ++ * @return the value of the property as a string. If a property is managed ++ * by this manager, its value shall not be null. ++ */ ++ public String getLimitAsString(String propertyName) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ return getLimitValueByIndex(index); ++ } + -+/** -+ * Simple utility ensuring that the value is cached only in case it is non-internal implementation -+ */ -+abstract class ContextClassloaderLocal { ++ return null; ++ } + -+ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ /** ++ * Return the value of a property by its ordinal ++ * ++ * @param limit the property ++ * @return value of a property ++ */ ++ public String getLimitValueAsString(Limit limit) { ++ return Integer.toString(values[limit.ordinal()]); ++ } + -+ private WeakHashMap CACHE = new WeakHashMap(); ++ /** ++ * Return the value of the specified property ++ * ++ * @param limit the property ++ * @return the value of the property ++ */ ++ public int getLimit(Limit limit) { ++ return values[limit.ordinal()]; ++ } + -+ public V get() throws Error { -+ ClassLoader tccl = getContextClassLoader(); -+ V instance = CACHE.get(tccl); -+ if (instance == null) { -+ instance = createNewInstance(); -+ CACHE.put(tccl, instance); -+ } -+ return instance; ++ /** ++ * Return the value of a property by its ordinal ++ * ++ * @param index the index of a property ++ * @return value of a property ++ */ ++ public int getLimitByIndex(int index) { ++ return values[index]; + } ++ /** ++ * Return the value of a property by its index ++ * ++ * @param index the index of a property ++ * @return limit of a property as a string ++ */ ++ public String getLimitValueByIndex(int index) { ++ if (index == indexEntityCountInfo) { ++ return printEntityCountInfo; ++ } + -+ public void set(V instance) { -+ CACHE.put(getContextClassLoader(), instance); ++ return Integer.toString(values[index]); ++ } ++ /** ++ * Return the state of the limit property ++ * ++ * @param limit the limit ++ * @return the state of the limit property ++ */ ++ public State getState(Limit limit) { ++ return states[limit.ordinal()]; + } + -+ protected abstract V initialValue() throws Exception; ++ /** ++ * Return the state of the limit property ++ * ++ * @param limit the limit ++ * @return the state of the limit property ++ */ ++ public String getStateLiteral(Limit limit) { ++ return states[limit.ordinal()].literal(); ++ } + -+ private V createNewInstance() { -+ try { -+ return initialValue(); -+ } catch (Exception e) { -+ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ /** ++ * Get the index by property name ++ * ++ * @param propertyName property name ++ * @return the index of the property if found; return -1 if not ++ */ ++ public int getIndex(String propertyName) { ++ for (Limit limit : Limit.values()) { ++ if (limit.equalsAPIPropertyName(propertyName)) { ++ //internally, ordinal is used as index ++ return limit.ordinal(); ++ } ++ } ++ //special property to return entity count info ++ if (propertyName.equals(XalanConstants.JDK_ENTITY_COUNT_INFO)) { ++ return indexEntityCountInfo; + } ++ return -1; + } + -+ private static String format(String property, Object... args) { -+ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); -+ return MessageFormat.format(text, args); ++ /** ++ * Indicate if a property is set explicitly ++ * @param index ++ * @return ++ */ ++ public boolean isSet(int index) { ++ return isSet[index]; + } + -+ private static ClassLoader getContextClassLoader() { -+ return (ClassLoader) -+ AccessController.doPrivileged(new PrivilegedAction() { -+ public Object run() { -+ ClassLoader cl = null; -+ try { -+ cl = Thread.currentThread().getContextClassLoader(); -+ } catch (SecurityException ex) { -+ } -+ return cl; ++ public boolean printEntityCountInfo() { ++ return printEntityCountInfo.equals(XalanConstants.JDK_YES); ++ } ++ /** ++ * Read from system properties, or those in jaxp.properties ++ */ ++ private void readSystemProperties() { ++ ++ for (Limit limit : Limit.values()) { ++ if (!getSystemProperty(limit, limit.systemProperty())) { ++ //if system property is not found, try the older form if any ++ for (NameMap nameMap : NameMap.values()) { ++ String oldName = nameMap.getOldName(limit.systemProperty()); ++ if (oldName != null) { ++ getSystemProperty(limit, oldName); + } -+ }); ++ } ++ } ++ } ++ + } -+} + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -0,0 +1,27 @@ -+# -+# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# -+# Error messages for ContextClassloaderLocal utility class -+FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ /** ++ * Read from system properties, or those in jaxp.properties ++ * ++ * @param property the type of the property ++ * @param sysPropertyName the name of system property ++ */ ++ private boolean getSystemProperty(Limit limit, String sysPropertyName) { ++ try { ++ String value = SecuritySupport.getSystemProperty(sysPropertyName); ++ if (value != null && !value.equals("")) { ++ values[limit.ordinal()] = Integer.parseInt(value); ++ states[limit.ordinal()] = State.SYSTEMPROPERTY; ++ return true; ++ } + ---- jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java 2013-09-06 11:24:10.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java 2014-04-20 12:39:39.000000000 -0700 ++ value = SecuritySupport.readJAXPProperty(sysPropertyName); ++ if (value != null && !value.equals("")) { ++ values[limit.ordinal()] = Integer.parseInt(value); ++ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; ++ return true; ++ } ++ } catch (NumberFormatException e) { ++ //invalid setting ++ throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty()); ++ } ++ return false; ++ } ++} +--- ./jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityPropertyManager.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityPropertyManager.java 2014-06-06 19:56:13.000000000 -0700 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -60,7 +60,12 @@ - return new AnnotationParserImpl(); +@@ -33,20 +33,10 @@ + * This class manages security related properties + * + */ +-public final class XMLSecurityPropertyManager { ++public final class XMLSecurityPropertyManager extends FeaturePropertyBase { + + /** +- * States of the settings of a property, in the order: default value, value +- * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system +- * properties, and jaxp api properties +- */ +- public static enum State { +- //this order reflects the overriding order +- DEFAULT, FSP, JAXPDOTPROPERTIES, SYSTEMPROPERTY, APIPROPERTY +- } +- +- /** +- * Limits managed by the security manager ++ * Properties managed by the security property manager + */ + public static enum Property { + ACCESS_EXTERNAL_DTD(XMLConstants.ACCESS_EXTERNAL_DTD, +@@ -73,15 +63,6 @@ + + + /** +- * Values of the properties as defined in enum Properties +- */ +- private final String[] values; +- /** +- * States of the settings for each property in Properties above +- */ +- private State[] states = {State.DEFAULT, State.DEFAULT}; +- +- /** + * Default constructor. Establishes default values + */ + public XMLSecurityPropertyManager() { +@@ -94,53 +75,6 @@ } -- private static final SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); -+ private static final ContextClassloaderLocal stf = new ContextClassloaderLocal() { -+ @Override -+ protected SAXTransformerFactory initialValue() throws Exception { -+ return (SAXTransformerFactory) SAXTransformerFactory.newInstance(); -+ } -+ }; + /** +- * Set the value for a specific property. +- * +- * @param property the property +- * @param state the state of the property +- * @param value the value of the property +- */ +- public void setValue(Property property, State state, String value) { +- //only update if it shall override +- if (state.compareTo(states[property.ordinal()]) >= 0) { +- values[property.ordinal()] = value; +- states[property.ordinal()] = state; +- } +- } +- +- /** +- * Set the value of a property by its index +- * @param index the index of the property +- * @param state the state of the property +- * @param value the value of the property +- */ +- public void setValue(int index, State state, String value) { +- //only update if it shall override +- if (state.compareTo(states[index]) >= 0) { +- values[index] = value; +- states[index] = state; +- } +- } +- /** +- * Return the value of the specified property +- * +- * @param property the property +- * @return the value of the property +- */ +- public String getValue(Property property) { +- return values[property.ordinal()]; +- } +- +- /** +- * Return the value of a property by its ordinal +- * @param index the index of a property +- * @return value of a property +- */ +- public String getValueByIndex(int index) { +- return values[index]; +- } +- +- /** + * Get the index by property name + * @param propertyName property name + * @return the index of the property if found; return -1 if not +@@ -165,28 +99,4 @@ + XalanConstants.SP_ACCESS_EXTERNAL_STYLESHEET); + } - private static class AnnotationParserImpl extends AnnotationParser { +- /** +- * Read from system properties, or those in jaxp.properties +- * +- * @param property the property +- * @param systemProperty the name of the system property +- */ +- private void getSystemProperty(Property property, String systemProperty) { +- try { +- String value = SecuritySupport.getSystemProperty(systemProperty); +- if (value != null) { +- values[property.ordinal()] = value; +- states[property.ordinal()] = State.SYSTEMPROPERTY; +- return; +- } +- +- value = SecuritySupport.readJAXPProperty(systemProperty); +- if (value != null) { +- values[property.ordinal()] = value; +- states[property.ordinal()] = State.JAXPDOTPROPERTIES; +- } +- } catch (NumberFormatException e) { +- //invalid setting ignored +- } +- } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Compile.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Compile.java 2014-06-06 19:56:13.000000000 -0700 +@@ -23,6 +23,7 @@ -@@ -72,7 +77,7 @@ + package com.sun.org.apache.xalan.internal.xsltc.cmdline; - AnnotationParserImpl() { - try { -- transformer = stf.newTransformerHandler(); -+ transformer = stf.get().newTransformerHandler(); - } catch (TransformerConfigurationException e) { - throw new Error(e); // impossible ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; + import java.io.File; + import java.net.URL; + import java.util.Vector; +@@ -77,7 +78,7 @@ + final GetOpt getopt = new GetOpt(args, "o:d:j:p:uxhsinv"); + if (args.length < 1) printUsage(); + +- final XSLTC xsltc = new XSLTC(true); ++ final XSLTC xsltc = new XSLTC(true, new FeatureManager()); + xsltc.init(); + + int c; +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java 2014-06-06 19:56:13.000000000 -0700 +@@ -42,6 +42,7 @@ + import com.sun.org.apache.bcel.internal.generic.LocalVariableGen; + import com.sun.org.apache.bcel.internal.generic.NEW; + import com.sun.org.apache.bcel.internal.generic.PUSH; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.BooleanType; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; +@@ -717,6 +718,8 @@ + final ConstantPoolGen cpg = classGen.getConstantPool(); + final InstructionList il = methodGen.getInstructionList(); + final boolean isSecureProcessing = classGen.getParser().getXSLTC().isSecureProcessing(); ++ final boolean isExtensionFunctionEnabled = classGen.getParser().getXSLTC() ++ .getFeature(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION); + int index; + + // Translate calls to methods in the BasisLibrary +@@ -760,7 +763,7 @@ + il.append(new INVOKESTATIC(index)); + } + else if (_isExtConstructor) { +- if (isSecureProcessing) ++ if (isSecureProcessing && !isExtensionFunctionEnabled) + translateUnallowedExtension(cpg, il); + + final String clazz = +@@ -822,7 +825,7 @@ + } + // Invoke function calls that are handled in separate classes + else { +- if (isSecureProcessing) ++ if (isSecureProcessing && !isExtensionFunctionEnabled) + translateUnallowedExtension(cpg, il); + + final String clazz = _chosenMethod.getDeclaringClass().getName(); +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java 2013-12-01 11:13:41.000000000 -0800 +@@ -86,7 +86,7 @@ + if (input == null) { + docToLoad = SystemIDResolver.getAbsoluteURI(docToLoad, currLoadedDoc); + String accessError = SecuritySupport.checkAccess(docToLoad, +- xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), ++ (String)xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), + XalanConstants.ACCESS_EXTERNAL_ALL); + + if (accessError != null) { +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java 2013-12-01 11:13:41.000000000 -0800 +@@ -87,7 +87,7 @@ + if (input == null) { + docToLoad = SystemIDResolver.getAbsoluteURI(docToLoad, currLoadedDoc); + String accessError = SecuritySupport.checkAccess(docToLoad, +- xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), ++ (String)xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), + XalanConstants.ACCESS_EXTERNAL_ALL); + + if (accessError != null) { +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java 2013-09-06 11:22:55.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java 2013-12-01 11:13:41.000000000 -0800 +@@ -28,6 +28,7 @@ + import com.sun.org.apache.xalan.internal.utils.FactoryImpl; + import com.sun.org.apache.xalan.internal.utils.ObjectFactory; + import com.sun.org.apache.xalan.internal.utils.SecuritySupport; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; +@@ -487,6 +488,20 @@ } ---- jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java 2013-09-06 11:24:10.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. - * 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,9 +27,14 @@ - import java.math.BigDecimal; - import java.math.BigInteger; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - import java.util.Calendar; -+import java.util.Collections; - import java.util.GregorianCalendar; -+import java.util.Map; - import java.util.TimeZone; -+import java.util.WeakHashMap; + final XMLReader reader = parser.getXMLReader(); ++ try { ++ XMLSecurityManager securityManager = ++ (XMLSecurityManager)_xsltc.getProperty(XalanConstants.SECURITY_MANAGER); ++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { ++ reader.setProperty(limit.apiProperty(), securityManager.getLimitValueAsString(limit)); ++ } ++ if (securityManager.printEntityCountInfo()) { ++ parser.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); ++ } ++ } catch (SAXException se) { ++ System.err.println("Warning: " + reader.getClass().getName() + ": " ++ + se.getMessage()); ++ } ++ + return(parse(reader, input)); + } + catch (ParserConfigurationException e) { +@@ -565,7 +580,7 @@ + } + path = SystemIDResolver.getAbsoluteURI(path); + String accessError = SecuritySupport.checkAccess(path, +- _xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), ++ (String)_xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET), + XalanConstants.ACCESS_EXTERNAL_ALL); + if (accessError != null) { + ErrorMsg msg = new ErrorMsg(ErrorMsg.ACCESSING_XSLT_TARGET_ERR, +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java 2014-06-06 19:56:13.000000000 -0700 +@@ -43,12 +43,14 @@ - import javax.xml.namespace.QName; - import javax.xml.namespace.NamespaceContext; -@@ -418,7 +423,7 @@ + import com.sun.org.apache.bcel.internal.classfile.JavaClass; + import com.sun.org.apache.xalan.internal.XalanConstants; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager.Feature; + import com.sun.org.apache.xalan.internal.utils.SecuritySupport; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; + import com.sun.org.apache.xml.internal.dtm.DTM; - public static GregorianCalendar _parseDateTime(CharSequence s) { - String val = WhiteSpaceProcessor.trim(s).toString(); -- return datatypeFactory.newXMLGregorianCalendar(val).toGregorianCalendar(); -+ return getDatatypeFactory().newXMLGregorianCalendar(val).toGregorianCalendar(); - } +-import com.sun.org.apache.xalan.internal.utils.SecuritySupport; + import org.xml.sax.InputSource; + import org.xml.sax.XMLReader; - public String printDateTime(Calendar val) { -@@ -492,7 +497,7 @@ - } +@@ -146,12 +148,16 @@ + */ + private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; - public Calendar parseTime(String lexicalXSDTime) { -- return datatypeFactory.newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar(); -+ return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar(); - } ++ private XMLSecurityManager _xmlSecurityManager; ++ ++ private final FeatureManager _featureManager; - public String printTime(Calendar val) { -@@ -500,7 +505,7 @@ + /** + * XSLTC compiler constructor + */ +- public XSLTC(boolean useServicesMechanism) { ++ public XSLTC(boolean useServicesMechanism, FeatureManager featureManager) { + _parser = new Parser(this, useServicesMechanism); ++ _featureManager = featureManager; } - public Calendar parseDate(String lexicalXSDDate) { -- return datatypeFactory.newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar(); -+ return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar(); + /** +@@ -181,15 +187,26 @@ + _useServicesMechanism = flag; } - public String printDate(Calendar val) { -@@ -882,14 +887,30 @@ ++ /** ++ * Return the value of the specified feature ++ * @param name name of the feature ++ * @return true if the feature is enabled, false otherwise ++ */ ++ public boolean getFeature(Feature name) { ++ return _featureManager.isFeatureEnabled(name); ++ } ++ + /** + * Return allowed protocols for accessing external stylesheet. + */ +- public String getProperty(String name) { ++ public Object getProperty(String name) { + if (name.equals(XMLConstants.ACCESS_EXTERNAL_STYLESHEET)) { + return _accessExternalStylesheet; } - return false; + else if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { + return _accessExternalDTD; ++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++ return _xmlSecurityManager; + } + return null; } -- private static final DatatypeFactory datatypeFactory; - -- static { -- try { -- datatypeFactory = DatatypeFactory.newInstance(); -- } catch (DatatypeConfigurationException e) { -- throw new Error(e); -+ private static final Map DF_CACHE = Collections.synchronizedMap(new WeakHashMap()); -+ -+ public static DatatypeFactory getDatatypeFactory() { -+ ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction() { -+ public ClassLoader run() { -+ return Thread.currentThread().getContextClassLoader(); -+ } -+ }); -+ DatatypeFactory df = DF_CACHE.get(tccl); -+ if (df == null) { -+ synchronized (DatatypeConverterImpl.class) { -+ df = DF_CACHE.get(tccl); -+ if (df == null) { // to prevent multiple initialization -+ try { -+ df = DatatypeFactory.newInstance(); -+ } catch (DatatypeConfigurationException e) { -+ throw new Error(Messages.format(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY), e); -+ } -+ DF_CACHE.put(tccl, df); -+ } -+ } +@@ -197,12 +214,14 @@ + /** + * Set allowed protocols for accessing external stylesheet. + */ +- public void setProperty(String name, String value) { ++ public void setProperty(String name, Object value) { + if (name.equals(XMLConstants.ACCESS_EXTERNAL_STYLESHEET)) { + _accessExternalStylesheet = (String)value; + } + else if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { + _accessExternalDTD = (String)value; ++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++ _xmlSecurityManager = (XMLSecurityManager)value; } -+ return df; } - private static final class CalendarFormatter { ---- jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.java 2013-09-06 11:24:10.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -88,4 +88,6 @@ +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ - static final String ILLEGAL_CAST = // 2 args - "JAXBContext.IllegalCast"; -+ -+ static final String FAILED_TO_INITIALE_DATATYPE_FACTORY = "FAILED_TO_INITIALE_DATATYPE_FACTORY"; - } ---- jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.properties 2013-09-06 11:24:10.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.properties 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # - # This code is free software; you can redistribute it and/or modify it -@@ -49,3 +49,6 @@ + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "More than one stylesheet defined in the same file."}, - JAXBContext.IllegalCast = \ - ClassCastException: attempting to cast {0} to {1}. Please make sure that you are specifying the proper ClassLoader. -+ -+FAILED_TO_INITIALE_DATATYPE_FACTORY = \ -+ Failed to initialize JAXP 1.3 DatatypeFactory class. ---- jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2013-09-06 11:24:11.000000000 -0700 -+++ jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2014-04-20 12:39:39.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -69,7 +69,7 @@ - @XmlType(name="EndpointReferenceType",namespace=W3CEndpointReference.NS) - public final class W3CEndpointReference extends EndpointReference { +@@ -1012,12 +1018,5 @@ -- private final static JAXBContext w3cjc = getW3CJaxbContext(); -+ private final JAXBContext w3cjc = getW3CJaxbContext(); + }; - protected W3CEndpointReference() { +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; } ---- jdk/.hgtags 2013-09-06 11:27:36.000000000 -0700 -+++ jdk/.hgtags 2014-04-20 12:39:29.000000000 -0700 -@@ -123,6 +123,7 @@ - 539e576793a8e64aaf160e0d6ab0b9723cd0bef0 jdk7-b146 - 69e973991866c948cf1808b06884ef2d28b64fcb jdk7u1-b01 - f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147 -+0870207843e2a74816dff1e33a717ffaf6f0a919 7u0 - 2baf612764d215e6f3a5b48533f74c6924ac98d7 jdk7u1-b02 - a4781b6d9cfb6901452579adee17c9a17c1b584c jdk7u1-b03 - b223ed9a5fdf8ce3af42adfa8815975811d70eae jdk7u1-b04 -@@ -342,3 +343,61 @@ - b479996d5c924128c3490165b592bf66a3034932 jdk7u40-b42 - fb25cdef17e9610db5cb89fc35c0c4abef5ad781 jdk7u40-b43 - ed444a09a5fd32237deaef6e43804e20ba4f6352 jdk7u40-b60 -+e045f6a3ad1d9f7b8982418addb3803ab63458f2 jdk7u40-b61 -+26cc60a250a0d333b1d5d7a9acb233ad62b2fb0b jdk7u40-b62 -+55f01444cf58c8004df9a9634c1bd7ff87caa370 jdk7u25-b32 -+b06abd965701459a868e88af9a3e564c0301971c jdk7u45-b01 -+d23a877da2d5dad6520a268c83f183295a9e7299 jdk7u45-b02 -+a56eb4f801232c409d34cd1190df4eec5fefe8a9 jdk7u45-b03 -+702c8d83dd8c5b6c76fe53a694244a36d23fa860 jdk7u45-b04 -+a70540e8a5e96773b83c7dc0accdb323d946c045 jdk7u45-b05 -+f39399baf36761571719f6ff5dc69c514d97842d jdk7u45-b06 -+a35d4a4ebcfa895202544c2f6b2d09e0b29bddfc jdk7u45-b07 -+2f01847eb9530ed5ec08b1b663f3a02cac57b048 jdk7u45-b08 -+6e2313d45f0c50d824531b32d3f577aa0b357551 jdk7u45-b09 -+d4506b816f63330489e00ba0b9e3c6583a8a9efa jdk7u45-b10 -+ee87452ba9e2b4b7d847bd2a7910a8aaeacfea7b jdk7u45-b11 -+d5e393a55e6adc2f1b9aaa752a5004fa07561480 jdk7u45-b12 -+34997920efe962b2e4422e2c2de8ae91cd1d563d jdk7u45-b13 -+59a78e4ca635a469a763ee408b11f8e1033f2584 jdk7u45-b14 -+96782fe0c38c41cc4806e27ee64b20dc647ea808 jdk7u45-b15 -+3c9a6d9eafd31be44b0ade0354e60f5078b417a4 jdk7u45-b16 -+3a65c1b0c6d15fb24298bcd133d7ab4baa741ae2 jdk7u45-b17 -+c5ca4daec23b5e7f99ac8d684f5016ff8bfebbb0 jdk7u45-b18 -+4797f984f6c93c433aa797e9b2d8f904cf083f96 jdk7u45-b30 -+8c343a783777b8728cb819938f387db0acf7f3ac jdk7u45-b31 -+402d54c7d8ce95f3945cc3d698e528e4adec7b9b jdk7u45-b33 -+34e8f9f26ae612ebac36357eecbe70ea20e0233c jdk7u45-b34 -+3dbb06a924cdf73d39b8543824ec88ae501ba5c6 jdk7u45-b35 -+3c9a6d9eafd31be44b0ade0354e60f5078b417a4 jdk7u51-b00 -+d76613074ff357d0664b97b4aaf99fbb65dcec47 jdk7u51-b01 -+fb057871f094ebe4906ad6856326768b01a62c45 jdk7u51-b02 -+6b3c195c73b051ee3c4a0ac44f050011414ab08b jdk7u51-b03 -+96431826ae3a927008c56aeefa1397a33bda3e70 jdk7u51-b04 -+8ee582bb96a6b79311d55a7170f42844af77a269 jdk7u51-b05 -+594ae80153afaeced6acedff5d37f889a9821690 jdk7u51-b06 -+7b84e6514c297861d85ed9457b2260805311d9e8 jdk7u51-b07 -+40fca6b57cd81114d4aace3d0469e20274f015c3 jdk7u51-b08 -+33ae35eeb5a4c04a4d05351ff68d4021e4cad752 jdk7u51-b09 -+4a6e31d94b29c7115235824a6e317289819bb00f jdk7u51-b10 -+f0425ecbbb0ca9d8c87c250c19e8f9524b38833d jdk7u51-b11 -+f5eee4f1d5b4a1e19febc9c26c863ae853ed6d2e jdk7u51-b12 -+d19a89fdfb9b959b8638441d9d396685d6c7ab7b jdk7u51-b13 -+ef58b2b9a9a1e1a42b0139b57816a160c4681371 jdk7u51-b30 -+5bca0d0969b13b1d9b8caba3cce8293a98d68318 jdk7u51-b31 -+f5eee4f1d5b4a1e19febc9c26c863ae853ed6d2e jdk7u55-b00 -+5010db5b9b5ab07a9409a5c557d3f43ab32dc428 jdk7u55-b01 -+2ca3e1fa4455ad564228ad6e654498167af2f20d jdk7u55-b02 -+c12b3c81366cb067ff4444952209d54bfa387353 jdk7u55-b03 -+476d1bddaa32bf440953c3b1814ba38f16886c03 jdk7u55-b04 -+7fa6d3ba2cc77cd1e6f24e33f0c39788cb2893b8 jdk7u55-b05 -+795654fce29c38d4c8504f760d8d8a36248d38ed jdk7u55-b06 -+4b2ed892b195e95f7541aaa3b129a2caa5faae1d jdk7u55-b07 -+db1323224053a18ecc62bdc1d3902d93b33f0b70 jdk7u55-b08 -+534eeff29ac9fcbbb99ef8908548dbb368d04baf jdk7u55-b09 -+d39dd4135844ca5c707bc39ae1d7e020d49880ce jdk7u55-b09 -+b231536550067c3b00c77d0e035afe8faaa15581 jdk7u55-b10 -+2d80b7cd7aae76f0909a210414317dcf846ad651 jdk7u55-b11 -+07be5d5508733ed37c11fcd21a13ae3c8288313b jdk7u55-b12 -+92fd166252c2701092a510002f4cf9285a20473d jdk7u55-b13 -+4a5651c84b1e6cf26dc9b19f00747e5004efba68 jdk7u55-b30 ---- jdk/make/bridge/Jabswitch/Makefile 2013-09-06 11:27:36.000000000 -0700 -+++ jdk/make/bridge/Jabswitch/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -53,7 +53,7 @@ - buildexe : - $(CD) $(TEMPDIR) - $(RC) $(RC_FLAGS) $(VERSIONINFO_RESOURCE) -- $(CC) $(CPPFLAGS) $(JAB_SRC) $(LDDFLAGS) $(VERSIONRES) -o $(JAB_EXE) -+ $(CC) $(CPPFLAGS) $(JAB_SRC) $(VERSIONRES) /link $(LDDFLAGS) -out:$(JAB_EXE) - $(MT) /nologo /verbose /manifest $(JAB_MANIFEST_INP) /outputresource:$(JAB_EXE) + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ca.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ - copyfilejab : ---- jdk/make/com/sun/jmx/Makefile 2013-09-06 11:27:36.000000000 -0700 -+++ jdk/make/com/sun/jmx/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - # --# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. - # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - # - # This code is free software; you can redistribute it and/or modify it -@@ -115,6 +115,8 @@ + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "S'ha definit m\u00e9s d'un full d'estils en el mateix fitxer."}, - ifeq ($(CROSS_COMPILE_ARCH),) - RMIC = $(RMIC_JAVA) $(JAVA_TOOLS_FLAGS) -cp $(OUTPUTDIR)/classes sun.rmi.rmic.Main -+else -+RMIC = $(BOOT_JAVA_CMD) $(JAVA_TOOLS_FLAGS) -cp $(OUTPUTDIR)/classes sun.rmi.rmic.Main - endif +@@ -853,12 +859,5 @@ + "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."} + }; - $(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class -@@ -130,11 +132,13 @@ - $(RMIC) -classpath "$(CLASSDESTDIR)" \ - -d $(CLASSDESTDIR) \ - -iiop -v1.2 \ -+ -emitPermissionCheck \ - $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) - $(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \ - -d $(CLASSDESTDIR) \ - -iiop -v1.2 \ - -standardPackage \ -+ -emitPermissionCheck \ - $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) - @$(java-vm-cleanup) +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_cs.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ ---- jdk/make/com/sun/nio/Makefile 2013-09-06 11:27:36.000000000 -0700 -+++ jdk/make/com/sun/nio/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -31,11 +31,18 @@ - include $(BUILDDIR)/common/Defs.gmk + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "V\u00edce ne\u017e jedna p\u0159edloha stylu je definov\u00e1na ve stejn\u00e9m souboru."}, - # MMM: disable for now --ifneq ($(PLATFORM), macosx) -+ifeq (,$(findstring $(PLATFORM), bsd macosx)) - include $(BUILDDIR)/common/Subdirs.gmk - SUBDIRS = sctp - endif +@@ -853,12 +859,5 @@ + "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."} + }; -+ifeq ($(OS_VENDOR), FreeBSD) -+# FreeBSD 5.x and lower are unsupported, 6.x has no sctp support. -+ifneq ($(call MajorVersion,$(shell uname -r)), 6) -+include $(BUILDDIR)/common/Subdirs.gmk -+SUBDIRS = sctp -+endif -+endif +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_de.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ - all build clean clobber:: - $(SUBDIRS-loop) ---- jdk/make/com/sun/nio/sctp/Makefile 2013-09-06 11:27:36.000000000 -0700 -+++ jdk/make/com/sun/nio/sctp/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -59,15 +59,11 @@ - -I$(PLATFORM_SRC)/native/java/net \ - -I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Mehrere Stylesheets in derselben Datei definiert."}, -+OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio - ifeq ($(PLATFORM), linux) - COMPILER_WARNINGS_FATAL=true --#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl --OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl -+OTHER_LDLIBS += -lpthread $(LIBDL) - endif --ifeq ($(PLATFORM), solaris) --#LIBSCTP = -lsctp --OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio --endif # PLATFORM +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: Feature kann nicht auf \"false\" gesetzt werden, wenn Security Manager vorhanden ist."} + }; - else # windows - include $(BUILDDIR)/common/Classes.gmk ---- jdk/make/com/sun/security/auth/module/Makefile 2013-09-06 11:27:36.000000000 -0700 -+++ jdk/make/com/sun/security/auth/module/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -67,7 +67,7 @@ - include FILES_c_solaris.gmk - endif # solaris +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_es.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ --ifneq (,$(findstring $(PLATFORM), linux macosx)) -+ifneq (,$(findstring $(PLATFORM), linux bsd macosx)) - LIBRARY = jaas_unix - include FILES_export_unix.gmk - include FILES_c_unix.gmk ---- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -43,7 +43,7 @@ - sun/tools/attach/LinuxVirtualMachine.java - endif + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Se ha definido m\u00E1s de una hoja de estilo en el mismo archivo."}, --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - FILES_export = \ - sun/tools/attach/BsdVirtualMachine.java - endif ---- jdk/make/com/sun/tools/attach/FILES_c.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -39,7 +39,7 @@ - LinuxVirtualMachine.c - endif +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: no se puede definir la funci\u00F3n en false cuando est\u00E1 presente el gestor de seguridad."} + }; --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - FILES_c = \ - BsdVirtualMachine.c - endif ---- jdk/make/com/sun/tools/attach/FILES_java.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -43,7 +43,7 @@ - sun/tools/attach/LinuxAttachProvider.java - endif +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_fr.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - FILES_java += \ - sun/tools/attach/BsdAttachProvider.java - endif ---- jdk/make/com/sun/tools/attach/Makefile 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -38,7 +38,7 @@ - ifeq ($(PLATFORM), linux) - FILES_m = mapfile-linux - endif --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - FILES_m = mapfile-bsd - endif - include $(BUILDDIR)/common/Mapfile-vers.gmk -@@ -57,7 +57,7 @@ - EXTRA_LIBS += psapi.lib - endif + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Plusieurs feuilles de style d\u00E9finies dans le m\u00EAme fichier."}, --ifeq ($PLATFORM), macosx) -+ifeq ($(PLATFORM), macosx) - vpath %.c $(call NativeSrcDirList,,native/sun/tools/attach) - else - vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach ---- jdk/make/com/sun/tools/attach/mapfile-bsd 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/com/sun/tools/attach/mapfile-bsd 2014-04-20 12:39:22.000000000 -0700 -@@ -30,6 +30,7 @@ - Java_sun_tools_attach_BsdVirtualMachine_checkPermissions; - Java_sun_tools_attach_BsdVirtualMachine_close; - Java_sun_tools_attach_BsdVirtualMachine_connect; -+ Java_sun_tools_attach_BsdVirtualMachine_getTempDir; - Java_sun_tools_attach_BsdVirtualMachine_open; - Java_sun_tools_attach_BsdVirtualMachine_sendQuitTo; - Java_sun_tools_attach_BsdVirtualMachine_socket; ---- jdk/make/common/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/make/common/Defs-bsd.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,482 @@ -+# -+# 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 -+# 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. -+# -+ -+# -+# Makefile to specify compiler flags for programs and libraries -+# targeted to BSD. Should not contain any rules. -+# -+# WARNING: This file is shared with other workspaces. -+# So when it includes other files, it must use JDK_TOPDIR. -+# -+ -+# Warning: the following variables are overriden by Defs.gmk. Set -+# values will be silently ignored: -+# CFLAGS (set $(OTHER_CFLAGS) instead) -+# CPPFLAGS (set $(OTHER_CPPFLAGS) instead) -+# CXXFLAGS (set $(OTHER_CXXFLAGS) instead) -+# LDFLAGS (set $(OTHER_LDFAGS) instead) -+# LDLIBS (set $(EXTRA_LIBS) instead) -+# LDLIBS_COMMON (set $(EXTRA_LIBS) instead) -+ -+# Get shared JDK settings -+include $(JDK_MAKE_SHARED_DIR)/Defs.gmk -+ -+# Part of INCREMENTAL_BUILD mechanism. -+# Compiler emits things like: path/file.o: file.h -+# We want something like: relative_path/file.o relative_path/file.d: file.h -+CC_DEPEND = -MM -+CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' -+ -+ifndef PLATFORM_SRC -+ PLATFORM_SRC = $(BUILDDIR)/../src/solaris -+endif # PLATFORM_SRC -+ -+# Location of the various .properties files specific to BSD platform -+ifndef PLATFORM_PROPERTIES -+ PLATFORM_PROPERTIES = $(BUILDDIR)/../src/solaris/lib -+endif # PLATFORM_SRC +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING : impossible de d\u00E9finir la fonctionnalit\u00E9 sur False en pr\u00E9sence du gestionnaire de s\u00E9curit\u00E9."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_it.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Sono stati definiti pi\u00F9 fogli di stile nello stesso file."}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se \u00E8 presente Security Manager."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ja.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "\u540C\u3058\u30D5\u30A1\u30A4\u30EB\u306B\u8907\u6570\u306E\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059\u3002"}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u304C\u5B58\u5728\u3059\u308B\u3068\u304D\u3001\u6A5F\u80FD\u3092false\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002"} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "\uB3D9\uC77C\uD55C \uD30C\uC77C\uC5D0 \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uAC00 \uB450 \uAC1C \uC774\uC0C1 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\uB9AC\uC790\uAC00 \uC788\uC744 \uACBD\uC6B0 \uAE30\uB2A5\uC744 false\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_pt_BR.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Mais de uma folha de estilos definida no mesmo arquivo."}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: N\u00E3o \u00E9 poss\u00EDvel definir o recurso como falso quando o gerenciador de seguran\u00E7a est\u00E1 presente."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sk.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Viac ne\u017e jeden \u0161t\u00fdl dokumentu bol definovan\u00fd v rovnakom s\u00fabore."}, + +@@ -853,12 +859,5 @@ + "FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_sv.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "Fler \u00E4n en formatmall har definierats i samma fil."}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: Funktionen kan inte anges till false om s\u00E4kerhetshanteraren anv\u00E4nds."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "\u540C\u4E00\u6587\u4EF6\u4E2D\u5B9A\u4E49\u4E86\u591A\u4E2A\u6837\u5F0F\u8868\u3002"}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: \u5B58\u5728 Security Manager \u65F6, \u65E0\u6CD5\u5C06\u6B64\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u5047\u201D\u3002"} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_TW.java 2014-06-06 19:56:13.000000000 -0700 +@@ -90,7 +90,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + {ErrorMsg.MULTIPLE_STYLESHEET_ERR, + "\u76F8\u540C\u6A94\u6848\u4E2D\u5B9A\u7FA9\u4E86\u8D85\u904E\u4E00\u500B\u6A23\u5F0F\u8868\u3002"}, + +@@ -913,12 +919,5 @@ + "FEATURE_SECURE_PROCESSING: \u5B89\u5168\u7BA1\u7406\u7A0B\u5F0F\u5B58\u5728\u6642\uFF0C\u7121\u6CD5\u5C07\u529F\u80FD\u8A2D\u70BA\u507D\u3002"} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java 2014-06-06 19:56:13.000000000 -0700 +@@ -955,6 +955,9 @@ + if (Double.isNaN(d) || Double.isInfinite(d)) + return(Double.toString(d)); + ++ //Convert -0.0 to +0.0 other values remains the same ++ d = d + 0.0; ++ + // Use the XPath formatter to ignore locales + StringBuffer result = threadLocalStringBuffer.get(); + result.setLength(0); +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "Use of the extension element ''{0}'' is not allowed when the secure processing feature is set to true."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java 2013-09-06 11:22:56.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ca.java 2014-06-06 19:56:13.000000000 -0700 +@@ -79,7 +79,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -223,13 +229,6 @@ + "No s''ha pogut resoldre la refer\u00e8ncia d''URI ''{0}''."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_cs.java 2014-06-06 19:56:13.000000000 -0700 +@@ -79,7 +79,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -223,13 +229,6 @@ + "Nelze p\u0159elo\u017eit odkazy URI ''{0}''."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_de.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "Verwendung des Erweiterungselements \"{0}\" ist nicht zul\u00E4ssig, wenn das Feature f\u00FCr die sichere Verarbeitung auf \"true\" gesetzt ist."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_es.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "El uso del elemento de extensi\u00F3n ''{0}'' no est\u00E1 permitido cuando la funci\u00F3n de procesamiento seguro se ha definido en true."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_fr.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "L''utilisation de l''\u00E9l\u00E9ment d''extension ''{0}'' n''est pas autoris\u00E9e lorsque la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 est d\u00E9finie sur True."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_it.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "Non \u00E8 consentito utilizzare l''elemento di estensione ''{0}'' se la funzione di elaborazione sicura \u00E8 impostata su true."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ja.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "\u30BB\u30AD\u30E5\u30A2\u51E6\u7406\u6A5F\u80FD\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u3068\u304D\u3001\u62E1\u5F35\u8981\u7D20''{0}''\u306E\u4F7F\u7528\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002"}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uC694\uC18C ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_pt_BR.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "O uso do elemento da extens\u00E3o ''{0}'' n\u00E3o ser\u00E1 permitido quando o recurso de processamento seguro for definido como verdadeiro."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sk.java 2014-06-06 19:56:13.000000000 -0700 +@@ -79,7 +79,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -223,13 +229,6 @@ + "Nebolo mo\u017en\u00e9 rozl\u00ed\u0161i\u0165 referenciu URI ''{0}''."} + }; + +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_sv.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "Anv\u00E4ndning av till\u00E4ggselementet ''{0}'' \u00E4r inte till\u00E5tet n\u00E4r s\u00E4ker bearbetning till\u00E4mpas."}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_CN.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_CN.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "\u5F53\u5B89\u5168\u5904\u7406\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D\u65F6, \u4E0D\u5141\u8BB8\u4F7F\u7528\u6269\u5C55\u5143\u7D20 ''{0}''\u3002"}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW.java 2014-06-06 19:56:13.000000000 -0700 +@@ -81,7 +81,13 @@ + */ + + // These message should be read from a locale-specific resource bundle +- private static final Object[][] _contents = new Object[][] { ++ /** Get the lookup table for error messages. ++ * ++ * @return The message lookup table. ++ */ ++ public Object[][] getContents() ++ { ++ return new Object[][] { + + /* + * Note to translators: the substitution text in the following message +@@ -276,13 +282,6 @@ + {BasisLibrary.UNALLOWED_EXTENSION_ELEMENT_ERR, + "\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u5143\u7D20 ''{0}''\u3002"}, + }; +- /** Get the lookup table for error messages. +- * +- * @return The message lookup table. +- */ +- public Object[][] getContents() +- { +- return _contents; + } + + } +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -29,7 +29,7 @@ + import javax.xml.transform.TransformerException; + import javax.xml.transform.URIResolver; + import javax.xml.transform.sax.TemplatesHandler; +- ++import com.sun.org.apache.xalan.internal.XalanConstants; + import com.sun.org.apache.xalan.internal.xsltc.compiler.CompilerException; + import com.sun.org.apache.xalan.internal.xsltc.compiler.Parser; + import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader; +@@ -95,7 +95,7 @@ + _tfactory = tfactory; + + // Instantiate XSLTC and get reference to parser object +- XSLTC xsltc = new XSLTC(tfactory.useServicesMechnism()); ++ XSLTC xsltc = new XSLTC(tfactory.useServicesMechnism(), tfactory.getFeatureManager()); + if (tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) + xsltc.setSecureProcessing(true); + +@@ -103,6 +103,8 @@ + (String)tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET)); + xsltc.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, + (String)tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD)); ++ xsltc.setProperty(XalanConstants.SECURITY_MANAGER, ++ tfactory.getAttribute(XalanConstants.SECURITY_MANAGER)); + + + if ("true".equals(tfactory.getAttribute(TransformerFactoryImpl.ENABLE_INLINING))) +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -23,6 +23,23 @@ + + package com.sun.org.apache.xalan.internal.xsltc.trax; + ++import com.sun.org.apache.xalan.internal.XalanConstants; ++import com.sun.org.apache.xalan.internal.utils.FactoryImpl; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; ++import com.sun.org.apache.xalan.internal.utils.FeaturePropertyBase; ++import com.sun.org.apache.xalan.internal.utils.ObjectFactory; ++import com.sun.org.apache.xalan.internal.utils.SecuritySupport; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager.Property; ++import com.sun.org.apache.xalan.internal.utils.FeaturePropertyBase.State; ++import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants; ++import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader; ++import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC; ++import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; ++import com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager; ++import com.sun.org.apache.xml.internal.utils.StopParseException; ++import com.sun.org.apache.xml.internal.utils.StylesheetPIHandler; + import java.io.File; + import java.io.FileInputStream; + import java.io.FileNotFoundException; +@@ -37,11 +54,9 @@ + import java.util.Vector; + import java.util.zip.ZipEntry; + import java.util.zip.ZipFile; +- + import javax.xml.XMLConstants; +-import javax.xml.parsers.SAXParserFactory; + import javax.xml.parsers.SAXParser; +-import javax.xml.parsers.ParserConfigurationException; ++import javax.xml.parsers.SAXParserFactory; + + import javax.xml.transform.ErrorListener; + import javax.xml.transform.Source; +@@ -58,26 +73,9 @@ + import javax.xml.transform.sax.SAXTransformerFactory; + import javax.xml.transform.sax.TemplatesHandler; + import javax.xml.transform.sax.TransformerHandler; ++import javax.xml.transform.stax.*; + import javax.xml.transform.stream.StreamResult; + import javax.xml.transform.stream.StreamSource; +-import javax.xml.transform.stax.*; +- +-import com.sun.org.apache.xml.internal.utils.StylesheetPIHandler; +-import com.sun.org.apache.xml.internal.utils.StopParseException; +- +-import com.sun.org.apache.xalan.internal.XalanConstants; +-import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants; +-import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader; +-import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC; +-import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; +-import com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager; +-import com.sun.org.apache.xalan.internal.utils.ObjectFactory; +-import com.sun.org.apache.xalan.internal.utils.FactoryImpl; +-import com.sun.org.apache.xalan.internal.utils.SecuritySupport; +-import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager; +-import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager.Property; +-import com.sun.org.apache.xalan.internal.utils.XMLSecurityPropertyManager.State; +- + import org.xml.sax.InputSource; + import org.xml.sax.XMLFilter; + import org.xml.sax.XMLReader; +@@ -227,17 +225,19 @@ + */ + private boolean _useServicesMechanism; + +- /** ++ /** + * protocols allowed for external references set by the stylesheet processing instruction, Import and Include element. + */ + private String _accessExternalStylesheet = XalanConstants.EXTERNAL_ACCESS_DEFAULT; +- + /** + * protocols allowed for external DTD references in source file and/or stylesheet. + */ + private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; + + private XMLSecurityPropertyManager _xmlSecurityPropertyMgr; ++ private XMLSecurityManager _xmlSecurityManager; + -+# BSD build pulls its platform sources from the solaris tree. -+JAVA_SRCDIR_LIST = src/macosx src/solaris src/share -+NATIVE_SRCDIR_LIST = src/macosx src/solaris src/share ++ private final FeatureManager _featureManager; + + /** + * javax.xml.transform.sax.TransformerFactory implementation. +@@ -253,10 +253,13 @@ + private TransformerFactoryImpl(boolean useServicesMechanism) { + this.m_DTMManagerClass = XSLTCDTMManager.getDTMManagerClass(useServicesMechanism); + this._useServicesMechanism = useServicesMechanism; ++ _featureManager = new FeatureManager(); + + if (System.getSecurityManager() != null) { + _isSecureMode = true; + _isNotSecureProcessing = false; ++ _featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION, ++ FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE); + } + + _xmlSecurityPropertyMgr = new XMLSecurityPropertyManager(); +@@ -264,6 +267,9 @@ + Property.ACCESS_EXTERNAL_DTD); + _accessExternalStylesheet = _xmlSecurityPropertyMgr.getValue( + Property.ACCESS_EXTERNAL_STYLESHEET); + -+# Platform specific closed sources -+ifndef OPENJDK -+ ifndef CLOSED_PLATFORM_SRC -+ CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris -+ endif -+endif ++ //Parser's security manager ++ _xmlSecurityManager = new XMLSecurityManager(true); + } + + /** +@@ -322,11 +328,21 @@ + return Boolean.TRUE; + else + return Boolean.FALSE; ++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++ return _xmlSecurityManager; + } + +- int index = _xmlSecurityPropertyMgr.getIndex(name); +- if (index > -1) { +- return _xmlSecurityPropertyMgr.getValueByIndex(index); ++ /** Check to see if the property is managed by the security manager **/ ++ String propertyValue = (_xmlSecurityManager != null) ? ++ _xmlSecurityManager.getLimitAsString(name) : null; ++ if (propertyValue != null) { ++ return propertyValue; ++ } else { ++ propertyValue = (_xmlSecurityPropertyMgr != null) ? ++ _xmlSecurityPropertyMgr.getValue(name) : null; ++ if (propertyValue != null) { ++ return propertyValue; ++ } + } + + // Throw an exception for all other attributes +@@ -429,10 +445,13 @@ + } + } + +- int index = _xmlSecurityPropertyMgr.getIndex(name); +- if (index > -1) { +- _xmlSecurityPropertyMgr.setValue(index, +- State.APIPROPERTY, (String)value); ++ if (_xmlSecurityManager != null && ++ _xmlSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { ++ return; ++ } + -+# platform specific include files -+PLATFORM_INCLUDE_NAME = $(OS_NAME) -+PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) ++ if (_xmlSecurityPropertyMgr != null && ++ _xmlSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { + _accessExternalDTD = _xmlSecurityPropertyMgr.getValue( + Property.ACCESS_EXTERNAL_DTD); + _accessExternalStylesheet = _xmlSecurityPropertyMgr.getValue( +@@ -482,6 +501,7 @@ + throw new TransformerConfigurationException(err.toString()); + } + _isNotSecureProcessing = !value; ++ _xmlSecurityManager.setSecureProcessing(value); + + // set external access restriction when FSP is explicitly set + if (value && XalanConstants.IS_JDK8_OR_ABOVE) { +@@ -495,6 +515,10 @@ + Property.ACCESS_EXTERNAL_STYLESHEET); + } + ++ if (value && _featureManager != null) { ++ _featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION, ++ FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE); ++ } + return; + } + else if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) { +@@ -503,6 +527,11 @@ + _useServicesMechanism = value; + } + else { ++ if (_featureManager != null && ++ _featureManager.setValue(name, State.APIPROPERTY, value)) { ++ return; ++ } + -+# suffix used for make dependencies files. -+DEPEND_SUFFIX = d -+# The suffix applied to the library name for FDLIBM -+FDDLIBM_SUFFIX = a -+# The suffix applied to scripts (.bat for windows, nothing for unix) -+SCRIPT_SUFFIX = -+# CC compiler object code output directive flag value -+CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! -+CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required! + // unknown feature + ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNSUPPORTED_FEATURE, name); + throw new TransformerConfigurationException(err.toString()); +@@ -551,6 +580,13 @@ + return !_isNotSecureProcessing; + } + ++ /** Check to see if the property is managed by the security manager **/ ++ String propertyValue = (_featureManager != null) ? ++ _featureManager.getValueAsString(name) : null; ++ if (propertyValue != null) { ++ return Boolean.parseBoolean(propertyValue); ++ } + -+# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is -+# enabled with debug info files ZIP'ed to save space. For VARIANT != -+# OPT builds, FDS is always enabled, after all a debug build without -+# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has -+# meaning when FDS is enabled. -+# -+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be -+# disabled for a VARIANT == OPT build. -+# -+# Note: Use of a different variable name for the FDS override option -+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS -+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass -+# in options via environment variables, use of distinct variables -+# prevents strange behaviours. For example, in a VARIANT != OPT build, -+# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the -+# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same -+# variable name is used, then different values can be picked up by -+# different parts of the build. Just to be clear, we only need two -+# variable names because the incoming option value can be overridden -+# in some situations, e.g., a VARIANT != OPT build. + // Feature not supported + return false; + } +@@ -561,6 +597,13 @@ + return _useServicesMechanism; + } + ++ /** ++ * @return the feature manager ++ */ ++ public FeatureManager getFeatureManager() { ++ return _featureManager; ++ } + -+ifeq ($(VARIANT), OPT) -+ FULL_DEBUG_SYMBOLS ?= 1 -+ ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) -+else -+ # debug variants always get Full Debug Symbols (if available) -+ ENABLE_FULL_DEBUG_SYMBOLS = 1 -+endif -+_JUNK_ := $(shell \ -+ echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") -+# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later + /** + * javax.xml.transform.sax.TransformerFactory implementation. + * Get the object that is used by default during the transformation to +@@ -841,7 +884,7 @@ + } + + // Create and initialize a stylesheet compiler +- final XSLTC xsltc = new XSLTC(_useServicesMechanism); ++ final XSLTC xsltc = new XSLTC(_useServicesMechanism, _featureManager); + if (_debug) xsltc.setDebug(true); + if (_enableInlining) + xsltc.setTemplateInlining(true); +@@ -851,6 +894,7 @@ + if (!_isNotSecureProcessing) xsltc.setSecureProcessing(true); + xsltc.setProperty(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, _accessExternalStylesheet); + xsltc.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD); ++ xsltc.setProperty(XalanConstants.SECURITY_MANAGER, _xmlSecurityManager); + xsltc.init(); + + // Set a document loader (for xsl:include/import) if defined +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java 2013-12-01 11:13:41.000000000 -0800 +@@ -25,6 +25,7 @@ + + import com.sun.org.apache.xalan.internal.XalanConstants; + import com.sun.org.apache.xalan.internal.utils.FactoryImpl; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; + import java.io.File; + import java.io.FileOutputStream; + import java.io.IOException; +@@ -218,6 +219,7 @@ + */ + private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; + ++ private XMLSecurityManager _securityManager; + /** + * A hashtable to store parameters for the identity transform. These + * are not needed during the transformation, but we must keep track of +@@ -272,8 +274,11 @@ + _useServicesMechanism = _tfactory.useServicesMechnism(); + _accessExternalStylesheet = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET); + _accessExternalDTD = (String)_tfactory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD); ++ _securityManager = (XMLSecurityManager)_tfactory.getAttribute(XalanConstants.SECURITY_MANAGER); + _readerManager = XMLReaderManager.getInstance(_useServicesMechanism); + _readerManager.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD); ++ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); ++ _readerManager.setProperty(XalanConstants.SECURITY_MANAGER, _securityManager); + //_isIncremental = tfactory._incremental; + } + +@@ -289,6 +294,7 @@ + */ + public void setSecureProcessing(boolean flag) { + _isSecureProcessing = flag; ++ _readerManager.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _isSecureProcessing); + } + /** + * Return the state of the services mechanism feature. +--- ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java 2013-12-01 11:13:41.000000000 -0800 +@@ -23,6 +23,7 @@ + + package com.sun.org.apache.xalan.internal.xsltc.trax; + ++import com.sun.org.apache.xalan.internal.XalanConstants; + import java.io.InputStream; + import java.io.Reader; + +@@ -43,6 +44,7 @@ + import javax.xml.transform.stream.StreamSource; + + import com.sun.org.apache.xalan.internal.utils.FactoryImpl; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC; + import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg; + +@@ -105,6 +107,13 @@ + if (reader == null) { + try { + reader= XMLReaderFactory.createXMLReader(); ++ try { ++ reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, ++ xsltc.isSecureProcessing()); ++ } catch (SAXNotRecognizedException e) { ++ System.err.println("Warning: " + reader.getClass().getName() + ": " ++ + e.getMessage()); ++ } + } catch (Exception e ) { + try { + +@@ -144,6 +153,22 @@ + + e.getMessage()); + } + ++ try { ++ XMLSecurityManager securityManager = ++ (XMLSecurityManager)xsltc.getProperty(XalanConstants.SECURITY_MANAGER); ++ if (securityManager != null) { ++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { ++ reader.setProperty(limit.apiProperty(), ++ securityManager.getLimitValueAsString(limit)); ++ } ++ if (securityManager.printEntityCountInfo()) { ++ reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); ++ } ++ } ++ } catch (SAXException se) { ++ System.err.println("Warning: " + reader.getClass().getName() + ": " ++ + se.getMessage()); ++ } + xsltc.setXMLReader(reader); + }catch (SAXNotRecognizedException snre ) { + throw new TransformerConfigurationException +--- ./jaxp/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java 2013-12-01 11:13:41.000000000 -0800 +@@ -33,6 +33,7 @@ + import com.sun.org.apache.xerces.internal.util.PropertyState; + import com.sun.org.apache.xerces.internal.util.SymbolTable; + import com.sun.org.apache.xerces.internal.utils.ObjectFactory; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler; + import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler; +@@ -59,6 +60,7 @@ + import org.w3c.dom.ls.LSResourceResolver; + + + -+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ # Default OBJCOPY comes from GNU Binutils on BSD: -+ DEF_OBJCOPY=/usr/bin/objcopy -+ ifdef CROSS_COMPILE_ARCH -+ # don't try to generate .debuginfo files when cross compiling -+ _JUNK_ := $(shell \ -+ echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \ -+ "skipping .debuginfo generation.") -+ OBJCOPY= -+ else -+ OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) -+ ifneq ($(ALT_OBJCOPY),) -+ _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") -+ # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path -+ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) -+ endif -+ endif + /** + * Xerces implementation of DOMConfiguration that maintains a table of recognized parameters. + * +@@ -156,6 +158,9 @@ + protected static final String SCHEMA_DV_FACTORY = + Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY; + ++ /** Property identifier: Security manager. */ ++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; + -+ # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the -+ # JDK build to import .debuginfo or .diz files from the HotSpot build. -+ # However, adding FDS support to the JDK build will occur in phases -+ # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS -+ # and PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS) is used to indicate that a -+ # particular library or program supports FDS. + /** Property identifier: Security property manager. */ + private static final String XML_SECURITY_PROPERTY_MANAGER = + Constants.XML_SECURITY_PROPERTY_MANAGER; +@@ -279,6 +284,7 @@ + JAXP_SCHEMA_LANGUAGE, + DTD_VALIDATOR_FACTORY_PROPERTY, + SCHEMA_DV_FACTORY, ++ SECURITY_MANAGER, + XML_SECURITY_PROPERTY_MANAGER + }; + addRecognizedProperties(recognizedProperties); +@@ -313,6 +319,8 @@ + fValidationManager = createValidationManager(); + setProperty(VALIDATION_MANAGER, fValidationManager); + ++ setProperty(SECURITY_MANAGER, new XMLSecurityManager(true)); + -+ ifeq ($(OBJCOPY),) -+ _JUNK_ := $(shell \ -+ echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") -+ ENABLE_FULL_DEBUG_SYMBOLS=0 -+ else -+ _JUNK_ := $(shell \ -+ echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") + setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, + new XMLSecurityPropertyManager()); + +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java 2013-12-01 11:13:41.000000000 -0800 +@@ -174,8 +174,6 @@ + /** JAXP schemaSource language: when used internally may include DTD namespace (DOM) */ + public static final String SCHEMA_LANGUAGE = "schemaLanguage"; + +- public static final String SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; +- + /** JAXP Standard property prefix ("http://javax.xml.XMLConstants/property/"). */ + public static final String JAXPAPI_PROPERTY_PREFIX = + "http://javax.xml.XMLConstants/property/"; +@@ -209,6 +207,107 @@ + public static final boolean IS_JDK8_OR_ABOVE = isJavaVersionAtLeast(8); + + // ++ // Implementation limits: corresponding System Properties of the above ++ // API properties ++ // ++ /** ++ * JDK entity expansion limit; Note that the existing system property ++ * "entityExpansionLimit" with no prefix is still observed ++ */ ++ public static final String JDK_ENTITY_EXPANSION_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "entityExpansionLimit"; + -+ # Library stripping policies for .debuginfo configs: -+ # all_strip - strips everything from the library -+ # min_strip - strips most stuff from the library; leaves minimum symbols -+ # no_strip - does not strip the library at all -+ # -+ # Oracle security policy requires "all_strip". A waiver was granted on -+ # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. -+ # -+ # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. -+ STRIP_POLICY ?= min_strip ++ /** ++ * JDK element attribute limit; Note that the existing system property ++ * "elementAttributeLimit" with no prefix is still observed ++ */ ++ public static final String JDK_ELEMENT_ATTRIBUTE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "elementAttributeLimit"; + -+ _JUNK_ := $(shell \ -+ echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") ++ /** ++ * JDK maxOccur limit; Note that the existing system property ++ * "maxOccurLimit" with no prefix is still observed ++ */ ++ public static final String JDK_MAX_OCCUR_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxOccurLimit"; + -+ ZIP_DEBUGINFO_FILES ?= 1 ++ /** ++ * JDK total entity size limit ++ */ ++ public static final String JDK_TOTAL_ENTITY_SIZE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "totalEntitySizeLimit"; + -+ _JUNK_ := $(shell \ -+ echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") -+ endif -+endif ++ /** ++ * JDK maximum general entity size limit ++ */ ++ public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit"; ++ /** ++ * JDK maximum parameter entity size limit ++ */ ++ public static final String JDK_PARAMETER_ENTITY_SIZE_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxParameterEntitySizeLimit"; ++ /** ++ * JDK maximum XML name limit ++ */ ++ public static final String JDK_XML_NAME_LIMIT = ++ ORACLE_JAXP_PROPERTY_PREFIX + "maxXMLNameLimit"; ++ /** ++ * JDK property to allow printing out information from the limit analyzer ++ */ ++ public static final String JDK_ENTITY_COUNT_INFO = ++ ORACLE_JAXP_PROPERTY_PREFIX + "getEntityCountInfo"; + -+# -+# Default optimization -+# ++ // ++ // Implementation limits: API properties ++ // ++ /** ++ * JDK entity expansion limit; Note that the existing system property ++ * "entityExpansionLimit" with no prefix is still observed ++ */ ++ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit"; + -+ifndef OPTIMIZATION_LEVEL -+ ifeq ($(PRODUCT), java) -+ OPTIMIZATION_LEVEL = HIGHER -+ else -+ OPTIMIZATION_LEVEL = LOWER -+ endif -+endif -+ifndef FASTDEBUG_OPTIMIZATION_LEVEL -+ FASTDEBUG_OPTIMIZATION_LEVEL = LOWER -+endif ++ /** ++ * JDK element attribute limit; Note that the existing system property ++ * "elementAttributeLimit" with no prefix is still observed ++ */ ++ public static final String SP_ELEMENT_ATTRIBUTE_LIMIT = "jdk.xml.elementAttributeLimit"; + -+CC_OPT/NONE = -+CC_OPT/LOWER = -O2 -+CC_OPT/HIGHER = -O3 -+CC_OPT/HIGHEST = -O3 ++ /** ++ * JDK maxOccur limit; Note that the existing system property ++ * "maxOccurLimit" with no prefix is still observed ++ */ ++ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit"; + -+CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) ++ /** ++ * JDK total entity size limit ++ */ ++ public static final String SP_TOTAL_ENTITY_SIZE_LIMIT = "jdk.xml.totalEntitySizeLimit"; + -+# For all platforms, do not omit the frame pointer register usage. -+# We need this frame pointer to make it easy to walk the stacks. -+# This should be the default on X86, but ia64 and amd64 may not have this -+# as the default. -+CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+LDFLAGS_COMMON_amd64 += -m64 -+CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+LDFLAGS_COMMON_i586 += -m32 -+CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 -+LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 -+CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 -+LDFLAGS_COMMON_sparc += -m32 -mcpu=v9 -+CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN -+ifeq ($(ZERO_BUILD), true) -+ CFLAGS_REQUIRED = $(ZERO_ARCHFLAG) -+ ifeq ($(ZERO_ENDIANNESS), little) -+ CFLAGS_REQUIRED += -D_LITTLE_ENDIAN -+ endif -+ LDFLAGS_COMMON += $(ZERO_ARCHFLAG) -+else -+ CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) -+ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) -+endif ++ /** ++ * JDK maximum general entity size limit ++ */ ++ public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit"; ++ /** ++ * JDK maximum parameter entity size limit ++ */ ++ public static final String SP_PARAMETER_ENTITY_SIZE_LIMIT = "jdk.xml.maxParameterEntitySizeLimit"; ++ /** ++ * JDK maximum XML name limit ++ */ ++ public static final String SP_XML_NAME_LIMIT = "jdk.xml.maxXMLNameLimit"; + -+# -+# Selection of warning messages -+# -+GCC_INHIBIT = -Wno-unused -Wno-parentheses -+GCC_STYLE = -+GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT) ++ //legacy System Properties ++ public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; ++ public static final String ELEMENT_ATTRIBUTE_LIMIT = "elementAttributeLimit" ; ++ public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; + -+# -+# Treat compiler warnings as errors, if warnings not allowed -+# -+ifeq ($(COMPILER_WARNINGS_FATAL),true) -+ GCC_WARNINGS += -Werror -+endif ++ /** ++ * A string "yes" that can be used for properties such as getEntityCountInfo ++ */ ++ public static final String JDK_YES = "yes"; + -+# -+# Misc compiler options -+# -+ifneq ($(ARCH),ppc) -+ CFLAGS_COMMON = -fno-strict-aliasing -+endif -+PIC_CODE_LARGE = -fPIC -+PIC_CODE_SMALL = -fpic -+GLOBAL_KPIC = $(PIC_CODE_LARGE) -+CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS) -+ifeq ($(ARCH), amd64) -+ CFLAGS_COMMON += -pipe -+endif ++ // + // DOM features + // + +@@ -443,7 +542,7 @@ + public static final String LOCALE_PROPERTY = "locale"; + + /** property identifier: security manager. */ +- protected static final String SECURITY_MANAGER = ++ public static final String SECURITY_MANAGER = + Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; + + +@@ -511,9 +610,6 @@ + */ + public final static String ATTRIBUTE_DECLARED = "ATTRIBUTE_DECLARED"; + +- public final static String ENTITY_EXPANSION_LIMIT = "entityExpansionLimit"; +- +- public final static String MAX_OCCUR_LIMIT = "maxOccurLimit"; + + /** + * {@link org.w3c.dom.TypeInfo} associated with current element/attribute +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java 2014-01-18 12:16:08.000000000 -0800 +@@ -25,6 +25,7 @@ + + package com.sun.org.apache.xerces.internal.impl; + ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.xml.internal.stream.StaxEntityResolverWrapper; + import java.util.HashMap; +@@ -50,12 +51,16 @@ + + private static final String STRING_INTERNING = "http://xml.org/sax/features/string-interning"; + ++ /** Property identifier: Security manager. */ ++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; + -+# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1 -+DEBUG_FLAG = -g -+ifeq ($(FASTDEBUG), true) -+ ifeq ($(ARCH_DATA_MODEL), 64) -+ DEBUG_FLAG = -g1 -+ endif -+endif -+ -+# DEBUG_BINARIES overrides everything, use full -g debug information -+ifeq ($(DEBUG_BINARIES), true) -+ DEBUG_FLAG = -g -+ CFLAGS_REQUIRED += $(DEBUG_FLAG) -+endif -+ -+# If Full Debug Symbols is enabled, then we want the same debug and -+# optimization flags as used by FASTDEBUG. -+# -+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) -+ ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1) -+ ifeq ($(VARIANT), OPT) -+ CC_OPT = $(DEBUG_FLAG) $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) -+ endif -+ endif -+endif -+ -+CFLAGS_OPT = $(CC_OPT) -+CFLAGS_DBG = $(DEBUG_FLAG) -+CFLAGS_COMMON += $(CFLAGS_REQUIRED) -+ -+CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS) -+CXXFLAGS_OPT = $(CC_OPT) -+CXXFLAGS_DBG = $(DEBUG_FLAG) -+CXXFLAGS_COMMON += $(CFLAGS_REQUIRED) -+ -+# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java -+ifeq ($(FASTDEBUG), true) -+ CFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) -+ CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) -+endif -+ -+CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"' -+ -+# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here) -+ifneq ($(ARCH),alpha) -+ CPP_ARCH_FLAGS += -D$(ARCH) -+else -+ CPP_ARCH_FLAGS += -D_$(ARCH)_ -+endif -+ -+CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ -+ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -+ -+ifeq ($(ARCH_DATA_MODEL), 64) -+CPPFLAGS_COMMON += -D_LP64=1 -+endif -+ -+CPPFLAGS_OPT = -DNDEBUG -+CPPFLAGS_DBG = -DDEBUG -+ifneq ($(PRODUCT), java) -+ CPPFLAGS_DBG += -DLOGGING -+endif -+ -+# Libraries need to locate other libraries at runtime, and you can tell -+# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) -+# buried inside the .so. The $ORIGIN says to look relative to where -+# the library itself is and it can be followed with relative paths from -+# that. By default we always look in $ORIGIN, optionally we add relative -+# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. -+# On BSD we add a flag -z origin, not sure if this is necessary, but -+# doesn't seem to hurt. -+# The environment variable LD_LIBRARY_PATH will over-ride these runpaths. -+# Try: 'readelf -d lib*.so' to see these settings in a library. -+# -+Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin -+Z_ORIGIN_FLAG/i586 = -Xlinker -z -Xlinker origin -+Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin -+Z_ORIGIN_FLAG/ia64 = -Xlinker -z -Xlinker origin -+Z_ORIGIN_FLAG/arm = -+Z_ORIGIN_FLAG/ppc = -+Z_ORIGIN_FLAG/zero = -Xlinker -z -Xlinker origin -+ -+LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY)) -+ -+LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN -+LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%) -+ -+# -+# -L paths for finding and -ljava -+# -+LDFLAGS_OPT = -Xlinker -O1 -+LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) -+LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) -+ -+# -+# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always -+# statically link libgcc but will print a warning with the flag. We don't -+# want the warning, so check gcc version first. -+# -+ifeq ($(CC_MAJORVER),3) -+ OTHER_LDFLAGS += -static-libgcc -+endif -+ -+# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) -+# (See Rules.gmk) The gcc 5 compiler might have an option for this? -+AUTOMATIC_PCH_OPTION = -+ -+# -+# Post Processing of libraries/executables -+# -+ifeq ($(VARIANT), OPT) -+ ifneq ($(NO_STRIP), true) -+ ifneq ($(DEBUG_BINARIES), true) -+ # Debug 'strip -S' leaves local function Elf symbols (better stack -+ # traces) -+ POST_STRIP_PROCESS = $(STRIP) -S -+ endif -+ endif -+endif -+ -+# -+# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o -+# -+LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker -+ -+# -+# Support for Quantify. -+# -+ifdef QUANTIFY -+QUANTIFY_CMD = quantify -+QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes -+LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS) -+endif -+ -+# Using map files currently break compilation on FreeBSD during shared library -+# checks for some of the AWT native libraries. -+ifeq ($(OS_VENDOR), FreeBSD) -+LDNOMAP=true -+endif -+ -+# -+# Path and option to link against the VM, if you have to. Note that -+# there are libraries that link against only -ljava, but they do get -+# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas -+# the library itself should not. -+# -+VM_NAME = server -+JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm -+JAVALIB = -ljava $(JVMLIB) -+ -+# -+# We want to privatize JVM symbols on Solaris. This is so the user can -+# write a function called FindClass and this should not override the -+# FindClass that is inside the JVM. At this point in time we are not -+# concerned with other JNI libraries because we hope that there will -+# not be as many clashes there. -+# -+PRIVATIZE_JVM_SYMBOLS = false -+ -+USE_PTHREADS = true -+override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME -+override AWT_RUNPATH = -+override HAVE_ALTZONE = false -+override HAVE_FILIOH = false -+override HAVE_GETHRTIME = false -+override HAVE_GETHRVTIME = false -+override LEX_LIBRARY = -lfl -+ifeq ($(STATIC_CXX),true) -+override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic -+else -+override LIBCXX = -lstdc++ -+endif -+override LIBPOSIX4 = -+override LIBSOCKET = -+override LIBNSL = -+override LIBSCF = -+override LIBTHREAD = -+override LIBDL = -+override MOOT_PRIORITIES = true -+override NO_INTERRUPTIBLE_IO = true -+override OPENWIN_HOME = $(X11_PATH) -+override OPENWIN_LIB = $(OPENWIN_HOME)/lib -+override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER -+override SUN_CMM_SUBDIR = -+override THREADS_FLAG = native -+override USE_GNU_M4 = true -+override USING_GNU_TAR = true -+override WRITE_LIBVERSION = false -+ -+# 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 -+# installation area. -+override USE_EXECNAME = true -+ -+# If your platform has DPS, it will have Type1 fonts too, in which case -+# it is best to enable DPS support until such time as 2D's rasteriser -+# can fully handle Type1 fonts in all cases. Default is "yes". -+# HAVE_DPS should only be "no" if the platform has no DPS headers or libs -+# DPS (Displayable PostScript) is available on Solaris machines -+HAVE_DPS = no -+ -+ifeq ($(OS_VENDOR), FreeBSD) -+ SYSTEM_ZLIB = true -+endif -+ -+ifeq ($(OS_VENDOR), OpenBSD) -+ SYSTEM_ZLIB = true -+endif -+ -+# -+# Japanese manpages -+# -+JA_SOURCE_ENCODING = eucJP -+JA_TARGET_ENCODINGS = UTF-8 -+ -+# Settings for the JDI - Serviceability Agent binding. -+HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) -+SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) -+SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo -+SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz -+ -+# The JDI - Serviceability Agent binding is not currently supported -+# on ia64. -+ifeq ($(ARCH), ia64) -+ INCLUDE_SA = false -+else -+ INCLUDE_SA = true -+endif -+ -+ifdef CROSS_COMPILE_ARCH -+ # X11 headers are not under /usr/include -+ OTHER_CFLAGS += -I$(OPENWIN_HOME)/include -+ OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include -+ OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include -+endif ---- jdk/make/common/Defs-embedded.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Defs-embedded.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -71,7 +71,9 @@ - # and it must be linked after fdlibm - this places it at the end after libc - # -z muldefs avoids linker errors for duplicate symbols. - ifeq ($(CROSS_COMPILE_ARCH), arm) -- EXTRA_LIBS += $(EXT_LIBS_PATH)/sflt_glibc_jdk.a -Xlinker -z -Xlinker muldefs -+ ifneq ($(EXT_LIBS_PATH),) -+ EXTRA_LIBS += $(EXT_LIBS_PATH)/sflt_glibc_jdk.a -Xlinker -z -Xlinker muldefs -+ endif - endif - endif + /** Property identifier: Security property manager. */ + private static final String XML_SECURITY_PROPERTY_MANAGER = + Constants.XML_SECURITY_PROPERTY_MANAGER; ---- jdk/make/common/Defs-linux.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Defs-linux.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -426,6 +426,7 @@ - override LIBDL = -ldl - override MOOT_PRIORITIES = true - override NO_INTERRUPTIBLE_IO = true -+override OPENWIN_HOME = $(X11_PATH) - ifeq ($(ARCH), amd64) - override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 - else ---- jdk/make/common/Defs-solaris.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Defs-solaris.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -753,6 +753,9 @@ - # Network Services library - LIBNSL = -lnsl + HashMap supportedProps = new HashMap(); -+# Dynamic Loading library -+LIBDL = -ldl -+ - # service configuration facility library - LIBSCF = -lscf ++ private XMLSecurityManager fSecurityManager; + private XMLSecurityPropertyManager fSecurityPropertyMgr; ---- jdk/make/common/Defs.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Defs.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -179,15 +179,15 @@ + public static final int CONTEXT_READER = 1; +@@ -82,6 +87,7 @@ - ifdef ALT_FREETYPE_LIB_PATH - FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH) -- ifeq ($(PLATFORM), macosx) -+ ifneq (,$(findstring $(PLATFORM), bsd macosx)) - USING_SYSTEM_FT_LIB=true - endif - else - ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) - FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib - else -- ifeq ($(PLATFORM), macosx) -- FREETYPE_LIB_PATH = /usr/X11R6/lib -+ ifneq (,$(findstring $(PLATFORM), bsd macosx)) -+ FREETYPE_LIB_PATH = $(X11_PATH)/lib - else - FREETYPE_LIB_PATH = /usr/lib - endif -@@ -201,8 +201,8 @@ - ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) - FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include - else -- ifeq ($(PLATFORM), macosx) -- FREETYPE_HEADERS_PATH = /usr/X11R6/include -+ ifneq (,$(findstring $(PLATFORM), bsd macosx)) -+ FREETYPE_HEADERS_PATH = $(X11_PATH)/include - else - FREETYPE_HEADERS_PATH = /usr/include - endif -@@ -258,6 +258,10 @@ - LDLIBS_COMMON = -pthread - endif + HashMap properties = propertyManager.getProperties(); + supportedProps.putAll(properties); ++ fSecurityManager = (XMLSecurityManager)getProperty(SECURITY_MANAGER); + fSecurityPropertyMgr = (XMLSecurityPropertyManager)getProperty(XML_SECURITY_PROPERTY_MANAGER); + } -+ ifeq ($(PLATFORM), bsd) -+ LDLIBS_COMMON = -pthread -+ endif -+ - endif # PROGRAM +@@ -124,6 +130,8 @@ + supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE, new Boolean(false)); + supportedProps.put(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_UNDECLARED_ELEMDEF_FEATURE, new Boolean(false)); - LDLIBS_COMMON += $(EXTRA_LIBS) -@@ -400,7 +404,7 @@ - # We define an intermediate variable for Java files because - # we use its value later to help define $SOURCEPATH ++ fSecurityManager = new XMLSecurityManager(true); ++ supportedProps.put(SECURITY_MANAGER, fSecurityManager); + fSecurityPropertyMgr = new XMLSecurityPropertyManager(); + supportedProps.put(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); + } +@@ -142,6 +150,7 @@ + */ + public boolean containsProperty(String property){ + return supportedProps.containsKey(property) || ++ (fSecurityManager != null && fSecurityManager.getIndex(property) > -1) || + (fSecurityPropertyMgr!=null && fSecurityPropertyMgr.getIndex(property) > -1) ; + } --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes)) - else - VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes ---- jdk/make/common/Library.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Library.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -299,8 +299,12 @@ - ifeq ($(PLATFORM), solaris) - $(STRIP) -x $@ - else -- # assume Linux -- $(STRIP) -g $@ -+ ifeq ($(PLATFORM), linux) -+ $(STRIP) -g $@ -+ else -+ # assume BSD -+ $(STRIP) -S $@ -+ endif - endif - # implied else here is no stripping at all - endif ---- jdk/make/common/Mapfile-vers.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Mapfile-vers.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -76,7 +76,7 @@ +@@ -169,12 +178,34 @@ + supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ; + } - endif # PLATFORM +- int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(property) : -1; +- if (index > -1) { +- fSecurityPropertyMgr.setValue(index, +- XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); +- } else { +- supportedProps.put(property, value); ++ /** ++ * It's possible for users to set a security manager through the interface. ++ * If it's the old SecurityManager, convert it to the new XMLSecurityManager ++ */ ++ if (property.equals(Constants.SECURITY_MANAGER)) { ++ fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager); ++ supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager); ++ return; ++ } ++ if (property.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { ++ if (value == null) { ++ fSecurityPropertyMgr = new XMLSecurityPropertyManager(); ++ } else { ++ fSecurityPropertyMgr = (XMLSecurityPropertyManager)value; ++ } ++ supportedProps.put(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); ++ return; ++ } ++ ++ //check if the property is managed by security manager ++ if (fSecurityManager == null || ++ !fSecurityManager.setLimit(property, XMLSecurityManager.State.APIPROPERTY, value)) { ++ //check if the property is managed by security property manager ++ if (fSecurityPropertyMgr == null || ++ !fSecurityPropertyMgr.setValue(property, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { ++ //fall back to the existing property manager ++ supportedProps.put(property, value); ++ } + } --ifeq ($(PLATFORM), linux) -+ifneq (,$(findstring $(PLATFORM), linux bsd)) + if(equivalentProperty != null){ +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java 2013-12-01 11:13:41.000000000 -0800 +@@ -108,6 +108,7 @@ + * @author Elena Litani, IBM + * @author Michael Glavassevich, IBM + * @author Sunitha Reddy, Sun Microsystems ++ * @version $Id: XML11NSDocumentScannerImpl.java,v 1.6 2010-11-01 04:39:40 joehw Exp $ + */ + public class XML11NSDocumentScannerImpl extends XML11DocumentScannerImpl { - ifeq ($(VARIANT), OPT) - # OPT build MUST have a mapfile? ---- jdk/make/common/Program.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Program.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -95,23 +95,31 @@ - endif # SYSTEM_ZLIB - endif # PLATFORM +@@ -236,7 +237,8 @@ -+ifeq ($(PLATFORM), bsd) -+ LDFLAGS += -Wl,--whole-archive -+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a -+ LDFLAGS += -Wl,--no-whole-archive -+# Work-around an dlsym(RTLD_DEFAULT) bug in at least FreeBSD & OpenBSD -+ LDFLAGS += -Wl,--export-dynamic -+ ifeq ($(SYSTEM_ZLIB),true) -+ OTHER_LDLIBS += -lz -+ endif -+endif #PLATFORM -+ - ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems - LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli - OTHER_LDLIBS += -ljli - ifeq ($(PLATFORM), solaris) - ifeq ($(ARCH_DATA_MODEL), 32) - LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli -- LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli - else # ! ARCH_DATA_MODEL 64-bit - LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli -- LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli - endif # ARCH_DATA_MODEL - endif # PLATFORM SOLARIS - ifeq ($(PLATFORM), linux) - LDFLAGS += $(LDFLAG_Z_ORIGIN) - LDFLAGS += -Wl,--allow-shlib-undefined - LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli -- LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli - endif # PLATFORM LINUX - endif # PLATFORM linux solaris + // attributes + scanAttribute(fAttributes); +- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ ++ if (fSecurityManager != null && (!fSecurityManager.isNoLimit(fElementAttributeLimit)) && ++ fAttributes.getLength() > fElementAttributeLimit){ + fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, + "ElementAttributeLimit", + new Object[]{rawname, new Integer(fElementAttributeLimit) }, +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java 2014-01-18 12:16:08.000000000 -0800 +@@ -44,6 +44,9 @@ + import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; + import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; + import com.sun.org.apache.xerces.internal.impl.Constants; ++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++import com.sun.xml.internal.stream.Entity; -@@ -226,6 +234,11 @@ - INFO_PLIST_FILE= - endif # MACOSX + /** + * This class is responsible for scanning the declarations found +@@ -66,7 +69,7 @@ + * @author Glenn Marcy, IBM + * @author Eric Ye, IBM + * +- * @version $Id: XMLDTDScannerImpl.java,v 1.7 2007/09/26 12:52:40 ndw Exp $ ++ * @version $Id: XMLDTDScannerImpl.java,v 1.8 2010-11-01 04:39:41 joehw Exp $ + */ + public class XMLDTDScannerImpl + extends XMLScanner +@@ -260,6 +263,11 @@ + fEntityManager.startDTDEntity(inputSource); + } // setInputSource(XMLInputSource) -+ ifeq ($(PLATFORM), bsd) -+ THREADLIBS = -pthread -+ OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"' -+ endif + - # - # This rule only applies on unix. It supports quantify and its ilk. - # -@@ -280,8 +293,12 @@ - ifeq ($(PLATFORM), solaris) - $(STRIP) -x $@ - else -- # assume Linux -- $(STRIP) -g $@ -+ ifeq ($(PLATFORM), linux) -+ $(STRIP) -g $@ -+ else -+ # assume BSD -+ $(STRIP) -S $@ -+ endif - endif - # implied else here is no stripping at all - endif -@@ -349,7 +366,9 @@ ++ public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) { ++ fLimitAnalyzer = limitAnalyzer; ++ } ++ + /** + * Scans the external subset of the document. + * +@@ -1545,7 +1553,7 @@ + // internal entity + if (systemId == null) { +- scanEntityValue(fLiteral, fLiteral2); ++ scanEntityValue(name, isPEDecl, fLiteral, fLiteral2); + // since we need it's value anyway, let's snag it so it doesn't get corrupted + // if a new load takes place before we store the entity values + fStringBuffer.clear(); +@@ -1610,7 +1618,7 @@ + * the use of scanCharReferenceValue), and fStringBuffer2, anything in them + * at the time of calling is lost. + */ +- protected final void scanEntityValue(XMLString value, ++ protected final void scanEntityValue(String entityName, boolean isPEDecl, XMLString value, + XMLString nonNormalizedValue) + throws IOException, XNIException { + int quote = fEntityScanner.scanChar(); +@@ -1622,10 +1630,20 @@ - ifneq ($(PLATFORM), windows) -- HAVE_GETHRTIME=true -+ ifneq ($(PLATFORM), bsd) -+ HAVE_GETHRTIME=true -+ endif - endif #PLATFORM + XMLString literal = fString; + XMLString literal2 = fString; ++ int countChar = 0; ++ if (fLimitAnalyzer == null ) { ++ fLimitAnalyzer = new XMLLimitAnalyzer(); ++ } ++ fLimitAnalyzer.startEntity(entityName); ++ + if (fEntityScanner.scanLiteral(quote, fString) != quote) { + fStringBuffer.clear(); + fStringBuffer2.clear(); + do { ++ if (isPEDecl && fLimitAnalyzer != null) { ++ checkLimit("%" + entityName, fString.length + countChar); ++ } ++ countChar = 0; + fStringBuffer.append(fString); + fStringBuffer2.append(fString); + if (fEntityScanner.skipChar('&')) { +@@ -1685,6 +1703,7 @@ + } + } + else { ++ countChar++; + int c = fEntityScanner.peekChar(); + if (XMLChar.isHighSurrogate(c)) { + scanSurrogates(fStringBuffer2); +@@ -1708,9 +1727,17 @@ + fStringBuffer2.append(fString); + literal = fStringBuffer; + literal2 = fStringBuffer2; ++ } else { ++ if (isPEDecl) { ++ checkLimit("%" + entityName, literal); ++ } + } + value.setValues(literal); + nonNormalizedValue.setValues(literal2); ++ if (fLimitAnalyzer != null) { ++ fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName); ++ } ++ + if (!fEntityScanner.skipChar(quote)) { + reportFatalError("CloseQuoteMissingInDecl", null); + } +@@ -2124,6 +2151,45 @@ + // set starting state + setScannerState(SCANNER_STATE_TEXT_DECL); + //new SymbolTable()); ++ ++ fLimitAnalyzer = new XMLLimitAnalyzer(); ++ } ++ ++ /** ++ * Add the count of the content buffer and check if the accumulated ++ * value exceeds the limit ++ * @param entityName entity name ++ * @param buffer content buffer ++ */ ++ private void checkLimit(String entityName, XMLString buffer) { ++ checkLimit(entityName, buffer.length); ++ } ++ ++ /** ++ * Add the count and check limit ++ * @param entityName entity name ++ * @param len length of the buffer ++ */ ++ private void checkLimit(String entityName, int len) { ++ if (fLimitAnalyzer == null) { ++ fLimitAnalyzer = new XMLLimitAnalyzer(); ++ } ++ fLimitAnalyzer.addValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName, len); ++ if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { ++ fSecurityManager.debugPrint(fLimitAnalyzer); ++ reportFatalError("MaxEntitySizeLimit", new Object[]{entityName, ++ fLimitAnalyzer.getValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)}); ++ } ++ if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { ++ fSecurityManager.debugPrint(fLimitAnalyzer); ++ reportFatalError("TotalEntitySizeLimit", ++ new Object[]{fLimitAnalyzer.getTotalValue(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)}); ++ } ++ + } - ifeq ($(HAVE_GETHRTIME),true) -@@ -359,12 +378,10 @@ - OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin - ifeq ($(PLATFORM), macosx) - OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin -- ifneq ($(SYSTEM_ZLIB), true) -- OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 -- endif # SYSTEM_ZLIB --else # PLATFORM !MACOSX -+endif # PLATFORM -+ifneq ($(SYSTEM_ZLIB), true) - OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 --endif -+endif # SYSTEM_ZLIB + public DTDGrammar getGrammar(){ +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java 2014-01-18 12:16:08.000000000 -0800 +@@ -50,12 +50,14 @@ + import com.sun.org.apache.xerces.internal.xni.Augmentations; + import com.sun.org.apache.xerces.internal.impl.Constants; + import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.NamespaceSupport; + import com.sun.org.apache.xerces.internal.utils.SecuritySupport; ++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.State; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.NamespaceContext; +-import com.sun.xml.internal.stream.Entity; + import javax.xml.XMLConstants; + import javax.xml.stream.XMLStreamConstants; + import javax.xml.stream.events.XMLEvent; +@@ -165,7 +167,7 @@ - OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"' - VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"' ---- jdk/make/common/Release.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Release.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -180,6 +180,12 @@ - JA_DIRNAME=ja_JP.UTF-8 - endif # linux + /** Feature identifier: standard uri conformant */ + protected static final String STANDARD_URI_CONFORMANT = +- Constants.XERCES_FEATURE_PREFIX +Constants.STANDARD_URI_CONFORMANT_FEATURE; ++ Constants.XERCES_FEATURE_PREFIX + Constants.STANDARD_URI_CONFORMANT_FEATURE; -+ifeq ($(PLATFORM), bsd) -+ MANBASEDIRS=$(JDK_TOPDIR)/src/linux/doc $(IMPORTDOCDIR) -+ MAN1SUBDIR=man -+ JA_DIRNAME=ja_JP.UTF-8 -+endif # linux -+ - define copy-man-pages - $(MKDIR) -p $1/man/man1 - for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ -@@ -852,10 +858,6 @@ - $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \ - -o meta-index *.jar - @$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup) --ifeq ($(PLATFORM), macosx) -- @#install jobjc, apple mac only -- $(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar --endif # macosx - ifeq ($(PLATFORM), windows) - @# Remove certain *.lib files - $(CD) $(JRE_IMAGE_DIR)/lib && \ -@@ -982,6 +984,11 @@ - endif - $(RM) -rf $(JDK_IMAGE_DIR)/jre/man - $(CHMOD) a+rx `$(FIND) $(JDK_IMAGE_DIR) -type d` -+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # If linux or solaris -+ ($(CD) $(LIBDIR)/.. && $(TAR) cf - \ -+ `$(FIND) lib -name $(LIB_PREFIX)jli.$(LIB_SUFFIX) -print `) | \ -+ ($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -) -+ endif # PLATFORM + /** Property identifier: Security property manager. */ + private static final String XML_SECURITY_PROPERTY_MANAGER = +@@ -213,11 +215,8 @@ + }; - initial-image-jdk64-bindemos: - for dir in bin demo ; do \ -@@ -1025,12 +1032,18 @@ - FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \ - $(wildcard $(PLATFORM_SRC)/bin/java_md*) + private static final char [] cdata = {'[','C','D','A','T','A','['}; +- private static final char [] endTag = {'<','/'}; +- +- //this variable is also used by XMLDocumentScannerImpl in the same package + static final char [] xmlDecl = {'<','?','x','m','l'}; +- ++ private static final char [] endTag = {'<','/'}; + // debugging -+ifeq ($(OS_VENDOR), OpenBSD) -+ FILES_FROM_ARG=-I -+else -+ FILES_FROM_ARG=-T -+endif + /** Debug scanner state. */ +@@ -316,6 +315,7 @@ + protected String fDeclaredEncoding = null; + /** Xerces Feature: Disallow doctype declaration. */ + protected boolean fDisallowDoctype = false; + - # Standard jdk image - initial-image-jdk:: initial-image-jdk-setup \ - initial-image-jdk-db \ - $(JDK_DOCFILES) \ - $(JDK_DEMOS_AND_SAMPLES_DOCFILES) -- $(MKDIR) $(JDK_IMAGE_DIR)/lib -+ $(MKDIR) -p $(JDK_IMAGE_DIR)/lib - @# - @# Copy in the jars in lib that only belong in the JDK - @# -@@ -1112,7 +1125,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. + /** + * comma-delimited list of protocols that are allowed for the purpose + * of accessing external dtd or entity references +@@ -384,7 +384,6 @@ -- ifneq (,$(findstring $(PLATFORM), linux macosx)) -+ ifneq (,$(findstring $(PLATFORM), linux macosx bsd)) - for d in $(SOURCE_DIRS); do \ - $(RM) $(ABS_TEMPDIR)/src-files.list; \ - ($(CD) $$d && \ -@@ -1125,7 +1138,7 @@ - done ; \ - ) ; \ - if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ -- ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \ -+ ($(CD) $$d && $(TAR) cf - $(FILES_FROM_ARG) $(ABS_TEMPDIR)/src-files.list ) \ - | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \ - fi; \ - done ---- jdk/make/common/Rules.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/Rules.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -51,7 +51,7 @@ - # - # All source tree areas for java/properties files (a few may be closed) - # --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - ifdef OPENJDK - ALL_CLASSES_SRC = $(call JavaSrcDirList,,classes) - else -@@ -212,7 +212,7 @@ - $(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java - @$(add-java-file) + protected boolean foundBuiltInRefs = false; --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - # TODO(cpc): need to document why this is necessary... - $(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java - @$(add-java-file) ---- jdk/make/common/shared/Compiler-gcc.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/shared/Compiler-gcc.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -72,6 +72,21 @@ +- protected SecurityManager fSecurityManager = null; - endif + //skip element algorithm + static final short MAX_DEPTH_LIMIT = 5 ; +@@ -570,46 +569,24 @@ -+ifeq ($(PLATFORM), bsd) -+ -+ # Settings specific to BSD -+ CC = $(COMPILER_PATH)gcc -+ CPP = $(COMPILER_PATH)gcc -E -+ CXX = $(COMPILER_PATH)g++ -+ -+ # Option used to create a shared library -+ ifeq ($(OS_VENDOR), Apple) -+ SHARED_LIBRARY_FLAG = -dynamiclib -+ else -+ SHARED_LIBRARY_FLAG = -shared -+ endif -+endif -+ - ifeq ($(PLATFORM), solaris) + // xerces features + fReportCdataEvent = componentManager.getFeature(Constants.STAX_REPORT_CDATA_EVENT, true); +- +- fSecurityManager = (SecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null); +- fElementAttributeLimit = (fSecurityManager != null)?fSecurityManager.getElementAttrLimit():0; +- ++ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null); + fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS, false); - # 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 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,267 @@ -+# -+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. -+# 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. -+# + Object resolver = componentManager.getProperty(ENTITY_RESOLVER, null); + fExternalSubsetResolver = (resolver instanceof ExternalSubsetResolver) ? + (ExternalSubsetResolver) resolver : null; + +- // initialize vars +- fMarkupDepth = 0; +- fCurrentElement = null; +- fElementStack.clear(); +- fHasExternalDTD = false; +- fStandaloneSet = false; +- fStandalone = false; +- fInScanContent = false; +- //skipping algorithm +- fShouldSkip = false; +- fAdd = false; +- fSkip = false; +- + //attribute + fReadingAttributes = false; + //xxx: external entities are supported in Xerces + // it would be good to define feature for this case + fSupportExternalEntities = true; +- fSupportExternalEntities = true; +- fSupportExternalEntities = true; +- fSupportExternalEntities = true; + fReplaceEntityReferences = true; + fIsCoalesce = false; + + // setup Driver + setScannerState(SCANNER_STATE_CONTENT); + setDriver(fContentDriver); +- fEntityStore = fEntityManager.getEntityStore(); +- +- dtdGrammarUtil = null; + + // JAXP 1.5 features and properties + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) +@@ -618,6 +595,7 @@ + + fStrictURI = componentManager.getFeature(STANDARD_URI_CONFORMANT, false); + ++ resetCommon(); + //fEntityManager.test(); + } // reset(XMLComponentManager) + +@@ -631,17 +609,7 @@ + fNamespaces = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue(); + fNotifyBuiltInRefs = false ; + +- // initialize vars +- fMarkupDepth = 0; +- fCurrentElement = null; +- fShouldSkip = false; +- fAdd = false; +- fSkip = false; +- fElementStack.clear(); + //fElementStack2.clear(); +- fHasExternalDTD = false; +- fStandaloneSet = false; +- fStandalone = false; + //fReplaceEntityReferences = true; + //fSupportExternalEntities = true; + Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_REPLACING_ENTITY_REFERENCES); +@@ -662,17 +630,43 @@ + //we dont need to do this -- nb. + //setScannerState(SCANNER_STATE_CONTENT); + //setDriver(fContentDriver); +- fEntityStore = fEntityManager.getEntityStore(); + //fEntityManager.test(); + +- dtdGrammarUtil = null; +- +- // JAXP 1.5 features and properties ++ // JAXP 1.5 features and properties + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) + propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); + fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); + -+# -+# Definitions for BSD. -+# ++ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(Constants.SECURITY_MANAGER); ++ resetCommon(); + } // reset(XMLComponentManager) + ++ void resetCommon() { ++ // initialize vars ++ fMarkupDepth = 0; ++ fCurrentElement = null; ++ fElementStack.clear(); ++ fHasExternalDTD = false; ++ fStandaloneSet = false; ++ fStandalone = false; ++ fInScanContent = false; ++ //skipping algorithm ++ fShouldSkip = false; ++ fAdd = false; ++ fSkip = false; + -+# Default for COMPILER_WARNINGS_FATAL on BSD (C & C++ compiler warnings) -+ifndef COMPILER_WARNINGS_FATAL -+ COMPILER_WARNINGS_FATAL=false -+endif ++ fEntityStore = fEntityManager.getEntityStore(); ++ dtdGrammarUtil = null; + -+# BSD should use parallel compilation for best build times -+ifndef COMPILE_APPROACH -+ COMPILE_APPROACH = parallel -+endif ++ if (fSecurityManager != null) { ++ fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT); ++ } else { ++ fElementAttributeLimit = 0; ++ } ++ fLimitAnalyzer = new XMLLimitAnalyzer(); ++ fEntityManager.setLimitAnalyzer(fLimitAnalyzer); ++ } + -+# Indication that we are doing an incremental build. -+# This may trigger the creation of make depend files. -+ifndef INCREMENTAL_BUILD -+ INCREMENTAL_BUILD = false -+endif + /** + * Returns a list of feature identifiers that are recognized by + * this component. This method may return null if no features +@@ -769,10 +763,10 @@ + + //JAXP 1.5 properties + if (propertyId.equals(XML_SECURITY_PROPERTY_MANAGER)) +- { ++ { + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)value; + fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); +- } ++ } + + } // setProperty(String,Object) + +@@ -1322,10 +1316,11 @@ + fAddDefaultAttr = true; + do { + scanAttribute(fAttributes); +- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ ++ if (fSecurityManager != null && !fSecurityManager.isNoLimit(fElementAttributeLimit) && ++ fAttributes.getLength() > fElementAttributeLimit){ + fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, + "ElementAttributeLimit", +- new Object[]{rawname, new Integer(fAttributes.getLength()) }, ++ new Object[]{rawname, fElementAttributeLimit }, + XMLErrorReporter.SEVERITY_FATAL_ERROR ); + } + +@@ -2036,6 +2031,13 @@ + + } // getDriverName():String + ++ /** ++ * Check the protocol used in the systemId against allowed protocols ++ * ++ * @param systemId the Id of the URI ++ * @param allowedProtocols a list of allowed protocols separated by comma ++ * @return the name of the protocol if rejected, null otherwise ++ */ + String checkAccess(String systemId, String allowedProtocols) throws IOException { + String baseSystemId = fEntityScanner.getBaseSystemId(); + String expandedSystemId = fEntityManager.expandSystemId(systemId, baseSystemId,fStrictURI); +@@ -2833,6 +2835,8 @@ + if(DEBUG){ + System.out.println("NOT USING THE BUFFER, STRING = " + fTempString.toString()); + } ++ //check limit before returning event ++ checkLimit(fContentBuffer); + if(dtdGrammarUtil!= null && dtdGrammarUtil.isIgnorableWhiteSpace(fContentBuffer)){ + if(DEBUG)System.out.println("Return SPACE EVENT"); + return XMLEvent.SPACE; +@@ -2931,6 +2935,8 @@ + fLastSectionWasCharacterData = true ; + continue; + }else{ ++ //check limit before returning event ++ checkLimit(fContentBuffer); + if(dtdGrammarUtil!= null && dtdGrammarUtil.isIgnorableWhiteSpace(fContentBuffer)){ + if(DEBUG)System.out.println("Return SPACE EVENT"); + return XMLEvent.SPACE; +@@ -3141,6 +3147,30 @@ + } //while loop + }//next + ++ /** ++ * Add the count of the content buffer and check if the accumulated ++ * value exceeds the limit ++ * @param buffer content buffer ++ */ ++ protected void checkLimit(XMLStringBuffer buffer) { ++ if (fLimitAnalyzer.isTracking(fCurrentEntityName)) { ++ fLimitAnalyzer.addValue(Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length); ++ if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { ++ fSecurityManager.debugPrint(fLimitAnalyzer); ++ reportFatalError("MaxEntitySizeLimit", new Object[]{fCurrentEntityName, ++ fLimitAnalyzer.getValue(Limit.GENEAL_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getStateLiteral(Limit.GENEAL_ENTITY_SIZE_LIMIT)}); ++ } ++ if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { ++ fSecurityManager.debugPrint(fLimitAnalyzer); ++ reportFatalError("TotalEntitySizeLimit", ++ new Object[]{fLimitAnalyzer.getTotalValue(Limit.TOTAL_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT), ++ fSecurityManager.getStateLiteral(Limit.TOTAL_ENTITY_SIZE_LIMIT)}); ++ } ++ } ++ } + + // + // Protected methods +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java 2014-01-18 12:16:08.000000000 -0800 +@@ -1090,6 +1090,8 @@ + + ((XMLDTDScannerImpl)fDTDScanner).reset(fPropertyManager); + } + -+# FullPath just makes sure it never ends with a / and no duplicates -+define FullPath -+$(shell cd $1 2> $(DEV_NULL) && pwd) -+endef -+ -+# OptFullPath: Absolute path name of a dir that might not initially exist. -+define OptFullPath -+$(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) -+ -+# UNIXCOMMAND_PATH: path to where the most common Unix commands are. -+# NOTE: Must end with / so that it could be empty, allowing PATH usage. -+ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined" -+ UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH)) -+else -+ UNIXCOMMAND_PATH = /bin/ -+endif -+ -+# USRBIN_PATH: path to where the most common Unix commands are. -+# NOTE: Must end with / so that it could be empty, allowing PATH usage. -+ifneq "$(origin ALT_USRBIN_PATH)" "undefined" -+ USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH)) -+else -+ USRBIN_PATH = /usr/bin/ -+endif -+ -+# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found -+# NOTE: Must end with / so that it could be empty, allowing PATH usage. -+ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined" -+ UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH)) -+else -+ UNIXCCS_PATH = /usr/ccs/bin/ -+endif -+ -+# SLASH_JAVA: location of all network accessable files -+ifdef ALT_SLASH_JAVA -+ SLASH_JAVA :=$(ALT_SLASH_JAVA) -+else -+ SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET) -+endif -+ -+# JDK_DEVTOOLS_DIR: common path for all the java devtools -+ifdef ALT_JDK_DEVTOOLS_DIR -+ JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR) -+else -+ JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools -+endif -+ -+# COMPILER_PATH: path to where the compiler and tools are installed. -+# NOTE: Must end with / so that it could be empty, allowing PATH usage. -+ifneq "$(origin ALT_COMPILER_PATH)" "undefined" -+ COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH)) -+else -+ COMPILER_PATH =/usr/bin/ -+endif -+ -+# OPENWIN_HOME: path to where the X11 environment is installed. -+# NOTE: Must end with / so that it could be empty, allowing PATH usage. -+ifneq ($(ALT_OPENWIN_HOME),) -+ OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME)) -+else -+ OPENWIN_HOME =$(X11_PATH) -+endif -+ -+# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.) -+# NOTE: Must end with / so that it could be empty, allowing PATH usage. -+ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined" -+ DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH)) -+else -+ DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/ -+endif -+ -+# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK. -+# _BOOTDIR2: Second choice -+ifndef ALT_BOOTDIR -+ _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH) -+ _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION) -+endif -+ -+# Always build headless on BSD -+BUILD_HEADLESS = true -+LIBM=-lm -+ -+# Set ZLIB_LIBS if not already set -+ifeq ("$(ZLIB_LIBS)", "") -+ ZLIB_LIBS=-lz -+endif -+ -+_CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include -+ -+# Import JDK images allow for partial builds, components not built are -+# imported (or copied from) these import areas when needed. -+ -+# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for -+# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc. -+ifdef ALT_BUILD_JDK_IMPORT_PATH -+ BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH)) -+else -+ BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES) -+endif -+BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH) -+ -+# JDK_IMPORT_PATH: location of JDK install tree (this version) to import -+ifdef ALT_JDK_IMPORT_PATH -+ JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH)) -+else -+ JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT) -+endif -+JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH) -+ -+# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files -+ifdef ALT_HOTSPOT_IMPORT_PATH -+ HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH)) -+else -+ HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH) -+endif -+HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH) -+ -+# HOTSPOT_CLIENT_PATH: location of client jvm library file. -+ifeq ($(ARCH_DATA_MODEL), 32) -+ ifdef ALT_HOTSPOT_CLIENT_PATH -+ HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH)) -+ else -+ HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client -+ endif -+ HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH) -+endif -+ -+# HOTSPOT_SERVER_PATH: location of server jvm library file. -+ifdef ALT_HOTSPOT_SERVER_PATH -+ HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH)) -+else -+ HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server -+endif -+HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH) -+ -+# Special define for checking the binaries -+ -+# Debug builds should downgrade warnings to just info -+MAPFILE_WARNING-DBG=INFO -+MAPFILE_WARNING-OPT=WARNING -+MAPFILE_WARNING-=WARNING -+MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT)) -+ -+# Macro to check it's input file for banned dependencies and verify the -+# binary built properly. Relies on process exit code. -+ifndef CROSS_COMPILE_ARCH -+ifeq ($(OS_VENDOR), OpenBSD) -+define binary_file_verification # binary_file -+( \ -+ $(ECHO) "Checking for mapfile use in: $1" && \ -+ if [ "`$(OBJDUMP) -T $1 | $(EGREP) '[0-9a-f]* g *DF \.text.*SUNWprivate'`" = "" ] ; then \ -+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \ -+ fi && \ -+ $(ECHO) "Library loads for: $1" && \ -+ $(LDD) $1 && \ -+ $(ECHO) "RUNPATH for: $1" && \ -+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \ -+) || true -+endef -+else -+define binary_file_verification # binary_file -+( \ -+ $(ECHO) "Checking for mapfile use in: $1" && \ -+ if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \ -+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \ -+ fi && \ -+ $(ECHO) "Library loads for: $1" && \ -+ $(LDD) $1 && \ -+ $(ECHO) "RUNPATH for: $1" && \ -+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \ -+) -+endef -+endif -+else -+define binary_file_verification -+( \ -+ $(ECHO) "Skipping binary file verification for cross-compile build" \ -+) -+endef -+endif -+ ---- jdk/make/common/shared/Defs-utils.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/shared/Defs-utils.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -74,6 +74,13 @@ - UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) - endif ++ fDTDScanner.setLimitAnalyzer(fLimitAnalyzer); + do { + again = false; + switch (fScannerState) { +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2014-01-18 12:16:08.000000000 -0800 +@@ -18,19 +18,17 @@ + * limitations under the License. + */ -+ifeq ($(PLATFORM),bsd) -+ UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) -+ UTILS_USR_BIN_PATH=$(USRBIN_PATH) -+ UTILS_CCS_BIN_PATH=$(USRBIN_PATH) -+ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) -+endif -+ - # Utilities - ifdef CROSS_COMPILE_ARCH - AR = $(COMPILER_PATH)ar -@@ -251,3 +258,35 @@ - # Builtin shell command, no -e option needed - ECHO = echo - endif -+ -+# BSD specific -+ifeq ($(PLATFORM),bsd) -+ BASENAME = $(UTILS_USR_BIN_PATH)basename -+ EGREP = $(UTILS_USR_BIN_PATH)egrep -+ EXPR = $(UTILS_COMMAND_PATH)expr -+ FMT = $(UTILS_USR_BIN_PATH)fmt -+ GREP = $(UTILS_USR_BIN_PATH)grep -+ GUNZIP = $(UTILS_USR_BIN_PATH)gunzip -+ ID = $(UTILS_USR_BIN_PATH)id -+ MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt -+ SED = $(UTILS_USR_BIN_PATH)sed -+ SORT = $(UTILS_USR_BIN_PATH)sort -+ TEST = $(UTILS_COMMAND_PATH)test -+ TOUCH = $(UTILS_USR_BIN_PATH)touch -+ TRUE = $(UTILS_USR_BIN_PATH)true -+ UNAME = $(UTILS_USR_BIN_PATH)uname -+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip -+ # BSD OS_VENDOR specific -+ ifeq ($(OS_VENDOR), OpenBSD) -+ NAWK = $(UTILS_USR_BIN_PATH)awk -+ OBJDUMP = $(UTILS_USR_BIN_PATH)objdump -+ else -+ CPIO = $(UTILS_USR_BIN_PATH)cpio -+ TAR = $(UTILS_USR_BIN_PATH)tar -+ endif -+ ifeq ($(OS_VENDOR), NetBSD) -+ NAWK = $(UTILS_USR_BIN_PATH)awk -+ ZIPEXE = $(UTILS_DEVTOOL_PATH)zip -+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip -+ endif -+endif ---- jdk/make/common/shared/Defs-versions.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/shared/Defs-versions.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -44,6 +44,11 @@ - override CC_VERSION = gcc - endif +-package com.sun.org.apache.xerces.internal.impl ; ++package com.sun.org.apache.xerces.internal.impl; -+# BSD uses GNU compilers by default -+ifeq ($(PLATFORM), bsd) -+ override CC_VERSION = gcc -+endif -+ - # Mac OS X uses LLVM by default - ifeq ($(PLATFORM), macosx) - override CC_VERSION = llvm -@@ -169,6 +174,13 @@ - endif - endif +-import com.sun.org.apache.xerces.internal.impl.Constants; + import com.sun.org.apache.xerces.internal.impl.io.ASCIIReader; + import com.sun.org.apache.xerces.internal.impl.io.UCSReader; + import com.sun.org.apache.xerces.internal.impl.io.UTF8Reader; + import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; +-import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; + import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager; + import com.sun.org.apache.xerces.internal.util.*; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; +-import com.sun.org.apache.xerces.internal.util.URI; + import com.sun.org.apache.xerces.internal.utils.SecuritySupport; ++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.Augmentations; + import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; +@@ -174,7 +172,6 @@ + /** access external dtd: file protocol */ + static final String EXTERNAL_ACCESS_DEFAULT = Constants.EXTERNAL_ACCESS_DEFAULT; -+# BSD specific -+ifeq ($(PLATFORM), macosx) -+ REQUIRED_COMPILER_NAME = GCC4 -+ REQUIRED_COMPILER_VERSION = GCC4 -+ REQUIRED_CC_VER = 4.2.1 -+endif -+ - # Mac specific - ifeq ($(PLATFORM), macosx) - REQUIRED_OS_NAME = Darwin ---- jdk/make/common/shared/Defs.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/shared/Defs.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -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 - # macosx trees, depending on the component. --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), bsd macosx)) - define JavaSrcDirList - $(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2) - endef -@@ -296,10 +296,8 @@ - RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE) - endif +- + // recognized features and properties --# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set --ifdef BUILD_NUMBER -- FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) --else -+# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set -+ifndef BUILD_NUMBER - BUILD_NUMBER = b00 - ifndef USER_RELEASE_SUFFIX - BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M') -@@ -307,6 +305,12 @@ - USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' ) - endif - export USER_RELEASE_SUFFIX -+endif + /** Recognized features. */ +@@ -307,6 +304,7 @@ + + /** used to restrict external access */ + protected String fAccessExternalDTD = EXTERNAL_ACCESS_DEFAULT; + -+# FULL_VERSION is RELEASE and BUILD_NUMBER if USER_RELEASE_SUFFIX is not set -+ifndef USER_RELEASE_SUFFIX -+ FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) -+else - FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) - endif + // settings ---- jdk/make/common/shared/Platform.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/common/shared/Platform.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -298,6 +298,85 @@ - # How much RAM does this machine have: - endif + /** +@@ -324,9 +322,12 @@ + */ + protected int fBufferSize = DEFAULT_BUFFER_SIZE; -+ifeq ($(SYSTEM_UNAME), FreeBSD) -+ PLATFORM = bsd -+ OS_NAME = freebsd -+ OS_VENDOR = FreeBSD -+ REQUIRED_OS_VERSION = 6.0 -+endif -+ -+ifeq ($(SYSTEM_UNAME), NetBSD) -+ PLATFORM = bsd -+ OS_NAME = netbsd -+ OS_VENDOR = NetBSD -+ REQUIRED_OS_VERSION = 3.0 -+endif -+ -+ifeq ($(SYSTEM_UNAME), OpenBSD) -+ PLATFORM = bsd -+ OS_NAME = openbsd -+ OS_VENDOR = OpenBSD -+ REQUIRED_OS_VERSION = 4.9 -+endif -+ -+# Platform settings specific to BSD -+ifeq ($(PLATFORM), bsd) -+ OS_VERSION := $(shell uname -r) -+ # Arch and OS name/version -+ mach := $(shell uname -m) -+ archExpr = case "$(mach)" in \ -+ i[3-9]86) \ -+ echo i586 \ -+ ;; \ -+ sparc64) \ -+ echo sparcv9 \ -+ ;; \ -+ sparc*) \ -+ echo sparc \ -+ ;; \ -+ x86_64) \ -+ echo amd64 \ -+ ;; \ -+ "Power Macintosh") \ -+ echo ppc \ -+ ;; \ -+ *) \ -+ echo $(mach) \ -+ ;; \ -+ esac -+ ARCH := $(shell $(archExpr) ) -+ ARCH_FAMILY := $(ARCH) -+ -+ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64 -+ ifneq (,$(findstring $(ARCH), i586 sparc ppc)) -+ ARCH_DATA_MODEL=32 -+ else -+ ARCH_DATA_MODEL=64 -+ endif -+ -+ # Need to maintain the jre/lib/i386 location for 32-bit Intel -+ ifeq ($(ARCH), i586) -+ LIBARCH = i386 -+ else -+ LIBARCH = $(ARCH) -+ endif -+ -+ # Value of Java os.arch property -+ ARCHPROP = $(LIBARCH) +- // stores defaults for entity expansion limit if it has +- // been set on the configuration. +- protected SecurityManager fSecurityManager = null; ++ /** Security Manager */ ++ protected XMLSecurityManager fSecurityManager = null; + -+ # Suffix for file bundles used in previous release -+ BUNDLE_FILE_SUFFIX=.tar.gz -+ # Minimum disk space needed as determined by running 'du -sk' on -+ # a fully built workspace. -+ REQUIRED_FREE_SPACE=1500000 -+ # How much RAM does this machine have: -+ ifeq ($(OS_VENDOR), OpenBSD) -+ MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) -+ else -+ MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' ) -+ endif -+endif ++ protected XMLLimitAnalyzer fLimitAnalyzer = null; + - # Windows with and without CYGWIN will be slightly different - ifeq ($(SYSTEM_UNAME), Windows_NT) - PLATFORM = windows ---- jdk/make/java/Makefile 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -53,14 +53,10 @@ - endif - endif # PLATFORM ++ protected int entityExpansionIndex; --ifeq ($(PLATFORM), linux) -+ifneq (,$(findstring $(PLATFORM), linux bsd)) - SUBDIRS += jexec - endif # PLATFORM + /** + * True if the document entity is standalone. This should really +@@ -352,10 +353,6 @@ + /** XML 1.1 entity scanner. */ + protected XMLEntityScanner fXML11EntityScanner; --ifeq ($(PLATFORM), macosx) -- SUBDIRS += jobjc --endif # PLATFORM +- /** entity expansion limit (contains useful data if and only if +- fSecurityManager is non-null) */ +- protected int fEntityExpansionLimit = 0; - - include $(BUILDDIR)/common/Subdirs.gmk + /** count of entities expanded: */ + protected int fEntityExpansionCount = 0; - all build clean clobber:: ---- jdk/make/java/instrument/Makefile 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/instrument/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -104,12 +104,24 @@ - # equivalent of strcasecmp is stricmp on Windows - CPPFLAGS_COMMON += -Dstrcasecmp=stricmp - else --ifneq (,$(findstring $(PLATFORM), macosx)) -- ifneq ($(ARCH), universal) -- LDFLAGS += -Wl,-all_load -+ifneq (,$(findstring $(PLATFORM), macosx bsd)) -+ ifeq ($(OS_VENDOR), Apple) -+ ifneq ($(ARCH), universal) -+ LDFLAGS += -Wl,-all_load -+ endif -+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a -+ OTHER_LDLIBS += -liconv -+ else -+ LDFLAGS += -Wl,--whole-archive -+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a -+ LDFLAGS += -Wl,--no-whole-archive -+ ifneq ($(OS_NAME), netbsd) -+# Use CPPFLAGS instead of OTHER_INCLUDES to force this last -+ CPPFLAGS += -I$(PACKAGE_PATH)/include -+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv -+ endif - endif -- LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a -- OTHER_LDLIBS += -liconv -+ - ifeq ($(SYSTEM_ZLIB), true) - OTHER_LDLIBS += -lz - endif ---- jdk/make/java/java/Exportedfiles.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/java/Exportedfiles.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -50,6 +50,7 @@ - java/lang/SecurityManager.java \ - java/lang/Shutdown.java \ - java/lang/Package.java \ -+ java/lang/UNIXProcess.java \ - java/lang/ref/Finalizer.java \ - java/lang/reflect/AccessibleObject.java \ - java/lang/reflect/Field.java \ ---- jdk/make/java/java/Makefile 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/java/Makefile 2014-04-28 17:39:02.000000000 -0700 -@@ -84,6 +84,7 @@ - java/util/prefs/FileSystemPreferencesFactory.java \ - - FILES_c += UNIXProcess_md.c \ -+ childproc.c \ - UnixFileSystem_md.c \ - canonicalize_md.c \ - TimeZone.c \ -@@ -175,9 +176,11 @@ - # - ifneq ($(PLATFORM), windows) - ifneq ($(PLATFORM), macosx) -+ifneq ($(PLATFORM), bsd) - HAVE_ALTZONE=true - endif - endif -+endif +@@ -833,6 +830,9 @@ + fCurrentEntity.setEncodingExternallySpecified(encodingExternallySpecified); + fEntityScanner.setCurrentEntity(fCurrentEntity); + fResourceIdentifier.setValues(publicId, literalSystemId, baseSystemId, expandedSystemId); ++ if (fLimitAnalyzer != null) { ++ fLimitAnalyzer.startEntity(name); ++ } + return encoding; + } //setupCurrentEntity(String, XMLInputSource, boolean, boolean): String - ifeq ($(HAVE_ALTZONE),true) - OTHER_CPPFLAGS += -DHAVE_ALTZONE -@@ -451,3 +454,39 @@ - clean:: - $(RM) $(GENSRCDIR)/sun/util/CoreResourceBundleControl.java +@@ -1294,10 +1294,13 @@ + //expansions exceeds the entity expansion limit, parser will throw fatal error. + // Note that this represents the nesting level of open entities. + fEntityExpansionCount++; +- if( fSecurityManager != null && fEntityExpansionCount > fEntityExpansionLimit ){ +- fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, +- "EntityExpansionLimitExceeded", +- new Object[]{new Integer(fEntityExpansionLimit) }, ++ if(fLimitAnalyzer != null) { ++ fLimitAnalyzer.addValue(entityExpansionIndex, name, 1); ++ } ++ if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex, fLimitAnalyzer)){ ++ fSecurityManager.debugPrint(fLimitAnalyzer); ++ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimitExceeded", ++ new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)}, + XMLErrorReporter.SEVERITY_FATAL_ERROR ); + // is there anything better to do than reset the counter? + // at least one can envision debugging applications where this might +@@ -1361,6 +1364,12 @@ + if(fCurrentEntity != null){ + //close the reader + try{ ++ if (fLimitAnalyzer != null) { ++ fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name); ++ if (fCurrentEntity.name.equals("[xml]")) { ++ fSecurityManager.debugPrint(fLimitAnalyzer); ++ } ++ } + fCurrentEntity.close(); + }catch(IOException ex){ + throw new XNIException(ex); +@@ -1426,6 +1435,8 @@ + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); + fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); ++ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); + -+HELPER_EXE = $(LIBDIR)/$(LIBARCH)/jspawnhelper -+BUILDHELPER = -+ifeq ($(PLATFORM), solaris) -+ BUILDHELPER = 1 -+endif -+ifeq ($(PLATFORM), macosx) -+ HELPER_EXE = $(LIBDIR)/jspawnhelper -+ BUILDHELPER = 1 -+endif -+ifeq ($(PLATFORM), bsd) -+ BUILDHELPER = 1 -+endif -+ -+ARCHFLAG = -+ifeq ($(ARCH_DATA_MODEL), 64) -+ARCHFLAG = -m64 -+endif -+ -+ifdef BUILDHELPER -+ -+HELPER_EXE_FILES_c = jspawnhelper.c -+HELPER_EXE_FILES_o = $(OBJDIR)/jspawnhelper.o \ -+ $(OBJDIR)/childproc.o -+ -+$(HELPER_EXE): $(HELPER_EXE_FILES_o) -+ $(CC) $(ARCHFLAG) $(HELPER_EXE_FILES_o) \ -+ -o $(TEMPDIR)/jspawnhelper -+ $(CP) $(TEMPDIR)/jspawnhelper $(HELPER_EXE) -+ -+build: $(HELPER_EXE) -+ -+clean clobber:: -+ $(RM) $(HELPER_EXE_FILES_o) $(HELPER_EXE) -+ -+endif #BUILDHELPER ---- jdk/make/java/java/genlocales.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/java/genlocales.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -93,18 +93,66 @@ + // initialize state + //fStandalone = false; + fEntities.clear(); +@@ -1485,7 +1496,8 @@ + fEntityResolver = (XMLEntityResolver)componentManager.getProperty(ENTITY_RESOLVER, null); + fStaxEntityResolver = (StaxEntityResolverWrapper)componentManager.getProperty(STAX_ENTITY_RESOLVER, null); + fValidationManager = (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER, null); +- fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); ++ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); ++ entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT); - else + // JAXP 1.5 feature + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null); +@@ -1506,7 +1518,6 @@ + // a class acting as a component manager but not + // implementing that interface for whatever reason. + public void reset() { +- fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0; -+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 -+ -+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; + // initialize state + fStandalone = false; +@@ -1642,17 +1653,20 @@ + } + if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() && + propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) { +- fSecurityManager = (SecurityManager)value; +- fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0; ++ fSecurityManager = (XMLSecurityManager)value; + } + } + + //JAXP 1.5 properties + if (propertyId.equals(XML_SECURITY_PROPERTY_MANAGER)) +- { ++ { + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)value; + fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); ++ } + } + -+else ++ public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) { ++ this.fLimitAnalyzer = fLimitAnalyzer; + } + + /** +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java 2014-01-18 12:16:08.000000000 -0800 +@@ -58,6 +58,7 @@ + * @author Neeraj Bajaj, Sun Microsystems + * @author Venugopal Rao K, Sun Microsystems + * @author Elena Litani, IBM ++ * @version $Id: XMLNSDocumentScannerImpl.java,v 1.11 2010-11-01 04:39:41 joehw Exp $ + */ + public class XMLNSDocumentScannerImpl + extends XMLDocumentScannerImpl { +@@ -251,10 +252,11 @@ + + do { + scanAttribute(fAttributes); +- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ ++ if (fSecurityManager != null && (!fSecurityManager.isNoLimit(fElementAttributeLimit)) && ++ fAttributes.getLength() > fElementAttributeLimit){ + fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, + "ElementAttributeLimit", +- new Object[]{rawname, new Integer(fAttributes.getLength()) }, ++ new Object[]{rawname, fElementAttributeLimit }, + XMLErrorReporter.SEVERITY_FATAL_ERROR ); + } + +--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java 2013-09-06 11:22:57.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java 2013-12-01 11:13:41.000000000 -0800 +@@ -32,6 +32,8 @@ + import com.sun.org.apache.xerces.internal.util.XMLChar; + import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl; + import com.sun.org.apache.xerces.internal.util.XMLStringBuffer; ++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.xni.Augmentations; + import com.sun.org.apache.xerces.internal.xni.XMLAttributes; + import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; +@@ -106,6 +108,9 @@ + protected static final String ENTITY_MANAGER = + Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY; + ++ /** Property identifier: Security manager. */ ++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; + - $(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 + // debugging + + /** Debug attribute normalization. */ +@@ -159,6 +164,12 @@ + /** xxx this should be available from EntityManager Entity storage */ + protected XMLEntityStorage fEntityStore = null ; + ++ /** Security manager. */ ++ protected XMLSecurityManager fSecurityManager = null; + -+endif ++ /** Limit analyzer. */ ++ protected XMLLimitAnalyzer fLimitAnalyzer = null; + -+endif - - genlocales : $(LocaleDataMetaInfo_Dest) - ---- jdk/make/java/java/mapfile-vers 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/java/mapfile-vers 2014-04-20 12:39:22.000000000 -0700 -@@ -215,7 +215,7 @@ - Java_java_lang_Throwable_fillInStackTrace; - Java_java_lang_Throwable_getStackTraceDepth; - Java_java_lang_Throwable_getStackTraceElement; -- Java_java_lang_UNIXProcess_initIDs; -+ Java_java_lang_UNIXProcess_init; - Java_java_lang_UNIXProcess_waitForProcessExit; - Java_java_lang_UNIXProcess_forkAndExec; - Java_java_lang_UNIXProcess_destroyProcess; ---- jdk/make/java/jli/Makefile 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/jli/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -119,9 +119,9 @@ - LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"' - endif # PLATFORM + // protected data --ifeq ($(PLATFORM), macosx) -+ifneq (,$(findstring $(PLATFORM), macosx bsd)) - OTHER_CPPFLAGS += $(LIBARCH_DEFINES) -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" --else # ! MACOSX -+else # ! MACOSX || BSD - OTHER_CPPFLAGS += $(LIBARCH_DEFINES) - endif #PLATFORM + /** event type */ +@@ -256,6 +267,7 @@ + fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE); + fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER); + fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER); ++ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER); -@@ -134,7 +134,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 -- LDLIBS = -ldl -lc -+ LDLIBS = $(LIBDL) -lc - ifeq ($(USE_PTHREADS),true) - LDLIBS += -lpthread - endif # USE_PTHREADS ---- jdk/make/java/management/mapfile-vers 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/management/mapfile-vers 2014-04-20 12:39:22.000000000 -0700 -@@ -53,7 +53,7 @@ - Java_sun_management_GcInfoBuilder_fillGcAttributeInfo; - Java_sun_management_GcInfoBuilder_getLastGcInfo0; - Java_sun_management_GcInfoBuilder_getNumGcExtAttributes; -- Java_sun_management_HotSpotDiagnostic_dumpHeap; -+ Java_sun_management_HotSpotDiagnostic_dumpHeap0; - Java_sun_management_HotspotThread_getInternalThreadCount; - Java_sun_management_HotspotThread_getInternalThreadTimes0; - Java_sun_management_MemoryImpl_getMemoryManagers0; ---- jdk/make/java/net/FILES_c.gmk 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/net/FILES_c.gmk 2014-04-20 12:39:22.000000000 -0700 -@@ -24,20 +24,21 @@ - # + //this step is extra because we have separated the storage of entity + fEntityStore = fEntityManager.getEntityStore() ; +@@ -293,6 +305,10 @@ + fEntityManager = (XMLEntityManager)value; + } + } ++ ++ if (propertyId.equals(SECURITY_MANAGER)) { ++ fSecurityManager = (XMLSecurityManager)value; ++ } + /*else if(propertyId.equals(Constants.STAX_PROPERTIES)){ + fStaxProperties = (HashMap)value; + //TODO::discuss with neeraj what are his thoughts on passing properties. +@@ -352,6 +368,8 @@ + fEntityManager = (XMLEntityManager)propertyManager.getProperty(ENTITY_MANAGER); + fEntityStore = fEntityManager.getEntityStore() ; + fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ; ++ fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); ++ + //fEntityManager.reset(); + // DTD preparsing defaults: + fValidation = false; +@@ -499,7 +517,7 @@ + reportFatalError("SDDeclInvalid", new Object[] {standalone}); + } + } else { +- reportFatalError("EncodingDeclRequired", null); ++ reportFatalError("SDDeclNameInvalid", null); + } + break; + } +@@ -510,8 +528,9 @@ + sawSpace = fEntityScanner.skipSpaces(); + } + // restore original literal value +- if(currLiteral) ++ if(currLiteral) { + currEnt.literal = true; ++ } + // REVISIT: should we remove this error reporting? + if (scanningTextDecl && state != STATE_DONE) { + reportFatalError("MorePseudoAttributes", null); +@@ -564,7 +583,7 @@ + XMLString value) + throws IOException, XNIException { - FILES_c = \ -- DatagramPacket.c \ -- InetAddress.c \ -- Inet4Address.c \ -- Inet6Address.c \ -- NetworkInterface.c \ -- InetAddressImplFactory.c \ -- Inet4AddressImpl.c \ -- Inet6AddressImpl.c \ -- SocketInputStream.c \ -- SocketOutputStream.c \ -- net_util.c \ -- net_util_md.c \ -- ResolverConfigurationImpl.c \ -- DefaultProxySelector.c -+ DatagramPacket.c \ -+ InetAddress.c \ -+ Inet4Address.c \ -+ Inet6Address.c \ -+ NetworkInterface.c \ -+ InetAddressImplFactory.c \ -+ Inet4AddressImpl.c \ -+ Inet6AddressImpl.c \ -+ SocketInputStream.c \ -+ SocketOutputStream.c \ -+ net_util.c \ -+ net_util_md.c \ -+ portconfig.c \ -+ ResolverConfigurationImpl.c \ -+ DefaultProxySelector.c +- String name = fEntityScanner.scanName(); ++ String name = scanPseudoAttributeName(); + // XMLEntityManager.print(fEntityManager.getCurrentEntity()); - ifeq ($(PLATFORM), linux) - FILES_c += linux_close.c -@@ -47,6 +48,10 @@ - FILES_c += bsd_close.c - endif + if (name == null) { +@@ -617,6 +636,35 @@ + } // scanPseudoAttribute(XMLString):String -+ifeq ($(OS_VENDOR), FreeBSD) -+ FILES_c += bsd_close.c -+endif + /** ++ * Scans the name of a pseudo attribute. The only legal names ++ * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'. ++ * ++ * @return the name of the pseudo attribute or null ++ * if a legal pseudo attribute name could not be scanned. ++ */ ++ private String scanPseudoAttributeName() throws IOException, XNIException { ++ final int ch = fEntityScanner.peekChar(); ++ switch (ch) { ++ case 'v': ++ if (fEntityScanner.skipString(fVersionSymbol)) { ++ return fVersionSymbol; ++ } ++ break; ++ case 'e': ++ if (fEntityScanner.skipString(fEncodingSymbol)) { ++ return fEncodingSymbol; ++ } ++ break; ++ case 's': ++ if (fEntityScanner.skipString(fStandaloneSymbol)) { ++ return fStandaloneSymbol; ++ } ++ break; ++ } ++ return null; ++ } // scanPseudoAttributeName() + - ifeq ($(PLATFORM), windows) - FILES_c += TwoStacksPlainSocketImpl.c - FILES_c += DualStackPlainSocketImpl.c ---- jdk/make/java/net/Makefile 2013-09-06 11:27:37.000000000 -0700 -+++ jdk/make/java/net/Makefile 2014-04-20 12:39:22.000000000 -0700 -@@ -83,7 +83,8 @@ - # Find platform specific native code - # - vpath %.c $(PLATFORM_SRC)/native/sun/net/dns $(PLATFORM_SRC)/native/sun/net/www/protocol/http/ntlm \ -- $(PLATFORM_SRC)/native/sun/net/sdp $(PLATFORM_SRC)/native/sun/net/spi -+ $(PLATFORM_SRC)/native/sun/net/sdp $(PLATFORM_SRC)/native/sun/net/spi \ -+ $(PLATFORM_SRC)/native/sun/net - - # - # Include rules -@@ -92,7 +93,7 @@ ++ /** + * Scans a processing instruction. + *

+ *

+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	2013-09-06 11:22:58.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -44,6 +44,7 @@
+         
+ # 2.9 Standalone Document Declaration
+         SDDeclInvalid = The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\".
++        SDDeclNameInvalid = The standalone name in XML declaration may be misspelled.
+ # 2.12 Language Identification
+         XMLLangInvalid = The xml:lang attribute value \"{0}\" is an invalid language identifier.
+ # 3. Logical Structures
+@@ -292,8 +293,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
  
- include $(BUILDDIR)/common/Library.gmk
  
--ifeq ($(PLATFORM), macosx)
-+ifneq (,$(findstring $(PLATFORM), macosx bsd))
- ifdef DONT_ENABLE_IPV6
-   OTHER_CFLAGS += -DDONT_ENABLE_IPV6
- endif
---- jdk/make/java/net/mapfile-vers	2013-09-06 11:27:37.000000000 -0700
-+++ jdk/make/java/net/mapfile-vers	2014-04-20 12:39:22.000000000 -0700
-@@ -26,84 +26,86 @@
- # Define public interface.
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the application.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the JDK.
++        ElementAttributeLimit=JAXP00010002:  Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the JDK.
++        MaxEntitySizeLimit=JAXP00010003: The length of entity \"{0}\" is \"{1}\" that exceeds the \"{2}\" limit set by \"{3}\".
++        TotalEntitySizeLimit=JAXP00010004: The accumulated size \"{0}\" of entities exceeded the \"{1}\" limit set by \"{2}\".
++        MaxXMLNameLimit=JAXP00010005: The name \"{0}\" exceeded the \"{1}\" limit set by \"{2}\".
  
- SUNWprivate_1.1 {
--	global:
--		JNI_OnLoad;
--		Java_java_net_PlainSocketImpl_socketListen;
--		Java_java_net_PlainDatagramSocketImpl_getTTL;
--		Java_java_net_PlainDatagramSocketImpl_init;
--		Java_java_net_SocketOutputStream_socketWrite0;
--		Java_java_net_PlainSocketImpl_socketCreate;
--		Java_java_net_PlainSocketImpl_socketAvailable;
--		Java_java_net_PlainDatagramSocketImpl_join;
--		Java_java_net_PlainDatagramSocketImpl_socketGetOption;
--		Java_java_net_InetAddress_init;
--		Java_java_net_Inet4Address_init;
--		Java_java_net_Inet6Address_init;
--		Java_java_net_PlainDatagramSocketImpl_setTTL;
--		Java_java_net_PlainDatagramSocketImpl_socketSetOption;
--		Java_java_net_PlainDatagramSocketImpl_bind0;
--		Java_java_net_PlainSocketImpl_socketAccept;
--		Java_java_net_DatagramPacket_init;
--		Java_java_net_PlainDatagramSocketImpl_leave;
--		Java_java_net_SocketInputStream_socketRead0;
--		Java_java_net_InetAddressImplFactory_isIPv6Supported;
--		Java_java_net_Inet4AddressImpl_getLocalHostName;
--		Java_java_net_Inet4AddressImpl_lookupAllHostAddr;
--		Java_java_net_Inet4AddressImpl_getHostByAddr;
--		Java_java_net_Inet4AddressImpl_isReachable0;
--		Java_java_net_Inet6AddressImpl_getLocalHostName;
--		Java_java_net_Inet6AddressImpl_lookupAllHostAddr;
--		Java_java_net_Inet6AddressImpl_getHostByAddr;
--		Java_java_net_Inet6AddressImpl_isReachable0;
--		Java_java_net_NetworkInterface_init;
--		Java_java_net_NetworkInterface_getByName0;
--		Java_java_net_NetworkInterface_getByIndex0;
--		Java_java_net_NetworkInterface_getByInetAddress0;
--		Java_java_net_NetworkInterface_getAll;
--		Java_java_net_NetworkInterface_isUp0;
--		Java_java_net_NetworkInterface_isLoopback0;
--		Java_java_net_NetworkInterface_isP2P0;
--		Java_java_net_NetworkInterface_supportsMulticast0;
--		Java_java_net_NetworkInterface_getMacAddr0;
--		Java_java_net_NetworkInterface_getMTU0;
--		Java_java_net_PlainDatagramSocketImpl_send;
--		Java_java_net_PlainSocketImpl_socketClose0;
--		Java_java_net_SocketOutputStream_init;
--		Java_java_net_PlainDatagramSocketImpl_peek;
--		Java_java_net_PlainDatagramSocketImpl_peekData;
--		Java_java_net_PlainSocketImpl_socketSetOption;
--		Java_java_net_PlainSocketImpl_socketSendUrgentData;
--		Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate;
--		Java_java_net_PlainSocketImpl_socketGetOption;
--		Java_java_net_PlainDatagramSocketImpl_receive0;
--		Java_java_net_PlainDatagramSocketImpl_connect0;
--		Java_java_net_PlainDatagramSocketImpl_disconnect0;
--		Java_java_net_PlainDatagramSocketImpl_datagramSocketClose;
--		Java_java_net_PlainSocketImpl_initProto;
--		Java_java_net_PlainSocketImpl_socketBind;
--		Java_java_net_PlainSocketImpl_socketShutdown;
--		Java_java_net_SocketInputStream_init;
--		Java_java_net_PlainSocketImpl_socketConnect;
--		Java_java_net_PlainDatagramSocketImpl_getTimeToLive;
--		Java_java_net_PlainDatagramSocketImpl_setTimeToLive;
--		Java_sun_net_dns_ResolverConfigurationImpl_localDomain0;
--		Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0;
--		Java_sun_net_sdp_SdpSupport_convert0;
--		Java_sun_net_sdp_SdpSupport_create0;
--		Java_sun_net_spi_DefaultProxySelector_init;
--		Java_sun_net_spi_DefaultProxySelector_getSystemProxy;
--		NET_AllocSockaddr;
--		NET_SockaddrToInetAddress;
-+        global:
-+                JNI_OnLoad;
-+                Java_java_net_PlainSocketImpl_socketListen;
-+                Java_java_net_PlainDatagramSocketImpl_getTTL;
-+                Java_java_net_PlainDatagramSocketImpl_init;
-+                Java_java_net_SocketOutputStream_socketWrite0;
-+                Java_java_net_PlainSocketImpl_socketCreate;
-+                Java_java_net_PlainSocketImpl_socketAvailable;
-+                Java_java_net_PlainDatagramSocketImpl_join;
-+                Java_java_net_PlainDatagramSocketImpl_socketGetOption;
-+                Java_java_net_InetAddress_init;
-+                Java_java_net_Inet4Address_init;
-+                Java_java_net_Inet6Address_init;
-+                Java_java_net_PlainDatagramSocketImpl_setTTL;
-+                Java_java_net_PlainDatagramSocketImpl_socketSetOption;
-+                Java_java_net_PlainDatagramSocketImpl_bind0;
-+                Java_java_net_PlainSocketImpl_socketAccept;
-+                Java_java_net_DatagramPacket_init;
-+                Java_java_net_PlainDatagramSocketImpl_leave;
-+                Java_java_net_SocketInputStream_socketRead0;
-+                Java_java_net_InetAddressImplFactory_isIPv6Supported;
-+                Java_java_net_Inet4AddressImpl_getLocalHostName;
-+                Java_java_net_Inet4AddressImpl_lookupAllHostAddr;
-+                Java_java_net_Inet4AddressImpl_getHostByAddr;
-+                Java_java_net_Inet4AddressImpl_isReachable0;
-+                Java_java_net_Inet6AddressImpl_getLocalHostName;
-+                Java_java_net_Inet6AddressImpl_lookupAllHostAddr;
-+                Java_java_net_Inet6AddressImpl_getHostByAddr;
-+                Java_java_net_Inet6AddressImpl_isReachable0;
-+                Java_java_net_NetworkInterface_init;
-+                Java_java_net_NetworkInterface_getByName0;
-+                Java_java_net_NetworkInterface_getByIndex0;
-+                Java_java_net_NetworkInterface_getByInetAddress0;
-+                Java_java_net_NetworkInterface_getAll;
-+                Java_java_net_NetworkInterface_isUp0;
-+                Java_java_net_NetworkInterface_isLoopback0;
-+                Java_java_net_NetworkInterface_isP2P0;
-+                Java_java_net_NetworkInterface_supportsMulticast0;
-+                Java_java_net_NetworkInterface_getMacAddr0;
-+                Java_java_net_NetworkInterface_getMTU0;
-+                Java_java_net_PlainDatagramSocketImpl_send;
-+                Java_java_net_PlainSocketImpl_socketClose0;
-+                Java_java_net_SocketOutputStream_init;
-+                Java_java_net_PlainDatagramSocketImpl_peek;
-+                Java_java_net_PlainDatagramSocketImpl_peekData;
-+                Java_java_net_PlainSocketImpl_socketSetOption;
-+                Java_java_net_PlainSocketImpl_socketSendUrgentData;
-+                Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate;
-+                Java_java_net_PlainSocketImpl_socketGetOption;
-+                Java_java_net_PlainDatagramSocketImpl_receive0;
-+                Java_java_net_PlainDatagramSocketImpl_connect0;
-+                Java_java_net_PlainDatagramSocketImpl_disconnect0;
-+                Java_java_net_PlainDatagramSocketImpl_datagramSocketClose;
-+                Java_java_net_PlainSocketImpl_initProto;
-+                Java_java_net_PlainSocketImpl_socketBind;
-+                Java_java_net_PlainSocketImpl_socketShutdown;
-+                Java_java_net_SocketInputStream_init;
-+                Java_java_net_PlainSocketImpl_socketConnect;
-+                Java_java_net_PlainDatagramSocketImpl_getTimeToLive;
-+                Java_java_net_PlainDatagramSocketImpl_setTimeToLive;
-+                Java_sun_net_PortConfig_getLower0;
-+                Java_sun_net_PortConfig_getUpper0;
-+                Java_sun_net_dns_ResolverConfigurationImpl_localDomain0;
-+                Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0;
-+                Java_sun_net_sdp_SdpSupport_convert0;
-+                Java_sun_net_sdp_SdpSupport_create0;
-+                Java_sun_net_spi_DefaultProxySelector_init;
-+                Java_sun_net_spi_DefaultProxySelector_getSystemProxy;
-+                NET_AllocSockaddr;
-+                NET_SockaddrToInetAddress;
-                 NET_SockaddrEqualsInetAddress;
--		NET_InetAddressToSockaddr;
--		NET_GetPortFromSockaddr;
--		NET_SetSockOpt;
--		NET_GetSockOpt;
--		NET_Bind;
--		NET_MapSocketOption;
--		NET_Wait;
-+                NET_InetAddressToSockaddr;
-+                NET_GetPortFromSockaddr;
-+                NET_SetSockOpt;
-+                NET_GetSockOpt;
-+                NET_Bind;
-+                NET_MapSocketOption;
-+                NET_Wait;
-                 ipv6_available;
- 
--	local:
--		*;
-+        local:
-+                *;
- };
---- jdk/make/java/nio/Makefile	2013-09-06 11:27:37.000000000 -0700
-+++ jdk/make/java/nio/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -263,13 +263,89 @@
- 	sun/nio/fs/UnixConstants.java
- endif # PLATFORM = linux
- 
-+ifeq ($(PLATFORM), bsd)
-+FILES_java += \
-+        sun/nio/ch/AbstractPollSelectorImpl.java \
-+	sun/nio/ch/BsdAsynchronousChannelProvider.java \
-+	sun/nio/ch/InheritedChannel.java \
-+	sun/nio/ch/KQueue.java \
-+	sun/nio/ch/KQueueArrayWrapper.java \
-+	sun/nio/ch/KQueuePort.java \
-+	sun/nio/ch/KQueueSelectorProvider.java \
-+	sun/nio/ch/KQueueSelectorImpl.java \
-+        sun/nio/ch/PollSelectorProvider.java \
-+        sun/nio/ch/PollSelectorImpl.java \
-+	sun/nio/ch/Port.java \
-+	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
-+	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
-+	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
-+	\
-+	sun/nio/fs/BsdFileStore.java \
-+	sun/nio/fs/BsdFileSystem.java \
-+	sun/nio/fs/BsdFileSystemProvider.java \
-+	sun/nio/fs/BsdNativeDispatcher.java \
-+	sun/nio/fs/PollingWatchService.java \
-+	sun/nio/fs/UnixChannelFactory.java \
-+	sun/nio/fs/UnixCopyFile.java \
-+	sun/nio/fs/UnixDirectoryStream.java \
-+	sun/nio/fs/UnixException.java \
-+	sun/nio/fs/UnixFileAttributeViews.java \
-+	sun/nio/fs/UnixFileAttributes.java \
-+	sun/nio/fs/UnixFileKey.java \
-+	sun/nio/fs/UnixFileModeAttribute.java \
-+	sun/nio/fs/UnixFileStore.java \
-+	sun/nio/fs/UnixFileStoreAttributes.java \
-+	sun/nio/fs/UnixFileSystem.java \
-+	sun/nio/fs/UnixFileSystemProvider.java \
-+	sun/nio/fs/UnixMountEntry.java \
-+	sun/nio/fs/UnixNativeDispatcher.java \
-+	sun/nio/fs/UnixPath.java \
-+	sun/nio/fs/UnixSecureDirectoryStream.java \
-+	sun/nio/fs/UnixUriUtils.java \
-+	sun/nio/fs/UnixUserPrincipals.java
-+
-+FILES_c += \
-+	InheritedChannel.c \
-+	NativeThread.c \
-+        PollArrayWrapper.c \
-+	UnixAsynchronousServerSocketChannelImpl.c \
-+	UnixAsynchronousSocketChannelImpl.c \
-+	\
-+	BsdNativeDispatcher.c \
-+	UnixCopyFile.c \
-+	UnixNativeDispatcher.c \
-+	\
-+	KQueue.c \
-+	KQueueArrayWrapper.c \
-+	KQueuePort.c
-+
-+FILES_export += \
-+	sun/nio/ch/InheritedChannel.java \
-+	sun/nio/ch/KQueue.java \
-+	sun/nio/ch/KQueuePort.java \
-+	sun/nio/ch/NativeThread.java \
-+	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
-+	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
-+	\
-+	sun/nio/fs/BsdNativeDispatcher.java \
-+	sun/nio/fs/UnixCopyFile.java \
-+	sun/nio/fs/UnixNativeDispatcher.java
-+
-+FILES_gen += \
-+	sun/nio/fs/UnixConstants.java
-+
-+endif # PLATFORM = bsd
-+
- ifeq ($(PLATFORM), macosx)
- FILES_java += \
-         sun/nio/ch/AbstractPollSelectorImpl.java \
- 	sun/nio/ch/BsdAsynchronousChannelProvider.java \
- 	sun/nio/ch/InheritedChannel.java \
- 	sun/nio/ch/KQueue.java \
-+	sun/nio/ch/KQueueArrayWrapper.java
- 	sun/nio/ch/KQueuePort.java \
-+	sun/nio/ch/KQueueSelectorProvider.java \
-+	sun/nio/ch/KQueueSelectorImpl.java \
-         sun/nio/ch/PollSelectorProvider.java \
-         sun/nio/ch/PollSelectorImpl.java \
- 	sun/nio/ch/Port.java \
-@@ -317,6 +393,7 @@
- 	UnixNativeDispatcher.c \
- 	\
- 	KQueue.c \
-+	KQueueArrayWrapper.c \
- 	KQueuePort.c
- 
- FILES_export += \
-@@ -330,19 +407,13 @@
- 	sun/nio/fs/BsdNativeDispatcher.java \
- 	sun/nio/fs/UnixCopyFile.java \
- 	sun/nio/fs/UnixNativeDispatcher.java
--	
-+
- FILES_gen += \
- 	sun/nio/fs/UnixConstants.java
--endif # PLATFORM = bsd, macosx
- 
--ifeq ($(PLATFORM), macosx)
--FILES_java += \
--    sun/nio/ch/KQueueSelectorProvider.java \
--    sun/nio/ch/KQueueSelectorImpl.java \
--    sun/nio/ch/KQueueArrayWrapper.java
-+endif # PLATFORM = macosx
- 
--FILES_c += \
--    KQueueArrayWrapper.c
-+ifneq (,$(findstring $(PLATFORM), bsd macosx))
- 
- vpath %.c $(call NativeSrcDirList,,native/sun/nio/fs)
- vpath %.c $(call NativeSrcDirList,,native/sun/nio/ch)
-@@ -388,6 +459,9 @@
- ifeq ($(PLATFORM), macosx)
- OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread -framework CoreFoundation
- endif
-+ifeq ($(PLATFORM), bsd)
-+OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread
-+endif
- ifeq ($(PLATFORM), solaris)
- OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \
- 		-L$(LIBDIR)/$(LIBARCH) -ljava -lnet
-@@ -410,7 +484,7 @@
- ifeq ($(PLATFORM), linux)
- FILES_m = mapfile-linux
- endif
--ifeq ($(PLATFORM), macosx)
-+ifneq (,$(findstring $(PLATFORM), bsd macosx))
- FILES_m = mapfile-bsd
- endif
- include $(BUILDDIR)/common/Mapfile-vers.gmk
---- jdk/make/java/nio/mapfile-bsd	2013-09-06 11:27:37.000000000 -0700
-+++ jdk/make/java/nio/mapfile-bsd	2014-04-20 12:39:22.000000000 -0700
-@@ -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_makePipe;
-                 Java_sun_nio_ch_IOUtil_randomBytes;
-                 Java_sun_nio_ch_IOUtil_setfdVal;
-@@ -80,6 +81,11 @@
- 		Java_sun_nio_ch_KQueue_identOffset;
- 		Java_sun_nio_ch_KQueue_filterOffset;
- 		Java_sun_nio_ch_KQueue_flagsOffset;
-+		Java_sun_nio_ch_KQueueArrayWrapper_initStructSizes;
-+		Java_sun_nio_ch_KQueueArrayWrapper_init;
-+		Java_sun_nio_ch_KQueueArrayWrapper_register0;
-+		Java_sun_nio_ch_KQueueArrayWrapper_kevent0;
-+		Java_sun_nio_ch_KQueueArrayWrapper_interrupt;
- 		Java_sun_nio_ch_KQueuePort_socketpair;
- 		Java_sun_nio_ch_KQueuePort_interrupt;
- 		Java_sun_nio_ch_KQueuePort_drain1;
---- jdk/make/java/npt/Makefile	2013-09-06 11:27:37.000000000 -0700
-+++ jdk/make/java/npt/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -74,6 +74,14 @@
-   OTHER_LDLIBS += -liconv
- endif
- 
-+# Add location of iconv headers
-+ifeq ($(PLATFORM), bsd)
-+  ifneq ($(OS_NAME), netbsd)
-+    CPPFLAGS += -I$(PACKAGE_PATH)/include
-+    OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
-+  endif
-+endif
-+
- #
- # Add to ambient vpath so we pick up the library files
- #
---- jdk/make/java/redist/fonts/Makefile	2013-09-06 11:27:37.000000000 -0700
-+++ jdk/make/java/redist/fonts/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -42,7 +42,7 @@
- 	$(LIBDIR)/fonts/LucidaSansRegular.ttf       	\
- 	$(LIBDIR)/fonts/LucidaSansDemiBold.ttf       	\
- 
--ifeq ($(PLATFORM), linux)
-+ifneq (,$(findstring $(PLATFORM), linux bsd))
- 
- # The oblique versions of the font are derived from the base versions
- # and since 2D can do this derivation on the fly at run time there is no
-@@ -82,7 +82,7 @@
- $(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
- 	$(install-file)
- 
--ifeq ($(PLATFORM), linux)
-+ifneq (,$(findstring $(PLATFORM), linux bsd))
- 
- # The oblique fonts are only needed/wanted on Linux.
- 
-@@ -96,7 +96,7 @@
- $(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
- 	$(install-file)
- 
--endif # linux
-+endif # linux || bsd
- 
- all build : $(INTERNAL_IMPORT_LIST)
- 
---- jdk/make/javax/sound/Makefile	2013-09-06 11:27:38.000000000 -0700
-+++ jdk/make/javax/sound/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -111,6 +111,21 @@
-   #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
- endif # PLATFORM linux
- 
-+ifeq ($(PLATFORM), bsd)
-+ifeq ($(OS_VENDOR), FreeBSD)
-+  # ALSA handles directaudio, ports, and MIDI
-+  SUBDIRS += jsoundalsa
-+  EXTRA_SOUND_JNI_LIBS += jsoundalsa
-+else
-+    # build with empty MIDI i/o
-+    INCLUDE_MIDI = TRUE
-+    # build with empty ports
-+    INCLUDE_PORTS = TRUE
-+    # build with empty direct audio
-+    INCLUDE_DAUDIO = TRUE
-+endif
-+endif # PLATFORM bsd
-+
- ifeq ($(PLATFORM), macosx)
-   CPPFLAGS += -DUSE_PORTS=TRUE \
-               -DUSE_DAUDIO=TRUE \
---- jdk/make/javax/sound/SoundDefs.gmk	2013-09-06 11:27:38.000000000 -0700
-+++ jdk/make/javax/sound/SoundDefs.gmk	2014-04-20 12:39:22.000000000 -0700
-@@ -40,6 +40,10 @@
-   CPPFLAGS += -DX_PLATFORM=X_LINUX
- endif # PLATFORM linux
- 
-+ifeq ($(PLATFORM), bsd)
-+  CPPFLAGS += -DX_PLATFORM=X_BSD
-+endif # PLATFORM bsd
-+
- ifeq ($(PLATFORM), macosx)
-   CPPFLAGS += -DX_PLATFORM=X_MACOSX
- endif # PLATFORM macosx
---- jdk/make/javax/sound/jsoundalsa/Makefile	2013-09-06 11:27:38.000000000 -0700
-+++ jdk/make/javax/sound/jsoundalsa/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -51,6 +51,7 @@
- 	$(PORTFILES_c)
- 
- # platform dependent files
-+ifeq ($(PLATFORM), linux)
- FILES_c += \
- 	PLATFORM_API_LinuxOS_ALSA_CommonUtils.c   \
- 	PLATFORM_API_LinuxOS_ALSA_PCM.c     \
-@@ -60,19 +61,37 @@
- 	PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
- 	PLATFORM_API_LinuxOS_ALSA_Ports.c
- 
-+MIDI_CPPFLAGS= \
-+	-DUSE_PLATFORM_MIDI_OUT=TRUE \
-+	-DUSE_PLATFORM_MIDI_IN=TRUE
-+endif
-+
-+ifeq ($(PLATFORM), bsd)
-+FILES_c += \
-+	PLATFORM_API_BsdOS_ALSA_CommonUtils.c   \
-+	PLATFORM_API_BsdOS_ALSA_PCM.c     \
-+	PLATFORM_API_BsdOS_ALSA_PCMUtils.c   \
-+	PLATFORM_API_BsdOS_ALSA_MidiIn.c  \
-+	PLATFORM_API_BsdOS_ALSA_MidiOut.c \
-+	PLATFORM_API_BsdOS_ALSA_MidiUtils.c \
-+	PLATFORM_API_BsdOS_ALSA_Ports.c
-+
-+MIDI_CPPFLAGS=
-+endif
-+
- FILES_export = \
- 	$(DAUDIOFILES_export) \
- 	$(MIDIFILES_export) \
- 	$(PORTFILES_export)
- 
--OTHER_LDLIBS += -lasound
-+OTHER_LDLIBS += -L$(ALSA_LIB_PATH) -lasound
- 
- CPPFLAGS += \
- 	-DUSE_DAUDIO=TRUE \
- 	-DUSE_PORTS=TRUE  \
--	-DUSE_PLATFORM_MIDI_OUT=TRUE \
--	-DUSE_PLATFORM_MIDI_IN=TRUE \
--	-I$(SHARE_SRC)/native/com/sun/media/sound
-+	$(MIDI_CPPFLAGS) \
-+	-I$(SHARE_SRC)/native/com/sun/media/sound \
-+	-I$(ALSA_HEADERS_PATH)
- 
- #
- # Add to the ambient VPATH.
---- jdk/make/jpda/transport/socket/Makefile	2013-09-06 11:27:38.000000000 -0700
-+++ jdk/make/jpda/transport/socket/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -38,6 +38,11 @@
- 
- include $(BUILDDIR)/common/Defs.gmk
- 
-+ifeq ($(PLATFORM), bsd))
-+  LIBSOCKET =
-+  OTHER_LDLIBS += -pthread
-+endif
-+
- ifeq ($(PLATFORM), linux)
-   OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET) -lpthread
- endif
---- jdk/make/sun/awt/FILES_c_macosx.gmk	2013-09-06 11:27:39.000000000 -0700
-+++ jdk/make/sun/awt/FILES_c_macosx.gmk	1969-12-31 16:00:00.000000000 -0800
-@@ -1,28 +0,0 @@
--#
--# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
--# 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.
--#
--
--FILES_AWT_objc = \
--        $(TARGDIR)MacOSXResourceBundle.m
--
---- jdk/make/sun/awt/FILES_export_macosx.gmk	2013-09-06 11:27:39.000000000 -0700
-+++ jdk/make/sun/awt/FILES_export_macosx.gmk	1969-12-31 16:00:00.000000000 -0800
-@@ -1,29 +0,0 @@
--#
--# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
--# 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.
--#
--
--# FILES_export definitions for Mac OS X
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the application.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
 -
--FILES_export += \
--	com/apple/resources/MacOSXResourceBundle.java
---- jdk/make/sun/awt/Makefile	2013-09-06 11:27:39.000000000 -0700
-+++ jdk/make/sun/awt/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -127,7 +127,12 @@
- OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL)
- endif
- 
--FILES_c += initIDs.c
-+ifeq  ($(PLATFORM), bsd)
-+FILES_c = $(FILES_2D_c)
-+FILES_c += awt_LoadLibrary.c
-+OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
-+OTHER_LDLIBS = $(JVMLIB) $(LIBM)
-+endif
- 
- ifeq ($(PLATFORM), macosx)
- FILES_c = $(FILES_2D_c)
-@@ -136,6 +141,8 @@
- OTHER_LDLIBS = $(JVMLIB) $(LIBM)
- endif
- 
-+FILES_c += initIDs.c
-+
- # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX
- endif # PLATFORM 
- 
-@@ -145,8 +152,6 @@
- #
- # Files
- #
--include FILES_c_macosx.gmk
--include FILES_export_macosx.gmk
- 
- FILES_objc = $(FILES_AWT_objc)
- OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \
-@@ -502,6 +507,17 @@
- # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
- endif # PLATFORM
- 
-+ifeq ($(PLATFORM), bsd)
-+# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD
-+
-+FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
-+_FONTCONFIGS   = \
-+	fontconfig.properties
-+
-+FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
-+
-+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD
-+endif # PLATFORM
- 
- ifeq ($(PLATFORM), macosx)
- # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
-@@ -607,6 +623,9 @@
-             -I$(OPENWIN_HOME)/include/X11/extensions \
-             -I$(PLATFORM_SRC)/native/$(PKGDIR)/font 
- endif
-+ifeq ($(PLATFORM), bsd)
-+CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
-+endif
- CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-             -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
-             -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \
-@@ -628,7 +647,13 @@
-             -I$(PLATFORM_SRC)/native/$(PKGDIR) \
- 	    $(EVENT_MODEL)
- 
--ifeq ($(PLATFORM), linux)
-+# include these last so we don't pick up unintentional includes
-+ifeq ($(PLATFORM), bsd)
-+CPPFLAGS += -I$(OPENWIN_HOME)/include \
-+	    -I$(OPENWIN_HOME)/include/X11/extensions
-+endif
-+
-+ifneq (,$(findstring $(PLATFORM), linux bsd))
- LDFLAGS += -L$(OPENWIN_LIB)
- endif
- 
---- jdk/make/sun/awt/mawt.gmk	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/awt/mawt.gmk	2014-04-20 12:39:22.000000000 -0700
-@@ -169,7 +169,7 @@
- OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
- endif
- 
--ifneq (,$(findstring $(PLATFORM), linux macosx))
-+ifneq (,$(findstring $(PLATFORM), bsd linux macosx))
- OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
- # XXX what is this define below? Isn't it motif-related?
- OTHER_CFLAGS += -DXMSTRINGDEFINES=1
-@@ -193,6 +193,7 @@
- #
- # Other extra flags needed for compiling.
- #
-+ifneq ($(PLATFORM), bsd))
- CPPFLAGS += -I$(CUPS_HEADERS_PATH)
- 
- ifndef HEADLESS
-@@ -200,6 +201,7 @@
- LDFLAGS  += -L$(OPENWIN_LIB)
- 
- endif # !HEADLESS
-+endif # !PLATFORM
- 
- CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-             -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
-@@ -223,13 +225,16 @@
-         -I$(PLATFORM_SRC)/native/$(PKGDIR) \
-         $(EVENT_MODEL)
- 
--ifeq ($(PLATFORM), macosx)
-+ifneq (,$(findstring $(PLATFORM), bsd macosx))
- CPPFLAGS += -I$(CUPS_HEADERS_PATH)
- 
- ifndef HEADLESS
- CPPFLAGS += -I$(MOTIF_DIR)/include \
-             -I$(OPENWIN_HOME)/include 
- LDFLAGS  += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
-+ifeq ($(OS_NAME), netbsd)
-+LDFLAGS  += -Wl,-R$(OPENWIN_LIB)
-+endif
- 
- endif # !HEADLESS
- endif # PLATFORM
-@@ -240,6 +245,12 @@
-                         $(wildcard /usr/include/X11/extensions))
- endif
- 
-+ifeq ($(PLATFORM), bsd))
-+  CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
-+              -I$(OPENWIN_HOME)/include \
-+              -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
-+endif
-+
- ifeq ($(PLATFORM), macosx))
-   CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
-               -I$(OPENWIN_HOME)/include 
---- jdk/make/sun/font/Makefile	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/font/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -36,7 +36,11 @@
- CPLUSPLUSLIBRARY=true
- 
- # Use higher optimization level
--OPTIMIZATION_LEVEL = HIGHER
-+ifeq ($(PLATFORM), windows)
-+  OPTIMIZATION_LEVEL = HIGHEST
-+else
-+  OPTIMIZATION_LEVEL = HIGHER
-+endif
- 
- include $(BUILDDIR)/common/Defs.gmk
- 
-@@ -91,7 +95,7 @@
- endif # PLATFORM
- 
- # Turn off aliasing with GCC for ExtensionSubtables.cpp
--ifeq ($(PLATFORM), linux)
-+ifneq (,$(findstring $(PLATFORM), bsd linux))
-   CXXFLAGS += $(CXXFLAGS_$(@F))
-   CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing
- endif
-@@ -178,7 +182,7 @@
- # Libraries to link, and other C flags.
- #
- 
--ifeq ($(PLATFORM), macosx))
-+ifneq (,$(findstring $(PLATFORM), bsd macosx))
- OTHER_INCLUDES += -I$(X11_PATH)/include
- OTHER_LDLIBS  += -lawt $(LIBM) $(LIBCXX)
-  ifeq ($(OS_VENDOR),Apple)
---- jdk/make/sun/javazic/tzdata/VERSION	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/VERSION	2014-04-20 12:39:22.000000000 -0700
-@@ -21,4 +21,4 @@
- # or visit www.oracle.com if you need additional information or have any
- # questions.
- #
--tzdata2013d
-+tzdata2013i
---- jdk/make/sun/javazic/tzdata/africa	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/africa	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
-@@ -474,6 +474,14 @@
- # (either two days before them or five days after them, so as to fall on
- # lastFri instead of lastSun).
- 
-+# From Even Scharning (2013-10-25):
-+# The scheduled end of DST in Libya on Friday, October 25, 2013 was
-+# cancelled yesterday....
-+# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
-+#
-+# From Paul Eggert (2013-10-25):
-+# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2.
-+
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	Libya	1951	only	-	Oct	14	2:00	1:00	S
- Rule	Libya	1952	only	-	Jan	 1	0:00	0	-
-@@ -490,8 +498,8 @@
- Rule	Libya	1987	1989	-	Oct	 1	0:00	0	-
- Rule	Libya	1997	only	-	Apr	 4	0:00	1:00	S
- Rule	Libya	1997	only	-	Oct	 4	0:00	0	-
--Rule	Libya	2013	max	-	Mar	lastFri	1:00	1:00	S
--Rule	Libya	2013	max	-	Oct	lastFri	2:00	0	-
-+Rule	Libya	2013	only	-	Mar	lastFri	1:00	1:00	S
-+Rule	Libya	2013	only	-	Oct	lastFri	2:00	0	-
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone	Africa/Tripoli	0:52:44 -	LMT	1920
- 			1:00	Libya	CE%sT	1959
-@@ -502,7 +510,8 @@
- 			2:00	-	EET	1996 Sep 30
- 			1:00	Libya	CE%sT	1997 Oct  4
- 			2:00	-	EET	2012 Nov 10 2:00
--			1:00	Libya	CE%sT
-+			1:00	Libya	CE%sT	2013 Oct 25 2:00
-+			2:00	-	EET
- 
- # Madagascar
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-@@ -707,15 +716,6 @@
- # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search
- # 
- 
--# From Alex Krivenyshev (2008-05-09):
--# Is Western Sahara (part which administrated by Morocco) going to follow
--# Morocco DST changes?  Any information?  What about other part of
--# Western Sahara - under administration of POLISARIO Front (also named
--# SADR Saharawi Arab Democratic Republic)?
--
--# From Arthur David Olson (2008-05-09):
--# 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
-@@ -881,13 +881,23 @@
- # transitions would be 2013-07-07 and 2013-08-10; see:
- # http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
- 
--# From Paul Eggert (2013-07-03):
-+# From Steffen Thorsen (2013-09-28):
-+# Morocco extends DST by one month, on very short notice, just 1 day
-+# before it was going to end.  There is a new decree (2.13.781) for
-+# this, where DST from now on goes from last Sunday of March at 02:00
-+# to last Sunday of October at 03:00, similar to EU rules.  Official
-+# source (French):
-+# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013
-+# Another source (specifying the time for start and end in the decree):
-+# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html
-+
-+# From Paul Eggert (2013-10-03):
- # To estimate what the Moroccan government will do in future years,
--# transition dates for 2014 through 2021 were determined by running
-+# transition dates for 2014 through 2038 were determined by running
- # the following program under GNU Emacs 24.3:
- #
- # (let ((islamic-year 1435))
--#   (while (< islamic-year 1444)
-+#   (while (< islamic-year 1461)
- #     (let ((a
- #	     (calendar-gregorian-from-absolute
- #	      (calendar-islamic-to-absolute (list 9 1 islamic-year))))
-@@ -902,13 +912,18 @@
- #	  (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
- #     (setq islamic-year (+ 1 islamic-year))))
- #
--# with the results hand-edited for 2020-2022, when the normal spring-forward
--# date falls during the estimated Ramadan.
--#
--# From 2023 through 2038 Ramadan is not predicted to overlap with
--# daylight saving time.  Starting in 2039 there will be overlap again,
--# but 32-bit time_t values roll around in 2038 so for now do not worry
--# about dates after 2038.
-+# with spring-forward transitions removed for 2023-2025, when the
-+# normal spring-forward date falls during the estimated Ramadan; with
-+# all transitions removed for 2026-2035, where the estimated Ramadan
-+# falls entirely outside daylight-saving time; and with fall-back
-+# transitions removed for 2036-2037, where the normal fall-back
-+# date falls during the estimated Ramadan.  Normally, the table would
-+# stop after 2037 because 32-bit time_t values roll around early in 2038,
-+# but that would imply a prediction of perpetual DST after March 2038
-+# due to the year-2037 glitches.  So, this table instead stops after
-+# 2038, the first non-glitchy year after the 32-bit rollover.
-+# An advantage of stopping after 2038 is that it lets zic guess
-+# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future.
- 
- # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- 
-@@ -935,12 +950,14 @@
- Rule	Morocco	2010	only	-	Aug	 8	 0:00	0	-
- Rule	Morocco	2011	only	-	Apr	 3	 0:00	1:00	S
- Rule	Morocco	2011	only	-	Jul	 31	 0	0	-
--Rule	Morocco	2012	2019	-	Apr	 lastSun 2:00	1:00	S
--Rule	Morocco	2012	max	-	Sep	 lastSun 3:00	0	-
-+Rule	Morocco	2012	2013	-	Apr	 lastSun 2:00	1:00	S
-+Rule	Morocco	2012	only	-	Sep	 30	 3:00	0	-
- Rule	Morocco	2012	only	-	Jul	 20	 3:00	0	-
- Rule	Morocco	2012	only	-	Aug	 20	 2:00	1:00	S
- Rule	Morocco	2013	only	-	Jul	  7	 3:00	0	-
- Rule	Morocco	2013	only	-	Aug	 10	 2:00	1:00	S
-+Rule	Morocco	2013	2035	-	Oct	 lastSun 3:00	0	-
-+Rule	Morocco	2014	2022	-	Mar	 lastSun 2:00	1:00	S
- Rule	Morocco	2014	only	-	Jun	 29	 3:00	0	-
- Rule	Morocco	2014	only	-	Jul	 29	 2:00	1:00	S
- Rule	Morocco	2015	only	-	Jun	 18	 3:00	0	-
-@@ -953,20 +970,42 @@
- Rule	Morocco	2018	only	-	Jun	 15	 2:00	1:00	S
- Rule	Morocco	2019	only	-	May	  6	 3:00	0	-
- Rule	Morocco	2019	only	-	Jun	  5	 2:00	1:00	S
-+Rule	Morocco	2020	only	-	Apr	 24	 3:00	0	-
- Rule	Morocco	2020	only	-	May	 24	 2:00	1:00	S
-+Rule	Morocco	2021	only	-	Apr	 13	 3:00	0	-
- Rule	Morocco	2021	only	-	May	 13	 2:00	1:00	S
-+Rule	Morocco	2022	only	-	Apr	  3	 3:00	0	-
- Rule	Morocco	2022	only	-	May	  3	 2:00	1:00	S
--Rule	Morocco	2023	max	-	Apr	 lastSun 2:00	1:00	S
-+Rule	Morocco	2023	only	-	Apr	 22	 2:00	1:00	S
-+Rule	Morocco	2024	only	-	Apr	 10	 2:00	1:00	S
-+Rule	Morocco	2025	only	-	Mar	 31	 2:00	1:00	S
-+Rule	Morocco	2026	max	-	Mar	 lastSun 2:00	1:00	S
-+Rule	Morocco	2036	only	-	Oct	 21	 3:00	0	-
-+Rule	Morocco	2037	only	-	Oct	 11	 3:00	0	-
-+Rule	Morocco	2038	only	-	Sep	 30	 3:00	0	-
-+Rule	Morocco	2038	only	-	Oct	 30	 2:00	1:00	S
-+Rule	Morocco	2038	max	-	Oct	 lastSun 3:00	0	-
- 
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
- 			 0:00	Morocco	WE%sT	1984 Mar 16
- 			 1:00	-	CET	1986
- 			 0:00	Morocco	WE%sT
-+
- # Western Sahara
-+#
-+# From Gwillim Law (2013-10-22):
-+# A correspondent who is usually well informed about time zone matters
-+# ... says that Western Sahara observes daylight saving time, just as
-+# Morocco does.
-+#
-+# From Paul Eggert (2013-10-23):
-+# Assume that this has been true since Western Sahara switched to GMT,
-+# since most of it was then controlled by Morocco.
-+
- Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
- 			-1:00	-	WAT	1976 Apr 14
--			 0:00	-	WET
-+			 0:00	Morocco	WE%sT
- 
- # Mozambique
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-@@ -1123,9 +1162,7 @@
- 			3:00	-	EAT
- 
- # South Sudan
--Zone	Africa/Juba	2:06:24 -	LMT	1931
--			2:00	Sudan	CA%sT	2000 Jan 15 12:00
--			3:00	-	EAT
-+Link Africa/Khartoum Africa/Juba
- 
- # Swaziland
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
---- jdk/make/sun/javazic/tzdata/antarctica	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/antarctica	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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).
--#  
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
- # 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.
--#  
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 +#
- # 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.
-@@ -39,9 +39,9 @@
- #
- # Except for the French entries,
- # I made up all time zone abbreviations mentioned here; corrections welcome!
--# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
-+# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
- 
--# These rules are stolen from the `southamerica' file.
-+# These rules are stolen from the 'southamerica' file.
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	ArgAQ	1964	1966	-	Mar	 1	0:00	0	-
- Rule	ArgAQ	1964	1966	-	Oct	15	0:00	1:00	S
-@@ -251,9 +251,10 @@
- # Scott Island (never inhabited)
- #
- # year-round base
--# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
-+# Scott Base, Ross Island, since 1957-01.
-+# See Pacific/Auckland.
- #
--# These rules for New Zealand are stolen from the `australasia' file.
-+# These rules for New Zealand are stolen from the 'australasia' file.
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	NZAQ	1974	only	-	Nov	 3	2:00s	1:00	D
- Rule	NZAQ	1975	1988	-	Oct	lastSun	2:00s	1:00	D
-@@ -291,11 +292,11 @@
- # From Lee Hotz (2001-03-08):
- # I queried the folks at Columbia who spent the summer at Vostok and this is
- # what they had to say about time there:
--# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
-+# "in the US Camp (East Camp) we have been on New Zealand (McMurdo)
- # time, which is 12 hours ahead of GMT. The Russian Station Vostok was
- # 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
- # of GMT). This is a time zone I think two hours east of Moscow. The
--# natural time zone is in between the two: 8 hours ahead of GMT.''
-+# natural time zone is in between the two: 8 hours ahead of GMT."
- #
- # From Paul Eggert (2001-05-04):
- # This seems to be hopelessly confusing, so I asked Lee Hotz about it
-@@ -360,16 +361,8 @@
- 			-4:00	ChileAQ	CL%sT
- #
- #
--# McMurdo, Ross Island, since 1955-12
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone Antarctica/McMurdo	0	-	zzz	1956
--			12:00	NZAQ	NZ%sT
--#
--# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
--#
--# From Paul Eggert (1996-09-03):
--# Normally it wouldn't have a separate entry, since it's like the
--# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
-+# McMurdo Station, Ross Island, since 1955-12
-+# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20
- #
- # From Chris Carrier (1996-06-27):
- # Siple, the first commander of the South Pole station,
-@@ -391,4 +384,4 @@
- # we have to go around and set them back 5 minutes or so.
- # Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
- #
--Link	Antarctica/McMurdo	Antarctica/South_Pole
-+# See 'australasia' for Antarctica/McMurdo.
---- jdk/make/sun/javazic/tzdata/asia	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/asia	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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 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).
 +#
- # 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.
 +#
- # 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.
 +#
- # 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.
-@@ -29,7 +29,7 @@
- # go ahead and edit the file (and please send any changes to
- # tz@iana.org for general use in the future).
- 
--# From Paul Eggert (2013-02-21):
-+# From Paul Eggert (2013-08-11):
- #
- # A good source for time zone historical data outside the U.S. is
- # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
-@@ -67,11 +67,11 @@
- #	4:00 GST	Gulf*
- #	5:30 IST	India
- #	7:00 ICT	Indochina*
--#	7:00 WIT	west Indonesia
--#	8:00 CIT	central Indonesia
-+#	7:00 WIB	west Indonesia (Waktu Indonesia Barat)
-+#	8:00 WITA	central Indonesia (Waktu Indonesia Tengah)
- #	8:00 CST	China
- #	9:00 CJT	Central Japanese Time (1896/1937)*
--#	9:00 EIT	east Indonesia
-+#	9:00 WIT	east Indonesia (Waktu Indonesia Timur)
- #	9:00 JST  JDT	Japan
- #	9:00 KST  KDT	Korea
- #	9:30 CST	(Australian) Central Standard Time
-@@ -779,7 +779,7 @@
- 			8:00	-	TLT	1942 Feb 21 23:00 # E Timor Time
- 			9:00	-	JST	1945 Sep 23
- 			9:00	-	TLT	1976 May  3
--			8:00	-	CIT	2000 Sep 17 00:00
-+			8:00	-	WITA	2000 Sep 17 00:00
- 			9:00	-	TLT
  
- # India
-@@ -816,36 +816,53 @@
- # (Hollandia).  For now, assume all Indonesian locations other than Jayapura
- # switched on 1945-09-23.
- #
-+# From Paul Eggert (2013-08-11):
-+# Normally the tz database uses English-language abbreviations, but in
-+# Indonesia it's typical to use Indonesian-language abbreviations even
-+# when writing in English.  For example, see the English-language
-+# summary published by the Time and Frequency Laboratory of the
-+# Research Center for Calibration, Instrumentation and Metrology,
-+# Indonesia,  (2006-09-29).
-+# The abbreviations are:
-+#
-+# WIB  - UTC+7 - Waktu Indonesia Barat (Indonesia western time)
-+# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time)
-+# WIT  - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time)
-+#
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-+# Java, Sumatra
- Zone Asia/Jakarta	7:07:12 -	LMT	1867 Aug 10
- # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
- # but this must be a typo.
--			7:07:12	-	JMT	1923 Dec 31 23:47:12 # Jakarta
-+			7:07:12	-	BMT	1923 Dec 31 23:47:12 # Batavia
- 			7:20	-	JAVT	1932 Nov	 # Java Time
--			7:30	-	WIT	1942 Mar 23
-+			7:30	-	WIB	1942 Mar 23
- 			9:00	-	JST	1945 Sep 23
--			7:30	-	WIT	1948 May
--			8:00	-	WIT	1950 May
--			7:30	-	WIT	1964
--			7:00	-	WIT
-+			7:30	-	WIB	1948 May
-+			8:00	-	WIB	1950 May
-+			7:30	-	WIB	1964
-+			7:00	-	WIB
-+# west and central Borneo
- Zone Asia/Pontianak	7:17:20	-	LMT	1908 May
- 			7:17:20	-	PMT	1932 Nov    # Pontianak MT
--			7:30	-	WIT	1942 Jan 29
-+			7:30	-	WIB	1942 Jan 29
- 			9:00	-	JST	1945 Sep 23
--			7:30	-	WIT	1948 May
--			8:00	-	WIT	1950 May
--			7:30	-	WIT	1964
--			8:00	-	CIT	1988 Jan  1
--			7:00	-	WIT
-+			7:30	-	WIB	1948 May
-+			8:00	-	WIB	1950 May
-+			7:30	-	WIB	1964
-+			8:00	-	WITA	1988 Jan  1
-+			7:00	-	WIB
-+# Sulawesi, Lesser Sundas, east and south Borneo
- Zone Asia/Makassar	7:57:36 -	LMT	1920
- 			7:57:36	-	MMT	1932 Nov    # Macassar MT
--			8:00	-	CIT	1942 Feb  9
-+			8:00	-	WITA	1942 Feb  9
- 			9:00	-	JST	1945 Sep 23
--			8:00	-	CIT
-+			8:00	-	WITA
-+# Maluku Islands, West Papua, Papua
- Zone Asia/Jayapura	9:22:48 -	LMT	1932 Nov
--			9:00	-	EIT	1944 Sep  1
-+			9:00	-	WIT	1944 Sep  1
- 			9:30	-	CST	1964
--			9:00	-	EIT
-+			9:00	-	WIT
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde im Prolog des Dokuments gefunden.
+         InvalidCharInXMLDecl = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der XML-Deklaration gefunden.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = Zeichenfolge"\"]]>\" darf nur im Content enthalten sein, wenn sie das Ende eines CDATA-Abschnitts markiert.
++        CDEndInContent = Zeichenfolge""]]>" darf nur im Content enthalten sein, wenn sie das Ende eines CDATA-Abschnitts markiert.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = CDATA-Abschnitt muss mit \"]]>\" enden.
++        CDSectUnterminated = CDATA-Abschnitt muss mit "]]>" enden.
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = XML-Deklaration darf nur ganz am Anfang des Dokuments enthalten sein.
+-        EqRequiredInXMLDecl = Zeichen " = " muss auf \"{0}\" in der XML-Deklaration folgen.
+-        QuoteRequiredInXMLDecl = Der Wert nach \"{0}\" in der XML-Deklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
+-        XMLDeclUnterminated = XML-Deklaration muss mit \"?>\" enden.
++        EqRequiredInXMLDecl = Zeichen " = " muss auf "{0}" in der XML-Deklaration folgen.
++        QuoteRequiredInXMLDecl = Der Wert nach "{0}" in der XML-Deklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
++        XMLDeclUnterminated = XML-Deklaration muss mit "?>" enden.
+         VersionInfoRequired = Version ist in der XML-Deklaration erforderlich.
+         SpaceRequiredBeforeVersionInXMLDecl = Leerstelle vor dem Versionspseudoattribut in der XML-Deklaration erforderlich.
+         SpaceRequiredBeforeEncodingInXMLDecl = Leerstelle vor dem Codierungspseudoattribut in der XML-Deklaration erforderlich.
+@@ -71,70 +68,71 @@
+         ReferenceIllegalInTrailingMisc=Referenz ist nicht zul\u00E4ssig in angeh\u00E4ngtem Abschnitt.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = Standalone-Dokumentdeklarationswert muss \"Ja\" oder \"Nein\" und nicht \"{0}\" sein.
++        SDDeclInvalid = Standalone-Dokumentdeklarationswert muss "Ja" oder "Nein" und nicht "{0}" sein.
++        SDDeclNameInvalid = Der Standalone-Name in der XML-Deklaration ist m\u00F6glicherweise falsch geschrieben.
+ # 2.12 Language Identification
+-        XMLLangInvalid = xml:lang-Attributwert \"{0}\" ist eine ung\u00FCltige Sprach-ID.
++        XMLLangInvalid = xml:lang-Attributwert "{0}" ist eine ung\u00FCltige Sprach-ID.
+ # 3. Logical Structures
+-        ETagRequired = Elementtyp \"{0}\" muss mit dem entsprechenden Endtag \"\" beendet werden.
++        ETagRequired = Elementtyp "{0}" muss mit dem entsprechenden Endtag "" beendet werden.
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = Auf Elementtyp \"{0}\" m\u00FCssen entweder Attributspezifikationen, \">\" oder \"/>\" folgen.
+-        EqRequiredInAttribute = Mit Elementtyp \"{0}\" verkn\u00FCpfter Attributname \"{1}\" muss vom Zeichen " = " gefolgt werden.
+-        OpenQuoteExpected = \u00D6ffnendes Anf\u00FChrungszeichen wird f\u00FCr Attribut \"{1}\" erwartet, das mit Elementtyp \"{0}\" verkn\u00FCpft ist.
+-        CloseQuoteExpected = Schlie\u00DFendes Anf\u00FChrungszeichen wird f\u00FCr Attribut \"{1}\" erwartet, das mit Elementtyp \"{0}\" verkn\u00FCpft ist.
+-        AttributeNotUnique = Attribut \"{1}\" wurde bereits f\u00FCr Element \"{0}\" angegeben.
+-        AttributeNSNotUnique = An Namespace \"{2}\" gebundenes Attribut \"{1}\" wurde bereits f\u00FCr Element \"{0}\" angegeben.
+-        ETagUnterminated = Endtag f\u00FCr Elementtyp \"{0}\" muss mit einem ">"-Begrenzungszeichen enden.
++        ElementUnterminated = Auf Elementtyp "{0}" m\u00FCssen entweder Attributspezifikationen, ">" oder "/>" folgen.
++        EqRequiredInAttribute = Mit Elementtyp "{0}" verkn\u00FCpfter Attributname "{1}" muss vom Zeichen " = " gefolgt werden.
++        OpenQuoteExpected = \u00D6ffnendes Anf\u00FChrungszeichen wird f\u00FCr Attribut "{1}" erwartet, das mit Elementtyp "{0}" verkn\u00FCpft ist.
++        CloseQuoteExpected = Schlie\u00DFendes Anf\u00FChrungszeichen wird f\u00FCr Attribut "{1}" erwartet, das mit Elementtyp "{0}" verkn\u00FCpft ist.
++        AttributeNotUnique = Attribut "{1}" wurde bereits f\u00FCr Element "{0}" angegeben.
++        AttributeNSNotUnique = An Namespace "{2}" gebundenes Attribut "{1}" wurde bereits f\u00FCr Element "{0}" angegeben.
++        ETagUnterminated = Endtag f\u00FCr Elementtyp "{0}" muss mit einem ">"-Begrenzungszeichen enden.
+         MarkupNotRecognizedInContent = Der Content von Elementen muss aus ordnungsgem\u00E4\u00DF formatierten Zeichendaten oder Markups bestehen.
+         DoctypeIllegalInContent = DOCTYPE ist nicht zul\u00E4ssig in Content.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = Referenz muss mit einem ";"-Begrenzungszeichen beendet werden.
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = Referenz muss vollst\u00E4ndig in derselben geparsten Entit\u00E4t enthalten sein.
+-        ElementEntityMismatch = Element \"{0}\" muss innerhalb derselben Entit\u00E4t beginnen und enden.
++        ElementEntityMismatch = Element "{0}" muss innerhalb derselben Entit\u00E4t beginnen und enden.
+         MarkupEntityMismatch=XML-Dokumentstrukturen m\u00FCssen innerhalb derselben Entit\u00E4t beginnen und enden.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{2}) wurde im Wert des Attributs \"{1}\" gefunden. Element ist \"{0}\".
++        InvalidCharInAttValue = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{2}) wurde im Wert des Attributs "{1}" gefunden. Element ist "{0}".
+         InvalidCharInComment = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde im Kommentar gefunden.
+         InvalidCharInPI = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der Verarbeitungsanweisung gefunden.
+         InvalidCharInInternalSubset = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der internen Teilmenge der DTD gefunden.
+         InvalidCharInTextDecl = Ung\u00FCltiges XML-Zeichen (Unicode: 0x{0}) wurde in der Textdeklaration gefunden.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = Wert des Attributs \"{1}\" muss mit einem einzelnen oder doppelten Anf\u00FChrungszeichen beginnen.
+-        LessthanInAttValue = Wert des Attributs \"{1}\", das mit Elementtyp \"{0}\" verkn\u00FCpft ist, darf nicht das Zeichen "<" enthalten.
+-        AttributeValueUnterminated = Wert f\u00FCr Attribut \"{1}\" muss mit dem entsprechenden Anf\u00FChrungszeichen enden.
++        QuoteRequiredInAttValue = Wert des Attributs "{1}" muss mit einem einzelnen oder doppelten Anf\u00FChrungszeichen beginnen.
++        LessthanInAttValue = Wert des Attributs "{1}", das mit Elementtyp "{0}" verkn\u00FCpft ist, darf nicht das Zeichen "<" enthalten.
++        AttributeValueUnterminated = Wert f\u00FCr Attribut "{1}" muss mit dem entsprechenden Anf\u00FChrungszeichen enden.
+ # 2.5 Comments
+-        InvalidCommentStart = Kommentar muss mit \"\" enden.
++        InvalidCommentStart = Kommentar muss mit "" enden.
+         COMMENT_NOT_IN_ONE_ENTITY = Kommentar ist nicht in derselben Entit\u00E4t enthalten.
+ # 2.6 Processing Instructions
+         PITargetRequired = Verarbeitungsanweisung muss mit dem Namen des Ziels beginnen.
+         SpaceRequiredInPI = Leerstelle ist zwischen dem Ziel der Verarbeitungsanweisung und den Daten erforderlich.
+-        PIUnterminated = Verarbeitungsanweisung muss mit \"?>\" enden.
+-        ReservedPITarget = Verarbeitungsanweisungsziel, das \"[xX][mM][lL]\" entspricht, ist nicht zul\u00E4ssig.
++        PIUnterminated = Verarbeitungsanweisung muss mit "?>" enden.
++        ReservedPITarget = Verarbeitungsanweisungsziel, das "[xX][mM][lL]" entspricht, ist nicht zul\u00E4ssig.
+         PI_NOT_IN_ONE_ENTITY = Verarbeitungsanweisung ist nicht in derselben Entit\u00E4t enthalten.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = Ung\u00FCltige Version \"{0}\".
+-        VersionNotSupported = XML-Version \"{0}\" wird nicht unterst\u00FCtzt. Nur XML 1.0 wird unterst\u00FCtzt.
+-        VersionNotSupported11 = XML-Version \"{0}\" wird nicht unterst\u00FCtzt. Nur XML 1.0 und XML 1.1 werden unterst\u00FCtzt.
++        VersionInfoInvalid = Ung\u00FCltige Version "{0}".
++        VersionNotSupported = XML-Version "{0}" wird nicht unterst\u00FCtzt. Nur XML 1.0 wird unterst\u00FCtzt.
++        VersionNotSupported11 = XML-Version "{0}" wird nicht unterst\u00FCtzt. Nur XML 1.0 und XML 1.1 werden unterst\u00FCtzt.
+         VersionMismatch= Eine Entit\u00E4t kann keine andere Entit\u00E4t einer sp\u00E4teren Version enthalten.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = Auf \"&#\" in einer Zeichenreferenz muss umgehend eine Dezimaldarstellung folgen.
+-        HexdigitRequiredInCharRef = Auf \"&#x\" in einer Zeichenreferenz muss umgehend eine hexadezimale Darstellung folgen.
++        DigitRequiredInCharRef = Auf "&#" in einer Zeichenreferenz muss umgehend eine Dezimaldarstellung folgen.
++        HexdigitRequiredInCharRef = Auf "&#x" in einer Zeichenreferenz muss umgehend eine hexadezimale Darstellung folgen.
+         SemicolonRequiredInCharRef = Zeichenreferenz muss mit dem Begrenzungszeichen ";" enden.
+-        InvalidCharRef = Zeichenreferenz \"&#{0}\" ist ein ung\u00FCltiges XML-Zeichen.
++        InvalidCharRef = Zeichenreferenz "&#{0}" ist ein ung\u00FCltiges XML-Zeichen.
+         NameRequiredInReference = Auf "&" in der Entit\u00E4tsreferenz muss umgehend der Entit\u00E4tsname folgen.
+-        SemicolonRequiredInReference = Referenz zu Entit\u00E4t \"{0}\" muss mit dem Begrenzungszeichen ";" enden.
++        SemicolonRequiredInReference = Referenz zu Entit\u00E4t "{0}" muss mit dem Begrenzungszeichen ";" enden.
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = Textdeklaration darf nur ganz am Anfang der externen geparsten Entit\u00E4t enthalten sein.
+-        EqRequiredInTextDecl = Zeichen " = " muss auf \"{0}\" in der Textdeklaration folgen.
+-        QuoteRequiredInTextDecl = Der Wert nach \"{0}\" in der Textdeklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
+-        CloseQuoteMissingInTextDecl = Schlie\u00DFendes Anf\u00FChrungszeichen im Wert nach \"{0}\" in der Textdeklaration fehlt.
++        EqRequiredInTextDecl = Zeichen " = " muss auf "{0}" in der Textdeklaration folgen.
++        QuoteRequiredInTextDecl = Der Wert nach "{0}" in der Textdeklaration muss eine Zeichenfolge in Anf\u00FChrungszeichen sein.
++        CloseQuoteMissingInTextDecl = Schlie\u00DFendes Anf\u00FChrungszeichen im Wert nach "{0}" in der Textdeklaration fehlt.
+         SpaceRequiredBeforeVersionInTextDecl = Leerstelle vor dem Versionspseudoattribut in der Textdeklaration erforderlich.
+         SpaceRequiredBeforeEncodingInTextDecl = Leerstelle vor dem Codierungspseudoattribut in der Textdeklaration erforderlich.
+-        TextDeclUnterminated = Textdeklaration muss mit \"?>\" enden.
++        TextDeclUnterminated = Textdeklaration muss mit "?>" enden.
+         EncodingDeclRequired = Codierungsdeklaration ist in der Textdeklaration erforderlich.
+         NoMorePseudoAttributes = Es sind keine weiteren Pseudoattribute zul\u00E4ssig.
+         MorePseudoAttributes = Es werden weitere Pseudoattribute erwartet.
+@@ -143,13 +141,13 @@
+         CommentNotInOneEntity = Kommentar muss vollst\u00E4ndig in derselben geparsten Entit\u00E4t enthalten sein.
+         PINotInOneEntity = Verarbeitungsanweisung muss vollst\u00E4ndig in derselben geparsten Entit\u00E4t enthalten sein.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = Ung\u00FCltiger Codierungsname \"{0}\".
+-        EncodingByteOrderUnsupported = Angegebene Bytereihenfolge f\u00FCr die Codierung von \"{0}\" wird nicht unterst\u00FCtzt.
++        EncodingDeclInvalid = Ung\u00FCltiger Codierungsname "{0}".
++        EncodingByteOrderUnsupported = Angegebene Bytereihenfolge f\u00FCr die Codierung von "{0}" wird nicht unterst\u00FCtzt.
+         InvalidByte = Ung\u00FCltiges Byte {0} von {1}-Byte-UTF-8-Sequenz.
+         ExpectedByte = Byte {0} von {1}-Byte-UTF-8-Sequenz erwartet.  
+         InvalidHighSurrogate = High-Surrogate-Bits in UTF-8-Sequenz d\u00FCrfen 0x10 nicht \u00FCberschreiten, gefunden wurde aber 0x{0}.
+-        OperationNotSupported = Vorgang \"{0}\" nicht unterst\u00FCtzt von {1}-Reader.
+-        InvalidASCII = Byte \"{0}\" geh\u00F6rt nicht zum (7-Bit) ASCII-Zeichensatz.
++        OperationNotSupported = Vorgang "{0}" nicht unterst\u00FCtzt von {1}-Reader.
++        InvalidASCII = Byte "{0}" geh\u00F6rt nicht zum (7-Bit) ASCII-Zeichensatz.
+         CharConversionFailure = Eine Entit\u00E4t, f\u00FCr die eine bestimmte Codierung ermittelt wurde, darf keine Sequenzen enthalten, die in dieser Codierung ung\u00FCltig sind.
+         
+ # DTD Messages
+@@ -169,135 +167,135 @@
+         PubidCharIllegal = Zeichen (Unicode: 0x{0}) ist nicht zul\u00E4ssig in der \u00F6ffentlichen ID.
+         SpaceRequiredBetweenPublicAndSystem = Leerstellen erforderlich zwischen publicId und systemId.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Leerstelle nach \"" enden.
+-        PEReferenceWithinMarkup = Parameterentit\u00E4tsreferenz \"%{0};\" darf nicht in Markup in der internen Teilmenge der DTD vorkommen.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Leerstelle nach "" enden.
++        PEReferenceWithinMarkup = Parameterentit\u00E4tsreferenz "%{0};" darf nicht in Markup in der internen Teilmenge der DTD vorkommen.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Die Markup-Deklarationen, die in der Dokumenttypdeklaration enthalten sind bzw. auf die von der Dokumenttypdeklaration verwiesen wird, m\u00FCssen ordnungsgem\u00E4\u00DF formatiert sein.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklaration f\u00FCr \"xml:space\" muss als aufgez\u00E4hlter Typ angegeben werden, dessen einzigen m\u00F6glichen Werte \"default\" und \"preserve\" sind.
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklaration f\u00FCr "xml:space" muss als aufgez\u00E4hlter Typ angegeben werden, dessen einzigen m\u00F6glichen Werte "default" und "preserve" sind.
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Leerstelle nach \"" enden.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Leerstelle nach Elementtyp "{0}" in der Elementtypdeklaration erforderlich.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = Constraint ist nach dem Elementtyp "{0}" in der Elementtypdeklaration erforderlich.
++        ElementDeclUnterminated = Deklaration f\u00FCr Elementtyp "{0}" muss mit ">" enden.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Das Zeichen "(" oder ein Elementtyp ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Das Zeichen ")" ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Das Zeichen "(" oder ein Elementtyp ist in der Deklaration des Elementtyps "{0}" erforderlich.
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Das Zeichen ")" ist in der Deklaration des Elementtyps "{0}" erforderlich.
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Ein Elementtyp ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Das Zeichen ")" ist in der Deklaration des Elementtyps \"{0}\" erforderlich.
+-        MixedContentUnterminated = Das Mischcontentmodell \"{0}\" muss mit \")*\" enden, wenn die Typen der untergeordneten Elemente eingeschr\u00E4nkt sind.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Ein Elementtyp ist in der Deklaration des Elementtyps "{0}" erforderlich.
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Das Zeichen ")" ist in der Deklaration des Elementtyps "{0}" erforderlich.
++        MixedContentUnterminated = Das Mischcontentmodell "{0}" muss mit ")*" enden, wenn die Typen der untergeordneten Elemente eingeschr\u00E4nkt sind.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Leerstelle nach \"\" enden.
+-        IgnoreSectUnterminated = Der ausgeschlossene Bedingungsabschnitt muss mit \"]]>\" enden.
++        IncludeSectUnterminated = Der eingeschlossene Bedingungsabschnitt muss mit "]]>" enden.
++        IgnoreSectUnterminated = Der ausgeschlossene Bedingungsabschnitt muss mit "]]>" enden.
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = Auf "%" in der Parameterentit\u00E4tsreferenz muss umgehend der Entit\u00E4tsname folgen.
+-        SemicolonRequiredInPEReference = Parameterentit\u00E4tsreferenz \"%{0};\" muss mit dem Begrenzungszeichen ";" enden.
++        SemicolonRequiredInPEReference = Parameterentit\u00E4tsreferenz "%{0};" muss mit dem Begrenzungszeichen ";" enden.
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Leerstelle nach \"" enden.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = Entit\u00E4t \"{0}\" wurde mehrmals deklariert.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Leerstelle zwischen dem Entit\u00E4tsnamen "{0}" und der Definition in der Entit\u00E4tsdeklaration erforderlich.
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Leerstelle zwischen "NDATA" und dem Notationsnamen in der Deklaration f\u00FCr die Entit\u00E4t "{0} erforderlich.
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Leerstelle vor "NDATA" in der Deklaration f\u00FCr die Entit\u00E4t "{0} erforderlich.
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Notationsname ist nach "NDATA" in der Deklaration f\u00FCr die Entit\u00E4t "{0} erforderlich.
++        EntityDeclUnterminated = Deklaration f\u00FCr Entit\u00E4t "{0}" muss mit ">" enden.
++	MSG_DUPLICATE_ENTITY_DEFINITION = Entit\u00E4t "{0}" wurde mehrmals deklariert.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = Externe Entit\u00E4tsdeklaration muss mit \"SYSTEM\" oder \"PUBLIC\" beginnen.
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Leerstelle zwischen \"PUBLIC\" und der \u00F6ffentlichen ID erforderlich.
++        ExternalIDRequired = Externe Entit\u00E4tsdeklaration muss mit "SYSTEM" oder "PUBLIC" beginnen.
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Leerstelle zwischen "PUBLIC" und der \u00F6ffentlichen ID erforderlich.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Leerstelle zwischen der \u00F6ffentlichen ID und der System-ID erforderlich.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Leerstelle zwischen \"SYSTEM\" und der System-ID erforderlich.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragment-ID darf nicht als Teil der System-ID \"{0}\" angegeben werden.
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Leerstelle zwischen "SYSTEM" und der System-ID erforderlich.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragment-ID darf nicht als Teil der System-ID "{0}" angegeben werden.
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Leerstelle nach \"" enden.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Leerstelle nach dem Notationsnamen "{0}" in der Notationsdeklaration erforderlich.
++        ExternalIDorPublicIDRequired = Deklaration f\u00FCr die Notation "{0}" muss eine System- oder eine \u00F6ffentliche ID enthalten.
++        NotationDeclUnterminated = Deklaration f\u00FCr die Notation "{0}" muss mit ">" enden.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = Elementtyp \"{1}\" wurde bereits im Contentmodell der Elementdeklaration\"{0}\" angegeben.
+-        ENTITIESInvalid = Attributwert \"{1}\" mit dem Typ ENTITIES muss aus den Namen von mindestens einer geparsten Entit\u00E4t bestehen.
+-        ENTITYInvalid = Attributwert \"{1}\" mit dem Typ ENTITY muss aus dem Namen einer geparsten Entit\u00E4t bestehen.
+-        IDDefaultTypeInvalid = ID-Attribut \"{0}\" muss den deklarierten Standardwert \"#IMPLIED\" oder \"#REQUIRED\" haben.
+-        IDInvalid = Attributwert \"{0}\" mit dem Typ ID muss ein Name sein.
+-        IDInvalidWithNamespaces = Attributwert \"{0}\" mit dem Typ ID muss ein NCName sein, wenn Namespaces aktiviert sind.
+-        IDNotUnique = Attributwert \"{0}\" mit dem Typ ID muss eindeutig im Dokument sein.
+-        IDREFInvalid = Attributwert \"{0}\" mit dem Typ IDREF muss ein Name sein.
+-        IDREFInvalidWithNamespaces = Attributwert \"{0}\" mit dem Typ IDREF muss ein NCName sein, wenn Namespaces aktiviert sind.
+-        IDREFSInvalid = Attributwert \"{0}\" mit dem Typ IDREFS muss mindestens ein Name sein.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ersatztext der Parameterentit\u00E4t \"{0}\" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten, wenn die Entit\u00E4tsreferenz als vollst\u00E4ndige Deklaration verwendet wird.
+-        ImproperDeclarationNesting = Ersatztext der Parameterentit\u00E4t \"{0}\" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten.
+-        ImproperGroupNesting = Ersatztext der Parameterentit\u00E4t \"{0}\" muss ordnungsgem\u00E4\u00DF verschachtelte Klammernpaare enthalten.
+-        INVALID_PE_IN_CONDITIONAL = Ersatztext der Parameterentit\u00E4t \"{0}\" muss den gesamten Bedingungsabschnitt oder nur INCLUDE oder IGNORE enthalten.
+-        MSG_ATTRIBUTE_NOT_DECLARED = Attribut \"{1}\" muss f\u00FCr Elementtyp \"{0}\" deklariert werden.
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribut \"{0}\" mit Wert \"{1}\" muss einen Wert aus der Liste \"{2}\" haben.
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Der Wert \"{1}\" des Attributs \"{0}\" darf nicht von der Normalisierung (zu \"{2}\") in einem Standalone-Dokument ge\u00E4ndert werden.
+-        MSG_CONTENT_INCOMPLETE = Content des Elementtyps \"{0}\" ist unvollst\u00E4ndig. Muss \"{1}\" entsprechen.
+-        MSG_CONTENT_INVALID = Content des Elementtyps \"{0}\" muss \"{1}\" entsprechen.
+-        MSG_CONTENT_INVALID_SPECIFIED = Content des Elementtyps \"{0}\" muss \"{1}\" entsprechen. Untergeordnete Elemente mit dem Typ \"{2}\" sind nicht zul\u00E4ssig.
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribut \"{1}\" f\u00FCr Elementtyp \"{0}\" hat einen Standardwert und muss in einem Standalone-Dokument angegeben werden.
+-        MSG_DUPLICATE_ATTDEF = Attribut \"{1}\" ist bereits deklariert f\u00FCr Elementtyp \"{0}\".
+-        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp \"{0}\" darf nicht mehrmals deklariert werden.
+-        MSG_ELEMENT_NOT_DECLARED = Elementtyp \"{0}\" muss deklariert werden.
++        DuplicateTypeInMixedContent = Elementtyp "{1}" wurde bereits im Contentmodell der Elementdeklaration"{0}" angegeben.
++        ENTITIESInvalid = Attributwert "{1}" mit dem Typ ENTITIES muss aus den Namen von mindestens einer geparsten Entit\u00E4t bestehen.
++        ENTITYInvalid = Attributwert "{1}" mit dem Typ ENTITY muss aus dem Namen einer geparsten Entit\u00E4t bestehen.
++        IDDefaultTypeInvalid = ID-Attribut "{0}" muss den deklarierten Standardwert "#IMPLIED" oder "#REQUIRED" haben.
++        IDInvalid = Attributwert "{0}" mit dem Typ ID muss ein Name sein.
++        IDInvalidWithNamespaces = Attributwert "{0}" mit dem Typ ID muss ein NCName sein, wenn Namespaces aktiviert sind.
++        IDNotUnique = Attributwert "{0}" mit dem Typ ID muss eindeutig im Dokument sein.
++        IDREFInvalid = Attributwert "{0}" mit dem Typ IDREF muss ein Name sein.
++        IDREFInvalidWithNamespaces = Attributwert "{0}" mit dem Typ IDREF muss ein NCName sein, wenn Namespaces aktiviert sind.
++        IDREFSInvalid = Attributwert "{0}" mit dem Typ IDREFS muss mindestens ein Name sein.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ersatztext der Parameterentit\u00E4t "{0}" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten, wenn die Entit\u00E4tsreferenz als vollst\u00E4ndige Deklaration verwendet wird.
++        ImproperDeclarationNesting = Ersatztext der Parameterentit\u00E4t "{0}" muss ordnungsgem\u00E4\u00DF verschachtelte Deklarationen enthalten.
++        ImproperGroupNesting = Ersatztext der Parameterentit\u00E4t "{0}" muss ordnungsgem\u00E4\u00DF verschachtelte Klammernpaare enthalten.
++        INVALID_PE_IN_CONDITIONAL = Ersatztext der Parameterentit\u00E4t "{0}" muss den gesamten Bedingungsabschnitt oder nur INCLUDE oder IGNORE enthalten.
++        MSG_ATTRIBUTE_NOT_DECLARED = Attribut "{1}" muss f\u00FCr Elementtyp "{0}" deklariert werden.
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribut "{0}" mit Wert "{1}" muss einen Wert aus der Liste "{2}" haben.
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Der Wert "{1}" des Attributs "{0}" darf nicht von der Normalisierung (zu "{2}") in einem Standalone-Dokument ge\u00E4ndert werden.
++        MSG_CONTENT_INCOMPLETE = Content des Elementtyps "{0}" ist unvollst\u00E4ndig. Muss "{1}" entsprechen.
++        MSG_CONTENT_INVALID = Content des Elementtyps "{0}" muss "{1}" entsprechen.
++        MSG_CONTENT_INVALID_SPECIFIED = Content des Elementtyps "{0}" muss "{1}" entsprechen. Untergeordnete Elemente mit dem Typ "{2}" sind nicht zul\u00E4ssig.
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribut "{1}" f\u00FCr Elementtyp "{0}" hat einen Standardwert und muss in einem Standalone-Dokument angegeben werden.
++        MSG_DUPLICATE_ATTDEF = Attribut "{1}" ist bereits deklariert f\u00FCr Elementtyp "{0}".
++        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp "{0}" darf nicht mehrmals deklariert werden.
++        MSG_ELEMENT_NOT_DECLARED = Elementtyp "{0}" muss deklariert werden.
+         MSG_GRAMMAR_NOT_FOUND = Dokument ist ung\u00FCltig. Keine Grammatik gefunden.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = Element mit \"{0}\" ist im Dokument erforderlich.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referenz zur externen Entit\u00E4t \"{0}\" ist in einem Standalone-Dokument nicht zul\u00E4ssig.
+-        MSG_FIXED_ATTVALUE_INVALID = Attribut \"{1}\" mit Wert \"{2}\" muss den Wert\"{3}\" haben.
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp \"{0}\" hat bereits ein Attribut \"{1}\" mit dem Typ ID. Ein zweites Attribut \"{2}\" mit dem Typ ID ist nicht zul\u00E4ssig.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp \"{0}\" hat bereits ein Attribut \"{1}\" mit dem Typ NOTATION. Ein zweites Attribut \"{2}\" mit dem Typ NOTATION ist nicht zul\u00E4ssig.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notation \"{1}\" muss deklariert werden, wenn sie in der Notationstypliste f\u00FCr Attribut \"{0}\" referenziert wird.
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notation \"{1}\" muss deklariert werden, wenn sie in der Deklaration der nicht geparsten Entit\u00E4t f\u00FCr \"{0}\" referenziert wird.
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referenz zur Entit\u00E4t \"{0}\", die in einer externen geparsten Entit\u00E4t deklariert wird, ist in einem Standalone-Dokument nicht zul\u00E4ssig.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribut \"{1}\" ist erforderlich und muss f\u00FCr Elementtyp \"{0}\" angegeben werden.
++        MSG_ELEMENT_WITH_ID_REQUIRED = Element mit "{0}" ist im Dokument erforderlich.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referenz zur externen Entit\u00E4t "{0}" ist in einem Standalone-Dokument nicht zul\u00E4ssig.
++        MSG_FIXED_ATTVALUE_INVALID = Attribut "{1}" mit Wert "{2}" muss den Wert"{3}" haben.
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp "{0}" hat bereits ein Attribut "{1}" mit dem Typ ID. Ein zweites Attribut "{2}" mit dem Typ ID ist nicht zul\u00E4ssig.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp "{0}" hat bereits ein Attribut "{1}" mit dem Typ NOTATION. Ein zweites Attribut "{2}" mit dem Typ NOTATION ist nicht zul\u00E4ssig.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notation "{1}" muss deklariert werden, wenn sie in der Notationstypliste f\u00FCr Attribut "{0}" referenziert wird.
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notation "{1}" muss deklariert werden, wenn sie in der Deklaration der nicht geparsten Entit\u00E4t f\u00FCr "{0}" referenziert wird.
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referenz zur Entit\u00E4t "{0}", die in einer externen geparsten Entit\u00E4t deklariert wird, ist in einem Standalone-Dokument nicht zul\u00E4ssig.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribut "{1}" ist erforderlich und muss f\u00FCr Elementtyp "{0}" angegeben werden.
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Es d\u00FCrfen keine Leerstellen zwischen Elementen in einem Standalone-Dokument vorkommen, die in einer externen geparsten Entit\u00E4t mit Elementcontent deklariert sind.
+-        NMTOKENInvalid = Attributwert \"{0}\" mit dem Typ NMTOKEN muss ein Namenstoken sein.
+-        NMTOKENSInvalid = Attributwert \"{0}\" mit dem Typ NMTOKENS muss mindestens ein Namenstoken sein.
+-        NoNotationOnEmptyElement = Elementtyp \"{0}\", der als EMPTY deklariert wurde, kann nicht das Attribut \"{1}\" mit dem Typ NOTATION deklarieren.
+-        RootElementTypeMustMatchDoctypedecl = Dokument-Root-Element \"{1}\"muss mit DOCTYPE-Root \"{0}\" \u00FCbereinstimmen.
+-        UndeclaredElementInContentSpec = Contentmodell des Elements \"{0}\" verweist auf das nicht deklarierte Element \"{1}\".
+-        UniqueNotationName = Deklaration f\u00FCr die Notation \"{0}\" ist nicht eindeutig. Ein jeweiliger Name darf nicht in mehreren Notationsdeklarationen deklariert werden.
++        NMTOKENInvalid = Attributwert "{0}" mit dem Typ NMTOKEN muss ein Namenstoken sein.
++        NMTOKENSInvalid = Attributwert "{0}" mit dem Typ NMTOKENS muss mindestens ein Namenstoken sein.
++        NoNotationOnEmptyElement = Elementtyp "{0}", der als EMPTY deklariert wurde, kann nicht das Attribut "{1}" mit dem Typ NOTATION deklarieren.
++        RootElementTypeMustMatchDoctypedecl = Dokument-Root-Element "{1}"muss mit DOCTYPE-Root "{0}" \u00FCbereinstimmen.
++        UndeclaredElementInContentSpec = Contentmodell des Elements "{0}" verweist auf das nicht deklarierte Element "{1}".
++        UniqueNotationName = Deklaration f\u00FCr die Notation "{0}" ist nicht eindeutig. Ein jeweiliger Name darf nicht in mehreren Notationsdeklarationen deklariert werden.
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype-Validator: Nicht erfolgreich. Initialisierungsmethode muss mit einer g\u00FCltigen Grammatikreferenz aufgerufen werden. \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\" ist geparst.
+-        ENTITYNotValid = ENTITY \"{0}\" ist nicht g\u00FCltig.
++        ENTITYNotUnparsed = ENTITY "{0}" ist geparst.
++        ENTITYNotValid = ENTITY "{0}" ist nicht g\u00FCltig.
+         EmptyList = Werte der Typen ENTITIES, IDREFS und NMTOKENS d\u00FCrfen keine leeren Listen sein.
  
- # Iran
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = Externe Entit\u00E4tsreferenz \"&{0};\" ist in einem Attributwert nicht zul\u00E4ssig.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = Externe Entit\u00E4tsreferenz "&{0};" ist in einem Attributwert nicht zul\u00E4ssig.
++        AccessExternalDTD = Externe DTD: Lesen von externer DTD "{0}" nicht erfolgreich, da "{1}"-Zugriff wegen der von der Eigenschaft "accessExternalDTD" festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist.
++        AccessExternalEntity = Externe Entit\u00E4t: Lesen des externen Dokuments "{0}" nicht erfolgreich, da "{1}"-Zugriff wegen der von der Eigenschaft "accessExternalDTD" festgelegten Einschr\u00E4nkung nicht zul\u00E4ssig ist.
  
-@@ -1386,10 +1403,22 @@
- # 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.
-+
-+# From Steffen Thorsen (2013-12-11):
-+# Jordan Times and other sources say that Jordan is going back to
-+# UTC+2 on 2013-12-19 at midnight:
-+# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime
-+# Official, in Arabic:
-+# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14
-+# ... Our background/permalink about it
-+# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html
-+# ...
-+# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P
-+# ... says midnight for the coming one and 1:00 for the ones in the future
-+# (and they will use DST again next year, using the normal schedule).
-+
-+# From Paul Eggert (2013-12-11):
-+# As Steffen suggested, consider the past 21-month experiment to be DST.
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = Entit\u00E4t \"{0}\" wurde referenziert aber nicht deklariert.
+-        ReferenceToUnparsedEntity = Nicht geparste Entit\u00E4tsreferenz \"&{0};\" ist nicht zul\u00E4ssig.
+-        RecursiveReference = Rekursive Entit\u00E4tsreferenz \"{0}\". (Referenzpfad: {1}),
+-        RecursiveGeneralReference = Rekursive allgemeine Entit\u00E4tsreferenz \"&{0};\". (Referenzpfad: {1}),
+-        RecursivePEReference = Rekursive Parameterentit\u00E4tsreferenz \"%{0};\". (Referenzpfad: {1}),
++        EntityNotDeclared = Entit\u00E4t "{0}" wurde referenziert aber nicht deklariert.
++        ReferenceToUnparsedEntity = Nicht geparste Entit\u00E4tsreferenz "&{0};" ist nicht zul\u00E4ssig.
++        RecursiveReference = Rekursive Entit\u00E4tsreferenz "{0}". (Referenzpfad: {1}),
++        RecursiveGeneralReference = Rekursive allgemeine Entit\u00E4tsreferenz "&{0};". (Referenzpfad: {1}),
++        RecursivePEReference = Rekursive Parameterentit\u00E4tsreferenz "%{0};". (Referenzpfad: {1}),
+ # 4.3.3 Character Encoding in Entities
+         EncodingNotSupported = Codierung "{0}" wird nicht unterst\u00FCtzt.
+         EncodingRequired = Eine nicht in UTF-8 oder UTF-16 codierte geparste Entit\u00E4t muss eine Codierungsdeklaration enthalten.
+@@ -305,14 +303,14 @@
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = Element oder Attribut stimmt nicht mit QName-Production \u00FCberein: QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = Element \"{0}\" darf nicht \"xmlns\" als Pr\u00E4fix enthalten.
+-        ElementPrefixUnbound = Pr\u00E4fix \"{0}\" f\u00FCr Element \"{1}\" ist nicht gebunden.
+-        AttributePrefixUnbound = Pr\u00E4fix \"{2}\" f\u00FCr Attribut \"{1}\", das mit Elementtyp \"{0}\" verkn\u00FCpft ist, ist nicht gebunden.
+-        EmptyPrefixedAttName = Wert des Attributs \"{0}\" ist ung\u00FCltig. Namespace Bindings mit Pr\u00E4fix d\u00FCrfen nicht leer sein.
+-        PrefixDeclared = Namespace-Pr\u00E4fix \"{0}\" wurde nicht deklariert.
++        ElementXMLNSPrefix = Element "{0}" darf nicht "xmlns" als Pr\u00E4fix enthalten.
++        ElementPrefixUnbound = Pr\u00E4fix "{0}" f\u00FCr Element "{1}" ist nicht gebunden.
++        AttributePrefixUnbound = Pr\u00E4fix "{2}" f\u00FCr Attribut "{1}", das mit Elementtyp "{0}" verkn\u00FCpft ist, ist nicht gebunden.
++        EmptyPrefixedAttName = Wert des Attributs "{0}" ist ung\u00FCltig. Namespace Bindings mit Pr\u00E4fix d\u00FCrfen nicht leer sein.
++        PrefixDeclared = Namespace-Pr\u00E4fix "{0}" wurde nicht deklariert.
+         CantBindXMLNS = Pr\u00E4fix "xmlns" kann nicht explizit an einen Namespace gebunden werden. Umgekehrt kann auch der Namespace f\u00FCr "xmlns" nicht explizit an ein Pr\u00E4fix gebunden werden.
+         CantBindXML = Pr\u00E4fix "xml" kann nicht an einen anderen Namespace als den gew\u00F6hnlichen gebunden werden. Umgekehrt kann auch der Namespace f\u00FCr "xml" nicht an ein anderes Pr\u00E4fix als "xml" gebunden werden.
+-        MSG_ATT_DEFAULT_INVALID = defaultValue \"{1}\" von Attribut \"{0}\" ist aufgrund der lexikalischen Constraints dieses Attributtyps nicht g\u00FCltig.
++        MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" von Attribut "{0}" ist aufgrund der lexikalischen Constraints dieses Attributtyps nicht g\u00FCltig.
  
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	Jordan	1973	only	-	Jun	6	0:00	1:00	S
-@@ -1415,12 +1444,14 @@
- Rule	Jordan	1999	only	-	Jul	 1	0:00s	1:00	S
- Rule	Jordan	1999	2002	-	Sep	lastFri	0:00s	0	-
- Rule	Jordan	2000	2001	-	Mar	lastThu	0:00s	1:00	S
--Rule	Jordan	2002	max	-	Mar	lastThu	24:00	1:00	S
-+Rule	Jordan	2002	2012	-	Mar	lastThu	24:00	1:00	S
- 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	2011	-	Oct	lastFri	0:00s	0	-
--Rule	Jordan	2013	max	-	Oct	lastFri	0:00s	0	-
-+Rule	Jordan	2013	only	-	Dec	20	0:00	0	-
-+Rule	Jordan	2014	max	-	Mar	lastThu	24:00	1:00	S
-+Rule	Jordan	2014	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
-@@ -2303,9 +2334,18 @@
- # http://www.samanews.com/index.php?act=Show&id=154120
- # http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
  
--# From Paul Eggert (2013-04-15):
-+# From Steffen Thorsen (2013-09-24):
-+# The Gaza and West Bank are ending DST Thursday at midnight
-+# (2013-09-27 00:00:00) (one hour earlier than last year...).
-+# This source in English, says "that winter time will go into effect
-+# at midnight on Thursday in the West Bank and Gaza Strip":
-+# http://english.wafa.ps/index.php?action=detail&id=23246
-+# official source...:
-+# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
-+
-+# From Paul Eggert (2013-09-24):
- # For future dates, guess the last Thursday in March at 24:00 through
--# the first Friday on or after September 21 at 01:00.  This is consistent with
-+# the first Friday on or after September 21 at 00:00.  This is consistent with
- # the predictions in today's editions of the following URLs,
- # which are for Gaza and Hebron respectively:
- # http://www.timeanddate.com/worldclock/timezone.html?n=702
-@@ -2336,7 +2376,8 @@
- Rule Palestine	2011	only	-	Aug	30	0:00	1:00	S
- Rule Palestine	2011	only	-	Sep	30	0:00	0	-
- Rule Palestine	2012	max	-	Mar	lastThu	24:00	1:00	S
--Rule Palestine	2012	max	-	Sep	Fri>=21	1:00	0	-
-+Rule Palestine	2012	only	-	Sep	21	1:00	0	-
-+Rule Palestine	2013	max	-	Sep	Fri>=21	0:00	0	-
- 
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
---- jdk/make/sun/javazic/tzdata/australasia	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/australasia	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
-@@ -375,16 +375,25 @@
- # 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.
-+
-+# From the Fijian Government Media Center (2013-08-30) via David Wheeler:
-+# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am
-+# on Sunday 19th January, 2014....  move clocks forward by one hour from 2am
-+# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx
-+#
-+# From Paul Eggert (2013-09-09):
-+# For now, guess that Fiji springs forward the Sunday before the fourth
-+# Monday in October.  This matches both recent practice and
-+# timeanddate.com's current spring-forward prediction.
-+# For the January 2014 transition we guessed right while timeanddate.com
-+# guessed wrong, so leave the fall-back prediction alone.
- 
- # 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	max	-	Oct	Sun>=18	2:00	1:00	S
-+Rule	Fiji	2010	max	-	Oct	Sun>=21	2:00	1:00	S
- Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
- Rule	Fiji	2012	max	-	Jan	Sun>=18	3:00	0	-
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-@@ -510,6 +519,7 @@
- Zone Pacific/Chatham	12:13:48 -	LMT	1957 Jan  1
- 			12:45	Chatham	CHA%sT
  
-+Link Pacific/Auckland Antarctica/McMurdo
- 
- # Auckland Is
- # uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers,
-@@ -759,7 +769,7 @@
- # 1886-1891; Baker was similar but exact dates are not known.
- # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
- # uninhabited thereafter.
--# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
-+# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
- # see page 206 of Elgen M. Long and Marie K. Long,
- # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
- # So most likely Howland and Baker observed Hawaii Time from 1935
-@@ -772,8 +782,17 @@
- # no information; was probably like Pacific/Kiritimati
- 
- # Johnston
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone Pacific/Johnston	-10:00	-	HST
-+#
-+# From Paul Eggert (2013-09-03):
-+# In his memoirs of June 6th to October 4, 1945
-+#  (2005), Herbert C. Bach writes,
-+# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
-+# Johnston time, 1:30 AM Kwajalein time."  This was in June 1945, and
-+# confirms that Johnston kept the same time as Honolulu in summer 1945.
-+# We have no better information, so for now, assume this has been true
-+# indefinitely into the past.
-+#
-+# See 'northamerica' for Pacific/Johnston.
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=Parser hat mehr als \"{0}\" Entit\u00E4tserweiterungen in diesem Dokument gefunden. Dies ist der durch die Anwendung vorgeschriebene Grenzwert.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: Der Parser hat mehr als {0} Entit\u00E4tserweiterungen in diesem Dokument gefunden. Dies ist der von JDK vorgeschriebene Grenzwert.
++        ElementAttributeLimit=JAXP00010002: Element "{0}" hat mehr als {1} Attribute. "{1}" ist der von JDK vorgeschriebene Grenzwert.
++        MaxEntitySizeLimit=JAXP00010003: Die L\u00E4nge von Entit\u00E4t "{0}" ist "{1}" und \u00FCberschreitet den Grenzwert "{2}", der von "{3}" festgelegt wurde.
++        TotalEntitySizeLimit=JAXP00010004: Die akkumulierte Gr\u00F6\u00DFe "{0}" der Entit\u00E4ten \u00FCberschreitet den Grenzwert "{1}", der von "{2}" festgelegt wurde.
++        MaxXMLNameLimit=JAXP00010005: Der Name "{0}" \u00FCberschreitet den Grenzwert "{1}", der von "{2}" festgelegt wurde.
  
- # Kingman
- # uninhabited
---- jdk/make/sun/javazic/tzdata/backward	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/backward	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
-@@ -45,15 +45,17 @@
- Link	America/Argentina/Mendoza	America/Mendoza
- Link	America/Rio_Branco	America/Porto_Acre
- Link	America/Argentina/Cordoba	America/Rosario
--Link	America/St_Thomas	America/Virgin
-+Link	America/Denver		America/Shiprock
-+Link	America/Port_of_Spain	America/Virgin
-+Link	Pacific/Auckland	Antarctica/South_Pole
- Link	Asia/Ashgabat		Asia/Ashkhabad
-+Link	Asia/Kolkata		Asia/Calcutta
- Link	Asia/Chongqing		Asia/Chungking
- Link	Asia/Dhaka		Asia/Dacca
- Link	Asia/Kathmandu		Asia/Katmandu
--Link	Asia/Kolkata		Asia/Calcutta
- Link	Asia/Macau		Asia/Macao
--Link	Asia/Jerusalem		Asia/Tel_Aviv
- Link	Asia/Ho_Chi_Minh	Asia/Saigon
-+Link	Asia/Jerusalem		Asia/Tel_Aviv
- Link	Asia/Thimphu		Asia/Thimbu
- Link	Asia/Makassar		Asia/Ujung_Pandang
- Link	Asia/Ulaanbaatar	Asia/Ulan_Bator
-@@ -111,10 +113,10 @@
- Link	Pacific/Chatham		NZ-CHAT
- Link	America/Denver		Navajo
- Link	Asia/Shanghai		PRC
-+Link	Pacific/Pohnpei		Pacific/Ponape
- Link	Pacific/Pago_Pago	Pacific/Samoa
--Link	Pacific/Chuuk		Pacific/Yap
- Link	Pacific/Chuuk		Pacific/Truk
--Link	Pacific/Pohnpei		Pacific/Ponape
-+Link	Pacific/Chuuk		Pacific/Yap
- Link	Europe/Warsaw		Poland
- Link	Europe/Lisbon		Portugal
- Link	Asia/Taipei		ROC
---- jdk/make/sun/javazic/tzdata/etcetera	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/etcetera	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
--#  
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= Element \"{0}\" hat mehr als \"{1}\" Attribute. \"{1}\" ist der durch die Anwendung vorgeschriebene Grenzwert.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
- # 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.
-@@ -54,9 +54,9 @@
- # even though this is the opposite of what many people expect.
- # POSIX has positive signs west of Greenwich, but many people expect
- # positive signs east of Greenwich.  For example, TZ='Etc/GMT+4' uses
--# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
-+# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
- # (i.e. west of Greenwich) even though many people would expect it to
--# mean 4 hours ahead of UTC (i.e. east of Greenwich).
-+# mean 4 hours ahead of UT (i.e. east of Greenwich).
- #
- # In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
- # TZ='+4'; if you want time zone abbreviations conforming to
---- jdk/make/sun/javazic/tzdata/europe	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/europe	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# 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 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).
--#  
++# 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.
--#  
++# 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.
-@@ -65,7 +65,7 @@
- #	 (1998-09-21, in Portuguese)
- 
- #
--# I invented the abbreviations marked `*' in the following table;
-+# I invented the abbreviations marked '*' in the following table;
- # the rest are from earlier versions of this file, or from other sources.
- # Corrections are welcome!
- #                   std dst  2dst
-@@ -119,7 +119,7 @@
- # and a sketch map showing some of the sightlines involved. One paragraph
- # of the text said:
- #
--# `An old stone obelisk marking a forgotten terrestrial meridian stands
-+# 'An old stone obelisk marking a forgotten terrestrial meridian stands
- # beside the river at Kew. In the 18th century, before time and longitude
- # was standardised by the Royal Observatory in Greenwich, scholars observed
- # this stone and the movement of stars from Kew Observatory nearby. They
-@@ -163,7 +163,7 @@
- # From Paul Eggert (2003-09-27):
- # Summer Time was first seriously proposed by William Willett (1857-1915),
- # a London builder and member of the Royal Astronomical Society
--# who circulated a pamphlet ``The Waste of Daylight'' (1907)
-+# who circulated a pamphlet "The Waste of Daylight" (1907)
- # that proposed advancing clocks 20 minutes on each of four Sundays in April,
- # and retarding them by the same amount on four Sundays in September.
- # A bill was drafted in 1909 and introduced in Parliament several times,
-@@ -188,10 +188,10 @@
- #	
- 
- # From Paul Eggert (1996-09-03):
--# The OED Supplement says that the English originally said ``Daylight Saving''
-+# The OED Supplement says that the English originally said "Daylight Saving"
- # when they were debating the adoption of DST in 1908; but by 1916 this
- # term appears only in quotes taken from DST's opponents, whereas the
--# proponents (who eventually won the argument) are quoted as using ``Summer''.
-+# proponents (who eventually won the argument) are quoted as using "Summer".
- 
- # From Arthur David Olson (1989-01-19):
- #
-@@ -231,9 +231,9 @@
- # which could not be said to run counter to any official description.
- 
- # From Paul Eggert (2000-10-02):
--# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common
-+# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common
- # and follows the more usual convention of putting the location name first,
--# so we use `BDST'.
-+# so we use 'BDST'.
- 
- # Peter Ilieve (1998-04-19) described at length
- # the history of summer time legislation in the United Kingdom.
-@@ -454,6 +454,8 @@
- Rule	GB-Eire 1990	1995	-	Oct	Sun>=22	1:00u	0	GMT
- # Summer Time Order 1997 (S.I. 1997/2982)
- # See EU for rules starting in 1996.
++# 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.
 +#
-+# Use Europe/London for Jersey, Guernsey, and the Isle of Man.
- 
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone	Europe/London	-0:01:15 -	LMT	1847 Dec  1 0:00s
-@@ -820,7 +822,7 @@
- 			1:00	EU	CE%sT
- 
- # Bosnia and Herzegovina
--# see Serbia
-+# See Europe/Belgrade.
- 
- # Bulgaria
- #
-@@ -848,10 +850,10 @@
- 			2:00	EU	EE%sT
- 
- # Croatia
--# see Serbia
-+# See Europe/Belgrade.
- 
- # Cyprus
--# Please see the `asia' file for Asia/Nicosia.
-+# Please see the 'asia' file for Asia/Nicosia.
- 
- # Czech Republic
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-@@ -868,6 +870,7 @@
- 			1:00	C-Eur	CE%sT	1944 Sep 17 2:00s
- 			1:00	Czech	CE%sT	1979
- 			1:00	EU	CE%sT
-+# Use Europe/Prague also for Slovakia.
- 
- # Denmark, Faroe Islands, and Greenland
- 
-@@ -1031,12 +1034,12 @@
- # From Peter Ilieve (1996-10-28):
- # [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s,
- # but a relative confirms that Estonia still switches at 02:00s, writing:]
--# ``I do not [know] exactly but there are some little different
-+# "I do not [know] exactly but there are some little different
- # (confusing) rules for International Air and Railway Transport Schedules
- # conversion in Sunday connected with end of summer time in Estonia....
- # A discussion is running about the summer time efficiency and effect on
- # human physiology.  It seems that Estonia maybe will not change to
--# summer time next spring.''
-+# summer time next spring."
- 
- # From Peter Ilieve (1998-11-04), heavily edited:
- # 
-@@ -1091,7 +1094,7 @@
- # Well, here in Helsinki we're just changing from summer time to regular one,
- # and it's supposed to change at 4am...
- 
--# From Janne Snabb (2010-0715):
-+# From Janne Snabb (2010-07-15):
- #
- # I noticed that the Finland data is not accurate for years 1981 and 1982.
- # During these two first trial years the DST adjustment was made one hour
-@@ -1148,7 +1151,7 @@
  
- 
- #
--# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman.
-+# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman.
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	France	1916	only	-	Jun	14	23:00s	1:00	S
- Rule	France	1916	1919	-	Oct	Sun>=1	23:00s	0	-
-@@ -1438,7 +1441,7 @@
- # 
- # Day-light Saving Time in Italy (2006-02-03)
- # 
--# (`FP' below), taken from an Italian National Electrotechnical Institute
-+# ('FP' below), taken from an Italian National Electrotechnical Institute
- # publication. When the three sources disagree, guess who's right, as follows:
- #
- # year	FP	Shanks&P. (S)	Whitman (W)	Go with:
-@@ -1584,10 +1587,22 @@
- 			2:00	EU	EE%sT
- 
- # Liechtenstein
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone	Europe/Vaduz	0:38:04 -	LMT	1894 Jun
--			1:00	-	CET	1981
--			1:00	EU	CE%sT
-+
-+# From Paul Eggert (2013-09-09):
-+# Shanks & Pottenger say Vaduz is like Zurich.
-+
-+# From Alois Treindl (2013-09-18):
-+# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
-+# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
-+# I ... translate only the last two paragraphs:
-+#    ... during second world war, in the years 1941 and 1942, Liechtenstein
-+#    introduced daylight saving time, adapting to Switzerland.  From 1943 on
-+#    central European time was in force throughout the year.
-+#    From a report of the duke's government to the high council,
-+#    regarding the introduction of a time law, of 31 May 1977.
-+
-+Link Europe/Zurich Europe/Vaduz
-+
- 
- # Lithuania
- 
-@@ -1675,7 +1690,7 @@
- 			1:00	EU	CE%sT
- 
- # Macedonia
--# see Serbia
-+# See Europe/Belgrade.
- 
- # Malta
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-@@ -1768,7 +1783,7 @@
- 			1:00	EU	CE%sT
- 
- # Montenegro
--# see Serbia
-+# See Europe/Belgrade.
- 
- # Netherlands
- 
-@@ -1883,7 +1898,7 @@
- # before 1895, and therefore probably changed the local time somewhere
- # between 1895 and 1925 (inclusive).
- 
--# From Paul Eggert (2001-05-01):
-+# From Paul Eggert (2013-09-04):
- #
- # Actually, Jan Mayen was never occupied by Germany during World War II,
- # so it must have diverged from Oslo time during the war, as Oslo was
-@@ -1894,7 +1909,7 @@
- # 1941 with a small Norwegian garrison and continued operations despite
- # frequent air ttacks from Germans.  In 1943 the Americans established a
- # radiolocating station on the island, called "Atlantic City".  Possibly
--# the UTC offset changed during the war, but I think it unlikely that
-+# the UT offset changed during the war, but I think it unlikely that
- # Jan Mayen used German daylight-saving rules.
- #
- # Svalbard is more complicated, as it was raided in August 1941 by an
-@@ -1907,9 +1922,8 @@
- # the German armed forces at the Svalbard weather station code-named
- # Haudegen did not surrender to the Allies until September 1945.
- #
--# All these events predate our cutoff date of 1970.  Unless we can
--# come up with more definitive info about the timekeeping during the
--# war years it's probably best just do...the following for now:
-+# All these events predate our cutoff date of 1970, so use Europe/Oslo
-+# for these regions.
- Link	Europe/Oslo	Arctic/Longyearbyen
- 
- # Poland
-@@ -2167,7 +2181,7 @@
- # so we (Novosibirsk) simply did not switch.
- #
- # From Andrey A. Chernov (1996-10-04):
--# `MSK' and `MSD' were born and used initially on Moscow computers with
-+# 'MSK' and 'MSD' were born and used initially on Moscow computers with
- # UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group)....
- # The next step was the UUCP network, the Relcom predecessor
- # (used mainly for mail), and MSK/MSD was actively used there.
-@@ -2466,6 +2480,9 @@
- 			11:00	Russia	ANA%sT	2011 Mar 27 2:00s
- 			12:00	-	ANAT
- 
-+# San Marino
-+# See Europe/Rome.
-+
- # Serbia
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone	Europe/Belgrade	1:22:00	-	LMT	1884
-@@ -2488,7 +2505,7 @@
- Link Europe/Prague Europe/Bratislava
- 
- # Slovenia
--# see Serbia
-+# See Europe/Belgrade.
- 
- # Spain
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-@@ -2622,7 +2639,7 @@
- # and their performance improved enormously.  Communities began to keep
- # mean time in preference to apparent time -- Geneva from 1780 ....
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
--# From Whitman (who writes ``Midnight?''):
-+# From Whitman (who writes "Midnight?"):
- # Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
- # Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
- # From Shanks & Pottenger:
-@@ -2667,23 +2684,53 @@
- # The 1940 rules must be deleted.
- #
- # One further detail for Switzerland, which is probably out of scope for
--# most users of tzdata:
--# The zone file
--# Zone    Europe/Zurich   0:34:08 -       LMT     1848 Sep 12
--#                          0:29:44 -       BMT     1894 Jun #Bern Mean Time
--#                          1:00    Swiss   CE%sT   1981
--#                          1:00    EU      CE%sT
-+# most users of tzdata: The [Europe/Zurich zone] ...
- # describes all of Switzerland correctly, with the exception of
- # the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not
- # follow Bern Mean Time but kept its own local mean time.
- # To represent this, an extra zone would be needed.
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el pr\u00F3logo del documento.
+         InvalidCharInXMLDecl = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en la declaraci\u00F3n XML.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = La secuencia de caracteres \"]]>\" no debe aparecer en el contenido, a menos que se utilice para marcar el final de una secci\u00F3n CDATA.
++        CDEndInContent = La secuencia de caracteres "]]>" no debe aparecer en el contenido, a menos que se utilice para marcar el final de una secci\u00F3n CDATA.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = La secci\u00F3n CDATA debe finalizar en \"]]>\".
++        CDSectUnterminated = La secci\u00F3n CDATA debe finalizar en "]]>".
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = La declaraci\u00F3n XML s\u00F3lo puede aparecer al principio del documento.
+-        EqRequiredInXMLDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de \"{0}\" en la declaraci\u00F3n XML.
+-        QuoteRequiredInXMLDecl = El valor despu\u00E9s de \"{0}\" en la declaraci\u00F3n XML debe ser una cadena con comillas.
+-        XMLDeclUnterminated = La declaraci\u00F3n XML debe finalizar en \"?>\".
++        EqRequiredInXMLDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de "{0}" en la declaraci\u00F3n XML.
++        QuoteRequiredInXMLDecl = El valor despu\u00E9s de "{0}" en la declaraci\u00F3n XML debe ser una cadena con comillas.
++        XMLDeclUnterminated = La declaraci\u00F3n XML debe finalizar en "?>".
+         VersionInfoRequired = La versi\u00F3n es necesaria en la declaraci\u00F3n XML.
+         SpaceRequiredBeforeVersionInXMLDecl = Es necesario un espacio en blanco antes del pseudo atributo version en la declaraci\u00F3n XML.
+         SpaceRequiredBeforeEncodingInXMLDecl = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaraci\u00F3n XML.
+@@ -71,70 +68,71 @@
+         ReferenceIllegalInTrailingMisc=La referencia no est\u00E1 permitida en la secci\u00F3n final.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = El valor de declaraci\u00F3n del documento aut\u00F3nomo debe ser \"yes\" o \"no\", pero nunca \"{0}\".
++        SDDeclInvalid = El valor de declaraci\u00F3n del documento aut\u00F3nomo debe ser "yes" o "no", pero nunca "{0}".
++        SDDeclNameInvalid = Puede que el nombre aut\u00F3nomo de la declaraci\u00F3n XML est\u00E9 mal escrito.
+ # 2.12 Language Identification
+-        XMLLangInvalid = El valor del atributo xml:lang \"{0}\" es un identificador de idioma no v\u00E1lido.
++        XMLLangInvalid = El valor del atributo xml:lang "{0}" es un identificador de idioma no v\u00E1lido.
+ # 3. Logical Structures
+-        ETagRequired = El tipo de elemento \"{0}\" debe finalizar por la etiqueta final coincidente \"\".
++        ETagRequired = El tipo de elemento "{0}" debe finalizar por la etiqueta final coincidente "".
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = El tipo de elemento \"{0}\" debe ir seguido de una de estas especificaciones de atributo: \">\" o \"/>\".
+-        EqRequiredInAttribute = El nombre de atributo \"{1}\" asociado a un tipo de elemento \"{0}\" debe ir seguido del car\u00E1cter '' = ''.
+-        OpenQuoteExpected = Las comillas de apertura se deben utilizar para el atributo \"{1}\" asociado a un tipo de elemento \"{0}\".
+-        CloseQuoteExpected = Las comillas de cierre se deben utilizar para el atributo \"{1}\" asociado a un tipo de elemento \"{0}\".
+-        AttributeNotUnique = El atributo \"{1}\" ya se ha especificado para el elemento \"{0}\".
+-        AttributeNSNotUnique = El atributo \"{1}\" enlazado al espacio de nombres \"{2}\" ya se ha especificado para el elemento \"{0}\".
+-        ETagUnterminated = La etiqueta final para el tipo de elemento \"{0}\" debe finalizar en un delimitador ''>''.
++        ElementUnterminated = El tipo de elemento "{0}" debe ir seguido de una de estas especificaciones de atributo: ">" o "/>".
++        EqRequiredInAttribute = El nombre de atributo "{1}" asociado a un tipo de elemento "{0}" debe ir seguido del car\u00E1cter '' = ''.
++        OpenQuoteExpected = Las comillas de apertura se deben utilizar para el atributo "{1}" asociado a un tipo de elemento "{0}".
++        CloseQuoteExpected = Las comillas de cierre se deben utilizar para el atributo "{1}" asociado a un tipo de elemento "{0}".
++        AttributeNotUnique = El atributo "{1}" ya se ha especificado para el elemento "{0}".
++        AttributeNSNotUnique = El atributo "{1}" enlazado al espacio de nombres "{2}" ya se ha especificado para el elemento "{0}".
++        ETagUnterminated = La etiqueta final para el tipo de elemento "{0}" debe finalizar en un delimitador ''>''.
+         MarkupNotRecognizedInContent = El contenido de los elementos debe constar de marcadores o datos de car\u00E1cter con un formato correcto.
+         DoctypeIllegalInContent = No se permite un DOCTYPE en el contenido.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = La referencia debe finalizar con un delimitador ';'.
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = La referencia debe incluirse totalmente en la misma entidad analizada.
+-        ElementEntityMismatch = El elemento \"{0}\" debe empezar y finalizar en la misma entidad.
++        ElementEntityMismatch = El elemento "{0}" debe empezar y finalizar en la misma entidad.
+         MarkupEntityMismatch=Las estructuras del documento XML deben empezar y finalizar en la misma entidad.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{2}) no v\u00E1lido en el valor del atributo \"{1}\" y el elemento es \"{0}\".
++        InvalidCharInAttValue = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{2}) no v\u00E1lido en el valor del atributo "{1}" y el elemento es "{0}".
+         InvalidCharInComment = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el comentario.
+         InvalidCharInPI = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en la instrucci\u00F3n de procesamiento.
+         InvalidCharInInternalSubset = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en el subconjunto interno del DTD.
+         InvalidCharInTextDecl = Se ha encontrado un car\u00E1cter XML (Unicode: 0x{0}) no v\u00E1lido en la declaraci\u00F3n de texto.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = El valor del atributo \"{1}\" debe empezar por un car\u00E1cter de comillas dobles o simples.
+-        LessthanInAttValue = El valor del atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no debe contener el car\u00E1cter ''<''.
+-        AttributeValueUnterminated = El valor para el atributo \"{1}\" debe finalizar en un car\u00E1cter de comillas coincidentes.
++        QuoteRequiredInAttValue = El valor del atributo "{1}" debe empezar por un car\u00E1cter de comillas dobles o simples.
++        LessthanInAttValue = El valor del atributo "{1}" asociado a un tipo de elemento "{0}" no debe contener el car\u00E1cter ''<''.
++        AttributeValueUnterminated = El valor para el atributo "{1}" debe finalizar en un car\u00E1cter de comillas coincidentes.
+ # 2.5 Comments
+-        InvalidCommentStart = El comentario debe empezar por \"\".
++        InvalidCommentStart = El comentario debe empezar por "".
+         COMMENT_NOT_IN_ONE_ENTITY = El comentario no est\u00E1 incluido en la misma entidad.
+ # 2.6 Processing Instructions
+         PITargetRequired = La instrucci\u00F3n de procesamiento debe empezar por el nombre del destino.
+         SpaceRequiredInPI = Es necesario un espacio en blanco entre el destino de la instrucci\u00F3n de procesamiento y los datos.
+-        PIUnterminated = La instrucci\u00F3n de procesamiento debe finalizar en \"?>\".
+-        ReservedPITarget = El destino de la instrucci\u00F3n de procesamiento que coincide con \"[xX][mM][lL]\" no est\u00E1 permitido.
++        PIUnterminated = La instrucci\u00F3n de procesamiento debe finalizar en "?>".
++        ReservedPITarget = El destino de la instrucci\u00F3n de procesamiento que coincide con "[xX][mM][lL]" no est\u00E1 permitido.
+         PI_NOT_IN_ONE_ENTITY = La instrucci\u00F3n de procesamiento no est\u00E1 incluida en la misma entidad.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = Versi\u00F3n no v\u00E1lida \"{0}\".
+-        VersionNotSupported = La versi\u00F3n XML \"{0}\" no est\u00E1 soportada, s\u00F3lo la versi\u00F3n XML 1.0 est\u00E1 soportada.
+-        VersionNotSupported11 = La versi\u00F3n XML \"{0}\" no est\u00E1 soportada, s\u00F3lo las versiones XML 1.0 y XML 1.1 est\u00E1n soportadas.
++        VersionInfoInvalid = Versi\u00F3n no v\u00E1lida "{0}".
++        VersionNotSupported = La versi\u00F3n XML "{0}" no est\u00E1 soportada, s\u00F3lo la versi\u00F3n XML 1.0 est\u00E1 soportada.
++        VersionNotSupported11 = La versi\u00F3n XML "{0}" no est\u00E1 soportada, s\u00F3lo las versiones XML 1.0 y XML 1.1 est\u00E1n soportadas.
+         VersionMismatch= Una entidad no puede incluir otra entidad de una versi\u00F3n posterior.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = Una representaci\u00F3n decimal debe aparecer inmediatamente despu\u00E9s de \"&#\" en una referencia de caracteres.
+-        HexdigitRequiredInCharRef = Una representaci\u00F3n hexadecimal debe aparecer inmediatamente despu\u00E9s de \"&#\" en una referencia de caracteres.
++        DigitRequiredInCharRef = Una representaci\u00F3n decimal debe aparecer inmediatamente despu\u00E9s de "&#" en una referencia de caracteres.
++        HexdigitRequiredInCharRef = Una representaci\u00F3n hexadecimal debe aparecer inmediatamente despu\u00E9s de "&#" en una referencia de caracteres.
+         SemicolonRequiredInCharRef = La referencia de caracteres debe finalizar en el delimitador ';'.
+-        InvalidCharRef = La referencia de caracteres \"&#{0}\" es un car\u00E1cter XML no v\u00E1lido.
++        InvalidCharRef = La referencia de caracteres "&#{0}" es un car\u00E1cter XML no v\u00E1lido.
+         NameRequiredInReference = El nombre de la entidad debe aparecer inmediatamente despu\u00E9s de '&' en la referencia de entidades.
+-        SemicolonRequiredInReference = La referencia a la entidad \"{0}\" debe finalizar en el delimitador '';''.
++        SemicolonRequiredInReference = La referencia a la entidad "{0}" debe finalizar en el delimitador '';''.
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = La declaraci\u00F3n de texto s\u00F3lo puede aparecer al principio de la entidad analizada externa.
+-        EqRequiredInTextDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de \"{0}\" en la declaraci\u00F3n de texto.
+-        QuoteRequiredInTextDecl = El valor despu\u00E9s de \"{0}\" en la declaraci\u00F3n de texto debe ser una cadena con comillas.
+-        CloseQuoteMissingInTextDecl = Faltan las comillas de cierre en el valor despu\u00E9s de \"{0}\" en la declaraci\u00F3n de texto.
++        EqRequiredInTextDecl = El car\u00E1cter '' = '' debe aparecer despu\u00E9s de "{0}" en la declaraci\u00F3n de texto.
++        QuoteRequiredInTextDecl = El valor despu\u00E9s de "{0}" en la declaraci\u00F3n de texto debe ser una cadena con comillas.
++        CloseQuoteMissingInTextDecl = Faltan las comillas de cierre en el valor despu\u00E9s de "{0}" en la declaraci\u00F3n de texto.
+         SpaceRequiredBeforeVersionInTextDecl = Es necesario un espacio en blanco antes del pseudo atributo version en la declaraci\u00F3n de texto.
+         SpaceRequiredBeforeEncodingInTextDecl = Es necesario un espacio en blanco antes del pseudo atributo encoding en la declaraci\u00F3n de texto.
+-        TextDeclUnterminated = La declaraci\u00F3n de texto debe finalizar en \"?>\".
++        TextDeclUnterminated = La declaraci\u00F3n de texto debe finalizar en "?>".
+         EncodingDeclRequired = La declaraci\u00F3n de codificaci\u00F3n es necesaria en la declaraci\u00F3n de texto.
+         NoMorePseudoAttributes = No se permiten m\u00E1s pseudo atributos.
+         MorePseudoAttributes = Se esperan m\u00E1s pseudo atributos.
+@@ -143,13 +141,13 @@
+         CommentNotInOneEntity = El comentario debe incluirse totalmente en la misma entidad analizada.
+         PINotInOneEntity = La instrucci\u00F3n de procesamiento debe incluirse totalmente en la misma entidad analizada.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = Nombre de codificaci\u00F3n no v\u00E1lido \"{0}\".
+-        EncodingByteOrderUnsupported = El orden de bytes proporcionado para la codificaci\u00F3n \"{0}\" no est\u00E1 soportado.
++        EncodingDeclInvalid = Nombre de codificaci\u00F3n no v\u00E1lido "{0}".
++        EncodingByteOrderUnsupported = El orden de bytes proporcionado para la codificaci\u00F3n "{0}" no est\u00E1 soportado.
+         InvalidByte = Byte no v\u00E1lido {0} de la secuencia UTF-8 de {1} bytes
+         ExpectedByte = Byte esperado {0} de la secuencia UTF-8 de {1} bytes.  
+         InvalidHighSurrogate = Los bits de sustituci\u00F3n superior en la secuencia UTF-8 no deben exceder 0x10 pero se han encontrado 0x{0}.
+-        OperationNotSupported = La operaci\u00F3n \"{0}\" no est\u00E1 soportada por el lector {1}.
+-        InvalidASCII = El byte \"{0}\"no es un miembro del juego de caracteres ASCII (7 bits).
++        OperationNotSupported = La operaci\u00F3n "{0}" no est\u00E1 soportada por el lector {1}.
++        InvalidASCII = El byte "{0}"no es un miembro del juego de caracteres ASCII (7 bits).
+         CharConversionFailure = Una entidad con una codificaci\u00F3n determinada no debe contener secuencias no permitidas en dicha codificaci\u00F3n.
+         
+ # DTD Messages
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = El car\u00E1cter (Unicode: 0x{0}) no est\u00E1 permitido en el identificador p\u00FAblico.
+         SpaceRequiredBetweenPublicAndSystem = Son necesarios espacios en blanco entre publicId y systemId.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
+-        PEReferenceWithinMarkup = La referencia de entidad del par\u00E1metro \"%{0};\" no puede producirse en el marcador en el subconjunto interno del DTD.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Es necesario un espacio en blanco despu\u00E9s de "''.
++        PEReferenceWithinMarkup = La referencia de entidad del par\u00E1metro "%{0};" no puede producirse en el marcador en el subconjunto interno del DTD.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Las declaraciones de marcador que se incluyen o a las que apunta la declaraci\u00F3n de tipo de documento deben tener el formato correcto.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = La declaraci\u00F3n de atributo para \"xml:space\" debe ofrecerse como un tipo enumerado cuyos \u00FAnicos valores posibles son \"default\" y \"preserve\".
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = La declaraci\u00F3n de atributo para "xml:space" debe ofrecerse como un tipo enumerado cuyos \u00FAnicos valores posibles son "default" y "preserve".
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Es necesario un espacio en blanco despu\u00E9s del tipo de elemento "{0}" en la declaraci\u00F3n de tipo de elemento.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = Es necesaria la restricci\u00F3n despu\u00E9s del tipo de elemento "{0}" en la declaraci\u00F3n de tipo de elemento.
++        ElementDeclUnterminated = La declaraci\u00F3n para el tipo de elemento "{0}" debe finalizar en ''>''.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un car\u00E1cter ''('' o un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un car\u00E1cter ''('' o un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento \"{0}\".
+-        MixedContentUnterminated = El modelo de contenido mixto \"{0}\" debe finalizar en \")*\" cuando los tipos de elementos secundarios est\u00E1n restringidos.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo de elemento es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un car\u00E1cter '')'' es necesario en la declaraci\u00F3n de tipo de elemento "{0}".
++        MixedContentUnterminated = El modelo de contenido mixto "{0}" debe finalizar en ")*" cuando los tipos de elementos secundarios est\u00E1n restringidos.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Es necesario un espacio en blanco despu\u00E9s de \"\".
+-        IgnoreSectUnterminated = La secci\u00F3n condicional excluida debe finalizar en \"]]>\".
++        IncludeSectUnterminated = La secci\u00F3n condicional incluida debe finalizar en "]]>".
++        IgnoreSectUnterminated = La secci\u00F3n condicional excluida debe finalizar en "]]>".
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = El nombre de la entidad debe aparecer inmediatamente despu\u00E9s de '%' en la referencia de entidad de par\u00E1metro.
+-        SemicolonRequiredInPEReference = La referencia de entidad de par\u00E1metro \"%{0};\" debe finalizar en el delimitador '';''.
++        SemicolonRequiredInPEReference = La referencia de entidad de par\u00E1metro "%{0};" debe finalizar en el delimitador '';''.
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = La entidad \"{0}\" se ha declarado m\u00E1s de una vez.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Es necesario un espacio en blanco entre el nombre de entidad "{0}" y la definici\u00F3n en la declaraci\u00F3n de entidad.
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Es necesario un espacio en blanco entre "NDATA" y el nombre de notaci\u00F3n en la declaraci\u00F3n para la entidad "{0}".
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Es necesario un espacio en blanco antes de "NDATA" en la declaraci\u00F3n para la entidad "{0}".
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = El nombre de notaci\u00F3n es necesario despu\u00E9s de "NDATA" en la declaraci\u00F3n para la entidad "{0}".
++        EntityDeclUnterminated = La declaraci\u00F3n para la entidad "{0}" debe finalizar en ''>''.
++	MSG_DUPLICATE_ENTITY_DEFINITION = La entidad "{0}" se ha declarado m\u00E1s de una vez.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = La declaraci\u00F3n de entidad externa debe empezar por \"SYSTEM\" o \"PUBLIC\".
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre \"PUBLIC\" y el identificador p\u00FAblico.
++        ExternalIDRequired = La declaraci\u00F3n de entidad externa debe empezar por "SYSTEM" o "PUBLIC".
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre "PUBLIC" y el identificador p\u00FAblico.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre el identificador p\u00FAblico y el identificador del sistema.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre \"SYSTEM\" y el identificador del sistema.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = No se debe especificar el identificador del fragmento como parte del identificador del sistema \"{0}\".
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Es necesario un espacio en blanco entre "SYSTEM" y el identificador del sistema.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = No se debe especificar el identificador del fragmento como parte del identificador del sistema "{0}".
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Es necesario un espacio en blanco despu\u00E9s de \"''.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Es necesario un espacio en blanco despu\u00E9s del nombre de la notaci\u00F3n "{0}" en la declaraci\u00F3n de notaci\u00F3n.
++        ExternalIDorPublicIDRequired = La declaraci\u00F3n para la notaci\u00F3n "{0}" debe incluir un identificador p\u00FAblico o del sistema.
++        NotationDeclUnterminated = La declaraci\u00F3n para la notaci\u00F3n "{0}" debe finalizar en ''>''.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = El tipo de elemento \"{1}\" ya se especific\u00F3 en el modelo de contenido de la declaraci\u00F3n de elementos \"{0}\".
+-        ENTITIESInvalid = El valor de atributo \"{1}\" del tipo ENTITIES debe ser el nombre de una o m\u00E1s entidades no analizadas.
+-        ENTITYInvalid = El valor de atributo \"{1}\" del tipo ENTITY debe ser el nombre de una entidad no analizada.
+-        IDDefaultTypeInvalid = El atributo de identificador \"{0}\" debe tener un valor por defecto declarado de \"#IMPLIED\" o \"#REQUIRED\".
+-        IDInvalid = El valor de atributo \"{0}\" del tipo ID debe ser un nombre.
+-        IDInvalidWithNamespaces = El valor de atributo \"{0}\" del tipo ID debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
+-        IDNotUnique = El valor de atributo \"{0}\" del tipo ID debe ser \u00FAnico en el documento.
+-        IDREFInvalid = El valor de atributo \"{0}\" del tipo IDREF debe ser un nombre.
+-        IDREFInvalidWithNamespaces = El valor de atributo \"{0}\" del tipo IDREF debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
+-        IDREFSInvalid = El valor de atributo \"{0}\" del tipo IDREFS debe ser uno o m\u00E1s nombres.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir declaraciones correctamente anidadas cuando la referencia de entidad se utiliza como una declaraci\u00F3n completa.
+-        ImproperDeclarationNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir declaraciones correctamente anidadas.
+-        ImproperGroupNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir pares de par\u00E9ntesis correctamente anidados.
+-        INVALID_PE_IN_CONDITIONAL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro \"{0}\" debe incluir la secci\u00F3n condicional completa o s\u00F3lo INCLUDE o IGNORE.
+-        MSG_ATTRIBUTE_NOT_DECLARED = El atributo \"{1}\" se debe haber declarado para el tipo de elemento \"{0}\".
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = El atributo \"{0}\" con el valor \"{1}\" debe tener un valor de la lista \"{2}\".
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = El valor \"{1}\" del atributo \"{0}\" no se debe cambiar mediante la normalizaci\u00F3n (a \"{2}\") en un documento aut\u00F3nomo.
+-        MSG_CONTENT_INCOMPLETE = El contenido del tipo de elemento \"{0}\" es incompleto, debe coincidir con \"{1}\".
+-        MSG_CONTENT_INVALID = El contenido del tipo de elemento \"{0}\" debe coincidir con \"{1}\".
+-        MSG_CONTENT_INVALID_SPECIFIED = El contenido del tipo de elemento \"{0}\" debe coincidir con \"{1}\". Los secundarios del tipo \"{2}\" no est\u00E1n permitidos.
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = El atributo \"{1}\" para el tipo de elemento \"{0}\" tiene un valor por defecto y debe especificarse en un documento aut\u00F3nomo.
+-        MSG_DUPLICATE_ATTDEF = El atributo \"{1}\" ya se ha declarado para el tipo de elemento \"{0}\".
+-        MSG_ELEMENT_ALREADY_DECLARED = El tipo de elemento \"{0}\" no debe declararse m\u00E1s de una vez.
+-        MSG_ELEMENT_NOT_DECLARED = El tipo de elemento \"{0}\" debe declararse.
++        DuplicateTypeInMixedContent = El tipo de elemento "{1}" ya se especific\u00F3 en el modelo de contenido de la declaraci\u00F3n de elementos "{0}".
++        ENTITIESInvalid = El valor de atributo "{1}" del tipo ENTITIES debe ser el nombre de una o m\u00E1s entidades no analizadas.
++        ENTITYInvalid = El valor de atributo "{1}" del tipo ENTITY debe ser el nombre de una entidad no analizada.
++        IDDefaultTypeInvalid = El atributo de identificador "{0}" debe tener un valor por defecto declarado de "#IMPLIED" o "#REQUIRED".
++        IDInvalid = El valor de atributo "{0}" del tipo ID debe ser un nombre.
++        IDInvalidWithNamespaces = El valor de atributo "{0}" del tipo ID debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
++        IDNotUnique = El valor de atributo "{0}" del tipo ID debe ser \u00FAnico en el documento.
++        IDREFInvalid = El valor de atributo "{0}" del tipo IDREF debe ser un nombre.
++        IDREFInvalidWithNamespaces = El valor de atributo "{0}" del tipo IDREF debe ser un NCName cuando los espacios de nombres est\u00E9n activados.
++        IDREFSInvalid = El valor de atributo "{0}" del tipo IDREFS debe ser uno o m\u00E1s nombres.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir declaraciones correctamente anidadas cuando la referencia de entidad se utiliza como una declaraci\u00F3n completa.
++        ImproperDeclarationNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir declaraciones correctamente anidadas.
++        ImproperGroupNesting = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir pares de par\u00E9ntesis correctamente anidados.
++        INVALID_PE_IN_CONDITIONAL = El texto de sustituci\u00F3n de la entidad del par\u00E1metro "{0}" debe incluir la secci\u00F3n condicional completa o s\u00F3lo INCLUDE o IGNORE.
++        MSG_ATTRIBUTE_NOT_DECLARED = El atributo "{1}" se debe haber declarado para el tipo de elemento "{0}".
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = El atributo "{0}" con el valor "{1}" debe tener un valor de la lista "{2}".
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = El valor "{1}" del atributo "{0}" no se debe cambiar mediante la normalizaci\u00F3n (a "{2}") en un documento aut\u00F3nomo.
++        MSG_CONTENT_INCOMPLETE = El contenido del tipo de elemento "{0}" es incompleto, debe coincidir con "{1}".
++        MSG_CONTENT_INVALID = El contenido del tipo de elemento "{0}" debe coincidir con "{1}".
++        MSG_CONTENT_INVALID_SPECIFIED = El contenido del tipo de elemento "{0}" debe coincidir con "{1}". Los secundarios del tipo "{2}" no est\u00E1n permitidos.
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = El atributo "{1}" para el tipo de elemento "{0}" tiene un valor por defecto y debe especificarse en un documento aut\u00F3nomo.
++        MSG_DUPLICATE_ATTDEF = El atributo "{1}" ya se ha declarado para el tipo de elemento "{0}".
++        MSG_ELEMENT_ALREADY_DECLARED = El tipo de elemento "{0}" no debe declararse m\u00E1s de una vez.
++        MSG_ELEMENT_NOT_DECLARED = El tipo de elemento "{0}" debe declararse.
+         MSG_GRAMMAR_NOT_FOUND = El documento no es v\u00E1lido: no se ha encontrado la gram\u00E1tica.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con el identificador \"{0}\" debe aparecer en el documento.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La referencia a la entidad externa \"{0}\" no est\u00E1 permitida en un documento aut\u00F3nomo.
+-        MSG_FIXED_ATTVALUE_INVALID = El atributo \"{1}\" con el valor \"{2}\" debe tener un valor de \"{3}\".
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = El tipo de elemento \"{0}\" ya tiene un atributo \"{1}\" del tipo ID, un segundo atributo \"{2}\" del tipo ID no est\u00E1 permitido.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = El tipo de elemento \"{0}\" ya tiene un atributo \"{1}\" del tipo NOTATION, un segundo atributo \"{2}\" del tipo NOTATION no est\u00E1 permitido.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notaci\u00F3n \"{1}\" debe declararse cuando se hace referencia a la misma en la lista de tipos de notaci\u00F3n para el atributo \"{0}\".
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notaci\u00F3n \"{1}\" debe declararse cuando se hace referencia a la misma en la declaraci\u00F3n de entidad no analizada para \"{0}\".
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La referencia a la entidad \"{0}\" declarada en una entidad analizada externa no est\u00E1 permitida en un documento aut\u00F3nomo.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = El atributo \"{1}\" es necesario y debe especificarse para el tipo de elemento \"{0}\".
++        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con el identificador "{0}" debe aparecer en el documento.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La referencia a la entidad externa "{0}" no est\u00E1 permitida en un documento aut\u00F3nomo.
++        MSG_FIXED_ATTVALUE_INVALID = El atributo "{1}" con el valor "{2}" debe tener un valor de "{3}".
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = El tipo de elemento "{0}" ya tiene un atributo "{1}" del tipo ID, un segundo atributo "{2}" del tipo ID no est\u00E1 permitido.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = El tipo de elemento "{0}" ya tiene un atributo "{1}" del tipo NOTATION, un segundo atributo "{2}" del tipo NOTATION no est\u00E1 permitido.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notaci\u00F3n "{1}" debe declararse cuando se hace referencia a la misma en la lista de tipos de notaci\u00F3n para el atributo "{0}".
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notaci\u00F3n "{1}" debe declararse cuando se hace referencia a la misma en la declaraci\u00F3n de entidad no analizada para "{0}".
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La referencia a la entidad "{0}" declarada en una entidad analizada externa no est\u00E1 permitida en un documento aut\u00F3nomo.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = El atributo "{1}" es necesario y debe especificarse para el tipo de elemento "{0}".
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = No debe incluirse un espacio en blanco entre los elementos declarados en una entidad analizada externa con el contenido del elemento en un documento aut\u00F3nomo.
+-        NMTOKENInvalid = El valor de atributo \"{0}\" del tipo NMTOKEN debe ser un elemento de nombre.
+-        NMTOKENSInvalid = El valor de atributo \"{0}\" del tipo NMTOKENS debe ser uno o m\u00E1s elementos de nombre.
+-        NoNotationOnEmptyElement = El tipo de elemento \"{0}\" que se declar\u00F3 como EMPTY no puede declarar el atributo \"{1}\" del tipo NOTATION.
+-        RootElementTypeMustMatchDoctypedecl = El elemento ra\u00EDz del documento \"{1}\", debe coincidir con la ra\u00EDz DOCTYPE \"{0}\".
+-        UndeclaredElementInContentSpec = El modelo de contenido del elemento \"{0}\" hace referencia al elemento no declarado \"{1}\".
+-        UniqueNotationName = La declaraci\u00F3n de la notaci\u00F3n \"{0}\" no es \u00FAnica. Un nombre determinado no debe declararse en m\u00E1s de una declaraci\u00F3n de notaci\u00F3n.
++        NMTOKENInvalid = El valor de atributo "{0}" del tipo NMTOKEN debe ser un token de nombre.
++        NMTOKENSInvalid = El valor de atributo "{0}" del tipo NMTOKENS debe ser uno o m\u00E1s tokens de nombre.
++        NoNotationOnEmptyElement = El tipo de elemento "{0}" que se declar\u00F3 como EMPTY no puede declarar el atributo "{1}" del tipo NOTATION.
++        RootElementTypeMustMatchDoctypedecl = El elemento ra\u00EDz del documento "{1}", debe coincidir con la ra\u00EDz DOCTYPE "{0}".
++        UndeclaredElementInContentSpec = El modelo de contenido del elemento "{0}" hace referencia al elemento no declarado "{1}".
++        UniqueNotationName = La declaraci\u00F3n de la notaci\u00F3n "{0}" no es \u00FAnica. Un nombre determinado no debe declararse en m\u00E1s de una declaraci\u00F3n de notaci\u00F3n.
+         ENTITYFailedInitializeGrammar =  Fallo del validador ENTITYDatatype. Es necesario llamar al m\u00E9todo de inicializaci\u00F3n con una referencia de gram\u00E1tica v\u00E1lida. \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\"no est\u00E1 sin analizar.
+-        ENTITYNotValid = ENTITY \"{0}\" no es v\u00E1lida.
++        ENTITYNotUnparsed = ENTITY "{0}"no est\u00E1 sin analizar.
++        ENTITYNotValid = ENTITY "{0}" no es v\u00E1lida.
+         EmptyList = El valor de tipo ENTITIES, IDREFS y NMTOKENS no puede ser una lista vac\u00EDa.
+ 
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = La referencia de entidad externa \"&{0};\" no est\u00E1 permitida en un valor de atributo.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = La referencia de entidad externa "&{0};" no est\u00E1 permitida en un valor de atributo.
++        AccessExternalDTD = DTD externa: fallo al leer DTD externa ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido debido a una restricci\u00F3n que ha definido la propiedad accessExternalDTD.
++        AccessExternalEntity = Entidad externa: fallo al leer el documento externo ''{0}'' porque el acceso a ''{1}'' no est\u00E1 permitido debido a una restricci\u00F3n que ha definido la propiedad accessExternalDTD.
+ 
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = Se hizo referencia a la entidad \"{0}\", pero no se declar\u00F3.
+-        ReferenceToUnparsedEntity = La referencia de entidad no analizada \"&{0};\" no est\u00E1 permitida.
+-        RecursiveReference = Referencia de entidad recursiva \"{0}\". (Ruta de acceso de referencia: {1}),
+-        RecursiveGeneralReference = Referencia de entidad general recursiva \"&{0};\". (Ruta de acceso de referencia: {1}),
+-        RecursivePEReference = Referencia de entidad de par\u00E1metro recursiva \"%{0};\". (Ruta de acceso de referencia: {1}),
++        EntityNotDeclared = Se hizo referencia a la entidad "{0}", pero no se declar\u00F3.
++        ReferenceToUnparsedEntity = La referencia de entidad no analizada "&{0};" no est\u00E1 permitida.
++        RecursiveReference = Referencia de entidad recursiva "{0}". (Ruta de acceso de referencia: {1}),
++        RecursiveGeneralReference = Referencia de entidad general recursiva "&{0};". (Ruta de acceso de referencia: {1}),
++        RecursivePEReference = Referencia de entidad de par\u00E1metro recursiva "%{0};". (Ruta de acceso de referencia: {1}),
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = La codificaci\u00F3n \"{0}\" no est\u00E1 soportada.
++        EncodingNotSupported = La codificaci\u00F3n "{0}" no est\u00E1 soportada.
+         EncodingRequired = Una entidad analizada no codificada en UTF-8 o UTF-16 debe contener una declaraci\u00F3n de codificaci\u00F3n.
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = El elemento o el atributo no coinciden con la producci\u00F3n del QName: QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = El elemento \"{0}\" no puede tener \"xmlns\" como prefijo.
+-        ElementPrefixUnbound = El prefijo \"{0}\" para el elemento \"{1}\" no est\u00E1 enlazado.
+-        AttributePrefixUnbound = El prefijo \"{2}\" para el atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no est\u00E1 enlazado.
+-        EmptyPrefixedAttName = El valor del atributo \"{0}\" no es v\u00E1lido. Los enlaces de espacio de nombres utilizados de prefijo no pueden estar vac\u00EDos.
+-        PrefixDeclared = El prefijo de espacio de nombres \"{0}\" no se ha declarado.
++        ElementXMLNSPrefix = El elemento "{0}" no puede tener "xmlns" como prefijo.
++        ElementPrefixUnbound = El prefijo "{0}" para el elemento "{1}" no est\u00E1 enlazado.
++        AttributePrefixUnbound = El prefijo "{2}" para el atributo "{1}" asociado a un tipo de elemento "{0}" no est\u00E1 enlazado.
++        EmptyPrefixedAttName = El valor del atributo "{0}" no es v\u00E1lido. Los enlaces de espacio de nombres utilizados de prefijo no pueden estar vac\u00EDos.
++        PrefixDeclared = El prefijo de espacio de nombres "{0}" no se ha declarado.
+         CantBindXMLNS = El prefijo "xmlns" no puede enlazarse a ning\u00FAn espacio de nombres expl\u00EDcitamente; tampoco puede enlazarse el espacio de nombres para "xmlns" a cualquier prefijo expl\u00EDcitamente.
+         CantBindXML = El prefijo "xml" no puede enlazarse a ning\u00FAn espacio de nombres que no sea el habitual; tampoco puede enlazarse el espacio de nombres para "xml" a cualquier prefijo que no sea "xml".
+-        MSG_ATT_DEFAULT_INVALID = El valor por defecto \"{1}\" del atributo \"{0}\" no es legal para las restricciones l\u00E9xicas de este tipo de atributo.
++        MSG_ATT_DEFAULT_INVALID = El valor por defecto "{1}" del atributo "{0}" no es legal para las restricciones l\u00E9xicas de este tipo de atributo.
+ 
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
+ 
+ 
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=El analizador ha encontrado m\u00E1s de \"{0}\"ampliaciones de entidad en este documento; \u00E9ste es el l\u00EDmite impuesto por la aplicaci\u00F3n.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: el analizador ha encontrado m\u00E1s de "{0}"ampliaciones de entidad en este documento; \u00E9ste es el l\u00EDmite impuesto por el JDK.
++        ElementAttributeLimit=JAXP00010002: el elemento "{0}" tiene m\u00E1s de "{1}" atributos, "{1}" es el l\u00EDmite impuesto por el JDK.
++        MaxEntitySizeLimit=JAXP00010003: la longitud de la entidad "{0}" es "{1}", que excede el l\u00EDmite de "{2}" que ha definido "{3}".
++        TotalEntitySizeLimit=JAXP00010004: el tama\u00F1o acumulado "{0}" de las entidades ha excedido el l\u00EDmite de "{1}" que ha definido "{2}".
++        MaxXMLNameLimit=JAXP00010005: el nombre "{0}" ha excedido el l\u00EDmite de "{1}" que ha definido "{2}".
+ 
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= El elemento \"{0}\" tiene m\u00E1s de \"{1}\" atributos, \"{1}\" es el l\u00EDmite impuesto por la aplicaci\u00F3n.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
-+# From Alois Treindl (2013-09-11):
-+# The Federal regulations say
-+# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html
-+# ... the meridian for Bern mean time ... is 7 degrees 26'22.50".
-+# Expressed in time, it is 0h29m45.5s.
-+
-+# From Pierre-Yves Berger (2013-09-11):
-+# the "Circulaire du conseil federal" (December 11 1893)
-+#  ...
-+# clearly states that the [1894-06-01] change should be done at midnight
-+# but if no one is present after 11 at night, could be postponed until one
-+# hour before the beginning of service.
-+
-+# From Paul Eggert (2013-09-11):
-+# Round BMT to the nearest even second, 0:29:46.
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 +#
-+# We can find no reliable source for Shanks's assertion that all of Switzerland
-+# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12.  This book:
++# 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.
 +#
-+#	Jakob Messerli. Gleichmassig, punktlich, schnell: Zeiteinteilung und
-+#	Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995,
-+#	ISBN 3-905311-68-2, OCLC 717570797.
++# 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.
 +#
-+# suggests that the transition was more gradual, and that the Swiss did not
-+# agree about civil time during the transition.  The timekeeping it gives the
-+# most detail for is postal and telegraph time: here, federal legislation (the
-+# "Bundesgesetz uber die Erstellung von elektrischen Telegraphen") passed on
-+# 1851-11-23, and an official implementation notice was published 1853-07-16
-+# (Bundesblatt 1853, Bd. II, S. 859).  On p 72 Messerli writes that in
-+# practice since July 1853 Bernese time was used in "all postal and telegraph
-+# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso"
-+# (Google translation).  For now, model this transition as occurring on
-+# 1853-07-16, though it probably occurred at some other date in Zurich, and
-+# legal civil time probably changed at still some other transition date.
  
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	Swiss	1941	1942	-	May	Mon>=1	1:00	1:00	S
- Rule	Swiss	1941	1942	-	Oct	Mon>=1	2:00	0	-
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone	Europe/Zurich	0:34:08 -	LMT	1848 Sep 12
--			0:29:44	-	BMT	1894 Jun # Bern Mean Time
-+Zone	Europe/Zurich	0:34:08 -	LMT	1853 Jul 16 # See above comment.
-+			0:29:46	-	BMT	1894 Jun # Bern Mean Time
- 			1:00	Swiss	CE%sT	1981
- 			1:00	EU	CE%sT
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le prologue du document.
+         InvalidCharInXMLDecl = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la d\u00E9claration XML.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = La s\u00E9quence de caract\u00E8res \"]]>\" ne doit pas figurer dans le contenu sauf si elle est utilis\u00E9e pour baliser la fin d'une section CDATA.
++        CDEndInContent = La s\u00E9quence de caract\u00E8res "]]>" ne doit pas figurer dans le contenu sauf si elle est utilis\u00E9e pour baliser la fin d'une section CDATA.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = La section CDATA doit se terminer par \"]]>\".
++        CDSectUnterminated = La section CDATA doit se terminer par "]]>".
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = La d\u00E9claration XML ne peut figurer qu'au d\u00E9but du document.
+-        EqRequiredInXMLDecl = Le caract\u00E8re ''='' doit suivre \"{0}\" dans la d\u00E9claration XML.
+-        QuoteRequiredInXMLDecl = La valeur suivant \"{0}\" dans la d\u00E9claration XML doit \u00EAtre une cha\u00EEne entre guillemets.
+-        XMLDeclUnterminated = La d\u00E9claration XML doit se terminer par \"?>\".
++        EqRequiredInXMLDecl = Le caract\u00E8re ''='' doit suivre "{0}" dans la d\u00E9claration XML.
++        QuoteRequiredInXMLDecl = La valeur suivant "{0}" dans la d\u00E9claration XML doit \u00EAtre une cha\u00EEne entre guillemets.
++        XMLDeclUnterminated = La d\u00E9claration XML doit se terminer par "?>".
+         VersionInfoRequired = La version est obligatoire dans la d\u00E9claration XML.
+         SpaceRequiredBeforeVersionInXMLDecl = Un espace est obligatoire devant le pseudo-attribut version dans la d\u00E9claration XML.
+         SpaceRequiredBeforeEncodingInXMLDecl = Un espace est obligatoire devant le pseudo-attribut encoding dans la d\u00E9claration XML.
+@@ -71,70 +68,71 @@
+         ReferenceIllegalInTrailingMisc=R\u00E9f\u00E9rence non autoris\u00E9e dans la section de fin.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = La valeur de d\u00E9claration de document autonome doit \u00EAtre \"oui\" ou \"non\", mais pas \"{0}\".
++        SDDeclInvalid = La valeur de d\u00E9claration de document autonome doit \u00EAtre "oui" ou "non", mais pas "{0}".
++        SDDeclNameInvalid = Le nom de document autonome contenu dans la d\u00E9claration XML est peut-\u00EAtre mal orthographi\u00E9.
+ # 2.12 Language Identification
+-        XMLLangInvalid = La valeur d''attribut xml:lang \"{0}\" est un identificateur de langue non valide.
++        XMLLangInvalid = La valeur d''attribut xml:lang "{0}" est un identificateur de langue non valide.
+ # 3. Logical Structures
+-        ETagRequired = Le type d''\u00E9l\u00E9ment \"{0}\" doit se terminer par la balise de fin correspondante \"\".
++        ETagRequired = Le type d''\u00E9l\u00E9ment "{0}" doit se terminer par la balise de fin correspondante "".
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = Le type d''\u00E9l\u00E9ment \"{0}\" doit \u00EAtre suivi des sp\u00E9cifications d''attribut, \">\" ou \"/>\".
+-        EqRequiredInAttribute = Le nom d''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" doit \u00EAtre suivi du caract\u00E8re ''=''.
+-        OpenQuoteExpected = Des guillemets ouvrants sont attendus pour l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\".
+-        CloseQuoteExpected = Des guillemets fermants sont attendus pour l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\".
+-        AttributeNotUnique = L''attribut \"{1}\" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment \"{0}\".
+-        AttributeNSNotUnique = L''attribut \"{1}\" li\u00E9 \u00E0 l''espace de noms \"{2}\" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment \"{0}\".
+-        ETagUnterminated = La balise de fin pour le type d''\u00E9l\u00E9ment \"{0}\" doit se terminer par un d\u00E9limiteur ''>''.
++        ElementUnterminated = Le type d''\u00E9l\u00E9ment "{0}" doit \u00EAtre suivi des sp\u00E9cifications d''attribut, ">" ou "/>".
++        EqRequiredInAttribute = Le nom d''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}" doit \u00EAtre suivi du caract\u00E8re ''=''.
++        OpenQuoteExpected = Des guillemets ouvrants sont attendus pour l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}".
++        CloseQuoteExpected = Des guillemets fermants sont attendus pour l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}".
++        AttributeNotUnique = L''attribut "{1}" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment "{0}".
++        AttributeNSNotUnique = L''attribut "{1}" li\u00E9 \u00E0 l''espace de noms "{2}" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 pour l''\u00E9l\u00E9ment "{0}".
++        ETagUnterminated = La balise de fin pour le type d''\u00E9l\u00E9ment "{0}" doit se terminer par un d\u00E9limiteur ''>''.
+         MarkupNotRecognizedInContent = Le contenu des \u00E9l\u00E9ments doit inclure un balisage ou des caract\u00E8res au format correct.
+         DoctypeIllegalInContent = Un DOCTYPE n'est pas autoris\u00E9 dans le contenu.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = La r\u00E9f\u00E9rence doit se terminer par un d\u00E9limiteur ';'.
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = La r\u00E9f\u00E9rence doit \u00EAtre enti\u00E8rement incluse dans la m\u00EAme entit\u00E9 analys\u00E9e.
+-        ElementEntityMismatch = L''\u00E9l\u00E9ment \"{0}\" doit commencer et se terminer dans la m\u00EAme entit\u00E9.
++        ElementEntityMismatch = L''\u00E9l\u00E9ment "{0}" doit commencer et se terminer dans la m\u00EAme entit\u00E9.
+         MarkupEntityMismatch=Les structures de document XML doivent commencer et se terminer dans la m\u00EAme entit\u00E9.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = Un caract\u00E8re XML non valide (Unicode : 0x{2}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la valeur de l''attribut \"{1}\" et l''\u00E9l\u00E9ment est \"{0}\".
++        InvalidCharInAttValue = Un caract\u00E8re XML non valide (Unicode : 0x{2}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la valeur de l''attribut "{1}" et l''\u00E9l\u00E9ment est "{0}".
+         InvalidCharInComment = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le commentaire.
+         InvalidCharInPI = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans l''instruction de traitement.
+         InvalidCharInInternalSubset = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans le sous-ensemble interne de la DTD.
+         InvalidCharInTextDecl = Un caract\u00E8re XML non valide (Unicode : 0x{0}) a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la d\u00E9claration textuelle.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = La valeur de l''attribut \"{1}\" doit commencer par une apostrophe ou des guillemets.
+-        LessthanInAttValue = La valeur de l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" ne doit pas contenir le caract\u00E8re ''<''.
+-        AttributeValueUnterminated = La valeur de l''attribut \"{1}\" doit se terminer par les guillemets correspondants.
++        QuoteRequiredInAttValue = La valeur de l''attribut "{1}" doit commencer par une apostrophe ou des guillemets.
++        LessthanInAttValue = La valeur de l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}" ne doit pas contenir le caract\u00E8re ''<''.
++        AttributeValueUnterminated = La valeur de l''attribut "{1}" doit se terminer par les guillemets correspondants.
+ # 2.5 Comments
+-        InvalidCommentStart = Le commentaire doit commencer par \"\".
++        InvalidCommentStart = Le commentaire doit commencer par "".
+         COMMENT_NOT_IN_ONE_ENTITY = Le commentaire n'est pas compris dans la m\u00EAme entit\u00E9.
+ # 2.6 Processing Instructions
+         PITargetRequired = L'instruction de traitement doit commencer par le nom de la cible.
+         SpaceRequiredInPI = Un espace est obligatoire entre les donn\u00E9es et la cible de l'instruction de traitement.
+-        PIUnterminated = L'instruction de traitement doit se terminer par \"?>\".
+-        ReservedPITarget = La cible de l'instruction de traitement correspondant \u00E0 \"[xX][mM][lL]\" n'est pas autoris\u00E9e.
++        PIUnterminated = L'instruction de traitement doit se terminer par "?>".
++        ReservedPITarget = La cible de l'instruction de traitement correspondant \u00E0 "[xX][mM][lL]" n'est pas autoris\u00E9e.
+         PI_NOT_IN_ONE_ENTITY = L'instruction de traitement n'est pas comprise dans la m\u00EAme entit\u00E9.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = Version \"{0}\" non valide.
+-        VersionNotSupported = La version XML \"{0}\" n''est pas prise en charge. Seule la version XML 1.0 est prise en charge.
+-        VersionNotSupported11 = La version XML \"{0}\" n''est pas prise en charge. Seules les versions XML 1.0 et XML 1.1 sont prises en charge.
++        VersionInfoInvalid = Version "{0}" non valide.
++        VersionNotSupported = La version XML "{0}" n''est pas prise en charge. Seule la version XML 1.0 est prise en charge.
++        VersionNotSupported11 = La version XML "{0}" n''est pas prise en charge. Seules les versions XML 1.0 et XML 1.1 sont prises en charge.
+         VersionMismatch= Une entit\u00E9 ne peut pas inclure une autre entit\u00E9 d'une version ult\u00E9rieure.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = Une repr\u00E9sentation d\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne \"&#\" dans une r\u00E9f\u00E9rence de caract\u00E8re.
+-        HexdigitRequiredInCharRef = Une repr\u00E9sentation hexad\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne \"&#x\" dans une r\u00E9f\u00E9rence de caract\u00E8re.
++        DigitRequiredInCharRef = Une repr\u00E9sentation d\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne "&#" dans une r\u00E9f\u00E9rence de caract\u00E8re.
++        HexdigitRequiredInCharRef = Une repr\u00E9sentation hexad\u00E9cimale doit imm\u00E9diatement suivre la cha\u00EEne "&#x" dans une r\u00E9f\u00E9rence de caract\u00E8re.
+         SemicolonRequiredInCharRef = La r\u00E9f\u00E9rence de caract\u00E8re doit se terminer par le d\u00E9limiteur ';'.
+-        InvalidCharRef = La r\u00E9f\u00E9rence de caract\u00E8re \"&#{0}\" est un caract\u00E8re XML non valide.
++        InvalidCharRef = La r\u00E9f\u00E9rence de caract\u00E8re "&#{0}" est un caract\u00E8re XML non valide.
+         NameRequiredInReference = Le nom de l'identit\u00E9 doit imm\u00E9diatement suivre le caract\u00E8re "&" dans la r\u00E9f\u00E9rence d'entit\u00E9.
+-        SemicolonRequiredInReference = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 \"{0}\" doit se terminer par le d\u00E9limiteur '';''.
++        SemicolonRequiredInReference = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 "{0}" doit se terminer par le d\u00E9limiteur '';''.
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = La d\u00E9claration textuelle ne doit figurer qu'au d\u00E9but de l'entit\u00E9 analys\u00E9e externe.
+-        EqRequiredInTextDecl = Le caract\u00E8re ''='' doit suivre \"{0}\" dans la d\u00E9claration textuelle.
+-        QuoteRequiredInTextDecl = La valeur suivant \"{0}\" dans la d\u00E9claration textuelle doit \u00EAtre une cha\u00EEne entre guillemets.
+-        CloseQuoteMissingInTextDecl = Dans la valeur suivant \"{0}\" dans la d\u00E9claration textuelle, il manque les guillemets fermants.
++        EqRequiredInTextDecl = Le caract\u00E8re ''='' doit suivre "{0}" dans la d\u00E9claration textuelle.
++        QuoteRequiredInTextDecl = La valeur suivant "{0}" dans la d\u00E9claration textuelle doit \u00EAtre une cha\u00EEne entre guillemets.
++        CloseQuoteMissingInTextDecl = Dans la valeur suivant "{0}" dans la d\u00E9claration textuelle, il manque les guillemets fermants.
+         SpaceRequiredBeforeVersionInTextDecl = Un espace est obligatoire devant le pseudo-attribut version dans la d\u00E9claration textuelle.
+         SpaceRequiredBeforeEncodingInTextDecl = Un espace est obligatoire devant le pseudo-attribut encoding dans la d\u00E9claration textuelle.
+-        TextDeclUnterminated = La d\u00E9claration textuelle doit se terminer par \"?>\".
++        TextDeclUnterminated = La d\u00E9claration textuelle doit se terminer par "?>".
+         EncodingDeclRequired = La d\u00E9claration d'encodage est obligatoire dans la d\u00E9claration textuelle.
+         NoMorePseudoAttributes = Aucun autre pseudo-attribut n'est autoris\u00E9.
+         MorePseudoAttributes = D'autres pseudo-attributs sont attendus.
+@@ -143,13 +141,13 @@
+         CommentNotInOneEntity = Le commentaire doit \u00EAtre enti\u00E8rement inclus dans la m\u00EAme entit\u00E9 analys\u00E9e.
+         PINotInOneEntity = L'instruction de traitement doit \u00EAtre enti\u00E8rement incluse dans la m\u00EAme entit\u00E9 analys\u00E9e.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = Nom d''encodage \"{0}\" non valide.
+-        EncodingByteOrderUnsupported = L''ordre des octets donn\u00E9 pour encoder \"{0}\" n''est pas pris en charge.
++        EncodingDeclInvalid = Nom d''encodage "{0}" non valide.
++        EncodingByteOrderUnsupported = L''ordre des octets donn\u00E9 pour encoder "{0}" n''est pas pris en charge.
+         InvalidByte = Octet {0} de la s\u00E9quence UTF-8 \u00E0 {1} octets non valide.
+         ExpectedByte = Octet {0} de la s\u00E9quence UTF-8 \u00E0 {1} octets attendu.  
+         InvalidHighSurrogate = Les bits de substitution sup\u00E9rieurs (High surrogate) dans la s\u00E9quence UTF-8 ne doivent pas d\u00E9passer 0x10 mais des bits 0x{0} ont \u00E9t\u00E9 d\u00E9tect\u00E9s.
+-        OperationNotSupported = Op\u00E9ration \"{0}\" non prise en charge par le lecteur {1}.
+-        InvalidASCII = L''octet \"{0}\" n''appartient pas au jeu de caract\u00E8res ASCII (7 bits).
++        OperationNotSupported = Op\u00E9ration "{0}" non prise en charge par le lecteur {1}.
++        InvalidASCII = L''octet "{0}" n''appartient pas au jeu de caract\u00E8res ASCII (7 bits).
+         CharConversionFailure = Une entit\u00E9 respectant un certain encodage ne doit pas contenir de s\u00E9quences non admises dans cet encodage.
+         
+ # DTD Messages
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = Ce caract\u00E8re (Unicode : 0x{0}) n''est pas autoris\u00E9 dans l''identificateur public.
+         SpaceRequiredBetweenPublicAndSystem = Des espaces sont obligatoires entre les ID publicId et systemId.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Un espace est obligatoire apr\u00E8s \"''.
+-        PEReferenceWithinMarkup = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre \"%{0};\" ne peut pas survenir dans le balisage du sous-ensemble interne de la DTD.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Un espace est obligatoire apr\u00E8s "''.
++        PEReferenceWithinMarkup = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre "%{0};" ne peut pas survenir dans le balisage du sous-ensemble interne de la DTD.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Les d\u00E9clarations de balisage contenues dans la d\u00E9claration de type de document ou sur lesquelles pointe cette derni\u00E8re doivent avoir un format correct.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = La d\u00E9claration d'attribut pour \"xml:space\" doit \u00EAtre pr\u00E9sent\u00E9e comme type \u00E9num\u00E9r\u00E9 dont les seules valeurs possibles sont \"default\" et \"preserve\".
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = La d\u00E9claration d'attribut pour "xml:space" doit \u00EAtre pr\u00E9sent\u00E9e comme type \u00E9num\u00E9r\u00E9 dont les seules valeurs possibles sont "default" et "preserve".
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Un espace est obligatoire apr\u00E8s \"''.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Un espace est obligatoire apr\u00E8s le type d''\u00E9l\u00E9ment "{0}" dans la d\u00E9claration de type d''\u00E9l\u00E9ment.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = La contrainte est obligatoire apr\u00E8s le type d''\u00E9l\u00E9ment "{0}" dans la d\u00E9claration de type d''\u00E9l\u00E9ment.
++        ElementDeclUnterminated = La d\u00E9claration du type d''\u00E9l\u00E9ment "{0}" doit se terminer par ''>''.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un caract\u00E8re ''('' ou un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un caract\u00E8re ''('' ou un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment \"{0}\".
+-        MixedContentUnterminated = Le mod\u00E8le de contenu mixte \"{0}\" doit se terminer par \")*\" lorsque les types d''\u00E9l\u00E9ment enfant sont contraints.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un type d''\u00E9l\u00E9ment est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un caract\u00E8re '')'' est obligatoire dans la d\u00E9claration du type d''\u00E9l\u00E9ment "{0}".
++        MixedContentUnterminated = Le mod\u00E8le de contenu mixte "{0}" doit se terminer par ")*" lorsque les types d''\u00E9l\u00E9ment enfant sont contraints.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Un espace est obligatoire apr\u00E8s \"\".
+-        IgnoreSectUnterminated = La section conditionnelle exclue doit se terminer par \"]]>\".
++        IncludeSectUnterminated = La section conditionnelle incluse doit se terminer par "]]>".
++        IgnoreSectUnterminated = La section conditionnelle exclue doit se terminer par "]]>".
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = Le nom de l'entit\u00E9 doit imm\u00E9diatement suivre le caract\u00E8re "%" dans la r\u00E9f\u00E9rence d'entit\u00E9 de param\u00E8tre.
+-        SemicolonRequiredInPEReference = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre \"%{0};\" doit se terminer par le d\u00E9limiteur '';''.
++        SemicolonRequiredInPEReference = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre "%{0};" doit se terminer par le d\u00E9limiteur '';''.
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Un espace est obligatoire apr\u00E8s \"''.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E9 \"{0}\" est d\u00E9clar\u00E9e plusieurs fois.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Un espace est obligatoire entre le nom de l''entit\u00E9 "{0}" et la d\u00E9finition dans la d\u00E9claration d''entit\u00E9.
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Un espace est obligatoire entre "NDATA" et le nom de notation dans la d\u00E9claration de l''entit\u00E9 "{0}".
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Un espace est obligatoire avant "NDATA" dans la d\u00E9claration de l''entit\u00E9 "{0}".
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Le nom de notation est obligatoire apr\u00E8s "NDATA" dans la d\u00E9claration de l''entit\u00E9 "{0}".
++        EntityDeclUnterminated = La d\u00E9claration de l''entit\u00E9 "{0}" doit se terminer par ''>''.
++	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E9 "{0}" est d\u00E9clar\u00E9e plusieurs fois.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = La d\u00E9claration d'entit\u00E9 externe doit commencer par \"SYSTEM\" ou \"PUBLIC\".
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre \"PUBLIC\" et l'identificateur public.
++        ExternalIDRequired = La d\u00E9claration d'entit\u00E9 externe doit commencer par "SYSTEM" ou "PUBLIC".
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre "PUBLIC" et l'identificateur public.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Un espace est obligatoire entre l'identificateur public et l'identificateur syst\u00E8me.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Un espace est obligatoire entre \"SYSTEM\" et l'identificateur syst\u00E8me.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificateur du fragment ne doit pas \u00EAtre sp\u00E9cifi\u00E9 comme faisant partie de l''identificateur syst\u00E8me \"{0}\".
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Un espace est obligatoire entre "SYSTEM" et l'identificateur syst\u00E8me.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificateur du fragment ne doit pas \u00EAtre sp\u00E9cifi\u00E9 comme faisant partie de l''identificateur syst\u00E8me "{0}".
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Un espace est obligatoire apr\u00E8s \"''.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Un espace est obligatoire apr\u00E8s le nom de notation "{0}" dans la d\u00E9claration de notation.
++        ExternalIDorPublicIDRequired = La d\u00E9claration de la notation "{0}" doit inclure un identificateur syst\u00E8me ou public.
++        NotationDeclUnterminated = La d\u00E9claration de la notation "{0}" doit se terminer par ''>''.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = Le type d''\u00E9l\u00E9ment \"{1}\" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 dans le mod\u00E8le de contenu de la d\u00E9claration d''\u00E9l\u00E9ment \"{0}\".
+-        ENTITIESInvalid = La valeur d''attribut \"{1}\" de type ENTITIES doit correspondre au nom d''au moins une entit\u00E9 non analys\u00E9e.
+-        ENTITYInvalid = La valeur d''attribut \"{1}\" de type ENTITY doit correspondre au nom d''une entit\u00E9 non analys\u00E9e.
+-        IDDefaultTypeInvalid = L''attribut d''ID \"{0}\" doit avoir une valeur par d\u00E9faut d\u00E9clar\u00E9e de \"#IMPLIED\" ou \"#REQUIRED\".
+-        IDInvalid = La valeur d''attribut \"{0}\" de type ID doit \u00EAtre un nom.
+-        IDInvalidWithNamespaces = La valeur d''attribut \"{0}\" de type ID doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
+-        IDNotUnique = La valeur d''attribut \"{0}\" de type ID doit \u00EAtre unique dans le document.
+-        IDREFInvalid = La valeur d''attribut \"{0}\" de type IDREF doit \u00EAtre un nom.
+-        IDREFInvalidWithNamespaces = La valeur d''attribut \"{0}\" de type IDREF doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
+-        IDREFSInvalid = Une valeur d''attribut \"{0}\" de type IDREFS doit correspondre \u00E0 au moins un nom.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es lorsque la r\u00E9f\u00E9rence d''entit\u00E9 est utilis\u00E9e comme d\u00E9claration compl\u00E8te.
+-        ImproperDeclarationNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es.
+-        ImproperGroupNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure des paires de parenth\u00E8ses correctement imbriqu\u00E9es.
+-        INVALID_PE_IN_CONDITIONAL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre \"{0}\" doit inclure la section conditionnelle compl\u00E8te ou seulement INCLUDE ou IGNORE.
+-        MSG_ATTRIBUTE_NOT_DECLARED = L''attribut \"{1}\" doit \u00EAtre d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment \"{0}\".
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attribut \"{0}\" de valeur \"{1}\" doit avoir une valeur issue de la liste \"{2}\".
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = La valeur \"{1}\" de l''attribut \"{0}\" ne doit pas \u00EAtre modifi\u00E9e par normalisation (et devenir \"{2}\") dans un document autonome.
+-        MSG_CONTENT_INCOMPLETE = Le contenu du type d''\u00E9l\u00E9ment \"{0}\" est incomplet. Il doit correspondre \u00E0 \"{1}\".
+-        MSG_CONTENT_INVALID = Le contenu du type d''\u00E9l\u00E9ment \"{0}\" doit correspondre \u00E0 \"{1}\".
+-        MSG_CONTENT_INVALID_SPECIFIED = Le contenu du type d''\u00E9l\u00E9ment \"{0}\" doit correspondre \u00E0 \"{1}\". Les enfants de type \"{2}\" ne sont pas autoris\u00E9s.
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attribut \"{1}\" du type d''\u00E9l\u00E9ment \"{0}\" a une valeur par d\u00E9faut et doit \u00EAtre sp\u00E9cifi\u00E9 dans un document autonome.
+-        MSG_DUPLICATE_ATTDEF = L''attribut \"{1}\" est d\u00E9j\u00E0 d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment \"{0}\".
+-        MSG_ELEMENT_ALREADY_DECLARED = Le type d''\u00E9l\u00E9ment \"{0}\" ne doit pas \u00EAtre d\u00E9clar\u00E9 plusieurs fois.
+-        MSG_ELEMENT_NOT_DECLARED = Le type d''\u00E9l\u00E9ment \"{0}\" doit \u00EAtre d\u00E9clar\u00E9.
++        DuplicateTypeInMixedContent = Le type d''\u00E9l\u00E9ment "{1}" a d\u00E9j\u00E0 \u00E9t\u00E9 sp\u00E9cifi\u00E9 dans le mod\u00E8le de contenu de la d\u00E9claration d''\u00E9l\u00E9ment "{0}".
++        ENTITIESInvalid = La valeur d''attribut "{1}" de type ENTITIES doit correspondre au nom d''au moins une entit\u00E9 non analys\u00E9e.
++        ENTITYInvalid = La valeur d''attribut "{1}" de type ENTITY doit correspondre au nom d''une entit\u00E9 non analys\u00E9e.
++        IDDefaultTypeInvalid = L''attribut d''ID "{0}" doit avoir une valeur par d\u00E9faut d\u00E9clar\u00E9e de "#IMPLIED" ou "#REQUIRED".
++        IDInvalid = La valeur d''attribut "{0}" de type ID doit \u00EAtre un nom.
++        IDInvalidWithNamespaces = La valeur d''attribut "{0}" de type ID doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
++        IDNotUnique = La valeur d''attribut "{0}" de type ID doit \u00EAtre unique dans le document.
++        IDREFInvalid = La valeur d''attribut "{0}" de type IDREF doit \u00EAtre un nom.
++        IDREFInvalidWithNamespaces = La valeur d''attribut "{0}" de type IDREF doit \u00EAtre un NCName lorsque les espaces de noms sont activ\u00E9s.
++        IDREFSInvalid = Une valeur d''attribut "{0}" de type IDREFS doit correspondre \u00E0 au moins un nom.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es lorsque la r\u00E9f\u00E9rence d''entit\u00E9 est utilis\u00E9e comme d\u00E9claration compl\u00E8te.
++        ImproperDeclarationNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure des d\u00E9clarations correctement imbriqu\u00E9es.
++        ImproperGroupNesting = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure des paires de parenth\u00E8ses correctement imbriqu\u00E9es.
++        INVALID_PE_IN_CONDITIONAL = Le texte de remplacement de l''entit\u00E9 de param\u00E8tre "{0}" doit inclure la section conditionnelle compl\u00E8te ou seulement INCLUDE ou IGNORE.
++        MSG_ATTRIBUTE_NOT_DECLARED = L''attribut "{1}" doit \u00EAtre d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment "{0}".
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attribut "{0}" de valeur "{1}" doit avoir une valeur issue de la liste "{2}".
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = La valeur "{1}" de l''attribut "{0}" ne doit pas \u00EAtre modifi\u00E9e par normalisation (et devenir "{2}") dans un document autonome.
++        MSG_CONTENT_INCOMPLETE = Le contenu du type d''\u00E9l\u00E9ment "{0}" est incomplet. Il doit correspondre \u00E0 "{1}".
++        MSG_CONTENT_INVALID = Le contenu du type d''\u00E9l\u00E9ment "{0}" doit correspondre \u00E0 "{1}".
++        MSG_CONTENT_INVALID_SPECIFIED = Le contenu du type d''\u00E9l\u00E9ment "{0}" doit correspondre \u00E0 "{1}". Les enfants de type "{2}" ne sont pas autoris\u00E9s.
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attribut "{1}" du type d''\u00E9l\u00E9ment "{0}" a une valeur par d\u00E9faut et doit \u00EAtre sp\u00E9cifi\u00E9 dans un document autonome.
++        MSG_DUPLICATE_ATTDEF = L''attribut "{1}" est d\u00E9j\u00E0 d\u00E9clar\u00E9 pour le type d''\u00E9l\u00E9ment "{0}".
++        MSG_ELEMENT_ALREADY_DECLARED = Le type d''\u00E9l\u00E9ment "{0}" ne doit pas \u00EAtre d\u00E9clar\u00E9 plusieurs fois.
++        MSG_ELEMENT_NOT_DECLARED = Le type d''\u00E9l\u00E9ment "{0}" doit \u00EAtre d\u00E9clar\u00E9.
+         MSG_GRAMMAR_NOT_FOUND = Le document n'est pas valide : aucune grammaire d\u00E9tect\u00E9e.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = Un \u00E9l\u00E9ment avec l''identificateur \"{0}\" doit figurer dans le document.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 externe \"{0}\" n''est pas autoris\u00E9e dans le document autonome.
+-        MSG_FIXED_ATTVALUE_INVALID = L''attribut \"{1}\" de valeur \"{2}\" doit avoir une valeur de \"{3}\".
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Le type d''\u00E9l\u00E9ment \"{0}\" a d\u00E9j\u00E0 l''attribut \"{1}\" de type ID. Un deuxi\u00E8me attribut \"{2}\" de type ID n''est pas autoris\u00E9.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Le type d''\u00E9l\u00E9ment \"{0}\" a d\u00E9j\u00E0 l''attribut \"{1}\" de type NOTATION. Un deuxi\u00E8me attribut \"{2}\" de type NOTATION n''est pas autoris\u00E9.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notation \"{1}\" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la liste des types de notation de l''attribut \"{0}\".
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notation \"{1}\" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la d\u00E9claration d''entit\u00E9 non analys\u00E9e pour \"{0}\".
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 \"{0}\" d\u00E9clar\u00E9e dans une entit\u00E9 analys\u00E9e externe n''est pas autoris\u00E9e dans un document autonome.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attribut \"{1}\" est obligatoire et doit \u00EAtre sp\u00E9cifi\u00E9 pour le type d''\u00E9l\u00E9ment \"{0}\".
++        MSG_ELEMENT_WITH_ID_REQUIRED = Un \u00E9l\u00E9ment avec l''identificateur "{0}" doit figurer dans le document.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 externe "{0}" n''est pas autoris\u00E9e dans le document autonome.
++        MSG_FIXED_ATTVALUE_INVALID = L''attribut "{1}" de valeur "{2}" doit avoir une valeur de "{3}".
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Le type d''\u00E9l\u00E9ment "{0}" a d\u00E9j\u00E0 l''attribut "{1}" de type ID. Un deuxi\u00E8me attribut "{2}" de type ID n''est pas autoris\u00E9.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Le type d''\u00E9l\u00E9ment "{0}" a d\u00E9j\u00E0 l''attribut "{1}" de type NOTATION. Un deuxi\u00E8me attribut "{2}" de type NOTATION n''est pas autoris\u00E9.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notation "{1}" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la liste des types de notation de l''attribut "{0}".
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notation "{1}" doit \u00EAtre d\u00E9clar\u00E9e lorsqu''elle est r\u00E9f\u00E9renc\u00E9e dans la d\u00E9claration d''entit\u00E9 non analys\u00E9e pour "{0}".
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = La r\u00E9f\u00E9rence \u00E0 l''entit\u00E9 "{0}" d\u00E9clar\u00E9e dans une entit\u00E9 analys\u00E9e externe n''est pas autoris\u00E9e dans un document autonome.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attribut "{1}" est obligatoire et doit \u00EAtre sp\u00E9cifi\u00E9 pour le type d''\u00E9l\u00E9ment "{0}".
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Aucun espace ne doit figurer entre les \u00E9l\u00E9ments d\u00E9clar\u00E9s dans une entit\u00E9 analys\u00E9e externe avec le contenu des \u00E9l\u00E9ments dans un document autonome.
+-        NMTOKENInvalid = La valeur d''attribut \"{0}\" de type NMTOKEN doit correspondre \u00E0 un jeton de nom.
+-        NMTOKENSInvalid = La valeur d''attribut \"{0}\" de type NMTOKENS doit correspondre \u00E0 au moins un jeton de nom.
+-        NoNotationOnEmptyElement = Le type d''\u00E9l\u00E9ment \"{0}\" d\u00E9clar\u00E9 EMPTY ne peut pas d\u00E9clarer un attribut \"{1}\" de type NOTATION.
+-        RootElementTypeMustMatchDoctypedecl = L''\u00E9l\u00E9ment racine de document \"{1}\" doit correspondre \u00E0 la racine DOCTYPE \"{0}\".
+-        UndeclaredElementInContentSpec = Le mod\u00E8le de contenu de l''\u00E9l\u00E9ment \"{0}\" fait r\u00E9f\u00E9rence \u00E0 l''\u00E9l\u00E9ment non d\u00E9clar\u00E9 \"{1}\".
+-        UniqueNotationName = La d\u00E9claration de la notation \"{0}\" n''est pas unique. Une valeur Name donn\u00E9e ne doit pas \u00EAtre d\u00E9clar\u00E9e dans plusieurs d\u00E9clarations de notation.
+-        ENTITYFailedInitializeGrammar =  Contr\u00F4le de validation ENTITYDatatype : \u00E9chec. Besoin d'appeler une m\u00E9thode d'initialisation avec une r\u00E9f\u00E9rence de grammaire valide. \t
+-        ENTITYNotUnparsed = La valeur ENTITY \"{0}\" est analys\u00E9e.
+-        ENTITYNotValid = La valeur ENTITY \"{0}\" n''est pas valide.
++        NMTOKENInvalid = La valeur d''attribut "{0}" de type NMTOKEN doit correspondre \u00E0 un jeton de nom.
++        NMTOKENSInvalid = La valeur d''attribut "{0}" de type NMTOKENS doit correspondre \u00E0 au moins un jeton de nom.
++        NoNotationOnEmptyElement = Le type d''\u00E9l\u00E9ment "{0}" d\u00E9clar\u00E9 EMPTY ne peut pas d\u00E9clarer un attribut "{1}" de type NOTATION.
++        RootElementTypeMustMatchDoctypedecl = L''\u00E9l\u00E9ment racine de document "{1}" doit correspondre \u00E0 la racine DOCTYPE "{0}".
++        UndeclaredElementInContentSpec = Le mod\u00E8le de contenu de l''\u00E9l\u00E9ment "{0}" fait r\u00E9f\u00E9rence \u00E0 l''\u00E9l\u00E9ment non d\u00E9clar\u00E9 "{1}".
++        UniqueNotationName = La d\u00E9claration de la notation "{0}" n''est pas unique. Une valeur Name donn\u00E9e ne doit pas \u00EAtre d\u00E9clar\u00E9e dans plusieurs d\u00E9clarations de notation.
++        ENTITYFailedInitializeGrammar =  Valideur ENTITYDatatype : \u00E9chec. Besoin d'appeler une m\u00E9thode d'initialisation avec une r\u00E9f\u00E9rence de grammaire valide. \t
++        ENTITYNotUnparsed = La valeur ENTITY "{0}" est analys\u00E9e.
++        ENTITYNotValid = La valeur ENTITY "{0}" n''est pas valide.
+         EmptyList = Une valeur de type ENTITIES, IDREFS et NMTOKENS ne peut pas correspondre \u00E0 une liste vide.
  
-@@ -2907,7 +2954,7 @@
- # From Paul Eggert (2006-03-22):
- # The _Economist_ (1994-05-28, p 45) reports that central Crimea switched
- # from Kiev to Moscow time sometime after the January 1994 elections.
--# Shanks (1999) says ``date of change uncertain'', but implies that it happened
-+# Shanks (1999) says "date of change uncertain", but implies that it happened
- # sometime between the 1994 DST switches.  Shanks & Pottenger simply say
- # 1994-09-25 03:00, but that can't be right.  For now, guess it
- # changed in May.
-@@ -2921,6 +2968,9 @@
- 			3:00	-	MSK	1997 Mar lastSun 1:00u
- 			2:00	EU	EE%sT
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = La r\u00E9f\u00E9rence d''entit\u00E9 externe \"&{0};\" n''est pas autoris\u00E9e dans une valeur d''attribut.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = La r\u00E9f\u00E9rence d''entit\u00E9 externe "&{0};" n''est pas autoris\u00E9e dans une valeur d''attribut.
++        AccessExternalDTD = DTD externe : \u00E9chec de la lecture de la DTD externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalDTD.
++        AccessExternalEntity = Entit\u00E9 externe : \u00E9chec de la lecture du document externe ''{0}'', car l''acc\u00E8s ''{1}'' n''est pas autoris\u00E9 en raison d''une restriction d\u00E9finie par la propri\u00E9t\u00E9 accessExternalDTD.
  
-+# Vatican City
-+# See Europe/Rome.
-+
- ###############################################################################
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = L''entit\u00E9 \"{0}\" \u00E9tait r\u00E9f\u00E9renc\u00E9e, mais pas d\u00E9clar\u00E9e.
+-        ReferenceToUnparsedEntity = La r\u00E9f\u00E9rence d''entit\u00E9 non analys\u00E9e \"&{0};\" n''est pas autoris\u00E9e.
+-        RecursiveReference = R\u00E9f\u00E9rence d''entit\u00E9 r\u00E9cursive \"{0}\". (Chemin de r\u00E9f\u00E9rence : {1}),
+-        RecursiveGeneralReference = R\u00E9f\u00E9rence d''entit\u00E9 g\u00E9n\u00E9rale r\u00E9cursive \"&{0};\". (Chemin de r\u00E9f\u00E9rence : {1}),
+-        RecursivePEReference = R\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre r\u00E9cursive \"%{0};\". (Chemin de r\u00E9f\u00E9rence : {1}),
++        EntityNotDeclared = L''entit\u00E9 "{0}" \u00E9tait r\u00E9f\u00E9renc\u00E9e, mais pas d\u00E9clar\u00E9e.
++        ReferenceToUnparsedEntity = La r\u00E9f\u00E9rence d''entit\u00E9 non analys\u00E9e "&{0};" n''est pas autoris\u00E9e.
++        RecursiveReference = R\u00E9f\u00E9rence d''entit\u00E9 r\u00E9cursive "{0}". (Chemin de r\u00E9f\u00E9rence : {1}),
++        RecursiveGeneralReference = R\u00E9f\u00E9rence d''entit\u00E9 g\u00E9n\u00E9rale r\u00E9cursive "&{0};". (Chemin de r\u00E9f\u00E9rence : {1}),
++        RecursivePEReference = R\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre r\u00E9cursive "%{0};". (Chemin de r\u00E9f\u00E9rence : {1}),
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = L''encodage \"{0}\" n''est pas pris en charge.
++        EncodingNotSupported = L''encodage "{0}" n''est pas pris en charge.
+         EncodingRequired = Une entit\u00E9 analys\u00E9e sans encodage UTF-8 ou UTF-16 doit contenir une d\u00E9claration d'encodage.
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = L'\u00E9l\u00E9ment ou l'attribut ne correspond pas \u00E0 la production QName : QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = L''\u00E9l\u00E9ment \"{0}\" ne peut pas avoir \"xmlns\" comme pr\u00E9fixe.
+-        ElementPrefixUnbound = Le pr\u00E9fixe \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" n''est pas li\u00E9.
+-        AttributePrefixUnbound = Le pr\u00E9fixe \"{2}\" de l''attribut \"{1}\" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment \"{0}\" n''est pas li\u00E9.
+-        EmptyPrefixedAttName = La valeur de l''attribut \"{0}\" n''est pas valide. Les liaisons d''espaces de noms pr\u00E9fix\u00E9s ne peuvent pas \u00EAtre vides.
+-        PrefixDeclared = Le pr\u00E9fixe d''espace de noms \"{0}\" n''\u00E9tait pas d\u00E9clar\u00E9.
++        ElementXMLNSPrefix = L''\u00E9l\u00E9ment "{0}" ne peut pas avoir "xmlns" comme pr\u00E9fixe.
++        ElementPrefixUnbound = Le pr\u00E9fixe "{0}" de l''\u00E9l\u00E9ment "{1}" n''est pas li\u00E9.
++        AttributePrefixUnbound = Le pr\u00E9fixe "{2}" de l''attribut "{1}" associ\u00E9 \u00E0 un type d''\u00E9l\u00E9ment "{0}" n''est pas li\u00E9.
++        EmptyPrefixedAttName = La valeur de l''attribut "{0}" n''est pas valide. Les liaisons d''espaces de noms pr\u00E9fix\u00E9s ne peuvent pas \u00EAtre vides.
++        PrefixDeclared = Le pr\u00E9fixe d''espace de noms "{0}" n''\u00E9tait pas d\u00E9clar\u00E9.
+         CantBindXMLNS = Le pr\u00E9fixe "xmlns" ne peut pas \u00EAtre li\u00E9 \u00E0 un espace de noms de fa\u00E7on explicite, pas plus que l'espace de noms de "xmlns" \u00E0 un pr\u00E9fixe quelconque.
+         CantBindXML = Le pr\u00E9fixe "xml" ne peut pas \u00EAtre li\u00E9 \u00E0 un autre espace de noms que son espace de noms habituel. L'espace de noms de "xml" ne peut pas non plus \u00EAtre li\u00E9 \u00E0 un autre pr\u00E9fixe que "xml".
+-        MSG_ATT_DEFAULT_INVALID = La valeur par d\u00E9faut \"{1}\" de l''attribut \"{0}\" n''est pas admise conform\u00E9ment aux contraintes lexicales de ce type d''attribut.
++        MSG_ATT_DEFAULT_INVALID = La valeur par d\u00E9faut "{1}" de l''attribut "{0}" n''est pas admise conform\u00E9ment aux contraintes lexicales de ce type d''attribut.
  
- # One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from
---- jdk/make/sun/javazic/tzdata/factory	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/factory	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
+ 
+ 
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=L''analyseur a rencontr\u00E9 plus de \"{0}\" d\u00E9veloppements d''entit\u00E9 dans ce document. Il s''agit de la limite impos\u00E9e par l''application.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001 : L''analyseur a rencontr\u00E9 plus de "{0}" d\u00E9veloppements d''entit\u00E9 dans ce document. Il s''agit de la limite impos\u00E9e par le JDK.
++        ElementAttributeLimit=JAXP00010002 : L''\u00E9l\u00E9ment "{0}" a plus de "{1}" attributs. "{1}" est la limite impos\u00E9e par le JDK.
++        MaxEntitySizeLimit=JAXP00010003 : La longueur de l''entit\u00E9 "{0}" est de "{1}". Cette valeur d\u00E9passe la limite de "{2}" d\u00E9finie par "{3}".
++        TotalEntitySizeLimit=JAXP00010004 : La taille cumul\u00E9e des entit\u00E9s ("{0}") d\u00E9passe la limite de "{1}" d\u00E9finie par "{2}".
++        MaxXMLNameLimit=JAXP00010005 : le nom "{0}" d\u00E9passe la limite de "{1}" d\u00E9finie par "{2}".
+ 
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= L''\u00E9l\u00E9ment \"{0}\" a plus de \"{1}\" attributs. \"{1}\" est la limite impos\u00E9e par l''application.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
- # 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.
--#  
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 +#
- # 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).
--#  
++# 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.
 +#
- # 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.
--#  
++# 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).
 +#
- # 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.
---- jdk/make/sun/javazic/tzdata/iso3166.tab	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/iso3166.tab	2014-04-20 12:39:22.000000000 -0700
-@@ -1,30 +1,30 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
++# 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.
 +#
- # 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.
--#  
++# 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.
 +#
- # 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.
- #
--# 
-+# ISO 3166 alpha-2 country codes
-+#
- # This file is in the public domain, so clarified as of
- # 2009-05-17 by Arthur David Olson.
--# ISO 3166 alpha-2 country codes
- #
- # From Paul Eggert (2013-05-27):
- #
-@@ -32,7 +32,7 @@
- # 1.  ISO 3166-1 alpha-2 country code, current as of
- #     ISO 3166-1 Newsletter VI-15 (2013-05-10).  See: Updates on ISO 3166
- #   http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
--# 2.  The usual English name for the country,
-+# 2.  The usual English name for the coded region,
- #     chosen so that alphabetic sorting of subsets produces helpful lists.
- #     This is not the same as the English name in the ISO 3166 tables.
- #
-@@ -46,7 +46,7 @@
- # to take or endorse any position on legal or territorial claims.
- #
- #country-
--#code	country name
-+#code	name of country, territory, area, or subdivision
- AD	Andorra
- AE	United Arab Emirates
- AF	Afghanistan
-@@ -76,7 +76,7 @@
- BM	Bermuda
- BN	Brunei
- BO	Bolivia
--BQ	Bonaire, St Eustatius & Saba
-+BQ	Caribbean Netherlands
- BR	Brazil
- BS	Bahamas
- BT	Bhutan
---- jdk/make/sun/javazic/tzdata/leapseconds	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/leapseconds	2014-04-20 12:39:22.000000000 -0700
-@@ -1,37 +1,43 @@
- #
- # 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.
--#
--# 
--# This file is in the public domain, so clarified as of
--# 2009-05-17 by Arthur David Olson.
  
- # Allowance for leapseconds added to each timezone file.
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel prologo del documento.
+         InvalidCharInXMLDecl = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nella dichiarazione XML.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = La sequenza di caratteri \"]]>\" non deve essere presente nel contenuto a meno che non sia utilizzata per contrassegnare la fine di una sezione CDATA.
++        CDEndInContent = La sequenza di caratteri "]]>" non deve essere presente nel contenuto a meno che non sia utilizzata per contrassegnare la fine di una sezione CDATA.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = La sezione CDATA deve terminare con \"]]>\".
++        CDSectUnterminated = La sezione CDATA deve terminare con "]]>".
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = La dichiarazione XML pu\u00F2 comparire solo all'inizio del documento.
+-        EqRequiredInXMLDecl = Il carattere '' = '' deve seguire \"{0}\" nella dichiarazione XML.
+-        QuoteRequiredInXMLDecl = Il valore che segue \"{0}\" nella dichiarazione XML deve essere una stringa compresa tra apici.
+-        XMLDeclUnterminated = La dichiarazione XML deve terminare con \"?>\".
++        EqRequiredInXMLDecl = Il carattere '' = '' deve seguire "{0}" nella dichiarazione XML.
++        QuoteRequiredInXMLDecl = Il valore che segue "{0}" nella dichiarazione XML deve essere una stringa compresa tra apici.
++        XMLDeclUnterminated = La dichiarazione XML deve terminare con "?>".
+         VersionInfoRequired = La versione \u00E8 obbligatoria nella dichiarazione XML.
+         SpaceRequiredBeforeVersionInXMLDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo della versione nella dichiarazione XML.
+         SpaceRequiredBeforeEncodingInXMLDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione XML.
+@@ -71,70 +68,71 @@
+         ReferenceIllegalInTrailingMisc=Il riferimento non \u00E8 consentito nella sezione finale.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = Il valore della dichiarazione del documento standalone deve essere \"yes\" o \"no\", non \"{0}\".
++        SDDeclInvalid = Il valore della dichiarazione del documento standalone deve essere "yes" o "no", non "{0}".
++        SDDeclNameInvalid = Il nome standalone nella dichiarazione XML potrebbe essere stato digitato in modo errato.
+ # 2.12 Language Identification
+-        XMLLangInvalid = Il valore dell''attributo xml:lang \"{0}\" \u00E8 un identificativo di lingua non valido.
++        XMLLangInvalid = Il valore dell''attributo xml:lang "{0}" \u00E8 un identificativo di lingua non valido.
+ # 3. Logical Structures
+-        ETagRequired = Il tipo di elemento \"{0}\" deve terminare con la corrispondente tag finale \"\".
++        ETagRequired = Il tipo di elemento "{0}" deve terminare con la corrispondente tag finale "".
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = Il tipo di elemento \"{0}\" deve essere seguito dalle specifiche di attributo \">\" o \"/>\".
+-        EqRequiredInAttribute = Il nome attributo \"{1}\" associato a un tipo di elemento \"{0}\" deve essere seguito dal carattere '' = ''.
+-        OpenQuoteExpected = \u00C8 previsto un apice di apertura per l''attributo \"{1}\" associato a un tipo di elemento \"{0}\".
+-        CloseQuoteExpected = \u00C8 previsto un apice di chiusura per l''attributo \"{1}\" associato a un tipo di elemento \"{0}\".
+-        AttributeNotUnique = L''attributo \"{1}\" \u00E8 gi\u00E0 stato specificato per l''elemento \"{0}\".
+-        AttributeNSNotUnique = L''attributo \"{1}\" associato allo spazio di nomi \"{2}\" \u00E8 gi\u00E0 stato specificato per l''elemento \"{0}\".
+-        ETagUnterminated = La tag finale per il tipo di elemento \"{0}\" deve terminare con un delimitatore ''>''.
++        ElementUnterminated = Il tipo di elemento "{0}" deve essere seguito dalle specifiche di attributo ">" o "/>".
++        EqRequiredInAttribute = Il nome attributo "{1}" associato a un tipo di elemento "{0}" deve essere seguito dal carattere '' = ''.
++        OpenQuoteExpected = \u00C8 previsto un apice di apertura per l''attributo "{1}" associato a un tipo di elemento "{0}".
++        CloseQuoteExpected = \u00C8 previsto un apice di chiusura per l''attributo "{1}" associato a un tipo di elemento "{0}".
++        AttributeNotUnique = L''attributo "{1}" \u00E8 gi\u00E0 stato specificato per l''elemento "{0}".
++        AttributeNSNotUnique = L''attributo "{1}" associato allo spazio di nomi "{2}" \u00E8 gi\u00E0 stato specificato per l''elemento "{0}".
++        ETagUnterminated = La tag finale per il tipo di elemento "{0}" deve terminare con un delimitatore ''>''.
+         MarkupNotRecognizedInContent = Il contenuto degli elementi deve essere composto da dati o markup di caratteri con formato corretto.
+         DoctypeIllegalInContent = DOCTYPE non \u00E8 consentito nel contenuto.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = Il riferimento deve terminare con un delimitatore ';'.
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = Il riferimento deve essere compreso completamente all'interno della stessa entit\u00E0 analizzata.
+-        ElementEntityMismatch = L''elemento \"{0}\" deve iniziare e finire con la stessa entit\u00E0.
++        ElementEntityMismatch = L''elemento "{0}" deve iniziare e finire con la stessa entit\u00E0.
+         MarkupEntityMismatch=Le strutture di documenti XML devono iniziare e finire con la stessa entit\u00E0.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{2}) nel valore dell''attributo \"{1}\". L''elemento \u00E8 \"{0}\".
++        InvalidCharInAttValue = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{2}) nel valore dell''attributo "{1}". L''elemento \u00E8 "{0}".
+         InvalidCharInComment = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel commento.
+         InvalidCharInPI = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nell''istruzione di elaborazione.
+         InvalidCharInInternalSubset = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nel set secondario interno del DTD.
+         InvalidCharInTextDecl = \u00C8 stato trovato un carattere XML non valido (Unicode: 0x{0}) nella dichiarazione testuale.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = Il valore dell''attributo \"{1}\" deve iniziare con un apice o una virgoletta.
+-        LessthanInAttValue = Il valore dell''attributo \"{1}\" associato a un tipo di elemento \"{0}\" non deve essere contenere il carattere ''<''.
+-        AttributeValueUnterminated = Il valore dell''attributo \"{1}\" deve terminare con un apice corrispondente.
++        QuoteRequiredInAttValue = Il valore dell''attributo "{1}" deve iniziare con un apice o una virgoletta.
++        LessthanInAttValue = Il valore dell''attributo "{1}" associato a un tipo di elemento "{0}" non deve essere contenere il carattere ''<''.
++        AttributeValueUnterminated = Il valore dell''attributo "{1}" deve terminare con un apice corrispondente.
+ # 2.5 Comments
+-        InvalidCommentStart = Il commento deve iniziare con \"\".
++        InvalidCommentStart = Il commento deve iniziare con "".
+         COMMENT_NOT_IN_ONE_ENTITY = Il commento non \u00E8 compreso all'interno della stessa entit\u00E0.
+ # 2.6 Processing Instructions
+         PITargetRequired = L'istruzione di elaborazione deve iniziare con il nome della destinazione.
+         SpaceRequiredInPI = \u00C8 richiesto uno spazio tra la destinazione delle istruzioni di elaborazione e i dati.
+-        PIUnterminated = L'istruzione di elaborazione deve terminare con \"?>\".
+-        ReservedPITarget = Non \u00E8 consentita una destinazione di istruzione di elaborazione corrispondente a \"[xX][mM][lL]\".
++        PIUnterminated = L'istruzione di elaborazione deve terminare con "?>".
++        ReservedPITarget = Non \u00E8 consentita una destinazione di istruzione di elaborazione corrispondente a "[xX][mM][lL]".
+         PI_NOT_IN_ONE_ENTITY = L'istruzione di elaborazione non \u00E8 compresa all'interno della stessa entit\u00E0.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = Versione \"{0}\" non valida.
+-        VersionNotSupported = La versione XML \"{0}\" non \u00E8 supportata. Solo la versione XML 1.0 \u00E8 supportata.
+-        VersionNotSupported11 = La versione XML \"{0}\" non \u00E8 supportata. Solo le versioni XML 1.0 e XML 1.1 sono supportate.
++        VersionInfoInvalid = Versione "{0}" non valida.
++        VersionNotSupported = La versione XML "{0}" non \u00E8 supportata. Solo la versione XML 1.0 \u00E8 supportata.
++        VersionNotSupported11 = La versione XML "{0}" non \u00E8 supportata. Solo le versioni XML 1.0 e XML 1.1 sono supportate.
+         VersionMismatch= Un'entit\u00E0 non pu\u00F2 includerne un'altra con una versione successiva.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = Una rappresentazione decimale deve seguire immediatamente \"&#\" in un riferimento di carattere.
+-        HexdigitRequiredInCharRef = Una rappresentazione esadecimale deve seguire immediatamente \"&#\" in un riferimento di carattere.
++        DigitRequiredInCharRef = Una rappresentazione decimale deve seguire immediatamente "&#" in un riferimento di carattere.
++        HexdigitRequiredInCharRef = Una rappresentazione esadecimale deve seguire immediatamente "&#" in un riferimento di carattere.
+         SemicolonRequiredInCharRef = Il riferimento di carattere deve terminare con il delimitatore ';'.
+-        InvalidCharRef = Il riferimento di carattere \"&#{0}\" \u00E8 un carattere XML non valido.
++        InvalidCharRef = Il riferimento di carattere "&#{0}" \u00E8 un carattere XML non valido.
+         NameRequiredInReference = Il nome entit\u00E0 deve seguire immediatamente '&' nel riferimento di entit\u00E0.
+-        SemicolonRequiredInReference = Il riferimento di entit\u00E0 \"{0}\" deve terminare con il delimitatore '';''.
++        SemicolonRequiredInReference = Il riferimento di entit\u00E0 "{0}" deve terminare con il delimitatore '';''.
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = La dichiarazione di testo pu\u00F2 comparire solo all'inizio dell'entit\u00E0 esterna analizzata.
+-        EqRequiredInTextDecl = Il carattere '' = '' deve seguire \"{0}\" nella dichiarazione di testo.
+-        QuoteRequiredInTextDecl = Il valore che segue \"{0}\" nella dichiarazione di testo deve essere una stringa compresa tra apici.
+-        CloseQuoteMissingInTextDecl = manca l''apice di chiusura nel valore che segue \"{0}\" nella dichiarazione di testo.
++        EqRequiredInTextDecl = Il carattere '' = '' deve seguire "{0}" nella dichiarazione di testo.
++        QuoteRequiredInTextDecl = Il valore che segue "{0}" nella dichiarazione di testo deve essere una stringa compresa tra apici.
++        CloseQuoteMissingInTextDecl = manca l''apice di chiusura nel valore che segue "{0}" nella dichiarazione di testo.
+         SpaceRequiredBeforeVersionInTextDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo della versione nella dichiarazione del testo.
+         SpaceRequiredBeforeEncodingInTextDecl = \u00C8 richiesto uno spazio prima dell'attributo pseudo di codifica nella dichiarazione del testo.
+-        TextDeclUnterminated = La dichiarazione di testo deve terminare con \"?>\".
++        TextDeclUnterminated = La dichiarazione di testo deve terminare con "?>".
+         EncodingDeclRequired = La dichiarazione di codifica \u00E8 obbligatoria nella dichiarazione di testo.
+         NoMorePseudoAttributes = Non sono consentiti altri attributi pseudo.
+         MorePseudoAttributes = Sono previsti altri attributi pseudo.
+@@ -143,13 +141,13 @@
+         CommentNotInOneEntity = Il commento deve essere compreso completamente all'interno della stessa entit\u00E0 analizzata.
+         PINotInOneEntity = L'istruzione di elaborazione deve essere compresa completamente all'interno della stessa entit\u00E0 analizzata.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = Nome codifica \"{0}\" non valido.
+-        EncodingByteOrderUnsupported = L''ordine di byte specificato per la codifica \"{0}\" non \u00E8 supportato.
++        EncodingDeclInvalid = Nome codifica "{0}" non valido.
++        EncodingByteOrderUnsupported = L''ordine di byte specificato per la codifica "{0}" non \u00E8 supportato.
+         InvalidByte = Byte non valido {0} della sequenza UTF-8 a {1} byte.
+         ExpectedByte = \u00C8 previsto il byte {0} della sequenza UTF-8 a {1} byte.  
+         InvalidHighSurrogate = I bit per surrogato alto nella sequenza UTF-8 non devono superare 0x10, ma \u00E8 stato trovato 0x{0}.
+-        OperationNotSupported = Operazione \"{0}\" non supportata dal processo di lettura {1}.
+-        InvalidASCII = Il byte \"{0}\" non fa parte del set di caratteri ASCII (a 7 bit).
++        OperationNotSupported = Operazione "{0}" non supportata dal processo di lettura {1}.
++        InvalidASCII = Il byte "{0}" non fa parte del set di caratteri ASCII (a 7 bit).
+         CharConversionFailure = Un'entit\u00E0 che deve trovarsi in una determinata codifica non pu\u00F2 contenere sequenze non valide in quella codifica.
+         
+ # DTD Messages
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = Il carattere (Unicode: 0x{0}) non \u00E8 consentito nell''identificativo pubblico.
+         SpaceRequiredBetweenPublicAndSystem = Sono richiesti spazi tra publicId e systemId.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u00C8 richiesto uno spazio dopo \"''.
+-        PEReferenceWithinMarkup = Il riferimento di entit\u00E0 di parametro \"%{0};\" non pu\u00F2 essere presente nel markup del set secondario interno del DTD.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u00C8 richiesto uno spazio dopo "''.
++        PEReferenceWithinMarkup = Il riferimento di entit\u00E0 di parametro "%{0};" non pu\u00F2 essere presente nel markup del set secondario interno del DTD.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Le dichiarazioni di markup contenute o indicate dalla dichiarazione del tipo di documento devono avere un formato corretto.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = La dichiarazione di attributo \"xml:space\" deve essere specificata come tipo enumerato, i cui unici possibili valori sono \"default\" e \"preserve\".
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = La dichiarazione di attributo "xml:space" deve essere specificata come tipo enumerato, i cui unici possibili valori sono "default" e "preserve".
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u00C8 richiesto uno spazio dopo \"''.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u00C8 richiesto uno spazio dopo il tipo di elemento "{0}" nella dichiarazione del tipo di elemento.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u00C8 richiesto uno vincolo dopo il tipo di elemento "{0}" nella dichiarazione del tipo di elemento.
++        ElementDeclUnterminated = La dichiarazione per il tipo di elemento "{0}" deve terminare con ''>''.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un carattere ''('' o un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Un carattere ''('' o un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento \"{0}\".
+-        MixedContentUnterminated = Il modello di contenuto misto \"{0}\" deve terminare con \")*\" se i tipi di elementi figlio hanno vincoli.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = Un tipo di elemento \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Un carattere '')'' \u00E8 obbligatorio nella dichiarazione del tipo di elemento "{0}".
++        MixedContentUnterminated = Il modello di contenuto misto "{0}" deve terminare con ")*" se i tipi di elementi figlio hanno vincoli.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u00C8 richiesto uno spazio dopo \"\".
+-        IgnoreSectUnterminated = La sezione condizionale esclusa deve terminare con \"]]>\".
++        IncludeSectUnterminated = La sezione condizionale inclusa deve terminare con "]]>".
++        IgnoreSectUnterminated = La sezione condizionale esclusa deve terminare con "]]>".
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = Il nome entit\u00E0 deve seguire immediatamente '%' nel riferimento di entit\u00E0 di parametro.
+-        SemicolonRequiredInPEReference = Il riferimento di entit\u00E0 di parametro \"%{0};\" deve terminare con il delimitatore '';''.
++        SemicolonRequiredInPEReference = Il riferimento di entit\u00E0 di parametro "%{0};" deve terminare con il delimitatore '';''.
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u00C8 richiesto uno spazio dopo \"''.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E0 \"{0}\" \u00E8 stata dichiarata pi\u00F9 volte.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \u00C8 richiesto uno spazio tra il nome entit\u00E0 "{0}" e la definizione nella dichiarazione dell''entit\u00E0:
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u00C8 richiesto uno spazio tra "NDATA" e il nome notazione nella dichiarazione dell''entit\u00E0 "{0}".
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = \u00C8 richiesto uno spazio prima di "NDATA" nella dichiarazione dell''entit\u00E0 "{0}".
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Il nome notazione \u00E8 obbligatorio dopo "NDATA" nella dichiarazione dell''entit\u00E0 "{0}".
++        EntityDeclUnterminated = La dichiarazione per l''entit\u00E0 "{0}" deve terminare con ''>''.
++	MSG_DUPLICATE_ENTITY_DEFINITION = L''entit\u00E0 "{0}" \u00E8 stata dichiarata pi\u00F9 volte.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = La dichiarazione di entit\u00E0 esterna deve iniziare con \"SYSTEM\" o \"PUBLIC\".
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra \"PUBLIC\" e l'identificativo pubblico.
++        ExternalIDRequired = La dichiarazione di entit\u00E0 esterna deve iniziare con "SYSTEM" o "PUBLIC".
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra "PUBLIC" e l'identificativo pubblico.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra l'identificativo pubblico e quello di sistema.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra \"SYSTEM\" e l'identificativo di sistema.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificativo di frammento non deve essere specificato nell''identificativo di sistema \"{0}\".
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u00C8 richiesto uno spazio tra "SYSTEM" e l'identificativo di sistema.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = L''identificativo di frammento non deve essere specificato nell''identificativo di sistema "{0}".
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u00C8 richiesto uno spazio dopo \"''.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u00C8 richiesto uno spazio dopo il nome notazione "{0}" nella dichiarazione della notazione.
++        ExternalIDorPublicIDRequired = La dichiarazione per la notazione "{0}" deve includere un identificativo di sistema o pubblico.
++        NotationDeclUnterminated = La dichiarazione per la notazione "{0}" deve terminare con ''>''.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = Il tipo di elemento \"{1}\" \u00E8 gi\u00E0 stato specificato nel modello di contenuto della dichiarazione di elemento \"{0}\".
+-        ENTITIESInvalid = Il valore di attributo \"{1}\" di tipo ENTITIES deve corrispondere ai nomi di una o pi\u00F9 entit\u00E0 non analizzate.
+-        ENTITYInvalid = Il valore di attributo \"{1}\" di tipo ENTITY deve corrispondere al nome di un''entit\u00E0 non analizzata.
+-        IDDefaultTypeInvalid = Nell''attributo ID \"{0}\" deve essere dichiarato un valore predefinito \"#IMPLIED\" o \"#REQUIRED\".
+-        IDInvalid = Il valore di attributo \"{0}\" di tipo ID deve essere un nome.
+-        IDInvalidWithNamespaces = Il valore di attributo \"{0}\" di tipo ID deve essere un NCName se sono abilitati gli spazi di nomi.
+-        IDNotUnique = Il valore di attributo \"{0}\" di tipo ID deve essere univoco all''interno del documento.
+-        IDREFInvalid = Il valore di attributo \"{0}\" di tipo IDREF deve essere un nome.
+-        IDREFInvalidWithNamespaces = Il valore di attributo \"{0}\" di tipo IDREF deve essere un NCName se sono abilitati gli spazi di nomi.
+-        IDREFSInvalid = Il valore di attributo \"{0}\" di tipo IDREFS deve corrispondere a uno o pi\u00F9 nomi.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere dichiarazioni nidificate correttamente se il riferimento dell''entit\u00E0 \u00E8 utilizzato come dichiarazione completa.
+-        ImproperDeclarationNesting = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere dichiarazioni nidificate correttamente.
+-        ImproperGroupNesting = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere coppie di parentesi nidificate correttamente.
+-        INVALID_PE_IN_CONDITIONAL = Il testo di sostituzione dell''entit\u00E0 di parametro \"{0}\" deve includere tutta la sezione condizionale oppure solo INCLUDE o IGNORE.
+-        MSG_ATTRIBUTE_NOT_DECLARED = Dichiarare l''attributo \"{1}\" per il tipo di elemento \"{0}\".
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attributo \"{0}\" con valore \"{1}\" deve avere un valore della lista \"{2}\".
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Il valore \"{1}\" dell''attributo \"{0}\" non deve essere modificato dalla normalizzazione (in \"{2}\") in un documento standalone.
+-        MSG_CONTENT_INCOMPLETE = Il contenuto del tipo di elemento \"{0}\" \u00E8 incompleto. Deve corrispondere a \"{1}\".
+-        MSG_CONTENT_INVALID = Il contenuto del tipo di elemento \"{0}\" deve corrispondere a \"{1}\".
+-        MSG_CONTENT_INVALID_SPECIFIED = Il contenuto del tipo di elemento \"{0}\" deve corrispondere a \"{1}\". Non sono consentiti elementi figlio di tipo \"{2}\".
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attributo \"{1}\" per il tipo di elemento \"{0}\" ha un valore predefinito e deve essere specificato in un documento standalone.
+-        MSG_DUPLICATE_ATTDEF = L''attributo \"{1}\" \u00E8 gi\u00E0 stato dichiarato per il tipo di elemento \"{0}\".
+-        MSG_ELEMENT_ALREADY_DECLARED = Il tipo di elemento \"{0}\" non deve essere dichiarato pi\u00F9 volte.
+-        MSG_ELEMENT_NOT_DECLARED = Il tipo di elemento \"{0}\" deve essere dichiarato.
++        DuplicateTypeInMixedContent = Il tipo di elemento "{1}" \u00E8 gi\u00E0 stato specificato nel modello di contenuto della dichiarazione di elemento "{0}".
++        ENTITIESInvalid = Il valore di attributo "{1}" di tipo ENTITIES deve corrispondere ai nomi di una o pi\u00F9 entit\u00E0 non analizzate.
++        ENTITYInvalid = Il valore di attributo "{1}" di tipo ENTITY deve corrispondere al nome di un''entit\u00E0 non analizzata.
++        IDDefaultTypeInvalid = Nell''attributo ID "{0}" deve essere dichiarato un valore predefinito "#IMPLIED" o "#REQUIRED".
++        IDInvalid = Il valore di attributo "{0}" di tipo ID deve essere un nome.
++        IDInvalidWithNamespaces = Il valore di attributo "{0}" di tipo ID deve essere un NCName se sono abilitati gli spazi di nomi.
++        IDNotUnique = Il valore di attributo "{0}" di tipo ID deve essere univoco all''interno del documento.
++        IDREFInvalid = Il valore di attributo "{0}" di tipo IDREF deve essere un nome.
++        IDREFInvalidWithNamespaces = Il valore di attributo "{0}" di tipo IDREF deve essere un NCName se sono abilitati gli spazi di nomi.
++        IDREFSInvalid = Il valore di attributo "{0}" di tipo IDREFS deve corrispondere a uno o pi\u00F9 nomi.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere dichiarazioni nidificate correttamente se il riferimento dell''entit\u00E0 \u00E8 utilizzato come dichiarazione completa.
++        ImproperDeclarationNesting = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere dichiarazioni nidificate correttamente.
++        ImproperGroupNesting = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere coppie di parentesi nidificate correttamente.
++        INVALID_PE_IN_CONDITIONAL = Il testo di sostituzione dell''entit\u00E0 di parametro "{0}" deve includere tutta la sezione condizionale oppure solo INCLUDE o IGNORE.
++        MSG_ATTRIBUTE_NOT_DECLARED = Dichiarare l''attributo "{1}" per il tipo di elemento "{0}".
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = L''attributo "{0}" con valore "{1}" deve avere un valore della lista "{2}".
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = Il valore "{1}" dell''attributo "{0}" non deve essere modificato dalla normalizzazione (in "{2}") in un documento standalone.
++        MSG_CONTENT_INCOMPLETE = Il contenuto del tipo di elemento "{0}" \u00E8 incompleto. Deve corrispondere a "{1}".
++        MSG_CONTENT_INVALID = Il contenuto del tipo di elemento "{0}" deve corrispondere a "{1}".
++        MSG_CONTENT_INVALID_SPECIFIED = Il contenuto del tipo di elemento "{0}" deve corrispondere a "{1}". Non sono consentiti elementi figlio di tipo "{2}".
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = L''attributo "{1}" per il tipo di elemento "{0}" ha un valore predefinito e deve essere specificato in un documento standalone.
++        MSG_DUPLICATE_ATTDEF = L''attributo "{1}" \u00E8 gi\u00E0 stato dichiarato per il tipo di elemento "{0}".
++        MSG_ELEMENT_ALREADY_DECLARED = Il tipo di elemento "{0}" non deve essere dichiarato pi\u00F9 volte.
++        MSG_ELEMENT_NOT_DECLARED = Il tipo di elemento "{0}" deve essere dichiarato.
+         MSG_GRAMMAR_NOT_FOUND = Documento non valido: nessuna grammatica trovata.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con identificativo \"{0}\" deve esistere nel documento.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Il riferimento all''entit\u00E0 esterna \"{0}\" non \u00E8 consentito in un documento standalone.
+-        MSG_FIXED_ATTVALUE_INVALID = L''attributo \"{1}\" con valore \"{2}\" deve avere un valore \"{3}\".
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Il tipo di elemento \"{0}\" ha gi\u00E0 un attributo \"{1}\" di tipo ID. Non \u00E8 consentito un secondo attributo \"{2}\" di tipo ID.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Il tipo di elemento \"{0}\" ha gi\u00E0 un attributo \"{1}\" di tipo NOTATION. Non \u00E8 consentito un secondo attributo \"{2}\" di tipo NOTATION.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notazione \"{1}\" deve essere dichiarata se vi viene fatto riferimento nella lista dei tipi di notazione per l''attributo \"{0}\".
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notazione \"{1}\" deve essere dichiarata se vi viene fatto riferimento dichiarazione di entit\u00E0 non analizzata per \"{0}\".
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Il riferimento all''entit\u00E0 \"{0}\" dichiarata in un''entit\u00E0 esterna analizzata non \u00E8 consentito in un documento standalone.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attributo \"{1}\" \u00E8 obbligatorio e deve essere specificato per il tipo di elemento \"{0}\".
++        MSG_ELEMENT_WITH_ID_REQUIRED = Un elemento con identificativo "{0}" deve esistere nel documento.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Il riferimento all''entit\u00E0 esterna "{0}" non \u00E8 consentito in un documento standalone.
++        MSG_FIXED_ATTVALUE_INVALID = L''attributo "{1}" con valore "{2}" deve avere un valore "{3}".
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Il tipo di elemento "{0}" ha gi\u00E0 un attributo "{1}" di tipo ID. Non \u00E8 consentito un secondo attributo "{2}" di tipo ID.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Il tipo di elemento "{0}" ha gi\u00E0 un attributo "{1}" di tipo NOTATION. Non \u00E8 consentito un secondo attributo "{2}" di tipo NOTATION.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = La notazione "{1}" deve essere dichiarata se vi viene fatto riferimento nella lista dei tipi di notazione per l''attributo "{0}".
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = La notazione "{1}" deve essere dichiarata se vi viene fatto riferimento dichiarazione di entit\u00E0 non analizzata per "{0}".
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Il riferimento all''entit\u00E0 "{0}" dichiarata in un''entit\u00E0 esterna analizzata non \u00E8 consentito in un documento standalone.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = L''attributo "{1}" \u00E8 obbligatorio e deve essere specificato per il tipo di elemento "{0}".
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Non deve esistere nessuno spazio tra gli elementi dichiarati in un'entit\u00E0 esterna analizzata con il contenuto dell'elemento in un documento standalone.
+-        NMTOKENInvalid = Il valore di attributo \"{0}\" di tipo NMTOKEN deve essere un token di nome.
+-        NMTOKENSInvalid = Il valore di attributo \"{0}\" di tipo NMTOKENS deve corrispondere a uno o pi\u00F9 token di nomi.
+-        NoNotationOnEmptyElement = Il tipo di elemento \"{0}\" dichiarato come EMPTY non pu\u00F2 dichiarare l''attributo \"{1}\" di tipo NOTATION.
+-        RootElementTypeMustMatchDoctypedecl = L''elemento radice \"{1}\" del documento deve corrispondere alla radice DOCTYPE \"{0}\".
+-        UndeclaredElementInContentSpec = Il modello di contenuto dell''elemento \"{0}\" fa riferimento a un elemento \"{1}\" non dichiarato.
+-        UniqueNotationName = La dichiarazione per la notazione \"{0}\" non \u00E8 univoca. Un nome non deve essere dichiarato pi\u00F9 volte nella dichiarazione di una notazione.
++        NMTOKENInvalid = Il valore di attributo "{0}" di tipo NMTOKEN deve essere un token di nome.
++        NMTOKENSInvalid = Il valore di attributo "{0}" di tipo NMTOKENS deve corrispondere a uno o pi\u00F9 token di nomi.
++        NoNotationOnEmptyElement = Il tipo di elemento "{0}" dichiarato come EMPTY non pu\u00F2 dichiarare l''attributo "{1}" di tipo NOTATION.
++        RootElementTypeMustMatchDoctypedecl = L''elemento radice "{1}" del documento deve corrispondere alla radice DOCTYPE "{0}".
++        UndeclaredElementInContentSpec = Il modello di contenuto dell''elemento "{0}" fa riferimento a un elemento "{1}" non dichiarato.
++        UniqueNotationName = La dichiarazione per la notazione "{0}" non \u00E8 univoca. Un nome non deve essere dichiarato pi\u00F9 volte nella dichiarazione di una notazione.
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype Validator: errore. \u00C8 necessario richiamare il metodo di inizializzazione con un riferimento di grammatica valido. \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\" non analizzata.
+-        ENTITYNotValid = ENTITY \"{0}\" non valida.
++        ENTITYNotUnparsed = ENTITY "{0}" non analizzata.
++        ENTITYNotValid = ENTITY "{0}" non valida.
+         EmptyList = I valori di tipo ENTITIES, IDREFS e NMTOKENS non possono essere una lista vuota.
  
-+# This file is in the public domain.
-+
-+# This file is generated automatically from the data in the public-domain
-+# leap-seconds.list file available from most NIST time servers.
-+# If the URL  does not work,
-+# you should be able to pick up leap-seconds.list from a secondary NIST server.
-+# For more about leap-seconds.list, please see
-+# The NTP Timescale and Leap Seconds
-+# .
-+
- # The International Earth Rotation Service periodically uses leap seconds
- # to keep UTC to within 0.9 s of UT1
- # (which measures the true angular orientation of the earth in space); see
- # Terry J Quinn, The BIPM and the accurate measure of time,
--# Proc IEEE 79, 7 (July 1991), 894-905.
-+# Proc IEEE 79, 7 (July 1991), 894-905 .
- # There were no leap seconds before 1972, because the official mechanism
- # accounting for the discrepancy between atomic time and the earth's rotation
- # did not exist until the early 1970s.
-@@ -42,8 +48,8 @@
- # or
- #	Leap	YEAR	MON	DAY	23:59:59	-	R/S
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = Il riferimento di entit\u00E0 esterna \"&{0};\" non \u00E8 consentito in un valore di attributo.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = Il riferimento di entit\u00E0 esterna "&{0};" non \u00E8 consentito in un valore di attributo.
++        AccessExternalDTD = DTD esterna: lettura della DTD esterna ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalDTD.
++        AccessExternalEntity = Entit\u00E0 esterna: lettura del documento esterno ''{0}'' non riuscita. Accesso ''{1}'' non consentito a causa della limitazione definita dalla propriet\u00E0 accessExternalDTD.
  
--# If the leapsecond is Rolling (R) the given time is local time
--# If the leapsecond is Stationary (S) the given time is UTC
-+# If the leapsecond is Rolling (R) the given time is local time.
-+# If the leapsecond is Stationary (S) the given time is UTC.
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = L''entit\u00E0 \"{0}\" \u00E8 indicata da un riferimento, ma non \u00E8 dichiarata.
+-        ReferenceToUnparsedEntity = Il riferimento di entit\u00E0 non analizzata \"&{0};\" non \u00E8 consentito.
+-        RecursiveReference = Riferimento di entit\u00E0 ricorsivo \"{0}\" (percorso riferimento: {1}).
+-        RecursiveGeneralReference = Riferimento di entit\u00E0 generale ricorsivo \"&{0};\" (percorso riferimento: {1}).
+-        RecursivePEReference = Riferimento di entit\u00E0 parametro ricorsivo \"%{0};\" (percorso riferimento: {1}).
++        EntityNotDeclared = L''entit\u00E0 "{0}" \u00E8 indicata da un riferimento, ma non \u00E8 dichiarata.
++        ReferenceToUnparsedEntity = Il riferimento di entit\u00E0 non analizzata "&{0};" non \u00E8 consentito.
++        RecursiveReference = Riferimento di entit\u00E0 ricorsivo "{0}" (percorso riferimento: {1}).
++        RecursiveGeneralReference = Riferimento di entit\u00E0 generale ricorsivo "&{0};" (percorso riferimento: {1}).
++        RecursivePEReference = Riferimento di entit\u00E0 parametro ricorsivo "%{0};" (percorso riferimento: {1}).
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = La codifica \"{0}\" non \u00E8 supportata.
++        EncodingNotSupported = La codifica "{0}" non \u00E8 supportata.
+         EncodingRequired = Un'entit\u00E0 analizzata non codificata in UTF-8 o UTF-16 deve contenere una dichiarazione di codifica.
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = L'elemento o l'attributo non corrisponde alla produzione del QName: QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = L''elemento \"{0}\" non pu\u00F2 avere \"xmlns\" come prefisso.
+-        ElementPrefixUnbound = Il prefisso \"{0}\" per l''elemento \"{1}\" non \u00E8 associato.
+-        AttributePrefixUnbound = Il prefisso \"{2}\" per l''attributo \"{1}\" associato a un tipo di elemento \"{0}\" non \u00E8 associato.
+-        EmptyPrefixedAttName = Il valore dell''attributo \"{0}\" non \u00E8 valido. Le associazioni di spazi di nomi con prefisso non possono essere vuote.
+-        PrefixDeclared = Il prefisso spazio di nomi \"{0}\" non \u00E8 stato dichiarato.
++        ElementXMLNSPrefix = L''elemento "{0}" non pu\u00F2 avere "xmlns" come prefisso.
++        ElementPrefixUnbound = Il prefisso "{0}" per l''elemento "{1}" non \u00E8 associato.
++        AttributePrefixUnbound = Il prefisso "{2}" per l''attributo "{1}" associato a un tipo di elemento "{0}" non \u00E8 associato.
++        EmptyPrefixedAttName = Il valore dell''attributo "{0}" non \u00E8 valido. Le associazioni di spazi di nomi con prefisso non possono essere vuote.
++        PrefixDeclared = Il prefisso spazio di nomi "{0}" non \u00E8 stato dichiarato.
+         CantBindXMLNS = Il prefisso "xmlns" non pu\u00F2 essere associato esplicitamente a uno spazio di nomi, n\u00E9 lo spazio di nomi per "xmlns" pu\u00F2 essere associato esplicitamente a un prefisso.
+         CantBindXML = Il prefisso "xml" non pu\u00F2 essere associato a uno spazio di nomi diverso da quello al quale appartiene, n\u00E9 lo spazio di nomi per "xml" pu\u00F2 essere associato a un prefisso diverso da "xml".
+-        MSG_ATT_DEFAULT_INVALID = defaultValue \"{1}\" dell''attributo \"{0}\" non valido per i vincoli lessicali di questo tipo di attributo.
++        MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" dell''attributo "{0}" non valido per i vincoli lessicali di questo tipo di attributo.
  
- # Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
- Leap	1972	Jun	30	23:59:60	+	S
-@@ -71,53 +77,3 @@
- Leap	2005	Dec	31	23:59:60	+	S
- Leap	2008	Dec	31	23:59:60	+	S
- Leap	2012	Jun	30	23:59:60	+	S
--
--# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
--#
--# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
--#
--#
--# SERVICE DE LA ROTATION TERRESTRE
--# OBSERVATOIRE DE PARIS
--# 61, Av. de l'Observatoire 75014 PARIS (France)
--# Tel.      : 33 (0) 1 40 51 22 26
--# FAX       : 33 (0) 1 40 51 22 91
--# e-mail    : (E-Mail Removed)
--# http://hpiers.obspm.fr/eop-pc
--#
--# Paris, 5 January 2012
--#
--#
--# Bulletin C 43
--#
--# To authorities responsible
--# for the measurement and
--# distribution of time
--#
--#
--# UTC TIME STEP
--# on the 1st of July 2012
--#
--#
--# A positive leap second will be introduced at the end of June 2012.
--# 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
--#
--# The difference between UTC and the International Atomic Time TAI is:
--#
--# from 2009 January 1, 0h UTC, to 2012 July 1  0h UTC  : UTC-TAI = - 34s
--# from 2012 July 1,    0h UTC, until further notice    : UTC-TAI = - 35s
--#
--# Leap seconds can be introduced in UTC at the end of the months of December
--# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
--# six months, either to announce a time step in UTC or to confirm that there
--# will be no time step at the next possible date.
--#
--#
--# Daniel GAMBIS
--# Head
--# Earth Orientation Center of IERS
--# Observatoire de Paris, France
---- jdk/make/sun/javazic/tzdata/northamerica	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/northamerica	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
-@@ -43,7 +43,7 @@
- # Howse writes (pp 121-125) that time zones were invented by
- # Professor Charles Ferdinand Dowd (1825-1904),
- # Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY).
--# His pamphlet ``A System of National Time for Railroads'' (1870)
-+# His pamphlet "A System of National Time for Railroads" (1870)
- # was the result of his proposals at the Convention of Railroad Trunk Lines
- # in New York City (1869-10).  His 1870 proposal was based on Washington, DC,
- # but in 1872-05 he moved the proposed origin to Greenwich.
-@@ -63,8 +63,8 @@
- 
- # From Paul Eggert (2001-03-06):
- # Daylight Saving Time was first suggested as a joke by Benjamin Franklin
--# in his whimsical essay ``An Economical Project for Diminishing the Cost
--# of Light'' published in the Journal de Paris (1784-04-26).
-+# in his whimsical essay "An Economical Project for Diminishing the Cost
-+# of Light" published in the Journal de Paris (1784-04-26).
- # Not everyone is happy with the results:
- #
- #	I don't really care how time is reckoned so long as there is some
-@@ -190,8 +190,8 @@
- #    of the Aleutian islands.   No DST.
- 
- # From Paul Eggert (1995-12-19):
--# The tables below use `NST', not `NT', for Nome Standard Time.
--# I invented `CAWT' for Central Alaska War Time.
-+# The tables below use 'NST', not 'NT', for Nome Standard Time.
-+# I invented 'CAWT' for Central Alaska War Time.
- 
- # From U. S. Naval Observatory (1989-01-19):
- # USA  EASTERN       5 H  BEHIND UTC    NEW YORK, WASHINGTON
-@@ -260,9 +260,9 @@
- # H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS.
- #   (a) Amendment- Section 3(a) of the Uniform Time Act of 1966 (15
- #   U.S.C. 260a(a)) is amended--
--#     (1) by striking `first Sunday of April' and inserting `second
-+#     (1) by striking 'first Sunday of April' and inserting 'second
- #     Sunday of March'; and
--#     (2) by striking `last Sunday of October' and inserting `first
-+#     (2) by striking 'last Sunday of October' and inserting 'first
- #     Sunday of November'.
- #   (b) Effective Date- Subsection (a) shall take effect 1 year after the
- #   date of enactment of this Act or March 1, 2007, whichever is later.
-@@ -623,6 +623,8 @@
- 			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
- 			-10:00	-	HST
- 
-+Link Pacific/Honolulu Pacific/Johnston
-+
- # Now we turn to US areas that have diverged from the consensus since 1970.
- 
- # Arizona mostly uses MST.
-@@ -659,8 +661,9 @@
- # Navajo Nation participates in the Daylight Saving Time policy, due to its
- # large size and location in three states."  (The "only" means that other
- # tribal nations don't use DST.)
--
--Link America/Denver America/Shiprock
-+#
-+# From Paul Eggert (2013-08-26):
-+# See America/Denver for a zone appropriate for the Navajo Nation.
- 
- # Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine,
- # Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
-@@ -700,13 +703,13 @@
- #   and Switzerland counties have their own time zone histories as noted below.
- #
- # Shanks partitioned Indiana into 345 regions, each with its own time history,
--# and wrote ``Even newspaper reports present contradictory information.''
-+# and wrote "Even newspaper reports present contradictory information."
- # Those Hoosiers!  Such a flighty and changeable people!
- # Fortunately, most of the complexity occurred before our cutoff date of 1970.
- #
- # Other than Indianapolis, the Indiana place names are so nondescript
--# that they would be ambiguous if we left them at the `America' level.
--# So we reluctantly put them all in a subdirectory `America/Indiana'.
-+# that they would be ambiguous if we left them at the 'America' level.
-+# So we reluctantly put them all in a subdirectory 'America/Indiana'.
- 
- # From Paul Eggert (2005-08-16):
- # http://www.mccsc.edu/time.html says that Indiana will use DST starting 2006.
-@@ -970,8 +973,8 @@
- # This story is too entertaining to be false, so go with Howse over Shanks.
- #
- # From Paul Eggert (2001-03-06):
--# Garland (1927) writes ``Cleveland and Detroit advanced their clocks
--# one hour in 1914.''  This change is not in Shanks.  We have no more
-+# Garland (1927) writes "Cleveland and Detroit advanced their clocks
-+# one hour in 1914."  This change is not in Shanks.  We have no more
- # info, so omit this for now.
- #
- # Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
-@@ -1011,7 +1014,7 @@
- # occupied 1857/1900 by the Navassa Phosphate Co
- # US lighthouse 1917/1996-09
- # currently uninhabited
--# see Mark Fineman, ``An Isle Rich in Guano and Discord'',
-+# see Mark Fineman, "An Isle Rich in Guano and Discord",
- # _Los Angeles Times_ (1998-11-10), A1, A10; it cites
- # Jimmy Skaggs, _The Great Guano Rush_ (1994).
- 
-@@ -1045,7 +1048,7 @@
- #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
- #	.
- #
--# See the `europe' file for Greenland.
-+# See the 'europe' file for Greenland.
- 
- # Canada
- 
-@@ -1246,7 +1249,7 @@
- 
- # most of east Labrador
- 
--# The name `Happy Valley-Goose Bay' is too long; use `Goose Bay'.
-+# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'.
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone America/Goose_Bay	-4:01:40 -	LMT	1884 # Happy Valley-Goose Bay
- 			-3:30:52 -	NST	1918
-@@ -1363,25 +1366,27 @@
- 
- # Quebec
- 
--# From Paul Eggert (2006-07-09):
--# Shanks & Pottenger write that since 1970 most of Quebec has been
--# like Montreal.
-+# From Paul Eggert (2013-08-30):
-+# Since 1970 most of Quebec has been like Toronto.
-+# However, because earlier versions of the tz database mistakenly relied on data
-+# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970,
-+# a separate entry was created for most of Quebec.  We're loath to lose
-+# its pre-1970 info, even though the tz database is normally limited to
-+# zones that differ after 1970, so keep this otherwise out-of-scope entry.
- 
--# From Paul Eggert (2006-06-27):
- # Matthews and Vincent (1998) also write that Quebec east of the -63
- # meridian is supposed to observe AST, but residents as far east as
- # Natashquan use EST/EDT, and residents east of Natashquan use AST.
--# In "Official time in Quebec" the Quebec department of justice writes in
--# http://www.justice.gouv.qc.ca/english/publications/generale/temps-regl-1-a.htm
--# that "The residents of the Municipality of the
--# Cote-Nord-du-Golfe-Saint-Laurent and the municipalities of Saint-Augustin,
--# Bonne-Esperance and Blanc-Sablon apply the Official Time Act as it is
--# written and use Atlantic standard time all year round. The same applies to
--# the residents of the Native facilities along the lower North Shore."
--# 
-+# The Quebec department of justice writes in
-+# "The situation in Minganie and Basse-Cote-Nord"
-+# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
-+# that the coastal strip from just east of Natashquan to Blanc-Sablon
-+# observes Atlantic standard time all year round.
-+# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
- # says this common practice was codified into law as of 2007.
- # For lack of better info, guess this practice began around 1970, contra to
- # Shanks & Pottenger who have this region observing AST/ADT.
-+# for post-1970 data America/Puerto_Rico.
- 
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	Mont	1917	only	-	Mar	25	2:00	1:00	D
-@@ -1425,7 +1430,6 @@
- 			-5:00	Mont	E%sT	1974
- 			-5:00	Canada	E%sT
- 
--
- # Ontario
- 
- # From Paul Eggert (2006-07-09):
-@@ -1644,7 +1648,7 @@
- 			-6:00	-	CST	1910
- 			-5:00	-	EST	1942
- 			-5:00	Canada	E%sT	1970
--			-5:00	Mont	E%sT	1973
-+			-5:00	Toronto	E%sT	1973
- 			-5:00	-	EST	1974
- 			-5:00	Canada	E%sT
- Zone America/Nipigon	-5:53:04 -	LMT	1895
-@@ -2231,7 +2235,7 @@
- # From Paul Eggert (1996-06-12):
- # For an English translation of the decree, see
- # 
--# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
-+# "Diario Oficial: Time Zone Changeover" (1996-01-04).
- # 
- 
- # From Rives McDow (1998-10-08):
-@@ -2568,9 +2572,7 @@
- ###############################################################################
- 
- # Anguilla
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/Anguilla	-4:12:16 -	LMT	1912 Mar 2
--			-4:00	-	AST
-+# See 'southamerica'.
- 
- # Antigua and Barbuda
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-@@ -2639,13 +2641,13 @@
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone Atlantic/Bermuda	-4:19:18 -	LMT	1930 Jan  1 2:00    # Hamilton
- 			-4:00	-	AST	1974 Apr 28 2:00
--			-4:00	Bahamas	A%sT	1976
-+			-4:00	Canada	A%sT	1976
- 			-4:00	US	A%sT
- 
- # Cayman Is
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone	America/Cayman	-5:25:32 -	LMT	1890		# Georgetown
--			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
-+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
- 			-5:00	-	EST
- 
- # Costa Rica
-@@ -2660,7 +2662,7 @@
- # go with Shanks & Pottenger.
- Rule	CR	1991	only	-	Jul	 1	0:00	0	S
- Rule	CR	1992	only	-	Mar	15	0:00	0	S
--# There are too many San Joses elsewhere, so we'll use `Costa Rica'.
-+# There are too many San Joses elsewhere, so we'll use 'Costa Rica'.
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone America/Costa_Rica	-5:36:13 -	LMT	1890		# San Jose
- 			-5:36:13 -	SJMT	1921 Jan 15 # San Jose Mean Time
-@@ -2686,6 +2688,11 @@
- # to DST--and one more hour on 1999-04-04--when the announcers will have
- # returned to Baltimore, which switches on that date.)
- 
-+# From Steffen Thorsen (2013-11-11):
-+# DST start in Cuba in 2004 ... does not follow the same rules as the
-+# years before.  The correct date should be Sunday 2004-03-28 00:00 ...
-+# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html
-+
- # From Evert van der Veer via Steffen Thorsen (2004-10-28):
- # Cuba is not going back to standard time this year.
- # From Paul Eggert (2006-03-22):
-@@ -2875,7 +2882,8 @@
- Rule	Cuba	1997	only	-	Oct	12	0:00s	0	S
- Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
- Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
--Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1:00	D
-+Rule	Cuba	2000	2003	-	Apr	Sun>=1	0:00s	1:00	D
-+Rule	Cuba	2004	only	-	Mar	lastSun	0:00s	1:00	D
- Rule	Cuba	2006	2010	-	Oct	lastSun	0:00s	0	S
- Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
- Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
-@@ -2892,9 +2900,7 @@
- 			-5:00	Cuba	C%sT
- 
- # Dominica
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/Dominica	-4:05:36 -	LMT	1911 Jul 1 0:01		# Roseau
--			-4:00	-	AST
-+# See 'southamerica'.
- 
- # Dominican Republic
- 
-@@ -2943,18 +2949,10 @@
- 			-6:00	Salv	C%sT
- 
- # Grenada
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone	America/Grenada	-4:07:00 -	LMT	1911 Jul	# St George's
--			-4:00	-	AST
--
- # Guadeloupe
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/Guadeloupe	-4:06:08 -	LMT	1911 Jun 8	# Pointe a Pitre
--			-4:00	-	AST
- # St Barthelemy
--Link America/Guadeloupe	America/St_Barthelemy
- # St Martin (French part)
--Link America/Guadeloupe	America/Marigot
-+# See 'southamerica'.
- 
- # Guatemala
- #
-@@ -3097,17 +3095,12 @@
- # Great Swan I ceded by US to Honduras in 1972
- 
- # Jamaica
--
--# From Bob Devine (1988-01-28):
--# Follows US rules.
--
--# From U. S. Naval Observatory (1989-01-19):
--# JAMAICA             5 H  BEHIND UTC
--
--# From Shanks & Pottenger:
-+# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
-+# unspecified official document, and says "This time is used throughout the
-+# island".  Go with Milne.  Round to the nearest second as required by zic.
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone	America/Jamaica	-5:07:12 -	LMT	1890		# Kingston
--			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
-+Zone	America/Jamaica	-5:07:11 -	LMT	1890		# Kingston
-+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
- 			-5:00	-	EST	1974 Apr 28 2:00
- 			-5:00	US	E%sT	1984
- 			-5:00	-	EST
-@@ -3121,12 +3114,7 @@
- 			-4:00	-	AST
- 
- # Montserrat
--# From Paul Eggert (2006-03-22):
--# In 1995 volcanic eruptions forced evacuation of Plymouth, the capital.
--# world.gazetteer.com says Cork Hill is the most populous location now.
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/Montserrat	-4:08:52 -	LMT	1911 Jul 1 0:01   # Cork Hill
--			-4:00	-	AST
-+# See 'southamerica'.
- 
- # Nicaragua
- #
-@@ -3200,7 +3188,7 @@
- 			-5:00	-	EST
- 
- # Puerto Rico
--# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'.
-+# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone America/Puerto_Rico -4:24:25 -	LMT	1899 Mar 28 12:00    # San Juan
- 			-4:00	-	AST	1942 May  3
-@@ -3208,18 +3196,11 @@
- 			-4:00	-	AST
- 
- # St Kitts-Nevis
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/St_Kitts	-4:10:52 -	LMT	1912 Mar 2	# Basseterre
--			-4:00	-	AST
--
- # St Lucia
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/St_Lucia	-4:04:00 -	LMT	1890		# Castries
--			-4:04:00 -	CMT	1912	    # Castries Mean Time
--			-4:00	-	AST
-+# See 'southamerica'.
- 
- # St Pierre and Miquelon
--# There are too many St Pierres elsewhere, so we'll use `Miquelon'.
-+# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone America/Miquelon	-3:44:40 -	LMT	1911 May 15	# St Pierre
- 			-4:00	-	AST	1980 May
-@@ -3227,10 +3208,7 @@
- 			-3:00	Canada	PM%sT
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
  
- # St Vincent and the Grenadines
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/St_Vincent	-4:04:56 -	LMT	1890		# Kingstown
--			-4:04:56 -	KMT	1912	   # Kingstown Mean Time
--			-4:00	-	AST
-+# See 'southamerica'.
  
- # Turks and Caicos
- #
-@@ -3260,15 +3238,9 @@
- Rule	TC	2007	max	-	Nov	Sun>=1	2:00	0	S
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
- Zone America/Grand_Turk	-4:44:32 -	LMT	1890
--			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
-+			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
- 			-5:00	TC	E%sT
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=Il parser ha rilevato pi\u00F9 \"{0}\" espansioni di entit\u00E0 nel documento. Questo \u00E8 il limite imposto dall''applicazione.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: il parser ha rilevato pi\u00F9 "{0}" espansioni di entit\u00E0 nel documento. Questo \u00E8 il limite imposto dal kit JDK.
++        ElementAttributeLimit=JAXP00010002: l''elemento "{0}" contiene pi\u00F9 di "{1}" attributi. "{1}" \u00E8 il limite imposto dal kit JDK.
++        MaxEntitySizeLimit=JAXP00010003: la lunghezza dell''entit\u00E0 "{0}" \u00E8 "{1}". Tale valore supera il limite "{2}" definito da "{3}".
++        TotalEntitySizeLimit=JAXP00010004: le dimensioni accumulate "{0}" delle entit\u00E0 supera il limite "{1}" definito da "{2}".
++        MaxXMLNameLimit=JAXP00010005: il nome "{0}" supera il limite "{1}" definito da "{2}".
  
- # British Virgin Is
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/Tortola	-4:18:28 -	LMT	1911 Jul    # Road Town
--			-4:00	-	AST
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= L''elemento \"{0}\" contiene pi\u00F9 di \"{1}\" attributi. \"{1}\" \u00E8 il limite imposto dall''applicazione.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties	2014-01-18 12:16:08.000000000 -0800
+@@ -1,30 +1,26 @@
+-/*
+- * 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.
+- */
 -
- # Virgin Is
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone America/St_Thomas	-4:19:44 -	LMT	1911 Jul    # Charlotte Amalie
--			-4:00	-	AST
-+# See 'southamerica'.
---- jdk/make/sun/javazic/tzdata/pacificnew	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/pacificnew	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
--#  
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
- # 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).
--#  
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 +#
- # 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.
--#  
++# 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.
 +#
- # 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.
---- jdk/make/sun/javazic/tzdata/solar87	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/solar87	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
++# 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).
 +#
- # 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.
--#  
++# 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.
 +#
- # 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.
---- jdk/make/sun/javazic/tzdata/solar88	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/solar88	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
++# 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.
+ 
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +44,14 @@
+         InvalidCharInProlog = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D7\u30ED\u30ED\u30FC\u30B0\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
+         InvalidCharInXMLDecl = XML\u5BA3\u8A00\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
+ # 2.4 Character Data and Markup
+-        CDEndInContent = \u6587\u5B57\u30B7\u30FC\u30B1\u30F3\u30B9\"]]>\"\u306F\u3001CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u3092\u793A\u3059\u76EE\u7684\u4EE5\u5916\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
++        CDEndInContent = \u6587\u5B57\u30B7\u30FC\u30B1\u30F3\u30B9"]]>"\u306F\u3001CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u3092\u793A\u3059\u76EE\u7684\u4EE5\u5916\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306F\"]]>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        CDSectUnterminated = CDATA\u30BB\u30AF\u30B7\u30E7\u30F3\u306F"]]>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = XML\u5BA3\u8A00\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u5148\u982D\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
+-        EqRequiredInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001\"{0}\"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        QuoteRequiredInXMLDecl = XML\u5BA3\u8A00\u306E\"{0}\"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        XMLDeclUnterminated = XML\u5BA3\u8A00\u306F\"?>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        EqRequiredInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001"{0}"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
++        QuoteRequiredInXMLDecl = XML\u5BA3\u8A00\u306E"{0}"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        XMLDeclUnterminated = XML\u5BA3\u8A00\u306F"?>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         VersionInfoRequired = XML\u5BA3\u8A00\u306B\u306F\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u5FC5\u8981\u3067\u3059\u3002
+         SpaceRequiredBeforeVersionInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001\u30D0\u30FC\u30B8\u30E7\u30F3\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+         SpaceRequiredBeforeEncodingInXMLDecl = XML\u5BA3\u8A00\u3067\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+@@ -71,70 +67,71 @@
+         ReferenceIllegalInTrailingMisc=\u5F8C\u7D9A\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u53C2\u7167\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5BA3\u8A00\u306E\u5024\u306F\u3001\"{0}\"\u3067\u306F\u306A\u304F\u3001\"yes\"\u307E\u305F\u306F\"no\"\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        SDDeclInvalid = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5BA3\u8A00\u306E\u5024\u306F\u3001"{0}"\u3067\u306F\u306A\u304F\u3001"yes"\u307E\u305F\u306F"no"\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        SDDeclNameInvalid = XML\u5BA3\u8A00\u306E\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u540D\u304C\u9593\u9055\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
+ # 2.12 Language Identification
+-        XMLLangInvalid = xml:lang\u5C5E\u6027\u306E\u5024\"{0}\"\u306F\u7121\u52B9\u306A\u8A00\u8A9E\u8B58\u5225\u5B50\u3067\u3059\u3002
++        XMLLangInvalid = xml:lang\u5C5E\u6027\u306E\u5024"{0}"\u306F\u7121\u52B9\u306A\u8A00\u8A9E\u8B58\u5225\u5B50\u3067\u3059\u3002
+ # 3. Logical Structures
+-        ETagRequired = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u7D42\u4E86\u30BF\u30B0\"\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ETagRequired = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u7D42\u4E86\u30BF\u30B0""\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5F8C\u306B\u306F\u3001\u5C5E\u6027\u6307\u5B9A\">\"\u307E\u305F\u306F\"/>\"\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        EqRequiredInAttribute = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\u540D\"{1}\"\u306E\u5F8C\u306B\u306F\u3001'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        OpenQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306B\u306F\u3001\u958B\u59CB\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        CloseQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306B\u306F\u3001\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        AttributeNotUnique = \u5C5E\u6027\"{1}\"\u306F\u8981\u7D20\"{0}\"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+-        AttributeNSNotUnique = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{2}\"\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u305F\u5C5E\u6027\"{1}\"\u306F\u8981\u7D20\"{0}\"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+-        ETagUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u7D42\u4E86\u30BF\u30B0\u306F''>''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ElementUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5F8C\u306B\u306F\u3001\u5C5E\u6027\u6307\u5B9A">"\u307E\u305F\u306F"/>"\u304C\u5FC5\u8981\u3067\u3059\u3002
++        EqRequiredInAttribute = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\u540D"{1}"\u306E\u5F8C\u306B\u306F\u3001'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
++        OpenQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306B\u306F\u3001\u958B\u59CB\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
++        CloseQuoteExpected = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306B\u306F\u3001\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u5FC5\u8981\u3067\u3059\u3002
++        AttributeNotUnique = \u5C5E\u6027"{1}"\u306F\u8981\u7D20"{0}"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
++        AttributeNSNotUnique = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9"{2}"\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u305F\u5C5E\u6027"{1}"\u306F\u8981\u7D20"{0}"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
++        ETagUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u7D42\u4E86\u30BF\u30B0\u306F''>''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         MarkupNotRecognizedInContent = \u8981\u7D20\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\u3001\u6574\u5F62\u5F0F\u306E\u6587\u5B57\u30C7\u30FC\u30BF\u307E\u305F\u306F\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         DoctypeIllegalInContent = \u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u306FDOCTYPE\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = \u53C2\u7167\u306F';'\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = \u53C2\u7167\u306F\u3001\u540C\u3058\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        ElementEntityMismatch = \u8981\u7D20\"{0}\"\u306F\u3001\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u3067\u958B\u59CB\u304A\u3088\u3073\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ElementEntityMismatch = \u8981\u7D20"{0}"\u306F\u3001\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u3067\u958B\u59CB\u304A\u3088\u3073\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         MarkupEntityMismatch=XML\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u69CB\u9020\u306F\u3001\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u3067\u958B\u59CB\u304A\u3088\u3073\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = \u5C5E\u6027\"{1}\"\u306E\u5024\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{2})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\u8981\u7D20\u306F\"{0}\"\u3067\u3059\u3002
++        InvalidCharInAttValue = \u5C5E\u6027"{1}"\u306E\u5024\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{2})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\u8981\u7D20\u306F"{0}"\u3067\u3059\u3002
+         InvalidCharInComment = \u30B3\u30E1\u30F3\u30C8\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
+         InvalidCharInPI = \u51E6\u7406\u547D\u4EE4\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
+         InvalidCharInInternalSubset = DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
+         InvalidCharInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306B\u7121\u52B9\u306AXML\u6587\u5B57(Unicode: 0x{0})\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = \u5C5E\u6027\"{1}\"\u306E\u5024\u306E\u5148\u982D\u306B\u306F\u3001\u4E00\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u307E\u305F\u306F\u4E8C\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        LessthanInAttValue = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306E\u5024\u306B\u306F\u3001''<''\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
+-        AttributeValueUnterminated = \u5C5E\u6027\"{1}\"\u306E\u5024\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u5F15\u7528\u7B26\u6587\u5B57\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        QuoteRequiredInAttValue = \u5C5E\u6027"{1}"\u306E\u5024\u306E\u5148\u982D\u306B\u306F\u3001\u4E00\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u307E\u305F\u306F\u4E8C\u91CD\u5F15\u7528\u7B26\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
++        LessthanInAttValue = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306E\u5024\u306B\u306F\u3001''<''\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
++        AttributeValueUnterminated = \u5C5E\u6027"{1}"\u306E\u5024\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u5F15\u7528\u7B26\u6587\u5B57\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 2.5 Comments
+-        InvalidCommentStart = \u30B3\u30E1\u30F3\u30C8\u306E\u5148\u982D\u306B\u306F\"\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        InvalidCommentStart = \u30B3\u30E1\u30F3\u30C8\u306E\u5148\u982D\u306B\u306F""\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         COMMENT_NOT_IN_ONE_ENTITY = \u30B3\u30E1\u30F3\u30C8\u304C\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u56F2\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+ # 2.6 Processing Instructions
+         PITargetRequired = \u51E6\u7406\u547D\u4EE4\u306E\u5148\u982D\u306B\u306F\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u540D\u524D\u304C\u5FC5\u8981\u3067\u3059\u3002
+         SpaceRequiredInPI = \u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u30C7\u30FC\u30BF\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        PIUnterminated = \u51E6\u7406\u547D\u4EE4\u306F\"?>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        ReservedPITarget = \"[xX][mM][lL]\"\u3068\u4E00\u81F4\u3059\u308B\u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        PIUnterminated = \u51E6\u7406\u547D\u4EE4\u306F"?>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ReservedPITarget = "[xX][mM][lL]"\u3068\u4E00\u81F4\u3059\u308B\u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+         PI_NOT_IN_ONE_ENTITY = \u51E6\u7406\u547D\u4EE4\u304C\u540C\u3058\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u56F2\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = \u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\"\u306F\u7121\u52B9\u3067\u3059\u3002
+-        VersionNotSupported = XML\u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u306E\u307F\u3067\u3059\u3002
+-        VersionNotSupported11 = XML\u30D0\u30FC\u30B8\u30E7\u30F3\"{0}\"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u304A\u3088\u3073XML 1.1\u306E\u307F\u3067\u3059\u3002
++        VersionInfoInvalid = \u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u7121\u52B9\u3067\u3059\u3002
++        VersionNotSupported = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u306E\u307F\u3067\u3059\u3002
++        VersionNotSupported11 = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306FXML 1.0\u304A\u3088\u3073XML 1.1\u306E\u307F\u3067\u3059\u3002
+         VersionMismatch= \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u306F\u3001\u5F8C\u7D9A\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u5225\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300110\u9032\u8868\u73FE\u306F\"&#\"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        HexdigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300116\u9032\u8868\u73FE\u306F\"&#x\"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        DigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300110\u9032\u8868\u73FE\u306F"&#"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        HexdigitRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u3067\u306F\u300116\u9032\u8868\u73FE\u306F"&#x"\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         SemicolonRequiredInCharRef = \u6587\u5B57\u53C2\u7167\u306F';'\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        InvalidCharRef = \u6587\u5B57\u53C2\u7167\"&#{0}\"\u306F\u7121\u52B9\u306AXML\u6587\u5B57\u3067\u3059\u3002
++        InvalidCharRef = \u6587\u5B57\u53C2\u7167"&#{0}"\u306F\u7121\u52B9\u306AXML\u6587\u5B57\u3067\u3059\u3002
+         NameRequiredInReference = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3067\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u306F'&'\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        SemicolonRequiredInReference = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u3078\u306E\u53C2\u7167\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        SemicolonRequiredInReference = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u3078\u306E\u53C2\u7167\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306F\u3001\u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u5148\u982D\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
+-        EqRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\"{0}\"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        QuoteRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E\"{0}\"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        CloseQuoteMissingInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E\"{0}\"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306B\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u3042\u308A\u307E\u305B\u3093\u3002
++        EqRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001"{0}"\u306E\u5F8C\u306B'' = ''\u6587\u5B57\u304C\u5FC5\u8981\u3067\u3059\u3002
++        QuoteRequiredInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E"{0}"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u3093\u3060\u6587\u5B57\u5217\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        CloseQuoteMissingInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306E"{0}"\u306E\u5F8C\u306B\u7D9A\u304F\u5024\u306B\u7D42\u4E86\u5F15\u7528\u7B26\u304C\u3042\u308A\u307E\u305B\u3093\u3002
+         SpaceRequiredBeforeVersionInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\u30D0\u30FC\u30B8\u30E7\u30F3\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+         SpaceRequiredBeforeEncodingInTextDecl = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u7591\u4F3C\u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        TextDeclUnterminated = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306F\"?>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        TextDeclUnterminated = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306F"?>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         EncodingDeclRequired = \u30C6\u30AD\u30B9\u30C8\u5BA3\u8A00\u306B\u306F\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u5BA3\u8A00\u304C\u5FC5\u8981\u3067\u3059\u3002
+         NoMorePseudoAttributes = \u3053\u308C\u4EE5\u4E0A\u306E\u7591\u4F3C\u5C5E\u6027\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
+         MorePseudoAttributes = \u7591\u4F3C\u5C5E\u6027\u304C\u3055\u3089\u306B\u5FC5\u8981\u3067\u3059\u3002
+@@ -143,13 +140,13 @@
+         CommentNotInOneEntity = \u30B3\u30E1\u30F3\u30C8\u306F\u3001\u540C\u3058\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         PINotInOneEntity = \u51E6\u7406\u547D\u4EE4\u306F\u3001\u540C\u3058\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5185\u306B\u5B8C\u5168\u306B\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002
+-        EncodingByteOrderUnsupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\"{0}\"\u306B\u6307\u5B9A\u3055\u308C\u305F\u30D0\u30A4\u30C8\u9806\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        EncodingDeclInvalid = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D"{0}"\u304C\u7121\u52B9\u3067\u3059\u3002
++        EncodingByteOrderUnsupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{0}"\u306B\u6307\u5B9A\u3055\u308C\u305F\u30D0\u30A4\u30C8\u9806\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+         InvalidByte = {1}\u30D0\u30A4\u30C8\u306EUTF-8\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u30D0\u30A4\u30C8{0}\u304C\u7121\u52B9\u3067\u3059\u3002
+         ExpectedByte = {1}\u30D0\u30A4\u30C8\u306EUTF-8\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u30D0\u30A4\u30C8{0}\u304C\u5FC5\u8981\u3067\u3059\u3002  
+         InvalidHighSurrogate = UTF-8\u30B7\u30FC\u30B1\u30F3\u30B9\u306E\u4E0A\u4F4D\u30B5\u30ED\u30B2\u30FC\u30C8\u30FB\u30D3\u30C3\u30C8\u306E\u4E0A\u9650\u306F0x10\u3067\u3059\u304C\u30010x{0}\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002
+-        OperationNotSupported = \u64CD\u4F5C\"{0}\"\u306F{1}\u30EA\u30FC\u30C0\u30FC\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        InvalidASCII = \u30D0\u30A4\u30C8\"{0}\"\u306F\u3001(7\u30D3\u30C3\u30C8) ASCII\u30AD\u30E3\u30E9\u30AF\u30BF\u30FB\u30BB\u30C3\u30C8\u306E\u30E1\u30F3\u30D0\u30FC\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
++        OperationNotSupported = \u64CD\u4F5C"{0}"\u306F{1}\u30EA\u30FC\u30C0\u30FC\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        InvalidASCII = \u30D0\u30A4\u30C8"{0}"\u306F\u3001(7\u30D3\u30C3\u30C8) ASCII\u30AD\u30E3\u30E9\u30AF\u30BF\u30FB\u30BB\u30C3\u30C8\u306E\u30E1\u30F3\u30D0\u30FC\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+         CharConversionFailure = \u7279\u5B9A\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u3042\u308B\u3068\u78BA\u5B9A\u3055\u308C\u305F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u306F\u3001\u305D\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u4E0D\u6B63\u306A\u30B7\u30FC\u30B1\u30F3\u30B9\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
+         
+ # DTD Messages
+@@ -169,150 +166,150 @@
+         PubidCharIllegal = \u516C\u958B\u8B58\u5225\u5B50\u3067\u306F\u3001\u6587\u5B57(Unicode: 0x{0})\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
+         SpaceRequiredBetweenPublicAndSystem = \u516C\u958B\u8B58\u5225\u5B50\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        PEReferenceWithinMarkup = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"%{0};\"\u306F\u3001DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5185\u306B\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        PEReferenceWithinMarkup = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u306F\u3001DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5185\u306B\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u306B\u542B\u307E\u308C\u308B\u304B\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u304C\u6307\u3057\u3066\u3044\u308B\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5BA3\u8A00\u306F\u6574\u5F62\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\"\u306E\u5C5E\u6027\u5BA3\u8A00\u306F\u3001\"default\"\u304A\u3088\u3073\"preserve\"\u306E\u307F\u3092\u4F7F\u7528\u3067\u304D\u308B\u5217\u6319\u30BF\u30A4\u30D7\u3068\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space"\u306E\u5C5E\u6027\u5BA3\u8A00\u306F\u3001"default"\u304A\u3088\u3073"preserve"\u306E\u307F\u3092\u4F7F\u7528\u3067\u304D\u308B\u5217\u6319\u30BF\u30A4\u30D7\u3068\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u8981\u7D20\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u8981\u7D20\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5F8C\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u8981\u7D20\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5F8C\u306B\u5236\u7D04\u304C\u5FC5\u8981\u3067\u3059\u3002
++        ElementDeclUnterminated = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F''(''\u6587\u5B57\u307E\u305F\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F''(''\u6587\u5B57\u307E\u305F\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MixedContentUnterminated = \u5B50\u8981\u7D20\u306E\u30BF\u30A4\u30D7\u304C\u5236\u7D04\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u6DF7\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\"{0}\"\u306F\")*\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5BA3\u8A00\u306B\u306F'')''\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MixedContentUnterminated = \u5B50\u8981\u7D20\u306E\u30BF\u30A4\u30D7\u304C\u5236\u7D04\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u6DF7\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB"{0}"\u306F")*"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u5C5E\u6027\u30EA\u30B9\u30C8\u5BA3\u8A00\u3067\u306F\u3001\"\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IgnoreSectUnterminated = \u9664\u5916\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u5F8C\u306F\"]]>\"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IncludeSectUnterminated = \u5305\u542B\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u306F"]]>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IgnoreSectUnterminated = \u9664\u5916\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u5F8C\u306F"]]>"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3067\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u306F'%'\u306E\u76F4\u5F8C\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        SemicolonRequiredInPEReference = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"%{0};\"\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        SemicolonRequiredInPEReference = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u306F'';''\u30C7\u30EA\u30DF\u30BF\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-	MSG_DUPLICATE_ENTITY_DEFINITION = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u304C\u8907\u6570\u56DE\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D"{0}"\u3068\u5B9A\u7FA9\u306E\u9593\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u3067\u306F\u3001"NDATA"\u3068\u8868\u8A18\u540D\u306E\u9593\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u3067\u306F\u3001"NDATA"\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u3067\u306F\u3001"NDATA"\u306E\u5F8C\u306B\u8868\u8A18\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        EntityDeclUnterminated = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++	MSG_DUPLICATE_ENTITY_DEFINITION = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u304C\u8907\u6570\u56DE\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u306E\u5148\u982D\u306B\u306F\"SYSTEM\"\u307E\u305F\u306F\"PUBLIC\"\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \"PUBLIC\"\u3068\u516C\u958B\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        ExternalIDRequired = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u306E\u5148\u982D\u306B\u306F"SYSTEM"\u307E\u305F\u306F"PUBLIC"\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC"\u3068\u516C\u958B\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u516C\u958B\u8B58\u5225\u5B50\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \"SYSTEM\"\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = \u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8B58\u5225\u5B50\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\"{0}\"\u306E\u4E00\u90E8\u3068\u3057\u3066\u6307\u5B9A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM"\u3068\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u306E\u9593\u306B\u306F\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_URI_FRAGMENT_IN_SYSTEMID = \u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u8B58\u5225\u5B50\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50"{0}"\u306E\u4E00\u90E8\u3068\u3057\u3066\u6307\u5B9A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u306F\u3001\"''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u306F\u3001\u8868\u8A18\u540D"{0}"\u306E\u5F8C\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
++        ExternalIDorPublicIDRequired = \u8868\u8A18\u6CD5"{0}"\u306E\u5BA3\u8A00\u306B\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u8B58\u5225\u5B50\u307E\u305F\u306F\u516C\u958B\u8B58\u5225\u5B50\u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        NotationDeclUnterminated = \u8868\u8A18\u6CD5"{0}"\u306E\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = \u8981\u7D20\u30BF\u30A4\u30D7\"{1}\"\u306F\u3001\u8981\u7D20\u5BA3\u8A00\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+-        ENTITIESInvalid = \u30BF\u30A4\u30D7ENTITIES\u306E\u5C5E\u6027\u5024\"{1}\"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        ENTITYInvalid = \u30BF\u30A4\u30D7ENTITY\u306E\u5C5E\u6027\u5024\"{1}\"\u306F\u3001\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDDefaultTypeInvalid = ID\u5C5E\u6027\"{0}\"\u306B\u306F\u3001\"#IMPLIED\"\u307E\u305F\u306F\"#REQUIRED\"\u306E\u5BA3\u8A00\u6E08\u30C7\u30D5\u30A9\u30EB\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDInvalid = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024\"{0}\"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDNotUnique = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDREFInvalid = \u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDREFInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024\"{0}\"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        IDREFSInvalid = \u30BF\u30A4\u30D7IDREFS\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u304C\u5B8C\u5168\u306A\u5BA3\u8A00\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        ImproperDeclarationNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        ImproperGroupNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u4E38\u30AB\u30C3\u30B3\u306E\u30DA\u30A2\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        INVALID_PE_IN_CONDITIONAL = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304B\u3001INCLUDE\u307E\u305F\u306FIGNORE\u306E\u307F\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_ATTRIBUTE_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u5BFE\u3057\u3066\u5C5E\u6027\"{1}\"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5024\"{1}\"\u3092\u6301\u3064\u5C5E\u6027\"{0}\"\u306B\u306F\u3001\u30EA\u30B9\u30C8\"{2}\"\u304B\u3089\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5C5E\u6027\"{0}\"\u306E\u5024\"{1}\"\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6B63\u898F\u5316\u306B\u3088\u3063\u3066(\"{2}\"\u306B)\u5909\u66F4\u3055\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_CONTENT_INCOMPLETE = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u4E0D\u5B8C\u5168\u3067\u3059\u3002\"{1}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_CONTENT_INVALID = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\"{1}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_CONTENT_INVALID_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F\"{1}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7\"{2}\"\u306E\u5B50\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306E\u5C5E\u6027\"{1}\"\u306F\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u6301\u3061\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_DUPLICATE_ATTDEF = \u5C5E\u6027\"{1}\"\u306F\u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+-        MSG_ELEMENT_ALREADY_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306F\u8907\u6570\u56DE\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
+-        MSG_ELEMENT_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_GRAMMAR_NOT_FOUND = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u7121\u52B9\u3067\u3059\u3002\u69CB\u6587\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
+-        MSG_ELEMENT_WITH_ID_REQUIRED = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u8B58\u5225\u5B50\"{0}\"\u3092\u6301\u3064\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        MSG_FIXED_ATTVALUE_INVALID = \u5024\"{2}\"\u3092\u6301\u3064\u5C5E\u6027\"{1}\"\u306B\u306F\u3001\"{3}\"\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u306F\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\"{1}\"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\"{2}\"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027\"{1}\"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027\"{2}\"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5C5E\u6027\"{0}\"\u306E\u8868\u8A18\u6CD5\u30BF\u30A4\u30D7\u30FB\u30EA\u30B9\u30C8\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5\"{1}\"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \"{0}\"\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5\"{1}\"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5C5E\u6027\"{1}\"\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u306E\u5C5E\u6027\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u5BFE\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        DuplicateTypeInMixedContent = \u8981\u7D20\u30BF\u30A4\u30D7"{1}"\u306F\u3001\u8981\u7D20\u5BA3\u8A00"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
++        ENTITIESInvalid = \u30BF\u30A4\u30D7ENTITIES\u306E\u5C5E\u6027\u5024"{1}"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ENTITYInvalid = \u30BF\u30A4\u30D7ENTITY\u306E\u5C5E\u6027\u5024"{1}"\u306F\u3001\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDDefaultTypeInvalid = ID\u5C5E\u6027"{0}"\u306B\u306F\u3001"#IMPLIED"\u307E\u305F\u306F"#REQUIRED"\u306E\u5BA3\u8A00\u6E08\u30C7\u30D5\u30A9\u30EB\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDInvalid = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024"{0}"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDNotUnique = \u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDREFInvalid = \u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDREFInvalidWithNamespaces = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30BF\u30A4\u30D7IDREF\u306E\u5C5E\u6027\u5024"{0}"\u306FNCName\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        IDREFSInvalid = \u30BF\u30A4\u30D7IDREFS\u306E\u5C5E\u6027\u5024"{0}"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u304C\u5B8C\u5168\u306A\u5BA3\u8A00\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ImproperDeclarationNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        ImproperGroupNesting = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u9069\u5207\u306B\u30CD\u30B9\u30C8\u3055\u308C\u305F\u4E38\u30AB\u30C3\u30B3\u306E\u30DA\u30A2\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        INVALID_PE_IN_CONDITIONAL = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u7F6E\u63DB\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u3001\u6761\u4EF6\u4ED8\u304D\u30BB\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304B\u3001INCLUDE\u307E\u305F\u306FIGNORE\u306E\u307F\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_ATTRIBUTE_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u5BFE\u3057\u3066\u5C5E\u6027"{1}"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5024"{1}"\u3092\u6301\u3064\u5C5E\u6027"{0}"\u306B\u306F\u3001\u30EA\u30B9\u30C8"{2}"\u304B\u3089\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5C5E\u6027"{0}"\u306E\u5024"{1}"\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6B63\u898F\u5316\u306B\u3088\u3063\u3066("{2}"\u306B)\u5909\u66F4\u3055\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_CONTENT_INCOMPLETE = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u4E0D\u5B8C\u5168\u3067\u3059\u3002"{1}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_CONTENT_INVALID = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F"{1}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_CONTENT_INVALID_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F"{1}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7"{2}"\u306E\u5B50\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u5C5E\u6027"{1}"\u306F\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u6301\u3061\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_DUPLICATE_ATTDEF = \u5C5E\u6027"{1}"\u306F\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u5BFE\u3057\u3066\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u3002
++        MSG_ELEMENT_ALREADY_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306F\u8907\u6570\u56DE\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
++        MSG_ELEMENT_NOT_DECLARED = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_GRAMMAR_NOT_FOUND = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u7121\u52B9\u3067\u3059: \u69CB\u6587\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
++        MSG_ELEMENT_WITH_ID_REQUIRED = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u8B58\u5225\u5B50"{0}"\u3092\u6301\u3064\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        MSG_FIXED_ATTVALUE_INVALID = \u5024"{2}"\u3092\u6301\u3064\u5C5E\u6027"{1}"\u306B\u306F\u3001"{3}"\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059\u3002
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u306F\u3001\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027"{1}"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7ID\u306E\u5C5E\u6027"{2}"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027"{1}"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059\u3002\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027"{2}"\u3092\u3082\u30461\u3064\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5C5E\u6027"{0}"\u306E\u8868\u8A18\u6CD5\u30BF\u30A4\u30D7\u30FB\u30EA\u30B9\u30C8\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5"{1}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = "{0}"\u306E\u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u3067\u53C2\u7167\u3055\u308C\u308B\u5834\u5408\u3001\u8868\u8A18\u6CD5"{1}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u3078\u306E\u53C2\u7167\u306F\u3001\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5C5E\u6027"{1}"\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u306E\u5C5E\u6027\u306F\u3001\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u5BFE\u3057\u3066\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u3001\u8981\u7D20\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u6301\u3064\u5916\u90E8\u306E\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3067\u5BA3\u8A00\u3055\u308C\u308B\u8981\u7D20\u9593\u306B\u7A7A\u767D\u306F\u4E0D\u8981\u3067\u3059\u3002
+-        NMTOKENInvalid = \u30BF\u30A4\u30D7NMTOKEN\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u3001\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        NMTOKENSInvalid = \u30BF\u30A4\u30D7NMTOKENS\u306E\u5C5E\u6027\u5024\"{0}\"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        NoNotationOnEmptyElement = EMPTY\u3068\u5BA3\u8A00\u3055\u308C\u305F\u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u3067\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027\"{1}\"\u3092\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093\u3002
+-        RootElementTypeMustMatchDoctypedecl = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EB\u30FC\u30C8\u8981\u7D20\"{1}\"\u306FDOCTYPE\u30EB\u30FC\u30C8\"{0}\"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+-        UndeclaredElementInContentSpec = \u8981\u7D20\"{0}\"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u672A\u5BA3\u8A00\u306E\u8981\u7D20\"{1}\"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+-        UniqueNotationName = \u8868\u8A18\u6CD5\"{0}\"\u306E\u5BA3\u8A00\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u540C\u3058\u540D\u524D\u3092\u8907\u6570\u306E\u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
++        NMTOKENInvalid = \u30BF\u30A4\u30D7NMTOKEN\u306E\u5C5E\u6027\u5024"{0}"\u306F\u3001\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        NMTOKENSInvalid = \u30BF\u30A4\u30D7NMTOKENS\u306E\u5C5E\u6027\u5024"{0}"\u306F\u30011\u3064\u4EE5\u4E0A\u306E\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        NoNotationOnEmptyElement = EMPTY\u3068\u5BA3\u8A00\u3055\u308C\u305F\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u3067\u306F\u3001\u30BF\u30A4\u30D7NOTATION\u306E\u5C5E\u6027"{1}"\u3092\u5BA3\u8A00\u3067\u304D\u307E\u305B\u3093\u3002
++        RootElementTypeMustMatchDoctypedecl = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EB\u30FC\u30C8\u8981\u7D20"{1}"\u306FDOCTYPE\u30EB\u30FC\u30C8"{0}"\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
++        UndeclaredElementInContentSpec = \u8981\u7D20"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3067\u672A\u5BA3\u8A00\u306E\u8981\u7D20"{1}"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002
++        UniqueNotationName = \u8868\u8A18\u6CD5"{0}"\u306E\u5BA3\u8A00\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u540C\u3058\u540D\u524D\u3092\u8907\u6570\u306E\u8868\u8A18\u6CD5\u5BA3\u8A00\u3067\u5BA3\u8A00\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype\u30D0\u30EA\u30C7\u30FC\u30BF: \u6709\u52B9\u306A\u69CB\u6587\u53C2\u7167\u306B\u3088\u308B\u521D\u671F\u5316\u30E1\u30BD\u30C3\u30C9\u306E\u547C\u51FA\u3057\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\"\u306F\u672A\u89E3\u6790\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+-        ENTITYNotValid = ENTITY \"{0}\"\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
++        ENTITYNotUnparsed = ENTITY "{0}"\u306F\u672A\u89E3\u6790\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
++        ENTITYNotValid = ENTITY "{0}"\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+         EmptyList = \u30BF\u30A4\u30D7ENTITIES\u3001IDREFS\u304A\u3088\u3073NMTOKENS\u306E\u5024\u306F\u7A7A\u306E\u30EA\u30B9\u30C8\u306B\u3067\u304D\u307E\u305B\u3093\u3002
+ 
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"&{0};\"\u306F\u3001\u5C5E\u6027\u5024\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u306F\u3001\u5C5E\u6027\u5024\u3067\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        AccessExternalDTD = \u5916\u90E8DTD: accessExternalDTD\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8DTD ''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
++        AccessExternalEntity = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: accessExternalDTD\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650\u306B\u3088\u308A''{1}''\u30A2\u30AF\u30BB\u30B9\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u5916\u90E8\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8''{0}''\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
+ 
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\"{0}\"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        ReferenceToUnparsedEntity = \u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"&{0};\"\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        RecursiveReference = \u518D\u5E30\u7684\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"{0}\"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
+-        RecursiveGeneralReference = \u518D\u5E30\u7684\u306A\u4E00\u822C\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"&{0};\"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
+-        RecursivePEReference = \u518D\u5E30\u7684\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\"%{0};\"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
++        EntityNotDeclared = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u304C\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        ReferenceToUnparsedEntity = \u672A\u89E3\u6790\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        RecursiveReference = \u518D\u5E30\u7684\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"{0}"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
++        RecursiveGeneralReference = \u518D\u5E30\u7684\u306A\u4E00\u822C\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"&{0};"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
++        RecursivePEReference = \u518D\u5E30\u7684\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u3067\u3059\u3002(\u53C2\u7167\u30D1\u30B9: {1})\u3001
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\"{0}\"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        EncodingNotSupported = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+         EncodingRequired = \u30A8\u30F3\u30B3\u30FC\u30C9\u304CUTF-8\u3068UTF-16\u306E\u3044\u305A\u308C\u3067\u3082\u306A\u3044\u89E3\u6790\u6E08\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = \u8981\u7D20\u307E\u305F\u306F\u5C5E\u6027\u304CQName\u751F\u6210\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093: QName::=(NCName':')?NCName\u3002 
+-        ElementXMLNSPrefix = \u8981\u7D20\"{0}\"\u306E\u63A5\u982D\u8F9E\u3068\u3057\u3066\"xmlns\"\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
+-        ElementPrefixUnbound = \u8981\u7D20\"{1}\"\u306E\u63A5\u982D\u8F9E\"{0}\"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        AttributePrefixUnbound = \u8981\u7D20\u30BF\u30A4\u30D7\"{0}\"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027\"{1}\"\u306E\u63A5\u982D\u8F9E\"{2}\"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+-        EmptyPrefixedAttName = \u5C5E\u6027\"{0}\"\u306E\u5024\u304C\u7121\u52B9\u3067\u3059\u3002\u63A5\u982D\u8F9E\u306E\u4ED8\u3044\u305F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093\u3002
+-        PrefixDeclared = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306E\u63A5\u982D\u8F9E\"{0}\"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        ElementXMLNSPrefix = \u8981\u7D20"{0}"\u306E\u63A5\u982D\u8F9E\u3068\u3057\u3066"xmlns"\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
++        ElementPrefixUnbound = \u8981\u7D20"{1}"\u306E\u63A5\u982D\u8F9E"{0}"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        AttributePrefixUnbound = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u5C5E\u6027"{1}"\u306E\u63A5\u982D\u8F9E"{2}"\u304C\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
++        EmptyPrefixedAttName = \u5C5E\u6027"{0}"\u306E\u5024\u304C\u7121\u52B9\u3067\u3059\u3002\u63A5\u982D\u8F9E\u306E\u4ED8\u3044\u305F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093\u3002
++        PrefixDeclared = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306E\u63A5\u982D\u8F9E"{0}"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+         CantBindXMLNS = \u63A5\u982D\u8F9E"xmlns"\u306F\u3001\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u660E\u793A\u7684\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002\u307E\u305F\u3001"xmlns"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3082\u3001\u63A5\u982D\u8F9E\u306B\u660E\u793A\u7684\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002
+         CantBindXML = \u63A5\u982D\u8F9E"xml"\u306F\u3001\u901A\u5E38\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u4EE5\u5916\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002\u307E\u305F\u3001"xml"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3082\u3001"xml"\u4EE5\u5916\u306E\u63A5\u982D\u8F9E\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3002
+-        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027\"{0}\"\u306EdefaultValue \"{1}\"\u306F\u3001\u3053\u306E\u5C5E\u6027\u30BF\u30A4\u30D7\u306E\u5B57\u53E5\u5236\u7D04\u306B\u95A2\u3057\u3066\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
++        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027"{0}"\u306EdefaultValue "{1}"\u306F\u3001\u3053\u306E\u5C5E\u6027\u30BF\u30A4\u30D7\u306E\u5B57\u53E5\u5236\u7D04\u306B\u95A2\u3057\u3066\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+ 
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +317,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
+ 
+ 
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=\u30D1\u30FC\u30B5\u30FC\u306B\u3088\u3063\u3066\u3001\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\"{0}\"\u3092\u8D85\u3048\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u62E1\u5F35\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: \u30D1\u30FC\u30B5\u30FC\u306B\u3088\u3063\u3066\u3001\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067"{0}"\u3092\u8D85\u3048\u308B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u62E1\u5F35\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306F\u3001JDK\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
++        ElementAttributeLimit=JAXP00010002: \u8981\u7D20"{0}"\u306B"{1}"\u3092\u8D85\u3048\u308B\u5C5E\u6027\u304C\u5B58\u5728\u3057\u307E\u3059\u3002"{1}"\u306F\u3001JDK\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
++        MaxEntitySizeLimit=JAXP00010003: \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u9577\u3055\u306F"{1}"\u3067\u3001"{3}"\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650"{2}"\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002
++        TotalEntitySizeLimit=JAXP00010004: \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7D2F\u7A4D\u30B5\u30A4\u30BA"{0}"\u306F\u3001"{2}"\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650"{1}"\u3092\u8D85\u3048\u307E\u3057\u305F\u3002
++        MaxXMLNameLimit=JAXP00010005: \u540D\u524D"{0}"\u306F\u3001"{2}"\u3067\u8A2D\u5B9A\u3055\u308C\u305F\u5236\u9650"{1}"\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002
+ 
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= \u8981\u7D20\"{0}\"\u306B\"{1}\"\u3092\u8D85\u3048\u308B\u5C5E\u6027\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\"{1}\"\u306F\u3001\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306B\u3088\u308B\u5236\u9650\u3067\u3059\u3002
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
- # 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.
--#  
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 +#
- # 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).
--#  
++# 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.
 +#
- # 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.
--#  
++# 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).
 +#
- # 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.
---- jdk/make/sun/javazic/tzdata/solar89	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/solar89	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
++# 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.
 +#
- # 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.
--#  
++# 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.
 +#
- # 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.
---- jdk/make/sun/javazic/tzdata/southamerica	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/southamerica	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
-@@ -474,6 +474,17 @@
- # rules...San Luis is still using "Western ARgentina Time" and it got
- # stuck on Summer daylight savings time even though the summer is over.
  
-+# From Paul Eggert (2013-09-05):
-+# Perhaps San Luis operates on the legal fiction that it is at UTC-4
-+# with perpetual summer time, but ordinary usage typically seems to
-+# just say it's at UTC-3; see, for example,
-+# .
-+# We've documented similar situations as being plain changes to
-+# standard time, so let's do that here too.  This does not change UTC
-+# offsets, only tm_isdst and the time zone abbreviations.  One minor
-+# plus is that this silences a zic complaint that there's no POSIX TZ
-+# setting for time stamps past 2038.
-+
- # From Paul Eggert (2013-02-21):
- # Milne says Cordoba time was -4:16:48.2.  Round to the nearest second.
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = \uBB38\uC11C\uC758 \uD504\uB864\uB85C\uADF8\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+         InvalidCharInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = \uBB38\uC790 \uC2DC\uD000\uC2A4 \"]]>\"\uB294 CDATA \uC139\uC158 \uB05D\uC744 \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uB294 \uACBD\uC6B0 \uCF58\uD150\uCE20\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
++        CDEndInContent = \uBB38\uC790 \uC2DC\uD000\uC2A4 "]]>"\uB294 CDATA \uC139\uC158 \uB05D\uC744 \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uB294 \uACBD\uC6B0 \uCF58\uD150\uCE20\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = CDATA \uC139\uC158\uC740 \"]]>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        CDSectUnterminated = CDATA \uC139\uC158\uC740 "]]>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = XML \uC120\uC5B8\uC740 \uBB38\uC11C \uB9E8 \uC55E\uC5D0\uB9CC \uB098\uD0C0\uB0A0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+-        EqRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 \"{0}\" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        QuoteRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C \"{0}\" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        XMLDeclUnterminated = XML \uC120\uC5B8\uC740 \"?>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        EqRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 "{0}" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
++        QuoteRequiredInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C "{0}" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        XMLDeclUnterminated = XML \uC120\uC5B8\uC740 "?>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         VersionInfoRequired = XML \uC120\uC5B8\uC5D0\uB294 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+         SpaceRequiredBeforeVersionInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 \uBC84\uC804 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+         SpaceRequiredBeforeEncodingInXMLDecl = XML \uC120\uC5B8\uC5D0\uC11C\uB294 \uC778\uCF54\uB529 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+@@ -71,70 +68,71 @@
+         ReferenceIllegalInTrailingMisc=\uD6C4\uD589 \uC139\uC158\uC5D0\uC11C\uB294 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = \uB3C5\uB9BD\uD615 \uBB38\uC11C \uC120\uC5B8 \uAC12\uC740 \"{0}\"\uC774(\uAC00) \uC544\uB2CC \"yes\" \uB610\uB294 \"no\"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
++        SDDeclInvalid = \uB3C5\uB9BD\uD615 \uBB38\uC11C \uC120\uC5B8 \uAC12\uC740 "{0}"\uC774(\uAC00) \uC544\uB2CC "yes" \uB610\uB294 "no"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
++        SDDeclNameInvalid = XML \uC120\uC5B8\uC758 \uB3C5\uB9BD\uD615 \uC774\uB984\uC758 \uCCA0\uC790\uAC00 \uC798\uBABB\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+ # 2.12 Language Identification
+-        XMLLangInvalid = xml:lang \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC5B8\uC5B4 \uC2DD\uBCC4\uC790\uC785\uB2C8\uB2E4.
++        XMLLangInvalid = xml:lang \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC5B8\uC5B4 \uC2DD\uBCC4\uC790\uC785\uB2C8\uB2E4.
+ # 3. Logical Structures
+-        ETagRequired = \uC694\uC18C \uC720\uD615 \"{0}\"\uC740(\uB294) \uC9DD\uC774 \uB9DE\uB294 \uC885\uB8CC \uD0DC\uADF8 \"\"(\uC73C)\uB85C \uC885\uB8CC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        ETagRequired = \uC694\uC18C \uC720\uD615 "{0}"\uC740(\uB294) \uC9DD\uC774 \uB9DE\uB294 \uC885\uB8CC \uD0DC\uADF8 ""(\uC73C)\uB85C \uC885\uB8CC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = \uC694\uC18C \uC720\uD615 \"{0}\" \uB2E4\uC74C\uC5D0\uB294 \uC18D\uC131 \uC0AC\uC591 \">\" \uB610\uB294 \"/>\"\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        EqRequiredInAttribute = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \uC18D\uC131 \uC774\uB984 \"{1}\" \uB2E4\uC74C\uC5D0\uB294 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        OpenQuoteExpected = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC5D0\uB294 \uC5EC\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        CloseQuoteExpected = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC5D0\uB294 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        AttributeNotUnique = \"{1}\" \uC18D\uC131\uC774 \"{0}\" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+-        AttributeNSNotUnique = \"{2}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB41C \"{1}\" \uC18D\uC131\uC774 \"{0}\" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+-        ETagUnterminated = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \uC885\uB8CC \uD0DC\uADF8\uB294 ''>'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        ElementUnterminated = \uC694\uC18C \uC720\uD615 "{0}" \uB2E4\uC74C\uC5D0\uB294 \uC18D\uC131 \uC0AC\uC591 ">" \uB610\uB294 "/>"\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
++        EqRequiredInAttribute = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C \uC18D\uC131 \uC774\uB984 "{1}" \uB2E4\uC74C\uC5D0\uB294 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
++        OpenQuoteExpected = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC5D0\uB294 \uC5EC\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
++        CloseQuoteExpected = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC5D0\uB294 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
++        AttributeNotUnique = "{1}" \uC18D\uC131\uC774 "{0}" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
++        AttributeNSNotUnique = "{2}" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB41C "{1}" \uC18D\uC131\uC774 "{0}" \uC694\uC18C\uC5D0 \uB300\uD574 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
++        ETagUnterminated = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uC885\uB8CC \uD0DC\uADF8\uB294 ''>'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         MarkupNotRecognizedInContent = \uC694\uC18C \uCF58\uD150\uCE20\uB294 \uC62C\uBC14\uB978 \uD615\uC2DD\uC758 \uBB38\uC790 \uB370\uC774\uD130 \uB610\uB294 \uB9C8\uD06C\uC5C5\uC73C\uB85C \uAD6C\uC131\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+         DoctypeIllegalInContent = \uCF58\uD150\uCE20\uC5D0\uC11C\uB294 DOCTYPE\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = \uCC38\uC870\uB294 ';' \uAD6C\uBD84\uC790\uB85C \uC885\uB8CC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = \uCC38\uC870\uB294 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0 \uC644\uC804\uD788 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        ElementEntityMismatch = \"{0}\" \uC694\uC18C\uB294 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC2DC\uC791\uB418\uACE0 \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        ElementEntityMismatch = "{0}" \uC694\uC18C\uB294 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC2DC\uC791\uB418\uACE0 \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         MarkupEntityMismatch=XML \uBB38\uC11C \uAD6C\uC870\uB294 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC2DC\uC791\uB418\uACE0 \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = \"{1}\" \uC18D\uC131\uC758 \uAC12\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{2})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC73C\uBA70 \uC694\uC18C\uAC00 \"{0}\"\uC785\uB2C8\uB2E4.
++        InvalidCharInAttValue = "{1}" \uC18D\uC131\uC758 \uAC12\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{2})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC73C\uBA70 \uC694\uC18C\uAC00 "{0}"\uC785\uB2C8\uB2E4.
+         InvalidCharInComment = \uC8FC\uC11D\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+         InvalidCharInPI = \uCC98\uB9AC \uBA85\uB839\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+         InvalidCharInInternalSubset = DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+         InvalidCharInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C \uBD80\uC801\uD569\uD55C XML \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = \"{1}\" \uC18D\uC131\uC758 \uAC12\uC740 \uC791\uC740 \uB530\uC634\uD45C \uB610\uB294 \uD070 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        LessthanInAttValue = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC758 \uAC12\uC5D0\uB294 ''<'' \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+-        AttributeValueUnterminated = \"{1}\" \uC18D\uC131\uC758 \uAC12\uC740 \uC9DD\uC774 \uB9DE\uB294 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        QuoteRequiredInAttValue = "{1}" \uC18D\uC131\uC758 \uAC12\uC740 \uC791\uC740 \uB530\uC634\uD45C \uB610\uB294 \uD070 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
++        LessthanInAttValue = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC758 \uAC12\uC5D0\uB294 ''<'' \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
++        AttributeValueUnterminated = "{1}" \uC18D\uC131\uC758 \uAC12\uC740 \uC9DD\uC774 \uB9DE\uB294 \uB530\uC634\uD45C \uBB38\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 2.5 Comments
+-        InvalidCommentStart = \uC8FC\uC11D\uC740 \"\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        InvalidCommentStart = \uC8FC\uC11D\uC740 ""\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         COMMENT_NOT_IN_ONE_ENTITY = \uC8FC\uC11D\uC774 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0 \uC548\uC5D0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+ # 2.6 Processing Instructions
+         PITargetRequired = \uCC98\uB9AC \uBA85\uB839\uC740 \uB300\uC0C1 \uC774\uB984\uC73C\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
+         SpaceRequiredInPI = \uCC98\uB9AC \uBA85\uB839 \uB300\uC0C1\uACFC \uB370\uC774\uD130 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        PIUnterminated = \uCC98\uB9AC \uBA85\uB839\uC740 \"?>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+-        ReservedPITarget = \"[xX][mM][lL]\"\uACFC \uC77C\uCE58\uD558\uB294 \uCC98\uB9AC \uBA85\uB839 \uB300\uC0C1\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        PIUnterminated = \uCC98\uB9AC \uBA85\uB839\uC740 "?>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        ReservedPITarget = "[xX][mM][lL]"\uACFC \uC77C\uCE58\uD558\uB294 \uCC98\uB9AC \uBA85\uB839 \uB300\uC0C1\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         PI_NOT_IN_ONE_ENTITY = \uCC98\uB9AC \uBA85\uB839\uC774 \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0 \uC548\uC5D0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = \"{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uBC84\uC804\uC785\uB2C8\uB2E4.
+-        VersionNotSupported = XML \uBC84\uC804 \"{0}\"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
+-        VersionNotSupported11 = XML \uBC84\uC804 \"{0}\"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0 \uBC0F XML 1.1\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
++        VersionInfoInvalid = "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uBC84\uC804\uC785\uB2C8\uB2E4.
++        VersionNotSupported = XML \uBC84\uC804 "{0}"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
++        VersionNotSupported11 = XML \uBC84\uC804 "{0}"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. XML 1.0 \uBC0F XML 1.1\uB9CC \uC9C0\uC6D0\uB429\uB2C8\uB2E4.
+         VersionMismatch= \uD558\uB098\uC758 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uC774\uD6C4 \uBC84\uC804\uC758 \uB2E4\uB978 \uC5D4\uD2F0\uD2F0\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 \"&#\" \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC2ED\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        HexdigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 \"&#x\" \uBC14\uB85C \uB2E4\uC74C\uC5D0 16\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
++        DigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 "&#" \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC2ED\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
++        HexdigitRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uC5D0\uC11C\uB294 "&#x" \uBC14\uB85C \uB2E4\uC74C\uC5D0 16\uC9C4\uC218 \uD45C\uD604\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
+         SemicolonRequiredInCharRef = \uBB38\uC790 \uCC38\uC870\uB294 ';' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+-        InvalidCharRef = \uBB38\uC790 \uCC38\uC870 \"&#{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C XML \uBB38\uC790\uC785\uB2C8\uB2E4.
++        InvalidCharRef = \uBB38\uC790 \uCC38\uC870 "&#{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C XML \uBB38\uC790\uC785\uB2C8\uB2E4.
+         NameRequiredInReference = \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC5D0\uC11C\uB294 '&' \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC5D4\uD2F0\uD2F0 \uC774\uB984\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        SemicolonRequiredInReference = \"{0}\" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB294 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        SemicolonRequiredInReference = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB294 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uB9E8 \uC55E\uC5D0\uB9CC \uB098\uD0C0\uB0A0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+-        EqRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C\uB294 \"{0}\" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        QuoteRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C \"{0}\" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        CloseQuoteMissingInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C \"{0}\" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC758 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
++        EqRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C\uB294 "{0}" \uB2E4\uC74C\uC5D0 '' = '' \uBB38\uC790\uAC00 \uC640\uC57C \uD569\uB2C8\uB2E4.
++        QuoteRequiredInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C "{0}" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC740 \uB530\uC634\uD45C\uAC00 \uBD99\uC740 \uBB38\uC790\uC5F4\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        CloseQuoteMissingInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uC11C "{0}" \uB2E4\uC74C\uC5D0 \uC624\uB294 \uAC12\uC758 \uB2EB\uB294 \uB530\uC634\uD45C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+         SpaceRequiredBeforeVersionInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \uBC84\uC804 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+         SpaceRequiredBeforeEncodingInTextDecl = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \uC778\uCF54\uB529 \uC758\uC0AC \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        TextDeclUnterminated = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 \"?>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        TextDeclUnterminated = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC740 "?>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         EncodingDeclRequired = \uD14D\uC2A4\uD2B8 \uC120\uC5B8\uC5D0\uB294 \uC778\uCF54\uB529 \uC120\uC5B8\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+         NoMorePseudoAttributes = \uC758\uC0AC \uC18D\uC131\uC740 \uB354 \uC774\uC0C1 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         MorePseudoAttributes = \uC758\uC0AC \uC18D\uC131\uC774 \uB354 \uD544\uC694\uD569\uB2C8\uB2E4.
+@@ -143,13 +141,13 @@
+         CommentNotInOneEntity = \uC8FC\uC11D\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0 \uC644\uC804\uD788 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+         PINotInOneEntity = \uCC98\uB9AC \uBA85\uB839\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uB3D9\uC77C\uD55C \uC5D4\uD2F0\uD2F0\uC5D0 \uC644\uC804\uD788 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = \"{0}\"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC778\uCF54\uB529 \uC774\uB984\uC785\uB2C8\uB2E4.
+-        EncodingByteOrderUnsupported = \"{0}\" \uC778\uCF54\uB529\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C \uBC14\uC774\uD2B8 \uC21C\uC11C\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        EncodingDeclInvalid = "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uC778\uCF54\uB529 \uC774\uB984\uC785\uB2C8\uB2E4.
++        EncodingByteOrderUnsupported = "{0}" \uC778\uCF54\uB529\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C \uBC14\uC774\uD2B8 \uC21C\uC11C\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         InvalidByte = {0}\uC740(\uB294) {1}\uBC14\uC774\uD2B8 UTF-8 \uC2DC\uD000\uC2A4\uC5D0 \uB300\uD574 \uBD80\uC801\uD569\uD55C \uBC14\uC774\uD2B8\uC785\uB2C8\uB2E4.
+         ExpectedByte = {1}\uBC14\uC774\uD2B8 UTF-8 \uC2DC\uD000\uC2A4\uC5D0 \uD544\uC694\uD55C \uBC14\uC774\uD2B8\uB294 {0}\uC785\uB2C8\uB2E4.  
+         InvalidHighSurrogate = UTF-8 \uC2DC\uD000\uC2A4\uC758 \uB192\uC740 \uB300\uB9AC \uBE44\uD2B8\uB294 0x10\uC744 \uCD08\uACFC\uD558\uC9C0 \uC54A\uC544\uC57C \uD558\uC9C0\uB9CC 0x{0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+-        OperationNotSupported = {1} \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC740 \"{0}\" \uC791\uC5C5\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        InvalidASCII = \uBC14\uC774\uD2B8 \"{0}\"\uC740(\uB294) (7\uBE44\uD2B8) ASCII \uBB38\uC790 \uC9D1\uD569\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        OperationNotSupported = {1} \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC740 "{0}" \uC791\uC5C5\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        InvalidASCII = \uBC14\uC774\uD2B8 "{0}"\uC740(\uB294) (7\uBE44\uD2B8) ASCII \uBB38\uC790 \uC9D1\uD569\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         CharConversionFailure = \uD2B9\uC815 \uC778\uCF54\uB529 \uD615\uC2DD\uC774\uC5B4\uC57C \uD558\uB294 \uAC83\uC73C\uB85C \uD655\uC778\uB41C \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uD574\uB2F9 \uC778\uCF54\uB529\uC5D0 \uBD80\uC801\uD569\uD55C \uC2DC\uD000\uC2A4\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+         
+ # DTD Messages
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = \uACF5\uC6A9 \uC2DD\uBCC4\uC790\uC5D0\uB294 \uBB38\uC790(\uC720\uB2C8\uCF54\uB4DC: 0x{0})\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         SpaceRequiredBetweenPublicAndSystem = publicId\uC640 systemId \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+-        PEReferenceWithinMarkup = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"%{0};\"\uC740 DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0 \uC788\uB294 \uB9C8\uD06C\uC5C5 \uC548\uC5D0 \uD45C\uC2DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 "''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        PEReferenceWithinMarkup = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "%{0};"\uC740 DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0 \uC788\uB294 \uB9C8\uD06C\uC5C5 \uC548\uC5D0 \uD45C\uC2DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC744 \uD3EC\uD568\uD558\uAC70\uB098 \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC774 \uAC00\uB9AC\uD0A4\uB294 \uB9C8\uD06C\uC5C5 \uC120\uC5B8\uC740 \uC62C\uBC14\uB978 \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\"\uC5D0 \uB300\uD55C \uC18D\uC131 \uC120\uC5B8\uC740 \"default\" \uBC0F \"preserve\" \uAC12\uB9CC \uAC00\uB2A5\uD55C \uC5F4\uAC70 \uC720\uD615\uC73C\uB85C \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space"\uC5D0 \uB300\uD55C \uC18D\uC131 \uC120\uC5B8\uC740 "default" \uBC0F "preserve" \uAC12\uB9CC \uAC00\uB2A5\uD55C \uC5F4\uAC70 \uC720\uD615\uC73C\uB85C \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \uC694\uC18C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \uC694\uC18C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \uC694\uC18C \uC720\uD615 "{0}" \uB2E4\uC74C\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \uC694\uC18C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 \uC694\uC18C \uC720\uD615 "{0}" \uB2E4\uC74C\uC5D0 \uC81C\uC57D \uC870\uAC74\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        ElementDeclUnterminated = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 ''('' \uBB38\uC790 \uB610\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 ''('' \uBB38\uC790 \uB610\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        MixedContentUnterminated = \uD558\uC704 \uC694\uC18C \uC720\uD615\uC774 \uC81C\uD55C\uB418\uB294 \uACBD\uC6B0 \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378 \"{0}\"\uC740(\uB294) \")*\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 \uC694\uC18C \uC720\uD615\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uC120\uC5B8\uC5D0\uB294 '')''\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MixedContentUnterminated = \uD558\uC704 \uC694\uC18C \uC720\uD615\uC774 \uC81C\uD55C\uB418\uB294 \uACBD\uC6B0 \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378 "{0}"\uC740(\uB294) ")*"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = attribute-list \uC120\uC5B8\uC5D0\uC11C\uB294 \"\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+-        IgnoreSectUnterminated = \uC81C\uC678\uB41C \uC870\uAC74\uBD80 \uC139\uC158\uC740 \"]]>\"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        IncludeSectUnterminated = \uD3EC\uD568\uB41C \uC870\uAC74\uBD80 \uC139\uC158\uC740 "]]>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        IgnoreSectUnterminated = \uC81C\uC678\uB41C \uC870\uAC74\uBD80 \uC139\uC158\uC740 "]]>"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC5D0\uC11C\uB294 '%' \uBC14\uB85C \uB2E4\uC74C\uC5D0 \uC5D4\uD2F0\uD2F0 \uC774\uB984\uC774 \uC640\uC57C \uD569\uB2C8\uB2E4.
+-        SemicolonRequiredInPEReference = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"%{0};\"\uC740 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        SemicolonRequiredInPEReference = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "%{0};"\uC740 '';'' \uAD6C\uBD84\uC790\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = \"{0}\" \uC5D4\uD2F0\uD2F0\uAC00 \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C\uB294 \uC5D4\uD2F0\uD2F0 \uC774\uB984 "{0}"\uACFC(\uC640) \uC815\uC758 \uC0AC\uC774\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uC11C\uB294 "NDATA"\uC640 \uD45C\uAE30\uBC95 \uC774\uB984 \uC0AC\uC774\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uC11C\uB294 "NDATA" \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uC11C\uB294 "NDATA" \uB2E4\uC74C\uC5D0 \uD45C\uAE30\uBC95 \uC774\uB984\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        EntityDeclUnterminated = "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++	MSG_DUPLICATE_ENTITY_DEFINITION = "{0}" \uC5D4\uD2F0\uD2F0\uAC00 \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC740 \"SYSTEM\" \uB610\uB294 \"PUBLIC\"\uC73C\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \"PUBLIC\"\uACFC \uACF5\uC6A9 \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        ExternalIDRequired = \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC740 "SYSTEM" \uB610\uB294 "PUBLIC"\uC73C\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC"\uACFC \uACF5\uC6A9 \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \uACF5\uC6A9 \uC2DD\uBCC4\uC790\uC640 \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \"SYSTEM\"\uACFC \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = \uBD80\uBD84 \uC2DD\uBCC4\uC790\uB294 \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \"{0}\"\uC758 \uC77C\uBD80\uB85C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM"\uACFC \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 \uC0AC\uC774\uC5D0\uB294 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = \uBD80\uBD84 \uC2DD\uBCC4\uC790\uB294 \uC2DC\uC2A4\uD15C \uC2DD\uBCC4\uC790 "{0}"\uC758 \uC77C\uBD80\uB85C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C\uB294 \"''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C\uB294 \uD45C\uAE30\uBC95 \uC774\uB984 "{0}" \uB2E4\uC74C\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
++        ExternalIDorPublicIDRequired = "{0}" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC5D0\uB294 \uC2DC\uC2A4\uD15C \uB610\uB294 \uACF5\uC6A9 \uC2DD\uBCC4\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        NotationDeclUnterminated = "{0}" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = \uC694\uC18C \uC720\uD615 \"{1}\"\uC774(\uAC00) \uC694\uC18C \uC120\uC5B8 \"{0}\"\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+-        ENTITIESInvalid = ENTITIES \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{1}\"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uD558\uB098 \uC774\uC0C1\uC758 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        ENTITYInvalid = ENTITY \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{1}\"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        IDDefaultTypeInvalid = ID \uC18D\uC131 \"{0}\"\uC758 \uC120\uC5B8\uB41C \uAE30\uBCF8\uAC12\uC740 \"#IMPLIED\" \uB610\uB294 \"#REQUIRED\"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+-        IDInvalid = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        IDInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        IDNotUnique = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uBB38\uC11C \uB0B4\uC5D0\uC11C \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        IDREFInvalid = IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        IDREFInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        IDREFSInvalid = IDREFS \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uAC00 \uC804\uCCB4 \uC120\uC5B8\uC73C\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        ImproperDeclarationNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        ImproperGroupNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uAD04\uD638 \uC30D\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        INVALID_PE_IN_CONDITIONAL = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC804\uCCB4 \uC870\uAC74\uBD80 \uC139\uC158\uC774 \uD3EC\uD568\uB418\uAC70\uB098 INCLUDE \uB610\uB294 IGNORE\uB9CC \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_ATTRIBUTE_NOT_DECLARED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \"{1}\" \uC18D\uC131\uC744 \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \uAC12\uC774 \"{1}\"\uC778 \"{0}\" \uC18D\uC131\uC5D0\uB294 \"{2}\" \uBAA9\uB85D\uC758 \uAC12\uC774 \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \"{0}\" \uC18D\uC131\uC758 \"{1}\" \uAC12\uC740 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C \uC815\uADDC\uD654\uC5D0 \uC758\uD574 \"{2}\"(\uC73C)\uB85C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_CONTENT_INCOMPLETE = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uCF58\uD150\uCE20\uAC00 \uBD88\uC644\uC804\uD569\uB2C8\uB2E4. \uD574\uB2F9 \uCF58\uD150\uCE20\uB294 \"{1}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_CONTENT_INVALID = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uCF58\uD150\uCE20\uB294 \"{1}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_CONTENT_INVALID_SPECIFIED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC758 \uCF58\uD150\uCE20\uB294 \"{1}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. \"{2}\" \uC720\uD615\uC758 \uD558\uC704 \uD56D\uBAA9\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \"{1}\" \uC18D\uC131\uC5D0 \uAE30\uBCF8\uAC12\uC774 \uC788\uC73C\uBA70 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_DUPLICATE_ATTDEF = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD55C \"{1}\" \uC18D\uC131\uC774 \uC774\uBBF8 \uC120\uC5B8\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
+-        MSG_ELEMENT_ALREADY_DECLARED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC740(\uB294) \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_ELEMENT_NOT_DECLARED = \uC694\uC18C \uC720\uD615 \"{0}\"\uC744(\uB97C) \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
++        DuplicateTypeInMixedContent = \uC694\uC18C \uC720\uD615 "{1}"\uC774(\uAC00) \uC694\uC18C \uC120\uC5B8 "{0}"\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0 \uC774\uBBF8 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
++        ENTITIESInvalid = ENTITIES \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{1}"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uD558\uB098 \uC774\uC0C1\uC758 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        ENTITYInvalid = ENTITY \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{1}"\uC740(\uB294) \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        IDDefaultTypeInvalid = ID \uC18D\uC131 "{0}"\uC758 \uC120\uC5B8\uB41C \uAE30\uBCF8\uAC12\uC740 "#IMPLIED" \uB610\uB294 "#REQUIRED"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
++        IDInvalid = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        IDInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        IDNotUnique = ID \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uBB38\uC11C \uB0B4\uC5D0\uC11C \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4.
++        IDREFInvalid = IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        IDREFInvalidWithNamespaces = \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 IDREF \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        IDREFSInvalid = IDREFS \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uAC00 \uC804\uCCB4 \uC120\uC5B8\uC73C\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        ImproperDeclarationNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        ImproperGroupNesting = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC81C\uB300\uB85C \uC911\uCCA9\uB41C \uAD04\uD638 \uC30D\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        INVALID_PE_IN_CONDITIONAL = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "{0}"\uC758 \uB300\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0\uB294 \uC804\uCCB4 \uC870\uAC74\uBD80 \uC139\uC158\uC774 \uD3EC\uD568\uB418\uAC70\uB098 INCLUDE \uB610\uB294 IGNORE\uB9CC \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_ATTRIBUTE_NOT_DECLARED = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C "{1}" \uC18D\uC131\uC744 \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \uAC12\uC774 "{1}"\uC778 "{0}" \uC18D\uC131\uC5D0\uB294 "{2}" \uBAA9\uB85D\uC758 \uAC12\uC774 \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = "{0}" \uC18D\uC131\uC758 "{1}" \uAC12\uC740 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C \uC815\uADDC\uD654\uC5D0 \uC758\uD574 "{2}"(\uC73C)\uB85C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
++        MSG_CONTENT_INCOMPLETE = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uCF58\uD150\uCE20\uAC00 \uBD88\uC644\uC804\uD569\uB2C8\uB2E4. \uD574\uB2F9 \uCF58\uD150\uCE20\uB294 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
++        MSG_CONTENT_INVALID = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uCF58\uD150\uCE20\uB294 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
++        MSG_CONTENT_INVALID_SPECIFIED = \uC694\uC18C \uC720\uD615 "{0}"\uC758 \uCF58\uD150\uCE20\uB294 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. "{2}" \uC720\uD615\uC758 \uD558\uC704 \uD56D\uBAA9\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C "{1}" \uC18D\uC131\uC5D0 \uAE30\uBCF8\uAC12\uC774 \uC788\uC73C\uBA70 \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_DUPLICATE_ATTDEF = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C "{1}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC120\uC5B8\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
++        MSG_ELEMENT_ALREADY_DECLARED = \uC694\uC18C \uC720\uD615 "{0}"\uC740(\uB294) \uB450 \uBC88 \uC774\uC0C1 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
++        MSG_ELEMENT_NOT_DECLARED = \uC694\uC18C \uC720\uD615 "{0}"\uC744(\uB97C) \uC120\uC5B8\uD574\uC57C \uD569\uB2C8\uB2E4.
+         MSG_GRAMMAR_NOT_FOUND = \uBB38\uC11C\uAC00 \uBD80\uC801\uD569\uD568: \uBB38\uBC95\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = \uC2DD\uBCC4\uC790\uAC00 \"{0}\"\uC778 \uC694\uC18C\uAC00 \uBB38\uC11C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        MSG_FIXED_ATTVALUE_INVALID = \uAC12\uC774 \"{2}\"\uC778 \"{1}\" \uC18D\uC131\uC758 \uAC12\uC740 \"{3}\"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 ID \uC720\uD615\uC758 \"{1}\" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C ID \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 \"{2}\"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 NOTATION \uC720\uD615\uC758 \"{1}\" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C NOTATION \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 \"{2}\"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \"{1}\" \uD45C\uAE30\uBC95\uC740 \"{0}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uD45C\uAE30\uBC95 \uC720\uD615 \uBAA9\uB85D\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \"{1}\" \uD45C\uAE30\uBC95\uC740 \"{0}\"\uC5D0 \uB300\uD574 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC120\uC5B8\uB41C \"{0}\" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \"{1}\" \uC18D\uC131\uC774 \uD544\uC694\uD558\uBA70 \uC694\uC18C \uC720\uD615 \"{0}\"\uC5D0 \uB300\uD574 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_ELEMENT_WITH_ID_REQUIRED = \uC2DD\uBCC4\uC790\uAC00 "{0}"\uC778 \uC694\uC18C\uAC00 \uBB38\uC11C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 "{0}"\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        MSG_FIXED_ATTVALUE_INVALID = \uAC12\uC774 "{2}"\uC778 "{1}" \uC18D\uC131\uC758 \uAC12\uC740 "{3}"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 ID \uC720\uD615\uC758 "{1}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C ID \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 "{2}"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 NOTATION \uC720\uD615\uC758 "{1}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC73C\uBBC0\uB85C NOTATION \uC720\uD615\uC758 \uB450\uBC88\uC9F8 \uC18D\uC131 "{2}"\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = "{1}" \uD45C\uAE30\uBC95\uC740 "{0}" \uC18D\uC131\uC5D0 \uB300\uD55C \uD45C\uAE30\uBC95 \uC720\uD615 \uBAA9\uB85D\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = "{1}" \uD45C\uAE30\uBC95\uC740 "{0}"\uC5D0 \uB300\uD574 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC5D0\uC11C \uCC38\uC870\uB418\uB294 \uACBD\uC6B0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC120\uC5B8\uB41C "{0}" \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = "{1}" \uC18D\uC131\uC774 \uD544\uC694\uD558\uBA70 \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD574 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \uB3C5\uB9BD\uD615 \uBB38\uC11C\uC5D0\uC11C\uB294 \uC694\uC18C \uCF58\uD150\uCE20\uB97C \uAC00\uC9C0\uBA70 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC678\uBD80 \uC5D4\uD2F0\uD2F0\uC5D0\uC11C \uC120\uC5B8\uB41C \uC694\uC18C \uC0AC\uC774\uC5D0 \uACF5\uBC31\uC774 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        NMTOKENInvalid = NMTOKEN \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        NMTOKENSInvalid = NMTOKENS \uC720\uD615\uC758 \uC18D\uC131\uAC12 \"{0}\"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+-        NoNotationOnEmptyElement = EMPTY\uB85C \uC120\uC5B8\uB41C \uC694\uC18C \uC720\uD615 \"{0}\"\uC740(\uB294) NOTATION \uC720\uD615\uC758 \"{1}\" \uC18D\uC131\uC744 \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+-        RootElementTypeMustMatchDoctypedecl = \uBB38\uC11C \uB8E8\uD2B8 \uC694\uC18C \"{1}\"\uC740(\uB294) DOCTYPE \uB8E8\uD2B8 \"{0}\"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
+-        UndeclaredElementInContentSpec = \"{0}\" \uC694\uC18C\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C \"{1}\"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4.
+-        UniqueNotationName = \"{0}\" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC774 \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC81C\uACF5\uB41C \uC774\uB984\uC740 \uB450 \uAC1C \uC774\uC0C1\uC758 \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
++        NMTOKENInvalid = NMTOKEN \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        NMTOKENSInvalid = NMTOKENS \uC720\uD615\uC758 \uC18D\uC131\uAC12 "{0}"\uC740(\uB294) \uD558\uB098 \uC774\uC0C1\uC758 \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
++        NoNotationOnEmptyElement = EMPTY\uB85C \uC120\uC5B8\uB41C \uC694\uC18C \uC720\uD615 "{0}"\uC740(\uB294) NOTATION \uC720\uD615\uC758 "{1}" \uC18D\uC131\uC744 \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
++        RootElementTypeMustMatchDoctypedecl = \uBB38\uC11C \uB8E8\uD2B8 \uC694\uC18C "{1}"\uC740(\uB294) DOCTYPE \uB8E8\uD2B8 "{0}"\uACFC(\uC640) \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
++        UndeclaredElementInContentSpec = "{0}" \uC694\uC18C\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C "{1}"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4.
++        UniqueNotationName = "{0}" \uD45C\uAE30\uBC95\uC5D0 \uB300\uD55C \uC120\uC5B8\uC774 \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC81C\uACF5\uB41C \uC774\uB984\uC740 \uB450 \uAC1C \uC774\uC0C1\uC758 \uD45C\uAE30\uBC95 \uC120\uC5B8\uC5D0\uC11C \uC120\uC5B8\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype \uAC80\uC99D\uAE30: \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC801\uD569\uD55C \uBB38\uBC95 \uCC38\uC870\uB85C \uCD08\uAE30\uD654 \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD574\uC57C \uD569\uB2C8\uB2E4. \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\"\uC758 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+-        ENTITYNotValid = ENTITY \"{0}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
++        ENTITYNotUnparsed = ENTITY "{0}"\uC758 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
++        ENTITYNotValid = ENTITY "{0}"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+         EmptyList = ENTITIES, IDREFS \uBC0F NMTOKENS \uC720\uD615\uC758 \uAC12\uC740 \uBE48 \uBAA9\uB85D\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
  
-@@ -611,7 +622,7 @@
- # San Luis (SL)
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = \uC18D\uC131\uAC12\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"&{0};\"\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = \uC18D\uC131\uAC12\uC5D0\uC11C\uB294 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "&{0};"\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        AccessExternalDTD = \uC678\uBD80 DTD: accessExternalDTD \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC678\uBD80 DTD ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
++        AccessExternalEntity = \uC678\uBD80 \uC5D4\uD2F0\uD2F0: accessExternalDTD \uC18D\uC131\uC73C\uB85C \uC124\uC815\uB41C \uC81C\uD55C\uC73C\uB85C \uC778\uD574 ''{1}'' \uC561\uC138\uC2A4\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC678\uBD80 \uBB38\uC11C ''{0}'' \uC77D\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
  
- Rule	SanLuis	2008	2009	-	Mar	Sun>=8	0:00	0	-
--Rule	SanLuis	2007	2009	-	Oct	Sun>=8	0:00	1:00	S
-+Rule	SanLuis	2007	2008	-	Oct	Sun>=8	0:00	1:00	S
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = \"{0}\" \uC5D4\uD2F0\uD2F0\uAC00 \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+-        ReferenceToUnparsedEntity = \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \"&{0};\"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+-        RecursiveReference = \"{0}\"\uC740(\uB294) \uC21C\uD658 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
+-        RecursiveGeneralReference = \"&{0};\"\uC740 \uC21C\uD658 \uC77C\uBC18 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
+-        RecursivePEReference = \"%{0};\"\uC740 \uC21C\uD658 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
++        EntityNotDeclared = "{0}" \uC5D4\uD2F0\uD2F0\uAC00 \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
++        ReferenceToUnparsedEntity = \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "&{0};"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        RecursiveReference = "{0}"\uC740(\uB294) \uC21C\uD658 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
++        RecursiveGeneralReference = "&{0};"\uC740 \uC21C\uD658 \uC77C\uBC18 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
++        RecursivePEReference = "%{0};"\uC740 \uC21C\uD658 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uC785\uB2C8\uB2E4(\uCC38\uC870 \uACBD\uB85C: {1}).
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = \"{0}\" \uC778\uCF54\uB529\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
++        EncodingNotSupported = "{0}" \uC778\uCF54\uB529\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+         EncodingRequired = UTF-8 \uB610\uB294 UTF-16\uC73C\uB85C \uC778\uCF54\uB529\uB418\uC9C0 \uC54A\uC740 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB41C \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uC778\uCF54\uB529 \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = \uC694\uC18C \uB610\uB294 \uC18D\uC131\uC774 QName \uC791\uC131\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC74C: QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = \"{0}\" \uC694\uC18C\uC5D0\uB294 \"xmlns\"\uAC00 \uC811\uB450\uC5B4\uB85C \uC0AC\uC6A9\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+-        ElementPrefixUnbound = \"{1}\" \uC694\uC18C\uC5D0 \uB300\uD55C \"{0}\" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+-        AttributePrefixUnbound = \uC694\uC18C \uC720\uD615 \"{0}\"\uACFC(\uC640) \uC5F0\uAD00\uB41C \"{1}\" \uC18D\uC131\uC758 \"{2}\" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+-        EmptyPrefixedAttName = \"{0}\" \uC18D\uC131\uC758 \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC811\uB450\uC5B4\uAC00 \uC9C0\uC815\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uBC14\uC778\uB529\uC740 \uBE44\uC6CC \uB458 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+-        PrefixDeclared = \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 \"{0}\"\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
++        ElementXMLNSPrefix = "{0}" \uC694\uC18C\uC5D0\uB294 "xmlns"\uAC00 \uC811\uB450\uC5B4\uB85C \uC0AC\uC6A9\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
++        ElementPrefixUnbound = "{1}" \uC694\uC18C\uC5D0 \uB300\uD55C "{0}" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
++        AttributePrefixUnbound = \uC694\uC18C \uC720\uD615 "{0}"\uACFC(\uC640) \uC5F0\uAD00\uB41C "{1}" \uC18D\uC131\uC758 "{2}" \uC811\uB450\uC5B4\uAC00 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
++        EmptyPrefixedAttName = "{0}" \uC18D\uC131\uC758 \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uC811\uB450\uC5B4\uAC00 \uC9C0\uC815\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uBC14\uC778\uB529\uC740 \uBE44\uC6CC \uB458 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
++        PrefixDeclared = \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 "{0}"\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+         CantBindXMLNS = "xmlns" \uC811\uB450\uC5B4\uB294 \uBA85\uC2DC\uC801\uC73C\uB85C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "xmlns"\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB3C4 \uBA85\uC2DC\uC801\uC73C\uB85C \uC811\uB450\uC5B4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+         CantBindXML = "xml" \uC811\uB450\uC5B4\uB294 \uC77C\uBC18 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC544\uB2CC \uB2E4\uB978 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "xml"\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB3C4 "xml" \uC774\uC678\uC758 \uC811\uB450\uC5B4\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+-        MSG_ATT_DEFAULT_INVALID = \"{0}\" \uC18D\uC131\uC758 defaultValue \"{1}\"\uC740(\uB294) \uC774 \uC18D\uC131 \uC720\uD615\uC758 \uB809\uC2DC\uCE7C \uC81C\uC57D \uC870\uAC74\uC5D0 \uB300\uD55C \uAC12\uC73C\uB85C \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
++        MSG_ATT_DEFAULT_INVALID = "{0}" \uC18D\uC131\uC758 defaultValue "{1}"\uC740(\uB294) \uC774 \uC18D\uC131 \uC720\uD615\uC758 \uB809\uC2DC\uCE7C \uC81C\uC57D \uC870\uAC74\uC5D0 \uB300\uD55C \uAC12\uC73C\uB85C \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
  
- Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
- 			-4:16:48 -	CMT	1920 May
-@@ -627,7 +638,8 @@
- 			-3:00	-	ART	2004 May 31
- 			-4:00	-	WART	2004 Jul 25
- 			-3:00	Arg	AR%sT	2008 Jan 21
--			-4:00	SanLuis	WAR%sT
-+			-4:00	SanLuis	WAR%sT	2009 Oct 11
-+			-3:00	-	ART
- #
- # Santa Cruz (SC)
- Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
-@@ -654,10 +666,7 @@
- 			-3:00	-	ART
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
  
- # Aruba
--# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
--Zone	America/Aruba	-4:40:24 -	LMT	1912 Feb 12	# Oranjestad
--			-4:30	-	ANT	1965 # Netherlands Antilles Time
--			-4:00	-	AST
-+Link America/Curacao America/Aruba
  
- # Bolivia
- # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
-@@ -859,6 +868,21 @@
- # Tocantins state will have DST.
- # http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=\uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C \"{0}\"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
++        ElementAttributeLimit=JAXP00010002:  "{0}" \uC694\uC18C\uC5D0 "{1}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
++        MaxEntitySizeLimit=JAXP00010003: "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uAE38\uC774\uAC00 "{3}"\uC5D0\uC11C \uC124\uC815\uB41C "{2}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{1}"\uC785\uB2C8\uB2E4.
++        TotalEntitySizeLimit=JAXP00010004: \uC5D4\uD2F0\uD2F0\uC758 \uB204\uC801 \uD06C\uAE30 "{0}"\uC774(\uAC00) "{2}"\uC5D0\uC11C \uC124\uC815\uB41C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.
++        MaxXMLNameLimit=JAXP00010005: "{0}" \uC774\uB984\uC774 "{2}"\uC5D0\uC11C \uC124\uC815\uB41C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.
  
-+# From Steffen Thorsen (2013-09-20):
-+# Tocantins in Brazil is very likely not to observe DST from October....
-+# http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
-+# We will keep this article updated when this is confirmed:
-+# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
-+
-+# From Steffen Thorsen (2013-10-17):
-+# http://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html
-+# Senator Jorge Viana announced that Acre will change time zone on November 10.
-+# He did not specify the time of the change, nor if western parts of Amazonas
-+# will change as well.
-+#
-+# From Paul Eggert (2013-10-17):
-+# For now, assume western Amazonas will change as well.
-+
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- # Decree 20,466 (1931-10-01)
- # Decree 21,896 (1932-01-10)
-@@ -1078,7 +1102,8 @@
- 			-3:00	-	BRT	1995 Sep 14
- 			-3:00	Brazil	BR%sT	2003 Sep 24
- 			-3:00	-	BRT	2012 Oct 21
--			-3:00	Brazil	BR%sT
-+			-3:00	Brazil	BR%sT	2013 Sep
-+			-3:00	-	BRT
- #
- # Alagoas (AL), Sergipe (SE)
- Zone America/Maceio	-2:22:52 -	LMT	1914
-@@ -1146,13 +1171,15 @@
- 			-5:00	-	ACT	1993 Sep 28
- 			-5:00	Brazil	AC%sT	1994 Sep 22
- 			-5:00	-	ACT	2008 Jun 24 00:00
--			-4:00	-	AMT
-+			-4:00	-	AMT	2013 Nov 10
-+			-5:00	-	ACT
- #
- # Acre (AC)
- Zone America/Rio_Branco	-4:31:12 -	LMT	1914
- 			-5:00	Brazil	AC%sT	1988 Sep 12
- 			-5:00	-	ACT	2008 Jun 24 00:00
--			-4:00	-	AMT
-+			-4:00	-	AMT	2013 Nov 10
-+			-5:00	-	ACT
- 
- # Chile
- 
-@@ -1373,12 +1400,12 @@
- 			-4:00	-	AST
- 
- # From Arthur David Olson (2011-06-15):
--# At least for now, use links for places with new iso3166 codes.
-+# use links for places with new iso3166 codes.
- # The name "Lower Prince's Quarter" is both longer than fourteen charaters
- # and contains an apostrophe; use "Lower_Princes" below.
- 
--Link	America/Curacao	America/Lower_Princes # Sint Maarten
--Link	America/Curacao	America/Kralendijk # Bonaire, Sint Estatius and Saba
-+Link	America/Curacao	America/Lower_Princes	# Sint Maarten
-+Link	America/Curacao	America/Kralendijk	# Caribbean Netherlands
- 
- # Ecuador
- #
-@@ -1519,10 +1546,16 @@
- 			-4:00	-	GYT
- 
- # Paraguay
-+#
- # From Paul Eggert (2006-03-22):
- # Shanks & Pottenger say that spring transitions are from 01:00 -> 02:00,
- # and autumn transitions are from 00:00 -> 23:00.  Go with pre-1999
- # editions of Shanks, and with the IATA, who say transitions occur at 00:00.
-+#
-+# From Waldemar Villamayor-Venialbo (2013-09-20):
-+# No time of the day is established for the adjustment, so people normally
-+# adjust their clocks at 0 hour of the given dates.
-+#
- # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
- Rule	Para	1975	1988	-	Oct	 1	0:00	1:00	S
- Rule	Para	1975	1978	-	Mar	 1	0:00	0	-
-@@ -1656,6 +1689,19 @@
- Zone America/Port_of_Spain -4:06:04 -	LMT	1912 Mar 2
- 			-4:00	-	AST
- 
-+Link America/Port_of_Spain America/Anguilla
-+Link America/Port_of_Spain America/Dominica
-+Link America/Port_of_Spain America/Grenada
-+Link America/Port_of_Spain America/Guadeloupe
-+Link America/Port_of_Spain America/Marigot
-+Link America/Port_of_Spain America/Montserrat
-+Link America/Port_of_Spain America/St_Barthelemy
-+Link America/Port_of_Spain America/St_Kitts
-+Link America/Port_of_Spain America/St_Lucia
-+Link America/Port_of_Spain America/St_Thomas
-+Link America/Port_of_Spain America/St_Vincent
-+Link America/Port_of_Spain America/Tortola
-+
- # Uruguay
- # From Paul Eggert (1993-11-18):
- # Uruguay wins the prize for the strangest peacetime manipulation of the rules.
-@@ -1673,7 +1719,7 @@
- # Whitman gives 1937 Oct 3; go with Shanks & Pottenger.
- Rule	Uruguay	1937	1940	-	Oct	lastSun	 0:00	0:30	HS
- # Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13,
--# and 1943 Apr 13 ``to present time''; go with Shanks & Pottenger.
-+# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger.
- Rule	Uruguay	1941	only	-	Aug	 1	 0:00	0:30	HS
- Rule	Uruguay	1942	only	-	Jan	 1	 0:00	0	-
- Rule	Uruguay	1942	only	-	Dec	14	 0:00	1:00	S
---- jdk/make/sun/javazic/tzdata/systemv	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/systemv	2014-04-20 12:39:22.000000000 -0700
-@@ -1,22 +1,22 @@
- #
- # 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.
--#  
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= \"{0}\" \uC694\uC18C\uC5D0 \"{1}\"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. \"{1}\"\uC740(\uB294) \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
- # 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.
---- jdk/make/sun/javazic/tzdata/zone.tab	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/javazic/tzdata/zone.tab	2014-04-20 12:39:22.000000000 -0700
-@@ -1,53 +1,55 @@
- #
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--#  
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# 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 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).
--#  
++# 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.
--#  
++# 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.
- #
--# 
-+# TZ zone descriptions
++# 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.
 +#
- # This file is in the public domain, so clarified as of
- # 2009-05-17 by Arthur David Olson.
- #
--# TZ zone descriptions
-+# From Paul Eggert (2013-08-14):
- #
--# From Paul Eggert (2013-05-27):
-+# This file contains a table where each row stands for an area that is
-+# the intersection of a region identified by a country code and of a
-+# zone where civil clocks have agreed since 1970.  The columns of the
-+# table are as follows:
- #
--# This file contains a table with the following columns:
--# 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
--#     This identifies a country that overlaps the zone.  The country may
--#     overlap other zones and the zone may overlap other countries.
--# 2.  Latitude and longitude of the zone's principal location
-+# 1.  ISO 3166 2-character country code.  See the file 'iso3166.tab'.
-+# 2.  Latitude and longitude of the area's principal location
- #     in ISO 6709 sign-degrees-minutes-seconds format,
- #     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
- #     first latitude (+ is north), then longitude (+ is east).
--#     This location need not lie within the column-1 country.
- # 3.  Zone name used in value of TZ environment variable.
- #     Please see the 'Theory' file for how zone names are chosen.
-+#     If multiple zones overlap a country, each has a row in the
-+#     table, with column 1 being duplicated.
- # 4.  Comments; present if and only if the country has multiple rows.
- #
- # Columns are separated by a single tab.
- # The table is sorted first by country, then an order within the country that
- # (1) makes some geographical sense, and
--# (2) puts the most populous zones first, where that does not contradict (1).
-+# (2) puts the most populous areas first, where that does not contradict (1).
- #
--# Lines beginning with `#' are comments.
-+# Lines beginning with '#' are comments.
- #
- # This table is intended as an aid for users, to help them select time
- # zone data appropriate for their practical needs.  It is not intended
-@@ -63,8 +65,7 @@
- AL	+4120+01950	Europe/Tirane
- AM	+4011+04430	Asia/Yerevan
- AO	-0848+01314	Africa/Luanda
--AQ	-7750+16636	Antarctica/McMurdo	McMurdo Station, Ross Island
--AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
-+AQ	-7750+16636	Antarctica/McMurdo	McMurdo, South Pole, Scott (New Zealand time)
- AQ	-6734-06808	Antarctica/Rothera	Rothera Station, Adelaide Island
- AQ	-6448-06406	Antarctica/Palmer	Palmer Station, Anvers Island
- AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
-@@ -144,8 +145,7 @@
- CA	+4606-06447	America/Moncton	Atlantic Time - New Brunswick
- CA	+5320-06025	America/Goose_Bay	Atlantic Time - Labrador - most locations
- CA	+5125-05707	America/Blanc-Sablon	Atlantic Standard Time - Quebec - Lower North Shore
--CA	+4531-07334	America/Montreal	Eastern Time - Quebec - most locations
--CA	+4339-07923	America/Toronto	Eastern Time - Ontario - most locations
-+CA	+4339-07923	America/Toronto	Eastern Time - Ontario & Quebec - most locations
- CA	+4901-08816	America/Nipigon	Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
- CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
- CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
-@@ -256,7 +256,7 @@
- IS	+6409-02151	Atlantic/Reykjavik
- IT	+4154+01229	Europe/Rome
- JE	+4912-00207	Europe/Jersey
--JM	+1800-07648	America/Jamaica
-+JM	+175805-0764736	America/Jamaica
- JO	+3157+03556	Asia/Amman
- JP	+353916+1394441	Asia/Tokyo
- KE	-0117+03649	Africa/Nairobi
-@@ -445,8 +445,7 @@
- US	+471551-1014640	America/North_Dakota/Beulah	Central Time - North Dakota - Mercer County
- US	+394421-1045903	America/Denver	Mountain Time
- US	+433649-1161209	America/Boise	Mountain Time - south Idaho & east Oregon
--US	+364708-1084111	America/Shiprock	Mountain Time - Navajo
--US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona
-+US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona (except Navajo)
- US	+340308-1181434	America/Los_Angeles	Pacific Time
- US	+611305-1495401	America/Anchorage	Alaska Time
- US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
---- jdk/make/sun/jawt/Makefile	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/jawt/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -99,8 +99,7 @@
- #
- # Other extra flags needed for compiling.
- #
--CPPFLAGS += -I$(OPENWIN_HOME)/include \
--	    -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-+CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-             -I$(SHARE_SRC)/native/$(PKGDIR)/image \
- 	    -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
- 	    -I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \
-@@ -114,6 +113,7 @@
- 	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
- 	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
-             -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
-+            -I$(OPENWIN_HOME)/include \
- 	    $(EVENT_MODEL)
- 
- #
-@@ -127,7 +127,7 @@
-   endif
- endif # PLATFORM
- 
--ifeq ($(PLATFORM), linux)
-+ifneq (,$(findstring $(PLATFORM), linux bsd))
-   ifndef BUILD_HEADLESS_ONLY
-     OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
-   else
---- jdk/make/sun/net/FILES_java.gmk	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/net/FILES_java.gmk	2014-04-20 12:39:22.000000000 -0700
-@@ -24,122 +24,123 @@
- #
- 
- FILES_java = \
--	sun/net/InetAddressCachePolicy.java \
--	sun/net/URLCanonicalizer.java \
--	sun/net/NetworkClient.java \
--	sun/net/NetworkServer.java \
--	sun/net/ProgressMonitor.java \
--	sun/net/ProgressSource.java \
--	sun/net/ProgressEvent.java \
--	sun/net/ProgressListener.java \
--	sun/net/ProgressMeteringPolicy.java \
--	sun/net/SocksProxy.java \
--	sun/net/ResourceManager.java \
--	sun/net/TelnetInputStream.java \
--	sun/net/TelnetOutputStream.java \
--	sun/net/TelnetProtocolException.java \
--	sun/net/TransferProtocolClient.java \
--	sun/net/ConnectionResetException.java \
--	sun/net/NetProperties.java \
--	sun/net/NetHooks.java \
--	sun/net/util/IPAddressUtil.java \
--	sun/net/util/URLUtil.java \
--	sun/net/dns/ResolverConfiguration.java \
--	sun/net/dns/ResolverConfigurationImpl.java \
--	sun/net/ftp/FtpClient.java \
--	sun/net/ftp/FtpClientProvider.java \
--	sun/net/ftp/FtpDirEntry.java \
--	sun/net/ftp/FtpReplyCode.java \
--	sun/net/ftp/FtpDirParser.java \
--	sun/net/ftp/FtpLoginException.java \
--	sun/net/ftp/FtpProtocolException.java \
--	sun/net/ftp/impl/FtpClient.java \
--	sun/net/ftp/impl/DefaultFtpClientProvider.java \
--	sun/net/sdp/SdpSupport.java \
--	sun/net/spi/DefaultProxySelector.java \
--	sun/net/spi/nameservice/NameServiceDescriptor.java \
--	sun/net/spi/nameservice/NameService.java \
--	sun/net/smtp/SmtpClient.java \
--	sun/net/smtp/SmtpProtocolException.java \
--	sun/net/www/content/text/Generic.java \
--	sun/net/www/content/text/plain.java \
--	sun/net/www/content/text/PlainTextInputStream.java \
--	sun/net/www/MessageHeader.java \
--	sun/net/www/HeaderParser.java \
--	sun/net/www/MeteredStream.java \
--	sun/net/www/MimeEntry.java \
--	sun/net/www/MimeLauncher.java \
--	sun/net/www/ApplicationLaunchException.java \
--	sun/net/www/MimeTable.java \
--	sun/net/www/URLConnection.java \
--	sun/net/www/ParseUtil.java \
--	sun/net/www/protocol/file/Handler.java \
--	sun/net/www/protocol/file/FileURLConnection.java \
--	sun/net/www/http/HttpClient.java \
--	sun/net/www/http/HttpCapture.java \
--	sun/net/www/http/HttpCaptureInputStream.java \
--	sun/net/www/http/HttpCaptureOutputStream.java \
--	sun/net/www/http/PosterOutputStream.java \
--	sun/net/www/http/ChunkedInputStream.java \
--	sun/net/www/http/ChunkedOutputStream.java \
--	sun/net/www/http/KeepAliveCache.java \
--	sun/net/www/http/KeepAliveStream.java \
--	sun/net/www/http/KeepAliveStreamCleaner.java \
--	sun/net/www/http/Hurryable.java \
--	sun/net/www/protocol/http/Handler.java \
--	sun/net/www/protocol/http/HttpURLConnection.java \
--	sun/net/www/protocol/http/HttpAuthenticator.java \
--	sun/net/www/protocol/http/AuthenticationHeader.java \
--	sun/net/www/protocol/http/AuthenticationInfo.java \
--	sun/net/www/protocol/http/AuthCache.java \
--	sun/net/www/protocol/http/AuthCacheImpl.java \
--	sun/net/www/protocol/http/AuthCacheValue.java \
--	sun/net/www/protocol/http/AuthScheme.java \
--	sun/net/www/protocol/http/BasicAuthentication.java \
--	sun/net/www/protocol/http/DigestAuthentication.java \
--	sun/net/www/protocol/http/NTLMAuthenticationProxy.java \
--	sun/net/www/protocol/http/NegotiateAuthentication.java \
--	sun/net/www/protocol/http/Negotiator.java \
--	sun/net/www/protocol/http/ntlm/NTLMAuthentication.java \
--	sun/net/www/protocol/http/ntlm/NTLMAuthenticationCallback.java \
--	sun/net/www/protocol/http/spnego/NegotiatorImpl.java \
--	sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java \
--	sun/net/www/protocol/http/logging/HttpLogFormatter.java \
--	sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java \
--	sun/net/www/protocol/https/HttpsClient.java \
--	sun/net/www/protocol/https/DefaultHostnameVerifier.java \
--	sun/net/www/protocol/https/HttpsURLConnectionImpl.java \
--	sun/net/www/protocol/https/DelegateHttpsURLConnection.java \
--	sun/net/www/protocol/https/Handler.java \
--	sun/net/www/protocol/jar/Handler.java \
--	sun/net/www/protocol/jar/URLJarFile.java \
--	sun/net/www/protocol/jar/JarFileFactory.java \
--	sun/net/www/protocol/jar/JarURLConnection.java \
--	sun/net/www/protocol/netdoc/Handler.java \
--	sun/net/www/content/image/gif.java \
--	sun/net/www/content/image/jpeg.java \
--	sun/net/www/content/image/x_xbitmap.java \
--	sun/net/www/content/image/x_xpixmap.java \
--	sun/net/www/content/image/png.java \
--	sun/net/www/content/audio/aiff.java \
--	sun/net/www/content/audio/basic.java \
--	sun/net/www/content/audio/wav.java \
--	sun/net/www/content/audio/x_aiff.java \
--	sun/net/www/content/audio/x_wav.java \
--	sun/net/www/protocol/ftp/Handler.java \
--	sun/net/www/protocol/ftp/FtpURLConnection.java \
--	sun/net/www/protocol/gopher/GopherClient.java \
--	sun/net/www/protocol/gopher/Handler.java \
--	sun/net/www/protocol/mailto/Handler.java \
--	sun/net/www/protocol/mailto/MailToURLConnection.java \
--	sun/net/idn/Punycode.java \
--	sun/net/idn/UCharacterEnums.java \
--	sun/net/idn/UCharacterDirection.java \
--	sun/net/idn/StringPrepDataReader.java \
--	sun/net/idn/StringPrep.java
-+        sun/net/InetAddressCachePolicy.java \
-+        sun/net/URLCanonicalizer.java \
-+        sun/net/NetworkClient.java \
-+        sun/net/NetworkServer.java \
-+        sun/net/PortConfig.java \
-+        sun/net/ProgressMonitor.java \
-+        sun/net/ProgressSource.java \
-+        sun/net/ProgressEvent.java \
-+        sun/net/ProgressListener.java \
-+        sun/net/ProgressMeteringPolicy.java \
-+        sun/net/SocksProxy.java \
-+        sun/net/ResourceManager.java \
-+        sun/net/TelnetInputStream.java \
-+        sun/net/TelnetOutputStream.java \
-+        sun/net/TelnetProtocolException.java \
-+        sun/net/TransferProtocolClient.java \
-+        sun/net/ConnectionResetException.java \
-+        sun/net/NetProperties.java \
-+        sun/net/NetHooks.java \
-+        sun/net/util/IPAddressUtil.java \
-+        sun/net/util/URLUtil.java \
-+        sun/net/dns/ResolverConfiguration.java \
-+        sun/net/dns/ResolverConfigurationImpl.java \
-+        sun/net/ftp/FtpClient.java \
-+        sun/net/ftp/FtpClientProvider.java \
-+        sun/net/ftp/FtpDirEntry.java \
-+        sun/net/ftp/FtpReplyCode.java \
-+        sun/net/ftp/FtpDirParser.java \
-+        sun/net/ftp/FtpLoginException.java \
-+        sun/net/ftp/FtpProtocolException.java \
-+        sun/net/ftp/impl/FtpClient.java \
-+        sun/net/ftp/impl/DefaultFtpClientProvider.java \
-+        sun/net/sdp/SdpSupport.java \
-+        sun/net/spi/DefaultProxySelector.java \
-+        sun/net/spi/nameservice/NameServiceDescriptor.java \
-+        sun/net/spi/nameservice/NameService.java \
-+        sun/net/smtp/SmtpClient.java \
-+        sun/net/smtp/SmtpProtocolException.java \
-+        sun/net/www/content/text/Generic.java \
-+        sun/net/www/content/text/plain.java \
-+        sun/net/www/content/text/PlainTextInputStream.java \
-+        sun/net/www/MessageHeader.java \
-+        sun/net/www/HeaderParser.java \
-+        sun/net/www/MeteredStream.java \
-+        sun/net/www/MimeEntry.java \
-+        sun/net/www/MimeLauncher.java \
-+        sun/net/www/ApplicationLaunchException.java \
-+        sun/net/www/MimeTable.java \
-+        sun/net/www/URLConnection.java \
-+        sun/net/www/ParseUtil.java \
-+        sun/net/www/protocol/file/Handler.java \
-+        sun/net/www/protocol/file/FileURLConnection.java \
-+        sun/net/www/http/HttpClient.java \
-+        sun/net/www/http/HttpCapture.java \
-+        sun/net/www/http/HttpCaptureInputStream.java \
-+        sun/net/www/http/HttpCaptureOutputStream.java \
-+        sun/net/www/http/PosterOutputStream.java \
-+        sun/net/www/http/ChunkedInputStream.java \
-+        sun/net/www/http/ChunkedOutputStream.java \
-+        sun/net/www/http/KeepAliveCache.java \
-+        sun/net/www/http/KeepAliveStream.java \
-+        sun/net/www/http/KeepAliveStreamCleaner.java \
-+        sun/net/www/http/Hurryable.java \
-+        sun/net/www/protocol/http/Handler.java \
-+        sun/net/www/protocol/http/HttpURLConnection.java \
-+        sun/net/www/protocol/http/HttpAuthenticator.java \
-+        sun/net/www/protocol/http/AuthenticationHeader.java \
-+        sun/net/www/protocol/http/AuthenticationInfo.java \
-+        sun/net/www/protocol/http/AuthCache.java \
-+        sun/net/www/protocol/http/AuthCacheImpl.java \
-+        sun/net/www/protocol/http/AuthCacheValue.java \
-+        sun/net/www/protocol/http/AuthScheme.java \
-+        sun/net/www/protocol/http/BasicAuthentication.java \
-+        sun/net/www/protocol/http/DigestAuthentication.java \
-+        sun/net/www/protocol/http/NTLMAuthenticationProxy.java \
-+        sun/net/www/protocol/http/NegotiateAuthentication.java \
-+        sun/net/www/protocol/http/Negotiator.java \
-+        sun/net/www/protocol/http/ntlm/NTLMAuthentication.java \
-+        sun/net/www/protocol/http/ntlm/NTLMAuthenticationCallback.java \
-+        sun/net/www/protocol/http/spnego/NegotiatorImpl.java \
-+        sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java \
-+        sun/net/www/protocol/http/logging/HttpLogFormatter.java \
-+        sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java \
-+        sun/net/www/protocol/https/HttpsClient.java \
-+        sun/net/www/protocol/https/DefaultHostnameVerifier.java \
-+        sun/net/www/protocol/https/HttpsURLConnectionImpl.java \
-+        sun/net/www/protocol/https/DelegateHttpsURLConnection.java \
-+        sun/net/www/protocol/https/Handler.java \
-+        sun/net/www/protocol/jar/Handler.java \
-+        sun/net/www/protocol/jar/URLJarFile.java \
-+        sun/net/www/protocol/jar/JarFileFactory.java \
-+        sun/net/www/protocol/jar/JarURLConnection.java \
-+        sun/net/www/protocol/netdoc/Handler.java \
-+        sun/net/www/content/image/gif.java \
-+        sun/net/www/content/image/jpeg.java \
-+        sun/net/www/content/image/x_xbitmap.java \
-+        sun/net/www/content/image/x_xpixmap.java \
-+        sun/net/www/content/image/png.java \
-+        sun/net/www/content/audio/aiff.java \
-+        sun/net/www/content/audio/basic.java \
-+        sun/net/www/content/audio/wav.java \
-+        sun/net/www/content/audio/x_aiff.java \
-+        sun/net/www/content/audio/x_wav.java \
-+        sun/net/www/protocol/ftp/Handler.java \
-+        sun/net/www/protocol/ftp/FtpURLConnection.java \
-+        sun/net/www/protocol/gopher/GopherClient.java \
-+        sun/net/www/protocol/gopher/Handler.java \
-+        sun/net/www/protocol/mailto/Handler.java \
-+        sun/net/www/protocol/mailto/MailToURLConnection.java \
-+        sun/net/idn/Punycode.java \
-+        sun/net/idn/UCharacterEnums.java \
-+        sun/net/idn/UCharacterDirection.java \
-+        sun/net/idn/StringPrepDataReader.java \
-+        sun/net/idn/StringPrep.java
  
- ifeq ($(PLATFORM), windows)
--    FILES_java += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 
-+    FILES_java += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java
- else
-     FILES_java += sun/net/sdp/SdpProvider.java
- endif
---- jdk/make/sun/nio/cs/FILES_java.gmk	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/nio/cs/FILES_java.gmk	2014-04-20 12:39:22.000000000 -0700
-@@ -329,6 +329,7 @@
- 	sun/nio/cs/ext/IBM280.java \
- 	sun/nio/cs/ext/IBM284.java \
- 	sun/nio/cs/ext/IBM285.java \
-+	sun/nio/cs/ext/IBM290.java \
- 	sun/nio/cs/ext/IBM297.java \
- 	sun/nio/cs/ext/IBM420.java \
- 	sun/nio/cs/ext/IBM424.java \
---- jdk/make/sun/rmi/rmi/Makefile	2013-09-06 11:27:40.000000000 -0700
-+++ jdk/make/sun/rmi/rmi/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -71,6 +71,9 @@
-     BUILD_TARGETS += bin
-   endif
- endif
-+ifeq ($(PLATFORM), bsd)
-+  BUILD_TARGETS += bin
-+endif
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = Um caractere XML inv\u00E1lido (Unicode: 0x {0}) foi encontrado no pr\u00F3logo do documento.
+         InvalidCharInXMLDecl = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado na declara\u00E7\u00E3o XML.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = A sequ\u00EAncia de caracteres \"]]>\" n\u00E3o deve aparecer no conte\u00FAdo, a menos que seja usada para marcar o fim de uma se\u00E7\u00E3o CDATA.
++        CDEndInContent = A sequ\u00EAncia de caracteres "]]>" n\u00E3o deve aparecer no conte\u00FAdo, a menos que seja usada para marcar o fim de uma se\u00E7\u00E3o CDATA.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = A se\u00E7\u00E3o CDATA deve terminar com \"]]>\".
++        CDSectUnterminated = A se\u00E7\u00E3o CDATA deve terminar com "]]>".
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = A declara\u00E7\u00E3o XML pode aparecer somente bem no in\u00EDcio do documento.
+-        EqRequiredInXMLDecl = O caractere '' = '' deve estar ap\u00F3s \"{0}\" na declara\u00E7\u00E3o XML.
+-        QuoteRequiredInXMLDecl = O valor ap\u00F3s \"{0}\" na declara\u00E7\u00E3o XML deve ser uma string entre aspas.
+-        XMLDeclUnterminated = A declara\u00E7\u00E3o XML deve terminar com \"?>\".
++        EqRequiredInXMLDecl = O caractere '' = '' deve estar ap\u00F3s "{0}" na declara\u00E7\u00E3o XML.
++        QuoteRequiredInXMLDecl = O valor ap\u00F3s "{0}" na declara\u00E7\u00E3o XML deve ser uma string entre aspas.
++        XMLDeclUnterminated = A declara\u00E7\u00E3o XML deve terminar com "?>".
+         VersionInfoRequired = A vers\u00E3o \u00E9 obrigat\u00F3ria na declara\u00E7\u00E3o XML.
+         SpaceRequiredBeforeVersionInXMLDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes do pseudo-atributo da vers\u00E3o na declara\u00E7\u00E3o XML.
+         SpaceRequiredBeforeEncodingInXMLDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes de codificar o pseudo-atributo na declara\u00E7\u00E3o XML.
+@@ -71,85 +68,86 @@
+         ReferenceIllegalInTrailingMisc=A refer\u00EAncia n\u00E3o \u00E9 permitida na se\u00E7\u00E3o \u00E0 esquerda.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = O valor da declara\u00E7\u00E3o do documento stand-alone deve ser \"sim\" ou \"n\u00E3o\", mas n\u00E3o deve ser \"{0}\".
++        SDDeclInvalid = O valor da declara\u00E7\u00E3o do documento stand-alone deve ser "sim" ou "n\u00E3o", mas n\u00E3o deve ser "{0}".
++        SDDeclNameInvalid = O nome standalone na declara\u00E7\u00E3o XML pode estar grafado incorretamente.
+ # 2.12 Language Identification
+-        XMLLangInvalid = O valor do atributo xml:lang \"{0}\" \u00E9 um identificador de idioma inv\u00E1lido.
++        XMLLangInvalid = O valor do atributo xml:lang "{0}" \u00E9 um identificador de idioma inv\u00E1lido.
+ # 3. Logical Structures
+-        ETagRequired = O tipo de elemento {0}\" deve ser encerrado pela tag final correspondente \"\".
++        ETagRequired = O tipo de elemento {0}" deve ser encerrado pela tag final correspondente "".
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = O tipo de elemento \"{0}\" deve ser seguido pelas especifica\u00E7\u00F5es do atributo, \">\" ou \"/>\".
+-        EqRequiredInAttribute = O nome do atributo \"{1}\" associado a um tipo de elemento \"{0}\" deve ser seguido do caractere '' = ''.
+-        OpenQuoteExpected = S\u00E3o esperadas aspas de abertura para o atributo \"{1}\" associado a um tipo de elemento \"{0}\".
+-        CloseQuoteExpected = S\u00E3o esperadas aspas de fechamento para o atributo \"{1}\" associado a um tipo de elemento \"{0}\".
+-        AttributeNotUnique = O atributo \"{1}\" j\u00E1 foi especificado para o elemento \"{0}\".
+-        AttributeNSNotUnique = O atributo \"{1}\" vinculado ao namespace \"{2}\" j\u00E1 foi especificado para o elemento \"{0}\".
+-        ETagUnterminated = A tag final do tipo de elemento \"{0}\" deve terminar com um delimitador ''>".
++        ElementUnterminated = O tipo de elemento "{0}" deve ser seguido pelas especifica\u00E7\u00F5es do atributo, ">" ou "/>".
++        EqRequiredInAttribute = O nome do atributo "{1}" associado a um tipo de elemento "{0}" deve ser seguido do caractere '' = ''.
++        OpenQuoteExpected = S\u00E3o esperadas aspas de abertura para o atributo "{1}" associado a um tipo de elemento "{0}".
++        CloseQuoteExpected = S\u00E3o esperadas aspas de fechamento para o atributo "{1}" associado a um tipo de elemento "{0}".
++        AttributeNotUnique = O atributo "{1}" j\u00E1 foi especificado para o elemento "{0}".
++        AttributeNSNotUnique = O atributo "{1}" vinculado ao namespace "{2}" j\u00E1 foi especificado para o elemento "{0}".
++        ETagUnterminated = A tag final do tipo de elemento "{0}" deve terminar com um delimitador ''>".
+         MarkupNotRecognizedInContent = O conte\u00FAdo dos elementos deve consistir em dados ou marca\u00E7\u00E3o do caractere correto.
+         DoctypeIllegalInContent = Um DOCTYPE n\u00E3o \u00E9 permitido no conte\u00FAdo.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = A refer\u00EAncia deve ser encerrada por um delimitador ';'.
+ # 4.3.2 Well-Formed Parsed Entities
+-        ReferenceNotInOneEntity = A refer\u00EAncia deve estar totalmente contida na mesma entidade submetida a parse.
+-        ElementEntityMismatch = O elemento \"{0}\" deve come\u00E7ar e terminar com a mesma entidade.
++        ReferenceNotInOneEntity = A refer\u00EAncia deve estar totalmente contida na mesma entidade submetida a parsing.
++        ElementEntityMismatch = O elemento "{0}" deve come\u00E7ar e terminar com a mesma entidade.
+         MarkupEntityMismatch=As estruturas do documento XML devem come\u00E7ar e terminar com a mesma entidade.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = Um caractere XML inv\u00E1lido (Unicode: 0x {2}) foi encontrado no valor do atributo \"{1}\" e o elemento \u00E9 \"{0}\".
++        InvalidCharInAttValue = Um caractere XML inv\u00E1lido (Unicode: 0x {2}) foi encontrado no valor do atributo "{1}" e o elemento \u00E9 "{0}".
+         InvalidCharInComment = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado no coment\u00E1rio.
+         InvalidCharInPI = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado na instru\u00E7\u00E3o de processamento.
+         InvalidCharInInternalSubset = Um caractere XML inv\u00E1lido (Unicode: 0x {0}) foi encontrado no subconjunto interno do DTD.
+         InvalidCharInTextDecl = Um caractere XML inv\u00E1lido (Unicode: 0x{0}) foi encontrado na declara\u00E7\u00E3o de texto.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = O valor do atributo \"{1}\" deve come\u00E7ar com aspas simples ou duplas.
+-        LessthanInAttValue = O valor do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00E3o deve conter o caractere ''<''.
+-        AttributeValueUnterminated = O valor do atributo \"{1}\" deve terminar com as aspas correspondentes.
++        QuoteRequiredInAttValue = O valor do atributo "{1}" deve come\u00E7ar com aspas simples ou duplas.
++        LessthanInAttValue = O valor do atributo "{1}" associado a um tipo de elemento "{0}" n\u00E3o deve conter o caractere ''<''.
++        AttributeValueUnterminated = O valor do atributo "{1}" deve terminar com as aspas correspondentes.
+ # 2.5 Comments
+-        InvalidCommentStart = O coment\u00E1rio deve come\u00E7ar com \"\".
++        InvalidCommentStart = O coment\u00E1rio deve come\u00E7ar com "".
+         COMMENT_NOT_IN_ONE_ENTITY = O coment\u00E1rio n\u00E3o est\u00E1 entre chaves na mesma entidade.
+ # 2.6 Processing Instructions
+         PITargetRequired = A instru\u00E7\u00E3o de processamento deve come\u00E7ar com o nome do destino.
+         SpaceRequiredInPI = O espa\u00E7o em branco \u00E9 obrigat\u00F3rio entre o destino da instru\u00E7\u00E3o de processamento e os dados.
+-        PIUnterminated = A instru\u00E7\u00E3o de processamento deve terminar com \"?>\".
+-        ReservedPITarget = O destino da instru\u00E7\u00E3o de processamento correspondente \"[xX][mM][lL]\" n\u00E3o \u00E9 permitido.
++        PIUnterminated = A instru\u00E7\u00E3o de processamento deve terminar com "?>".
++        ReservedPITarget = O destino da instru\u00E7\u00E3o de processamento correspondente "[xX][mM][lL]" n\u00E3o \u00E9 permitido.
+         PI_NOT_IN_ONE_ENTITY = A instru\u00E7\u00E3o de processamento n\u00E3o est\u00E1 entre chaves na mesma entidade.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = Vers\u00E3o inv\u00E1lida \"{0}\".
+-        VersionNotSupported = Vers\u00E3o XML \"{0}\" n\u00E3o suportada; somente XML 1.0 \u00E9 suportada.
+-        VersionNotSupported11 = Vers\u00E3o XML \"{0}\" n\u00E3o suportada, somente XML 1.0 e XML 1.1 s\u00E3o suportadas.
++        VersionInfoInvalid = Vers\u00E3o inv\u00E1lida "{0}".
++        VersionNotSupported = Vers\u00E3o XML "{0}" n\u00E3o suportada; somente XML 1.0 \u00E9 suportada.
++        VersionNotSupported11 = Vers\u00E3o XML "{0}" n\u00E3o suportada, somente XML 1.0 e XML 1.1 s\u00E3o suportadas.
+         VersionMismatch= Uma entidade n\u00E3o pode incluir outra entidade de uma vers\u00E3o posterior.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = Uma representa\u00E7\u00E3o decimal deve seguir imediatamente o \"&#\" em uma refer\u00EAncia de caractere.
+-        HexdigitRequiredInCharRef = Uma representa\u00E7\u00E3o hexadecimal deve seguir imediatamente o \"&#\" em uma refer\u00EAncia de caractere.
++        DigitRequiredInCharRef = Uma representa\u00E7\u00E3o decimal deve seguir imediatamente o "&#" em uma refer\u00EAncia de caractere.
++        HexdigitRequiredInCharRef = Uma representa\u00E7\u00E3o hexadecimal deve seguir imediatamente o "&#" em uma refer\u00EAncia de caractere.
+         SemicolonRequiredInCharRef = A refer\u00EAncia de caractere deve terminar com o delimitador ';'.
+-        InvalidCharRef = A refer\u00EAncia do caractere \"&#{0}\" \u00E9 um caractere XML inv\u00E1lido.
++        InvalidCharRef = A refer\u00EAncia do caractere "&#{0}" \u00E9 um caractere XML inv\u00E1lido.
+         NameRequiredInReference = O nome da entidade deve seguir imediatamente o '&' na refer\u00EAncia da entidade.
+-        SemicolonRequiredInReference = A refer\u00EAncia \u00E0 entidade \"{0}\" deve terminar com o delimitador '';''.
++        SemicolonRequiredInReference = A refer\u00EAncia \u00E0 entidade "{0}" deve terminar com o delimitador '';''.
+ # 4.3.1 The Text Declaration
+-        TextDeclMustBeFirst = A declara\u00E7\u00E3o de texto somente pode aparecer bem no in\u00EDcio da entidade externa submetida a parse.
+-        EqRequiredInTextDecl = O caractere '' = '' deve estar ap\u00F3s \"{0}\" na declara\u00E7\u00E3o de texto.
+-        QuoteRequiredInTextDecl = O valor ap\u00F3s \"{0}\" na declara\u00E7\u00E3o de texto deve ser uma string entre aspas.
+-        CloseQuoteMissingInTextDecl = n\u00E3o foi encontrada a aspa de fechamento no valor ap\u00F3s "{0}\" na declara\u00E7\u00E3o de texto.
++        TextDeclMustBeFirst = A declara\u00E7\u00E3o de texto somente pode aparecer bem no in\u00EDcio da entidade externa submetida a parsing.
++        EqRequiredInTextDecl = O caractere '' = '' deve estar ap\u00F3s "{0}" na declara\u00E7\u00E3o de texto.
++        QuoteRequiredInTextDecl = O valor ap\u00F3s "{0}" na declara\u00E7\u00E3o de texto deve ser uma string entre aspas.
++        CloseQuoteMissingInTextDecl = n\u00E3o foi encontrada a aspa de fechamento no valor ap\u00F3s "{0}" na declara\u00E7\u00E3o de texto.
+         SpaceRequiredBeforeVersionInTextDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes do pseudo-atributo da vers\u00E3o na declara\u00E7\u00E3o de texto.
+         SpaceRequiredBeforeEncodingInTextDecl = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes de codificar o pseudo-atributo na declara\u00E7\u00E3o de texto.
+-        TextDeclUnterminated = A declara\u00E7\u00E3o de texto deve terminar com \"?>\".
++        TextDeclUnterminated = A declara\u00E7\u00E3o de texto deve terminar com "?>".
+         EncodingDeclRequired = A declara\u00E7\u00E3o de codifica\u00E7\u00E3o \u00E9 necess\u00E1ria na declara\u00E7\u00E3o de texto.
+         NoMorePseudoAttributes = N\u00E3o s\u00E3o mais permitidos pseudo-atributos.
+         MorePseudoAttributes = S\u00E3o esperados mais pseudo-atributos.
+         PseudoAttrNameExpected = \u00C9 esperado um nome de um pseudo-atributo. 
+ # 4.3.2 Well-Formed Parsed Entities
+-        CommentNotInOneEntity = O coment\u00E1rio deve estar totalmente contido na mesma entidade submetida a parse.
+-        PINotInOneEntity = A instru\u00E7\u00E3o de processamento deve estar totalmente contida na mesma entidade submetida a parse.
++        CommentNotInOneEntity = O coment\u00E1rio deve estar totalmente contido na mesma entidade submetida a parsing.
++        PINotInOneEntity = A instru\u00E7\u00E3o de processamento deve estar totalmente contida na mesma entidade submetida a parsing.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = Nome da codifica\u00E7\u00E3o inv\u00E1lida \"{0}\".
+-        EncodingByteOrderUnsupported = A ordem de bytes fornecida para codifica\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 suportada.
++        EncodingDeclInvalid = Nome da codifica\u00E7\u00E3o inv\u00E1lida "{0}".
++        EncodingByteOrderUnsupported = A ordem de bytes fornecida para codifica\u00E7\u00E3o "{0}" n\u00E3o \u00E9 suportada.
+         InvalidByte = Byte inv\u00E1lido {0} da sequ\u00EAncia UTF-8 do byte {1}.
+         ExpectedByte = Esperava {0} byte da sequ\u00EAncia UTF-8 do byte {1}.  
+         InvalidHighSurrogate = Os bits substitutos altos na sequ\u00EAncia da UTF-8 n\u00E3o devem exceder 0x10 mas foi encontrado 0x{0}.
+-        OperationNotSupported = A opera\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 suportada pelo leitor {1}.
+-        InvalidASCII = O byte \"{0}\" n\u00E3o \u00E9 membro do conjunto de caracteres ASCII (7 bits).
++        OperationNotSupported = A opera\u00E7\u00E3o "{0}" n\u00E3o \u00E9 suportada pelo leitor {1}.
++        InvalidASCII = O byte "{0}" n\u00E3o \u00E9 membro do conjunto de caracteres ASCII (7 bits).
+         CharConversionFailure = Uma entidade destinada a estar em uma determinada codifica\u00E7\u00E3o n\u00E3o deve conter sequ\u00EAncias inv\u00E1lidas na referida codifica\u00E7\u00E3o.
+         
+ # DTD Messages
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = O caractere XML (Unicode: 0x{0}) n\u00E3o \u00E9 permitido no identificador p\u00FAblico.
+         SpaceRequiredBetweenPublicAndSystem = Espa\u00E7os em branco s\u00E3o necess\u00E1rios entre publicId e systemId.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
+-        PEReferenceWithinMarkup = A refer\u00EAncia da entidade do par\u00E2metro \"%{0};\" n\u00E3o pode ocorrer na marca\u00E7\u00E3o no subconjunto interno do DTD.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s "''.
++        PEReferenceWithinMarkup = A refer\u00EAncia da entidade do par\u00E2metro "%{0};" n\u00E3o pode ocorrer na marca\u00E7\u00E3o no subconjunto interno do DTD.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = As declara\u00E7\u00F5es de marca\u00E7\u00E3o contidas ou apontadas pela declara\u00E7\u00E3o do tipo de documento devem estar corretas.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = Deve ser fornecida a declara\u00E7\u00E3o do atributo para \"xml:space\" como um tipo enumerado, cujo os \u00FAnicos valores poss\u00EDveis s\u00E3o \"default\" e \"preserve\".
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = Deve ser fornecida a declara\u00E7\u00E3o do atributo para "xml:space" como um tipo enumerado, cujo os \u00FAnicos valores poss\u00EDveis s\u00E3o "default" e "preserve".
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s o tipo de elemento "{0}" na declara\u00E7\u00E3o do tipo de elemento.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = A restri\u00E7\u00E3o \u00E9 necess\u00E1ria ap\u00F3s o tipo de elemento "{0}" na declara\u00E7\u00E3o do tipo de elemento.
++        ElementDeclUnterminated = A declara\u00E7\u00E3o do tipo de elemento "{0}" deve terminar com ''>''.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere ''('' ou um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere ''('' ou um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento "{0}".
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u00C9 necess\u00E1rio um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento \"{0}\".
+-        MixedContentUnterminated = O modelo de conte\u00FAdo misto \"{0}\" deve terminar com \")*\" quando os tipos de elementos filhos forem restringidos.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u00C9 necess\u00E1rio um tipo de elemento na declara\u00E7\u00E3o do tipo de elemento "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u00C9 necess\u00E1rio um caractere '')'' na declara\u00E7\u00E3o do tipo de elemento "{0}".
++        MixedContentUnterminated = O modelo de conte\u00FAdo misto "{0}" deve terminar com ")*" quando os tipos de elementos filhos forem restringidos.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"\".
+-        IgnoreSectUnterminated = A se\u00E7\u00E3o condicional exclu\u00EDda deve terminar com \"]]>\".
++        IncludeSectUnterminated = A se\u00E7\u00E3o condicional inclu\u00EDda deve terminar com "]]>".
++        IgnoreSectUnterminated = A se\u00E7\u00E3o condicional exclu\u00EDda deve terminar com "]]>".
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = O nome da entidade deve seguir imediatamente o '%' na refer\u00EAncia da entidade do par\u00E2metro.
+-        SemicolonRequiredInPEReference = A refer\u00EAncia da entidade do par\u00E2metro \"%{0};\" deve terminar com o delimitador '';".
++        SemicolonRequiredInPEReference = A refer\u00EAncia da entidade do par\u00E2metro "%{0};" deve terminar com o delimitador '';".
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = A entidade \"{0}\" foi declarada mais de uma vez.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre o nome da entidade "{0}" e a defini\u00E7\u00E3o da declara\u00E7\u00E3o da entidade.
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u00C9 necess\u00E1rio um espa\u00E7o em branco entre "NDATA" e o nome da nota\u00E7\u00E3o na declara\u00E7\u00E3o da entidade "{0}".
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio antes de "NDATA" na declara\u00E7\u00E3o da entidade "{0}".
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = O nome da nota\u00E7\u00E3o \u00E9 necess\u00E1rio ap\u00F3s "NDATA" na declara\u00E7\u00E3o da entidade "{0}".
++        EntityDeclUnterminated = A declara\u00E7\u00E3o da entidade "{0}" deve terminar com ''>''.
++	MSG_DUPLICATE_ENTITY_DEFINITION = A entidade "{0}" foi declarada mais de uma vez.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = A declara\u00E7\u00E3o da entidade externa deve come\u00E7ar com \"SYSTEM\" ou \"PUBLIC\".
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre \"PUBLIC\" e o identificador p\u00FAblico.
++        ExternalIDRequired = A declara\u00E7\u00E3o da entidade externa deve come\u00E7ar com "SYSTEM" ou "PUBLIC".
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre "PUBLIC" e o identificador p\u00FAblico.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre o identificador p\u00FAblico e o identificador do sistema.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre \"SYSTEM\" e o identificador do sistema.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = O identificador do fragmento n\u00E3o deve ser especificado como parte do identificador do sistema \"{0}\".
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = O espa\u00E7o em branco \u00E9 necess\u00E1rio entre "SYSTEM" e o identificador do sistema.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = O identificador do fragmento n\u00E3o deve ser especificado como parte do identificador do sistema "{0}".
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s \"''.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s o nome da nota\u00E7\u00E3o "{0}" na declara\u00E7\u00E3o de nota\u00E7\u00E3o.
++        ExternalIDorPublicIDRequired = A declara\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" deve incluir um identificador p\u00FAblico ou do sistema.
++        NotationDeclUnterminated = A declara\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" deve terminar com ''>''.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = O tipo de elemento \"{1}\" j\u00E1 foi especificado no modelo de conte\u00FAdo da declara\u00E7\u00E3o do elemento \"{0}\".
+-        ENTITIESInvalid = O valor do atributo \"{1}\" do tipo ENTITIES deve ser o nome de uma ou mais entidades n\u00E3o submetidas a parse.
+-        ENTITYInvalid = O valor do atributo \"{1}\" do tipo ENTITY deve ser o nome de uma entidade n\u00E3o submetida a parse.
+-        IDDefaultTypeInvalid = O atributo do ID \"{0}\" deve ter um default declarado \"#IMPLIED\" ou \"#REQUIRED\".
+-        IDInvalid = O valor do atributo \"{0}\" do ID de tipo deve ser um nome.
+-        IDInvalidWithNamespaces = O valor do atributo \"{0}\" do ID de tipo deve ser um NCName quando os namespaces estiverem ativados.
+-        IDNotUnique = O valor do atributo \"{0}\" do ID de tipo deve ser exclusivo no documento.
+-        IDREFInvalid = O valor do atributo \"{0}\" do IDREF de tipo deve ser um nome.
+-        IDREFInvalidWithNamespaces = O valor do atributo \"{0}\" do IDREF de tipo deve ser um NCName quando os namespaces estiverem ativados.
+-        IDREFSInvalid = O valor do atributo \"{0}\" de tipo IDREFS deve ter um ou mais nomes.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir as declara\u00E7\u00F5es aninhadas corretamente quando a refer\u00EAncia da entidade for usada como uma declara\u00E7\u00E3o completa.
+-        ImproperDeclarationNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir as declara\u00E7\u00F5es aninhadas corretamente.
+-        ImproperGroupNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir pares de par\u00EAnteses aninhados corretamente.
+-        INVALID_PE_IN_CONDITIONAL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro \"{0}\" deve incluir a se\u00E7\u00E3o condicional inteira ou apenas INCLUDE ou IGNORE.
+-        MSG_ATTRIBUTE_NOT_DECLARED = O atributo \"{1}\" deve ser declarado para o tipo de elemento \"{0}\".
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = O atributo \"{0}\" com o valor \"{1}\" deve ter um valor da lista \"{2}\".
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = O valor \"{1}\" do atributo \"{0}\" n\u00E3o deve ser alterado por meio da normaliza\u00E7\u00E3o (para \"{2}\") em um documento stand-alone.
+-        MSG_CONTENT_INCOMPLETE = O conte\u00FAdo do tipo de elemento \"{0}\" est\u00E1 incompleto; ele deve corresponder a \"{1}\".
+-        MSG_CONTENT_INVALID = O conte\u00FAdo do tipo de elemento \"{0}\" deve corresponder a \"{1}\".
+-        MSG_CONTENT_INVALID_SPECIFIED = O conte\u00FAdo do tipo de elemento \"{0}\" deve corresponder a \"{1}\". N\u00E3o s\u00E3o permitidos os filhos do tipo \"{2}\".
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = O atributo \"{1}\" do tipo de elemento \"{0}\" tem um valor default e deve ser especificado em um documento stand-alone.
+-        MSG_DUPLICATE_ATTDEF = O atributo \"{1}\" j\u00E1 foi declarado para o tipo de elemento \"{0}\".
+-        MSG_ELEMENT_ALREADY_DECLARED = O tipo de elemento \"{0}\" n\u00E3o deve ser declarado mais de uma vez.
+-        MSG_ELEMENT_NOT_DECLARED = O tipo de elemento \"{0}\" deve ser declarado.
++        DuplicateTypeInMixedContent = O tipo de elemento "{1}" j\u00E1 foi especificado no modelo de conte\u00FAdo da declara\u00E7\u00E3o do elemento "{0}".
++        ENTITIESInvalid = O valor do atributo "{1}" do tipo ENTITIES deve ser o nome de uma ou mais entidades n\u00E3o submetidas a parsing.
++        ENTITYInvalid = O valor do atributo "{1}" do tipo ENTITY deve ser o nome de uma entidade n\u00E3o submetida a parsing.
++        IDDefaultTypeInvalid = O atributo do ID "{0}" deve ter um default declarado "#IMPLIED" ou "#REQUIRED".
++        IDInvalid = O valor do atributo "{0}" do ID de tipo deve ser um nome.
++        IDInvalidWithNamespaces = O valor do atributo "{0}" do ID de tipo deve ser um NCName quando os namespaces estiverem ativados.
++        IDNotUnique = O valor do atributo "{0}" do ID de tipo deve ser exclusivo no documento.
++        IDREFInvalid = O valor do atributo "{0}" do IDREF de tipo deve ser um nome.
++        IDREFInvalidWithNamespaces = O valor do atributo "{0}" do IDREF de tipo deve ser um NCName quando os namespaces estiverem ativados.
++        IDREFSInvalid = O valor do atributo "{0}" de tipo IDREFS deve ter um ou mais nomes.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir as declara\u00E7\u00F5es aninhadas corretamente quando a refer\u00EAncia da entidade for usada como uma declara\u00E7\u00E3o completa.
++        ImproperDeclarationNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir as declara\u00E7\u00F5es aninhadas corretamente.
++        ImproperGroupNesting = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir pares de par\u00EAnteses aninhados corretamente.
++        INVALID_PE_IN_CONDITIONAL = O texto de substitui\u00E7\u00E3o da entidade do par\u00E2metro "{0}" deve incluir a se\u00E7\u00E3o condicional inteira ou apenas INCLUDE ou IGNORE.
++        MSG_ATTRIBUTE_NOT_DECLARED = O atributo "{1}" deve ser declarado para o tipo de elemento "{0}".
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = O atributo "{0}" com o valor "{1}" deve ter um valor da lista "{2}".
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = O valor "{1}" do atributo "{0}" n\u00E3o deve ser alterado por meio da normaliza\u00E7\u00E3o (para "{2}") em um documento stand-alone.
++        MSG_CONTENT_INCOMPLETE = O conte\u00FAdo do tipo de elemento "{0}" est\u00E1 incompleto; ele deve corresponder a "{1}".
++        MSG_CONTENT_INVALID = O conte\u00FAdo do tipo de elemento "{0}" deve corresponder a "{1}".
++        MSG_CONTENT_INVALID_SPECIFIED = O conte\u00FAdo do tipo de elemento "{0}" deve corresponder a "{1}". N\u00E3o s\u00E3o permitidos os filhos do tipo "{2}".
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = O atributo "{1}" do tipo de elemento "{0}" tem um valor default e deve ser especificado em um documento stand-alone.
++        MSG_DUPLICATE_ATTDEF = O atributo "{1}" j\u00E1 foi declarado para o tipo de elemento "{0}".
++        MSG_ELEMENT_ALREADY_DECLARED = O tipo de elemento "{0}" n\u00E3o deve ser declarado mais de uma vez.
++        MSG_ELEMENT_NOT_DECLARED = O tipo de elemento "{0}" deve ser declarado.
+         MSG_GRAMMAR_NOT_FOUND = O documento \u00E9 inv\u00E1lido: nenhuma gram\u00E1tica encontrada.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = Um elemento com o identificador \"{0}\" deve aparecer no documento.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = A refer\u00EAncia \u00E0 entidade externa \"{0}\" n\u00E3o \u00E9 permitida em um documento stand-alone.
+-        MSG_FIXED_ATTVALUE_INVALID = O atributo \"{1}\" com o valor \"{2}\" deve ter um valor \"{3}\".
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = O tipo de elemento \"{0}\" j\u00E1 tem o atributo \"{1}\" do ID do tipo; um segundo atributo \"{2}\" do ID de tipo n\u00E3o \u00E9 permitido.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = O tipo de elemento \"{0}\" j\u00E1 tem o atributo \"{1}\" do tipo NOTATION; um segundo atributo \"{2}\" do tipo NOTATION n\u00E3o \u00E9 permitido.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = A nota\u00E7\u00E3o \"{1}\" deve ser declarada quando referenciada na lista de tipos de nota\u00E7\u00E3o do atributo \"{0}\".
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = A nota\u00E7\u00E3o \"{1}\" deve ser declarada quando referenciada na declara\u00E7\u00E3o da entidade n\u00E3o submetida a parse para \"{0}\".
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = A refer\u00EAncia \u00E0 entidade \"{0}\" declarada em uma entidade externa submetida a parse n\u00E3o \u00E9 permitida em um documento stand-alone.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = O atributo \"{1}\" \u00E9 necess\u00E1rio e deve ser especificado para o tipo de elemento \"{0}\".
+-        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = N\u00E3o deve haver espa\u00E7o em branco entre os elementos declarados em uma entidade externa submetida a parse com o conte\u00FAdo do elemento em um documento stand-alone.
+-        NMTOKENInvalid = O valor do atributo \"{0}\" do tipo NMTOKEN deve ser um token de nome.
+-        NMTOKENSInvalid = O valor do atributo \"{0}\" do tipo NMTOKENS deve ter um ou mais tokens de nome.
+-        NoNotationOnEmptyElement = O tipo de elemento \"{0}\" que foi declarado EMPTY n\u00E3o pode declarar o atributo \"{1}\" do tipo NOTATION.
+-        RootElementTypeMustMatchDoctypedecl = O elemento-raiz do documento \"{1}\" deve corresponder \u00E0 raiz de DOCTYPE \"{0}\".
+-        UndeclaredElementInContentSpec = O modelo do conte\u00FAdo do elemento \"{0}\" refere-se ao elemento n\u00E3o declarado \"{1}\".
+-        UniqueNotationName = A declara\u00E7\u00E3o da nota\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 exclusiva. Um Nome fornecido n\u00E3o deve ser declarado em mais de uma declara\u00E7\u00E3o de nota\u00E7\u00E3o.
++        MSG_ELEMENT_WITH_ID_REQUIRED = Um elemento com o identificador "{0}" deve aparecer no documento.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = A refer\u00EAncia \u00E0 entidade externa "{0}" n\u00E3o \u00E9 permitida em um documento stand-alone.
++        MSG_FIXED_ATTVALUE_INVALID = O atributo "{1}" com o valor "{2}" deve ter um valor "{3}".
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = O tipo de elemento "{0}" j\u00E1 tem o atributo "{1}" do ID do tipo; um segundo atributo "{2}" do ID de tipo n\u00E3o \u00E9 permitido.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = O tipo de elemento "{0}" j\u00E1 tem o atributo "{1}" do tipo NOTATION; um segundo atributo "{2}" do tipo NOTATION n\u00E3o \u00E9 permitido.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = A nota\u00E7\u00E3o "{1}" deve ser declarada quando referenciada na lista de tipos de nota\u00E7\u00E3o do atributo "{0}".
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = A nota\u00E7\u00E3o "{1}" deve ser declarada quando referenciada na declara\u00E7\u00E3o da entidade n\u00E3o submetida a parsing para "{0}".
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = A refer\u00EAncia \u00E0 entidade "{0}" declarada em uma entidade externa submetida a parsing n\u00E3o \u00E9 permitida em um documento stand-alone.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = O atributo "{1}" \u00E9 necess\u00E1rio e deve ser especificado para o tipo de elemento "{0}".
++        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = N\u00E3o deve haver espa\u00E7o em branco entre os elementos declarados em uma entidade externa submetida a parsing com o conte\u00FAdo do elemento em um documento stand-alone.
++        NMTOKENInvalid = O valor do atributo "{0}" do tipo NMTOKEN deve ser um token de nome.
++        NMTOKENSInvalid = O valor do atributo "{0}" do tipo NMTOKENS deve ter um ou mais tokens de nome.
++        NoNotationOnEmptyElement = O tipo de elemento "{0}" que foi declarado EMPTY n\u00E3o pode declarar o atributo "{1}" do tipo NOTATION.
++        RootElementTypeMustMatchDoctypedecl = O elemento-raiz do documento "{1}" deve corresponder \u00E0 raiz de DOCTYPE "{0}".
++        UndeclaredElementInContentSpec = O modelo do conte\u00FAdo do elemento "{0}" refere-se ao elemento n\u00E3o declarado "{1}".
++        UniqueNotationName = A declara\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" n\u00E3o \u00E9 exclusiva. Um Nome fornecido n\u00E3o deve ser declarado em mais de uma declara\u00E7\u00E3o de nota\u00E7\u00E3o.
+         ENTITYFailedInitializeGrammar =  Validador de ENTITYDatatype: Falha ao chamar o m\u00E9todo de inicializa\u00E7\u00E3o com uma refer\u00EAncia de Gram\u00E1tica v\u00E1lida. \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\" n\u00E3o \u00E9 submetida a parse.
+-        ENTITYNotValid = ENTITY \"{0}\" n\u00E3o \u00E9 v\u00E1lida.
++        ENTITYNotUnparsed = ENTITY "{0}" n\u00E3o \u00E9 submetida a parsing.
++        ENTITYNotValid = ENTITY "{0}" n\u00E3o \u00E9 v\u00E1lida.
+         EmptyList = O valor dos tipos ENTITIES, IDREFS e NMTOKENS n\u00E3o pode estar na lista vazia.
  
- build: $(BUILD_TARGETS)
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = A refer\u00EAncia da entidade externa \"&{0};\" n\u00E3o \u00E9 permitida em um valor do atributo.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = A refer\u00EAncia da entidade externa "&{0};" n\u00E3o \u00E9 permitida em um valor do atributo.
++        AccessExternalDTD = DTD Externo: falha ao ler o DTD ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalDTD.
++        AccessExternalEntity = Entidade Externa: falha ao ler o documento ''{0}'' externo porque o acesso a ''{1}'' n\u00E3o \u00E9 permitido em decorr\u00EAncia de uma restri\u00E7\u00E3o definida pela propriedade accessExternalDTD.
  
---- jdk/make/sun/splashscreen/Makefile	2013-09-06 11:27:41.000000000 -0700
-+++ jdk/make/sun/splashscreen/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -83,15 +83,16 @@
- 				  -framework JavaNativeFoundation
- else ifneq ($(PLATFORM), windows)
-   CFLAGS += -DWITH_X11
--  ifeq ($(PLATFORM), macosx))
--    OTHER_LDLIBS += -liconv
--    CPPFLAGS += -I$(OPENWIN_HOME)/include \
--                -I$(OPENWIN_HOME)/include/X11/extensions
--    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -pthread
--  else
--    CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
--    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
-+  ifeq ($(PLATFORM), bsd))
-+    ifeq ($(OS_NAME), netbsd)
-+      OTHER_LDLIBS += -Wl,-R$(OPENWIN_LIB)
-+    else
-+      CPPFLAGS += -I$(PACKAGE_PATH)/include
-+      OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
-+    endif
-   endif
-+  CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
-+  OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
- else # PLATFORM
-   CFLAGS += -DWITH_WIN32
-   OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
---- jdk/make/sun/xawt/Makefile	2013-09-06 11:27:41.000000000 -0700
-+++ jdk/make/sun/xawt/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -52,6 +52,9 @@
- AUTO_JAVA_PRUNE = WrapperGenerator.java
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = A entidade \"{0}\" foi referenciada, mas n\u00E3o declarada.
+-        ReferenceToUnparsedEntity = A refer\u00EAncia da entidade n\u00E3o submetida a parse \"&{0};\" n\u00E3o \u00E9 permitida.
+-        RecursiveReference = Refer\u00EAncia da entidade recursiva \"{0}\". (Caminho de refer\u00EAncia: {1}),
+-        RecursiveGeneralReference = Refer\u00EAncia geral da entidade recursiva \"&{0};\". (Caminho de refer\u00EAncia: {1}),
+-        RecursivePEReference = Refer\u00EAncia da entidade do par\u00E2metro recursivo \"%{0};\". (Caminho de refer\u00EAncia: {1}),
++        EntityNotDeclared = A entidade "{0}" foi referenciada, mas n\u00E3o declarada.
++        ReferenceToUnparsedEntity = A refer\u00EAncia da entidade n\u00E3o submetida a parsing "&{0};" n\u00E3o \u00E9 permitida.
++        RecursiveReference = Refer\u00EAncia da entidade recursiva "{0}". (Caminho de refer\u00EAncia: {1}),
++        RecursiveGeneralReference = Refer\u00EAncia geral da entidade recursiva "&{0};". (Caminho de refer\u00EAncia: {1}),
++        RecursivePEReference = Refer\u00EAncia da entidade do par\u00E2metro recursivo "%{0};". (Caminho de refer\u00EAncia: {1}),
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = A codifica\u00E7\u00E3o \"{0}\" n\u00E3o \u00E9 suportada.
+-        EncodingRequired = Uma entidade submetida a parse n\u00E3o codificada em UTF-8 nem em UTF-16 deve conter uma declara\u00E7\u00E3o de codifica\u00E7\u00E3o.
++        EncodingNotSupported = A codifica\u00E7\u00E3o "{0}" n\u00E3o \u00E9 suportada.
++        EncodingRequired = Uma entidade submetida a parsing n\u00E3o codificada em UTF-8 nem em UTF-16 deve conter uma declara\u00E7\u00E3o de codifica\u00E7\u00E3o.
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = O elemento ou o atributo n\u00E3o correspondem \u00E0 produ\u00E7\u00E3o QName: QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = O elemento \"{0}\" n\u00E3o pode ter \"xmlns\" como seu prefixo.
+-        ElementPrefixUnbound = O prefixo \"{0}\" do elemento \"{1}\" n\u00E3o est\u00E1 vinculado.
+-        AttributePrefixUnbound = O prefixo \"{2}\" do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00E3o est\u00E1 vinculado.
+-        EmptyPrefixedAttName = O valor do atributo \"{0}\" \u00E9 inv\u00E1lido. Associa\u00E7\u00F5es de namespace prefixadas n\u00E3o podem ficar vazias.
+-        PrefixDeclared = O prefixo do namespace \"{0}\" n\u00E3o foi declarado.
++        ElementXMLNSPrefix = O elemento "{0}" n\u00E3o pode ter "xmlns" como seu prefixo.
++        ElementPrefixUnbound = O prefixo "{0}" do elemento "{1}" n\u00E3o est\u00E1 vinculado.
++        AttributePrefixUnbound = O prefixo "{2}" do atributo "{1}" associado a um tipo de elemento "{0}" n\u00E3o est\u00E1 vinculado.
++        EmptyPrefixedAttName = O valor do atributo "{0}" \u00E9 inv\u00E1lido. Associa\u00E7\u00F5es de namespace prefixadas n\u00E3o podem ficar vazias.
++        PrefixDeclared = O prefixo do namespace "{0}" n\u00E3o foi declarado.
+         CantBindXMLNS = O prefixo "xmlns" n\u00E3o pode ser vinculado a um namespace explicitamente, assim como o namespace de "xmlns" n\u00E3o pode ser vinculado a um prefixo explicitamente.
+         CantBindXML = O prefixo "xml" n\u00E3o pode ser vinculado a um namespace diferente do namespace comum, assim como o namespace de "xml" n\u00E3o pode ser vinculado a um prefixo diferente de "xml".
+-        MSG_ATT_DEFAULT_INVALID = O defaultValue \"{1}\" do atributo \"{0}\" n\u00E3o \u00E9 v\u00E1lido para as restri\u00E7\u00F5es l\u00E9xicas deste tipo de atributo.
++        MSG_ATT_DEFAULT_INVALID = O defaultValue "{1}" do atributo "{0}" n\u00E3o \u00E9 v\u00E1lido para as restri\u00E7\u00F5es l\u00E9xicas deste tipo de atributo.
  
- LDFLAGS += -L$(OPENWIN_LIB)
-+ifeq ($(OS_NAME), netbsd)
-+LDFLAGS += -Wl,-R$(OPENWIN_LIB)
-+endif
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
  
- # For Xrender extension.
- ifeq ($(PLATFORM), solaris)
-@@ -63,6 +66,11 @@
- dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
- endif
  
-+ifeq ($(PLATFORM), bsd)
-+LDFLAGS += -pthread
-+dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
-+endif
-+
- ifeq ($(PLATFORM), macosx))
- LDFLAGS += -pthread
- dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
-@@ -110,8 +118,6 @@
- dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
- endif
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=O parser detectou mais de \"{0}\" expans\u00F5es da entidade neste documento. Este \u00E9 o limite imposto pela aplica\u00E7\u00E3o.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: O parser detectou mais de "{0}" expans\u00F5es da entidade neste documento. Este \u00E9 o limite imposto pelo JDK.
++        ElementAttributeLimit=JAXP00010002: o elemento "{0}" tem mais de "{1}" atributos. "{1}" \u00E9 o limite imposto pelo JDK.
++        MaxEntitySizeLimit=JAXP00010003: o tamanho da entidade "{0}" \u00E9 "{1}", o que excede o limite de "{2}" definido por "{3}".
++        TotalEntitySizeLimit=JAXP00010004: o tamanho acumulado  "{0}" de entidades excedeu o limite de "{1}" definido por "{2}".
++        MaxXMLNameLimit=JAXP00010005: o nome "{0}" excedeu o limite de "{1}" definido por "{2}".
  
--CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= O elemento \"{0}\" tem mais de \"{1}\" atributos. \"{1}\" \u00E9 o limite imposto pela aplica\u00E7\u00E3o.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
 -
- CPPFLAGS += -DXAWT -DXAWT_HACK \
-         -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
-         -I$(PLATFORM_SRC)/native/sun/awt \
-@@ -138,6 +144,8 @@
-         -I$(SHARE_SRC)/native/sun/awt \
-         -I$(PLATFORM_SRC)/native/sun/awt
- 
-+CPPFLAGS += -I$(CUPS_HEADERS_PATH)
-+
- ifeq ($(PLATFORM), linux)
-   ifndef CROSS_COMPILE_ARCH
-     # Allows for builds on Debian GNU Linux, X11 is in a different place 
-@@ -173,6 +181,11 @@
-  endif
- endif
- 
-+ifeq ($(PLATFORM), bsd)
-+  CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(OPENWIN_HOME)/include
-+  CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
-+endif
-+
- ifeq ($(PLATFORM), macosx)
-   CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
- endif
---- jdk/make/tools/CharsetMapping/IBM290.c2b	1969-12-31 16:00:00.000000000 -0800
-+++ jdk/make/tools/CharsetMapping/IBM290.c2b	2014-04-20 12:39:23.000000000 -0700
-@@ -0,0 +1,100 @@
-+# 
-+# Diff of 
-+# b2c: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
-+# c2b: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.UPMAP100
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
 +#
-+# fullwidth form
-+0x4B    U+FF0E
-+0x4C    U+FF1C
-+0x4D    U+FF08
-+0x4E    U+FF0B
-+0x4F    U+FF5C
-+0x50    U+FF06
-+0x5A    U+FF01
-+0x5C    U+FF0A
-+0x5D    U+FF09
-+0x5E    U+FF1B
-+0x60    U+FF0D
-+0x61    U+FF0F
-+0x62    U+FF41
-+0x63    U+FF42
-+0x64    U+FF43
-+0x65    U+FF44
-+0x66    U+FF45
-+0x67    U+FF46
-+0x68    U+FF47
-+0x69    U+FF48
-+0x6B    U+FF0C
-+0x6C    U+FF05
-+0x6D    U+FF3F
-+0x6E    U+FF1E
-+0x6F    U+FF1F
-+0x70    U+FF3B
-+0x71    U+FF49
-+0x72    U+FF4A
-+0x73    U+FF4B
-+0x74    U+FF4C
-+0x75    U+FF4D
-+0x76    U+FF4E
-+0x77    U+FF4F
-+0x78    U+FF50
-+0x79    U+FF40
-+0x7A    U+FF1A
-+0x7B    U+FF03
-+0x7C    U+FF20
-+0x7D    U+FF07
-+0x7E    U+FF1D
-+0x7F    U+FF02
-+0x80    U+FF3D
-+0x8B    U+FF51
-+0x9B    U+FF52
-+0xA0    U+FF5E
-+0xAB    U+FF53
-+0xB0    U+FF3E
-+0xB2    U+FF3C
-+0xB3    U+FF54
-+0xB4    U+FF55
-+0xB5    U+FF56
-+0xB6    U+FF57
-+0xB7    U+FF58
-+0xB8    U+FF59
-+0xB9    U+FF5A
-+0xC0    U+FF5B
-+0xC1    U+FF21
-+0xC2    U+FF22
-+0xC3    U+FF23
-+0xC4    U+FF24
-+0xC5    U+FF25
-+0xC6    U+FF26
-+0xC7    U+FF27
-+0xC8    U+FF28
-+0xC9    U+FF29
-+0xD0    U+FF5D
-+0xD1    U+FF2A
-+0xD2    U+FF2B
-+0xD3    U+FF2C
-+0xD4    U+FF2D
-+0xD5    U+FF2E
-+0xD6    U+FF2F
-+0xD7    U+FF30
-+0xD8    U+FF31
-+0xD9    U+FF32
-+0xE0    U+FF04
-+0xE2    U+FF33
-+0xE3    U+FF34
-+0xE4    U+FF35
-+0xE5    U+FF36
-+0xE6    U+FF37
-+0xE7    U+FF38
-+0xE8    U+FF39
-+0xE9    U+FF3A
-+0xF0    U+FF10
-+0xF1    U+FF11
-+0xF2    U+FF12
-+0xF3    U+FF13
-+0xF4    U+FF14
-+0xF5    U+FF15
-+0xF6    U+FF16
-+0xF7    U+FF17
-+0xF8    U+FF18
-+0xF9    U+FF19
---- jdk/make/tools/CharsetMapping/IBM290.map	1969-12-31 16:00:00.000000000 -0800
-+++ jdk/make/tools/CharsetMapping/IBM290.map	2014-04-20 12:39:22.000000000 -0700
-@@ -0,0 +1,232 @@
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 +#
-+# b2c mapping for IBM290, generated from
-+# cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
++# 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.
 +#
-+0x00    U+0000
-+0x01    U+0001
-+0x02    U+0002
-+0x03    U+0003
-+0x04    U+009C
-+0x05    U+0009
-+0x06    U+0086
-+0x07    U+007F
-+0x08    U+0097
-+0x09    U+008D
-+0x0A    U+008E
-+0x0B    U+000B
-+0x0C    U+000C
-+0x0D    U+000D
-+0x0E    U+000E
-+0x0F    U+000F
-+0x10    U+0010
-+0x11    U+0011
-+0x12    U+0012
-+0x13    U+0013
-+0x14    U+009D
-+0x15    U+0085
-+0x16    U+0008
-+0x17    U+0087
-+0x18    U+0018
-+0x19    U+0019
-+0x1A    U+0092
-+0x1B    U+008F
-+0x1C    U+001C
-+0x1D    U+001D
-+0x1E    U+001E
-+0x1F    U+001F
-+0x20    U+0080
-+0x21    U+0081
-+0x22    U+0082
-+0x23    U+0083
-+0x24    U+0084
-+0x25    U+000A
-+0x26    U+0017
-+0x27    U+001B
-+0x28    U+0088
-+0x29    U+0089
-+0x2A    U+008A
-+0x2B    U+008B
-+0x2C    U+008C
-+0x2D    U+0005
-+0x2E    U+0006
-+0x2F    U+0007
-+0x30    U+0090
-+0x31    U+0091
-+0x32    U+0016
-+0x33    U+0093
-+0x34    U+0094
-+0x35    U+0095
-+0x36    U+0096
-+0x37    U+0004
-+0x38    U+0098
-+0x39    U+0099
-+0x3A    U+009A
-+0x3B    U+009B
-+0x3C    U+0014
-+0x3D    U+0015
-+0x3E    U+009E
-+0x3F    U+001A
-+0x40    U+0020
-+0x41    U+FF61
-+0x42    U+FF62
-+0x43    U+FF63
-+0x44    U+FF64
-+0x45    U+FF65
-+0x46    U+FF66
-+0x47    U+FF67
-+0x48    U+FF68
-+0x49    U+FF69
-+0x4A    U+00A3
-+0x4B    U+002E
-+0x4C    U+003C
-+0x4D    U+0028
-+0x4E    U+002B
-+0x4F    U+007C
-+0x50    U+0026
-+0x51    U+FF6A
-+0x52    U+FF6B
-+0x53    U+FF6C
-+0x54    U+FF6D
-+0x55    U+FF6E
-+0x56    U+FF6F
-+0x58    U+FF70
-+0x5A    U+0021
-+0x5B    U+00A5
-+0x5C    U+002A
-+0x5D    U+0029
-+0x5E    U+003B
-+0x5F    U+00AC
-+0x60    U+002D
-+0x61    U+002F
-+0x62    U+0061
-+0x63    U+0062
-+0x64    U+0063
-+0x65    U+0064
-+0x66    U+0065
-+0x67    U+0066
-+0x68    U+0067
-+0x69    U+0068
-+0x6B    U+002C
-+0x6C    U+0025
-+0x6D    U+005F
-+0x6E    U+003E
-+0x6F    U+003F
-+0x70    U+005B
-+0x71    U+0069
-+0x72    U+006A
-+0x73    U+006B
-+0x74    U+006C
-+0x75    U+006D
-+0x76    U+006E
-+0x77    U+006F
-+0x78    U+0070
-+0x79    U+0060
-+0x7A    U+003A
-+0x7B    U+0023
-+0x7C    U+0040
-+0x7D    U+0027
-+0x7E    U+003D
-+0x7F    U+0022
-+0x80    U+005D
-+0x81    U+FF71
-+0x82    U+FF72
-+0x83    U+FF73
-+0x84    U+FF74
-+0x85    U+FF75
-+0x86    U+FF76
-+0x87    U+FF77
-+0x88    U+FF78
-+0x89    U+FF79
-+0x8A    U+FF7A
-+0x8B    U+0071
-+0x8C    U+FF7B
-+0x8D    U+FF7C
-+0x8E    U+FF7D
-+0x8F    U+FF7E
-+0x90    U+FF7F
-+0x91    U+FF80
-+0x92    U+FF81
-+0x93    U+FF82
-+0x94    U+FF83
-+0x95    U+FF84
-+0x96    U+FF85
-+0x97    U+FF86
-+0x98    U+FF87
-+0x99    U+FF88
-+0x9A    U+FF89
-+0x9B    U+0072
-+0x9D    U+FF8A
-+0x9E    U+FF8B
-+0x9F    U+FF8C
-+0xA0    U+007E
-+0xA1    U+203E
-+0xA2    U+FF8D
-+0xA3    U+FF8E
-+0xA4    U+FF8F
-+0xA5    U+FF90
-+0xA6    U+FF91
-+0xA7    U+FF92
-+0xA8    U+FF93
-+0xA9    U+FF94
-+0xAA    U+FF95
-+0xAB    U+0073
-+0xAC    U+FF96
-+0xAD    U+FF97
-+0xAE    U+FF98
-+0xAF    U+FF99
-+0xB0    U+005E
-+0xB1    U+00A2
-+0xB2    U+005C
-+0xB3    U+0074
-+0xB4    U+0075
-+0xB5    U+0076
-+0xB6    U+0077
-+0xB7    U+0078
-+0xB8    U+0079
-+0xB9    U+007A
-+0xBA    U+FF9A
-+0xBB    U+FF9B
-+0xBC    U+FF9C
-+0xBD    U+FF9D
-+0xBE    U+FF9E
-+0xBF    U+FF9F
-+0xC0    U+007B
-+0xC1    U+0041
-+0xC2    U+0042
-+0xC3    U+0043
-+0xC4    U+0044
-+0xC5    U+0045
-+0xC6    U+0046
-+0xC7    U+0047
-+0xC8    U+0048
-+0xC9    U+0049
-+0xD0    U+007D
-+0xD1    U+004A
-+0xD2    U+004B
-+0xD3    U+004C
-+0xD4    U+004D
-+0xD5    U+004E
-+0xD6    U+004F
-+0xD7    U+0050
-+0xD8    U+0051
-+0xD9    U+0052
-+0xE0    U+0024
-+0xE2    U+0053
-+0xE3    U+0054
-+0xE4    U+0055
-+0xE5    U+0056
-+0xE6    U+0057
-+0xE7    U+0058
-+0xE8    U+0059
-+0xE9    U+005A
-+0xF0    U+0030
-+0xF1    U+0031
-+0xF2    U+0032
-+0xF3    U+0033
-+0xF4    U+0034
-+0xF5    U+0035
-+0xF6    U+0036
-+0xF7    U+0037
-+0xF8    U+0038
-+0xF9    U+0039
-+0xFF    U+009F
---- jdk/make/tools/CharsetMapping/extsbcs	2013-09-06 11:27:42.000000000 -0700
-+++ jdk/make/tools/CharsetMapping/extsbcs	2014-04-20 12:39:23.000000000 -0700
-@@ -28,6 +28,7 @@
- IBM280		IBM280		Cp280		false		sun.nio.cs.ext
- IBM284		IBM284		Cp284		false		sun.nio.cs.ext
- IBM285		IBM285		Cp285		false		sun.nio.cs.ext
-+IBM290		IBM290		Cp290		false		sun.nio.cs.ext
- IBM297		IBM297		Cp297		false		sun.nio.cs.ext
- IBM420		IBM420		Cp420		false		sun.nio.cs.ext
- IBM424		IBM424		Cp424		false		sun.nio.cs.ext
---- jdk/make/tools/freetypecheck/Makefile	2013-09-06 11:27:43.000000000 -0700
-+++ jdk/make/tools/freetypecheck/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -52,8 +52,15 @@
-   else 
-     ifeq ($(PLATFORM), macosx)
-       FT_LD_OPTIONS += -lfreetype -lz
--    else # linux
--      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
-+    else
-+      ifeq ($(PLATFORM), bsd)
-+        ifeq ($(OS_NAME), netbsd)
-+          FT_LD_OPTIONS += -Wl,-R$(FREETYPE_LIB_PATH)
-+        endif
-+        FT_LD_OPTIONS += -lfreetype -lz
-+      else # linux
-+        FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
-+      endif
-     endif
-   endif
- endif
---- jdk/make/tools/sharing/classlist.bsd	1969-12-31 16:00:00.000000000 -0800
-+++ jdk/make/tools/sharing/classlist.bsd	2014-04-20 12:39:23.000000000 -0700
-@@ -0,0 +1,2327 @@
-+java/lang/Object
-+java/lang/String
-+java/io/Serializable
-+java/lang/Comparable
-+java/lang/CharSequence
-+java/lang/Class
-+java/lang/reflect/GenericDeclaration
-+java/lang/reflect/Type
-+java/lang/reflect/AnnotatedElement
-+java/lang/Cloneable
-+java/lang/ClassLoader
-+java/lang/System
-+java/lang/Throwable
-+java/lang/Error
-+java/lang/ThreadDeath
-+java/lang/Exception
-+java/lang/RuntimeException
-+java/security/ProtectionDomain
-+java/security/AccessControlContext
-+java/lang/ClassNotFoundException
-+java/lang/NoClassDefFoundError
-+java/lang/LinkageError
-+java/lang/ClassCastException
-+java/lang/ArrayStoreException
-+java/lang/VirtualMachineError
-+java/lang/OutOfMemoryError
-+java/lang/StackOverflowError
-+java/lang/IllegalMonitorStateException
-+java/lang/ref/Reference
-+java/lang/ref/SoftReference
-+java/lang/ref/WeakReference
-+java/lang/ref/FinalReference
-+java/lang/ref/PhantomReference
-+java/lang/ref/Finalizer
-+java/lang/Thread
-+java/lang/Runnable
-+java/lang/ThreadGroup
-+java/lang/Thread$UncaughtExceptionHandler
-+java/util/Properties
-+java/util/Hashtable
-+java/util/Map
-+java/util/Dictionary
-+java/lang/reflect/AccessibleObject
-+java/lang/reflect/Field
-+java/lang/reflect/Member
-+java/lang/reflect/Method
-+java/lang/reflect/Constructor
-+sun/reflect/MagicAccessorImpl
-+sun/reflect/MethodAccessorImpl
-+sun/reflect/MethodAccessor
-+sun/reflect/ConstructorAccessorImpl
-+sun/reflect/ConstructorAccessor
-+sun/reflect/DelegatingClassLoader
-+sun/reflect/ConstantPool
-+sun/reflect/UnsafeStaticFieldAccessorImpl
-+sun/reflect/UnsafeFieldAccessorImpl
-+sun/reflect/FieldAccessorImpl
-+sun/reflect/FieldAccessor
-+java/util/Vector
-+java/util/List
-+java/util/Collection
-+java/lang/Iterable
-+java/util/RandomAccess
-+java/util/AbstractList
-+java/util/AbstractCollection
-+java/lang/StringBuffer
-+java/lang/AbstractStringBuilder
-+java/lang/Appendable
-+java/lang/StackTraceElement
-+java/nio/Buffer
-+java/lang/Boolean
-+java/lang/Character
-+java/lang/Float
-+java/lang/Number
-+java/lang/Double
-+java/lang/Byte
-+java/lang/Short
-+java/lang/Integer
-+java/lang/Long
-+java/lang/NullPointerException
-+java/lang/ArithmeticException
-+java/io/ObjectStreamField
-+java/lang/String$CaseInsensitiveComparator
-+java/util/Comparator
-+java/lang/RuntimePermission
-+java/security/BasicPermission
-+java/security/Permission
-+java/security/Guard
-+sun/misc/SoftCache
-+java/util/AbstractMap
-+java/lang/ref/ReferenceQueue
-+java/lang/ref/ReferenceQueue$Null
-+java/lang/ref/ReferenceQueue$Lock
-+java/util/HashMap
-+java/lang/annotation/Annotation
-+java/util/HashMap$Entry
-+java/util/Map$Entry
-+java/security/AccessController
-+java/lang/reflect/ReflectPermission
-+sun/reflect/ReflectionFactory$GetReflectionFactoryAction
-+java/security/PrivilegedAction
-+java/util/Stack
-+sun/reflect/ReflectionFactory
-+java/lang/ref/Reference$Lock
-+java/lang/ref/Reference$ReferenceHandler
-+java/lang/ref/Finalizer$FinalizerThread
-+java/util/Enumeration
-+java/util/Iterator
-+java/util/Hashtable$Entry
-+java/nio/charset/Charset
-+sun/nio/cs/StandardCharsets
-+sun/nio/cs/FastCharsetProvider
-+java/nio/charset/spi/CharsetProvider
-+sun/nio/cs/StandardCharsets$Aliases
-+sun/util/PreHashedMap
-+sun/nio/cs/StandardCharsets$Classes
-+sun/nio/cs/StandardCharsets$Cache
-+java/lang/ThreadLocal
-+java/util/concurrent/atomic/AtomicInteger
-+sun/misc/Unsafe
-+java/lang/NoSuchMethodError
-+java/lang/IncompatibleClassChangeError
-+sun/reflect/Reflection
-+java/util/Collections
++# 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.
++#
+ 
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i dokumentets prolog.
+         InvalidCharInXMLDecl = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i XML-deklarationen.
+ # 2.4 Character Data and Markup
+-        CDEndInContent = Teckensekvensen \"]]>\" f\u00E5r inte f\u00F6rekomma i inneh\u00E5llet, s\u00E5vida det inte anv\u00E4nds f\u00F6r att markera slut av CDATA-sektion.
++        CDEndInContent = Teckensekvensen "]]>" f\u00E5r inte f\u00F6rekomma i inneh\u00E5llet, s\u00E5vida det inte anv\u00E4nds f\u00F6r att markera slut av CDATA-sektion.
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = CDATA-sektionen m\u00E5ste sluta med \"]]>\".
++        CDSectUnterminated = CDATA-sektionen m\u00E5ste sluta med "]]>".
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = XML-deklarationen f\u00E5r endast f\u00F6rekomma allra \u00F6verst i dokumentet.
+-        EqRequiredInXMLDecl = Tecknet '' = '' m\u00E5ste anges efter \"{0}\" i XML-deklarationen.
+-        QuoteRequiredInXMLDecl = V\u00E4rdet som f\u00F6ljer \"{0}\" i XML-deklarationen m\u00E5ste omges av citattecken.
+-        XMLDeclUnterminated = XML-deklarationen m\u00E5ste avslutas med \"?>\".
++        EqRequiredInXMLDecl = Tecknet '' = '' m\u00E5ste anges efter "{0}" i XML-deklarationen.
++        QuoteRequiredInXMLDecl = V\u00E4rdet som f\u00F6ljer "{0}" i XML-deklarationen m\u00E5ste omges av citattecken.
++        XMLDeclUnterminated = XML-deklarationen m\u00E5ste avslutas med "?>".
+         VersionInfoRequired = Versionen kr\u00E4vs i XML-deklarationen.
+         SpaceRequiredBeforeVersionInXMLDecl = Tomt utrymme kr\u00E4vs f\u00F6re versionens pseudoattribut i XML-deklarationen.
+         SpaceRequiredBeforeEncodingInXMLDecl = Tomt utrymme kr\u00E4vs f\u00F6re kodningens pseudoattribut i XML-deklarationen.
+@@ -71,70 +68,71 @@
+         ReferenceIllegalInTrailingMisc=Referensen \u00E4r inte till\u00E5ten i efterf\u00F6ljande avsnitt.
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = Deklarationsv\u00E4rdet f\u00F6r frist\u00E5ende dokument m\u00E5ste vara \"yes\" eller \"no\", inte \"{0}\".
++        SDDeclInvalid = Deklarationsv\u00E4rdet f\u00F6r frist\u00E5ende dokument m\u00E5ste vara "yes" eller "no", inte "{0}".
++        SDDeclNameInvalid = Det frist\u00E5ende namnet i XML-deklarationen kan vara felstavat.
+ # 2.12 Language Identification
+-        XMLLangInvalid = Attributv\u00E4rdet \"{0}\" f\u00F6r xml:lang \u00E4r en ogiltig spr\u00E5kidentifierare.
++        XMLLangInvalid = Attributv\u00E4rdet "{0}" f\u00F6r xml:lang \u00E4r en ogiltig spr\u00E5kidentifierare.
+ # 3. Logical Structures
+-        ETagRequired = Elementtyp \"{0}\" m\u00E5ste avslutas med matchande sluttagg \"\".
++        ETagRequired = Elementtyp "{0}" m\u00E5ste avslutas med matchande sluttagg "".
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = Elementtyp \"{0}\" m\u00E5ste f\u00F6ljas av n\u00E5gondera av attributspecifikationerna \">\" eller \"/>\".
+-        EqRequiredInAttribute = Attributnamnet \"{1}\" som associeras med elementtyp \"{0}\" m\u00E5ste f\u00F6ljas av likhetstecknet ('' = '').
+-        OpenQuoteExpected = \u00D6ppningscitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet \"{1}\" som associeras med elementtyp \"{0}\".
+-        CloseQuoteExpected = Slutcitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet \"{1}\" som associeras med elementtyp \"{0}\".
+-        AttributeNotUnique = Attributet \"{1}\" har redan angetts f\u00F6r elementet \"{0}\".
+-        AttributeNSNotUnique = Attributet \"{1}\" bundet till namnrymden \"{2}\" har redan angetts f\u00F6r elementet \"{0}\".
+-        ETagUnterminated = Sluttaggen f\u00F6r elementtyp \"{0}\" m\u00E5ste avslutas med en ''>''-avgr\u00E4nsare.
++        ElementUnterminated = Elementtyp "{0}" m\u00E5ste f\u00F6ljas av n\u00E5gondera av attributspecifikationerna ">" eller "/>".
++        EqRequiredInAttribute = Attributnamnet "{1}" som associeras med elementtyp "{0}" m\u00E5ste f\u00F6ljas av likhetstecknet ('' = '').
++        OpenQuoteExpected = \u00D6ppningscitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet "{1}" som associeras med elementtyp "{0}".
++        CloseQuoteExpected = Slutcitattecken f\u00F6rv\u00E4ntas f\u00F6r attributet "{1}" som associeras med elementtyp "{0}".
++        AttributeNotUnique = Attributet "{1}" har redan angetts f\u00F6r elementet "{0}".
++        AttributeNSNotUnique = Attributet "{1}" bundet till namnrymden "{2}" har redan angetts f\u00F6r elementet "{0}".
++        ETagUnterminated = Sluttaggen f\u00F6r elementtyp "{0}" m\u00E5ste avslutas med en ''>''-avgr\u00E4nsare.
+         MarkupNotRecognizedInContent = Elementinneh\u00E5llet m\u00E5ste best\u00E5 av v\u00E4lformulerad(e) teckendata eller kodtext.
+         DoctypeIllegalInContent = DOCTYPE \u00E4r inte till\u00E5tet i inneh\u00E5llet.
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = Referensen m\u00E5ste avslutas med en ';'-avgr\u00E4nsare.
+ # 4.3.2 Well-Formed Parsed Entities
+         ReferenceNotInOneEntity = Referensen m\u00E5ste finnas med inom samma tolkade enhet.
+-        ElementEntityMismatch = Elementet \"{0}\" m\u00E5ste b\u00F6rja och sluta inom samma enhet.
++        ElementEntityMismatch = Elementet "{0}" m\u00E5ste b\u00F6rja och sluta inom samma enhet.
+         MarkupEntityMismatch=XML-dokumentstrukturer m\u00E5ste b\u00F6rja och sluta inom samma enhet.
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = Ett ogiltigt XML-tecken (Unicode: 0x{2}) hittades i attributv\u00E4rdet \"{1}\" och elementet \u00E4r \"{0}\".
++        InvalidCharInAttValue = Ett ogiltigt XML-tecken (Unicode: 0x{2}) hittades i attributv\u00E4rdet "{1}" och elementet \u00E4r "{0}".
+         InvalidCharInComment = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i kommentaren.
+-        InvalidCharInPI = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades bearbetningsinstruktionen.
++        InvalidCharInPI = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i bearbetningsinstruktionen.
+         InvalidCharInInternalSubset = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i den interna delm\u00E4ngden i DTD.
+         InvalidCharInTextDecl = Ett ogiltigt XML-tecken (Unicode: 0x{0}) hittades i textdeklarationen.
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = Attributv\u00E4rdet \"{1}\" m\u00E5ste b\u00F6rja med antingen enkelt eller dubbelt citattecken.
+-        LessthanInAttValue = Attributv\u00E4rdet \"{1}\" som associeras med elementtyp \"{0}\" f\u00E5r inte inneh\u00E5lla n\u00E5got ''<''-tecken.
+-        AttributeValueUnterminated = Attributv\u00E4rdet \"{1}\" m\u00E5ste avslutas med matchande citattecken.
++        QuoteRequiredInAttValue = Attributv\u00E4rdet "{1}" m\u00E5ste b\u00F6rja med antingen enkelt eller dubbelt citattecken.
++        LessthanInAttValue = Attributv\u00E4rdet "{1}" som associeras med elementtyp "{0}" f\u00E5r inte inneh\u00E5lla n\u00E5got ''<''-tecken.
++        AttributeValueUnterminated = Attributv\u00E4rdet "{1}" m\u00E5ste avslutas med matchande citattecken.
+ # 2.5 Comments
+-        InvalidCommentStart = Kommentarer m\u00E5ste inledas med \"\".
++        InvalidCommentStart = Kommentarer m\u00E5ste inledas med "".
+         COMMENT_NOT_IN_ONE_ENTITY = Kommentaren innesluts inte i samma enhet.
+ # 2.6 Processing Instructions
+         PITargetRequired = Bearbetningsinstruktionen m\u00E5ste b\u00F6rja med m\u00E5lnamnet.
+         SpaceRequiredInPI = Tomt utrymme kr\u00E4vs mellan bearbetningsinstruktionens m\u00E5l och data.
+-        PIUnterminated = Bearbetningsinstruktionen m\u00E5ste avslutas med \"?>\".
+-        ReservedPITarget = Bearbetningsinstruktionens m\u00E5lmatchning \"[xX][mM][lL]\" \u00E4r inte till\u00E5ten.
++        PIUnterminated = Bearbetningsinstruktionen m\u00E5ste avslutas med "?>".
++        ReservedPITarget = Bearbetningsinstruktionens m\u00E5lmatchning "[xX][mM][lL]" \u00E4r inte till\u00E5ten.
+         PI_NOT_IN_ONE_ENTITY = Bearbetningsinstruktionen innesluts inte i samma enhet.
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = Ogiltig version \"{0}\".
+-        VersionNotSupported = XML-versionen \"{0}\" st\u00F6ds inte, endast XML 1.0 st\u00F6ds.
+-        VersionNotSupported11 = XML-versionen \"{0}\" st\u00F6ds inte, endast XML 1.0 och XML 1.1 st\u00F6ds.
++        VersionInfoInvalid = Ogiltig version "{0}".
++        VersionNotSupported = XML-versionen "{0}" st\u00F6ds inte, endast XML 1.0 st\u00F6ds.
++        VersionNotSupported11 = XML-versionen "{0}" st\u00F6ds inte, endast XML 1.0 och XML 1.1 st\u00F6ds.
+         VersionMismatch= En enhet kan inte inkludera n\u00E5gon annan enhet som har en senare version.
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = Ett decimalt uttryck m\u00E5ste anges direkt efter \"&#\" i en teckenreferens.
+-        HexdigitRequiredInCharRef = Ett hexadecimalt uttryck m\u00E5ste anges direkt efter \"&#x\" i en teckenreferens.
++        DigitRequiredInCharRef = Ett decimalt uttryck m\u00E5ste anges direkt efter "&#" i en teckenreferens.
++        HexdigitRequiredInCharRef = Ett hexadecimalt uttryck m\u00E5ste anges direkt efter "&#x" i en teckenreferens.
+         SemicolonRequiredInCharRef = Teckenreferensen m\u00E5ste avslutas med ';'-avgr\u00E4nsare.
+-        InvalidCharRef = Teckenreferensen \"&#{0}\" \u00E4r ett ogiltigt XML-tecken.
++        InvalidCharRef = Teckenreferensen "&#{0}" \u00E4r ett ogiltigt XML-tecken.
+         NameRequiredInReference = Enhetsnamnet m\u00E5ste omedelbart f\u00F6ljas av '&' i enhetsreferensen.
+-        SemicolonRequiredInReference = Referensen till enhet \"{0}\" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
++        SemicolonRequiredInReference = Referensen till enhet "{0}" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
+ # 4.3.1 The Text Declaration
+         TextDeclMustBeFirst = Textdeklarationen m\u00E5ste anges direkt i b\u00F6rjan av externt tolkad enhet.
+-        EqRequiredInTextDecl = Ett likhetstecken ('' = '') m\u00E5ste anges efter \"{0}\" i textdeklarationen.
+-        QuoteRequiredInTextDecl = V\u00E4rdet som f\u00F6ljer \"{0}\" i textdeklarationen m\u00E5ste omges av citattecken.
+-        CloseQuoteMissingInTextDecl = avslutande citattecken saknas f\u00F6r v\u00E4rdet efter \"{0}\" i textdeklarationen.
++        EqRequiredInTextDecl = Ett likhetstecken ('' = '') m\u00E5ste anges efter "{0}" i textdeklarationen.
++        QuoteRequiredInTextDecl = V\u00E4rdet som f\u00F6ljer "{0}" i textdeklarationen m\u00E5ste omges av citattecken.
++        CloseQuoteMissingInTextDecl = avslutande citattecken saknas f\u00F6r v\u00E4rdet efter "{0}" i textdeklarationen.
+         SpaceRequiredBeforeVersionInTextDecl = Tomt utrymme kr\u00E4vs f\u00F6re versionens pseudoattribut i textdeklarationen.
+         SpaceRequiredBeforeEncodingInTextDecl = Tomt utrymme kr\u00E4vs f\u00F6re kodningens pseudoattribut i textdeklarationen.
+-        TextDeclUnterminated = Textdeklarationen m\u00E5ste avslutas med \"?>\".
++        TextDeclUnterminated = Textdeklarationen m\u00E5ste avslutas med "?>".
+         EncodingDeclRequired = Koddeklaration kr\u00E4vs i textdeklarationen.
+         NoMorePseudoAttributes = Inga fler pseudoattribut \u00E4r till\u00E5tna.
+         MorePseudoAttributes = Ytterligare pseudoattribut f\u00F6rv\u00E4ntas.
+@@ -143,13 +141,13 @@
+         CommentNotInOneEntity = Kommentaren m\u00E5ste finnas med inom samma tolkade enhet.
+         PINotInOneEntity = Bearbetningsinstruktionen m\u00E5ste finnas med inom samma tolkade enhet.
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = Ogiltigt kodnamn, \"{0}\".
+-        EncodingByteOrderUnsupported = Angiven byteordningsf\u00F6ljd i kodning \"{0}\" st\u00F6ds inte.
++        EncodingDeclInvalid = Ogiltigt kodnamn, "{0}".
++        EncodingByteOrderUnsupported = Angiven byteordningsf\u00F6ljd i kodning "{0}" st\u00F6ds inte.
+         InvalidByte = Ogiltig byte {0} i UTF-8-sekvensen f\u00F6r {1}-byte.
+         ExpectedByte = F\u00F6rv\u00E4ntad byte {0} i UTF-8-sekvensen f\u00F6r {1}-byte.  
+         InvalidHighSurrogate = H\u00F6ga surrogatbitar i UTF-8-sekvens f\u00E5r inte \u00F6verskrida 0x10, men 0x{0} hittades.
+-        OperationNotSupported = Operation \"{0}\" st\u00F6ds inte i l\u00E4saren {1}.
+-        InvalidASCII = Byte \"{0}\" ing\u00E5r inte i ASCII-teckenupps\u00E4ttningen (7 bitar).
++        OperationNotSupported = Operation "{0}" st\u00F6ds inte i l\u00E4saren {1}.
++        InvalidASCII = Byte "{0}" ing\u00E5r inte i ASCII-teckenupps\u00E4ttningen (7 bitar).
+         CharConversionFailure = En enhet som fastst\u00E4lls anv\u00E4nda ett visst kodformat f\u00E5r inte inneh\u00E5lla sekvenser som \u00E4r otill\u00E5tna i kodningen.
+         
+ # DTD Messages
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = Tecknet (Unicode: 0x{0}) \u00E4r inte till\u00E5tet i den allm\u00E4nna identifieraren.
+         SpaceRequiredBetweenPublicAndSystem = Tomma utrymmen kr\u00E4vs mellan publicId och systemId.
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Tomt utrymme kr\u00E4vs efter \"''.
+-        PEReferenceWithinMarkup = Parameterreferensen \"%{0};\" f\u00E5r inte f\u00F6rekomma i kodtexten i den interna delm\u00E4ngden i DTD.
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Tomt utrymme kr\u00E4vs efter "''.
++        PEReferenceWithinMarkup = Parameterreferensen "%{0};" f\u00E5r inte f\u00F6rekomma i kodtexten i den interna delm\u00E4ngden i DTD.
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Kodtextdeklarationerna som finns med eller pekas till fr\u00E5n dokumenttypdeklarationen m\u00E5ste vara v\u00E4lformulerade.
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklarationen f\u00F6r \"xml:space\" m\u00E5ste anges som uppr\u00E4kningstyp vars enda m\u00F6jliga v\u00E4rden \u00E4r \"default\" och \"preserve\".
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = Attributdeklarationen f\u00F6r "xml:space" m\u00E5ste anges som uppr\u00E4kningstyp vars enda m\u00F6jliga v\u00E4rden \u00E4r "default" och "preserve".
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = Tomt utrymme kr\u00E4vs efter \"''.
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = Tomt utrymme kr\u00E4vs efter elementtyp "{0}" i elementtypdeklarationen.
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = Begr\u00E4nsningen kr\u00E4vs efter elementtyp "{0}" i elementtypdeklarationen.
++        ElementDeclUnterminated = Deklarationen f\u00F6r elementtyp "{0}" m\u00E5ste avslutas med ''>''.
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Tecknet ''('' eller en elementtyp m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = Tecknet ''('' eller en elementtyp m\u00E5ste anges i deklarationen av elementtyp "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp "{0}".
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = En elementtyp m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp \"{0}\".
+-        MixedContentUnterminated = Modellen med blandat inneh\u00E5ll \"{0}\" m\u00E5ste avslutas med \")*\" om typer av underordnade element \u00E4r begr\u00E4nsade.
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = En elementtyp m\u00E5ste anges i deklarationen av elementtyp "{0}".
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = Tecknet '')'' m\u00E5ste anges i deklarationen av elementtyp "{0}".
++        MixedContentUnterminated = Modellen med blandat inneh\u00E5ll "{0}" m\u00E5ste avslutas med ")*" om typer av underordnade element \u00E4r begr\u00E4nsade.
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = Tomt utrymme kr\u00E4vs efter \"\".
+-        IgnoreSectUnterminated = Exkluderat villkorsavsnitt m\u00E5ste avslutas med \"]]>\".
++        IncludeSectUnterminated = Inkluderat villkorsavsnitt m\u00E5ste avslutas med "]]>".
++        IgnoreSectUnterminated = Exkluderat villkorsavsnitt m\u00E5ste avslutas med "]]>".
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = Enhetsnamnet m\u00E5ste omedelbart f\u00F6ljas av '%' i parameterreferensen.
+-        SemicolonRequiredInPEReference = Parameterreferensen \"%{0};\" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
++        SemicolonRequiredInPEReference = Parameterreferensen "%{0};" m\u00E5ste avslutas med '';''-avgr\u00E4nsare.
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = Tomt utrymme kr\u00E4vs efter \"''.
+-	MSG_DUPLICATE_ENTITY_DEFINITION = Enheten \"{0}\" har deklarerats mer \u00E4n en g\u00E5ng.        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = Tomt utrymme kr\u00E4vs mellan enhetsnamnet "{0}" och definitionen i enhetsdeklarationen.
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = Tomt utrymme kr\u00E4vs mellan "NDATA" och notationsnamnet i deklarationen f\u00F6r enheten "{0}".
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = Tomt utrymme kr\u00E4vs f\u00F6re "NDATA" i deklarationen f\u00F6r enheten "{0}".
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = Notationsnamnet m\u00E5ste anges efter "NDATA" i deklarationen f\u00F6r enheten "{0}".
++        EntityDeclUnterminated = Deklarationen f\u00F6r enheten "{0}" m\u00E5ste avslutas med ''>''.
++	MSG_DUPLICATE_ENTITY_DEFINITION = Enheten "{0}" har deklarerats mer \u00E4n en g\u00E5ng.        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = Den externa enhetsdeklarationen m\u00E5ste inledas med antingen \"SYSTEM\" eller \"PUBLIC\".
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan \"PUBLIC\" och den allm\u00E4nna identifieraren.
++        ExternalIDRequired = Den externa enhetsdeklarationen m\u00E5ste inledas med antingen "SYSTEM" eller "PUBLIC".
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan "PUBLIC" och den allm\u00E4nna identifieraren.
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan den allm\u00E4nna identifieraren och systemidentifieraren.
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan \"SYSTEM\" och systemidentifieraren.
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragmentidentifieraren f\u00E5r inte anges som del av systemidentifieraren \"{0}\".
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = Tomt utrymme kr\u00E4vs mellan "SYSTEM" och systemidentifieraren.
++        MSG_URI_FRAGMENT_IN_SYSTEMID = Fragmentidentifieraren f\u00E5r inte anges som del av systemidentifieraren "{0}".
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = Tomt utrymme kr\u00E4vs efter \"''.
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = Tomt utrymme kr\u00E4vs efter notationsnamnet "{0}" i notationsdeklarationen.
++        ExternalIDorPublicIDRequired = Deklarationen f\u00F6r notationen "{0}" m\u00E5ste inkludera systemidentifierare eller allm\u00E4n identifierare.
++        NotationDeclUnterminated = Deklarationen f\u00F6r notationen "{0}" m\u00E5ste avslutas med ''>''.
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = Elementtyp \"{1}\" har redan angetts i modellen med inneh\u00E5ll f\u00F6r elementdeklarationen \"{0}\".
+-        ENTITIESInvalid = Attributv\u00E4rdet \"{1}\" av typen ENTITIES m\u00E5ste motsvara namnen p\u00E5 en eller flera otolkade enheter.
+-        ENTITYInvalid = Attributv\u00E4rdet \"{1}\" av typen ENTITY m\u00E5ste motsvara namnet p\u00E5 en otolkad enhet.
+-        IDDefaultTypeInvalid = Id-attributet \"{0}\" m\u00E5ste inneh\u00E5lla deklarerat standardv\u00E4rde \"#IMPLIED\" eller \"#REQUIRED\".
+-        IDInvalid = Attributv\u00E4rdet \"{0}\" av typen ID m\u00E5ste vara ett namn.
+-        IDInvalidWithNamespaces = Attributv\u00E4rdet \"{0}\" av typen ID m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
+-        IDNotUnique = Attributv\u00E4rdet \"{0}\" av typen ID m\u00E5ste vara unikt inom dokumentet.
+-        IDREFInvalid = Attributv\u00E4rdet \"{0}\" av typen IDREF m\u00E5ste vara ett namn.
+-        IDREFInvalidWithNamespaces = Attributv\u00E4rdet \"{0}\" av typen IDREF m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
+-        IDREFSInvalid = Attributv\u00E4rdet \"{0}\" av typen IDREFS m\u00E5ste vara ett eller flera namn.
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5ste inkludera korrekt kapslade deklarationer om enhetsreferensen anv\u00E4nds som fullst\u00E4ndig deklaration.
+-        ImproperDeclarationNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5ste inkludera deklarationer som \u00E4r korrekt kapslade.
+-        ImproperGroupNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5ste inkludera parentespar som \u00E4r korrekt kapslade.
+-        INVALID_PE_IN_CONDITIONAL = Ers\u00E4ttningstexten f\u00F6r parameterenheten \"{0}\" m\u00E5st inkludera hela villkorsavsnittet eller endast INCLUDE eller IGNORE.
+-        MSG_ATTRIBUTE_NOT_DECLARED = Attributet \"{1}\" m\u00E5ste deklareras f\u00F6r elementtyp \"{0}\".
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attributet \"{0}\" med v\u00E4rdet \"{1}\" m\u00E5ste ha ett v\u00E4rde fr\u00E5n listan \"{2}\".
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = V\u00E4rdet \"{1}\" f\u00F6r attributet \"{0}\" f\u00E5r inte \u00E4ndras vid normalisering (till \"{2}\") i ett frist\u00E5ende dokument.
+-        MSG_CONTENT_INCOMPLETE = Inneh\u00E5llet i elementtyp \"{0}\" \u00E4r ofullst\u00E4ndigt, det m\u00E5ste matcha \"{1}\".
+-        MSG_CONTENT_INVALID = Inneh\u00E5llet i elementtyp \"{0}\" m\u00E5ste matcha \"{1}\".
+-        MSG_CONTENT_INVALID_SPECIFIED = Inneh\u00E5llet i elementtyp \"{0}\" m\u00E5ste matcha \"{1}\". Underordnade till typ \"{2}\" \u00E4r inte till\u00E5tna.
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attributet \"{1}\" f\u00F6r elementtyp \"{0}\" har ett standardv\u00E4rde och m\u00E5ste anges i ett frist\u00E5ende dokument.
+-        MSG_DUPLICATE_ATTDEF = Attributet \"{1}\" har redan deklarerats f\u00F6r elementtyp \"{0}\".
+-        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp \"{0}\" f\u00E5r deklareras endast en g\u00E5ng.
+-        MSG_ELEMENT_NOT_DECLARED = Elementtyp \"{0}\" m\u00E5ste deklareras.
++        DuplicateTypeInMixedContent = Elementtyp "{1}" har redan angetts i modellen med inneh\u00E5ll f\u00F6r elementdeklarationen "{0}".
++        ENTITIESInvalid = Attributv\u00E4rdet "{1}" av typen ENTITIES m\u00E5ste motsvara namnen p\u00E5 en eller flera otolkade enheter.
++        ENTITYInvalid = Attributv\u00E4rdet "{1}" av typen ENTITY m\u00E5ste motsvara namnet p\u00E5 en otolkad enhet.
++        IDDefaultTypeInvalid = Id-attributet "{0}" m\u00E5ste inneh\u00E5lla deklarerat standardv\u00E4rde "#IMPLIED" eller "#REQUIRED".
++        IDInvalid = Attributv\u00E4rdet "{0}" av typen ID m\u00E5ste vara ett namn.
++        IDInvalidWithNamespaces = Attributv\u00E4rdet "{0}" av typen ID m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
++        IDNotUnique = Attributv\u00E4rdet "{0}" av typen ID m\u00E5ste vara unikt inom dokumentet.
++        IDREFInvalid = Attributv\u00E4rdet "{0}" av typen IDREF m\u00E5ste vara ett namn.
++        IDREFInvalidWithNamespaces = Attributv\u00E4rdet "{0}" av typen IDREF m\u00E5ste vara NCName om namnrymder anv\u00E4nds.
++        IDREFSInvalid = Attributv\u00E4rdet "{0}" av typen IDREFS m\u00E5ste vara ett eller flera namn.
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5ste inkludera korrekt kapslade deklarationer om enhetsreferensen anv\u00E4nds som fullst\u00E4ndig deklaration.
++        ImproperDeclarationNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5ste inkludera deklarationer som \u00E4r korrekt kapslade.
++        ImproperGroupNesting = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5ste inkludera parentespar som \u00E4r korrekt kapslade.
++        INVALID_PE_IN_CONDITIONAL = Ers\u00E4ttningstexten f\u00F6r parameterenheten "{0}" m\u00E5st inkludera hela villkorsavsnittet eller endast INCLUDE eller IGNORE.
++        MSG_ATTRIBUTE_NOT_DECLARED = Attributet "{1}" m\u00E5ste deklareras f\u00F6r elementtyp "{0}".
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attributet "{0}" med v\u00E4rdet "{1}" m\u00E5ste ha ett v\u00E4rde fr\u00E5n listan "{2}".
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = V\u00E4rdet "{1}" f\u00F6r attributet "{0}" f\u00E5r inte \u00E4ndras vid normalisering (till "{2}") i ett frist\u00E5ende dokument.
++        MSG_CONTENT_INCOMPLETE = Inneh\u00E5llet i elementtyp "{0}" \u00E4r ofullst\u00E4ndigt, det m\u00E5ste matcha "{1}".
++        MSG_CONTENT_INVALID = Inneh\u00E5llet i elementtyp "{0}" m\u00E5ste matcha "{1}".
++        MSG_CONTENT_INVALID_SPECIFIED = Inneh\u00E5llet i elementtyp "{0}" m\u00E5ste matcha "{1}". Underordnade till typ "{2}" \u00E4r inte till\u00E5tna.
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attributet "{1}" f\u00F6r elementtyp "{0}" har ett standardv\u00E4rde och m\u00E5ste anges i ett frist\u00E5ende dokument.
++        MSG_DUPLICATE_ATTDEF = Attributet "{1}" har redan deklarerats f\u00F6r elementtyp "{0}".
++        MSG_ELEMENT_ALREADY_DECLARED = Elementtyp "{0}" f\u00E5r deklareras endast en g\u00E5ng.
++        MSG_ELEMENT_NOT_DECLARED = Elementtyp "{0}" m\u00E5ste deklareras.
+         MSG_GRAMMAR_NOT_FOUND = Dokumentet \u00E4r ogiltigt: hittade ingen grammatik.
+-        MSG_ELEMENT_WITH_ID_REQUIRED = Ett element med identifieraren \"{0}\" m\u00E5ste finnas med i dokumentet.
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referens till den externa enheten \"{0}\" \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
+-        MSG_FIXED_ATTVALUE_INVALID = Attributet \"{1}\" med v\u00E4rdet \"{2}\" m\u00E5ste ha v\u00E4rdet \"{3}\".
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp \"{0}\" har redan attributet \"{1}\" av id-typ, ett andra attribut \"{2}\" av samma typ \u00E4r inte till\u00E5tet.
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp \"{0}\" har redan attributet \"{1}\" av NOTATION-typ, ett andra attribut \"{2}\" av samma typ \u00E4r inte till\u00E5tet.
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notationen \"{1}\" m\u00E5ste deklareras vid referens i notationstyplistan f\u00F6r attributet \"{0}\".
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notationen \"{1}\" m\u00E5ste deklareras vid referens i otolkad enhetsdeklaration f\u00F6r \"{0}\".
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referensen till enheten \"{0}\" som har deklarerats i en externt tolkad enhet \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attributet \"{1}\" m\u00E5ste anges f\u00F6r elementtyp \"{0}\".
++        MSG_ELEMENT_WITH_ID_REQUIRED = Ett element med identifieraren "{0}" m\u00E5ste finnas med i dokumentet.
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = Referens till den externa enheten "{0}" \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
++        MSG_FIXED_ATTVALUE_INVALID = Attributet "{1}" med v\u00E4rdet "{2}" m\u00E5ste ha v\u00E4rdet "{3}".
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Elementtyp "{0}" har redan attributet "{1}" av id-typ, ett andra attribut "{2}" av samma typ \u00E4r inte till\u00E5tet.
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Elementtyp "{0}" har redan attributet "{1}" av NOTATION-typ, ett andra attribut "{2}" av samma typ \u00E4r inte till\u00E5tet.
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = Notationen "{1}" m\u00E5ste deklareras vid referens i notationstyplistan f\u00F6r attributet "{0}".
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = Notationen "{1}" m\u00E5ste deklareras vid referens i otolkad enhetsdeklaration f\u00F6r "{0}".
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = Referensen till enheten "{0}" som har deklarerats i en externt tolkad enhet \u00E4r inte till\u00E5tet i frist\u00E5ende dokument.
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attributet "{1}" m\u00E5ste anges f\u00F6r elementtyp "{0}".
+         MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = Tomt utrymme f\u00E5r inte f\u00F6rekomma mellan element som har deklarerats i en externt tolkad enhet med elementinneh\u00E5ll i frist\u00E5ende dokument.
+-        NMTOKENInvalid = Attributv\u00E4rdet \"{0}\" av typen NMTOKEN m\u00E5ste vara ett namntecken.
+-        NMTOKENSInvalid = Attributv\u00E4rdet \"{0}\" av typen NMTOKENS m\u00E5ste vara ett eller flera namntecken.
+-        NoNotationOnEmptyElement = Elementtyp \"{0}\" med deklarationen EMPTY kan inte deklareras med attributet \"{1}\" av typen NOTATION.
+-        RootElementTypeMustMatchDoctypedecl = Dokumentrotelementet \"{1}\" m\u00E5ste matcha DOCTYPE-roten \"{0}\".
+-        UndeclaredElementInContentSpec = Modellen med inneh\u00E5ll f\u00F6r elementet \"{0}\" refererar till elementet \"{1}\" som inte har deklarerats.
+-        UniqueNotationName = Deklarationen f\u00F6r notationen \"{0}\" \u00E4r inte unik. Ett namn f\u00E5r inte deklareras i fler \u00E4n en notationsdeklaration.
++        NMTOKENInvalid = Attributv\u00E4rdet "{0}" av typen NMTOKEN m\u00E5ste vara ett namntecken.
++        NMTOKENSInvalid = Attributv\u00E4rdet "{0}" av typen NMTOKENS m\u00E5ste vara ett eller flera namntecken.
++        NoNotationOnEmptyElement = Elementtyp "{0}" med deklarationen EMPTY kan inte deklareras med attributet "{1}" av typen NOTATION.
++        RootElementTypeMustMatchDoctypedecl = Dokumentrotelementet "{1}" m\u00E5ste matcha DOCTYPE-roten "{0}".
++        UndeclaredElementInContentSpec = Modellen med inneh\u00E5ll f\u00F6r elementet "{0}" refererar till elementet "{1}" som inte har deklarerats.
++        UniqueNotationName = Deklarationen f\u00F6r notationen "{0}" \u00E4r inte unik. Ett namn f\u00E5r inte deklareras i fler \u00E4n en notationsdeklaration.
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype-validerare: Behov att anropa initieringsmetod med giltig grammatikreferens utf\u00F6rdes inte. \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\" \u00E4r otolkat.
+-        ENTITYNotValid = ENTITY \"{0}\" \u00E4r inte giltigt.
++        ENTITYNotUnparsed = ENTITY "{0}" \u00E4r otolkat.
++        ENTITYNotValid = ENTITY "{0}" \u00E4r inte giltigt.
+         EmptyList = V\u00E4rdet f\u00F6r typ ENTITIES, IDREFS och NMTOKENS f\u00E5r inte vara en tom lista.
+ 
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = Den externa enhetsreferensen \"&{0};\" till\u00E5ts inte i ett attributv\u00E4rde.
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = Den externa enhetsreferensen "&{0};" till\u00E5ts inte i ett attributv\u00E4rde.
++        AccessExternalDTD = Extern DTD: Kunde inte l\u00E4sa extern DTD ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av accessExternalDTD-egenskapen.
++        AccessExternalEntity = Extern enhet: Kunde inte l\u00E4sa externt dokument ''{0}'', eftersom ''{1}'' \u00E5tkomst inte till\u00E5ts p\u00E5 grund av begr\u00E4nsning som anges av accessExternalDTD-egenskapen.
+ 
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = Enheten \"{0}\" har refererats, men \u00E4r inte deklarerad.
+-        ReferenceToUnparsedEntity = Den otolkade enhetsreferensen \"&{0};\" \u00E4r inte till\u00E5ten.
+-        RecursiveReference = Rekursiv enhetsreferens \"{0}\". (Referenss\u00F6kv\u00E4g: {1}),
+-        RecursiveGeneralReference = Rekursiv allm\u00E4n enhetsreferens \"&{0};\". (Referenss\u00F6kv\u00E4g: {1}),
+-        RecursivePEReference = Rekursiv parameterreferens \"%{0};\". (Referenss\u00F6kv\u00E4g: {1}),
++        EntityNotDeclared = Enheten "{0}" har refererats, men \u00E4r inte deklarerad.
++        ReferenceToUnparsedEntity = Den otolkade enhetsreferensen "&{0};" \u00E4r inte till\u00E5ten.
++        RecursiveReference = Rekursiv enhetsreferens "{0}". (Referenss\u00F6kv\u00E4g: {1}),
++        RecursiveGeneralReference = Rekursiv allm\u00E4n enhetsreferens "&{0};". (Referenss\u00F6kv\u00E4g: {1}),
++        RecursivePEReference = Rekursiv parameterreferens "%{0};". (Referenss\u00F6kv\u00E4g: {1}),
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = Kodningen \"{0}\" st\u00F6ds inte.
++        EncodingNotSupported = Kodningen "{0}" st\u00F6ds inte.
+         EncodingRequired = En tolkad enhet som inte \u00E4r kodad i varken UTF-8 eller UTF-16 m\u00E5ste ha en kodningsdeklaration.
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = Element eller attribut matchar inte QName-produktion: QName::=(NCName':')?NCName. 
+-        ElementXMLNSPrefix = Elementet \"{0}\" kan inte anv\u00E4ndas med \"xmlns\" som prefix.
+-        ElementPrefixUnbound = Prefixet \"{0}\" f\u00F6r elementet \"{1}\" \u00E4r inte bundet.
+-        AttributePrefixUnbound = Prefixet \"{2}\" f\u00F6r attributet \"{1}\" som associeras med elementtyp \"{0}\" \u00E4r inte bundet.
+-        EmptyPrefixedAttName = Ogiltigt v\u00E4rde f\u00F6r attributet \"{0}\". Namnrymdsbindningar som prefix kanske inte \u00E4r tomma.
+-        PrefixDeclared = Namnrymdsprefixet \"{0}\" har inte deklarerats.
++        ElementXMLNSPrefix = Elementet "{0}" kan inte anv\u00E4ndas med "xmlns" som prefix.
++        ElementPrefixUnbound = Prefixet "{0}" f\u00F6r elementet "{1}" \u00E4r inte bundet.
++        AttributePrefixUnbound = Prefixet "{2}" f\u00F6r attributet "{1}" som associeras med elementtyp "{0}" \u00E4r inte bundet.
++        EmptyPrefixedAttName = Ogiltigt v\u00E4rde f\u00F6r attributet "{0}". Namnrymdsbindningar som prefix kanske inte \u00E4r tomma.
++        PrefixDeclared = Namnrymdsprefixet "{0}" har inte deklarerats.
+         CantBindXMLNS = Prefixet "xmlns" kan inte bindas till en specifik namnrymd och namnrymden f\u00F6r "xmlns" kan inte heller bindas till ett specifikt prefix.
+         CantBindXML = Prefixet "xml" kan inte bindas till en namnrymd ut\u00F6ver den vanliga och namnrymden f\u00F6r "xml" kan inte heller bindas till n\u00E5got annat prefix \u00E4n "xml".
+-        MSG_ATT_DEFAULT_INVALID = defaultValue \"{1}\" f\u00F6r attributet \"{0}\" \u00E4r inte till\u00E5tet vad g\u00E4ller de lexikala begr\u00E4nsningarna f\u00F6r denna attributtyp.
++        MSG_ATT_DEFAULT_INVALID = defaultValue "{1}" f\u00F6r attributet "{0}" \u00E4r inte till\u00E5tet vad g\u00E4ller de lexikala begr\u00E4nsningarna f\u00F6r denna attributtyp.
+ 
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
+ 
+ 
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=Parsern har p\u00E5tr\u00E4ffat fler \u00E4n \"{0}\" enhetstill\u00E4gg i dokumentet - applikationens gr\u00E4nsv\u00E4rde har uppn\u00E5tts.
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: Parsern har p\u00E5tr\u00E4ffat fler \u00E4n "{0}" enhetstill\u00E4gg i dokumentet - gr\u00E4nsv\u00E4rdet f\u00F6r JDK har uppn\u00E5tts.
++        ElementAttributeLimit=JAXP00010002:  Elementet "{0}" har fler \u00E4n "{1}" attribut, "{1}" \u00E4r gr\u00E4nsv\u00E4rdet f\u00F6r JDK.
++        MaxEntitySizeLimit=JAXP00010003: L\u00E4ngden p\u00E5 enheten "{0}" \u00E4r "{1}" som \u00F6verskriver gr\u00E4nsv\u00E4rdet p\u00E5 "{2}" som anges av "{3}".
++        TotalEntitySizeLimit=JAXP00010004: Den ackumulerade storleken "{0}" f\u00F6r enheter \u00F6verskred gr\u00E4nsv\u00E4rdet p\u00E5 "{1}" som anges av "{2}".
++        MaxXMLNameLimit=JAXP00010005: Namnet "{0}" \u00F6verskred gr\u00E4nsv\u00E4rdet p\u00E5 "{1}" som anges av "{2}".
+ 
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= Elementet \"{0}\" har fler \u00E4n \"{1}\" attribut, \"{1}\" \u00E4r applikationens gr\u00E4nsv\u00E4rde.
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,26 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
++#
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# 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.
+ 
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +44,14 @@
+         InvalidCharInProlog = \u5728\u6587\u6863\u524D\u8A00\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
+         InvalidCharInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
+ # 2.4 Character Data and Markup
+-        CDEndInContent = \u9664\u975E\u4F7F\u7528\u5B57\u7B26\u5E8F\u5217 \"]]>\" \u6765\u6807\u8BB0 CDATA \u8282\u7684\u7ED3\u5C3E, \u5426\u5219\u8BE5\u5B57\u7B26\u5E8F\u5217\u4E0D\u80FD\u51FA\u73B0\u5728\u5185\u5BB9\u4E2D\u3002
++        CDEndInContent = \u9664\u975E\u4F7F\u7528\u5B57\u7B26\u5E8F\u5217 "]]>" \u6765\u6807\u8BB0 CDATA \u8282\u7684\u7ED3\u5C3E, \u5426\u5219\u8BE5\u5B57\u7B26\u5E8F\u5217\u4E0D\u80FD\u51FA\u73B0\u5728\u5185\u5BB9\u4E2D\u3002
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = CDATA \u8282\u5FC5\u987B\u4EE5 \"]]>\" \u7ED3\u5C3E\u3002
++        CDSectUnterminated = CDATA \u8282\u5FC5\u987B\u4EE5 "]]>" \u7ED3\u5C3E\u3002
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = XML \u58F0\u660E\u53EA\u80FD\u51FA\u73B0\u5728\u6587\u6863\u7684\u6700\u5F00\u5934\u5904\u3002
+-        EqRequiredInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D, \"{0}\" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
+-        QuoteRequiredInXMLDecl = XML \u58F0\u660E\u4E2D \"{0}\" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
+-        XMLDeclUnterminated = XML \u58F0\u660E\u5FC5\u987B\u4EE5 \"?>\" \u7ED3\u5C3E\u3002
++        EqRequiredInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D, "{0}" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
++        QuoteRequiredInXMLDecl = XML \u58F0\u660E\u4E2D "{0}" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
++        XMLDeclUnterminated = XML \u58F0\u660E\u5FC5\u987B\u4EE5 "?>" \u7ED3\u5C3E\u3002
+         VersionInfoRequired = XML \u58F0\u660E\u4E2D\u9700\u8981\u6B64\u7248\u672C\u3002
+         SpaceRequiredBeforeVersionInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D\u7684\u7248\u672C\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
+         SpaceRequiredBeforeEncodingInXMLDecl = \u5728 XML \u58F0\u660E\u4E2D\u7684\u7F16\u7801\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
+@@ -71,85 +67,86 @@
+         ReferenceIllegalInTrailingMisc=\u5C3E\u968F\u8282\u4E2D\u4E0D\u5141\u8BB8\u6709\u5F15\u7528\u3002
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = \u72EC\u7ACB\u6587\u6863\u58F0\u660E\u503C\u5FC5\u987B\u4E3A \"\u662F\" \u6216 \"\u5426\", \u4E0D\u80FD\u4E3A \"{0}\"\u3002
++        SDDeclInvalid = \u72EC\u7ACB\u6587\u6863\u58F0\u660E\u503C\u5FC5\u987B\u4E3A "\u662F" \u6216 "\u5426", \u4E0D\u80FD\u4E3A "{0}"\u3002
++        SDDeclNameInvalid = XML \u58F0\u660E\u4E2D\u7684\u72EC\u7ACB\u540D\u79F0\u53EF\u80FD\u62FC\u5199\u6709\u8BEF\u3002
+ # 2.12 Language Identification
+-        XMLLangInvalid = xml:lang \u5C5E\u6027\u503C \"{0}\" \u662F\u65E0\u6548\u7684\u8BED\u8A00\u6807\u8BC6\u7B26\u3002
++        XMLLangInvalid = xml:lang \u5C5E\u6027\u503C "{0}" \u662F\u65E0\u6548\u7684\u8BED\u8A00\u6807\u8BC6\u7B26\u3002
+ # 3. Logical Structures
+-        ETagRequired = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5FC5\u987B\u7531\u5339\u914D\u7684\u7ED3\u675F\u6807\u8BB0 \"\" \u7EC8\u6B62\u3002
++        ETagRequired = \u5143\u7D20\u7C7B\u578B "{0}" \u5FC5\u987B\u7531\u5339\u914D\u7684\u7ED3\u675F\u6807\u8BB0 "" \u7EC8\u6B62\u3002
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5FC5\u987B\u540E\u8DDF\u5C5E\u6027\u89C4\u8303 \">\" \u6216 \"/>\"\u3002
+-        EqRequiredInAttribute = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027\u540D \"{1}\" \u5FC5\u987B\u540E\u8DDF '' = '' \u5B57\u7B26\u3002
+-        OpenQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027 \"{1}\" \u5E94\u6709\u5DE6\u5F15\u53F7\u3002
+-        CloseQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027 \"{1}\" \u5E94\u6709\u53F3\u5F15\u53F7\u3002
+-        AttributeNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 \"{0}\" \u6307\u5B9A\u5C5E\u6027 \"{1}\"\u3002
+-        AttributeNSNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 \"{0}\" \u6307\u5B9A\u7ED1\u5B9A\u5230\u540D\u79F0\u7A7A\u95F4 \"{2}\" \u7684\u5C5E\u6027 \"{1}\"\u3002
+-        ETagUnterminated = \u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u7ED3\u675F\u6807\u8BB0\u5FC5\u987B\u4EE5 ''>'' \u5206\u9694\u7B26\u7ED3\u675F\u3002
++        ElementUnterminated = \u5143\u7D20\u7C7B\u578B "{0}" \u5FC5\u987B\u540E\u8DDF\u5C5E\u6027\u89C4\u8303 ">" \u6216 "/>"\u3002
++        EqRequiredInAttribute = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027\u540D "{1}" \u5FC5\u987B\u540E\u8DDF '' = '' \u5B57\u7B26\u3002
++        OpenQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u5E94\u6709\u5DE6\u5F15\u53F7\u3002
++        CloseQuoteExpected = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u5E94\u6709\u53F3\u5F15\u53F7\u3002
++        AttributeNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 "{0}" \u6307\u5B9A\u5C5E\u6027 "{1}"\u3002
++        AttributeNSNotUnique = \u5DF2\u7ECF\u4E3A\u5143\u7D20 "{0}" \u6307\u5B9A\u7ED1\u5B9A\u5230\u540D\u79F0\u7A7A\u95F4 "{2}" \u7684\u5C5E\u6027 "{1}"\u3002
++        ETagUnterminated = \u5143\u7D20\u7C7B\u578B "{0}" \u7684\u7ED3\u675F\u6807\u8BB0\u5FC5\u987B\u4EE5 ''>'' \u5206\u9694\u7B26\u7ED3\u675F\u3002
+         MarkupNotRecognizedInContent = \u5143\u7D20\u5185\u5BB9\u5FC5\u987B\u7531\u683C\u5F0F\u6B63\u786E\u7684\u5B57\u7B26\u6570\u636E\u6216\u6807\u8BB0\u7EC4\u6210\u3002
+         DoctypeIllegalInContent = \u5185\u5BB9\u4E2D\u4E0D\u5141\u8BB8\u6709 DOCTYPE\u3002
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = \u5F15\u7528\u5FC5\u987B\u4EE5 ';' \u5206\u9694\u7B26\u7EC8\u6B62\u3002
+ # 4.3.2 Well-Formed Parsed Entities
+-        ReferenceNotInOneEntity = \u5F15\u7528\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5185\u3002
+-        ElementEntityMismatch = \u5143\u7D20 \"{0}\" \u5FC5\u987B\u4ECE\u5934\u81F3\u5C3E\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
++        ReferenceNotInOneEntity = \u5F15\u7528\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u89E3\u6790\u5B9E\u4F53\u5185\u3002
++        ElementEntityMismatch = \u5143\u7D20 "{0}" \u5FC5\u987B\u4ECE\u5934\u81F3\u5C3E\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
+         MarkupEntityMismatch=XML \u6587\u6863\u7ED3\u6784\u5FC5\u987B\u4ECE\u5934\u81F3\u5C3E\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = \u5728 \"{1}\" \u5C5E\u6027\u503C\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{2}), \u5E76\u4E14\u5143\u7D20\u4E3A \"{0}\"\u3002
++        InvalidCharInAttValue = \u5728 "{1}" \u5C5E\u6027\u503C\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{2}), \u5E76\u4E14\u5143\u7D20\u4E3A "{0}"\u3002
+         InvalidCharInComment = \u5728\u6CE8\u91CA\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
+         InvalidCharInPI = \u5728\u5904\u7406\u6307\u4EE4\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
+         InvalidCharInInternalSubset = \u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
+         InvalidCharInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D\u627E\u5230\u65E0\u6548\u7684 XML \u5B57\u7B26 (Unicode: 0x{0})\u3002
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = \"{1}\" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5355\u5F15\u53F7\u5B57\u7B26\u6216\u53CC\u5F15\u53F7\u5B57\u7B26\u5F00\u5934\u3002
+-        LessthanInAttValue = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684 \"{1}\" \u5C5E\u6027\u503C\u4E0D\u80FD\u5305\u542B ''<'' \u5B57\u7B26\u3002
+-        AttributeValueUnterminated = \"{1}\" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5339\u914D\u7684\u5F15\u53F7\u5B57\u7B26\u7ED3\u5C3E\u3002
++        QuoteRequiredInAttValue = "{1}" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5355\u5F15\u53F7\u5B57\u7B26\u6216\u53CC\u5F15\u53F7\u5B57\u7B26\u5F00\u5934\u3002
++        LessthanInAttValue = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684 "{1}" \u5C5E\u6027\u503C\u4E0D\u80FD\u5305\u542B ''<'' \u5B57\u7B26\u3002
++        AttributeValueUnterminated = "{1}" \u5C5E\u6027\u503C\u5FC5\u987B\u4EE5\u5339\u914D\u7684\u5F15\u53F7\u5B57\u7B26\u7ED3\u5C3E\u3002
+ # 2.5 Comments
+-        InvalidCommentStart = \u6CE8\u91CA\u5FC5\u987B\u4EE5 \"\" \u7ED3\u5C3E\u3002
++        InvalidCommentStart = \u6CE8\u91CA\u5FC5\u987B\u4EE5 "" \u7ED3\u5C3E\u3002
+         COMMENT_NOT_IN_ONE_ENTITY = \u6CE8\u91CA\u6CA1\u6709\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
+ # 2.6 Processing Instructions
+         PITargetRequired = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u4EE5\u76EE\u6807\u540D\u79F0\u5F00\u5934\u3002
+         SpaceRequiredInPI = \u5728\u5904\u7406\u6307\u4EE4\u76EE\u6807\u548C\u6570\u636E\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
+-        PIUnterminated = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u4EE5 \"?>\" \u7ED3\u5C3E\u3002
+-        ReservedPITarget = \u4E0D\u5141\u8BB8\u6709\u5339\u914D \"[xX][mM][lL]\" \u7684\u5904\u7406\u6307\u4EE4\u76EE\u6807\u3002
++        PIUnterminated = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u4EE5 "?>" \u7ED3\u5C3E\u3002
++        ReservedPITarget = \u4E0D\u5141\u8BB8\u6709\u5339\u914D "[xX][mM][lL]" \u7684\u5904\u7406\u6307\u4EE4\u76EE\u6807\u3002
+         PI_NOT_IN_ONE_ENTITY = \u5904\u7406\u6307\u4EE4\u6CA1\u6709\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5B9E\u4F53\u5185\u3002
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = \u7248\u672C \"{0}\" \u65E0\u6548\u3002
+-        VersionNotSupported = \u4E0D\u652F\u6301 XML \u7248\u672C \"{0}\", \u53EA\u652F\u6301 XML 1.0\u3002
+-        VersionNotSupported11 = \u4E0D\u652F\u6301 XML \u7248\u672C \"{0}\", \u53EA\u652F\u6301 XML 1.0 \u548C XML 1.1\u3002
++        VersionInfoInvalid = \u7248\u672C "{0}" \u65E0\u6548\u3002
++        VersionNotSupported = \u4E0D\u652F\u6301 XML \u7248\u672C "{0}", \u53EA\u652F\u6301 XML 1.0\u3002
++        VersionNotSupported11 = \u4E0D\u652F\u6301 XML \u7248\u672C "{0}", \u53EA\u652F\u6301 XML 1.0 \u548C XML 1.1\u3002
+         VersionMismatch= \u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u8F83\u9AD8\u7248\u672C\u7684\u53E6\u4E00\u4E2A\u5B9E\u4F53\u3002
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 \"&#\" \u540E\u9762\u3002
+-        HexdigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u516D\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 \"&#x\" \u540E\u9762\u3002
++        DigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 "&#" \u540E\u9762\u3002
++        HexdigitRequiredInCharRef = \u5728\u5B57\u7B26\u5F15\u7528\u4E2D, \u5341\u516D\u8FDB\u5236\u8868\u793A\u65B9\u6CD5\u5FC5\u987B\u7D27\u8DDF\u5728 "&#x" \u540E\u9762\u3002
+         SemicolonRequiredInCharRef = \u5B57\u7B26\u5F15\u7528\u5FC5\u987B\u4EE5 ';' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
+-        InvalidCharRef = \u5B57\u7B26\u5F15\u7528 \"&#{0}\" \u662F\u65E0\u6548\u7684 XML \u5B57\u7B26\u3002
++        InvalidCharRef = \u5B57\u7B26\u5F15\u7528 "&#{0}" \u662F\u65E0\u6548\u7684 XML \u5B57\u7B26\u3002
+         NameRequiredInReference = \u5728\u5B9E\u4F53\u5F15\u7528\u4E2D, \u5B9E\u4F53\u540D\u79F0\u5FC5\u987B\u7D27\u8DDF\u5728 '&' \u540E\u9762\u3002
+-        SemicolonRequiredInReference = \u5BF9\u5B9E\u4F53 \"{0}\" \u7684\u5F15\u7528\u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
++        SemicolonRequiredInReference = \u5BF9\u5B9E\u4F53 "{0}" \u7684\u5F15\u7528\u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
+ # 4.3.1 The Text Declaration
+-        TextDeclMustBeFirst = \u6587\u672C\u58F0\u660E\u53EA\u80FD\u51FA\u73B0\u5728\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u7684\u6700\u5F00\u5934\u5904\u3002
+-        EqRequiredInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D, \"{0}\" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
+-        QuoteRequiredInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D \"{0}\" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
+-        CloseQuoteMissingInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D \"{0}\" \u540E\u9762\u8DDF\u968F\u7684\u503C\u7F3A\u5C11\u53F3\u5F15\u53F7\u3002
++        TextDeclMustBeFirst = \u6587\u672C\u58F0\u660E\u53EA\u80FD\u51FA\u73B0\u5728\u5DF2\u89E3\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u7684\u6700\u5F00\u5934\u5904\u3002
++        EqRequiredInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D, "{0}" \u540E\u9762\u5FC5\u987B\u8DDF\u6709 '' = '' \u5B57\u7B26\u3002
++        QuoteRequiredInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D "{0}" \u540E\u9762\u8DDF\u968F\u7684\u503C\u5FC5\u987B\u662F\u7528\u5F15\u53F7\u62EC\u8D77\u6765\u7684\u5B57\u7B26\u4E32\u3002
++        CloseQuoteMissingInTextDecl = \u6587\u672C\u58F0\u660E\u4E2D "{0}" \u540E\u9762\u8DDF\u968F\u7684\u503C\u7F3A\u5C11\u53F3\u5F15\u53F7\u3002
+         SpaceRequiredBeforeVersionInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D\u7684\u7248\u672C\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
+         SpaceRequiredBeforeEncodingInTextDecl = \u5728\u6587\u672C\u58F0\u660E\u4E2D\u7684\u7F16\u7801\u4F2A\u5C5E\u6027\u524D\u9762\u5FC5\u987B\u6709\u7A7A\u683C\u3002
+-        TextDeclUnterminated = \u6587\u672C\u58F0\u660E\u5FC5\u987B\u4EE5 \"?>\" \u7ED3\u5C3E\u3002
++        TextDeclUnterminated = \u6587\u672C\u58F0\u660E\u5FC5\u987B\u4EE5 "?>" \u7ED3\u5C3E\u3002
+         EncodingDeclRequired = \u6587\u672C\u58F0\u660E\u4E2D\u9700\u8981\u7F16\u7801\u58F0\u660E\u3002
+         NoMorePseudoAttributes = \u4E0D\u5141\u8BB8\u4F7F\u7528\u66F4\u591A\u7684\u4F2A\u5C5E\u6027\u3002
+         MorePseudoAttributes = \u5E94\u8BE5\u6709\u66F4\u591A\u7684\u4F2A\u5C5E\u6027\u3002
+         PseudoAttrNameExpected = \u5E94\u8BE5\u6709\u4F2A\u5C5E\u6027\u540D\u3002
+ # 4.3.2 Well-Formed Parsed Entities
+-        CommentNotInOneEntity = \u6CE8\u91CA\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5185\u3002
+-        PINotInOneEntity = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5185\u3002
++        CommentNotInOneEntity = \u6CE8\u91CA\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u89E3\u6790\u5B9E\u4F53\u5185\u3002
++        PINotInOneEntity = \u5904\u7406\u6307\u4EE4\u5FC5\u987B\u5B8C\u5168\u5305\u542B\u5728\u540C\u4E00\u4E2A\u5DF2\u89E3\u6790\u5B9E\u4F53\u5185\u3002
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = \u7F16\u7801\u540D\u79F0 \"{0}\" \u65E0\u6548\u3002
+-        EncodingByteOrderUnsupported = \u4E0D\u652F\u6301\u7F16\u7801 \"{0}\" \u7684\u7ED9\u5B9A\u5B57\u8282\u987A\u5E8F\u3002
++        EncodingDeclInvalid = \u7F16\u7801\u540D\u79F0 "{0}" \u65E0\u6548\u3002
++        EncodingByteOrderUnsupported = \u4E0D\u652F\u6301\u7F16\u7801 "{0}" \u7684\u7ED9\u5B9A\u5B57\u8282\u987A\u5E8F\u3002
+         InvalidByte = {1} \u5B57\u8282\u7684 UTF-8 \u5E8F\u5217\u7684\u5B57\u8282 {0} \u65E0\u6548\u3002
+         ExpectedByte = \u5E94\u4E3A {1} \u5B57\u8282\u7684 UTF-8 \u5E8F\u5217\u7684\u5B57\u8282 {0}\u3002
+         InvalidHighSurrogate = UTF-8 \u5E8F\u5217\u4E2D\u7684\u9AD8\u4EE3\u7406\u4F4D\u4E0D\u80FD\u8D85\u8FC7 0x10, \u4F46\u627E\u5230 0x{0}\u3002
+-        OperationNotSupported = {1}\u8BFB\u8FDB\u7A0B\u4E0D\u652F\u6301\u64CD\u4F5C \"{0}\"\u3002
+-        InvalidASCII = \u5B57\u8282 \"{0}\" \u4E0D\u662F (7 \u4F4D) ASCII \u5B57\u7B26\u96C6\u7684\u6210\u5458\u3002
++        OperationNotSupported = {1}\u8BFB\u8FDB\u7A0B\u4E0D\u652F\u6301\u64CD\u4F5C "{0}"\u3002
++        InvalidASCII = \u5B57\u8282 "{0}" \u4E0D\u662F (7 \u4F4D) ASCII \u5B57\u7B26\u96C6\u7684\u6210\u5458\u3002
+         CharConversionFailure = \u786E\u5B9A\u5C5E\u4E8E\u67D0\u4E2A\u7F16\u7801\u7684\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u5728\u8BE5\u7F16\u7801\u4E2D\u975E\u6CD5\u7684\u5E8F\u5217\u3002
+         
+ # DTD Messages
+@@ -169,150 +166,150 @@
+         PubidCharIllegal = \u516C\u5171\u6807\u8BC6\u7B26\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u8BE5\u5B57\u7B26 (Unicode: 0x{0})\u3002
+         SpaceRequiredBetweenPublicAndSystem = \u5728 publicId \u548C systemId \u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u6863\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
+-        PEReferenceWithinMarkup = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 \"%{0};\" \u4E0D\u80FD\u51FA\u73B0\u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u7684\u6807\u8BB0\u5185\u3002
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u6863\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 "'' \u7ED3\u5C3E\u3002
++        PEReferenceWithinMarkup = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};" \u4E0D\u80FD\u51FA\u73B0\u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u7684\u6807\u8BB0\u5185\u3002
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u6587\u6863\u7C7B\u578B\u58F0\u660E\u5305\u542B\u6216\u6307\u5411\u7684\u6807\u8BB0\u58F0\u660E\u5FC5\u987B\u683C\u5F0F\u6B63\u786E\u3002
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\" \u7684\u5C5E\u6027\u58F0\u660E\u5FC5\u987B\u6307\u5B9A\u4E3A\u679A\u4E3E\u7C7B\u578B, \u5B83\u7684\u53EF\u80FD\u503C\u53EA\u6709 \"default\" \u548C \"preserve\"\u3002
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space" \u7684\u5C5E\u6027\u58F0\u660E\u5FC5\u987B\u6307\u5B9A\u4E3A\u679A\u4E3E\u7C7B\u578B, \u5B83\u7684\u53EF\u80FD\u503C\u53EA\u6709 "default" \u548C "preserve"\u3002
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u5728\u5143\u7D20\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u5728\u5143\u7D20\u7C7B\u578B\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u7C7B\u578B "{0}" \u540E\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u5728\u5143\u7D20\u7C7B\u578B\u58F0\u660E\u4E2D\u7684\u5143\u7D20\u7C7B\u578B "{0}" \u540E\u9762\u9700\u8981\u6709\u7EA6\u675F\u6761\u4EF6\u3002
++        ElementDeclUnterminated = \u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 ''('' \u5B57\u7B26\u6216\u5143\u7D20\u7C7B\u578B\u3002
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 ''('' \u5B57\u7B26\u6216\u5143\u7D20\u7C7B\u578B\u3002
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709\u5143\u7D20\u7C7B\u578B\u3002
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5728\u5143\u7D20\u7C7B\u578B \"{0}\" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
+-        MixedContentUnterminated = \u5F53\u5B50\u5143\u7D20\u7C7B\u578B\u53D7\u7EA6\u675F\u65F6, \u6DF7\u5408\u5185\u5BB9\u6A21\u578B \"{0}\" \u5FC5\u987B\u4EE5 \")*\" \u7ED3\u5C3E\u3002
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709\u5143\u7D20\u7C7B\u578B\u3002
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5728\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u58F0\u660E\u4E2D\u9700\u8981\u6709 '')''\u3002
++        MixedContentUnterminated = \u5F53\u5B50\u5143\u7D20\u7C7B\u578B\u53D7\u7EA6\u675F\u65F6, \u6DF7\u5408\u5185\u5BB9\u6A21\u578B "{0}" \u5FC5\u987B\u4EE5 ")*" \u7ED3\u5C3E\u3002
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u5728\u5C5E\u6027\u5217\u8868\u58F0\u660E\u4E2D\u7684 \"\" \u7ED3\u5C3E\u3002
+-        IgnoreSectUnterminated = \u6392\u9664\u7684\u6761\u4EF6\u8282\u5FC5\u987B\u4EE5 \"]]>\" \u7ED3\u5C3E\u3002
++        IncludeSectUnterminated = \u5305\u542B\u7684\u6761\u4EF6\u8282\u5FC5\u987B\u4EE5 "]]>" \u7ED3\u5C3E\u3002
++        IgnoreSectUnterminated = \u6392\u9664\u7684\u6761\u4EF6\u8282\u5FC5\u987B\u4EE5 "]]>" \u7ED3\u5C3E\u3002
+ # 4.1 Character and Entity References
+         NameRequiredInPEReference = \u5728\u53C2\u6570\u5B9E\u4F53\u5F15\u7528\u4E2D, \u5B9E\u4F53\u540D\u79F0\u5FC5\u987B\u7D27\u8DDF\u5728 '%' \u540E\u9762\u3002
+-        SemicolonRequiredInPEReference = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 \"%{0};\" \u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
++        SemicolonRequiredInPEReference = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};" \u5FC5\u987B\u4EE5 '';'' \u5206\u9694\u7B26\u7ED3\u5C3E\u3002
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u5728\u5B9E\u4F53\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
+-	MSG_DUPLICATE_ENTITY_DEFINITION = \u5B9E\u4F53 \"{0}\" \u58F0\u660E\u4E86\u591A\u6B21\u3002        
++        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = \u5728\u5B9E\u4F53\u58F0\u660E\u4E2D\u7684\u5B9E\u4F53\u540D\u79F0 "{0}" \u548C\u5B9A\u4E49\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
++        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = \u5728\u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u4E2D\u7684 "NDATA" \u548C\u8BB0\u53F7\u540D\u79F0\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
++        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = \u5728\u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u4E2D\u7684 "NDATA" \u524D\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
++        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = \u5728\u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u4E2D\u7684 "NDATA" \u540E\u9762\u9700\u8981\u6709\u8BB0\u53F7\u540D\u79F0\u3002
++        EntityDeclUnterminated = \u5B9E\u4F53 "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
++	MSG_DUPLICATE_ENTITY_DEFINITION = \u5B9E\u4F53 "{0}" \u58F0\u660E\u4E86\u591A\u6B21\u3002        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = \u5916\u90E8\u5B9E\u4F53\u58F0\u660E\u5FC5\u987B\u4EE5 \"SYSTEM\" \u6216 \"PUBLIC\" \u5F00\u5934\u3002
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u5728 \"PUBLIC\" \u548C\u516C\u5171\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
++        ExternalIDRequired = \u5916\u90E8\u5B9E\u4F53\u58F0\u660E\u5FC5\u987B\u4EE5 "SYSTEM" \u6216 "PUBLIC" \u5F00\u5934\u3002
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \u5728 "PUBLIC" \u548C\u516C\u5171\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u5728\u516C\u5171\u6807\u8BC6\u7B26\u548C\u7CFB\u7EDF\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u5728 \"SYSTEM\" \u548C\u7CFB\u7EDF\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5\u6807\u8BC6\u7B26\u4E0D\u80FD\u6307\u5B9A\u4E3A\u7CFB\u7EDF\u6807\u8BC6\u7B26 \"{0}\" \u7684\u4E00\u90E8\u5206\u3002
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \u5728 "SYSTEM" \u548C\u7CFB\u7EDF\u6807\u8BC6\u7B26\u4E4B\u95F4\u9700\u8981\u6709\u7A7A\u683C\u3002
++        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5\u6807\u8BC6\u7B26\u4E0D\u80FD\u6307\u5B9A\u4E3A\u7CFB\u7EDF\u6807\u8BC6\u7B26 "{0}" \u7684\u4E00\u90E8\u5206\u3002
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8BB0\u53F7\u58F0\u660E\u4E2D\u7684 \"'' \u7ED3\u5C3E\u3002
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8BB0\u53F7\u58F0\u660E\u4E2D\u7684\u8BB0\u53F7\u540D\u79F0 "{0}" \u540E\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
++        ExternalIDorPublicIDRequired = \u8BB0\u53F7 "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u5305\u542B\u7CFB\u7EDF\u6807\u8BC6\u7B26\u6216\u516C\u5171\u6807\u8BC6\u7B26\u3002
++        NotationDeclUnterminated = \u8BB0\u53F7 "{0}" \u7684\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = \u5728\u5143\u7D20\u58F0\u660E \"{0}\" \u7684\u5185\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7ECF\u6307\u5B9A\u4E86\u5143\u7D20\u7C7B\u578B \"{1}\"\u3002
+-        ENTITIESInvalid = \u7C7B\u578B\u4E3A ENTITIES \u7684\u5C5E\u6027\u503C \"{1}\" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u7684\u540D\u79F0\u3002
+-        ENTITYInvalid = \u7C7B\u578B\u4E3A ENTITY \u7684\u5C5E\u6027\u503C \"{1}\" \u5FC5\u987B\u662F\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u7684\u540D\u79F0\u3002
+-        IDDefaultTypeInvalid = ID \u5C5E\u6027 \"{0}\" \u5FC5\u987B\u5177\u6709\u5DF2\u58F0\u660E\u7684\u9ED8\u8BA4\u503C \"#IMPLIED\" \u6216 \"#REQUIRED\"\u3002
+-        IDInvalid = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u540D\u79F0\u3002
+-        IDInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F NCName\u3002
+-        IDNotUnique = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C \"{0}\" \u5728\u6587\u6863\u5185\u5FC5\u987B\u662F\u552F\u4E00\u7684\u3002
+-        IDREFInvalid = \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u540D\u79F0\u3002
+-        IDREFInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F NCName\u3002
+-        IDREFSInvalid = \u7C7B\u578B\u4E3A IDREFS \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u3002
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u5F53\u5B9E\u4F53\u5F15\u7528\u7528\u4F5C\u5B8C\u6574\u58F0\u660E\u65F6, \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
+-        ImproperDeclarationNesting = \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
+-        ImproperGroupNesting = \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u62EC\u53F7\u5BF9\u3002
+-        INVALID_PE_IN_CONDITIONAL = \u53C2\u6570\u5B9E\u4F53 \"{0}\" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6574\u4E2A\u6761\u4EF6\u8282, \u6216\u8005\u4EC5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
+-        MSG_ATTRIBUTE_NOT_DECLARED = \u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B \"{0}\" \u58F0\u660E\u5C5E\u6027 \"{1}\"\u3002
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u503C\u4E3A \"{1}\" \u7684\u5C5E\u6027 \"{0}\" \u5FC5\u987B\u5177\u6709\u5217\u8868 \"{2}\" \u4E2D\u7684\u503C\u3002
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D, \u5C5E\u6027 \"{0}\" \u7684\u503C \"{1}\" \u4E0D\u80FD\u901A\u8FC7\u89C4\u8303\u5316\u8FDB\u884C\u66F4\u6539 (\u66F4\u6539\u4E3A \"{2}\")\u3002
+-        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5185\u5BB9\u4E0D\u5B8C\u6574, \u5B83\u5FC5\u987B\u5339\u914D \"{1}\"\u3002
+-        MSG_CONTENT_INVALID = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D \"{1}\"\u3002
+-        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D \"{1}\"\u3002\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A \"{2}\" \u7684\u5B50\u7EA7\u3002
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A \"{0}\" \u7684\u5C5E\u6027 \"{1}\" \u5177\u6709\u9ED8\u8BA4\u503C, \u5E76\u4E14\u5FC5\u987B\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u6307\u5B9A\u3002
+-        MSG_DUPLICATE_ATTDEF = \u5DF2\u7ECF\u4E3A\u5143\u7D20\u7C7B\u578B \"{0}\" \u58F0\u660E\u5C5E\u6027 \"{1}\"\u3002
+-        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u7C7B\u578B \"{0}\" \u4E0D\u80FD\u58F0\u660E\u591A\u6B21\u3002
+-        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u987B\u58F0\u660E\u5143\u7D20\u7C7B\u578B \"{0}\"\u3002
++        DuplicateTypeInMixedContent = \u5728\u5143\u7D20\u58F0\u660E "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7ECF\u6307\u5B9A\u4E86\u5143\u7D20\u7C7B\u578B "{1}"\u3002
++        ENTITIESInvalid = \u7C7B\u578B\u4E3A ENTITIES \u7684\u5C5E\u6027\u503C "{1}" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u672A\u89E3\u6790\u5B9E\u4F53\u7684\u540D\u79F0\u3002
++        ENTITYInvalid = \u7C7B\u578B\u4E3A ENTITY \u7684\u5C5E\u6027\u503C "{1}" \u5FC5\u987B\u662F\u672A\u89E3\u6790\u5B9E\u4F53\u7684\u540D\u79F0\u3002
++        IDDefaultTypeInvalid = ID \u5C5E\u6027 "{0}" \u5FC5\u987B\u5177\u6709\u5DF2\u58F0\u660E\u7684\u9ED8\u8BA4\u503C "#IMPLIED" \u6216 "#REQUIRED"\u3002
++        IDInvalid = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u540D\u79F0\u3002
++        IDInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F NCName\u3002
++        IDNotUnique = \u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027\u503C "{0}" \u5728\u6587\u6863\u5185\u5FC5\u987B\u662F\u552F\u4E00\u7684\u3002
++        IDREFInvalid = \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u540D\u79F0\u3002
++        IDREFInvalidWithNamespaces = \u542F\u7528\u540D\u79F0\u7A7A\u95F4\u65F6, \u7C7B\u578B\u4E3A IDREF \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F NCName\u3002
++        IDREFSInvalid = \u7C7B\u578B\u4E3A IDREFS \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u3002
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u5F53\u5B9E\u4F53\u5F15\u7528\u7528\u4F5C\u5B8C\u6574\u58F0\u660E\u65F6, \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
++        ImproperDeclarationNesting = \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u58F0\u660E\u3002
++        ImproperGroupNesting = \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6B63\u786E\u5D4C\u5957\u7684\u62EC\u53F7\u5BF9\u3002
++        INVALID_PE_IN_CONDITIONAL = \u53C2\u6570\u5B9E\u4F53 "{0}" \u7684\u66FF\u6362\u6587\u672C\u5FC5\u987B\u5305\u542B\u6574\u4E2A\u6761\u4EF6\u8282, \u6216\u8005\u4EC5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
++        MSG_ATTRIBUTE_NOT_DECLARED = \u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B "{0}" \u58F0\u660E\u5C5E\u6027 "{1}"\u3002
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u503C\u4E3A "{1}" \u7684\u5C5E\u6027 "{0}" \u5FC5\u987B\u5177\u6709\u5217\u8868 "{2}" \u4E2D\u7684\u503C\u3002
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D, \u5C5E\u6027 "{0}" \u7684\u503C "{1}" \u4E0D\u80FD\u901A\u8FC7\u89C4\u8303\u5316\u8FDB\u884C\u66F4\u6539 (\u66F4\u6539\u4E3A "{2}")\u3002
++        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5185\u5BB9\u4E0D\u5B8C\u6574, \u5B83\u5FC5\u987B\u5339\u914D "{1}"\u3002
++        MSG_CONTENT_INVALID = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D "{1}"\u3002
++        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5185\u5BB9\u5FC5\u987B\u5339\u914D "{1}"\u3002\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A "{2}" \u7684\u5B50\u7EA7\u3002
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u7C7B\u578B\u4E3A "{0}" \u7684\u5C5E\u6027 "{1}" \u5177\u6709\u9ED8\u8BA4\u503C, \u5E76\u4E14\u5FC5\u987B\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u6307\u5B9A\u3002
++        MSG_DUPLICATE_ATTDEF = \u5DF2\u7ECF\u4E3A\u5143\u7D20\u7C7B\u578B "{0}" \u58F0\u660E\u5C5E\u6027 "{1}"\u3002
++        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u7C7B\u578B "{0}" \u4E0D\u80FD\u58F0\u660E\u591A\u6B21\u3002
++        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u987B\u58F0\u660E\u5143\u7D20\u7C7B\u578B "{0}"\u3002
+         MSG_GRAMMAR_NOT_FOUND = \u6587\u6863\u65E0\u6548: \u627E\u4E0D\u5230\u8BED\u6CD5\u3002
+-        MSG_ELEMENT_WITH_ID_REQUIRED = \u6587\u6863\u4E2D\u5FC5\u987B\u5305\u542B\u6807\u8BC6\u7B26\u4E3A \"{0}\" \u7684\u5143\u7D20\u3002
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5916\u90E8\u5B9E\u4F53 \"{0}\"\u3002
+-        MSG_FIXED_ATTVALUE_INVALID = \u503C\u4E3A \"{2}\" \u7684\u5C5E\u6027 \"{1}\" \u5FC5\u987B\u5177\u6709 \"{3}\" \u7684\u503C\u3002
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027 \"{1}\", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A ID \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 \"{2}\"\u3002
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B \"{0}\" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 \"{1}\", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A NOTATION \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 \"{2}\"\u3002
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5728\u5C5E\u6027 \"{0}\" \u7684\u8BB0\u53F7\u7C7B\u578B\u5217\u8868\u4E2D\u5F15\u7528\u8BB0\u53F7 \"{1}\" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u5728 \"{0}\" \u7684\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u58F0\u660E\u4E2D\u5F15\u7528\u8BB0\u53F7 \"{1}\" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5B9E\u4F53 \"{0}\"\u3002
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u9700\u8981\u5C5E\u6027 \"{1}\", \u5E76\u4E14\u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B \"{0}\" \u6307\u5B9A\u8BE5\u5C5E\u6027\u3002
+-        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5BF9\u4E8E\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u5177\u6709\u5143\u7D20\u5185\u5BB9\u7684\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5916\u90E8\u5B9E\u4F53, \u5728\u8BE5\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5143\u7D20\u4E4B\u95F4\u4E0D\u80FD\u51FA\u73B0\u7A7A\u683C\u3002
+-        NMTOKENInvalid = \u7C7B\u578B\u4E3A NMTOKEN \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u540D\u79F0\u6807\u8BB0\u3002
+-        NMTOKENSInvalid = \u7C7B\u578B\u4E3A NMTOKENS \u7684\u5C5E\u6027\u503C \"{0}\" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u6807\u8BB0\u3002
+-        NoNotationOnEmptyElement = \u5DF2\u58F0\u660E\u4E3A EMPTY \u7684\u5143\u7D20\u7C7B\u578B \"{0}\" \u4E0D\u80FD\u58F0\u660E\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 \"{1}\"\u3002
+-        RootElementTypeMustMatchDoctypedecl = \u6587\u6863\u6839\u5143\u7D20 \"{1}\" \u5FC5\u987B\u5339\u914D DOCTYPE \u6839 \"{0}\"\u3002
+-        UndeclaredElementInContentSpec = \u5143\u7D20 \"{0}\" \u7684\u5185\u5BB9\u6A21\u578B\u5F15\u7528\u672A\u58F0\u660E\u7684\u5143\u7D20 \"{1}\"\u3002
+-        UniqueNotationName = \u8BB0\u53F7 \"{0}\" \u7684\u58F0\u660E\u4E0D\u662F\u552F\u4E00\u7684\u3002\u4E0D\u80FD\u5728\u591A\u4E2A\u8BB0\u53F7\u58F0\u660E\u4E2D\u58F0\u660E\u6307\u5B9A\u7684\u540D\u79F0\u3002
++        MSG_ELEMENT_WITH_ID_REQUIRED = \u6587\u6863\u4E2D\u5FC5\u987B\u5305\u542B\u6807\u8BC6\u7B26\u4E3A "{0}" \u7684\u5143\u7D20\u3002
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5916\u90E8\u5B9E\u4F53 "{0}"\u3002
++        MSG_FIXED_ATTVALUE_INVALID = \u503C\u4E3A "{2}" \u7684\u5C5E\u6027 "{1}" \u5FC5\u987B\u5177\u6709 "{3}" \u7684\u503C\u3002
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B "{0}" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A ID \u7684\u5C5E\u6027 "{1}", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A ID \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 "{2}"\u3002
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u7C7B\u578B "{0}" \u5DF2\u7ECF\u5177\u6709\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 "{1}", \u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B\u578B\u4E3A NOTATION \u7684\u53E6\u4E00\u4E2A\u5C5E\u6027 "{2}"\u3002
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u5728\u5C5E\u6027 "{0}" \u7684\u8BB0\u53F7\u7C7B\u578B\u5217\u8868\u4E2D\u5F15\u7528\u8BB0\u53F7 "{1}" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u5728 "{0}" \u7684\u672A\u89E3\u6790\u5B9E\u4F53\u58F0\u660E\u4E2D\u5F15\u7528\u8BB0\u53F7 "{1}" \u65F6, \u5FC5\u987B\u58F0\u660E\u8BE5\u8BB0\u53F7\u3002
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5F15\u7528\u5DF2\u89E3\u6790\u7684\u5916\u90E8\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5B9E\u4F53 "{0}"\u3002
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u9700\u8981\u5C5E\u6027 "{1}", \u5E76\u4E14\u5FC5\u987B\u4E3A\u5143\u7D20\u7C7B\u578B "{0}" \u6307\u5B9A\u8BE5\u5C5E\u6027\u3002
++        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5BF9\u4E8E\u5728\u72EC\u7ACB\u6587\u6863\u4E2D\u5177\u6709\u5143\u7D20\u5185\u5BB9\u7684\u5DF2\u89E3\u6790\u7684\u5916\u90E8\u5B9E\u4F53, \u5728\u8BE5\u5B9E\u4F53\u4E2D\u58F0\u660E\u7684\u5143\u7D20\u4E4B\u95F4\u4E0D\u80FD\u51FA\u73B0\u7A7A\u683C\u3002
++        NMTOKENInvalid = \u7C7B\u578B\u4E3A NMTOKEN \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u540D\u79F0\u6807\u8BB0\u3002
++        NMTOKENSInvalid = \u7C7B\u578B\u4E3A NMTOKENS \u7684\u5C5E\u6027\u503C "{0}" \u5FC5\u987B\u662F\u4E00\u4E2A\u6216\u591A\u4E2A\u540D\u79F0\u6807\u8BB0\u3002
++        NoNotationOnEmptyElement = \u5DF2\u58F0\u660E\u4E3A EMPTY \u7684\u5143\u7D20\u7C7B\u578B "{0}" \u4E0D\u80FD\u58F0\u660E\u7C7B\u578B\u4E3A NOTATION \u7684\u5C5E\u6027 "{1}"\u3002
++        RootElementTypeMustMatchDoctypedecl = \u6587\u6863\u6839\u5143\u7D20 "{1}" \u5FC5\u987B\u5339\u914D DOCTYPE \u6839 "{0}"\u3002
++        UndeclaredElementInContentSpec = \u5143\u7D20 "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u5F15\u7528\u672A\u58F0\u660E\u7684\u5143\u7D20 "{1}"\u3002
++        UniqueNotationName = \u8BB0\u53F7 "{0}" \u7684\u58F0\u660E\u4E0D\u662F\u552F\u4E00\u7684\u3002\u4E0D\u80FD\u5728\u591A\u4E2A\u8BB0\u53F7\u58F0\u660E\u4E2D\u58F0\u660E\u6307\u5B9A\u7684\u540D\u79F0\u3002
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype \u9A8C\u8BC1\u7A0B\u5E8F: \u672A\u80FD\u4F7F\u7528\u6709\u6548\u7684\u8BED\u6CD5\u5F15\u7528\u8C03\u7528\u521D\u59CB\u5316\u65B9\u6CD5\u3002\t
+-        ENTITYNotUnparsed = ENTITY \"{0}\" \u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u3002
+-        ENTITYNotValid = ENTITY \"{0}\" \u65E0\u6548\u3002
++        ENTITYNotUnparsed = ENTITY "{0}" \u4E0D\u662F\u672A\u89E3\u6790\u7684\u3002
++        ENTITYNotValid = ENTITY "{0}" \u65E0\u6548\u3002
+         EmptyList = \u7C7B\u578B\u4E3A ENTITIES, IDREFS \u548C NMTOKENS \u7684\u503C\u4E0D\u80FD\u662F\u7A7A\u5217\u8868\u3002
+ 
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = \u5C5E\u6027\u503C\u4E2D\u4E0D\u5141\u8BB8\u91C7\u7528\u5916\u90E8\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = \u5C5E\u6027\u503C\u4E2D\u4E0D\u5141\u8BB8\u91C7\u7528\u5916\u90E8\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002
++        AccessExternalDTD = \u5916\u90E8 DTD: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8 DTD ''{0}'', \u56E0\u4E3A accessExternalDTD \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u5BFC\u81F4\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
++        AccessExternalEntity = \u5916\u90E8\u5B9E\u4F53: \u65E0\u6CD5\u8BFB\u53D6\u5916\u90E8\u6587\u6863 ''{0}'', \u56E0\u4E3A accessExternalDTD \u5C5E\u6027\u8BBE\u7F6E\u7684\u9650\u5236\u5BFC\u81F4\u4E0D\u5141\u8BB8 ''{1}'' \u8BBF\u95EE\u3002
+ 
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = \u5F15\u7528\u4E86\u5B9E\u4F53 \"{0}\", \u4F46\u672A\u58F0\u660E\u5B83\u3002
+-        ReferenceToUnparsedEntity = \u4E0D\u5141\u8BB8\u4F7F\u7528\u672A\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002
+-        RecursiveReference = \u9012\u5F52\u5B9E\u4F53\u5F15\u7528 \"{0}\"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
+-        RecursiveGeneralReference = \u9012\u5F52\u4E00\u822C\u5B9E\u4F53\u5F15\u7528 \"&{0};\"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
+-        RecursivePEReference = \u9012\u5F52\u53C2\u6570\u5B9E\u4F53\u5F15\u7528 \"%{0};\"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
++        EntityNotDeclared = \u5F15\u7528\u4E86\u5B9E\u4F53 "{0}", \u4F46\u672A\u58F0\u660E\u5B83\u3002
++        ReferenceToUnparsedEntity = \u4E0D\u5141\u8BB8\u4F7F\u7528\u672A\u89E3\u6790\u7684\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002
++        RecursiveReference = \u9012\u5F52\u5B9E\u4F53\u5F15\u7528 "{0}"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
++        RecursiveGeneralReference = \u9012\u5F52\u4E00\u822C\u5B9E\u4F53\u5F15\u7528 "&{0};"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
++        RecursivePEReference = \u9012\u5F52\u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};"\u3002(\u5F15\u7528\u8DEF\u5F84: {1}),
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = \u4E0D\u652F\u6301\u7F16\u7801 \"{0}\"\u3002
+-        EncodingRequired = \u5982\u679C\u5DF2\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u7684\u5B9E\u4F53\u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u8FDB\u884C\u7F16\u7801, \u5219\u8BE5\u5B9E\u4F53\u5FC5\u987B\u5305\u542B\u7F16\u7801\u58F0\u660E\u3002
++        EncodingNotSupported = \u4E0D\u652F\u6301\u7F16\u7801 "{0}"\u3002
++        EncodingRequired = \u5982\u679C\u5DF2\u89E3\u6790\u7684\u5B9E\u4F53\u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u8FDB\u884C\u7F16\u7801, \u5219\u8BE5\u5B9E\u4F53\u5FC5\u987B\u5305\u542B\u7F16\u7801\u58F0\u660E\u3002
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = \u5143\u7D20\u6216\u5C5E\u6027\u4E0D\u5339\u914D QName \u751F\u4EA7: QName::=(NCName':')?NCName\u3002
+-        ElementXMLNSPrefix = \u5143\u7D20 \"{0}\" \u4E0D\u80FD\u4F7F\u7528 \"xmlns\" \u4F5C\u4E3A\u524D\u7F00\u3002
+-        ElementPrefixUnbound = \u5143\u7D20 \"{1}\" \u7684\u524D\u7F00 \"{0}\" \u672A\u7ED1\u5B9A\u3002
+-        AttributePrefixUnbound = \u4E0E\u5143\u7D20\u7C7B\u578B \"{0}\" \u76F8\u5173\u8054\u7684\u5C5E\u6027 \"{1}\" \u7684\u524D\u7F00 \"{2}\" \u672A\u7ED1\u5B9A\u3002
+-        EmptyPrefixedAttName = \u5C5E\u6027 \"{0}\" \u7684\u503C\u65E0\u6548\u3002\u5E26\u524D\u7F00\u7684\u540D\u79F0\u7A7A\u95F4\u7ED1\u5B9A\u4E0D\u80FD\u4E3A\u7A7A\u3002
+-        PrefixDeclared = \u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 \"{0}\"\u3002
++        ElementXMLNSPrefix = \u5143\u7D20 "{0}" \u4E0D\u80FD\u4F7F\u7528 "xmlns" \u4F5C\u4E3A\u524D\u7F00\u3002
++        ElementPrefixUnbound = \u5143\u7D20 "{1}" \u7684\u524D\u7F00 "{0}" \u672A\u7ED1\u5B9A\u3002
++        AttributePrefixUnbound = \u4E0E\u5143\u7D20\u7C7B\u578B "{0}" \u76F8\u5173\u8054\u7684\u5C5E\u6027 "{1}" \u7684\u524D\u7F00 "{2}" \u672A\u7ED1\u5B9A\u3002
++        EmptyPrefixedAttName = \u5C5E\u6027 "{0}" \u7684\u503C\u65E0\u6548\u3002\u5E26\u524D\u7F00\u7684\u540D\u79F0\u7A7A\u95F4\u7ED1\u5B9A\u4E0D\u80FD\u4E3A\u7A7A\u3002
++        PrefixDeclared = \u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 "{0}"\u3002
+         CantBindXMLNS = \u524D\u7F00 "xmlns" \u4E0D\u80FD\u663E\u5F0F\u7ED1\u5B9A\u5230\u4EFB\u4F55\u540D\u79F0\u7A7A\u95F4; "xmlns" \u7684\u540D\u79F0\u7A7A\u95F4\u4E5F\u4E0D\u80FD\u663E\u5F0F\u7ED1\u5B9A\u5230\u4EFB\u4F55\u524D\u7F00\u3002
+         CantBindXML = \u524D\u7F00 "xml" \u4E0D\u80FD\u7ED1\u5B9A\u5230\u9664\u5B83\u7684\u5E38\u7528\u540D\u79F0\u7A7A\u95F4\u5916\u7684\u4EFB\u4F55\u540D\u79F0\u7A7A\u95F4; "xml" \u7684\u540D\u79F0\u7A7A\u95F4\u4E5F\u4E0D\u80FD\u7ED1\u5B9A\u5230\u9664 "xml" \u5916\u7684\u4EFB\u4F55\u524D\u7F00\u3002
+-        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027 \"{0}\" \u7684 defaultValue \"{1}\" \u975E\u6CD5, \u56E0\u4E3A\u6B64\u5C5E\u6027\u7C7B\u578B\u5177\u6709\u8BCD\u6C47\u7EA6\u675F\u6761\u4EF6\u3002
++        MSG_ATT_DEFAULT_INVALID = \u5C5E\u6027 "{0}" \u7684 defaultValue "{1}" \u975E\u6CD5, \u56E0\u4E3A\u6B64\u5C5E\u6027\u7C7B\u578B\u5177\u6709\u8BCD\u6C47\u7EA6\u675F\u6761\u4EF6\u3002
+ 
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +317,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
+ 
+ 
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=\u8BED\u6CD5\u5206\u6790\u5668\u5728\u6B64\u6587\u6863\u4E2D\u9047\u5230\u591A\u4E2A \"{0}\" \u5B9E\u4F53\u6269\u5C55; \u8FD9\u662F\u5E94\u7528\u7A0B\u5E8F\u65BD\u52A0\u7684\u9650\u5236\u3002
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: \u89E3\u6790\u5668\u5728\u6B64\u6587\u6863\u4E2D\u9047\u5230\u591A\u4E2A "{0}" \u5B9E\u4F53\u6269\u5C55; \u8FD9\u662F JDK \u65BD\u52A0\u7684\u9650\u5236\u3002
++        ElementAttributeLimit=JAXP00010002: \u5143\u7D20 "{0}" \u5177\u6709\u591A\u4E2A "{1}" \u5C5E\u6027, "{1}" \u662F JDK \u65BD\u52A0\u7684\u9650\u5236\u3002
++        MaxEntitySizeLimit=JAXP00010003: \u5B9E\u4F53 "{0}" \u7684\u957F\u5EA6\u4E3A "{1}", \u8D85\u8FC7\u4E86 "{3}" \u8BBE\u7F6E\u7684 "{2}" \u9650\u5236\u3002
++        TotalEntitySizeLimit=JAXP00010004: \u5B9E\u4F53\u7684\u7D2F\u8BA1\u5927\u5C0F "{0}" \u8D85\u8FC7\u4E86 "{2}" \u8BBE\u7F6E\u7684 "{1}" \u9650\u5236\u3002
++        MaxXMLNameLimit=JAXP00010005: \u540D\u79F0 "{0}" \u8D85\u8FC7\u4E86 "{2}" \u8BBE\u7F6E\u7684 "{1}" \u9650\u5236\u3002
+ 
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= \u5143\u7D20 \"{0}\" \u5177\u6709\u591A\u4E2A \"{1}\" \u5C5E\u6027, \"{1}\" \u662F\u5E94\u7528\u7A0B\u5E8F\u65BD\u52A0\u7684\u9650\u5236\u3002
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties	2013-12-01 11:13:41.000000000 -0800
+@@ -1,30 +1,27 @@
+-/*
+- * 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.
+- */
+-
+-/*
+- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+- */
++#
++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
++# 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.
++#
+ 
+ # This file contains error and warning messages related to XML
+ # The messages are arranged in key and value tuples in a ListResourceBundle.
+@@ -48,14 +45,14 @@
+         InvalidCharInProlog = \u5728\u6587\u4EF6\u5BA3\u544A\u96C6\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+ # 2.4 Character Data and Markup
+-        CDEndInContent = \u5B57\u5143\u9806\u5E8F \"]]>\" \u4E0D\u53EF\u51FA\u73FE\u5728\u5167\u5BB9\u4E2D\uFF0C\u9664\u975E\u7528\u65BC\u6A19\u793A CDATA \u6BB5\u843D\u7684\u7D50\u5C3E\u3002
++        CDEndInContent = \u5B57\u5143\u9806\u5E8F "]]>" \u4E0D\u53EF\u51FA\u73FE\u5728\u5167\u5BB9\u4E2D\uFF0C\u9664\u975E\u7528\u65BC\u6A19\u793A CDATA \u6BB5\u843D\u7684\u7D50\u5C3E\u3002
+ # 2.7 CDATA Sections
+-        CDSectUnterminated = CDATA \u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F \"]]>\"\u3002
++        CDSectUnterminated = CDATA \u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F "]]>"\u3002
+ # 2.8 Prolog and Document Type Declaration
+         XMLDeclMustBeFirst = XML \u5BA3\u544A\u50C5\u80FD\u51FA\u73FE\u5728\u6587\u4EF6\u7684\u958B\u982D\u3002
+-        EqRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 \"{0}\" \u4E4B\u5F8C\u3002
+-        QuoteRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C\"{0}\" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
+-        XMLDeclUnterminated = XML \u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F \"?>\"\u3002
++        EqRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 "{0}" \u4E4B\u5F8C\u3002
++        QuoteRequiredInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C"{0}" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
++        XMLDeclUnterminated = XML \u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F "?>"\u3002
+         VersionInfoRequired = XML \u5BA3\u544A\u4E2D\u9700\u8981\u7248\u672C\u3002
+         SpaceRequiredBeforeVersionInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C\u7248\u672C\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
+         SpaceRequiredBeforeEncodingInXMLDecl = \u5728 XML \u5BA3\u544A\u4E2D\uFF0C\u7DE8\u78BC\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
+@@ -71,90 +68,91 @@
+         ReferenceIllegalInTrailingMisc=\u5C3E\u7AEF\u6BB5\u843D\u4E2D\u4E0D\u5141\u8A31\u53C3\u7167\u3002
+         
+ # 2.9 Standalone Document Declaration
+-        SDDeclInvalid = \u7368\u7ACB\u6587\u4EF6\u5BA3\u544A\u503C\u5FC5\u9808\u662F \"yes\" \u6216 \"no\"\uFF0C\u800C\u975E \"{0}\"\u3002
++        SDDeclInvalid = \u7368\u7ACB\u6587\u4EF6\u5BA3\u544A\u503C\u5FC5\u9808\u662F "yes" \u6216 "no"\uFF0C\u800C\u975E "{0}"\u3002
++        SDDeclNameInvalid = XML \u5BA3\u544A\u4E2D\u7684\u7368\u7ACB\u540D\u7A31\u53EF\u80FD\u62FC\u932F\u4E86\u3002
+ # 2.12 Language Identification
+-        XMLLangInvalid = xml:lang \u5C6C\u6027\u503C \"{0}\" \u70BA\u7121\u6548\u7684\u8A9E\u8A00 ID\u3002
++        XMLLangInvalid = xml:lang \u5C6C\u6027\u503C "{0}" \u70BA\u7121\u6548\u7684\u8A9E\u8A00 ID\u3002
+ # 3. Logical Structures
+-        ETagRequired = \u5143\u7D20\u985E\u578B \"{0}\" \u5FC5\u9808\u7531\u914D\u5C0D\u7684\u7D50\u675F\u6A19\u8A18 \"\" \u7D42\u6B62\u3002
++        ETagRequired = \u5143\u7D20\u985E\u578B "{0}" \u5FC5\u9808\u7531\u914D\u5C0D\u7684\u7D50\u675F\u6A19\u8A18 "" \u7D42\u6B62\u3002
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ElementUnterminated = \u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5\u5C6C\u6027\u8A2D\u5B9A \">\" \u6216 \"/>\"\u3002
+-        EqRequiredInAttribute = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027\u540D\u7A31 \"{1}\" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5 '' = '' \u5B57\u5143\u3002
+-        OpenQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027 \"{1}\" \u9810\u671F\u6709\u958B\u982D\u5F15\u865F\u3002
+-        CloseQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027 \"{1}\" \u9810\u671F\u6709\u7D50\u675F\u5F15\u865F\u3002
+-        AttributeNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 \"{0}\" \u6307\u5B9A\u5C6C\u6027 \"{1}\"\u3002
+-        AttributeNSNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 \"{0}\" \u6307\u5B9A\u9023\u7D50\u547D\u540D\u7A7A\u9593 \"{2}\" \u7684\u5C6C\u6027 \"{1}\"\u3002
+-        ETagUnterminated = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u7D50\u675F\u6A19\u8A18\u7D50\u5C3E\u5FC5\u9808\u662F ''>'' \u5206\u754C\u5B57\u5143\u3002
++        ElementUnterminated = \u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5\u5C6C\u6027\u8A2D\u5B9A ">" \u6216 "/>"\u3002
++        EqRequiredInAttribute = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027\u540D\u7A31 "{1}" \u4E4B\u5F8C\u5FC5\u9808\u7DCA\u63A5 '' = '' \u5B57\u5143\u3002
++        OpenQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027 "{1}" \u9810\u671F\u6709\u958B\u982D\u5F15\u865F\u3002
++        CloseQuoteExpected = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027 "{1}" \u9810\u671F\u6709\u7D50\u675F\u5F15\u865F\u3002
++        AttributeNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 "{0}" \u6307\u5B9A\u5C6C\u6027 "{1}"\u3002
++        AttributeNSNotUnique = \u5DF2\u7D93\u70BA\u5143\u7D20 "{0}" \u6307\u5B9A\u9023\u7D50\u547D\u540D\u7A7A\u9593 "{2}" \u7684\u5C6C\u6027 "{1}"\u3002
++        ETagUnterminated = \u5143\u7D20\u985E\u578B "{0}" \u7684\u7D50\u675F\u6A19\u8A18\u7D50\u5C3E\u5FC5\u9808\u662F ''>'' \u5206\u754C\u5B57\u5143\u3002
+         MarkupNotRecognizedInContent = \u5143\u7D20\u7684\u5167\u5BB9\u5FC5\u9808\u7531\u683C\u5F0F\u6B63\u78BA\u7684\u4F4D\u63CF\u8FF0\u8CC7\u6599\u6216\u6A19\u8A18\u6240\u7D44\u6210\u3002
+         DoctypeIllegalInContent = \u5167\u5BB9\u4E0D\u5141\u8A31 DOCTYPE\u3002
+ # 4.1 Character and Entity References
+         ReferenceUnterminated = \u53C3\u7167\u5FC5\u9808\u7531 ';' \u5206\u754C\u5B57\u5143\u7D42\u6B62\u3002
+ # 4.3.2 Well-Formed Parsed Entities
+-        ReferenceNotInOneEntity = \u53C3\u7167\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u500B\u9AD4\u5167\u3002
+-        ElementEntityMismatch = \u5143\u7D20 \"{0}\" \u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
+-        MarkupEntityMismatch=XML \u6587\u4EF6\u7D50\u69CB\u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
++        ReferenceNotInOneEntity = \u53C3\u7167\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u5BE6\u9AD4\u5167\u3002
++        ElementEntityMismatch = \u5143\u7D20 "{0}" \u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
++        MarkupEntityMismatch=XML \u6587\u4EF6\u7D50\u69CB\u7684\u958B\u982D\u8207\u7D50\u5C3E\u5FC5\u9808\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
+         
+ # Messages common to Document and DTD
+ # 2.2 Characters
+-        InvalidCharInAttValue = \u5728\u5C6C\u6027 \"{1}\" \u7684\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{2}) \u4E14\u5143\u7D20\u70BA \"{0}\"\u3002
++        InvalidCharInAttValue = \u5728\u5C6C\u6027 "{1}" \u7684\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{2}) \u4E14\u5143\u7D20\u70BA "{0}"\u3002
+         InvalidCharInComment = \u5728\u8A3B\u89E3\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInPI = \u5728\u8655\u7406\u6307\u793A\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInInternalSubset = \u5728 DTD \u5167\u90E8\u5B50\u96C6\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+ # 2.3 Common Syntactic Constructs
+-        QuoteRequiredInAttValue = \u5C6C\u6027 \"{1}\" \u7684\u503C\u958B\u982D\u5FC5\u9808\u70BA\u55AE\u5F15\u865F\u6216\u96D9\u5F15\u865F\u5B57\u5143\u3002
+-        LessthanInAttValue = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5C6C\u6027 \"{1}\" \u7684\u503C\u4E0D\u53EF\u5305\u542B ''<'' \u5B57\u5143\u3002
+-        AttributeValueUnterminated = \u5C6C\u6027 \"{1}\" \u7684\u503C\u7D50\u5C3E\u5FC5\u9808\u662F\u914D\u5C0D\u7684\u5F15\u865F\u5B57\u5143\u3002
++        QuoteRequiredInAttValue = \u5C6C\u6027 "{1}" \u7684\u503C\u958B\u982D\u5FC5\u9808\u70BA\u55AE\u5F15\u865F\u6216\u96D9\u5F15\u865F\u5B57\u5143\u3002
++        LessthanInAttValue = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5C6C\u6027 "{1}" \u7684\u503C\u4E0D\u53EF\u5305\u542B ''<'' \u5B57\u5143\u3002
++        AttributeValueUnterminated = \u5C6C\u6027 "{1}" \u7684\u503C\u7D50\u5C3E\u5FC5\u9808\u662F\u914D\u5C0D\u7684\u5F15\u865F\u5B57\u5143\u3002
+ # 2.5 Comments
+-        InvalidCommentStart = \u8A3B\u89E3\u958B\u982D\u5FC5\u9808\u70BA \"\"\u3002
+-        COMMENT_NOT_IN_ONE_ENTITY = \u8A3B\u89E3\u672A\u5305\u542B\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
++        InvalidCommentStart = \u8A3B\u89E3\u958B\u982D\u5FC5\u9808\u70BA ""\u3002
++        COMMENT_NOT_IN_ONE_ENTITY = \u8A3B\u89E3\u672A\u5305\u542B\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
+ # 2.6 Processing Instructions
+         PITargetRequired = \u8655\u7406\u6307\u793A\u7684\u958B\u982D\u5FC5\u9808\u662F\u76EE\u6A19\u7684\u540D\u7A31\u3002
+         SpaceRequiredInPI = \u8655\u7406\u6307\u793A\u76EE\u6A19\u8207\u8CC7\u6599\u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
+-        PIUnterminated = \u8655\u7406\u6307\u793A\u7D50\u5C3E\u5FC5\u9808\u662F \"?>\"\u3002
+-        ReservedPITarget = \u4E0D\u5141\u8A31\u7B26\u5408 \"[xX][mM][lL]\" \u7684\u8655\u7406\u6307\u793A\u76EE\u6A19\u3002
+-        PI_NOT_IN_ONE_ENTITY = \u8655\u7406\u6307\u793A\u672A\u5305\u542B\u5728\u76F8\u540C\u500B\u9AD4\u5167\u3002
++        PIUnterminated = \u8655\u7406\u6307\u793A\u7D50\u5C3E\u5FC5\u9808\u662F "?>"\u3002
++        ReservedPITarget = \u4E0D\u5141\u8A31\u7B26\u5408 "[xX][mM][lL]" \u7684\u8655\u7406\u6307\u793A\u76EE\u6A19\u3002
++        PI_NOT_IN_ONE_ENTITY = \u8655\u7406\u6307\u793A\u672A\u5305\u542B\u5728\u76F8\u540C\u5BE6\u9AD4\u5167\u3002
+ # 2.8 Prolog and Document Type Declaration
+-        VersionInfoInvalid = \u7121\u6548\u7684\u7248\u672C \"{0}\"\u3002
+-        VersionNotSupported = \u4E0D\u652F\u63F4 XML \u7248\u672C \"{0}\"\uFF0C\u50C5\u652F\u63F4 XML 1.0\u3002
+-        VersionNotSupported11 = \u4E0D\u652F\u63F4 XML \u7248\u672C \"{0}\"\uFF0C\u50C5\u652F\u63F4 XML 1.0 \u8207 XML 1.1\u3002
+-        VersionMismatch= \u500B\u9AD4\u4E0D\u53EF\u5305\u542B\u8F03\u65B0\u7248\u672C\u7684\u5176\u4ED6\u500B\u9AD4\u3002
++        VersionInfoInvalid = \u7121\u6548\u7684\u7248\u672C "{0}"\u3002
++        VersionNotSupported = \u4E0D\u652F\u63F4 XML \u7248\u672C "{0}"\uFF0C\u50C5\u652F\u63F4 XML 1.0\u3002
++        VersionNotSupported11 = \u4E0D\u652F\u63F4 XML \u7248\u672C "{0}"\uFF0C\u50C5\u652F\u63F4 XML 1.0 \u8207 XML 1.1\u3002
++        VersionMismatch= \u5BE6\u9AD4\u4E0D\u53EF\u5305\u542B\u8F03\u65B0\u7248\u672C\u7684\u5176\u4ED6\u5BE6\u9AD4\u3002
+ # 4.1 Character and Entity References
+-        DigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 \"&#\" \u4E4B\u5F8C\u3002
+-        HexdigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u516D\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 \"&#x\" \u4E4B\u5F8C\u3002
++        DigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 "&#" \u4E4B\u5F8C\u3002
++        HexdigitRequiredInCharRef = \u5728\u5B57\u5143\u53C3\u7167\u4E2D\uFF0C\u5341\u516D\u9032\u4F4D\u8868\u793A\u6CD5\u5FC5\u9808\u7DCA\u63A5\u5728 "&#x" \u4E4B\u5F8C\u3002
+         SemicolonRequiredInCharRef = \u5B57\u5143\u53C3\u7167\u7684\u7D50\u5C3E\u5FC5\u9808\u662F ';' \u5206\u754C\u5B57\u5143\u3002
+-        InvalidCharRef = \u5B57\u5143\u53C3\u7167 \"&#{0}\" \u70BA\u7121\u6548\u7684 XML \u5B57\u5143\u3002
+-        NameRequiredInReference = \u5728\u500B\u9AD4\u53C3\u7167\u4E2D\uFF0C\u500B\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '&' \u4E4B\u5F8C\u3002
+-        SemicolonRequiredInReference = \u500B\u9AD4 \"{0}\" \u7684\u53C3\u7167\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
++        InvalidCharRef = \u5B57\u5143\u53C3\u7167 "&#{0}" \u70BA\u7121\u6548\u7684 XML \u5B57\u5143\u3002
++        NameRequiredInReference = \u5728\u5BE6\u9AD4\u53C3\u7167\u4E2D\uFF0C\u5BE6\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '&' \u4E4B\u5F8C\u3002
++        SemicolonRequiredInReference = \u5BE6\u9AD4 "{0}" \u7684\u53C3\u7167\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
+ # 4.3.1 The Text Declaration
+-        TextDeclMustBeFirst = \u6587\u5B57\u5BA3\u544A\u50C5\u80FD\u51FA\u73FE\u5728\u5916\u90E8\u5256\u6790\u500B\u9AD4\u7684\u958B\u982D\u3002
+-        EqRequiredInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 \"{0}\" \u4E4B\u5F8C\u3002
+-        QuoteRequiredInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D \"{0}\" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
+-        CloseQuoteMissingInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u907A\u6F0F \"{0}\" \u4E4B\u5F8C\u7684\u503C\u7684\u7D50\u675F\u5F15\u865F\u3002
++        TextDeclMustBeFirst = \u6587\u5B57\u5BA3\u544A\u50C5\u80FD\u51FA\u73FE\u5728\u5916\u90E8\u5256\u6790\u5BE6\u9AD4\u7684\u958B\u982D\u3002
++        EqRequiredInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C'' = '' \u5B57\u5143\u5FC5\u9808\u7DCA\u63A5\u5728 "{0}" \u4E4B\u5F8C\u3002
++        QuoteRequiredInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D "{0}" \u4E4B\u5F8C\u7684\u503C\u5FC5\u9808\u662F\u4EE5\u5F15\u865F\u62EC\u4F4F\u7684\u5B57\u4E32\u3002
++        CloseQuoteMissingInTextDecl = \u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u907A\u6F0F "{0}" \u4E4B\u5F8C\u7684\u503C\u7684\u7D50\u675F\u5F15\u865F\u3002
+         SpaceRequiredBeforeVersionInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u7248\u672C\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
+         SpaceRequiredBeforeEncodingInTextDecl = \u5728\u6587\u5B57\u5BA3\u544A\u4E2D\uFF0C\u7DE8\u78BC\u865B\u64EC\u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u683C\u3002
+-        TextDeclUnterminated = \u6587\u5B57\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F \"?>\"\u3002
++        TextDeclUnterminated = \u6587\u5B57\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u662F "?>"\u3002
+         EncodingDeclRequired = \u6587\u5B57\u5BA3\u544A\u4E2D\u9700\u8981\u7DE8\u78BC\u5BA3\u544A\u3002
+         NoMorePseudoAttributes = \u4E0D\u5141\u8A31\u66F4\u591A\u7684\u865B\u64EC\u5C6C\u6027\u3002
+         MorePseudoAttributes = \u9810\u671F\u66F4\u591A\u7684\u865B\u64EC\u5C6C\u6027\u3002
+         PseudoAttrNameExpected = \u9810\u671F\u4E00\u500B\u865B\u64EC\u5C6C\u6027\u540D\u7A31\u3002
+ # 4.3.2 Well-Formed Parsed Entities
+-        CommentNotInOneEntity = \u8A3B\u89E3\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u500B\u9AD4\u5167\u3002
+-        PINotInOneEntity = \u8655\u7406\u6307\u793A\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u500B\u9AD4\u5167\u3002
++        CommentNotInOneEntity = \u8A3B\u89E3\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u5BE6\u9AD4\u5167\u3002
++        PINotInOneEntity = \u8655\u7406\u6307\u793A\u5FC5\u9808\u6574\u500B\u5305\u542B\u5728\u76F8\u540C\u7684\u5256\u6790\u5BE6\u9AD4\u5167\u3002
+ # 4.3.3 Character Encoding in Entities
+-        EncodingDeclInvalid = \u7121\u6548\u7684\u7DE8\u78BC\u540D\u7A31 \"{0}\"\u3002
+-        EncodingByteOrderUnsupported = \u4E0D\u652F\u63F4\u7DE8\u78BC \"{0}\" \u7684\u6307\u5B9A\u4F4D\u5143\u7D44\u9806\u5E8F\u3002
++        EncodingDeclInvalid = \u7121\u6548\u7684\u7DE8\u78BC\u540D\u7A31 "{0}"\u3002
++        EncodingByteOrderUnsupported = \u4E0D\u652F\u63F4\u7DE8\u78BC "{0}" \u7684\u6307\u5B9A\u4F4D\u5143\u7D44\u9806\u5E8F\u3002
+         InvalidByte = {1}-byte UTF-8 \u5E8F\u5217\u7684\u7121\u6548\u4F4D\u5143\u7D44 {0}\u3002
+         ExpectedByte = {1}-byte UTF-8 \u5E8F\u5217\u9810\u671F\u7684\u4F4D\u5143\u7D44 {0}\u3002
+         InvalidHighSurrogate = UTF-8 \u5E8F\u5217\u4E2D\u9AD8\u66FF\u4EE3\u4F4D\u5143\u4E0D\u53EF\u8D85\u904E 0x10\uFF0C\u4F46\u627E\u5230 0x{0}\u3002
+-        OperationNotSupported = {1} \u8B80\u53D6\u5668\u4E0D\u652F\u63F4\u4F5C\u696D \"{0}\"\u3002
+-        InvalidASCII = \u7D44\u5143\u7D44 \"{0}\" \u4E0D\u662F (7 \u4F4D\u5143) ASCII \u5B57\u5143\u96C6\u7684\u6210\u54E1\u3002
+-        CharConversionFailure = \u6C7A\u5B9A\u4F7F\u7528\u7279\u5B9A\u7DE8\u78BC\u7684\u500B\u9AD4\uFF0C\u5728\u8A72\u7DE8\u78BC\u4E2D\u4E0D\u53EF\u5305\u542B\u7121\u6548\u7684\u5E8F\u5217\u3002
++        OperationNotSupported = {1} \u8B80\u53D6\u5668\u4E0D\u652F\u63F4\u4F5C\u696D "{0}"\u3002
++        InvalidASCII = \u7D44\u5143\u7D44 "{0}" \u4E0D\u662F (7 \u4F4D\u5143) ASCII \u5B57\u5143\u96C6\u7684\u6210\u54E1\u3002
++        CharConversionFailure = \u6C7A\u5B9A\u4F7F\u7528\u7279\u5B9A\u7DE8\u78BC\u7684\u5BE6\u9AD4\uFF0C\u5728\u8A72\u7DE8\u78BC\u4E2D\u4E0D\u53EF\u5305\u542B\u7121\u6548\u7684\u5E8F\u5217\u3002
+         
+ # DTD Messages
+ # 2.2 Characters
+-        InvalidCharInEntityValue = \u5728\u6587\u5B57\u500B\u9AD4\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
++        InvalidCharInEntityValue = \u5728\u6587\u5B57\u5BE6\u9AD4\u503C\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInExternalSubset = \u5728 DTD \u5916\u90E8\u5B50\u96C6\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInIgnoreSect = \u5728\u6392\u9664\u7684\u689D\u4EF6\u6027\u6BB5\u843D\u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+         InvalidCharInPublicID = \u5728\u516C\u7528 ID \u4E2D\u627E\u5230\u7121\u6548\u7684 XML \u5B57\u5143 (Unicode: 0x{0})\u3002
+@@ -169,150 +167,150 @@
+         PubidCharIllegal = \u516C\u7528 ID \u4E2D\u4E0D\u5141\u8A31\u5B57\u5143 (Unicode: 0x{0})\u3002
+         SpaceRequiredBetweenPublicAndSystem = publicId \u8207 systemId \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
+ # 2.8 Prolog and Document Type Declaration
+-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u4E2D \"''\u3002
+-        PEReferenceWithinMarkup = DTD \u5167\u90E8\u5B57\u96C6\u7684\u6A19\u8A18\u5167\u4E0D\u80FD\u51FA\u73FE\u53C3\u6578\u500B\u9AD4\u53C3\u7167 \"%{0};\"\u3002
++        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u4E2D "''\u3002
++        PEReferenceWithinMarkup = DTD \u5167\u90E8\u5B57\u96C6\u7684\u6A19\u8A18\u5167\u4E0D\u80FD\u51FA\u73FE\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};"\u3002
+         MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u6587\u4EF6\u985E\u578B\u5BA3\u544A\u5305\u542B\u6216\u6307\u5411\u7684\u6A19\u8A18\u5BA3\u544A\u5FC5\u9808\u683C\u5F0F\u6B63\u78BA\u3002
+ # 2.10 White Space Handling
+-        MSG_XML_SPACE_DECLARATION_ILLEGAL = \"xml:space\" \u7684\u5C6C\u6027\u5BA3\u544A\u5FC5\u9808\u6307\u5B9A\u70BA\u5217\u8209\u985E\u578B\uFF0C\u5176\u53EF\u80FD\u7684\u503C\u70BA \"default\" \u8207 \"preserve\"\u3002
++        MSG_XML_SPACE_DECLARATION_ILLEGAL = "xml:space" \u7684\u5C6C\u6027\u5BA3\u544A\u5FC5\u9808\u6307\u5B9A\u70BA\u5217\u8209\u985E\u578B\uFF0C\u5176\u53EF\u80FD\u7684\u503C\u70BA "default" \u8207 "preserve"\u3002
+ # 3.2 Element Type Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = \u5728\u5143\u7D20\u985E\u578B\u5BA3\u544A\u4E2D \"''\u3002
++        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = \u5728\u5143\u7D20\u985E\u578B\u5BA3\u544A\u4E2D\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5F8C\u9700\u8981\u7A7A\u683C\u3002
++        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = \u5728\u5143\u7D20\u985E\u578B\u5BA3\u544A\u4E2D\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5F8C\u9700\u8981\u9650\u5236\u689D\u4EF6\u3002
++        ElementDeclUnterminated = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u70BA ''>''\u3002
+ # 3.2.1 Element Content
+-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B ''('' \u5B57\u5143\u6216\u5143\u7D20\u985E\u578B\u3002
+-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
++        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B ''('' \u5B57\u5143\u6216\u5143\u7D20\u985E\u578B\u3002
++        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
+ # 3.2.2 Mixed Content
+-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B\u5143\u7D20\u985E\u578B\u3002
+-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
+-        MixedContentUnterminated = \u5B50\u9805\u5143\u7D20\u7684\u985E\u578B\u53D7\u5230\u9650\u5236\u6642\uFF0C\u6DF7\u5408\u5167\u5BB9\u6A21\u578B \"{0}\" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA \")*\"\u3002
++        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B\u5143\u7D20\u985E\u578B\u3002
++        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5BA3\u544A\u4E2D\u9700\u8981\u4E00\u500B '')''\u3002
++        MixedContentUnterminated = \u5B50\u9805\u5143\u7D20\u7684\u985E\u578B\u53D7\u5230\u9650\u5236\u6642\uFF0C\u6DF7\u5408\u5167\u5BB9\u6A21\u578B "{0}" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA ")*"\u3002
+ # 3.3 Attribute-List Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = \u5728 attribute-list \u5BA3\u544A\u4E2D \"\"\u3002
+-        IgnoreSectUnterminated = \u6392\u9664\u689D\u4EF6\u6027\u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F \"]]>\"\u3002
++        IncludeSectUnterminated = \u5305\u542B\u689D\u4EF6\u6027\u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F "]]>"\u3002
++        IgnoreSectUnterminated = \u6392\u9664\u689D\u4EF6\u6027\u6BB5\u843D\u7D50\u5C3E\u5FC5\u9808\u662F "]]>"\u3002
+ # 4.1 Character and Entity References
+-        NameRequiredInPEReference = \u5728\u53C3\u6578\u500B\u9AD4\u53C3\u7167\u4E2D\uFF0C\u500B\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '%' \u4E4B\u5F8C\u3002
+-        SemicolonRequiredInPEReference = \u53C3\u6578\u500B\u9AD4\u53C3\u7167 \"%{0};\" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
++        NameRequiredInPEReference = \u5728\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167\u4E2D\uFF0C\u5BE6\u9AD4\u540D\u7A31\u5FC5\u9808\u7DCA\u63A5\u5728 '%' \u4E4B\u5F8C\u3002
++        SemicolonRequiredInPEReference = \u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};" \u7684\u7D50\u5C3E\u5FC5\u9808\u70BA '';'' \u5206\u754C\u5B57\u5143\u3002
+ # 4.2 Entity Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u5728\u500B\u9AD4\u5BA3\u544A\u4E2D \"''\u3002
+-	MSG_DUPLICATE_ENTITY_DEFINITION = \u500B\u9AD4 \"{0}\" \u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002        
++        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = \u5728\u5BE6\u9AD4\u5BA3\u544A\u4E2D "''\u3002
++	MSG_DUPLICATE_ENTITY_DEFINITION = \u5BE6\u9AD4 "{0}" \u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002        
+ # 4.2.2 External Entities
+-        ExternalIDRequired = \u5916\u90E8\u500B\u9AD4\u5BA3\u544A\u7684\u958B\u982D\u5FC5\u9808\u70BA \"SYSTEM\" \u6216 \"PUBLIC\"\u3002
+-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = \"PUBLIC\" \u8207\u516C\u7528 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
++        ExternalIDRequired = \u5916\u90E8\u5BE6\u9AD4\u5BA3\u544A\u7684\u958B\u982D\u5FC5\u9808\u70BA "SYSTEM" \u6216 "PUBLIC"\u3002
++        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = "PUBLIC" \u8207\u516C\u7528 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
+         MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = \u516C\u7528 ID \u8207\u7CFB\u7D71 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
+-        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = \"SYSTEM\" \u8207\u7CFB\u7D71 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
+-        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5 ID \u4E0D\u61C9\u6307\u5B9A\u70BA\u7CFB\u7D71 ID \"{0}\" \u7684\u4E00\u90E8\u5206\u3002
++        MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = "SYSTEM" \u8207\u7CFB\u7D71 ID \u4E4B\u9593\u9700\u8981\u7A7A\u683C\u3002
++        MSG_URI_FRAGMENT_IN_SYSTEMID = \u7247\u6BB5 ID \u4E0D\u61C9\u6307\u5B9A\u70BA\u7CFB\u7D71 ID "{0}" \u7684\u4E00\u90E8\u5206\u3002
+ # 4.7 Notation Declarations
+-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D \"''\u3002
++        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = \u5728\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D\u8868\u793A\u6CD5\u540D\u7A31 "{0}" \u4E4B\u5F8C\u9700\u8981\u7A7A\u683C\u3002
++        ExternalIDorPublicIDRequired = \u8868\u793A\u6CD5 "{0}" \u7684\u5BA3\u544A\u5FC5\u9808\u5305\u542B\u7CFB\u7D71\u6216\u516C\u7528 ID\u3002
++        NotationDeclUnterminated = \u8868\u793A\u6CD5 "{0}" \u7684\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u70BA ''>''\u3002
+         
+ # Validation messages
+-        DuplicateTypeInMixedContent = \u5143\u7D20\u5BA3\u544A \"{0}\" \u7684\u5167\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7D93\u6307\u5B9A\u5143\u7D20\u985E\u578B \"{1}\"\u3002
+-        ENTITIESInvalid = \u985E\u578B ENTITIES \u7684\u5C6C\u6027\u503C \"{1}\" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u672A\u5256\u6790\u500B\u9AD4\u7684\u540D\u7A31\u3002
+-        ENTITYInvalid = \u985E\u578B ENTITY \u7684\u5C6C\u6027\u503C \"{1}\" \u5FC5\u9808\u662F\u4E00\u500B\u672A\u5256\u6790\u500B\u9AD4\u7684\u540D\u7A31\u3002
+-        IDDefaultTypeInvalid = ID \u5C6C\u6027 \"{0}\" \u5FC5\u9808\u5177\u6709 \"#IMPLIED\" \u6216 \"#REQUIRED\" \u7684\u5BA3\u544A\u9810\u8A2D\u3002
+-        IDInvalid = \u985E\u578B ID \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u540D\u7A31\u3002
+-        IDInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B ID \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F NCName\u3002
+-        IDNotUnique = \u985E\u578B ID \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u6587\u4EF6\u5167\u7684\u552F\u4E00\u503C\u3002
+-        IDREFInvalid = \u985E\u578B IDREF \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u540D\u7A31\u3002
+-        IDREFInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B IDREF \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F NCName\u3002
+-        IDREFSInvalid = \u985E\u578B IDREFS \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u3002
+-        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u7576\u500B\u9AD4\u53C3\u7167\u7576\u4F5C\u5B8C\u6574\u5BA3\u544A\u6642\uFF0C\u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
+-        ImproperDeclarationNesting = \u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
+-        ImproperGroupNesting = \u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u6210\u5C0D\u62EC\u865F\u3002
+-        INVALID_PE_IN_CONDITIONAL = \u53C3\u6578\u500B\u9AD4 \"{0}\" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6574\u500B\u689D\u4EF6\u6027\u6BB5\u843D\u6216\u50C5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
+-        MSG_ATTRIBUTE_NOT_DECLARED = \u5143\u7D20\u985E\u578B \"{0}\" \u5FC5\u9808\u5BA3\u544A\u5C6C\u6027 \"{1}\"\u3002
+-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5177\u6709\u503C \"{1}\" \u7684\u5C6C\u6027 \"{0}\" \u5FC5\u9808\u5177\u6709\u4F86\u81EA\u6E05\u55AE \"{2}\" \u7684\u503C\u3002
+-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5C6C\u6027 \"{0}\" \u7684\u503C \"{1}\" \u4E0D\u53EF\u900F\u904E\u6B63\u898F\u5316\u9032\u884C\u8B8A\u66F4 (\u6210\u70BA \"{2}\")\u3002
+-        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5167\u5BB9\u4E0D\u5B8C\u6574\uFF0C\u5B83\u5FC5\u9808\u914D\u5C0D \"{1}\"\u3002
+-        MSG_CONTENT_INVALID = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D \"{1}\"\u3002
+-        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D \"{1}\"\u3002\u4E0D\u5141\u8A31\u985E\u578B \"{2}\" \u7684\u5B50\u9805\u3002
+-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B \"{0}\" \u7684\u5C6C\u6027 \"{1}\" \u5177\u6709\u9810\u8A2D\u503C\uFF0C\u4E14\u5FC5\u9808\u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\u6307\u5B9A\u3002
+-        MSG_DUPLICATE_ATTDEF = \u5143\u7D20\u985E\u578B \"{0}\" \u5DF2\u7D93\u5BA3\u544A\u5C6C\u6027 \"{1}\"\u3002
+-        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u985E\u578B \"{0}\" \u4E0D\u53EF\u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002
+-        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u9808\u5BA3\u544A\u5143\u7D20\u985E\u578B \"{0}\"\u3002
++        DuplicateTypeInMixedContent = \u5143\u7D20\u5BA3\u544A "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u4E2D\u5DF2\u7D93\u6307\u5B9A\u5143\u7D20\u985E\u578B "{1}"\u3002
++        ENTITIESInvalid = \u985E\u578B ENTITIES \u7684\u5C6C\u6027\u503C "{1}" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u672A\u5256\u6790\u5BE6\u9AD4\u7684\u540D\u7A31\u3002
++        ENTITYInvalid = \u985E\u578B ENTITY \u7684\u5C6C\u6027\u503C "{1}" \u5FC5\u9808\u662F\u4E00\u500B\u672A\u5256\u6790\u5BE6\u9AD4\u7684\u540D\u7A31\u3002
++        IDDefaultTypeInvalid = ID \u5C6C\u6027 "{0}" \u5FC5\u9808\u5177\u6709 "#IMPLIED" \u6216 "#REQUIRED" \u7684\u5BA3\u544A\u9810\u8A2D\u3002
++        IDInvalid = \u985E\u578B ID \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u540D\u7A31\u3002
++        IDInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B ID \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F NCName\u3002
++        IDNotUnique = \u985E\u578B ID \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u6587\u4EF6\u5167\u7684\u552F\u4E00\u503C\u3002
++        IDREFInvalid = \u985E\u578B IDREF \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u540D\u7A31\u3002
++        IDREFInvalidWithNamespaces = \u555F\u7528\u547D\u540D\u7A7A\u9593\u6642\uFF0C\u985E\u578B IDREF \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F NCName\u3002
++        IDREFSInvalid = \u985E\u578B IDREFS \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u3002
++        ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = \u7576\u5BE6\u9AD4\u53C3\u7167\u7576\u4F5C\u5B8C\u6574\u5BA3\u544A\u6642\uFF0C\u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
++        ImproperDeclarationNesting = \u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u5BA3\u544A\u3002
++        ImproperGroupNesting = \u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6B63\u78BA\u5DE2\u72C0\u7D50\u69CB\u7684\u6210\u5C0D\u62EC\u865F\u3002
++        INVALID_PE_IN_CONDITIONAL = \u53C3\u6578\u5BE6\u9AD4 "{0}" \u7684\u53D6\u4EE3\u6587\u5B57\u5FC5\u9808\u5305\u542B\u6574\u500B\u689D\u4EF6\u6027\u6BB5\u843D\u6216\u50C5\u5305\u542B INCLUDE \u6216 IGNORE\u3002
++        MSG_ATTRIBUTE_NOT_DECLARED = \u5143\u7D20\u985E\u578B "{0}" \u5FC5\u9808\u5BA3\u544A\u5C6C\u6027 "{1}"\u3002
++        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = \u5177\u6709\u503C "{1}" \u7684\u5C6C\u6027 "{0}" \u5FC5\u9808\u5177\u6709\u4F86\u81EA\u6E05\u55AE "{2}" \u7684\u503C\u3002
++        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5C6C\u6027 "{0}" \u7684\u503C "{1}" \u4E0D\u53EF\u900F\u904E\u6B63\u898F\u5316\u9032\u884C\u8B8A\u66F4 (\u6210\u70BA "{2}")\u3002
++        MSG_CONTENT_INCOMPLETE = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5167\u5BB9\u4E0D\u5B8C\u6574\uFF0C\u5B83\u5FC5\u9808\u914D\u5C0D "{1}"\u3002
++        MSG_CONTENT_INVALID = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D "{1}"\u3002
++        MSG_CONTENT_INVALID_SPECIFIED = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5167\u5BB9\u5FC5\u9808\u914D\u5C0D "{1}"\u3002\u4E0D\u5141\u8A31\u985E\u578B "{2}" \u7684\u5B50\u9805\u3002
++        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B "{0}" \u7684\u5C6C\u6027 "{1}" \u5177\u6709\u9810\u8A2D\u503C\uFF0C\u4E14\u5FC5\u9808\u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\u6307\u5B9A\u3002
++        MSG_DUPLICATE_ATTDEF = \u5143\u7D20\u985E\u578B "{0}" \u5DF2\u7D93\u5BA3\u544A\u5C6C\u6027 "{1}"\u3002
++        MSG_ELEMENT_ALREADY_DECLARED = \u5143\u7D20\u985E\u578B "{0}" \u4E0D\u53EF\u5BA3\u544A\u8D85\u904E\u4E00\u6B21\u4EE5\u4E0A\u3002
++        MSG_ELEMENT_NOT_DECLARED = \u5FC5\u9808\u5BA3\u544A\u5143\u7D20\u985E\u578B "{0}"\u3002
+         MSG_GRAMMAR_NOT_FOUND = \u6587\u4EF6\u7121\u6548: \u627E\u4E0D\u5230\u6587\u6CD5\u3002
+-        MSG_ELEMENT_WITH_ID_REQUIRED = ID \u70BA \"{0}\" \u7684\u5143\u7D20\u5FC5\u9808\u51FA\u73FE\u5728\u6587\u4EF6\u4E2D\u3002
+-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u7368\u7ACB\u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u500B\u9AD4 \"{0}\"\u3002
+-        MSG_FIXED_ATTVALUE_INVALID = \u5177\u6709\u503C \"{2}\" \u7684\u5C6C\u6027 \"{1}\" \u5FC5\u9808\u5177\u6709 \"{3}\" \u7684\u503C\u3002
+-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u985E\u578B \"{0}\" \u5DF2\u7D93\u5177\u6709\u985E\u578B ID \u7684\u5C6C\u6027 \"{1}\"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B ID \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 \"{2}\"\u3002
+-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u985E\u578B \"{0}\" \u5DF2\u7D93\u5177\u6709\u985E\u578B NOTATION \u7684\u5C6C\u6027 \"{1}\"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B NOTATION \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 \"{2}\"\u3002
+-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u82E5\u8981\u5728\u5C6C\u6027 \"{0}\" \u7684\u8868\u793A\u6CD5\u985E\u578B\u6E05\u55AE\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 \"{1}\"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
+-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u82E5\u8981\u5728 \"{0}\" \u7684\u672A\u5256\u6790\u500B\u9AD4\u5BA3\u544A\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 \"{1}\"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
+-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5256\u6790\u500B\u9AD4\u4E2D\u5BA3\u544A\u7684\u500B\u9AD4 \"{0}\"\u3002
+-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B \"{0}\" \u9700\u8981\u5C6C\u6027 \"{1}\" \u4E14\u5FC5\u9808\u4E88\u4EE5\u6307\u5B9A\u3002
+-        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5177\u6709\u5143\u7D20\u5167\u5BB9\u7684\u5916\u90E8\u5256\u6790\u500B\u9AD4\u4E2D\u5BA3\u544A\u7684\u5143\u7D20\u4E4B\u9593\uFF0C\u4E0D\u53EF\u6709\u7A7A\u683C\u3002
+-        NMTOKENInvalid = \u985E\u578B NMTOKEN \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u540D\u7A31\u8A18\u865F\u3002
+-        NMTOKENSInvalid = \u985E\u578B NMTOKENS \u7684\u5C6C\u6027\u503C \"{0}\" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u8A18\u865F\u3002
+-        NoNotationOnEmptyElement = \u5BA3\u544A EMPTY \u7684\u5143\u7D20\u985E\u578B \"{0}\" \u4E0D\u53EF\u5BA3\u544A\u985E\u578B NOTATION \u7684\u5C6C\u6027 \"{1}\"\u3002
+-        RootElementTypeMustMatchDoctypedecl = \u6587\u4EF6\u6839\u5143\u7D20 \"{1}\" \u5FC5\u9808\u914D\u5C0D DOCTYPE \u6839 \"{0}\"\u3002
+-        UndeclaredElementInContentSpec = \u5143\u7D20 \"{0}\" \u7684\u5167\u5BB9\u6A21\u578B\u53C3\u7167\u672A\u5BA3\u544A\u7684\u5143\u7D20 \"{1}\"\u3002
+-        UniqueNotationName = \u8868\u793A\u6CD5 \"{0}\" \u7684\u5BA3\u544A\u4E26\u975E\u552F\u4E00\u3002\u6307\u5B9A\u7684 Name \u4E0D\u80FD\u5728\u4E00\u500B\u4EE5\u4E0A\u7684\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D\u5BA3\u544A\u3002
++        MSG_ELEMENT_WITH_ID_REQUIRED = ID \u70BA "{0}" \u7684\u5143\u7D20\u5FC5\u9808\u51FA\u73FE\u5728\u6587\u4EF6\u4E2D\u3002
++        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = \u7368\u7ACB\u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5BE6\u9AD4 "{0}"\u3002
++        MSG_FIXED_ATTVALUE_INVALID = \u5177\u6709\u503C "{2}" \u7684\u5C6C\u6027 "{1}" \u5FC5\u9808\u5177\u6709 "{3}" \u7684\u503C\u3002
++        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = \u5143\u7D20\u985E\u578B "{0}" \u5DF2\u7D93\u5177\u6709\u985E\u578B ID \u7684\u5C6C\u6027 "{1}"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B ID \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 "{2}"\u3002
++        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = \u5143\u7D20\u985E\u578B "{0}" \u5DF2\u7D93\u5177\u6709\u985E\u578B NOTATION \u7684\u5C6C\u6027 "{1}"\uFF0C\u4E0D\u5141\u8A31\u8A72\u985E\u578B NOTATION \u7684\u7B2C\u4E8C\u500B\u5C6C\u6027 "{2}"\u3002
++        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = \u82E5\u8981\u5728\u5C6C\u6027 "{0}" \u7684\u8868\u793A\u6CD5\u985E\u578B\u6E05\u55AE\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 "{1}"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
++        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = \u82E5\u8981\u5728 "{0}" \u7684\u672A\u5256\u6790\u5BE6\u9AD4\u5BA3\u544A\u4E2D\u53C3\u7167\u8868\u793A\u6CD5 "{1}"\uFF0C\u5FC5\u9808\u4E88\u4EE5\u5BA3\u544A\u3002
++        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5256\u6790\u5BE6\u9AD4\u4E2D\u5BA3\u544A\u7684\u5BE6\u9AD4 "{0}"\u3002
++        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = \u5143\u7D20\u985E\u578B "{0}" \u9700\u8981\u5C6C\u6027 "{1}" \u4E14\u5FC5\u9808\u4E88\u4EE5\u6307\u5B9A\u3002
++        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = \u5728\u7368\u7ACB\u6587\u4EF6\u4E2D\uFF0C\u5177\u6709\u5143\u7D20\u5167\u5BB9\u7684\u5916\u90E8\u5256\u6790\u5BE6\u9AD4\u4E2D\u5BA3\u544A\u7684\u5143\u7D20\u4E4B\u9593\uFF0C\u4E0D\u53EF\u6709\u7A7A\u683C\u3002
++        NMTOKENInvalid = \u985E\u578B NMTOKEN \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u540D\u7A31\u8A18\u865F\u3002
++        NMTOKENSInvalid = \u985E\u578B NMTOKENS \u7684\u5C6C\u6027\u503C "{0}" \u5FC5\u9808\u662F\u4E00\u6216\u591A\u500B\u540D\u7A31\u8A18\u865F\u3002
++        NoNotationOnEmptyElement = \u5BA3\u544A EMPTY \u7684\u5143\u7D20\u985E\u578B "{0}" \u4E0D\u53EF\u5BA3\u544A\u985E\u578B NOTATION \u7684\u5C6C\u6027 "{1}"\u3002
++        RootElementTypeMustMatchDoctypedecl = \u6587\u4EF6\u6839\u5143\u7D20 "{1}" \u5FC5\u9808\u914D\u5C0D DOCTYPE \u6839 "{0}"\u3002
++        UndeclaredElementInContentSpec = \u5143\u7D20 "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u53C3\u7167\u672A\u5BA3\u544A\u7684\u5143\u7D20 "{1}"\u3002
++        UniqueNotationName = \u8868\u793A\u6CD5 "{0}" \u7684\u5BA3\u544A\u4E26\u975E\u552F\u4E00\u3002\u6307\u5B9A\u7684 Name \u4E0D\u80FD\u5728\u4E00\u500B\u4EE5\u4E0A\u7684\u8868\u793A\u6CD5\u5BA3\u544A\u4E2D\u5BA3\u544A\u3002
+         ENTITYFailedInitializeGrammar =  ENTITYDatatype \u9A57\u8B49\u7A0B\u5F0F: \u5931\u6557\u3002\u9700\u8981\u4F7F\u7528\u6709\u6548\u7684\u6587\u6CD5\u53C3\u7167\u4F86\u547C\u53EB\u8D77\u59CB\u65B9\u6CD5\u3002 \t
+-        ENTITYNotUnparsed = ENTITY \"{0}\" \u4E26\u975E\u672A\u7D93\u5256\u6790\u3002
+-        ENTITYNotValid = ENTITY \"{0}\" \u7121\u6548\u3002
++        ENTITYNotUnparsed = ENTITY "{0}" \u4E26\u975E\u672A\u7D93\u5256\u6790\u3002
++        ENTITYNotValid = ENTITY "{0}" \u7121\u6548\u3002
+         EmptyList = \u985E\u578B ENTITIES\u3001IDREFS \u8207 NMTOKENS \u7684\u503C\u4E0D\u53EF\u70BA\u7A7A\u767D\u6E05\u55AE\u3002
+ 
+ # Entity related messages
+ # 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+-        ReferenceToExternalEntity = \u5C6C\u6027\u503C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u500B\u9AD4 \"&{0};\"\u3002
+-        AccessExternalDTD = External DTD: Failed to read external DTD ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
+-        AccessExternalEntity = External Entity: Failed to read external document ''{0}'', because ''{1}'' access is not allowed due to restriction set by the accessExternalDTD property.
++        ReferenceToExternalEntity = \u5C6C\u6027\u503C\u4E0D\u5141\u8A31\u53C3\u7167\u5916\u90E8\u5BE6\u9AD4 "&{0};"\u3002
++        AccessExternalDTD = \u5916\u90E8 DTD: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8 DTD ''{0}''\uFF0C\u56E0\u70BA accessExternalDTD \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
++        AccessExternalEntity = \u5916\u90E8\u5BE6\u9AD4: \u7121\u6CD5\u8B80\u53D6\u5916\u90E8\u6587\u4EF6 ''{0}''\uFF0C\u56E0\u70BA accessExternalDTD \u5C6C\u6027\u8A2D\u5B9A\u7684\u9650\u5236\uFF0C\u6240\u4EE5\u4E0D\u5141\u8A31 ''{1}'' \u5B58\u53D6\u3002
+ 
+ # 4.1 Character and Entity References
+-        EntityNotDeclared = \u53C3\u7167\u4E86\u500B\u9AD4 \"{0}\"\uFF0C\u4F46\u662F\u672A\u5BA3\u544A\u3002
+-        ReferenceToUnparsedEntity = \u4E0D\u5141\u8A31\u672A\u5256\u6790\u7684\u500B\u9AD4\u53C3\u7167 \"&{0};\"\u3002
+-        RecursiveReference = \u905E\u8FF4\u500B\u9AD4\u53C3\u7167 \"{0}\"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
+-        RecursiveGeneralReference = \u905E\u8FF4\u4E00\u822C\u500B\u9AD4\u53C3\u7167 \"&{0};\"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
+-        RecursivePEReference = \u905E\u8FF4\u53C3\u6578\u500B\u9AD4\u53C3\u7167 \"%{0};\"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
++        EntityNotDeclared = \u53C3\u7167\u4E86\u5BE6\u9AD4 "{0}"\uFF0C\u4F46\u662F\u672A\u5BA3\u544A\u3002
++        ReferenceToUnparsedEntity = \u4E0D\u5141\u8A31\u672A\u5256\u6790\u7684\u5BE6\u9AD4\u53C3\u7167 "&{0};"\u3002
++        RecursiveReference = \u905E\u8FF4\u5BE6\u9AD4\u53C3\u7167 "{0}"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
++        RecursiveGeneralReference = \u905E\u8FF4\u4E00\u822C\u5BE6\u9AD4\u53C3\u7167 "&{0};"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
++        RecursivePEReference = \u905E\u8FF4\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};"\u3002(\u53C3\u7167\u8DEF\u5F91: {1})\uFF0C
+ # 4.3.3 Character Encoding in Entities
+-        EncodingNotSupported = \u4E0D\u652F\u63F4\u7DE8\u78BC \"{0}\"\u3002
+-        EncodingRequired = \u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u7DE8\u78BC\u7684\u5256\u6790\u500B\u9AD4\uFF0C\u5FC5\u9808\u5305\u542B\u7DE8\u78BC\u5BA3\u544A\u3002
++        EncodingNotSupported = \u4E0D\u652F\u63F4\u7DE8\u78BC "{0}"\u3002
++        EncodingRequired = \u672A\u4F7F\u7528 UTF-8 \u6216 UTF-16 \u7DE8\u78BC\u7684\u5256\u6790\u5BE6\u9AD4\uFF0C\u5FC5\u9808\u5305\u542B\u7DE8\u78BC\u5BA3\u544A\u3002
+         
+ # Namespaces support
+ # 4. Using Qualified Names
+         IllegalQName = \u5143\u7D20\u6216\u5C6C\u6027\u4E0D\u7B26\u5408 QName \u7522\u751F: QName::=(NCName':')?NCName\u3002 
+-        ElementXMLNSPrefix = \u5143\u7D20 \"{0}\" \u4E0D\u80FD\u4F7F\u7528 \"xmlns\" \u4F5C\u70BA\u524D\u7F6E\u78BC\u3002
+-        ElementPrefixUnbound = \u5143\u7D20 \"{1}\" \u7684\u524D\u7F6E\u78BC \"{0}\" \u672A\u9023\u7D50\u3002
+-        AttributePrefixUnbound = \u95DC\u806F\u5143\u7D20\u985E\u578B \"{0}\" \u4E4B\u5C6C\u6027 \"{1}\" \u7684\u524D\u7F6E\u78BC \"{2}\" \u672A\u9023\u7D50\u3002
+-        EmptyPrefixedAttName = \u5C6C\u6027 \"{0}\" \u7684\u503C\u7121\u6548\u3002\u524D\u7F6E\u7684\u547D\u540D\u7A7A\u9593\u9023\u7D50\u4E0D\u53EF\u70BA\u7A7A\u767D\u3002
+-        PrefixDeclared = \u672A\u5BA3\u544A\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC \"{0}\"\u3002
++        ElementXMLNSPrefix = \u5143\u7D20 "{0}" \u4E0D\u80FD\u4F7F\u7528 "xmlns" \u4F5C\u70BA\u524D\u7F6E\u78BC\u3002
++        ElementPrefixUnbound = \u5143\u7D20 "{1}" \u7684\u524D\u7F6E\u78BC "{0}" \u672A\u9023\u7D50\u3002
++        AttributePrefixUnbound = \u95DC\u806F\u5143\u7D20\u985E\u578B "{0}" \u4E4B\u5C6C\u6027 "{1}" \u7684\u524D\u7F6E\u78BC "{2}" \u672A\u9023\u7D50\u3002
++        EmptyPrefixedAttName = \u5C6C\u6027 "{0}" \u7684\u503C\u7121\u6548\u3002\u524D\u7F6E\u7684\u547D\u540D\u7A7A\u9593\u9023\u7D50\u4E0D\u53EF\u70BA\u7A7A\u767D\u3002
++        PrefixDeclared = \u672A\u5BA3\u544A\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC "{0}"\u3002
+         CantBindXMLNS = \u524D\u7F6E\u78BC "xmlns" \u7121\u6CD5\u660E\u78BA\u9023\u7D50\u4EFB\u4F55\u547D\u540D\u7A7A\u9593; "xmlns" \u7684\u547D\u540D\u7A7A\u9593\u4E5F\u7121\u6CD5\u660E\u78BA\u9023\u7D50\u4EFB\u4F55\u524D\u7F6E\u78BC\u3002
+         CantBindXML = \u524D\u7F6E\u78BC "xml" \u7121\u6CD5\u9023\u7D50\u4E00\u822C\u547D\u540D\u7A7A\u9593\u4E4B\u5916\u7684\u4EFB\u4F55\u547D\u540D\u7A7A\u9593; "xml" \u7684\u547D\u540D\u7A7A\u9593\u4E5F\u7121\u6CD5\u9023\u7D50 "xml" \u4E4B\u5916\u7684\u4EFB\u4F55\u547D\u540D\u7A7A\u9593\u3002
+-        MSG_ATT_DEFAULT_INVALID = \u7531\u65BC\u6B64\u5C6C\u6027\u985E\u578B\u7684\u8A9E\u5F59\u9650\u5236\u689D\u4EF6\uFF0C\u5C6C\u6027 \"{0}\" \u7684 defaultValue \"{1}\" \u7121\u6548\u3002
++        MSG_ATT_DEFAULT_INVALID = \u7531\u65BC\u6B64\u5C6C\u6027\u985E\u578B\u7684\u8A9E\u5F59\u9650\u5236\u689D\u4EF6\uFF0C\u5C6C\u6027 "{0}" \u7684 defaultValue "{1}" \u7121\u6548\u3002
+ 
+ # REVISIT: These need messages
+         MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+@@ -320,8 +318,10 @@
+         InvalidCharInLiteral=InvalidCharInLiteral
+ 
+ 
+-#Application can set the limit of number of entities that should be expanded by the parser.
+-EntityExpansionLimitExceeded=\u5256\u6790\u5668\u5728\u6B64\u6587\u4EF6\u4E2D\u906D\u9047 \"{0}\" \u500B\u4EE5\u4E0A\u7684\u500B\u9AD4\u64F4\u5145; \u6B64\u70BA\u61C9\u7528\u7A0B\u5F0F\u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
++# Implementation limits
++        EntityExpansionLimitExceeded=JAXP00010001: \u5256\u6790\u5668\u5728\u6B64\u6587\u4EF6\u4E2D\u9047\u5230 "{0}" \u500B\u4EE5\u4E0A\u7684\u5BE6\u9AD4\u64F4\u5145; \u9019\u662F JDK \u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
++        ElementAttributeLimit=JAXP00010002: \u5143\u7D20 "{0}" \u5177\u6709\u8D85\u904E "{1}" \u500B\u4EE5\u4E0A\u7684\u5C6C\u6027\uFF0C"{1}" \u662F JDK \u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
++        MaxEntitySizeLimit=JAXP00010003: \u5BE6\u9AD4 "{0}" \u7684\u9577\u5EA6\u70BA "{1}"\uFF0C\u8D85\u904E "{3}" \u6240\u8A2D\u5B9A\u7684 "{2}" \u9650\u5236\u3002
++        TotalEntitySizeLimit=JAXP00010004: \u5BE6\u9AD4\u7684\u7D2F\u7A4D\u5927\u5C0F "{0}" \u8D85\u904E "{2}" \u8A2D\u5B9A\u7684 "{1}" \u9650\u5236\u3002
++        MaxXMLNameLimit=JAXP00010005: \u540D\u7A31 "{0}" \u8D85\u904E "{2}" \u8A2D\u5B9A\u7684 "{1}" \u9650\u5236\u3002
+ 
+-# Application can set the limit of number of attributes of entity that should be expanded by the parser.
+-ElementAttributeLimit= \u5143\u7D20 \"{0}\" \u5177\u6709\u8D85\u904E \"{1}\" \u500B\u4EE5\u4E0A\u7684\u5C6C\u6027\uFF0C\"{1}\" \u70BA\u61C9\u7528\u7A0B\u5F0F\u6240\u898F\u5B9A\u7684\u9650\u5236\u3002
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xpath/XPath.java	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xpath/XPath.java	2014-06-06 19:56:13.000000000 -0700
+@@ -1422,7 +1422,7 @@
+                             }
+                             ch = data.charAt(currentOffset);
+                         } while (ch == ' ' || ch == 0x0A || ch == 0x09 || ch == 0x0D);
+-                        if (currentOffset == endOffset || ch == '|') {
++                        if (currentOffset == endOffset || ch == '|' || ch == '/') {
+                             addToken(tokens, XPath.Tokens.EXPRTOKEN_PERIOD);
+                             starIsMultiplyOperator = true;
+                             break;
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/models/CMNodeFactory.java	2013-12-01 11:13:41.000000000 -0800
+@@ -21,13 +21,13 @@
+ 
+ package com.sun.org.apache.xerces.internal.impl.xs.models;
+ 
++import com.sun.org.apache.xerces.internal.impl.Constants;
+ import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
+-import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
+-import com.sun.org.apache.xerces.internal.util.SecurityManager ;
+ import com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode;
+-import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
+ import com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter;
+-import com.sun.org.apache.xerces.internal.impl.Constants;
++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
++import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager;
++import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
+ 
+ /**
+  *
+@@ -68,7 +68,7 @@
+ 
+     // stores defaults for different security holes (maxOccurLimit in current context) if it has
+     // been set on the configuration.
+-    private SecurityManager fSecurityManager = null;
++    private XMLSecurityManager fSecurityManager = null;
+ 
+     /** default constructor */
+     public CMNodeFactory() {
+@@ -77,10 +77,10 @@
+     public void reset(XMLComponentManager componentManager){
+         fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
+         try {
+-            fSecurityManager = (SecurityManager)componentManager.getProperty(SECURITY_MANAGER);
++            fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);
+             //we are setting the limit of number of nodes to 3times the maxOccur value..
+             if(fSecurityManager != null){
+-                maxNodeLimit = fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY ;
++                maxNodeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY ;
+             }
+         }
+         catch (XMLConfigurationException e) {
+@@ -109,7 +109,8 @@
+     }
+ 
+     public void nodeCountCheck(){
+-        if( fSecurityManager != null && nodeCount++ > maxNodeLimit){
++        if( fSecurityManager != null && !fSecurityManager.isNoLimit(maxNodeLimit) &&
++                nodeCount++ > maxNodeLimit){
+             if(DEBUG){
+                 System.out.println("nodeCount = " + nodeCount ) ;
+                 System.out.println("nodeLimit = " + maxNodeLimit ) ;
+@@ -150,8 +151,9 @@
+ 
+             if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
+                 propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
+-                fSecurityManager = (SecurityManager)value;
+-                maxNodeLimit = (fSecurityManager != null) ? fSecurityManager.getMaxOccurNodeLimit() * MULTIPLICITY : 0 ;
++                fSecurityManager = (XMLSecurityManager)value;
++                maxNodeLimit = (fSecurityManager != null) ?
++                        fSecurityManager.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT) * MULTIPLICITY : 0 ;
+                 return;
+             }
+             if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java	2013-12-01 11:13:41.000000000 -0800
+@@ -40,6 +40,7 @@
+ import com.sun.org.apache.xerces.internal.util.SymbolTable;
+ import com.sun.org.apache.xerces.internal.util.XMLChar;
+ import com.sun.org.apache.xerces.internal.util.XMLSymbols;
++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
+ import com.sun.org.apache.xerces.internal.xni.QName;
+ import com.sun.org.apache.xerces.internal.xs.XSConstants;
+ import java.util.HashMap;
+@@ -1194,8 +1195,8 @@
+                     if (!optimize) {
+                     //Revisit :: IMO this is not right place to check
+                     // maxOccurNodeLimit.
+-                    int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getMaxOccurNodeLimit();
+-                    if (max > maxOccurNodeLimit) {
++                    int maxOccurNodeLimit = fSchemaHandler.fSecureProcessing.getLimit(XMLSecurityManager.Limit.MAX_OCCUR_NODE_LIMIT);
++                    if (max > maxOccurNodeLimit && !fSchemaHandler.fSecureProcessing.isNoLimit(maxOccurNodeLimit)) {
+                         reportSchemaFatalError("maxOccurLimit", new Object[] {new Integer(maxOccurNodeLimit)}, element);
+ 
+                         // reset max values in case processing continues on error
+--- ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	2013-09-06 11:22:59.000000000 -0700
++++ ./jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java	2013-12-01 11:13:41.000000000 -0800
+@@ -70,7 +70,6 @@
+ import com.sun.org.apache.xerces.internal.util.DefaultErrorHandler;
+ import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper;
+ import com.sun.org.apache.xerces.internal.util.SAXInputSource;
+-import com.sun.org.apache.xerces.internal.util.SecurityManager;
+ import com.sun.org.apache.xerces.internal.util.StAXInputSource;
+ import com.sun.org.apache.xerces.internal.util.StAXLocationWrapper;
+ import com.sun.org.apache.xerces.internal.util.SymbolHash;
+@@ -78,6 +77,7 @@
+ import com.sun.org.apache.xerces.internal.util.XMLSymbols;
+ import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException;
+ import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
+ import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
+ import com.sun.org.apache.xerces.internal.xni.QName;
+ import com.sun.org.apache.xerces.internal.xni.XNIException;
+@@ -257,7 +257,7 @@
+      *
+      * 

Protected to allow access by any traverser.

+ */ +- protected SecurityManager fSecureProcessing = null; ++ protected XMLSecurityManager fSecureProcessing = null; + + private String fAccessExternalSchema; + private String fAccessExternalDTD; +@@ -2251,12 +2251,12 @@ + } + catch (SAXException se) {} + +- try { +- parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, fAccessExternalDTD); +- } catch (SAXNotRecognizedException exc) { +- System.err.println("Warning: " + parser.getClass().getName() + ": " + +- exc.getMessage()); +- } ++ try { ++ parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, fAccessExternalDTD); ++ } catch (SAXNotRecognizedException exc) { ++ System.err.println("Warning: " + parser.getClass().getName() + ": " + ++ exc.getMessage()); ++ } + } + // If XML names and Namespace URIs are already internalized we + // can avoid running them through the SymbolTable. +@@ -3509,7 +3509,7 @@ + + fSecureProcessing = null; + if( componentManager!=null ) { +- fSecureProcessing = (SecurityManager) componentManager.getProperty(SECURE_PROCESSING, null); ++ fSecureProcessing = (XMLSecurityManager) componentManager.getProperty(SECURE_PROCESSING, null); + } + + //set entity resolver +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java 2014-06-06 19:56:13.000000000 -0700 +@@ -20,6 +20,8 @@ + + package com.sun.org.apache.xerces.internal.jaxp; + ++import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++import java.util.Locale; + import org.xml.sax.SAXException; + import org.xml.sax.SAXParseException; + import org.xml.sax.helpers.DefaultHandler; +@@ -30,6 +32,11 @@ + class DefaultValidationErrorHandler extends DefaultHandler { + static private int ERROR_COUNT_LIMIT = 10; + private int errorCount = 0; ++ private Locale locale = Locale.getDefault(); ++ ++ public DefaultValidationErrorHandler(Locale locale) { ++ this.locale = locale; ++ } + + // XXX Fix message i18n + public void error(SAXParseException e) throws SAXException { +@@ -38,11 +45,8 @@ + return; + } else if (errorCount == 0) { + // Print a warning before the first error +- System.err.println("Warning: validation was turned on but an org.xml.sax.ErrorHandler was not"); +- System.err.println("set, which is probably not what is desired. Parser will use a default"); +- System.err.println("ErrorHandler to print the first " + +- ERROR_COUNT_LIMIT + " errors. Please call"); +- System.err.println("the 'setErrorHandler' method to fix this."); ++ System.err.println(SAXMessageFormatter.formatMessage(locale, ++ "errorHandlerNotSet", new Object [] {errorCount})); + } + + String systemId = e.getSystemId(); +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -36,7 +36,7 @@ + import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator; + import com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer; + import com.sun.org.apache.xerces.internal.parsers.DOMParser; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager.Property; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager.State; +@@ -46,7 +46,6 @@ + import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; + import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource; + import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; +-import javax.xml.XMLConstants; + import org.w3c.dom.DOMImplementation; + import org.w3c.dom.Document; + import org.xml.sax.EntityResolver; +@@ -110,7 +109,6 @@ + /** Property identifier: access to external schema */ + public static final String ACCESS_EXTERNAL_SCHEMA = XMLConstants.ACCESS_EXTERNAL_SCHEMA; + +- + private final DOMParser domParser; + private final Schema grammar; + +@@ -125,6 +123,7 @@ + /** Initial EntityResolver */ + private final EntityResolver fInitEntityResolver; + ++ private XMLSecurityManager fSecurityManager; + private XMLSecurityPropertyManager fSecurityPropertyMgr; + + DocumentBuilderImpl(DocumentBuilderFactoryImpl dbf, Hashtable dbfAttrs, Hashtable features) +@@ -141,7 +140,7 @@ + // validation errors with a warning telling the user to set an + // ErrorHandler + if (dbf.isValidating()) { +- fInitErrorHandler = new DefaultValidationErrorHandler(); ++ fInitErrorHandler = new DefaultValidationErrorHandler(domParser.getXMLParserConfiguration().getLocale()); + setErrorHandler(fInitErrorHandler); + } + else { +@@ -173,10 +172,10 @@ + fSecurityPropertyMgr = new XMLSecurityPropertyManager(); + domParser.setProperty(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); + +- // If the secure processing feature is on set a security manager. +- if (secureProcessing) { +- domParser.setProperty(SECURITY_MANAGER, new SecurityManager()); ++ fSecurityManager = new XMLSecurityManager(secureProcessing); ++ domParser.setProperty(SECURITY_MANAGER, fSecurityManager); + ++ if (secureProcessing) { + /** + * If secure processing is explicitly set on the factory, the + * access properties will be set unless the corresponding +@@ -250,9 +249,9 @@ + String feature = (String) entry.getKey(); + boolean value = ((Boolean) entry.getValue()).booleanValue(); + domParser.setFeature(feature, value); +- } + } + } ++ } + + /** + * Set any DocumentBuilderFactory attributes of our underlying DOMParser +@@ -289,30 +288,33 @@ + // spec when schema validation is enabled + domParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); + } +- } +- } else if(JAXP_SCHEMA_SOURCE.equals(name)){ +- if( isValidating() ) { +- String value=(String)dbfAttrs.get(JAXP_SCHEMA_LANGUAGE); +- if(value !=null && W3C_XML_SCHEMA.equals(value)){ +- domParser.setProperty(name, val); +- }else{ ++ } ++ } else if(JAXP_SCHEMA_SOURCE.equals(name)){ ++ if( isValidating() ) { ++ String value=(String)dbfAttrs.get(JAXP_SCHEMA_LANGUAGE); ++ if(value !=null && W3C_XML_SCHEMA.equals(value)){ ++ domParser.setProperty(name, val); ++ }else{ + throw new IllegalArgumentException( + DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, + "jaxp-order-not-supported", + new Object[] {JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE})); ++ } ++ } ++ } else { ++ //check if the property is managed by security manager ++ if (fSecurityManager == null || ++ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, val)) { ++ //check if the property is managed by security property manager ++ if (fSecurityPropertyMgr == null || ++ !fSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, val)) { ++ //fall back to the existing property manager ++ domParser.setProperty(name, val); + } +- } +- } else { +- int index = fSecurityPropertyMgr.getIndex(name); +- if (index > -1) { +- fSecurityPropertyMgr.setValue(index, +- XMLSecurityPropertyManager.State.APIPROPERTY, (String)val); +- } else { +- // Let Xerces code handle the property +- domParser.setProperty(name, val); + } +- } +- } ++ ++ } ++ } + } + } + +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -20,22 +20,13 @@ + + package com.sun.org.apache.xerces.internal.jaxp; + +-import java.io.IOException; +-import java.util.HashMap; +-import java.util.Hashtable; +-import java.util.Iterator; +-import java.util.Map; +- +-import javax.xml.XMLConstants; +-import javax.xml.validation.Schema; +- + import com.sun.org.apache.xerces.internal.impl.Constants; + import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager; + import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator; + import com.sun.org.apache.xerces.internal.jaxp.validation.XSGrammarPoolContainer; + import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.Status; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler; + import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent; +@@ -46,6 +37,14 @@ + import com.sun.org.apache.xerces.internal.xs.AttributePSVI; + import com.sun.org.apache.xerces.internal.xs.ElementPSVI; + import com.sun.org.apache.xerces.internal.xs.PSVIProvider; ++import java.io.IOException; ++import java.util.HashMap; ++import java.util.Hashtable; ++import java.util.Iterator; ++import java.util.Locale; ++import java.util.Map; ++import javax.xml.XMLConstants; ++import javax.xml.validation.Schema; + import org.xml.sax.EntityResolver; + import org.xml.sax.ErrorHandler; + import org.xml.sax.HandlerBase; +@@ -112,6 +111,7 @@ + /** Initial EntityResolver */ + private final EntityResolver fInitEntityResolver; + ++ private final XMLSecurityManager fSecurityManager; + private final XMLSecurityPropertyManager fSecurityPropertyMgr; + + /** +@@ -130,10 +130,10 @@ + SAXParserImpl(SAXParserFactoryImpl spf, Hashtable features, boolean secureProcessing) + throws SAXException + { ++ fSecurityManager = new XMLSecurityManager(secureProcessing); + fSecurityPropertyMgr = new XMLSecurityPropertyManager(); +- + // Instantiate a SAXParser directly and not through SAX so that we use the right ClassLoader +- xmlReader = new JAXPSAXParser(this, fSecurityPropertyMgr); ++ xmlReader = new JAXPSAXParser(this, fSecurityPropertyMgr, fSecurityManager); + + // JAXP "namespaceAware" == SAX Namespaces feature + // Note: there is a compatibility problem here with default values: +@@ -154,9 +154,9 @@ + + xmlReader.setProperty0(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); + +- // If the secure processing feature is on set a security manager. ++ xmlReader.setProperty0(SECURITY_MANAGER, fSecurityManager); ++ + if (secureProcessing) { +- xmlReader.setProperty0(SECURITY_MANAGER, new SecurityManager()); + /** + * By default, secure processing is set, no external access is allowed. + * However, we need to check if it is actively set on the factory since we +@@ -164,6 +164,7 @@ + * the default value + */ + if (features != null) { ++ + Object temp = features.get(XMLConstants.FEATURE_SECURE_PROCESSING); + if (temp != null) { + boolean value = ((Boolean) temp).booleanValue(); +@@ -172,7 +173,6 @@ + XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); + fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA, + XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); +- + } + } + } +@@ -185,7 +185,7 @@ + // validation errors with a warning telling the user to set an + // ErrorHandler. + if (spf.isValidating()) { +- fInitErrorHandler = new DefaultValidationErrorHandler(); ++ fInitErrorHandler = new DefaultValidationErrorHandler(xmlReader.getLocale()); + xmlReader.setErrorHandler(fInitErrorHandler); + } + else { +@@ -398,22 +398,34 @@ + private final HashMap fInitFeatures = new HashMap(); + private final HashMap fInitProperties = new HashMap(); + private final SAXParserImpl fSAXParser; ++ private XMLSecurityManager fSecurityManager; + private XMLSecurityPropertyManager fSecurityPropertyMgr; + + + public JAXPSAXParser() { +- this(null, null); ++ this(null, null, null); + } + +- JAXPSAXParser(SAXParserImpl saxParser, XMLSecurityPropertyManager spm) { ++ JAXPSAXParser(SAXParserImpl saxParser, XMLSecurityPropertyManager securityPropertyMgr, ++ XMLSecurityManager securityManager) { + super(); + fSAXParser = saxParser; +- fSecurityPropertyMgr = spm; +- ++ fSecurityManager = securityManager; ++ fSecurityPropertyMgr = securityPropertyMgr; + /** + * This class may be used directly. So initialize the security manager if + * it is null. + */ ++ if (fSecurityManager == null) { ++ fSecurityManager = new XMLSecurityManager(true); ++ try { ++ super.setProperty(SECURITY_MANAGER, fSecurityManager); ++ } catch (SAXException e) { ++ throw new UnsupportedOperationException( ++ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(), ++ "property-not-recognized", new Object [] {SECURITY_MANAGER}), e); ++ } ++ } + if (fSecurityPropertyMgr == null) { + fSecurityPropertyMgr = new XMLSecurityPropertyManager(); + try { +@@ -421,7 +433,7 @@ + } catch (SAXException e) { + throw new UnsupportedOperationException( + SAXMessageFormatter.formatMessage(fConfiguration.getLocale(), +- "property-not-recognized", new Object [] {SECURITY_MANAGER}), e); ++ "property-not-recognized", new Object [] {XML_SECURITY_PROPERTY_MANAGER}), e); + } + } + } +@@ -439,7 +451,8 @@ + } + if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { + try { +- setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); ++ fSecurityManager.setSecureProcessing(value); ++ setProperty(SECURITY_MANAGER, fSecurityManager); + } + catch (SAXNotRecognizedException exc) { + // If the property is not supported +@@ -475,13 +488,7 @@ + throw new NullPointerException(); + } + if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { +- try { +- return (super.getProperty(SECURITY_MANAGER) != null); +- } +- // If the property is not supported the value must be false. +- catch (SAXException exc) { +- return false; +- } ++ return fSecurityManager.isSecureProcessing(); + } + return super.getFeature(name); + } +@@ -560,17 +567,21 @@ + if (fSAXParser != null && fSAXParser.fSchemaValidator != null) { + setSchemaValidatorProperty(name, value); + } +- /** Check to see if the property is managed by the property manager **/ +- int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(name) : -1; +- if (index > -1) { +- fSecurityPropertyMgr.setValue(index, +- XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); +- } else { +- if (!fInitProperties.containsKey(name)) { +- fInitProperties.put(name, super.getProperty(name)); ++ ++ //check if the property is managed by security manager ++ if (fSecurityManager == null || ++ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { ++ //check if the property is managed by security property manager ++ if (fSecurityPropertyMgr == null || ++ !fSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { ++ //fall back to the existing property manager ++ if (!fInitProperties.containsKey(name)) { ++ fInitProperties.put(name, super.getProperty(name)); ++ } ++ super.setProperty(name, value); + } +- super.setProperty(name, value); + } ++ + } + + public synchronized Object getProperty(String name) +@@ -583,9 +594,18 @@ + // JAXP 1.2 support + return fSAXParser.schemaLanguage; + } +- int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(name) : -1; +- if (index > -1) { +- return fSecurityPropertyMgr.getValueByIndex(index); ++ ++ /** Check to see if the property is managed by the security manager **/ ++ String propertyValue = (fSecurityManager != null) ? ++ fSecurityManager.getLimitAsString(name) : null; ++ if (propertyValue != null) { ++ return propertyValue; ++ } else { ++ propertyValue = (fSecurityPropertyMgr != null) ? ++ fSecurityPropertyMgr.getValue(name) : null; ++ if (propertyValue != null) { ++ return propertyValue; ++ } + } + + return super.getProperty(name); +@@ -664,6 +684,10 @@ + return super.getProperty(name); + } + ++ Locale getLocale() { ++ return fConfiguration.getLocale(); ++ } ++ + private void setSchemaValidatorFeature(String name, boolean value) + throws SAXNotRecognizedException, SAXNotSupportedException { + try { +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java 2013-12-01 11:13:41.000000000 -0800 +@@ -26,6 +26,7 @@ + package com.sun.org.apache.xerces.internal.jaxp.validation; + + import com.sun.org.apache.xerces.internal.impl.Constants; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import java.io.IOException; + + import javax.xml.transform.Result; +@@ -73,6 +74,19 @@ + SAXTransformerFactory tf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ? + (SAXTransformerFactory)SAXTransformerFactory.newInstance() + : (SAXTransformerFactory) TransformerFactory.newInstance(DEFAULT_TRANSFORMER_IMPL, StAXValidatorHelper.class.getClassLoader()); ++ XMLSecurityManager securityManager = (XMLSecurityManager)fComponentManager.getProperty(Constants.SECURITY_MANAGER); ++ if (securityManager != null) { ++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { ++ if (securityManager.isSet(limit.ordinal())){ ++ tf.setAttribute(limit.apiProperty(), ++ securityManager.getLimitValueAsString(limit)); ++ } ++ } ++ if (securityManager.printEntityCountInfo()) { ++ tf.setAttribute(Constants.JDK_ENTITY_COUNT_INFO, "yes"); ++ } ++ } ++ + identityTransformer1 = tf.newTransformer(); + identityTransformer2 = tf.newTransformerHandler(); + } catch (TransformerConfigurationException e) { +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java 2013-12-01 11:13:41.000000000 -0800 +@@ -20,28 +20,27 @@ + + package com.sun.org.apache.xerces.internal.jaxp.validation; + +-import java.lang.ref.SoftReference; +-import java.io.IOException; +- +-import javax.xml.transform.Result; +-import javax.xml.transform.Source; +-import javax.xml.transform.sax.SAXTransformerFactory; +-import javax.xml.transform.sax.TransformerHandler; +-import javax.xml.transform.stream.StreamSource; +-import javax.xml.transform.stream.StreamResult; +-import javax.xml.transform.TransformerConfigurationException; +-import javax.xml.transform.TransformerFactory; +-import javax.xml.transform.TransformerFactoryConfigurationError; +-import javax.xml.XMLConstants; +- + import com.sun.org.apache.xerces.internal.impl.Constants; + import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; + import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; + import com.sun.org.apache.xerces.internal.parsers.XML11Configuration; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.xni.XNIException; + import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; + import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException; + import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; ++import java.io.IOException; ++import java.lang.ref.SoftReference; ++import javax.xml.XMLConstants; ++import javax.xml.transform.Result; ++import javax.xml.transform.Source; ++import javax.xml.transform.TransformerConfigurationException; ++import javax.xml.transform.TransformerFactory; ++import javax.xml.transform.TransformerFactoryConfigurationError; ++import javax.xml.transform.sax.SAXTransformerFactory; ++import javax.xml.transform.sax.TransformerHandler; ++import javax.xml.transform.stream.StreamResult; ++import javax.xml.transform.stream.StreamSource; + import org.xml.sax.SAXException; + + /** +@@ -86,6 +85,11 @@ + Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY; + + private static final String DEFAULT_TRANSFORMER_IMPL = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"; ++ ++ /** Property id: security manager. */ ++ private static final String SECURITY_MANAGER = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++ + // + // Data + // +@@ -165,6 +169,9 @@ + + private XMLParserConfiguration initialize() { + XML11Configuration config = new XML11Configuration(); ++ if (fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ config.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++ } + config.setProperty(ENTITY_RESOLVER, fComponentManager.getProperty(ENTITY_RESOLVER)); + config.setProperty(ERROR_HANDLER, fComponentManager.getProperty(ERROR_HANDLER)); + XMLErrorReporter errorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER); +@@ -182,6 +189,8 @@ + config.setDTDContentModelHandler(null); + config.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, + fComponentManager.getProperty(Constants.XML_SECURITY_PROPERTY_MANAGER)); ++ config.setProperty(Constants.SECURITY_MANAGER, ++ fComponentManager.getProperty(Constants.SECURITY_MANAGER)); + fConfiguration = new SoftReference(config); + return config; + } +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java 2014-01-18 12:16:08.000000000 -0800 +@@ -49,10 +49,10 @@ + import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; + import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.SymbolTable; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.URI; + import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; + import com.sun.org.apache.xerces.internal.util.XMLSymbols; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.Augmentations; + import com.sun.org.apache.xerces.internal.xni.NamespaceContext; +@@ -679,10 +679,12 @@ + SAXParserFactory.newInstance() : new SAXParserFactoryImpl(); + spf.setNamespaceAware(true); + try { ++ spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, ++ fComponentManager.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING)); + reader = spf.newSAXParser().getXMLReader(); + // If this is a Xerces SAX parser, set the security manager if there is one + if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) { +- SecurityManager securityManager = (SecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); ++ XMLSecurityManager securityManager = (XMLSecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); + if (securityManager != null) { + try { + reader.setProperty(SECURITY_MANAGER, securityManager); +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2013-12-01 11:13:41.000000000 -0800 +@@ -41,10 +41,10 @@ + import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; + import com.sun.org.apache.xerces.internal.util.SAXInputSource; + import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.StAXInputSource; + import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XNIException; + import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; +@@ -79,7 +79,7 @@ + private static final String XMLGRAMMAR_POOL = + Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY; + +- /** Property identifier: SecurityManager. */ ++ /** Property identifier: XMLSecurityManager. */ + private static final String SECURITY_MANAGER = + Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; + +@@ -87,7 +87,6 @@ + private static final String XML_SECURITY_PROPERTY_MANAGER = + Constants.XML_SECURITY_PROPERTY_MANAGER; + +- + // + // Data + // +@@ -108,7 +107,7 @@ + private ErrorHandlerWrapper fErrorHandlerWrapper; + + /** The SecurityManager. */ +- private SecurityManager fSecurityManager; ++ private XMLSecurityManager fSecurityManager; + + /** The Security property manager. */ + private XMLSecurityPropertyManager fSecurityPropertyMgr; +@@ -122,8 +121,6 @@ + * Note the default value (false) is the safe option.. + */ + private final boolean fUseServicesMechanism; +- +- + public XMLSchemaFactory() { + this(true); + } +@@ -141,7 +138,7 @@ + fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper); + + // Enable secure processing feature by default +- fSecurityManager = new SecurityManager(); ++ fSecurityManager = new XMLSecurityManager(true); + fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); + + fSecurityPropertyMgr = new XMLSecurityPropertyManager(); +@@ -301,7 +298,7 @@ + "FeatureNameNull", null)); + } + if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { +- return (fSecurityManager != null); ++ return (fSecurityManager !=null && fSecurityManager.isSecureProcessing()); + } + try { + return fXMLSchemaLoader.getFeature(name); +@@ -365,17 +362,15 @@ + SAXMessageFormatter.formatMessage(null, + "jaxp-secureprocessing-feature", null)); + } +- if (value) { +- fSecurityManager = new SecurityManager(); + ++ fSecurityManager.setSecureProcessing(value); ++ if (value) { + if (Constants.IS_JDK8_OR_ABOVE) { + fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD, + XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); + fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA, + XMLSecurityPropertyManager.State.FSP, Constants.EXTERNAL_ACCESS_DEFAULT_FSP); + } +- } else { +- fSecurityManager = null; + } + + fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); +@@ -410,9 +405,17 @@ + "ProperyNameNull", null)); + } + if (name.equals(SECURITY_MANAGER)) { +- fSecurityManager = (SecurityManager) object; ++ fSecurityManager = XMLSecurityManager.convert(object, fSecurityManager); + fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager); + return; ++ } else if (name.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { ++ if (object == null) { ++ fSecurityPropertyMgr = new XMLSecurityPropertyManager(); ++ } else { ++ fSecurityPropertyMgr = (XMLSecurityPropertyManager)object; ++ } ++ fXMLSchemaLoader.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); ++ return; + } + else if (name.equals(XMLGRAMMAR_POOL)) { + throw new SAXNotSupportedException( +@@ -420,12 +423,15 @@ + "property-not-supported", new Object [] {name})); + } + try { +- int index = fSecurityPropertyMgr.getIndex(name); +- if (index > -1) { +- fSecurityPropertyMgr.setValue(index, +- XMLSecurityPropertyManager.State.APIPROPERTY, (String)object); +- } else { +- fXMLSchemaLoader.setProperty(name, object); ++ //check if the property is managed by security manager ++ if (fSecurityManager == null || ++ !fSecurityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, object)) { ++ //check if the property is managed by security property manager ++ if (fSecurityPropertyMgr == null || ++ !fSecurityPropertyMgr.setValue(name, XMLSecurityPropertyManager.State.APIPROPERTY, object)) { ++ //fall back to the existing property manager ++ fXMLSchemaLoader.setProperty(name, object); ++ } + } + } + catch (XMLConfigurationException e) { +--- ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2014-01-18 12:16:08.000000000 -0800 +@@ -39,9 +39,9 @@ + import com.sun.org.apache.xerces.internal.util.NamespaceSupport; + import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; + import com.sun.org.apache.xerces.internal.util.PropertyState; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.SymbolTable; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.NamespaceContext; + import com.sun.org.apache.xerces.internal.xni.XNIException; +@@ -181,7 +181,7 @@ + private final HashMap fInitProperties = new HashMap(); + + /** Stores the initial security manager. */ +- private final SecurityManager fInitSecurityManager; ++ private XMLSecurityManager fInitSecurityManager; + + /** Stores the initial security property manager. */ + private final XMLSecurityPropertyManager fSecurityPropertyMgr; +@@ -221,12 +221,6 @@ + fComponents.put(ENTITY_RESOLVER, null); + fComponents.put(ERROR_HANDLER, null); + +- if (System.getSecurityManager() != null) { +- _isSecureMode = true; +- setProperty(SECURITY_MANAGER, new SecurityManager()); +- } else { +- fComponents.put(SECURITY_MANAGER, null); +- } + fComponents.put(SYMBOL_TABLE, new SymbolTable()); + + // setup grammar pool +@@ -241,15 +235,21 @@ + addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer); + addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer); + +- // if the secure processing feature is set to true, add a security manager to the configuration +- Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); +- if (Boolean.TRUE.equals(secureProcessing)) { +- fInitSecurityManager = new SecurityManager(); ++ boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); ++ if (System.getSecurityManager() != null) { ++ _isSecureMode = true; ++ secureProcessing = true; + } +- else { +- fInitSecurityManager = null; ++ ++ fInitSecurityManager = (XMLSecurityManager) ++ grammarContainer.getProperty(SECURITY_MANAGER); ++ if (fInitSecurityManager != null ) { ++ fInitSecurityManager.setSecureProcessing(secureProcessing); ++ } else { ++ fInitSecurityManager = new XMLSecurityManager(secureProcessing); + } +- fComponents.put(SECURITY_MANAGER, fInitSecurityManager); ++ ++ setProperty(SECURITY_MANAGER, fInitSecurityManager); + + //pass on properties set on SchemaFactory + fSecurityPropertyMgr = (XMLSecurityPropertyManager) +@@ -281,7 +281,7 @@ + return FeatureState.is(fUseGrammarPoolOnly); + } + else if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) { +- return FeatureState.is(getProperty(SECURITY_MANAGER) != null); ++ return FeatureState.is(fInitSecurityManager.isSecureProcessing()); + } + else if (SCHEMA_ELEMENT_DEFAULT.equals(featureId)) { + return FeatureState.is(true); //pre-condition: VALIDATION and SCHEMA_VALIDATION are always true +@@ -311,7 +311,8 @@ + if (_isSecureMode && !value) { + throw new XMLConfigurationException(Status.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); + } +- setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); ++ fInitSecurityManager.setSecureProcessing(value); ++ setProperty(SECURITY_MANAGER, fInitSecurityManager); + + if (value && Constants.IS_JDK8_OR_ABOVE) { + fSecurityPropertyMgr.setValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD, +@@ -390,10 +391,20 @@ + fComponents.put(propertyId, value); + return; + } +- if (!fInitProperties.containsKey(propertyId)) { +- fInitProperties.put(propertyId, super.getProperty(propertyId)); ++ ++ //check if the property is managed by security manager ++ if (fInitSecurityManager == null || ++ !fInitSecurityManager.setLimit(propertyId, XMLSecurityManager.State.APIPROPERTY, value)) { ++ //check if the property is managed by security property manager ++ if (fSecurityPropertyMgr == null || ++ !fSecurityPropertyMgr.setValue(propertyId, XMLSecurityPropertyManager.State.APIPROPERTY, value)) { ++ //fall back to the existing property manager ++ if (!fInitProperties.containsKey(propertyId)) { ++ fInitProperties.put(propertyId, super.getProperty(propertyId)); ++ } ++ super.setProperty(propertyId, value); ++ } + } +- super.setProperty(propertyId, value); + } + + /** +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java 2013-12-01 11:13:41.000000000 -0800 +@@ -20,18 +20,15 @@ + + package com.sun.org.apache.xerces.internal.parsers; + +-import java.io.IOException; +-import java.util.Locale; +- + import com.sun.org.apache.xerces.internal.impl.Constants; +-import com.sun.org.apache.xerces.internal.util.Status; +-import com.sun.org.apache.xerces.internal.xs.PSVIProvider; +-import com.sun.org.apache.xerces.internal.util.EntityResolverWrapper; + import com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper; ++import com.sun.org.apache.xerces.internal.util.EntityResolverWrapper; + import com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper; + import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; ++import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.SymbolHash; + import com.sun.org.apache.xerces.internal.util.XMLSymbols; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.xni.Augmentations; + import com.sun.org.apache.xerces.internal.xni.NamespaceContext; + import com.sun.org.apache.xerces.internal.xni.QName; +@@ -48,15 +45,17 @@ + import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; + import com.sun.org.apache.xerces.internal.xs.AttributePSVI; + import com.sun.org.apache.xerces.internal.xs.ElementPSVI; ++import com.sun.org.apache.xerces.internal.xs.PSVIProvider; ++import java.io.IOException; ++import java.util.Locale; ++import javax.xml.XMLConstants; + import org.xml.sax.AttributeList; +-import org.xml.sax.Attributes; + import org.xml.sax.ContentHandler; + import org.xml.sax.DTDHandler; + import org.xml.sax.DocumentHandler; + import org.xml.sax.EntityResolver; + import org.xml.sax.ErrorHandler; + import org.xml.sax.InputSource; +-import org.xml.sax.Locator; + import org.xml.sax.Parser; + import org.xml.sax.SAXException; + import org.xml.sax.SAXNotRecognizedException; +@@ -131,6 +130,10 @@ + protected static final String DOM_NODE = + Constants.SAX_PROPERTY_PREFIX + Constants.DOM_NODE_PROPERTY; + ++ /** Property id: security manager. */ ++ private static final String SECURITY_MANAGER = ++ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY; ++ + /** Recognized properties. */ + private static final String[] RECOGNIZED_PROPERTIES = { + LEXICAL_HANDLER, +@@ -1645,19 +1648,13 @@ + // Drop through and perform default processing + // + } +- +- // +- // Xerces Features +- // +- +- /* +- else if (featureId.startsWith(XERCES_FEATURES_PREFIX)) { +- String feature = featureId.substring(XERCES_FEATURES_PREFIX.length()); +- // +- // Drop through and perform default processing +- // ++ else if (featureId.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ if (state) { ++ if (fConfiguration.getProperty(SECURITY_MANAGER )==null) { ++ fConfiguration.setProperty(SECURITY_MANAGER, new XMLSecurityManager()); ++ } ++ } + } +- */ + + // + // Default handling +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java 2013-12-01 11:13:41.000000000 -0800 +@@ -29,6 +29,7 @@ + import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; + import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.SymbolTable; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XNIException; + import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; +@@ -531,7 +532,54 @@ + */ + public void setProperty(String propertyId, Object value) + throws SAXNotRecognizedException, SAXNotSupportedException { ++ /** ++ * It's possible for users to set a security manager through the interface. ++ * If it's the old SecurityManager, convert it to the new XMLSecurityManager ++ */ ++ if (propertyId.equals(Constants.SECURITY_MANAGER)) { ++ securityManager = XMLSecurityManager.convert(value, securityManager); ++ setProperty0(Constants.SECURITY_MANAGER, securityManager); ++ return; ++ } ++ if (propertyId.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { ++ if (value == null) { ++ securityPropertyManager = new XMLSecurityPropertyManager(); ++ } else { ++ securityPropertyManager = (XMLSecurityPropertyManager)value; ++ } ++ setProperty0(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); ++ return; ++ } ++ ++ if (securityManager == null) { ++ securityManager = new XMLSecurityManager(true); ++ setProperty0(Constants.SECURITY_MANAGER, securityManager); ++ } ++ ++ if (securityPropertyManager == null) { ++ securityPropertyManager = new XMLSecurityPropertyManager(); ++ setProperty0(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); ++ } ++ int index = securityPropertyManager.getIndex(propertyId); ++ ++ if (index > -1) { ++ /** ++ * this is a direct call to this parser, not a subclass since ++ * internally the support of this property is done through ++ * XMLSecurityPropertyManager ++ */ ++ securityPropertyManager.setValue(index, XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); ++ } else { ++ //check if the property is managed by security manager ++ if (!securityManager.setLimit(propertyId, XMLSecurityManager.State.APIPROPERTY, value)) { ++ //fall back to the default configuration to handle the property ++ setProperty0(propertyId, value); ++ } ++ } ++ } + ++ public void setProperty0(String propertyId, Object value) ++ throws SAXNotRecognizedException, SAXNotSupportedException { + try { + fConfiguration.setProperty(propertyId, value); + } +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java 2013-12-01 11:13:41.000000000 -0800 +@@ -38,7 +38,6 @@ + import com.sun.org.apache.xerces.internal.util.PropertyState; + import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.SymbolTable; +-import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XMLLocator; + import com.sun.org.apache.xerces.internal.xni.XNIException; + import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; +@@ -189,6 +188,9 @@ + protected static final String XML_SECURITY_PROPERTY_MANAGER = + Constants.XML_SECURITY_PROPERTY_MANAGER; + ++ /** Property identifier: Security manager. */ ++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; ++ + // debugging + + /** Set to true and recompile to print exception stack trace. */ +@@ -334,6 +336,7 @@ + JAXP_SCHEMA_SOURCE, + JAXP_SCHEMA_LANGUAGE, + LOCALE, ++ SECURITY_MANAGER, + XML_SECURITY_PROPERTY_MANAGER + }; + addRecognizedProperties(recognizedProperties); +@@ -411,8 +414,6 @@ + // do nothing + // REVISIT: What is the right thing to do? -Ac + } +- +- setProperty(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); + } // (SymbolTable,XMLGrammarPool) + + // +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java 2013-12-01 11:13:41.000000000 -0800 +@@ -36,7 +36,6 @@ + import com.sun.org.apache.xerces.internal.util.PropertyState; + import com.sun.org.apache.xerces.internal.util.Status; + import com.sun.org.apache.xerces.internal.util.SymbolTable; +-import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XMLLocator; + import com.sun.org.apache.xerces.internal.xni.XNIException; + import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; +@@ -162,6 +161,9 @@ + protected static final String XML_SECURITY_PROPERTY_MANAGER = + Constants.XML_SECURITY_PROPERTY_MANAGER; + ++ /** Property identifier: Security manager. */ ++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; ++ + // debugging + + /** Set to true and recompile to print exception stack trace. */ +@@ -316,6 +318,7 @@ + DATATYPE_VALIDATOR_FACTORY, + VALIDATION_MANAGER, + LOCALE, ++ SECURITY_MANAGER, + XML_SECURITY_PROPERTY_MANAGER + }; + addRecognizedProperties(recognizedProperties); +@@ -372,8 +375,6 @@ + // do nothing + // REVISIT: What is the right thing to do? -Ac + } +- +- setProperty(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); + } // (SymbolTable,XMLGrammarPool) + + // +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java 2013-12-01 11:13:41.000000000 -0800 +@@ -22,6 +22,7 @@ + + import com.sun.org.apache.xerces.internal.impl.Constants; + import com.sun.org.apache.xerces.internal.util.SymbolTable; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; + import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; +@@ -76,7 +77,7 @@ + XMLGRAMMAR_POOL, + }; + +- XMLSecurityPropertyManager securityPropertyManager; ++ + // + // Constructors + // +@@ -130,11 +131,36 @@ + */ + public void setProperty(String name, Object value) + throws SAXNotRecognizedException, SAXNotSupportedException { ++ /** ++ * It's possible for users to set a security manager through the interface. ++ * If it's the old SecurityManager, convert it to the new XMLSecurityManager ++ */ ++ if (name.equals(Constants.SECURITY_MANAGER)) { ++ securityManager = XMLSecurityManager.convert(value, securityManager); ++ super.setProperty(Constants.SECURITY_MANAGER, securityManager); ++ return; ++ } ++ if (name.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { ++ if (value == null) { ++ securityPropertyManager = new XMLSecurityPropertyManager(); ++ } else { ++ securityPropertyManager = (XMLSecurityPropertyManager)value; ++ } ++ super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); ++ return; ++ } ++ ++ if (securityManager == null) { ++ securityManager = new XMLSecurityManager(true); ++ super.setProperty(Constants.SECURITY_MANAGER, securityManager); ++ } ++ + if (securityPropertyManager == null) { + securityPropertyManager = new XMLSecurityPropertyManager(); ++ super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); + } +- int index = securityPropertyManager.getIndex(name); + ++ int index = securityPropertyManager.getIndex(name); + if (index > -1) { + /** + * this is a direct call to this parser, not a subclass since +@@ -142,9 +168,12 @@ + * XMLSecurityPropertyManager + */ + securityPropertyManager.setValue(index, XMLSecurityPropertyManager.State.APIPROPERTY, (String)value); +- super.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); + } else { +- super.setProperty(name, value); ++ //check if the property is managed by security manager ++ if (!securityManager.setLimit(name, XMLSecurityManager.State.APIPROPERTY, value)) { ++ //fall back to the default configuration to handle the property ++ super.setProperty(name, value); ++ } + } + } + } // class SAXParser +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/SecurityConfiguration.java 2013-12-01 11:13:41.000000000 -0800 +@@ -23,8 +23,8 @@ + import com.sun.org.apache.xerces.internal.impl.Constants; + import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; + import com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.SymbolTable; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + + /** + * This configuration allows Xerces to behave in a security-conscious manner; that is, +@@ -44,6 +44,7 @@ + * + * @author Neil Graham, IBM + * ++ * @version $Id: SecurityConfiguration.java,v 1.6 2010-11-01 04:40:09 joehw Exp $ + */ + public class SecurityConfiguration extends XIncludeAwareParserConfiguration + { +@@ -107,7 +108,7 @@ + super(symbolTable, grammarPool, parentSettings); + + // create the SecurityManager property: +- setProperty(SECURITY_MANAGER_PROPERTY, new SecurityManager()); ++ setProperty(SECURITY_MANAGER_PROPERTY, new XMLSecurityManager(true)); + } // (SymbolTable,XMLGrammarPool) + + } // class SecurityConfiguration +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java 2013-12-01 11:13:41.000000000 -0800 +@@ -52,6 +52,7 @@ + import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; + import com.sun.org.apache.xerces.internal.util.PropertyState; + import com.sun.org.apache.xerces.internal.util.SymbolTable; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler; + import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler; +@@ -279,6 +280,8 @@ + private static final String XML_SECURITY_PROPERTY_MANAGER = + Constants.XML_SECURITY_PROPERTY_MANAGER; + ++ /** Property identifier: Security manager. */ ++ private static final String SECURITY_MANAGER = Constants.SECURITY_MANAGER; + + // debugging + +@@ -289,33 +292,33 @@ + // Data + // + +- protected SymbolTable fSymbolTable; ++ protected SymbolTable fSymbolTable; + protected XMLInputSource fInputSource; + protected ValidationManager fValidationManager; +- protected XMLVersionDetector fVersionDetector; ++ protected XMLVersionDetector fVersionDetector; + protected XMLLocator fLocator; +- protected Locale fLocale; ++ protected Locale fLocale; + +- /** XML 1.0 Components. */ +- protected ArrayList fComponents; ++ /** XML 1.0 Components. */ ++ protected ArrayList fComponents; + +- /** XML 1.1. Components. */ +- protected ArrayList fXML11Components = null; ++ /** XML 1.1. Components. */ ++ protected ArrayList fXML11Components = null; + +- /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */ +- protected ArrayList fCommonComponents = null; ++ /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */ ++ protected ArrayList fCommonComponents = null; + +- /** The document handler. */ +- protected XMLDocumentHandler fDocumentHandler; ++ /** The document handler. */ ++ protected XMLDocumentHandler fDocumentHandler; + +- /** The DTD handler. */ +- protected XMLDTDHandler fDTDHandler; ++ /** The DTD handler. */ ++ protected XMLDTDHandler fDTDHandler; + +- /** The DTD content model handler. */ +- protected XMLDTDContentModelHandler fDTDContentModelHandler; ++ /** The DTD content model handler. */ ++ protected XMLDTDContentModelHandler fDTDContentModelHandler; + +- /** Last component in the document pipeline */ +- protected XMLDocumentSource fLastComponent; ++ /** Last component in the document pipeline */ ++ protected XMLDocumentSource fLastComponent; + + /** + * True if a parse is in progress. This state is needed because +@@ -495,31 +498,31 @@ + fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE); + fFeatures.put(NORMALIZE_DATA, Boolean.TRUE); + fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE); +- fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE); +- fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE); +- fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE); +- fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE); +- fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE); +- fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE); ++ fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE); ++ fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE); ++ fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE); ++ fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE); ++ fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE); ++ fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE); + fFeatures.put(PARSER_SETTINGS, Boolean.TRUE); + fFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); + + // add default recognized properties + final String[] recognizedProperties = + { +- SYMBOL_TABLE, +- ERROR_HANDLER, +- ENTITY_RESOLVER, ++ SYMBOL_TABLE, ++ ERROR_HANDLER, ++ ENTITY_RESOLVER, + ERROR_REPORTER, + ENTITY_MANAGER, + DOCUMENT_SCANNER, + DTD_SCANNER, + DTD_PROCESSOR, + DTD_VALIDATOR, +- DATATYPE_VALIDATOR_FACTORY, +- VALIDATION_MANAGER, +- SCHEMA_VALIDATOR, +- XML_STRING, ++ DATATYPE_VALIDATOR_FACTORY, ++ VALIDATION_MANAGER, ++ SCHEMA_VALIDATOR, ++ XML_STRING, + XMLGRAMMAR_POOL, + JAXP_SCHEMA_SOURCE, + JAXP_SCHEMA_LANGUAGE, +@@ -531,19 +534,20 @@ + SCHEMA_NONS_LOCATION, + LOCALE, + SCHEMA_DV_FACTORY, ++ SECURITY_MANAGER, + XML_SECURITY_PROPERTY_MANAGER + }; + addRecognizedProperties(recognizedProperties); + +- if (symbolTable == null) { +- symbolTable = new SymbolTable(); +- } +- fSymbolTable = symbolTable; +- fProperties.put(SYMBOL_TABLE, fSymbolTable); ++ if (symbolTable == null) { ++ symbolTable = new SymbolTable(); ++ } ++ fSymbolTable = symbolTable; ++ fProperties.put(SYMBOL_TABLE, fSymbolTable); + + fGrammarPool = grammarPool; + if (fGrammarPool != null) { +- fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); ++ fProperties.put(XMLGRAMMAR_POOL, fGrammarPool); + } + + fEntityManager = new XMLEntityManager(); +@@ -579,8 +583,6 @@ + + fVersionDetector = new XMLVersionDetector(); + +- fProperties.put(XML_SECURITY_PROPERTY_MANAGER, new XMLSecurityPropertyManager()); +- + // add message formatters + if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) { + XMLMessageFormatter xmft = new XMLMessageFormatter(); +--- ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java 2014-01-18 12:16:08.000000000 -0800 +@@ -23,6 +23,8 @@ + import java.io.IOException; + + import com.sun.org.apache.xerces.internal.impl.Constants; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; + import com.sun.org.apache.xerces.internal.xni.XNIException; + import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; + import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration; +@@ -78,6 +80,13 @@ + /** The parser configuration. */ + protected XMLParserConfiguration fConfiguration; + ++ /** The XML Security Manager. */ ++ XMLSecurityManager securityManager; ++ ++ /** The XML Security Property Manager. */ ++ XMLSecurityPropertyManager securityPropertyManager; ++ ++ + // + // Constructors + // +@@ -118,6 +127,15 @@ + */ + public void parse(XMLInputSource inputSource) + throws XNIException, IOException { ++ // null indicates that the parser is called directly, initialize them ++ if (securityManager == null) { ++ securityManager = new XMLSecurityManager(true); ++ fConfiguration.setProperty(Constants.SECURITY_MANAGER, securityManager); ++ } ++ if (securityPropertyManager == null) { ++ securityPropertyManager = new XMLSecurityPropertyManager(); ++ fConfiguration.setProperty(Constants.XML_SECURITY_PROPERTY_MANAGER, securityPropertyManager); ++ } + + reset(); + fConfiguration.parse(inputSource); +--- ./jaxp/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java 2014-06-06 19:56:13.000000000 -0700 +@@ -61,8 +61,6 @@ + + package com.sun.org.apache.xerces.internal.util; + import com.sun.org.apache.xerces.internal.impl.Constants; +-import java.security.AccessController; +-import java.security.PrivilegedAction; + /** + * This class is a container for parser settings that relate to + * security, or more specifically, it is intended to be used to prevent denial-of-service +@@ -79,7 +77,6 @@ + * + * @author Neil Graham, IBM + * +- * @version $Id: SecurityManager.java,v 1.5 2010-11-01 04:40:14 joehw Exp $ + */ + public final class SecurityManager { + +@@ -179,48 +176,40 @@ + + private void readSystemProperties(){ + +- //TODO: also read SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT +- try { +- String value = getSystemProperty(Constants.ENTITY_EXPANSION_LIMIT); +- if(value != null && !value.equals("")){ +- entityExpansionLimit = Integer.parseInt(value); +- if (entityExpansionLimit < 0) +- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; +- } +- else +- entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; +- }catch(Exception ex){} +- +- try { +- String value = getSystemProperty(Constants.MAX_OCCUR_LIMIT); +- if(value != null && !value.equals("")){ +- maxOccurLimit = Integer.parseInt(value); +- if (maxOccurLimit < 0) +- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; +- } +- else +- maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; +- }catch(Exception ex){} +- +- try { +- String value = getSystemProperty(Constants.SYSTEM_PROPERTY_ELEMENT_ATTRIBUTE_LIMIT); +- if(value != null && !value.equals("")){ +- fElementAttributeLimit = Integer.parseInt(value); +- if ( fElementAttributeLimit < 0) +- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; +- } +- else +- fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; ++ try { ++ String value = System.getProperty(Constants.ENTITY_EXPANSION_LIMIT); ++ if(value != null && !value.equals("")){ ++ entityExpansionLimit = Integer.parseInt(value); ++ if (entityExpansionLimit < 0) ++ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; ++ } ++ else ++ entityExpansionLimit = DEFAULT_ENTITY_EXPANSION_LIMIT; ++ }catch(Exception ex){} ++ ++ try { ++ String value = System.getProperty(Constants.MAX_OCCUR_LIMIT); ++ if(value != null && !value.equals("")){ ++ maxOccurLimit = Integer.parseInt(value); ++ if (maxOccurLimit < 0) ++ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; ++ } ++ else ++ maxOccurLimit = DEFAULT_MAX_OCCUR_NODE_LIMIT; ++ }catch(Exception ex){} ++ ++ try { ++ String value = System.getProperty(Constants.ELEMENT_ATTRIBUTE_LIMIT); ++ if(value != null && !value.equals("")){ ++ fElementAttributeLimit = Integer.parseInt(value); ++ if ( fElementAttributeLimit < 0) ++ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; ++ } ++ else ++ fElementAttributeLimit = DEFAULT_ELEMENT_ATTRIBUTE_LIMIT; + + }catch(Exception ex){} + + } + +- private String getSystemProperty(final String propName) { +- return AccessController.doPrivileged(new PrivilegedAction() { +- public String run() { +- return System.getProperty(propName); +- } +- }); +- } + } // class SecurityManager +--- ./jaxp/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java 2013-12-01 11:13:41.000000000 -0800 +@@ -173,7 +173,7 @@ + for (int i = 0; i < length; i++) { + code = code * 37 + symbol.charAt(i); + } +- return code & 0x7FFFFFF; ++ return code & 0x7FFFFFFF; + + } // hash(String):int + +@@ -194,7 +194,7 @@ + for (int i = 0; i < length; i++) { + code = code * 37 + buffer[offset + i]; + } +- return code & 0x7FFFFFF; ++ return code & 0x7FFFFFFF; + + } // hash(char[],int,int):int + +--- ./jaxp/src/com/sun/org/apache/xerces/internal/util/URI.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/util/URI.java 2014-06-06 19:56:13.000000000 -0700 +@@ -689,9 +689,13 @@ + if (!initializeAuthority(uriSpec.substring(startPos, index))) { + index = startPos - 2; + } +- } +- else { ++ } else if (index < uriSpecLen) { ++ //Same as java.net.URI: ++ // DEVIATION: Allow empty authority prior to non-empty ++ // path, query component or fragment identifier + m_host = ""; ++ } else { ++ throw new MalformedURIException("Expected authority."); + } + } + +--- ./jaxp/src/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java 2014-04-19 01:27:01.000000000 -0700 +@@ -48,7 +48,8 @@ + // + // Constants + // +- private static final String DEFAULT_INTERNAL_CLASSES = "com.sun.org.apache."; ++ private static final String JAXP_INTERNAL = "com.sun.org.apache"; ++ private static final String STAX_INTERNAL = "com.sun.xml.internal"; + + // name of default properties file to look for in JDK's jre/lib directory + private static final String DEFAULT_PROPERTIES_FILENAME = "xerces.properties"; +@@ -288,12 +289,8 @@ + public static Class findProviderClass(String className, boolean doFallback) + throws ClassNotFoundException, ConfigurationError + { +- if (System.getSecurityManager()!=null) { +- return Class.forName(className); +- } else { +- return findProviderClass (className, ++ return findProviderClass (className, + findClassLoader (), doFallback); +- } + } + /** + * Find a Class using the specified ClassLoader +@@ -306,7 +303,8 @@ + //restrict the access to package as speicified in java.security policy + SecurityManager security = System.getSecurityManager(); + if (security != null) { +- if (className.startsWith(DEFAULT_INTERNAL_CLASSES)) { ++ if (className.startsWith(JAXP_INTERNAL) || ++ className.startsWith(STAX_INTERNAL)) { + cl = null; + } else { + final int lastDot = className.lastIndexOf("."); +@@ -318,7 +316,7 @@ + Class providerClass; + if (cl == null) { + //use the bootstrap ClassLoader. +- providerClass = Class.forName(className); ++ providerClass = Class.forName(className, false, ObjectFactory.class.getClassLoader()); + } else { + try { + providerClass = cl.loadClass(className); +--- ./jaxp/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java 2014-06-06 19:56:13.000000000 -0700 +@@ -211,7 +211,7 @@ + if (i > 0) { + return uri.substring(i+1, uri.length()); + } +- return ""; ++ return uri; + } + + /** +--- ./jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java 2014-01-18 12:16:08.000000000 -0800 +@@ -0,0 +1,237 @@ ++/* ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * ++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. ++ * ++ * The contents of this file are subject to the terms of either the GNU ++ * General Public License Version 2 only ("GPL") or the Common Development ++ * and Distribution License("CDDL") (collectively, the "License"). You ++ * may not use this file except in compliance with the License. You can ++ * obtain a copy of the License at ++ * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html ++ * or packager/legal/LICENSE.txt. See the License for the specific ++ * language governing permissions and limitations under the License. ++ * ++ * When distributing the software, include this License Header Notice in each ++ * file and include the License file at packager/legal/LICENSE.txt. ++ * ++ * GPL Classpath Exception: ++ * Oracle designates this particular file as subject to the "Classpath" ++ * exception as provided by Oracle in the GPL Version 2 section of the License ++ * file that accompanied this code. ++ * ++ * Modifications: ++ * If applicable, add the following below the License Header, with the fields ++ * enclosed by brackets [] replaced by your own identifying information: ++ * "Portions Copyright [year] [name of copyright owner]" ++ * ++ * Contributor(s): ++ * If you wish your version of this file to be governed by only the CDDL or ++ * only the GPL Version 2, indicate your decision by adding "[Contributor] ++ * elects to include this software in this distribution under the [CDDL or GPL ++ * Version 2] license." If you don't indicate a single choice of license, a ++ * recipient has the option to distribute your version of this file under ++ * either the CDDL, the GPL Version 2 or to extend the choice of license to ++ * its licensees as provided above. However, if you add GPL Version 2 code ++ * and therefore, elected the GPL Version 2 license, then the option applies ++ * only if the new code is made subject to such option by the copyright ++ * holder. ++ */ ++package com.sun.org.apache.xerces.internal.utils; ++ ++import com.sun.org.apache.xerces.internal.impl.Constants; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager.Limit; ++import java.util.Formatter; ++import java.util.HashMap; ++import java.util.Map; ++ ++/** ++ * A helper for analyzing entity expansion limits ++ * ++ * @author Joe Wang Oracle Corp. ++ * ++ */ ++public final class XMLLimitAnalyzer { ++ ++ /** ++ * Map old property names with the new ones ++ */ ++ public static enum NameMap { ++ ENTITY_EXPANSION_LIMIT(Constants.SP_ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT), ++ MAX_OCCUR_NODE_LIMIT(Constants.SP_MAX_OCCUR_LIMIT, Constants.MAX_OCCUR_LIMIT), ++ ELEMENT_ATTRIBUTE_LIMIT(Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, Constants.ELEMENT_ATTRIBUTE_LIMIT); ++ ++ final String newName; ++ final String oldName; ++ ++ NameMap(String newName, String oldName) { ++ this.newName = newName; ++ this.oldName = oldName; ++ } ++ ++ String getOldName(String newName) { ++ if (newName.equals(this.newName)) { ++ return oldName; ++ } ++ return null; ++ } ++ } ++ ++ /** ++ * Max value accumulated for each property ++ */ ++ private final int[] values; ++ /** ++ * Names of the entities corresponding to their max values ++ */ ++ private final String[] names; ++ /** ++ * Total value of accumulated entities ++ */ ++ private final int[] totalValue; ++ ++ /** ++ * Maintain values of the top 10 elements in the process of parsing ++ */ ++ private final Map[] caches; ++ ++ private String entityStart, entityEnd; ++ /** ++ * Default constructor. Establishes default values for known security ++ * vulnerabilities. ++ */ ++ public XMLLimitAnalyzer() { ++ values = new int[Limit.values().length]; ++ totalValue = new int[Limit.values().length]; ++ names = new String[Limit.values().length]; ++ caches = new Map[Limit.values().length]; ++ } ++ ++ /** ++ * Add the value to the current max count for the specified property ++ * To find the max value of all entities, set no limit ++ * ++ * @param limit the type of the property ++ * @param entityName the name of the entity ++ * @param value the value of the entity ++ */ ++ public void addValue(Limit limit, String entityName, int value) { ++ addValue(limit.ordinal(), entityName, value); ++ } ++ ++ /** ++ * Add the value to the current count by the index of the property ++ * @param index the index of the property ++ * @param entityName the name of the entity ++ * @param value the value of the entity ++ */ ++ public void addValue(int index, String entityName, int value) { ++ if (index == Limit.ENTITY_EXPANSION_LIMIT.ordinal() || ++ index == Limit.MAX_OCCUR_NODE_LIMIT.ordinal() || ++ index == Limit.ELEMENT_ATTRIBUTE_LIMIT.ordinal()) { ++ totalValue[index] += value; ++ return; ++ } ++ ++ Map cache; ++ if (caches[index] == null) { ++ cache = new HashMap(10); ++ caches[index] = cache; ++ } else { ++ cache = caches[index]; ++ } ++ ++ int accumulatedValue = value; ++ if (cache.containsKey(entityName)) { ++ accumulatedValue += cache.get(entityName).intValue(); ++ cache.put(entityName, Integer.valueOf(accumulatedValue)); ++ } else { ++ cache.put(entityName, Integer.valueOf(value)); ++ } ++ ++ if (accumulatedValue > values[index]) { ++ values[index] = accumulatedValue; ++ names[index] = entityName; ++ } ++ ++ ++ if (index == Limit.GENEAL_ENTITY_SIZE_LIMIT.ordinal() || ++ index == Limit.PARAMETER_ENTITY_SIZE_LIMIT.ordinal()) { ++ totalValue[Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()] += value; ++ } ++ } ++ ++ /** ++ * Return the value of the current max count for the specified property ++ * ++ * @param limit the property ++ * @return the value of the property ++ */ ++ public int getValue(Limit limit) { ++ return values[limit.ordinal()]; ++ } ++ ++ public int getValue(int index) { ++ return values[index]; ++ } ++ /** ++ * Return the total value accumulated so far ++ * ++ * @param limit the property ++ * @return the accumulated value of the property ++ */ ++ public int getTotalValue(Limit limit) { ++ return totalValue[limit.ordinal()]; ++ } ++ ++ public int getTotalValue(int index) { ++ return totalValue[index]; ++ } ++ /** ++ * Return the current max value (count or length) by the index of a property ++ * @param index the index of a property ++ * @return count of a property ++ */ ++ public int getValueByIndex(int index) { ++ return values[index]; ++ } ++ ++ public void startEntity(String name) { ++ entityStart = name; ++ } ++ ++ public boolean isTracking(String name) { ++ if (entityStart == null) { ++ return false; ++ } ++ return entityStart.equals(name); ++ } ++ /** ++ * Stop tracking the entity ++ * @param limit the limit property ++ * @param name the name of an entity ++ */ ++ public void endEntity(Limit limit, String name) { ++ entityStart = ""; ++ Map cache = caches[limit.ordinal()]; ++ if (cache != null) { ++ cache.remove(name); ++ } ++ } ++ ++ public void debugPrint(XMLSecurityManager securityManager) { ++ Formatter formatter = new Formatter(); ++ System.out.println(formatter.format("%30s %15s %15s %15s %30s", ++ "Property","Limit","Total size","Size","Entity Name")); ++ ++ for (Limit limit : Limit.values()) { ++ formatter = new Formatter(); ++ System.out.println(formatter.format("%30s %15d %15d %15d %30s", ++ limit.name(), ++ securityManager.getLimit(limit), ++ totalValue[limit.ordinal()], ++ values[limit.ordinal()], ++ names[limit.ordinal()])); ++ } ++ } ++} +--- ./jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java 2014-01-18 12:16:08.000000000 -0800 +@@ -0,0 +1,540 @@ ++/* ++ * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. ++ * 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.org.apache.xerces.internal.utils; ++ ++import com.sun.org.apache.xerces.internal.impl.Constants; ++import com.sun.org.apache.xerces.internal.util.SecurityManager; ++ ++/** ++ * This class manages standard and implementation-specific limitations. ++ * ++ */ ++public final class XMLSecurityManager { ++ ++ /** ++ * States of the settings of a property, in the order: default value, value ++ * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system ++ * properties, and jaxp api properties ++ */ ++ public static enum State { ++ //this order reflects the overriding order ++ ++ DEFAULT("default"), FSP("FEATURE_SECURE_PROCESSING"), ++ JAXPDOTPROPERTIES("jaxp.properties"), SYSTEMPROPERTY("system property"), ++ APIPROPERTY("property"); ++ ++ final String literal; ++ State(String literal) { ++ this.literal = literal; ++ } ++ ++ String literal() { ++ return literal; ++ } ++ } ++ ++ /** ++ * Limits managed by the security manager ++ */ ++ public static enum Limit { ++ ++ ENTITY_EXPANSION_LIMIT(Constants.JDK_ENTITY_EXPANSION_LIMIT, Constants.SP_ENTITY_EXPANSION_LIMIT, 0, 64000), ++ MAX_OCCUR_NODE_LIMIT(Constants.JDK_MAX_OCCUR_LIMIT, Constants.SP_MAX_OCCUR_LIMIT, 0, 5000), ++ ELEMENT_ATTRIBUTE_LIMIT(Constants.JDK_ELEMENT_ATTRIBUTE_LIMIT, Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000), ++ TOTAL_ENTITY_SIZE_LIMIT(Constants.JDK_TOTAL_ENTITY_SIZE_LIMIT, Constants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000), ++ GENEAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENEAL_ENTITY_SIZE_LIMIT, Constants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0), ++ PARAMETER_ENTITY_SIZE_LIMIT(Constants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, Constants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000); ++ ++ final String apiProperty; ++ final String systemProperty; ++ final int defaultValue; ++ final int secureValue; ++ ++ Limit(String apiProperty, String systemProperty, int value, int secureValue) { ++ this.apiProperty = apiProperty; ++ this.systemProperty = systemProperty; ++ this.defaultValue = value; ++ this.secureValue = secureValue; ++ } ++ ++ public boolean equalsAPIPropertyName(String propertyName) { ++ return (propertyName == null) ? false : apiProperty.equals(propertyName); ++ } ++ ++ public boolean equalsSystemPropertyName(String propertyName) { ++ return (propertyName == null) ? false : systemProperty.equals(propertyName); ++ } ++ ++ public String apiProperty() { ++ return apiProperty; ++ } ++ ++ String systemProperty() { ++ return systemProperty; ++ } ++ ++ int defaultValue() { ++ return defaultValue; ++ } ++ ++ int secureValue() { ++ return secureValue; ++ } ++ } ++ ++ /** ++ * Map old property names with the new ones ++ */ ++ public static enum NameMap { ++ ++ ENTITY_EXPANSION_LIMIT(Constants.SP_ENTITY_EXPANSION_LIMIT, Constants.ENTITY_EXPANSION_LIMIT), ++ MAX_OCCUR_NODE_LIMIT(Constants.SP_MAX_OCCUR_LIMIT, Constants.MAX_OCCUR_LIMIT), ++ ELEMENT_ATTRIBUTE_LIMIT(Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, Constants.ELEMENT_ATTRIBUTE_LIMIT); ++ final String newName; ++ final String oldName; ++ ++ NameMap(String newName, String oldName) { ++ this.newName = newName; ++ this.oldName = oldName; ++ } ++ ++ String getOldName(String newName) { ++ if (newName.equals(this.newName)) { ++ return oldName; ++ } ++ return null; ++ } ++ } ++ private static final int NO_LIMIT = 0; ++ /** ++ * Values of the properties ++ */ ++ private final int[] values; ++ /** ++ * States of the settings for each property ++ */ ++ private State[] states; ++ /** ++ * Flag indicating if secure processing is set ++ */ ++ boolean secureProcessing; ++ ++ /** ++ * States that determine if properties are set explicitly ++ */ ++ private boolean[] isSet; ++ ++ ++ /** ++ * Index of the special entityCountInfo property ++ */ ++ private int indexEntityCountInfo = 10000; ++ private String printEntityCountInfo = ""; ++ ++ /** ++ * Default constructor. Establishes default values for known security ++ * vulnerabilities. ++ */ ++ public XMLSecurityManager() { ++ this(false); ++ } ++ ++ /** ++ * Instantiate Security Manager in accordance with the status of ++ * secure processing ++ * @param secureProcessing ++ */ ++ public XMLSecurityManager(boolean secureProcessing) { ++ values = new int[Limit.values().length]; ++ states = new State[Limit.values().length]; ++ isSet = new boolean[Limit.values().length]; ++ this.secureProcessing = secureProcessing; ++ for (Limit limit : Limit.values()) { ++ if (secureProcessing) { ++ values[limit.ordinal()] = limit.secureValue; ++ states[limit.ordinal()] = State.FSP; ++ } else { ++ values[limit.ordinal()] = limit.defaultValue(); ++ states[limit.ordinal()] = State.DEFAULT; ++ } ++ } ++ //read system properties or jaxp.properties ++ readSystemProperties(); ++ } ++ ++ /** ++ * Setting FEATURE_SECURE_PROCESSING explicitly ++ */ ++ public void setSecureProcessing(boolean secure) { ++ secureProcessing = secure; ++ for (Limit limit : Limit.values()) { ++ if (secure) { ++ setLimit(limit.ordinal(), State.FSP, limit.secureValue()); ++ } else { ++ setLimit(limit.ordinal(), State.FSP, limit.defaultValue()); ++ } ++ } ++ } ++ ++ /** ++ * Return the state of secure processing ++ * @return the state of secure processing ++ */ ++ public boolean isSecureProcessing() { ++ return secureProcessing; ++ } ++ ++ ++ /** ++ * Set limit by property name and state ++ * @param propertyName property name ++ * @param state the state of the property ++ * @param value the value of the property ++ * @return true if the property is managed by the security manager; false ++ * if otherwise. ++ */ ++ public boolean setLimit(String propertyName, State state, Object value) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ setLimit(index, state, value); ++ return true; ++ } ++ return false; ++ } ++ ++ /** ++ * Set the value for a specific limit. ++ * ++ * @param limit the limit ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setLimit(Limit limit, State state, int value) { ++ setLimit(limit.ordinal(), state, value); ++ } ++ ++ /** ++ * Set the value of a property by its index ++ * ++ * @param index the index of the property ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setLimit(int index, State state, Object value) { ++ if (index == indexEntityCountInfo) { ++ printEntityCountInfo = (String)value; ++ } else { ++ int temp; ++ if (Integer.class.isAssignableFrom(value.getClass())) { ++ temp = ((Integer)value).intValue(); ++ } else { ++ temp = Integer.parseInt((String) value); ++ if (temp < 0) { ++ temp = 0; ++ } ++ } ++ setLimit(index, state, temp); ++ } ++ } ++ ++ /** ++ * Set the value of a property by its index ++ * ++ * @param index the index of the property ++ * @param state the state of the property ++ * @param value the value of the property ++ */ ++ public void setLimit(int index, State state, int value) { ++ if (index == indexEntityCountInfo) { ++ //if it's explicitly set, it's treated as yes no matter the value ++ printEntityCountInfo = Constants.JDK_YES; ++ } else { ++ //only update if it shall override ++ if (state.compareTo(states[index]) >= 0) { ++ values[index] = value; ++ states[index] = state; ++ isSet[index] = true; ++ } ++ } ++ } ++ ++ /** ++ * Return the value of the specified property ++ * ++ * @param propertyName the property name ++ * @return the value of the property as a string. If a property is managed ++ * by this manager, its value shall not be null. ++ */ ++ public String getLimitAsString(String propertyName) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ return getLimitValueByIndex(index); ++ } ++ ++ return null; ++ } ++ /** ++ * Return the value of the specified property ++ * ++ * @param limit the property ++ * @return the value of the property ++ */ ++ public int getLimit(Limit limit) { ++ return values[limit.ordinal()]; ++ } ++ ++ /** ++ * Return the value of a property by its ordinal ++ * ++ * @param limit the property ++ * @return value of a property ++ */ ++ public String getLimitValueAsString(Limit limit) { ++ return Integer.toString(values[limit.ordinal()]); ++ } ++ ++ /** ++ * Return the value of a property by its ordinal ++ * ++ * @param index the index of a property ++ * @return limit of a property as a string ++ */ ++ public String getLimitValueByIndex(int index) { ++ if (index == indexEntityCountInfo) { ++ return printEntityCountInfo; ++ } ++ ++ return Integer.toString(values[index]); ++ } ++ ++ /** ++ * Return the state of the limit property ++ * ++ * @param limit the limit ++ * @return the state of the limit property ++ */ ++ public State getState(Limit limit) { ++ return states[limit.ordinal()]; ++ } ++ ++ /** ++ * Return the state of the limit property ++ * ++ * @param limit the limit ++ * @return the state of the limit property ++ */ ++ public String getStateLiteral(Limit limit) { ++ return states[limit.ordinal()].literal(); ++ } ++ ++ /** ++ * Get the index by property name ++ * ++ * @param propertyName property name ++ * @return the index of the property if found; return -1 if not ++ */ ++ public int getIndex(String propertyName) { ++ for (Limit limit : Limit.values()) { ++ if (limit.equalsAPIPropertyName(propertyName)) { ++ //internally, ordinal is used as index ++ return limit.ordinal(); ++ } ++ } ++ //special property to return entity count info ++ if (propertyName.equals(Constants.JDK_ENTITY_COUNT_INFO)) { ++ return indexEntityCountInfo; ++ } ++ return -1; ++ } ++ ++ /** ++ * Check if there's no limit defined by the Security Manager ++ * @param limit ++ * @return ++ */ ++ public boolean isNoLimit(int limit) { ++ return limit==NO_LIMIT; ++ } ++ /** ++ * Check if the size (length or count) of the specified limit property is ++ * over the limit ++ * ++ * @param limit the type of the limit property ++ * @param entityName the name of the entity ++ * @param size the size (count or length) of the entity ++ * @return true if the size is over the limit, false otherwise ++ */ ++ public boolean isOverLimit(Limit limit, String entityName, int size, ++ XMLLimitAnalyzer limitAnalyzer) { ++ return isOverLimit(limit.ordinal(), entityName, size, limitAnalyzer); ++ } ++ ++ /** ++ * Check if the value (length or count) of the specified limit property is ++ * over the limit ++ * ++ * @param index the index of the limit property ++ * @param entityName the name of the entity ++ * @param size the size (count or length) of the entity ++ * @return true if the size is over the limit, false otherwise ++ */ ++ public boolean isOverLimit(int index, String entityName, int size, ++ XMLLimitAnalyzer limitAnalyzer) { ++ if (values[index] == NO_LIMIT) { ++ return false; ++ } ++ if (size > values[index]) { ++ limitAnalyzer.addValue(index, entityName, size); ++ return true; ++ } ++ return false; ++ } ++ ++ /** ++ * Check against cumulated value ++ * ++ * @param limit the type of the limit property ++ * @param size the size (count or length) of the entity ++ * @return true if the size is over the limit, false otherwise ++ */ ++ public boolean isOverLimit(Limit limit, XMLLimitAnalyzer limitAnalyzer) { ++ return isOverLimit(limit.ordinal(), limitAnalyzer); ++ } ++ ++ public boolean isOverLimit(int index, XMLLimitAnalyzer limitAnalyzer) { ++ if (values[index] == NO_LIMIT) { ++ return false; ++ } ++ ++ if (index==Limit.ELEMENT_ATTRIBUTE_LIMIT.ordinal() || ++ index==Limit.ENTITY_EXPANSION_LIMIT.ordinal() || ++ index==Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()) { ++ return (limitAnalyzer.getTotalValue(index) > values[index]); ++ } else { ++ return (limitAnalyzer.getValue(index) > values[index]); ++ } ++ } ++ ++ public void debugPrint(XMLLimitAnalyzer limitAnalyzer) { ++ if (printEntityCountInfo.equals(Constants.JDK_YES)) { ++ limitAnalyzer.debugPrint(this); ++ } ++ } ++ ++ ++ /** ++ * Indicate if a property is set explicitly ++ * @param index ++ * @return ++ */ ++ public boolean isSet(int index) { ++ return isSet[index]; ++ } ++ ++ public boolean printEntityCountInfo() { ++ return printEntityCountInfo.equals(Constants.JDK_YES); ++ } ++ ++ /** ++ * Read from system properties, or those in jaxp.properties ++ */ ++ private void readSystemProperties() { ++ ++ for (Limit limit : Limit.values()) { ++ if (!getSystemProperty(limit, limit.systemProperty())) { ++ //if system property is not found, try the older form if any ++ for (NameMap nameMap : NameMap.values()) { ++ String oldName = nameMap.getOldName(limit.systemProperty()); ++ if (oldName != null) { ++ getSystemProperty(limit, oldName); ++ } ++ } ++ } ++ } ++ ++ } ++ ++ /** ++ * Read from system properties, or those in jaxp.properties ++ * ++ * @param property the type of the property ++ * @param sysPropertyName the name of system property ++ */ ++ private boolean getSystemProperty(Limit limit, String sysPropertyName) { ++ try { ++ String value = SecuritySupport.getSystemProperty(sysPropertyName); ++ if (value != null && !value.equals("")) { ++ values[limit.ordinal()] = Integer.parseInt(value); ++ states[limit.ordinal()] = State.SYSTEMPROPERTY; ++ return true; ++ } ++ ++ value = SecuritySupport.readJAXPProperty(sysPropertyName); ++ if (value != null && !value.equals("")) { ++ values[limit.ordinal()] = Integer.parseInt(value); ++ states[limit.ordinal()] = State.JAXPDOTPROPERTIES; ++ return true; ++ } ++ } catch (NumberFormatException e) { ++ //invalid setting ++ throw new NumberFormatException("Invalid setting for system property: " + limit.systemProperty()); ++ } ++ return false; ++ } ++ ++ ++ /** ++ * Convert a value set through setProperty to XMLSecurityManager. ++ * If the value is an instance of XMLSecurityManager, use it to override the default; ++ * If the value is an old SecurityManager, convert to the new XMLSecurityManager. ++ * ++ * @param value user specified security manager ++ * @param securityManager an instance of XMLSecurityManager ++ * @return an instance of the new security manager XMLSecurityManager ++ */ ++ static public XMLSecurityManager convert(Object value, XMLSecurityManager securityManager) { ++ if (value == null) { ++ if (securityManager == null) { ++ securityManager = new XMLSecurityManager(true); ++ } ++ return securityManager; ++ } ++ if (XMLSecurityManager.class.isAssignableFrom(value.getClass())) { ++ return (XMLSecurityManager)value; ++ } else { ++ if (securityManager == null) { ++ securityManager = new XMLSecurityManager(true); ++ } ++ if (SecurityManager.class.isAssignableFrom(value.getClass())) { ++ SecurityManager origSM = (SecurityManager)value; ++ securityManager.setLimit(Limit.MAX_OCCUR_NODE_LIMIT, State.APIPROPERTY, origSM.getMaxOccurNodeLimit()); ++ securityManager.setLimit(Limit.ENTITY_EXPANSION_LIMIT, State.APIPROPERTY, origSM.getEntityExpansionLimit()); ++ securityManager.setLimit(Limit.ELEMENT_ATTRIBUTE_LIMIT, State.APIPROPERTY, origSM.getElementAttrLimit()); ++ } ++ return securityManager; ++ } ++ } ++} +--- ./jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java 2014-01-18 12:16:08.000000000 -0800 +@@ -91,6 +91,24 @@ + readSystemProperties(); + } + ++ ++ /** ++ * Set limit by property name and state ++ * @param propertyName property name ++ * @param state the state of the property ++ * @param value the value of the property ++ * @return true if the property is managed by the security property manager; ++ * false if otherwise. ++ */ ++ public boolean setValue(String propertyName, State state, Object value) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ setValue(index, state, (String)value); ++ return true; ++ } ++ return false; ++ } ++ + /** + * Set the value for a specific property. + * +@@ -119,6 +137,23 @@ + states[index] = state; + } + } ++ ++ ++ /** ++ * Return the value of the specified property ++ * ++ * @param propertyName the property name ++ * @return the value of the property as a string ++ */ ++ public String getValue(String propertyName) { ++ int index = getIndex(propertyName); ++ if (index > -1) { ++ return getValueByIndex(index); ++ } ++ ++ return null; ++ } ++ + /** + * Return the value of the specified property + * +--- ./jaxp/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java 2013-09-06 11:23:00.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java 2013-12-01 11:13:41.000000000 -0800 +@@ -37,7 +37,6 @@ + import com.sun.org.apache.xerces.internal.util.HTTPInputSource; + import com.sun.org.apache.xerces.internal.util.IntStack; + import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; +-import com.sun.org.apache.xerces.internal.util.SecurityManager; + import com.sun.org.apache.xerces.internal.util.SymbolTable; + import com.sun.org.apache.xerces.internal.util.URI; + import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; +@@ -45,6 +44,7 @@ + import com.sun.org.apache.xerces.internal.util.XMLChar; + import com.sun.org.apache.xerces.internal.util.XMLSymbols; + import com.sun.org.apache.xerces.internal.util.URI.MalformedURIException; ++import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; + import com.sun.org.apache.xerces.internal.xni.Augmentations; + import com.sun.org.apache.xerces.internal.xni.NamespaceContext; + import com.sun.org.apache.xerces.internal.xni.QName; +@@ -289,7 +289,7 @@ + protected SymbolTable fSymbolTable; + protected XMLErrorReporter fErrorReporter; + protected XMLEntityResolver fEntityResolver; +- protected SecurityManager fSecurityManager; ++ protected XMLSecurityManager fSecurityManager; + protected XMLSecurityPropertyManager fSecurityPropertyMgr; + + // these are needed for text include processing +@@ -517,8 +517,8 @@ + + // Get security manager. + try { +- SecurityManager value = +- (SecurityManager)componentManager.getProperty( ++ XMLSecurityManager value = ++ (XMLSecurityManager)componentManager.getProperty( + SECURITY_MANAGER); + + if (value != null) { +@@ -674,7 +674,7 @@ + return; + } + if (propertyId.equals(SECURITY_MANAGER)) { +- fSecurityManager = (SecurityManager)value; ++ fSecurityManager = (XMLSecurityManager)value; + if (fChildConfig != null) { + fChildConfig.setProperty(propertyId, value); + } +--- ./jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java 2013-09-06 11:23:01.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java 2014-01-18 12:16:08.000000000 -0800 +@@ -20,6 +20,7 @@ + + package com.sun.org.apache.xerces.internal.xni.parser; + ++import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; + import java.io.IOException; + import com.sun.org.apache.xerces.internal.xni.XNIException; + +@@ -95,4 +96,5 @@ + public boolean scanDTDExternalSubset(boolean complete) + throws IOException, XNIException; + ++ public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer); + } // interface XMLDTDScanner +--- ./jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java 2013-09-06 11:23:01.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMAxisIterNodeList.java 2014-06-06 19:56:13.000000000 -0700 +@@ -105,15 +105,15 @@ + */ + public Node item(int index) { + if (m_iter != null) { +- int node; ++ int node = 0; + int count = m_cachedNodes.size(); + + if (count > index) { + node = m_cachedNodes.elementAt(index); + return m_dtm.getNode(node); + } else if (m_last == -1) { +- while (((node = m_iter.next()) != DTMAxisIterator.END) +- && count <= index) { ++ while (count <= index ++ && ((node = m_iter.next()) != DTMAxisIterator.END)) { + m_cachedNodes.addElement(node); + count++; + } +--- ./jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java 2013-09-06 11:23:02.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java 2014-01-18 12:16:08.000000000 -0800 +@@ -24,20 +24,17 @@ + package com.sun.org.apache.xml.internal.resolver; + + import com.sun.org.apache.xerces.internal.utils.SecuritySupport; ++import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver; ++import com.sun.org.apache.xml.internal.resolver.helpers.Debug; + import java.io.InputStream; +- +-import java.net.URL; + import java.net.MalformedURLException; +- ++import java.net.URL; + import java.util.MissingResourceException; + import java.util.PropertyResourceBundle; + import java.util.ResourceBundle; + import java.util.StringTokenizer; + import java.util.Vector; +- +-import com.sun.org.apache.xml.internal.resolver.helpers.Debug; +-import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver; +-import com.sun.org.apache.xml.internal.resolver.Catalog; ++import sun.reflect.misc.ReflectUtil; + + /** + * CatalogManager provides an interface to the catalog properties. +@@ -687,7 +684,7 @@ + catalog = new Catalog(); + } else { + try { +- catalog = (Catalog) Class.forName(catalogClassName).newInstance(); ++ catalog = (Catalog) ReflectUtil.forName(catalogClassName).newInstance(); + } catch (ClassNotFoundException cnfe) { + debug.message(1,"Catalog class named '" + + catalogClassName +--- ./jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java 2013-09-06 11:23:02.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java 2014-01-18 12:16:08.000000000 -0800 +@@ -23,24 +23,21 @@ + + package com.sun.org.apache.xml.internal.resolver.readers; + +-import java.util.Hashtable; ++import com.sun.org.apache.xml.internal.resolver.Catalog; ++import com.sun.org.apache.xml.internal.resolver.CatalogException; ++import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces; + import java.io.IOException; + import java.io.InputStream; ++import java.net.MalformedURLException; + import java.net.URL; + import java.net.URLConnection; +-import java.net.MalformedURLException; +- +-import javax.xml.parsers.DocumentBuilderFactory; ++import java.util.Hashtable; + import javax.xml.parsers.DocumentBuilder; ++import javax.xml.parsers.DocumentBuilderFactory; + import javax.xml.parsers.ParserConfigurationException; +- +-import com.sun.org.apache.xml.internal.resolver.Catalog; +-import com.sun.org.apache.xml.internal.resolver.CatalogException; +-import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; +-import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces; +- +-import org.xml.sax.SAXException; + import org.w3c.dom.*; ++import org.xml.sax.SAXException; ++import sun.reflect.misc.ReflectUtil; + + /** + * A DOM-based CatalogReader. +@@ -199,7 +196,7 @@ + DOMCatalogParser domParser = null; + + try { +- domParser = (DOMCatalogParser) Class.forName(domParserClass).newInstance(); ++ domParser = (DOMCatalogParser) ReflectUtil.forName(domParserClass).newInstance(); + } catch (ClassNotFoundException cnfe) { + catalog.getCatalogManager().debug.message(1, "Cannot load XML Catalog Parser class", domParserClass); + throw new CatalogException(CatalogException.UNPARSEABLE); +--- ./jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java 2013-09-06 11:23:02.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java 2014-01-18 12:16:08.000000000 -0800 +@@ -23,19 +23,21 @@ + + package com.sun.org.apache.xml.internal.resolver.readers; + +-import java.util.Hashtable; +-import java.io.IOException; ++import com.sun.org.apache.xml.internal.resolver.Catalog; ++import com.sun.org.apache.xml.internal.resolver.CatalogException; ++import com.sun.org.apache.xml.internal.resolver.CatalogManager; ++import com.sun.org.apache.xml.internal.resolver.helpers.Debug; + import java.io.FileNotFoundException; ++import java.io.IOException; + import java.io.InputStream; ++import java.net.MalformedURLException; + import java.net.URL; + import java.net.URLConnection; +-import java.net.MalformedURLException; + import java.net.UnknownHostException; +- ++import java.util.Hashtable; + import javax.xml.parsers.ParserConfigurationException; +-import javax.xml.parsers.SAXParserFactory; + import javax.xml.parsers.SAXParser; +- ++import javax.xml.parsers.SAXParserFactory; + import org.xml.sax.AttributeList; + import org.xml.sax.Attributes; + import org.xml.sax.ContentHandler; +@@ -45,12 +47,7 @@ + import org.xml.sax.Locator; + import org.xml.sax.Parser; + import org.xml.sax.SAXException; +- +-import com.sun.org.apache.xml.internal.resolver.Catalog; +-import com.sun.org.apache.xml.internal.resolver.CatalogManager; +-import com.sun.org.apache.xml.internal.resolver.CatalogException; +-import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; +-import com.sun.org.apache.xml.internal.resolver.helpers.Debug; ++import sun.reflect.misc.ReflectUtil; + + /** + * A SAX-based CatalogReader. +@@ -246,7 +243,7 @@ + } + parser.parse(new InputSource(is), spHandler); + } else { +- Parser parser = (Parser) Class.forName(parserClass).newInstance(); ++ Parser parser = (Parser) ReflectUtil.forName(parserClass).newInstance(); + parser.setDocumentHandler(this); + if (bResolver != null) { + parser.setEntityResolver(bResolver); +@@ -352,7 +349,7 @@ + + try { + saxParser = (SAXCatalogParser) +- Class.forName(saxParserClass).newInstance(); ++ ReflectUtil.forName(saxParserClass).newInstance(); + + saxParser.setCatalog(catalog); + saxParser.startDocument(); +@@ -413,7 +410,7 @@ + + try { + saxParser = (SAXCatalogParser) +- Class.forName(saxParserClass).newInstance(); ++ ReflectUtil.forName(saxParserClass).newInstance(); + + saxParser.setCatalog(catalog); + saxParser.startDocument(); +--- ./jaxp/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java 2013-09-06 11:23:02.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java 2014-04-19 01:27:01.000000000 -0700 +@@ -22,6 +22,11 @@ + */ + package com.sun.org.apache.xml.internal.serializer; + ++import com.sun.org.apache.xalan.internal.utils.SecuritySupport; ++import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; ++import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver; ++import com.sun.org.apache.xml.internal.serializer.utils.Utils; ++import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; + import java.io.BufferedReader; + import java.io.InputStream; + import java.io.InputStreamReader; +@@ -29,19 +34,11 @@ + import java.net.URL; + import java.util.Enumeration; + import java.util.HashMap; ++import java.util.Locale; + import java.util.PropertyResourceBundle; + import java.util.ResourceBundle; +-import java.security.AccessController; +-import java.security.PrivilegedAction; +- + import javax.xml.transform.TransformerException; + +-import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; +-import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver; +-import com.sun.org.apache.xml.internal.serializer.utils.Utils; +-import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException; +-import com.sun.org.apache.xalan.internal.utils.ObjectFactory; +- + /** + * This class provides services that tell if a character should have + * special treatement, such as entity reference substitution or normalization +@@ -176,13 +173,19 @@ + // file + // 3) try treating the resource a URI + +- if (internal) { +- try { ++ try { ++ if (internal) { + // Load entity property files by using PropertyResourceBundle, + // cause of security issure for applets + entities = PropertyResourceBundle.getBundle(entitiesResource); +- } catch (Exception e) {} +- } ++ } else { ++ ClassLoader cl = SecuritySupport.getContextClassLoader(); ++ if (cl != null) { ++ entities = PropertyResourceBundle.getBundle(entitiesResource, ++ Locale.getDefault(), cl); ++ } ++ } ++ } catch (Exception e) {} + + if (entities != null) { + Enumeration keys = entities.getKeys(); +@@ -198,6 +201,7 @@ + set(S_CARRIAGERETURN); + } else { + InputStream is = null; ++ String err = null; + + // Load user specified resource file by using URL loading, it + // requires a valid URI as parameter +@@ -205,18 +209,22 @@ + if (internal) { + is = CharInfo.class.getResourceAsStream(entitiesResource); + } else { +- ClassLoader cl = ObjectFactory.findClassLoader(); +- if (cl == null) { +- is = ClassLoader.getSystemResourceAsStream(entitiesResource); +- } else { +- is = cl.getResourceAsStream(entitiesResource); ++ ClassLoader cl = SecuritySupport.getContextClassLoader(); ++ if (cl != null) { ++ try { ++ is = cl.getResourceAsStream(entitiesResource); ++ } catch (Exception e) { ++ err = e.getMessage(); ++ } + } + + if (is == null) { + try { + URL url = new URL(entitiesResource); + is = url.openStream(); +- } catch (Exception e) {} ++ } catch (Exception e) { ++ err = e.getMessage(); ++ } + } + } + +@@ -224,7 +232,7 @@ + throw new RuntimeException( + Utils.messages.createMessage( + MsgKey.ER_RESOURCE_COULD_NOT_FIND, +- new Object[] {entitiesResource, entitiesResource})); ++ new Object[] {entitiesResource, err})); + } + + // Fix Bugzilla#4000: force reading in UTF-8 +@@ -456,64 +464,56 @@ + return isCleanTextASCII[value]; + } + +-// In the future one might want to use the array directly and avoid +-// the method call, but I think the JIT alreay inlines this well enough +-// so don't do it (for now) - bjm +-// public final boolean[] getASCIIClean() +-// { +-// return isCleanTextASCII; +-// } +- +- +- private static CharInfo getCharInfoBasedOnPrivilege( +- final String entitiesFileName, final String method, +- final boolean internal){ +- return (CharInfo) AccessController.doPrivileged( +- new PrivilegedAction() { +- public Object run() { +- return new CharInfo(entitiesFileName, +- method, internal);} +- }); ++ ++ /** ++ * Read an internal resource file that describes the mapping of ++ * characters to entity references; Construct a CharInfo object. ++ * ++ * @param entitiesFileName Name of entities resource file that should ++ * be loaded, which describes the mapping of characters to entity references. ++ * @param method the output method type, which should be one of "xml", "html", and "text". ++ * @return an instance of CharInfo ++ * ++ * @xsl.usage internal ++ */ ++ static CharInfo getCharInfoInternal(String entitiesFileName, String method) ++ { ++ CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName); ++ if (charInfo != null) { ++ return charInfo; ++ } ++ ++ charInfo = new CharInfo(entitiesFileName, method, true); ++ m_getCharInfoCache.put(entitiesFileName, charInfo); ++ return charInfo; + } + + /** +- * Factory that reads in a resource file that describes the mapping of +- * characters to entity references. ++ * Constructs a CharInfo object using the following process to try reading ++ * the entitiesFileName parameter: ++ * ++ * 1) attempt to load it as a ResourceBundle ++ * 2) try using the class loader to find the specified file ++ * 3) try opening it as an URI + * +- * Resource files must be encoded in UTF-8 and have a format like: ++ * In case of 2 and 3, the resource file must be encoded in UTF-8 and have the ++ * following format: + *
+      * # First char # is a comment
+      * Entity numericValue
+      * quot 34
+      * amp 38
+      * 
+- * (Note: Why don't we just switch to .properties files? Oct-01 -sc) + * +- * @param entitiesResource Name of entities resource file that should +- * be loaded, which describes that mapping of characters to entity references. +- * @param method the output method type, which should be one of "xml", "html", "text"... +- * +- * @xsl.usage internal ++ * @param entitiesFileName Name of entities resource file that should ++ * be loaded, which describes the mapping of characters to entity references. ++ * @param method the output method type, which should be one of "xml", "html", and "text". ++ * @return an instance of CharInfo + */ + static CharInfo getCharInfo(String entitiesFileName, String method) + { +- CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName); +- if (charInfo != null) { +- return charInfo; +- } +- +- // try to load it internally - cache +- try { +- charInfo = getCharInfoBasedOnPrivilege(entitiesFileName, +- method, true); +- m_getCharInfoCache.put(entitiesFileName, charInfo); +- return charInfo; +- } catch (Exception e) {} +- +- // try to load it externally - do not cache + try { +- return getCharInfoBasedOnPrivilege(entitiesFileName, +- method, false); ++ return new CharInfo(entitiesFileName, method, false); + } catch (Exception e) {} + + String absoluteEntitiesFileName; +@@ -530,8 +530,7 @@ + } + } + +- return getCharInfoBasedOnPrivilege(entitiesFileName, +- method, false); ++ return new CharInfo(absoluteEntitiesFileName, method, false); + } + + /** Table of user-specified char infos. */ +--- ./jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java 2013-09-06 11:23:02.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java 2014-04-19 01:27:01.000000000 -0700 +@@ -60,7 +60,7 @@ + */ + private static final CharInfo m_htmlcharInfo = + // new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE); +- CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML); ++ CharInfo.getCharInfoInternal(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML); + + /** A digital search trie for fast, case insensitive lookup of ElemDesc objects. */ + static final Trie m_elementFlags = new Trie(); +--- ./jaxp/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java 2013-09-06 11:23:02.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java 2014-04-19 01:27:01.000000000 -0700 +@@ -58,7 +58,7 @@ + */ + private static CharInfo m_xmlcharInfo = + // new CharInfo(CharInfo.XML_ENTITIES_RESOURCE); +- CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML); ++ CharInfo.getCharInfoInternal(CharInfo.XML_ENTITIES_RESOURCE, Method.XML); + + /** + * Default constructor. +--- ./jaxp/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java 2013-09-06 11:23:03.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java 2013-12-01 11:13:41.000000000 -0800 +@@ -25,12 +25,15 @@ + import com.sun.org.apache.xalan.internal.XalanConstants; + import com.sun.org.apache.xalan.internal.utils.FactoryImpl; + import com.sun.org.apache.xalan.internal.utils.SecuritySupport; ++import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; + import java.util.HashMap; ++ + import javax.xml.XMLConstants; + import javax.xml.parsers.FactoryConfigurationError; + import javax.xml.parsers.ParserConfigurationException; + import javax.xml.parsers.SAXParserFactory; + import org.xml.sax.SAXException; ++import org.xml.sax.SAXNotRecognizedException; + import org.xml.sax.XMLReader; + import org.xml.sax.helpers.XMLReaderFactory; + +@@ -63,11 +66,15 @@ + private HashMap m_inUse; + + private boolean m_useServicesMechanism = true; ++ ++ private boolean _secureProcessing; + /** + * protocols allowed for external DTD references in source file and/or stylesheet. + */ + private String _accessExternalDTD = XalanConstants.EXTERNAL_ACCESS_DEFAULT; + ++ private XMLSecurityManager _xmlSecurityManager; ++ + /** + * Hidden constructor + */ +@@ -118,7 +125,12 @@ + // TransformerFactory creates a reader via the + // XMLReaderFactory if setXMLReader is not used + reader = XMLReaderFactory.createXMLReader(); +- ++ try { ++ reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, _secureProcessing); ++ } catch (SAXNotRecognizedException e) { ++ System.err.println("Warning: " + reader.getClass().getName() + ": " ++ + e.getMessage()); ++ } + } catch (Exception e) { + try { + // If unable to create an instance, let's try to use +@@ -164,6 +176,21 @@ + + se.getMessage()); + } + ++ try { ++ if (_xmlSecurityManager != null) { ++ for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { ++ reader.setProperty(limit.apiProperty(), ++ _xmlSecurityManager.getLimitValueAsString(limit)); ++ } ++ if (_xmlSecurityManager.printEntityCountInfo()) { ++ reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); ++ } ++ } ++ } catch (SAXException se) { ++ System.err.println("Warning: " + reader.getClass().getName() + ": " ++ + se.getMessage()); ++ } ++ + return reader; + } + +@@ -195,11 +222,22 @@ + } + + /** ++ * Set feature ++ */ ++ public void setFeature(String name, boolean value) { ++ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) { ++ _secureProcessing = value; ++ } ++ } ++ ++ /** + * Get property value + */ +- public String getProperty(String name) { ++ public Object getProperty(String name) { + if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { + return _accessExternalDTD; ++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++ return _xmlSecurityManager; + } + return null; + } +@@ -207,9 +245,11 @@ + /** + * Set property. + */ +- public void setProperty(String name, String value) { ++ public void setProperty(String name, Object value) { + if (name.equals(XMLConstants.ACCESS_EXTERNAL_DTD)) { + _accessExternalDTD = (String)value; ++ } else if (name.equals(XalanConstants.SECURITY_MANAGER)) { ++ _xmlSecurityManager = (XMLSecurityManager)value; + } + } + } +--- ./jaxp/src/com/sun/org/apache/xpath/internal/XPathContext.java 2013-09-06 11:23:03.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xpath/internal/XPathContext.java 2014-06-06 19:56:13.000000000 -0700 +@@ -103,8 +103,7 @@ + * the DTMManager, it really is a proxy for this object, which + * is the real DTMManager. + */ +- protected DTMManager m_dtmManager = DTMManager.newInstance( +- com.sun.org.apache.xpath.internal.objects.XMLStringFactoryImpl.getFactory()); ++ protected DTMManager m_dtmManager = null; + + /** + * Return the DTMManager object. Though XPathContext context extends +--- ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider.java 2013-09-06 11:23:03.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider.java 2014-06-06 19:56:13.000000000 -0700 +@@ -33,6 +33,7 @@ + import com.sun.org.apache.xpath.internal.objects.XNodeSet; + import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; + import com.sun.org.apache.xalan.internal.res.XSLMessages; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; + + import com.sun.org.apache.xpath.internal.functions.FuncExtFunction; + import java.util.Vector; +@@ -54,9 +55,12 @@ + } + + public JAXPExtensionsProvider(XPathFunctionResolver resolver, +- boolean featureSecureProcessing ) { ++ boolean featureSecureProcessing, FeatureManager featureManager ) { + this.resolver = resolver; +- this.extensionInvocationDisabled = featureSecureProcessing; ++ if (featureSecureProcessing && ++ !featureManager.isFeatureEnabled(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION)) { ++ this.extensionInvocationDisabled = true; ++ } + } + + /** +--- ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java 2013-09-06 11:23:03.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -30,6 +30,7 @@ + import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; + import com.sun.org.apache.xalan.internal.res.XSLMessages; + import com.sun.org.apache.xalan.internal.utils.FactoryImpl; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; + + import javax.xml.namespace.NamespaceContext; + import javax.xml.namespace.QName; +@@ -67,33 +68,36 @@ + private boolean featureSecureProcessing = false; + + private boolean useServicesMechanism = true; ++ ++ private final FeatureManager featureManager; ++ + /** Protected constructor to prevent direct instantiation; use compile() + * from the context. + */ +- protected XPathExpressionImpl() { }; ++ protected XPathExpressionImpl() { ++ this(null, null, null, null, ++ false, true, new FeatureManager()); ++ }; + + protected XPathExpressionImpl(com.sun.org.apache.xpath.internal.XPath xpath, + JAXPPrefixResolver prefixResolver, + XPathFunctionResolver functionResolver, + XPathVariableResolver variableResolver ) { +- this.xpath = xpath; +- this.prefixResolver = prefixResolver; +- this.functionResolver = functionResolver; +- this.variableResolver = variableResolver; +- this.featureSecureProcessing = false; ++ this(xpath, prefixResolver, functionResolver, variableResolver, ++ false, true, new FeatureManager()); + }; + + protected XPathExpressionImpl(com.sun.org.apache.xpath.internal.XPath xpath, +- JAXPPrefixResolver prefixResolver, +- XPathFunctionResolver functionResolver, +- XPathVariableResolver variableResolver, +- boolean featureSecureProcessing, boolean useServicesMechanism ) { ++ JAXPPrefixResolver prefixResolver,XPathFunctionResolver functionResolver, ++ XPathVariableResolver variableResolver, boolean featureSecureProcessing, ++ boolean useServicesMechanism, FeatureManager featureManager ) { + this.xpath = xpath; + this.prefixResolver = prefixResolver; + this.functionResolver = functionResolver; + this.variableResolver = variableResolver; + this.featureSecureProcessing = featureSecureProcessing; + this.useServicesMechanism = useServicesMechanism; ++ this.featureManager = featureManager; + }; + + public void setXPath (com.sun.org.apache.xpath.internal.XPath xpath ) { +@@ -111,7 +115,7 @@ + com.sun.org.apache.xpath.internal.XPathContext xpathSupport = null; + if ( functionResolver != null ) { + JAXPExtensionsProvider jep = new JAXPExtensionsProvider( +- functionResolver, featureSecureProcessing ); ++ functionResolver, featureSecureProcessing, featureManager ); + xpathSupport = new com.sun.org.apache.xpath.internal.XPathContext( jep ); + } else { + xpathSupport = new com.sun.org.apache.xpath.internal.XPathContext(); +--- ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java 2013-09-06 11:23:04.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -24,6 +24,8 @@ + import com.sun.org.apache.xalan.internal.XalanConstants; + import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; + import com.sun.org.apache.xalan.internal.res.XSLMessages; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; ++import com.sun.org.apache.xalan.internal.utils.FeaturePropertyBase; + + import javax.xml.XMLConstants; + import javax.xml.xpath.XPathFactory; +@@ -68,6 +70,8 @@ + + private boolean _useServicesMechanism = true; + ++ private final FeatureManager _featureManager; ++ + public XPathFactoryImpl() { + this(true); + } +@@ -77,9 +81,12 @@ + } + + public XPathFactoryImpl(boolean useServicesMechanism) { ++ _featureManager = new FeatureManager(); + if (System.getSecurityManager() != null) { + _isSecureMode = true; + _isNotSecureProcessing = false; ++ _featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION, ++ FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE); + } + this._useServicesMechanism = useServicesMechanism; + } +@@ -131,7 +138,8 @@ + public javax.xml.xpath.XPath newXPath() { + return new com.sun.org.apache.xpath.internal.jaxp.XPathImpl( + xPathVariableResolver, xPathFunctionResolver, +- !_isNotSecureProcessing, _useServicesMechanism ); ++ !_isNotSecureProcessing, _useServicesMechanism, ++ _featureManager ); + } + + /** +@@ -181,6 +189,10 @@ + } + + _isNotSecureProcessing = !value; ++ if (value && _featureManager != null) { ++ _featureManager.setValue(FeatureManager.Feature.ORACLE_ENABLE_EXTENSION_FUNCTION, ++ FeaturePropertyBase.State.FSP, XalanConstants.FEATURE_FALSE); ++ } + + // all done processing feature + return; +@@ -192,6 +204,11 @@ + return; + } + ++ if (_featureManager != null && ++ _featureManager.setValue(name, FeaturePropertyBase.State.APIPROPERTY, value)) { ++ return; ++ } ++ + // unknown feature + String fmsg = XSLMessages.createXPATHMessage( + XPATHErrorResources.ER_FEATURE_UNKNOWN, +@@ -240,6 +257,14 @@ + if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) { + return _useServicesMechanism; + } ++ ++ /** Check to see if the property is managed by the security manager **/ ++ String propertyValue = (_featureManager != null) ? ++ _featureManager.getValueAsString(name) : null; ++ if (propertyValue != null) { ++ return _featureManager.isFeatureEnabled(name); ++ } ++ + // unknown feature + String fmsg = XSLMessages.createXPATHMessage( + XPATHErrorResources.ER_GETTING_UNKNOWN_FEATURE, +--- ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java 2013-09-06 11:23:04.000000000 -0700 ++++ ./jaxp/src/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java 2014-06-06 19:56:13.000000000 -0700 +@@ -35,6 +35,7 @@ + import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; + import com.sun.org.apache.xalan.internal.res.XSLMessages; + import com.sun.org.apache.xalan.internal.utils.FactoryImpl; ++import com.sun.org.apache.xalan.internal.utils.FeatureManager; + + import org.w3c.dom.Node; + import org.w3c.dom.Document; +@@ -70,18 +71,20 @@ + // extensions function need to throw XPathFunctionException + private boolean featureSecureProcessing = false; + private boolean useServiceMechanism = true; ++ private final FeatureManager featureManager; + + XPathImpl( XPathVariableResolver vr, XPathFunctionResolver fr ) { +- this.origVariableResolver = this.variableResolver = vr; +- this.origFunctionResolver = this.functionResolver = fr; ++ this(vr, fr, false, true, new FeatureManager()); + } + + XPathImpl( XPathVariableResolver vr, XPathFunctionResolver fr, +- boolean featureSecureProcessing, boolean useServiceMechanism ) { ++ boolean featureSecureProcessing, boolean useServiceMechanism, ++ FeatureManager featureManager) { + this.origVariableResolver = this.variableResolver = vr; + this.origFunctionResolver = this.functionResolver = fr; + this.featureSecureProcessing = featureSecureProcessing; + this.useServiceMechanism = useServiceMechanism; ++ this.featureManager = featureManager; + } + + /** +@@ -190,7 +193,7 @@ + com.sun.org.apache.xpath.internal.XPathContext xpathSupport = null; + if ( functionResolver != null ) { + JAXPExtensionsProvider jep = new JAXPExtensionsProvider( +- functionResolver, featureSecureProcessing ); ++ functionResolver, featureSecureProcessing, featureManager ); + xpathSupport = new com.sun.org.apache.xpath.internal.XPathContext( jep ); + } else { + xpathSupport = new com.sun.org.apache.xpath.internal.XPathContext(); +@@ -391,7 +394,7 @@ + // Can have errorListener + XPathExpressionImpl ximpl = new XPathExpressionImpl (xpath, + prefixResolver, functionResolver, variableResolver, +- featureSecureProcessing, useServiceMechanism ); ++ featureSecureProcessing, useServiceMechanism, featureManager ); + return ximpl; + } catch ( javax.xml.transform.TransformerException te ) { + throw new XPathExpressionException ( te ) ; +--- ./jaxp/src/javax/xml/stream/FactoryFinder.java 2013-09-06 11:23:04.000000000 -0700 ++++ ./jaxp/src/javax/xml/stream/FactoryFinder.java 2013-12-01 11:13:41.000000000 -0800 +@@ -204,13 +204,15 @@ + * a property name + * @param fallbackClassName Implementation class name, if nothing else + * is found. Use null to mean no fallback. ++ * @param standardId Indicate whether the factoryId is standard ++ * or user specified. + * + * Package private so this code can be shared. + */ +- static Object find(String factoryId, String fallbackClassName) ++ static Object find(String factoryId, String fallbackClassName, boolean standardId) + throws ConfigurationError + { +- return find(factoryId, null, fallbackClassName); ++ return find(factoryId, null, fallbackClassName, standardId); + } + + /** +@@ -227,23 +229,34 @@ + * @param fallbackClassName Implementation class name, if nothing else + * is found. Use null to mean no fallback. + * ++ * @param standardId Indicate whether the factoryId is standard ++ * or user specified. ++ * + * Package private so this code can be shared. + */ +- static Object find(String factoryId, ClassLoader cl, String fallbackClassName) ++ static Object find(String factoryId, ClassLoader cl, String fallbackClassName, ++ boolean standardId) + throws ConfigurationError + { + dPrint("find factoryId =" + factoryId); + + // Use the system property first + try { +- String systemProp = ss.getSystemProperty(factoryId); ++ String systemProp; ++ if (standardId) { ++ systemProp = ss.getSystemProperty(factoryId); ++ } else { ++ systemProp = System.getProperty(factoryId); ++ } ++ + if (systemProp != null) { + dPrint("found system property, value=" + systemProp); + return newInstance(systemProp, null, true); + } + } + catch (SecurityException se) { +- if (debug) se.printStackTrace(); ++ throw new ConfigurationError( ++ "Failed to read factoryId '" + factoryId + "'", se); + } + + // Try read $java.home/lib/stax.properties followed by +--- ./jaxp/src/javax/xml/stream/XMLEventFactory.java 2013-09-06 11:23:04.000000000 -0700 ++++ ./jaxp/src/javax/xml/stream/XMLEventFactory.java 2013-12-01 11:13:41.000000000 -0800 +@@ -60,9 +60,7 @@ + public static XMLEventFactory newInstance() + throws FactoryConfigurationError + { +- return (XMLEventFactory) FactoryFinder.find( +- JAXPFACTORYID, +- DEFAULIMPL); ++ return (XMLEventFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + } + + /** +@@ -93,9 +91,7 @@ + public static XMLEventFactory newFactory() + throws FactoryConfigurationError + { +- return (XMLEventFactory) FactoryFinder.find( +- JAXPFACTORYID, +- DEFAULIMPL); ++ return (XMLEventFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + } + + /** +@@ -118,7 +114,8 @@ + throws FactoryConfigurationError { + try { + //do not fallback if given classloader can't find the class, throw exception +- return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, null); ++ return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, ++ null, factoryId.equals(JAXPFACTORYID) ? true : false); + } catch (FactoryFinder.ConfigurationError e) { + throw new FactoryConfigurationError(e.getException(), + e.getMessage()); +@@ -145,7 +142,8 @@ + throws FactoryConfigurationError { + try { + //do not fallback if given classloader can't find the class, throw exception +- return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, null); ++ return (XMLEventFactory) FactoryFinder.find(factoryId, classLoader, ++ null, factoryId.equals(JAXPFACTORYID) ? true : false); + } catch (FactoryFinder.ConfigurationError e) { + throw new FactoryConfigurationError(e.getException(), + e.getMessage()); +--- ./jaxp/src/javax/xml/stream/XMLInputFactory.java 2013-09-06 11:23:04.000000000 -0700 ++++ ./jaxp/src/javax/xml/stream/XMLInputFactory.java 2013-12-01 11:13:41.000000000 -0800 +@@ -139,6 +139,7 @@ + public static final String ALLOCATOR= + "javax.xml.stream.allocator"; + ++ static final String JAXPFACTORYID = "javax.xml.stream.XMLInputFactory"; + static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLInputFactoryImpl"; + + protected XMLInputFactory(){} +@@ -150,9 +151,7 @@ + public static XMLInputFactory newInstance() + throws FactoryConfigurationError + { +- return (XMLInputFactory) FactoryFinder.find( +- "javax.xml.stream.XMLInputFactory", +- DEFAULIMPL); ++ return (XMLInputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + } + + /** +@@ -183,9 +182,7 @@ + public static XMLInputFactory newFactory() + throws FactoryConfigurationError + { +- return (XMLInputFactory) FactoryFinder.find( +- "javax.xml.stream.XMLInputFactory", +- DEFAULIMPL); ++ return (XMLInputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + } + + /** +@@ -208,7 +205,8 @@ + throws FactoryConfigurationError { + try { + //do not fallback if given classloader can't find the class, throw exception +- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); ++ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, ++ null, factoryId.equals(JAXPFACTORYID) ? true : false); + } catch (FactoryFinder.ConfigurationError e) { + throw new FactoryConfigurationError(e.getException(), + e.getMessage()); +@@ -235,7 +233,8 @@ + throws FactoryConfigurationError { + try { + //do not fallback if given classloader can't find the class, throw exception +- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); ++ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, ++ null, factoryId.equals(JAXPFACTORYID) ? true : false); + } catch (FactoryFinder.ConfigurationError e) { + throw new FactoryConfigurationError(e.getException(), + e.getMessage()); +--- ./jaxp/src/javax/xml/stream/XMLOutputFactory.java 2013-09-06 11:23:04.000000000 -0700 ++++ ./jaxp/src/javax/xml/stream/XMLOutputFactory.java 2013-12-01 11:13:41.000000000 -0800 +@@ -115,6 +115,7 @@ + public static final String IS_REPAIRING_NAMESPACES= + "javax.xml.stream.isRepairingNamespaces"; + ++ static final String JAXPFACTORYID = "javax.xml.stream.XMLOutputFactory"; + static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl"; + + protected XMLOutputFactory(){} +@@ -126,8 +127,7 @@ + public static XMLOutputFactory newInstance() + throws FactoryConfigurationError + { +- return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", +- DEFAULIMPL); ++ return (XMLOutputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + } + + /** +@@ -158,8 +158,7 @@ + public static XMLOutputFactory newFactory() + throws FactoryConfigurationError + { +- return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", +- DEFAULIMPL); ++ return (XMLOutputFactory) FactoryFinder.find(JAXPFACTORYID, DEFAULIMPL, true); + } + + /** +@@ -181,7 +180,8 @@ + throws FactoryConfigurationError { + try { + //do not fallback if given classloader can't find the class, throw exception +- return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, null); ++ return (XMLInputFactory) FactoryFinder.find(factoryId, classLoader, ++ null, factoryId.equals(JAXPFACTORYID) ? true : false); + } catch (FactoryFinder.ConfigurationError e) { + throw new FactoryConfigurationError(e.getException(), + e.getMessage()); +@@ -210,7 +210,8 @@ + throws FactoryConfigurationError { + try { + //do not fallback if given classloader can't find the class, throw exception +- return (XMLOutputFactory) FactoryFinder.find(factoryId, classLoader, null); ++ return (XMLOutputFactory) FactoryFinder.find(factoryId, classLoader, ++ null, factoryId.equals(JAXPFACTORYID) ? true : false); + } catch (FactoryFinder.ConfigurationError e) { + throw new FactoryConfigurationError(e.getException(), + e.getMessage()); +--- ./jaxp/src/javax/xml/xpath/XPathException.java 2013-09-06 11:23:05.000000000 -0700 ++++ ./jaxp/src/javax/xml/xpath/XPathException.java 2014-06-06 19:56:13.000000000 -0700 +@@ -26,6 +26,11 @@ + package javax.xml.xpath; + + import java.io.PrintWriter; ++import java.io.IOException; ++import java.io.ObjectInputStream; ++import java.io.ObjectOutputStream; ++import java.io.ObjectStreamField; ++import java.io.InvalidClassException; + + /** + * XPathException represents a generic XPath exception.

+@@ -36,7 +41,9 @@ + */ + public class XPathException extends Exception { + +- private final Throwable cause; ++ private static final ObjectStreamField[] serialPersistentFields = { ++ new ObjectStreamField( "cause", Throwable.class ) ++ }; + + /** + *

Stream Unique Identifier.

+@@ -62,7 +69,6 @@ + if ( message == null ) { + throw new NullPointerException ( "message can't be null"); + } +- this.cause = null; + } + + /** +@@ -77,8 +83,7 @@ + * @throws NullPointerException if cause is null. + */ + public XPathException(Throwable cause) { +- super(); +- this.cause = cause; ++ super(cause); + if ( cause == null ) { + throw new NullPointerException ( "cause can't be null"); + } +@@ -90,7 +95,47 @@ + * @return Cause of this XPathException. + */ + public Throwable getCause() { +- return cause; ++ return super.getCause(); ++ } ++ ++ /** ++ * Writes "cause" field to the stream. ++ * The cause is got from the parent class. ++ * ++ * @param out stream used for serialization. ++ * @throws IOException thrown by ObjectOutputStream ++ * ++ */ ++ private void writeObject(ObjectOutputStream out) ++ throws IOException ++ { ++ ObjectOutputStream.PutField fields = out.putFields(); ++ fields.put("cause", (Throwable) super.getCause()); ++ out.writeFields(); ++ } ++ ++ /** ++ * Reads the "cause" field from the stream. ++ * And initializes the "cause" if it wasn't ++ * done before. ++ * ++ * @param in stream used for deserialization ++ * @throws IOException thrown by ObjectInputStream ++ * @throws ClassNotFoundException thrown by ObjectInputStream ++ */ ++ private void readObject(ObjectInputStream in) ++ throws IOException, ClassNotFoundException ++ { ++ ObjectInputStream.GetField fields = in.readFields(); ++ Throwable scause = (Throwable) fields.get("cause", null); ++ ++ if (super.getCause() == null && scause != null) { ++ try { ++ super.initCause(scause); ++ } catch(IllegalStateException e) { ++ throw new InvalidClassException("Inconsistent state: two causes"); ++ } ++ } + } + + /** +--- ./jaxws/.hgtags 2013-09-06 11:23:51.000000000 -0700 ++++ ./jaxws/.hgtags 2014-06-06 19:56:15.000000000 -0700 +@@ -123,6 +123,7 @@ + 05469dd4c3662c454f8a019e492543add60795cc jdk7-b146 + c01bfd68d0528bc88348813c4d75d7f5c62bc4e2 jdk7u1-b01 + d13b1f877bb5ed8dceb2f7ec10365d1db5f70b2d jdk7-b147 ++ce6378e3c791c56b98cbf161804a07d0225b41c0 7u0 + 4c24f7019ce939a452154a83151294ad7da66a9d jdk7u1-b02 + 272778f529d11081f548f37fcd6a7aec0b11a8dd jdk7u1-b03 + 48b06a6e6f46e5bcd610f4bed57cd5067cf31f8c jdk7u1-b04 +@@ -302,6 +303,22 @@ + 0cd0d4e7331f7fc9f9ee77f2275113571bcf67cf jdk7u25-b09 + 105cdfd4f40837917d0065e3e58052d2854df7da jdk7u25-b10 + 6de7fec036abf91ce962c74f11a6266491df3fd8 jdk7u25-b11 ++a367ebf0c21512867f4ab5cdd206dd8c7817c004 jdk7u14-b16 ++74c34f35912d8d7145b3ff34fefea2d2f189f2b4 jdk7u14-b17 ++c93a35b3638f45de91013d65543217a002577684 jdk7u14-b18 ++82be38857de3b2f6d8def98034f3e7b0827fd9f0 jdk7u14-b19 ++82be38857de3b2f6d8def98034f3e7b0827fd9f0 jdk7u14-b19 ++d63b21e6c3d29305400dbfc1500090cab89f25d1 jdk7u14-b19 ++dd695ad6c5ec797fe61db31600a3fd2dbc62247b jdk7u14-b20 ++97bbac299eb801709a924fe777b3ee9c96829d8b jdk7u14-b21 ++6e74b3e1773cfbac99998431a5a54c70baaf1dc5 jdk7u14-b22 ++e9bbdf789d2b512550e0ca80629980e96f02146d jdk7u40-b23 ++adaf9cf486fab1b14c5af9fc6525565760bb9c11 jdk7u40-b24 ++aafab1efbd4ced5e05695aa1887813f9f5de9d5c jdk7u40-b25 ++6581f9739031120bb7515d3b09fa3501653d11af jdk7u40-b26 ++46ebac943288218b14d7ce3df23aa42a70fa4cf9 jdk7u40-b27 ++016957700ac905ebf3432ae8ba17d3576a51e585 jdk7u40-b28 ++15a82c84d9f7f6c99310380d4766fc68a3882671 jdk7u40-b29 + 4c5d242efa0d6e0cdb688e41e722bff671dfbfec jdk7u25-b12 + 6b4a165221304d809f678a18f51c7a8cb042d60b jdk7u25-b13 + 03073e4e6d3f600102d31e862154f56730838b11 jdk7u25-b14 +@@ -343,3 +360,83 @@ + 89f6c9663d75d9e4b672aed16f885b84232e9c93 jdk7u40-b42 + 3ee85b3793de16855e20272336a3565af8477b6b jdk7u40-b43 + cbeef786ce489096c39ec5effee4f8f9e770b4af jdk7u40-b60 ++4ee34d2cf2d84d0e1f5f20381ade525665ae424c jdk7u40-b61 ++b42a4cb742cf76f6c02d105349a7e8111ab8d68b jdk7u40-b62 ++000becfcb945d8592cfdef6ef1704b532af56762 jdk7u45-b01 ++817632baca26f7566e36c7708455494c15113d88 jdk7u45-b02 ++f65baba9400aec6cb29bc06b3139623bb4663225 jdk7u45-b03 ++80ff2468f520ed1940915815ceb85e05bd2bc568 jdk7u45-b04 ++1128d3934b643660a219532aa1ca554877d89375 jdk7u45-b05 ++8da3d41d946925a07a9f1001795959bfdb4c02c6 jdk7u45-b06 ++38f5b376c38035f13ede456f158ee26d0cf8d99c jdk7u45-b07 ++86f3efd1edae3c0f47ad14bef992e7566eaa94d4 jdk7u45-b08 ++ab835f7247e40dd7fb457830eaa31c550b434413 jdk7u45-b09 ++bbd594e6cf45ebfc37c71e217772b7f37a9c5750 jdk7u45-b10 ++c01eab96821e3c0315c4637e61a8015cbfe63b6a jdk7u45-b11 ++05f1274a8aa019584b4ceb05c73fc89bf7b7f4de jdk7u45-b12 ++3271849829b7c8ac32f6bb17b763d8a85a1a0a32 jdk7u45-b13 ++842dd63be9c633b8448e1837a5bb7b803dfdaad9 jdk7u45-b14 ++93a3fb090be58a5a45464f866a7093f24205dae2 jdk7u45-b15 ++5524cced32d3959d95ed414add230273bc10c38d jdk7u45-b16 ++a8baf22b5972e269a97f7b3b7eec2ad63a8c5aed jdk7u45-b17 ++65b0f3ccdc8bcff0d79e1b543a8cefb817529b3f jdk7u45-b18 ++c32c6a662d18d7195fc02125178c7543ce09bb00 jdk7u45-b30 ++6802a1c098c48b2c8336e06f1565254759025bab jdk7u45-b31 ++e040abab3625fbced33b30cba7c0307236268211 jdk7u45-b33 ++e7df5d6b23c64509672d262187f51cde14db4e66 jdk7u45-b34 ++c654ba4b2392c2913f45b495a2ea0c53cc348d98 jdk7u45-b35 ++5524cced32d3959d95ed414add230273bc10c38d jdk7u51-b00 ++db9e3328f393313e52cbf3fee5236aa2429028d0 jdk7u51-b01 ++92a4787cb3617005a329fb49247c550e8d7eb47a jdk7u51-b02 ++2240523feb968d7921e22f6730c299246a4125d0 jdk7u51-b03 ++c4f7cc35e47a4db7f380d62127dd2b49713f5552 jdk7u51-b04 ++f8f0617c0310b638855add08df58c5b9cd7e2dcb jdk7u51-b05 ++49fc29e8890c52e771beb3fd9bf3cbb9ecbf5f5e jdk7u51-b06 ++da128632f015df99d0f6a53547484dbe44f722fb jdk7u51-b07 ++71a314d55844bd6fe18aed56ce065b8df5c5cb82 jdk7u51-b08 ++3b53d5ea0aec473b637cd0e49f227304bac848a7 jdk7u51-b09 ++53a566a724e59f31bbd25a6a21f0f36adb36e82b jdk7u51-b10 ++708507f4795cad1f0cf7e19ff2dc16fe9d441754 jdk7u51-b11 ++7c7c2ea4b6808d0abf7fd48d11440d75b0c08d3a jdk7u51-b12 ++81a1b110f70c37d2c2f0de7c0ef3bd2d04aba475 jdk7u51-b13 ++5dbeb9983f104be717da35c9b14923d71dd248d7 jdk7u51-b30 ++eb79f394916efba85f4f6c7ef562966699f2c1e8 jdk7u51-b31 ++b2e40219fdcb579d9e10bf01bbd1f05ddcc936fb jdk7u51-b33 ++f782f513bb1c74640fe0f4711fec6a417845e9e9 jdk7u51-b34 ++7c7c2ea4b6808d0abf7fd48d11440d75b0c08d3a jdk7u55-b00 ++c5eb0c2a0f9715b510bc641506fb90df9bf05ab0 jdk7u55-b01 ++a257072fc2aa482abd6ffa28e235dbe532af6d00 jdk7u55-b02 ++2916fdfc475bf29bc702887bf5ba02df67c98916 jdk7u55-b03 ++f4759b4547602b3bc865db8c5f356f46979c6389 jdk7u55-b04 ++8a8dfdbc66149b89f804c5a50e4692c2520569ae jdk7u55-b05 ++2696d6747826cea92a97b2d80be4a59ff99462bd jdk7u55-b06 ++1ad971afe2b5db93420654fa65b23f827760fed7 jdk7u55-b07 ++57ba92e96b7fb6f4543038c1daa390c45d8a9d84 jdk7u55-b08 ++c9d8555964a581486f4c8e1bf5f5db678eb3b9f2 jdk7u55-b09 ++0f469a7307b98e911aaaab8cad781eab3bd94ad6 jdk7u55-b09 ++1080e907d64ab63c6138b1a61d9e5b826e83634a jdk7u55-b10 ++0db5b891d1ba10211da0a8158551b35f00da7684 jdk7u55-b11 ++3834eb921dfd8d29d917a0c57bb9fdd9aa58c209 jdk7u55-b12 ++3b0da73591b1ea23c48aa7babc34ed776fc183f0 jdk7u55-b13 ++5d726bf8fedc1f10d250e980653315919b7602f2 jdk7u55-b30 ++81d0f297557c4a876727cabeb2bfcdf066a1fc9d jdk7u55-b14 ++2d103c97c9bd0b3357e6d5e2b5b9ffb64c271288 jdk7u55-b31 ++cb5f95263f620967f5097c5ff8e0b27cfb9e8c44 jdk7u60-b00 ++f675dfce1e61a6ed01732ae7cfbae941791cba74 jdk7u60-b01 ++8a3b9e8492a5ac4e2e0c166dbfc5d058be244377 jdk7u60-b02 ++d4ba4e1ed3ecdef1ef7c3b7aaf62ff69fc105cb2 jdk7u60-b03 ++bef313c7ff7a7a829f8f6a305bf0c3738ad99795 jdk7u60-b04 ++30afd3e2e7044b2aa87ce00ab4301990e6d94d27 jdk7u60-b05 ++dc6017fb9cde43bce92d403abc2821b741cf977c jdk7u60-b06 ++0380cb9d4dc27ed8e2c4fc3502e3d94b0ae0c02d jdk7u60-b07 ++d3896e59b04dc4022c3e0d04e8750b281249bbd2 jdk7u60-b08 ++c85645aa77cedabeeb6e01373cdd81afd56c602e jdk7u60-b09 ++79501d4561e4cfa96fd77e2e92eb6a1b6ad61005 jdk7u60-b10 ++5d848774565b5e188d7ba915ce1cb09d8f3fdb87 jdk7u60-b11 ++9d34f726e35b321072ce5bd0aad2e513b9fc972f jdk7u60-b12 ++d941a701cf5ca11b2777fd1d0238e05e3c963e89 jdk7u60-b13 ++43b5a7cf08e7ee018b1fa42a89510b4c381dc4c5 jdk7u60-b14 ++d00389bf5439e5c42599604d2ebc909d26df8dcf jdk7u60-b15 ++2fc16d3a321212abc0cc93462b22c4be7f693ab9 jdk7u60-b16 ++b312ec543dc09db784e161eb89607d4afd4cab1e jdk7u60-b18 ++b312ec543dc09db784e161eb89607d4afd4cab1e jdk7u60-b17 +--- ./jaxws/src/share/jaf_classes/javax/activation/CommandMap.java 2013-09-06 11:23:51.000000000 -0700 ++++ ./jaxws/src/share/jaf_classes/javax/activation/CommandMap.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,6 +25,9 @@ + + package javax.activation; + ++import java.util.Map; ++import java.util.WeakHashMap; ++ + + /** + * The CommandMap class provides an interface to a registry of +@@ -38,6 +41,8 @@ + */ + public abstract class CommandMap { + private static CommandMap defaultCommandMap = null; ++ private static Map map = ++ new WeakHashMap(); + + /** + * Get the default CommandMap. +@@ -56,11 +61,18 @@ + * + * @return the CommandMap + */ +- public static CommandMap getDefaultCommandMap() { +- if (defaultCommandMap == null) +- defaultCommandMap = new MailcapCommandMap(); +- +- return defaultCommandMap; ++ public static synchronized CommandMap getDefaultCommandMap() { ++ if (defaultCommandMap != null) ++ return defaultCommandMap; ++ ++ // fetch per-thread-context-class-loader default ++ ClassLoader tccl = SecuritySupport.getContextClassLoader(); ++ CommandMap def = map.get(tccl); ++ if (def == null) { ++ def = new MailcapCommandMap(); ++ map.put(tccl, def); ++ } ++ return def; + } + + /** +@@ -71,7 +83,7 @@ + * @exception SecurityException if the caller doesn't have permission + * to change the default + */ +- public static void setDefaultCommandMap(CommandMap commandMap) { ++ public static synchronized void setDefaultCommandMap(CommandMap commandMap) { + SecurityManager security = System.getSecurityManager(); + if (security != null) { + try { +@@ -79,13 +91,16 @@ + security.checkSetFactory(); + } catch (SecurityException ex) { + // otherwise, we also allow it if this code and the +- // factory come from the same class loader (e.g., ++ // factory come from the same (non-system) class loader (e.g., + // the JAF classes were loaded with the applet classes). +- if (CommandMap.class.getClassLoader() != ++ if (CommandMap.class.getClassLoader() == null || ++ CommandMap.class.getClassLoader() != + commandMap.getClass().getClassLoader()) + throw ex; + } + } ++ // remove any per-thread-context-class-loader CommandMap ++ map.remove(SecuritySupport.getContextClassLoader()); + defaultCommandMap = commandMap; + } + +--- ./jaxws/src/share/jaf_classes/javax/activation/DataHandler.java 2013-09-06 11:23:51.000000000 -0700 ++++ ./jaxws/src/share/jaf_classes/javax/activation/DataHandler.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -368,7 +368,12 @@ + // if it's not set, set it... + if (transferFlavors == emptyFlavors) + transferFlavors = getDataContentHandler().getTransferDataFlavors(); +- return transferFlavors; ++ ++ if (transferFlavors == emptyFlavors) ++ return transferFlavors; ++ else ++ return transferFlavors.clone(); ++ + } + + /** +--- ./jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java 2013-09-06 11:23:51.000000000 -0700 ++++ ./jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + package javax.activation; + + import java.io.File; ++import java.util.Map; ++import java.util.WeakHashMap; + + /** + * The FileTypeMap is an abstract class that provides a data typing +@@ -48,6 +50,8 @@ + public abstract class FileTypeMap { + + private static FileTypeMap defaultMap = null; ++ private static Map map = ++ new WeakHashMap(); + + /** + * The default constructor. +@@ -78,11 +82,11 @@ + * Sets the default FileTypeMap for the system. This instance + * will be returned to callers of getDefaultFileTypeMap. + * +- * @param map The FileTypeMap. ++ * @param fileTypeMap The FileTypeMap. + * @exception SecurityException if the caller doesn't have permission + * to change the default + */ +- public static void setDefaultFileTypeMap(FileTypeMap map) { ++ public static synchronized void setDefaultFileTypeMap(FileTypeMap fileTypeMap) { + SecurityManager security = System.getSecurityManager(); + if (security != null) { + try { +@@ -90,14 +94,17 @@ + security.checkSetFactory(); + } catch (SecurityException ex) { + // otherwise, we also allow it if this code and the +- // factory come from the same class loader (e.g., ++ // factory come from the same (non-system) class loader (e.g., + // the JAF classes were loaded with the applet classes). +- if (FileTypeMap.class.getClassLoader() != +- map.getClass().getClassLoader()) ++ if (FileTypeMap.class.getClassLoader() == null || ++ FileTypeMap.class.getClassLoader() != ++ fileTypeMap.getClass().getClassLoader()) + throw ex; + } + } +- defaultMap = map; ++ // remove any per-thread-context-class-loader FileTypeMap ++ map.remove(SecuritySupport.getContextClassLoader()); ++ defaultMap = fileTypeMap; + } + + /** +@@ -109,10 +116,17 @@ + * @return The default FileTypeMap + * @see javax.activation.FileTypeMap#setDefaultFileTypeMap + */ +- public static FileTypeMap getDefaultFileTypeMap() { +- // XXX - probably should be synchronized +- if (defaultMap == null) +- defaultMap = new MimetypesFileTypeMap(); +- return defaultMap; ++ public static synchronized FileTypeMap getDefaultFileTypeMap() { ++ if (defaultMap != null) ++ return defaultMap; ++ ++ // fetch per-thread-context-class-loader default ++ ClassLoader tccl = SecuritySupport.getContextClassLoader(); ++ FileTypeMap def = map.get(tccl); ++ if (def == null) { ++ def = new MimetypesFileTypeMap(); ++ map.put(tccl, def); ++ } ++ return def; + } + } +--- ./jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java 2013-09-06 11:23:51.000000000 -0700 ++++ ./jaxws/src/share/jaf_classes/javax/activation/MailcapCommandMap.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -120,11 +120,7 @@ + public class MailcapCommandMap extends CommandMap { + /* + * We manage a collection of databases, searched in order. +- * The default database is shared between all instances +- * of this class. +- * XXX - Can we safely share more databases between instances? + */ +- private static MailcapFile defDB = null; + private MailcapFile[] DB; + private static final int PROG = 0; // programmatically added entries + +@@ -164,14 +160,10 @@ + loadAllResources(dbv, "META-INF/mailcap"); + + LogSupport.log("MailcapCommandMap: load DEF"); +- synchronized (MailcapCommandMap.class) { +- // see if another instance has created this yet. +- if (defDB == null) +- defDB = loadResource("/META-INF/mailcap.default"); +- } ++ mf = loadResource("/META-INF/mailcap.default"); + +- if (defDB != null) +- dbv.add(defDB); ++ if (mf != null) ++ dbv.add(mf); + + DB = new MailcapFile[dbv.size()]; + DB = (MailcapFile[])dbv.toArray(DB); +--- ./jaxws/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java 2013-09-06 11:23:51.000000000 -0700 ++++ ./jaxws/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -69,11 +69,7 @@ + public class MimetypesFileTypeMap extends FileTypeMap { + /* + * We manage a collection of databases, searched in order. +- * The default database is shared between all instances +- * of this class. +- * XXX - Can we safely share more databases between instances? + */ +- private static MimeTypeFile defDB = null; + private MimeTypeFile[] DB; + private static final int PROG = 0; // programmatically added entries + +@@ -114,14 +110,10 @@ + loadAllResources(dbv, "META-INF/mime.types"); + + LogSupport.log("MimetypesFileTypeMap: load DEF"); +- synchronized (MimetypesFileTypeMap.class) { +- // see if another instance has created this yet. +- if (defDB == null) +- defDB = loadResource("/META-INF/mimetypes.default"); +- } ++ mf = loadResource("/META-INF/mimetypes.default"); + +- if (defDB != null) +- dbv.addElement(defDB); ++ if (mf != null) ++ dbv.addElement(mf); + + DB = new MimeTypeFile[dbv.size()]; + dbv.copyInto(DB); +--- ./jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java 2013-09-06 11:23:52.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java 2014-06-06 19:56:15.000000000 -0700 +@@ -26,6 +26,7 @@ + + + package com.sun.org.glassfish.external.statistics.impl; ++ + import com.sun.org.glassfish.external.statistics.BoundedRangeStatistic; + import java.util.Map; + import java.lang.reflect.*; +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/APTNavigator.java 2013-09-06 11:23:52.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/APTNavigator.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -71,8 +71,7 @@ + * + * @author Kohsuke Kawaguchi (kk@kohsuke.org) + */ +-public class APTNavigator implements Navigator { +- ++public final class APTNavigator implements Navigator { + private final AnnotationProcessorEnvironment env; + + private final PrimitiveType primitiveByte; +@@ -277,8 +276,9 @@ + return clazz.getPackage().getQualifiedName(); + } + +- public TypeDeclaration findClass(String className, TypeDeclaration referencePoint) { +- return env.getTypeDeclaration(className); ++ @Override ++ public TypeDeclaration loadObjectFactory(TypeDeclaration referencePoint, String packageName) { ++ return env.getTypeDeclaration(packageName + ".ObjectFactory"); + } + + public boolean isBridgeMethod(MethodDeclaration method) { +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java 2013-09-06 11:23:53.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -204,24 +204,24 @@ + } + portName = ClassNameInfo.getName( + d.getSimpleName().replace( +- SIGC_INNERCLASS, +- SIGC_UNDERSCORE));; +- packageName = d.getPackage().getQualifiedName(); +- portName = webService != null && webService.name() != null && webService.name().length() >0 ? +- webService.name() : portName; +- serviceName = ClassNameInfo.getName(d.getQualifiedName())+SERVICE; +- serviceName = webService != null && webService.serviceName() != null && +- webService.serviceName().length() > 0 ? +- webService.serviceName() : serviceName; +- wsdlNamespace = seiContext.getNamespaceURI(); +- typeNamespace = wsdlNamespace; +- +- SOAPBinding soapBinding = d.getAnnotation(SOAPBinding.class); +- if (soapBinding != null) { +- pushedSOAPBinding = pushSOAPBinding(soapBinding, d, d); +- } else if (d.equals(typeDecl)) { +- pushedSOAPBinding = pushSOAPBinding(new MySOAPBinding(), d, d); +- } ++ SIGC_INNERCLASS, ++ SIGC_UNDERSCORE));; ++ packageName = d.getPackage().getQualifiedName(); ++ portName = webService != null && webService.name() != null && webService.name().length() >0 ? ++ webService.name() : portName; ++ serviceName = ClassNameInfo.getName(d.getQualifiedName())+SERVICE; ++ serviceName = webService != null && webService.serviceName() != null && ++ webService.serviceName().length() > 0 ? ++ webService.serviceName() : serviceName; ++ wsdlNamespace = seiContext.getNamespaceURI(); ++ typeNamespace = wsdlNamespace; ++ ++ SOAPBinding soapBinding = d.getAnnotation(SOAPBinding.class); ++ if (soapBinding != null) { ++ pushedSOAPBinding = pushSOAPBinding(soapBinding, d, d); ++ } else if (d.equals(typeDecl)) { ++ pushedSOAPBinding = pushSOAPBinding(new MySOAPBinding(), d, d); ++ } + } + + public static boolean sameStyle(SOAPBinding.Style style, SOAPStyle soapStyle) { +@@ -235,7 +235,7 @@ + } + + protected boolean pushSOAPBinding(SOAPBinding soapBinding, Declaration bindingDecl, +- TypeDeclaration classDecl) { ++ TypeDeclaration classDecl) { + boolean changed = false; + if (!sameStyle(soapBinding.style(), soapStyle)) { + changed = true; +@@ -293,7 +293,7 @@ + + // abstract protected boolean shouldProcessWebService(WebService webService, InterfaceDeclaration intf); + +-// abstract protected boolean shouldProcessWebService(WebService webService, ClassDeclaration decl); ++ // abstract protected boolean shouldProcessWebService(WebService webService, ClassDeclaration decl); + protected boolean shouldProcessWebService(WebService webService, InterfaceDeclaration intf) { + hasWebMethods = false; + if (webService == null) +@@ -315,9 +315,9 @@ + return false; + hasWebMethods = hasWebMethods(classDecl); + SOAPBinding soapBinding = classDecl.getAnnotation(SOAPBinding.class); +- if(soapBinding != null && soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { +- builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(soapBinding, classDecl)); +- return false; ++ if(soapBinding != null && soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) { ++ builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(soapBinding, classDecl)); ++ return false; + } + return isLegalImplementation(webService, classDecl); + } +@@ -345,8 +345,8 @@ + if (webMethod.exclude()) { + if (webMethod.operationName().length() > 0) + builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE("operationName", d.getQualifiedName(), method.toString())); +- if (webMethod.action().length() > 0) +- builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE("action", d.getQualifiedName(), method.toString())); ++ if (webMethod.action().length() > 0) ++ builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE("action", d.getQualifiedName(), method.toString())); + } else { + return true; + } +@@ -382,7 +382,7 @@ + } + + private InterfaceDeclaration getEndpointInterfaceDecl(String endpointInterfaceName, +- ClassDeclaration d) { ++ ClassDeclaration d) { + InterfaceDeclaration intTypeDecl = null; + for (InterfaceType interfaceType : d.getSuperinterfaces()) { + if (endpointInterfaceName.equals(interfaceType.toString())) { +@@ -488,7 +488,7 @@ + Collection modifiers = classDecl.getModifiers(); + if (!modifiers.contains(Modifier.PUBLIC)){ + builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(classDecl.getQualifiedName())); +- return false; ++ return false; + } + if (modifiers.contains(Modifier.FINAL) && !isStateful) { + builder.onError(classDecl.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(classDecl.getQualifiedName())); +@@ -538,7 +538,7 @@ + } + + protected boolean classImplementsSEI(ClassDeclaration classDecl, +- InterfaceDeclaration intfDecl) { ++ InterfaceDeclaration intfDecl) { + for (InterfaceType interfaceType : classDecl.getSuperinterfaces()) { + if (interfaceType.getDeclaration().equals(intfDecl)) + return true; +@@ -637,8 +637,8 @@ + */ + if (!isLegalType(method.getReturnType())) { + builder.onError(method.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(typeDecl.getQualifiedName(), +- method.getSimpleName(), +- method.getReturnType())); ++ method.getSimpleName(), ++ method.getReturnType())); + } + boolean isOneway = method.getAnnotation(Oneway.class) != null; + if (isOneway && !isValidOnewayMethod(method, typeDecl)) +@@ -684,14 +684,14 @@ + } + + protected boolean isLegalParameter(ParameterDeclaration param, +- MethodDeclaration method, +- TypeDeclaration typeDecl, +- int paramIndex) { ++ MethodDeclaration method, ++ TypeDeclaration typeDecl, ++ int paramIndex) { + if (!isLegalType(param.getType())) { + builder.onError(param.getPosition(), WebserviceapMessages.localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(typeDecl.getQualifiedName(), +- method.getSimpleName(), +- param.getSimpleName(), +- param.getType().toString())); ++ method.getSimpleName(), ++ param.getSimpleName(), ++ param.getType().toString())); + return false; + } + TypeMirror holderType; +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java 2013-09-06 11:23:53.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java 2014-06-06 19:56:15.000000000 -0700 +@@ -334,7 +334,7 @@ + if(options.verbose) { + listener.message(WscompileMessages.WSIMPORT_ARCHIVE_ARTIFACT(f, options.clientjar)); + } +- String entry = f.getCanonicalPath().substring(base.length()+1); ++ String entry = f.getCanonicalPath().substring(base.length()+1).replace(File.separatorChar, '/'); + BufferedInputStream bis = new BufferedInputStream( + new FileInputStream(f)); + JarEntry jarEntry = new JarEntry(entry); +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.tools.internal.ws.wsdl.parser; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java 2013-09-06 11:23:54.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -65,8 +65,15 @@ + * @author Vivek Pandey + */ + public class Internalizer { +- private static final XPathFactory xpf = XPathFactory.newInstance(); +- private final XPath xpath = xpf.newXPath(); ++ ++ private static final ContextClassloaderLocal xpf = new ContextClassloaderLocal() { ++ @Override ++ protected XPathFactory initialValue() throws Exception { ++ return XPathFactory.newInstance(); ++ } ++ }; ++ ++ private final XPath xpath = xpf.get().newXPath(); + private final WsimportOptions options; + private final DOMForest forest; + private final ErrorReceiver errorReceiver; +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java 2013-09-06 11:23:54.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,8 +56,14 @@ + */ + public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { + +- private static final XPathFactory xpf = XPathFactory.newInstance(); +- private final XPath xpath = xpf.newXPath(); ++ private static final ContextClassloaderLocal xpf = new ContextClassloaderLocal() { ++ @Override ++ protected XPathFactory initialValue() throws Exception { ++ return XPathFactory.newInstance(); ++ } ++ }; ++ ++ private final XPath xpath = xpf.get().newXPath(); + + public JAXWSBindingExtensionHandler(Map extensionHandlerMap) { + super(extensionHandlerMap); +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java 2013-09-06 11:23:55.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 +30,6 @@ + import com.sun.codemodel.internal.JType; + import com.sun.tools.internal.xjc.outline.Aspect; + import com.sun.tools.internal.xjc.outline.Outline; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + + /** + * @author Kohsuke Kawaguchi +@@ -69,6 +68,6 @@ + } + + public String fullName() { +- return Navigator.REFLECTION.getTypeName(t); ++ return Utils.REFLECTION_NAVIGATOR.getTypeName(t); + } + } +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java 2013-09-06 11:23:55.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 +56,7 @@ + EagerNType ent = (EagerNType) nt; + if (base instanceof EagerNClass) { + EagerNClass enc = (EagerNClass) base; +- return create(REFLECTION.getBaseClass(ent.t, enc.c)); ++ return create(Utils.REFLECTION_NAVIGATOR.getBaseClass(ent.t, enc.c)); + } + // lazy class can never be a base type of an eager type + return null; +@@ -176,7 +176,7 @@ + public NType getTypeArgument(NType nt, int i) { + if (nt instanceof EagerNType) { + EagerNType ent = (EagerNType) nt; +- return create(REFLECTION.getTypeArgument(ent.t,i)); ++ return create(Utils.REFLECTION_NAVIGATOR.getTypeArgument(ent.t,i)); + } + if (nt instanceof NClassByJClass) { + NClassByJClass nnt = (NClassByJClass) nt; +@@ -189,7 +189,7 @@ + public boolean isParameterizedType(NType nt) { + if (nt instanceof EagerNType) { + EagerNType ent = (EagerNType) nt; +- return REFLECTION.isParameterizedType(ent.t); ++ return Utils.REFLECTION_NAVIGATOR.isParameterizedType(ent.t); + } + if (nt instanceof NClassByJClass) { + NClassByJClass nnt = (NClassByJClass) nt; +@@ -303,8 +303,8 @@ + throw new UnsupportedOperationException(); + } + +- public NClass findClass(String className, NClass referencePoint) { +- // TODO: implement this method later ++ @Override ++ public NClass loadObjectFactory(NClass referencePoint, String pkg) { + throw new UnsupportedOperationException(); + } + +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.tools.internal.xjc.model.nav; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.tools.internal.xjc.reader.internalizer; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java 2013-09-06 11:23:56.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -75,9 +75,14 @@ + + private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/"; + +- private static final XPathFactory xpf = XPathFactory.newInstance(); ++ private static final ContextClassloaderLocal xpf = new ContextClassloaderLocal() { ++ @Override ++ protected XPathFactory initialValue() throws Exception { ++ return XPathFactory.newInstance(); ++ } ++ }; + +- private final XPath xpath = xpf.newXPath(); ++ private final XPath xpath = xpf.get().newXPath(); + + /** + * Internalize all <jaxb:bindings> customizations in the given forest. +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java 2013-09-06 11:23:57.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,9 +27,14 @@ + + import java.math.BigDecimal; + import java.math.BigInteger; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + import java.util.Calendar; ++import java.util.Collections; + import java.util.GregorianCalendar; ++import java.util.Map; + import java.util.TimeZone; ++import java.util.WeakHashMap; + + import javax.xml.bind.DatatypeConverter; + import javax.xml.bind.DatatypeConverterInterface; +@@ -352,7 +357,7 @@ + + public static GregorianCalendar _parseDateTime(CharSequence s) { + String val = WhiteSpaceProcessor.trim(s).toString(); +- return datatypeFactory.newXMLGregorianCalendar(val).toGregorianCalendar(); ++ return getDatatypeFactory().newXMLGregorianCalendar(val).toGregorianCalendar(); + } + + public static String _printDateTime(Calendar val) { +@@ -718,14 +723,30 @@ + } + return false; + } +- private static final DatatypeFactory datatypeFactory; + +- static { +- try { +- datatypeFactory = DatatypeFactory.newInstance(); +- } catch (DatatypeConfigurationException e) { +- throw new Error(e); ++ private static final Map DF_CACHE = Collections.synchronizedMap(new WeakHashMap()); ++ ++ public static DatatypeFactory getDatatypeFactory() { ++ ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction() { ++ public ClassLoader run() { ++ return Thread.currentThread().getContextClassLoader(); ++ } ++ }); ++ DatatypeFactory df = DF_CACHE.get(tccl); ++ if (df == null) { ++ synchronized (DatatypeConverterImpl.class) { ++ df = DF_CACHE.get(tccl); ++ if (df == null) { // to prevent multiple initialization ++ try { ++ df = DatatypeFactory.newInstance(); ++ } catch (DatatypeConfigurationException e) { ++ throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e); ++ } ++ DF_CACHE.put(tccl, df); ++ } ++ } + } ++ return df; + } + + private static final class CalendarFormatter { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.bind; ++ ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++ ++/** ++ * Message resources ++ */ ++enum Messages { ++ FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args ++ ; ++ ++ private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName()); ++ ++ @Override ++ public String toString() { ++ return format(); ++ } ++ ++ public String format( Object... args ) { ++ return MessageFormat.format( rb.getString(name()), args ); ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++ ++FAILED_TO_INITIALE_DATATYPE_FACTORY = \ ++ Failed to initialize JAXP 1.3 DatatypeFactory class. +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2013-09-06 11:23:57.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -45,7 +45,6 @@ + import com.sun.xml.internal.bind.api.impl.NameConverter; + import com.sun.xml.internal.bind.v2.ContextFactory; + import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; + + /** +@@ -404,7 +403,7 @@ + * @since 2.0 FCS + */ + public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) { +- return Navigator.REFLECTION.getBaseClass(type,baseType); ++ return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType); + } + + +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java 2013-09-06 11:23:57.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,8 +31,6 @@ + + import javax.xml.namespace.QName; + +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; +- + /** + * A reference to a JAXB-bound type. + * +@@ -104,11 +102,10 @@ + // if we are to reinstitute this check, check JAXB annotations only + // assert annotations.length==0; // not designed to work with adapters. + +- Type base = Navigator.REFLECTION.getBaseClass(type, Collection.class); ++ Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(type, Collection.class); + if(base==null) + return this; // not a collection + +- return new TypeReference(tagName, +- Navigator.REFLECTION.getTypeArgument(base,0)); ++ return new TypeReference(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0)); + } + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.bind.api; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -60,7 +60,6 @@ + PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY, // 2 args + + INVALID_XML_ENUM_VALUE, // 2 arg +- FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args + NO_IMAGE_WRITER, // 1 arg + + ILLEGAL_MIME_TYPE, // 2 args +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -86,9 +86,6 @@ + INVALID_XML_ENUM_VALUE = \ + "{0}" is not a valid value for {1}. + +-FAILED_TO_INITIALE_DATATYPE_FACTORY = \ +- Failed to initialize JAXP 1.3 DatatypeFactory class. +- + NO_IMAGE_WRITER = \ + No javax.imageio.ImageWriter is available for the specified MIME type "{0}" + +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java 2014-06-06 19:56:15.000000000 -0700 +@@ -160,8 +160,8 @@ + res = Messages.INCOMPATIBLE_API_VERSION; + + throw new LinkageError( res.format( +- Which.which(XmlSchema.class), +- Which.which(ModelBuilder.class) ++ Which.which(XmlSchema.class), ++ Which.which(ModelBuilder.class) + )); + } + } +@@ -176,8 +176,8 @@ + } catch (NoSuchMethodError e) { + // we seem to be getting 1.0 runtime + throw new LinkageError( Messages.RUNNING_WITH_1_0_RUNTIME.format( +- Which.which(WhiteSpaceProcessor.class), +- Which.which(ModelBuilder.class) ++ Which.which(WhiteSpaceProcessor.class), ++ Which.which(ModelBuilder.class) + )); + } + } +@@ -235,7 +235,7 @@ + String pkg = nav.getPackageName(ci.getClazz()); + if(!registries.containsKey(pkg)) { + // insert the package's object factory +- C c = loadObjectFactory(ci, pkg); ++ C c = nav.loadObjectFactory(clazz, pkg); + if(c!=null) + addRegistry(c,(Locatable)p); + } +@@ -264,15 +264,6 @@ + return r; + } + +- private C loadObjectFactory(ClassInfoImpl ci, String pkg) { +- try { +- return nav.findClass(pkg + ".ObjectFactory", ci.getClazz()); +- } catch (SecurityException ignored) { +- // treat SecurityException in same way as ClassNotFoundException in this case +- return null; +- } +- } +- + /** + * Checks the uniqueness of the type name. + */ +@@ -302,7 +293,7 @@ + + if(nav.isArray(t)) { // no need for checking byte[], because above typeInfoset.getTypeInfo() would return non-null + ArrayInfoImpl ai = +- createArrayInfo(upstream, t); ++ createArrayInfo(upstream, t); + addTypeName(ai); + typeInfoSet.add(ai); + return ai; +@@ -338,7 +329,7 @@ + } + + protected ElementInfoImpl createElementInfo( +- RegistryInfoImpl registryInfo, M m) throws IllegalAnnotationException { ++ RegistryInfoImpl registryInfo, M m) throws IllegalAnnotationException { + return new ElementInfoImpl(this,registryInfo,m); + } + +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,6 @@ + + import java.lang.reflect.Type; + +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; + import com.sun.xml.internal.bind.v2.runtime.Transducer; + +@@ -36,7 +35,7 @@ + */ + final class RuntimeAnyTypeImpl extends AnyTypeImpl implements RuntimeNonElement { + private RuntimeAnyTypeImpl() { +- super(Navigator.REFLECTION); ++ super(Utils.REFLECTION_NAVIGATOR); + } + + public Transducer getTransducer() { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -60,9 +60,7 @@ + import javax.imageio.stream.ImageOutputStream; + import javax.xml.bind.ValidationEvent; + import javax.xml.bind.helpers.ValidationEventImpl; +-import javax.xml.datatype.DatatypeConfigurationException; + import javax.xml.datatype.DatatypeConstants; +-import javax.xml.datatype.DatatypeFactory; + import javax.xml.datatype.Duration; + import javax.xml.datatype.XMLGregorianCalendar; + import javax.xml.namespace.QName; +@@ -565,7 +563,8 @@ + + public XMLGregorianCalendar parse(CharSequence lexical) throws SAXException { + try { +- return datatypeFactory.newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396) ++ return DatatypeConverterImpl.getDatatypeFactory() ++ .newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396) + } catch (Exception e) { + UnmarshallingContext.getInstance().handleError(e); + return null; +@@ -835,7 +834,7 @@ + + public Duration parse(CharSequence lexical) { + TODO.checkSpec("JSR222 Issue #42"); +- return datatypeFactory.newDuration(lexical.toString()); ++ return DatatypeConverterImpl.getDatatypeFactory().newDuration(lexical.toString()); + } + }); + primaryList.add( +@@ -876,21 +875,6 @@ + } + } + +- +- /** +- * Cached instance of {@link DatatypeFactory} to create +- * {@link XMLGregorianCalendar} and {@link Duration}. +- */ +- private static final DatatypeFactory datatypeFactory = init(); +- +- private static DatatypeFactory init() { +- try { +- return DatatypeFactory.newInstance(); +- } catch (DatatypeConfigurationException e) { +- throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e); +- } +- } +- + private static void checkXmlGregorianCalendarFieldRef(QName type, + XMLGregorianCalendar cal)throws javax.xml.bind.MarshalException{ + StringBuilder buf = new StringBuilder(); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -42,7 +42,6 @@ + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException; + import com.sun.xml.internal.bind.v2.runtime.Transducer; + import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; +@@ -122,7 +121,7 @@ + } + + public Class getType() { +- return Navigator.REFLECTION.erasure(super.getType()); ++ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(super.getType()); + } + + public RuntimeClassInfo getScope() { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,8 +37,6 @@ + import com.sun.xml.internal.bind.v2.model.annotation.Locatable; + import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; + import com.sun.xml.internal.bind.v2.model.core.ID; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; +-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; +@@ -75,7 +73,7 @@ + public final @Nullable JAXBContextImpl context; + + public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map subclassReplacements, String defaultNamespaceRemap) { +- super(annotationReader, Navigator.REFLECTION, subclassReplacements, defaultNamespaceRemap); ++ super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap); + this.context = context; + } + +@@ -109,10 +107,6 @@ + return new RuntimeArrayInfoImpl(this, upstream, (Class)arrayType); + } + +- public ReflectionNavigator getNavigator() { +- return (ReflectionNavigator)nav; +- } +- + @Override + protected RuntimeTypeInfoSetImpl createTypeInfoSet() { + return new RuntimeTypeInfoSetImpl(reader); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -34,9 +34,6 @@ + + import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader; + import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet; +-import com.sun.xml.internal.bind.v2.model.core.NonElement; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; +-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; + +@@ -47,7 +44,7 @@ + */ + final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl implements RuntimeTypeInfoSet { + public RuntimeTypeInfoSetImpl(AnnotationReader reader) { +- super(Navigator.REFLECTION,reader,RuntimeBuiltinLeafInfoImpl.LEAVES); ++ super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES); + } + + @Override +@@ -55,10 +52,6 @@ + return RuntimeAnyTypeImpl.theInstance; + } + +- public ReflectionNavigator getNavigator() { +- return (ReflectionNavigator)super.getNavigator(); +- } +- + public RuntimeNonElement getTypeInfo( Type type ) { + return (RuntimeNonElement)super.getTypeInfo(type); + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.bind.v2.model.impl; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -240,10 +240,6 @@ + */ + T getComponentType(T t); + +- +- /** The singleton instance. */ +- public static final ReflectionNavigator REFLECTION = new ReflectionNavigator(); +- + /** + * Gets the i-th type argument from a parameterized type. + * +@@ -357,14 +353,14 @@ + String getPackageName(C clazz); + + /** +- * Finds the class/interface/enum/annotation of the given name. ++ * Finds ObjectFactory for the given referencePoint. + * + * @param referencePoint + * The class that refers to the specified class. + * @return + * null if not found. + */ +- C findClass(String className, C referencePoint); ++ C loadObjectFactory(C referencePoint, String packageName); + + /** + * Returns true if this method is a bridge method as defined in JLS. +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,16 +44,19 @@ + * {@link Navigator} implementation for {@code java.lang.reflect}. + * + */ +-public final class ReflectionNavigator implements Navigator { ++/*package*/final class ReflectionNavigator implements Navigator { + +- /** +- * Singleton. +- * +- * Use {@link Navigator#REFLECTION} +- */ +- ReflectionNavigator() { ++// ---------- Singleton ----------------- ++ private static final ReflectionNavigator INSTANCE = new ReflectionNavigator(); ++ ++ /*package*/static ReflectionNavigator getInstance() { // accessible through reflection from Utils classes ++ return INSTANCE; + } + ++ private ReflectionNavigator() { ++ } ++// --------------------------------------- ++ + public Class getSuperClass(Class clazz) { + if (clazz == Object.class) { + return null; +@@ -64,6 +67,7 @@ + } + return sc; + } ++ + private static final TypeVisitor baseClassFinder = new TypeVisitor() { + + public Type onClass(Class c, Class sup) { +@@ -496,7 +500,7 @@ + c.getDeclaredConstructor(); + return true; + } catch (NoSuchMethodException e) { +- return false; ++ return false; // todo: do this WITHOUT exception throw + } + } + +@@ -544,13 +548,15 @@ + } + } + +- public Class findClass(String className, Class referencePoint) { ++ @Override ++ public Class loadObjectFactory(Class referencePoint, String pkg) { ++ String clName = pkg + ".ObjectFactory"; ++ ClassLoader cl = referencePoint.getClassLoader(); ++ if (cl == null) ++ cl = ClassLoader.getSystemClassLoader(); ++ + try { +- ClassLoader cl = referencePoint.getClassLoader(); +- if (cl == null) { +- cl = ClassLoader.getSystemClassLoader(); +- } +- return cl.loadClass(className); ++ return cl.loadClass(clName); + } catch (ClassNotFoundException e) { + return null; + } +@@ -569,7 +575,7 @@ + // class Base { + // T getX() { ... } + // } +- // to be overrided. Handling this correctly needs a careful implementation ++ // to be overriden. Handling this correctly needs a careful implementation + + String name = method.getName(); + Class[] params = method.getParameterTypes(); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,8 +33,6 @@ + import javax.xml.namespace.QName; + + import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet; +-import com.sun.xml.internal.bind.v2.model.core.NonElement; +-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; + + /** + * {@link TypeInfoSet} refined for runtime. +@@ -52,5 +50,4 @@ + RuntimeElementInfo getElementInfo( Class scope, QName name ); + Map getElementMappings( Class scope ); + Iterable getAllElements(); +- ReflectionNavigator getNavigator(); + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -36,7 +36,6 @@ + + import com.sun.xml.internal.bind.api.AccessorException; + import com.sun.xml.internal.bind.v2.model.core.PropertyKind; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; + import com.sun.xml.internal.bind.v2.runtime.property.Property; +@@ -81,10 +80,10 @@ + this.property = PropertyFactory.create(grammar,rei.getProperty()); + + tagName = rei.getElementName(); +- expectedType = Navigator.REFLECTION.erasure(rei.getContentInMemoryType()); ++ expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType()); + scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz(); + +- Class type = Navigator.REFLECTION.erasure(rei.getType()); ++ Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType()); + if(type==JAXBElement.class) + constructor = null; + else { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -90,7 +90,6 @@ + import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl; + import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; + import com.sun.xml.internal.bind.v2.model.nav.Navigator; +-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo; +@@ -358,7 +357,7 @@ + beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) ); + + // build bridges +- ReflectionNavigator nav = typeSet.getNavigator(); ++ Navigator nav = typeSet.getNavigator(); + + for (TypeReference tr : typeRefs) { + XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class); +@@ -366,7 +365,7 @@ + XmlList xl = tr.get(XmlList.class); + + // eventually compute the in-memory type +- Class erasedType = nav.erasure(tr.type); ++ Class erasedType = (Class) nav.erasure(tr.type); + + if(xjta!=null) { + a = new Adapter(xjta.value(),nav); +@@ -377,7 +376,7 @@ + } + + if(a!=null) { +- erasedType = nav.erasure(a.defaultType); ++ erasedType = (Class) nav.erasure(a.defaultType); + } + + Name name = nameBuilder.createElementName(tr.tagName); +@@ -873,7 +872,7 @@ + // this is a special class we introduced for JAX-WS that we *don't* want in the schema + } else { + NonElement typeInfo = getXmlType(tis,tr); +- xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type),typeInfo); ++ xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo); + } + } + return xsdgen; +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.bind.v2.runtime; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -33,7 +33,6 @@ + + import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; + import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; +-import com.sun.xml.internal.bind.v2.util.ClassLoaderRetriever; + + import org.xml.sax.SAXException; + +@@ -153,7 +152,6 @@ + } + } + +- + /** + * Reference to FI's XMLStreamWriter class, if FI can be loaded. + */ +@@ -162,9 +160,8 @@ + + private static Class initFIStAXWriterClass() { + try { +- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); +- Class llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter", true, loader); +- Class sds = loader.loadClass("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer"); ++ Class llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter"); ++ Class sds = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer"); + // Check if StAXDocumentSerializer implements LowLevelFastInfosetStreamWriter + if (llfisw.isAssignableFrom(sds)) + return sds; +@@ -179,8 +176,7 @@ + try { + if (FI_STAX_WRITER_CLASS == null) + return null; +- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); +- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput", true, loader); ++ Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput"); + return c.getConstructor(FI_STAX_WRITER_CLASS, JAXBContextImpl.class); + } catch (Throwable e) { + return null; +@@ -195,8 +191,7 @@ + + private static Class initStAXExWriterClass() { + try { +- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); +- return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx",true,loader); ++ return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx"); + } catch (Throwable e) { + return null; + } +@@ -204,8 +199,7 @@ + + private static Constructor initStAXExOutputClass() { + try { +- ClassLoader loader = ClassLoaderRetriever.getClassLoader(); +- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput",true, loader); ++ Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput"); + return c.getConstructor(STAXEX_WRITER_CLASS); + } catch (Throwable e) { + return null; +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,6 @@ + + + import com.sun.xml.internal.bind.api.AccessorException; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; + import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; + import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; +@@ -49,7 +48,7 @@ + + assert prop.isCollection(); + lister = Lister.create( +- Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),prop.getAdapter()); ++ Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()),prop.id(),prop.getAdapter()); + assert lister!=null; + acc = prop.getAccessor().optimize(context); + assert acc!=null; +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -42,7 +42,6 @@ + import com.sun.xml.internal.bind.v2.ClassFactory; + import com.sun.xml.internal.bind.v2.util.QNameMap; + import com.sun.xml.internal.bind.v2.model.core.PropertyKind; +-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo; + import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; + import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo; +@@ -98,7 +97,8 @@ + this.valueBeanInfo = context.getOrCreate(prop.getValueType()); + + // infer the implementation class +- Class sig = ReflectionNavigator.REFLECTION.erasure(prop.getRawType()); ++ //noinspection unchecked ++ Class sig = (Class) Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()); + mapImplClass = ClassFactory.inferImplClass(sig,knownImplClasses); + // TODO: error check for mapImplClass==null + // what is the error reporting path for this part of the code? +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.bind.v2.runtime.property; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java 2013-09-06 11:23:58.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -48,7 +48,6 @@ + import com.sun.xml.internal.bind.api.JAXBRIContext; + import com.sun.xml.internal.bind.v2.model.core.Adapter; + import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; + import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory; + import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader; +@@ -193,7 +192,7 @@ + + public final Accessor adapt(Adapter adapter) { + return new AdaptedAccessor( +- (Class) Navigator.REFLECTION.erasure(adapter.defaultType), ++ (Class) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType), + this, + adapter.adapterType); + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java 2013-09-06 11:23:59.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -51,7 +51,6 @@ + import com.sun.xml.internal.bind.v2.TODO; + import com.sun.xml.internal.bind.v2.model.core.Adapter; + import com.sun.xml.internal.bind.v2.model.core.ID; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.runtime.XMLSerializer; + import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher; + import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext; +@@ -116,7 +115,7 @@ + public static + Lister create(Type fieldType,ID idness, Adapter adapter) { + +- Class rawType = Navigator.REFLECTION.erasure(fieldType); ++ Class rawType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(fieldType); + Class itemType; + + Lister l; +@@ -125,9 +124,9 @@ + l = getArrayLister(itemType); + } else + if( Collection.class.isAssignableFrom(rawType) ) { +- Type bt = Navigator.REFLECTION.getBaseClass(fieldType,Collection.class); ++ Type bt = Utils.REFLECTION_NAVIGATOR.getBaseClass(fieldType,Collection.class); + if(bt instanceof ParameterizedType) +- itemType = Navigator.REFLECTION.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]); ++ itemType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]); + else + itemType = Object.class; + l = new CollectionLister(getImplClass(rawType)); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java 2013-09-06 11:23:59.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -39,7 +39,6 @@ + import com.sun.xml.internal.bind.api.AccessorException; + import com.sun.xml.internal.bind.v2.model.core.ID; + import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef; + import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo; + import com.sun.xml.internal.bind.v2.runtime.Name; +@@ -144,8 +143,7 @@ + + if(prop.isCollection()) { + return new ListTransducedAccessorImpl(xducer,prop.getAccessor(), +- Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(), +- prop.getAdapter())); ++ Lister.create(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter())); + } + + if(prop.id()==ID.IDREF) +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.bind.v2.runtime.reflect; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java 2013-09-06 11:23:59.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -33,7 +33,6 @@ + import javax.xml.stream.XMLStreamReader; + + import com.sun.xml.internal.bind.WhiteSpaceProcessor; +-import com.sun.xml.internal.bind.v2.util.ClassLoaderRetriever; + + import org.xml.sax.Attributes; + import org.xml.sax.SAXException; +@@ -337,9 +336,8 @@ + + private static Class initFIStAXReaderClass() { + try { +- ClassLoader cl = getClassLoader(); +- Class fisr = cl.loadClass("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader"); +- Class sdp = cl.loadClass("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser"); ++ Class fisr = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader"); ++ Class sdp = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser"); + // Check if StAXDocumentParser implements FastInfosetStreamReader + if (fisr.isAssignableFrom(sdp)) + return sdp; +@@ -355,7 +353,7 @@ + if (FI_STAX_READER_CLASS == null) + return null; + +- Class c = getClassLoader().loadClass( ++ Class c = Class.forName( + "com.sun.xml.internal.bind.v2.runtime.unmarshaller.FastInfosetConnector"); + return c.getConstructor(FI_STAX_READER_CLASS,XmlVisitor.class); + } catch (Throwable e) { +@@ -371,7 +369,7 @@ + + private static Class initStAXExReader() { + try { +- return getClassLoader().loadClass("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx"); ++ return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx"); + } catch (Throwable e) { + return null; + } +@@ -379,15 +377,10 @@ + + private static Constructor initStAXExConnector() { + try { +- Class c = getClassLoader().loadClass("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector"); ++ Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector"); + return c.getConstructor(STAX_EX_READER_CLASS,XmlVisitor.class); + } catch (Throwable e) { + return null; + } + } +- +- public static ClassLoader getClassLoader() { +- return ClassLoaderRetriever.getClassLoader(); +- } +- + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java 2013-09-06 11:24:01.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -62,61 +62,6 @@ + Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, + "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); + +- static { +- try { +- CommandMap map = CommandMap.getDefaultCommandMap(); +- if (map instanceof MailcapCommandMap) { +- MailcapCommandMap mailMap = (MailcapCommandMap) map; +- String hndlrStr = ";;x-java-content-handler="; +- mailMap.addMailcap( +- "text/xml" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); +- mailMap.addMailcap( +- "application/xml" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); +- mailMap.addMailcap( +- "application/fastinfoset" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler"); +- /* Image DataContentHandler handles all image types +- mailMap.addMailcap( +- "image/jpeg" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.JpegDataContentHandler"); +- mailMap.addMailcap( +- "image/gif" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.GifDataContentHandler"); */ +- /*mailMap.addMailcap( +- "multipart/*" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");*/ +- mailMap.addMailcap( +- "image/*" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler"); +- mailMap.addMailcap( +- "text/plain" +- + hndlrStr +- + "com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler"); +- } else { +- throw new SOAPExceptionImpl("Default CommandMap is not a MailcapCommandMap"); +- } +- } catch (Throwable t) { +- log.log( +- Level.SEVERE, +- "SAAJ0508.soap.cannot.register.handlers", +- t); +- if (t instanceof RuntimeException) { +- throw (RuntimeException) t; +- } else { +- throw new RuntimeException(t.getLocalizedMessage()); +- } +- } +- }; +- + private final MimeHeaders headers; + private MimeBodyPart rawContent = null; + private DataHandler dataHandler = null; +@@ -126,6 +71,12 @@ + + public AttachmentPartImpl() { + headers = new MimeHeaders(); ++ ++ // initialization from here should cover most of cases; ++ // if not, it would be necessary to call ++ // AttachmentPartImpl.initializeJavaActivationHandlers() ++ // explicitly by programmer ++ initializeJavaActivationHandlers(); + } + + public AttachmentPartImpl(MIMEPart part) { +@@ -263,7 +214,7 @@ + log.log( + Level.FINE, + "SAAJ0580.soap.set.Content-Type", +- new String[] { dataHandler.getContentType()}); ++ new String[] { dataHandler.getContentType() }); + setMimeHeader("Content-Type", dataHandler.getContentType()); + } + +@@ -405,7 +356,7 @@ + throw new SOAPExceptionImpl(e.getLocalizedMessage()); + } finally { + try { +- decoded.close(); ++ decoded.close(); + } catch (IOException ex) { + throw new SOAPException(ex); + } +@@ -608,4 +559,43 @@ + return headers; + } + +-} ++ public static void initializeJavaActivationHandlers() { ++ // DataHandler.writeTo() may search for DCH. So adding some default ones. ++ try { ++ CommandMap map = CommandMap.getDefaultCommandMap(); ++ if (map instanceof MailcapCommandMap) { ++ MailcapCommandMap mailMap = (MailcapCommandMap) map; ++ ++ // registering our DCH since javamail's DCH doesn't handle ++ if (!cmdMapInitialized(mailMap)) { ++ mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); ++ mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"); ++ mailMap.addMailcap("application/fastinfoset;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler"); ++ mailMap.addMailcap("multipart/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler"); ++ mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler"); ++ mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler"); ++ } ++ } ++ } catch (Throwable t) { ++ // ignore the exception. ++ } ++ } ++ ++ private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { ++ ++ // checking fastinfoset handler, since this one is specific to SAAJ ++ CommandInfo[] commands = mailMap.getAllCommands("application/fastinfoset"); ++ if (commands == null || commands.length == 0) { ++ return false; ++ } ++ ++ String saajClassName = "com.sun.xml.internal.ws.binding.FastInfosetDataContentHandler"; ++ for (CommandInfo command : commands) { ++ String commandClass = command.getCommandClass(); ++ if (saajClassName.equals(commandClass)) { ++ return true; ++ } ++ } ++ return false; ++ } ++} +\ No newline at end of file +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.messaging.saaj.soap; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for StaticCache utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java 2013-09-06 11:24:01.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,14 @@ + + package com.sun.xml.internal.messaging.saaj.soap; + +-import java.util.logging.Logger; ++import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; ++import com.sun.xml.internal.messaging.saaj.util.JAXMStreamSource; ++import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants; ++import com.sun.xml.internal.messaging.saaj.util.ParserPool; ++import com.sun.xml.internal.messaging.saaj.util.RejectDoctypeSaxFilter; ++import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer; ++import org.xml.sax.InputSource; ++import org.xml.sax.XMLReader; + + import javax.xml.parsers.SAXParser; + import javax.xml.soap.SOAPException; +@@ -34,14 +41,7 @@ + import javax.xml.transform.dom.DOMResult; + import javax.xml.transform.sax.SAXSource; + import javax.xml.transform.stream.StreamSource; +- +-import org.xml.sax.InputSource; +-import org.xml.sax.XMLReader; +- +-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl; +-import com.sun.xml.internal.messaging.saaj.util.*; +- +-import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer; ++import java.util.logging.Logger; + + /** + * EnvelopeFactory creates SOAP Envelope objects using different +@@ -50,14 +50,19 @@ + public class EnvelopeFactory { + + protected static final Logger +- log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, +- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); ++ log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN, ++ "com.sun.xml.internal.messaging.saaj.soap.LocalStrings"); + +- private static ParserPool parserPool = new ParserPool(5); ++ private static ContextClassloaderLocal parserPool = ++ new ContextClassloaderLocal() { ++ @Override ++ protected ParserPool initialValue() throws Exception { ++ return new ParserPool(5); ++ } ++ }; + + public static Envelope createEnvelope(Source src, SOAPPartImpl soapPart) +- throws SOAPException +- { ++ throws SOAPException { + // Insert SAX filter to disallow Document Type Declarations since + // they are not legal in SOAP + SAXParser saxParser = null; +@@ -73,15 +78,15 @@ + } + } + try { +- saxParser = parserPool.get(); ++ saxParser = parserPool.get().get(); + } catch (Exception e) { + log.severe("SAAJ0601.util.newSAXParser.exception"); + throw new SOAPExceptionImpl( +- "Couldn't get a SAX parser while constructing a envelope", +- e); ++ "Couldn't get a SAX parser while constructing a envelope", ++ e); + } + InputSource is = SAXSource.sourceToInputSource(src); +- if (is.getEncoding()== null && soapPart.getSourceCharsetEncoding() != null) { ++ if (is.getEncoding() == null && soapPart.getSourceCharsetEncoding() != null) { + is.setEncoding(soapPart.getSourceCharsetEncoding()); + } + XMLReader rejectFilter; +@@ -90,15 +95,15 @@ + } catch (Exception ex) { + log.severe("SAAJ0510.soap.cannot.create.envelope"); + throw new SOAPExceptionImpl( +- "Unable to create envelope from given source: ", +- ex); ++ "Unable to create envelope from given source: ", ++ ex); + } + src = new SAXSource(rejectFilter, is); + } + + try { + Transformer transformer = +- EfficientStreamingTransformer.newTransformer(); ++ EfficientStreamingTransformer.newTransformer(); + DOMResult result = new DOMResult(soapPart); + transformer.transform(src, result); + +@@ -110,11 +115,11 @@ + } + log.severe("SAAJ0511.soap.cannot.create.envelope"); + throw new SOAPExceptionImpl( +- "Unable to create envelope from given source: ", +- ex); ++ "Unable to create envelope from given source: ", ++ ex); + } finally { + if (saxParser != null) { +- parserPool.returnParser(saxParser); ++ parserPool.get().returnParser(saxParser); + } + } + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java 2013-09-06 11:24:01.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2013, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/TempFiles.java 2013-09-06 11:24:01.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/TempFiles.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.stream.buffer; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java 2013-09-06 11:24:03.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -370,7 +370,12 @@ + writeTo(handler, errorHandler, isFragment()); + } + +- private static final TransformerFactory trnsformerFactory = TransformerFactory.newInstance(); ++ private static final ContextClassloaderLocal trnsformerFactory = new ContextClassloaderLocal() { ++ @Override ++ protected TransformerFactory initialValue() throws Exception { ++ return TransformerFactory.newInstance(); ++ } ++ }; + + /** + * Writes out the contents of this buffer as DOM node and append that to the given node. +@@ -382,7 +387,7 @@ + */ + public final Node writeTo(Node n) throws XMLStreamBufferException { + try { +- Transformer t = trnsformerFactory.newTransformer(); ++ Transformer t = trnsformerFactory.get().newTransformer(); + t.transform(new XMLStreamBufferSource(this), new DOMResult(n)); + return n.getLastChild(); + } catch (TransformerException e) { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java 2013-09-06 11:24:04.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java 2013-12-01 11:13:43.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -232,7 +232,7 @@ + public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException { + T t = resolve(p); + try { +- return m.invoke(t, args ); ++ return MethodUtil.invoke(t, m, args ); + } finally { + postInvoke(p,t); + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java 2013-12-01 11:13:43.000000000 -0800 +@@ -0,0 +1,94 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.api.server; ++ ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks ++ * to java.lang,reflect.Method.invoke() ++ * ++ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! ++ */ ++class MethodUtil { ++ ++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); ++ private static final Method INVOKE_METHOD; ++ ++ static { ++ Method method; ++ try { ++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); ++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); ++ } ++ } catch (Throwable t) { ++ method = null; ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); ++ } ++ } ++ INVOKE_METHOD = method; ++ } ++ ++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { ++ if (INVOKE_METHOD != null) { ++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); ++ } ++ try { ++ return INVOKE_METHOD.invoke(null, method, target, args); ++ } catch (InvocationTargetException ite) { ++ // unwrap invocation exception added by reflection code ... ++ throw unwrapException(ite); ++ } ++ } else { ++ // other then Oracle JDK ... ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); ++ } ++ return method.invoke(target, args); ++ } ++ } ++ ++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { ++ Throwable targetException = ite.getTargetException(); ++ if (targetException != null && targetException instanceof InvocationTargetException) { ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); ++ } ++ return (InvocationTargetException) targetException; ++ } else { ++ return ite; ++ } ++ } ++ ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.api.streaming; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java 2013-09-06 11:24:04.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -61,29 +61,32 @@ + /** + * Singleton instance. + */ +- private static volatile @NotNull XMLStreamReaderFactory theInstance; ++ private static volatile ContextClassloaderLocal streamReader = ++ new ContextClassloaderLocal() { + +- static { +- XMLInputFactory xif = getXMLInputFactory(); +- XMLStreamReaderFactory f=null; ++ @Override ++ protected XMLStreamReaderFactory initialValue() { ++ XMLInputFactory xif = getXMLInputFactory(); ++ XMLStreamReaderFactory f=null; + +- // this system property can be used to disable the pooling altogether, +- // in case someone hits an issue with pooling in the production system. +- if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) +- f = Zephyr.newInstance(xif); ++ // this system property can be used to disable the pooling altogether, ++ // in case someone hits an issue with pooling in the production system. ++ if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) ++ f = Zephyr.newInstance(xif); + +- if(f==null) { +- // is this Woodstox? +- if(xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) +- f = new Woodstox(xif); +- } ++ if(f==null) { ++ // is this Woodstox? ++ if(xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) ++ f = new Woodstox(xif); ++ } + +- if(f==null) +- f = new Default(); ++ if(f==null) ++ f = new Default(); + +- theInstance = f; +- LOGGER.fine("XMLStreamReaderFactory instance is = "+theInstance); +- } ++ LOGGER.fine("XMLStreamReaderFactory instance is = "+f); ++ return f; ++ } ++ }; + + private static XMLInputFactory getXMLInputFactory() { + XMLInputFactory xif = null; +@@ -109,11 +112,11 @@ + */ + public static void set(XMLStreamReaderFactory f) { + if(f==null) throw new IllegalArgumentException(); +- theInstance = f; ++ streamReader.set(f); + } + + public static XMLStreamReaderFactory get() { +- return theInstance; ++ return streamReader.get(); + } + + public static XMLStreamReader create(InputSource source, boolean rejectDTDs) { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java 2013-09-06 11:24:04.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -57,39 +57,41 @@ + /** + * Singleton instance. + */ +- private static volatile @NotNull XMLStreamWriterFactory theInstance; ++ private static volatile ContextClassloaderLocal writerFactory = ++ new ContextClassloaderLocal() { + +- +- static { +- XMLOutputFactory xof = null; +- if (Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".woodstox")) { +- try { +- xof = (XMLOutputFactory)Class.forName("com.ctc.wstx.stax.WstxOutputFactory").newInstance(); +- } catch (Exception e) { +- // Ignore and fallback to default XMLOutputFactory ++ @Override ++ protected XMLStreamWriterFactory initialValue() { ++ XMLOutputFactory xof = null; ++ if (Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".woodstox")) { ++ try { ++ xof = (XMLOutputFactory)Class.forName("com.ctc.wstx.stax.WstxOutputFactory").newInstance(); ++ } catch (Exception e) { ++ // Ignore and fallback to default XMLOutputFactory ++ } ++ } ++ if (xof == null) { ++ xof = XMLOutputFactory.newInstance(); + } +- } +- if (xof == null) { +- xof = XMLOutputFactory.newInstance(); +- } + +- XMLStreamWriterFactory f=null; ++ XMLStreamWriterFactory f=null; + +- // this system property can be used to disable the pooling altogether, +- // in case someone hits an issue with pooling in the production system. +- if(!Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".noPool")) +- f = Zephyr.newInstance(xof); +- if(f==null) { +- // is this Woodstox? +- if(xof.getClass().getName().equals("com.ctc.wstx.stax.WstxOutputFactory")) +- f = new NoLock(xof); +- } +- if (f == null) +- f = new Default(xof); ++ // this system property can be used to disable the pooling altogether, ++ // in case someone hits an issue with pooling in the production system. ++ if(!Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".noPool")) ++ f = Zephyr.newInstance(xof); ++ if(f==null) { ++ // is this Woodstox? ++ if(xof.getClass().getName().equals("com.ctc.wstx.stax.WstxOutputFactory")) ++ f = new NoLock(xof); ++ } ++ if (f == null) ++ f = new Default(xof); + +- theInstance = f; +- LOGGER.fine("XMLStreamWriterFactory instance is = "+theInstance); +- } ++ LOGGER.fine("XMLStreamWriterFactory instance is = "+ f); ++ return f; ++ } ++ }; + + /** + * See {@link #create(OutputStream)} for the contract. +@@ -152,7 +154,7 @@ + * Gets the singleton instance. + */ + public static @NotNull XMLStreamWriterFactory get() { +- return theInstance; ++ return writerFactory.get(); + } + + /** +@@ -164,7 +166,7 @@ + */ + public static void set(@NotNull XMLStreamWriterFactory f) { + if(f==null) throw new IllegalArgumentException(); +- theInstance = f; ++ writerFactory.set(f); + } + + /** +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java 2013-09-06 11:24:04.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,9 @@ + import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; + import com.sun.xml.internal.ws.developer.BindingTypeFeature; + ++import javax.activation.CommandInfo; ++import javax.activation.CommandMap; ++import javax.activation.MailcapCommandMap; + import javax.xml.ws.Service; + import javax.xml.ws.WebServiceFeature; + import javax.xml.ws.soap.AddressingFeature; +@@ -109,9 +112,15 @@ + return addressingVersion; + } + +- public final + @NotNull +- Codec createCodec() { ++ public final Codec createCodec() { ++ ++ // initialization from here should cover most of cases; ++ // if not, it would be necessary to call ++ // BindingImpl.initializeJavaActivationHandlers() ++ // explicitly by programmer ++ initializeJavaActivationHandlers(); ++ + return bindingId.createEncoder(this); + } + +@@ -169,4 +178,48 @@ + public void addFeature(@NotNull WebServiceFeature newFeature) { + features.add(newFeature); + } ++ ++ public static void initializeJavaActivationHandlers() { ++ // DataHandler.writeTo() may search for DCH. So adding some default ones. ++ try { ++ CommandMap map = CommandMap.getDefaultCommandMap(); ++ if (map instanceof MailcapCommandMap) { ++ MailcapCommandMap mailMap = (MailcapCommandMap) map; ++ ++ // registering our DCH since javamail's DCH doesn't handle ++ if (!cmdMapInitialized(mailMap)) { ++ mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.ws.encoding.XmlDataContentHandler"); ++ mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.ws.encoding.XmlDataContentHandler"); ++ mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.ws.encoding.ImageDataContentHandler"); ++ mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.ws.encoding.StringDataContentHandler"); ++ } ++ } ++ } catch (Throwable t) { ++ // ignore the exception. ++ } ++ } ++ ++ private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { ++ CommandInfo[] commands = mailMap.getAllCommands("text/xml"); ++ if (commands == null || commands.length == 0) { ++ return false; ++ } ++ ++ // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; ++ // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers ++ // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here ++ // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. ++ // This is also reason for duplication of Handler's code by JAX-WS ++ String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; ++ String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; ++ for (CommandInfo command : commands) { ++ String commandClass = command.getCommandClass(); ++ if (saajClassName.equals(commandClass) || ++ jaxwsClassName.equals(commandClass)) { ++ return true; ++ } ++ } ++ return false; ++ } ++ + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java 2013-09-06 11:24:05.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java 2014-06-06 19:56:15.000000000 -0700 +@@ -22,6 +22,7 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ ++ + package com.sun.xml.internal.ws.client; + + import com.sun.istack.internal.NotNull; +@@ -140,8 +141,8 @@ + /** + * Information about SEI, keyed by their interface type. + */ +- // private final Map seiContext = new HashMap(); +- private final Map seiContext = new HashMap(); ++ // private final Map seiContext = new HashMap(); ++ private final Map seiContext = new HashMap(); + + // This executor is used for all the async invocations for all proxies + // created from this service. But once the proxy is created, then changing +@@ -166,8 +167,8 @@ + + public WSServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass) { + this( +- wsdlDocumentLocation==null ? null : new StreamSource(wsdlDocumentLocation.toExternalForm()), +- serviceName,serviceClass); ++ wsdlDocumentLocation==null ? null : new StreamSource(wsdlDocumentLocation.toExternalForm()), ++ serviceName,serviceClass); + } + + /** +@@ -204,10 +205,10 @@ + if(wsdl == null){ + if(serviceClass != Service.class){ + WebServiceClient wsClient = AccessController.doPrivileged(new PrivilegedAction() { +- public WebServiceClient run() { +- return serviceClass.getAnnotation(WebServiceClient.class); +- } +- }); ++ public WebServiceClient run() { ++ return serviceClass.getAnnotation(WebServiceClient.class); ++ } ++ }); + String wsdlLocation = wsClient.wsdlLocation(); + wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); + wsdl = new StreamSource(wsdlLocation); +@@ -221,8 +222,8 @@ + service = model.getService(this.serviceName); + if (service == null) + throw new WebServiceException( +- ClientMessages.INVALID_SERVICE_NAME(this.serviceName, +- buildNameList(model.getServices().keySet()))); ++ ClientMessages.INVALID_SERVICE_NAME(this.serviceName, ++ buildNameList(model.getServices().keySet()))); + // fill in statically known ports + for (WSDLPortImpl port : service.getPorts()) + ports.put(port.getName(), new PortInfo(this, port)); +@@ -255,7 +256,7 @@ + private WSDLModelImpl parseWSDL(URL wsdlDocumentLocation, Source wsdlSource) { + try { + return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createDefaultCatalogResolver(), +- true, getContainer(), ServiceFinder.find(WSDLParserExtension.class).toArray()); ++ true, getContainer(), ServiceFinder.find(WSDLParserExtension.class).toArray()); + } catch (IOException e) { + throw new WebServiceException(e); + } catch (XMLStreamException e) { +@@ -345,7 +346,7 @@ + //get the first port corresponding to the SEI + WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName); + if (port == null) +- throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); ++ throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); + QName portName = port.getName(); + return getPort(portName, portInterface,features); + } +@@ -431,8 +432,8 @@ + binding.setMode(mode); + Dispatch dispatch = Stubs.createJAXBDispatch( + port, binding, jaxbContext, mode,wsepr); +- serviceInterceptor.postCreateDispatch((WSBindingProvider)dispatch); +- return dispatch; ++ serviceInterceptor.postCreateDispatch((WSBindingProvider)dispatch); ++ return dispatch; + } + + @Override +@@ -583,7 +584,7 @@ + + if (wsdlService.get(portName)==null) { + throw new WebServiceException( +- ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames())); ++ ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames())); + } + + BindingImpl binding = eif.createBinding(webServiceFeatures,portInterface); +@@ -681,7 +682,7 @@ + return wsdlService; + } + +- class DaemonThreadFactory implements ThreadFactory { ++ class DaemonThreadFactory implements ThreadFactory { + public Thread newThread(Runnable r) { + Thread daemonThread = new Thread(r); + daemonThread.setDaemon(Boolean.TRUE); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java 2013-12-01 11:13:43.000000000 -0800 +@@ -0,0 +1,94 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.client.sei; ++ ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks ++ * to java.lang,reflect.Method.invoke() ++ *

++ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! ++ */ ++class MethodUtil { ++ ++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); ++ private static final Method INVOKE_METHOD; ++ ++ static { ++ Method method; ++ try { ++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); ++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); ++ } ++ } catch (Throwable t) { ++ method = null; ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); ++ } ++ } ++ INVOKE_METHOD = method; ++ } ++ ++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { ++ if (INVOKE_METHOD != null) { ++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); ++ } ++ try { ++ return INVOKE_METHOD.invoke(null, method, target, args); ++ } catch (InvocationTargetException ite) { ++ // unwrap invocation exception added by reflection code ... ++ throw unwrapException(ite); ++ } ++ } else { ++ // other then Oracle JDK ... ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); ++ } ++ return method.invoke(target, args); ++ } ++ } ++ ++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { ++ Throwable targetException = ite.getTargetException(); ++ if (targetException != null && targetException instanceof InvocationTargetException) { ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); ++ } ++ return (InvocationTargetException) targetException; ++ } else { ++ return ite; ++ } ++ } ++ ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java 2013-09-06 11:24:05.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java 2013-12-01 11:13:43.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,17 +28,20 @@ + import com.sun.istack.internal.NotNull; + import com.sun.istack.internal.Nullable; + import com.sun.xml.internal.ws.api.SOAPVersion; +-import com.sun.xml.internal.ws.api.client.WSPortInfo; + import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; ++import com.sun.xml.internal.ws.api.client.WSPortInfo; + import com.sun.xml.internal.ws.api.message.Header; + import com.sun.xml.internal.ws.api.message.Headers; + import com.sun.xml.internal.ws.api.message.Packet; + import com.sun.xml.internal.ws.api.model.MEP; + import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; +-import com.sun.xml.internal.ws.api.pipe.Tube; + import com.sun.xml.internal.ws.api.pipe.Fiber; ++import com.sun.xml.internal.ws.api.pipe.Tube; + import com.sun.xml.internal.ws.binding.BindingImpl; +-import com.sun.xml.internal.ws.client.*; ++import com.sun.xml.internal.ws.client.RequestContext; ++import com.sun.xml.internal.ws.client.ResponseContextReceiver; ++import com.sun.xml.internal.ws.client.Stub; ++import com.sun.xml.internal.ws.client.WSServiceDelegate; + import com.sun.xml.internal.ws.model.JavaMethodImpl; + import com.sun.xml.internal.ws.model.SOAPSEIModel; + import com.sun.xml.internal.ws.wsdl.OperationDispatcher; +@@ -47,6 +50,8 @@ + import java.lang.reflect.InvocationHandler; + import java.lang.reflect.InvocationTargetException; + import java.lang.reflect.Method; ++import java.lang.reflect.Modifier; ++import java.lang.reflect.Proxy; + import java.util.HashMap; + import java.util.Map; + +@@ -124,13 +129,14 @@ + private final Map methodHandlers = new HashMap(); + + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { ++ validateInputs(proxy, method); + MethodHandler handler = methodHandlers.get(method); + if (handler != null) { + return handler.invoke(proxy, args); + } else { + // we handle the other method invocations by ourselves + try { +- return method.invoke(this, args); ++ return MethodUtil.invoke(this, method, args); + } catch (IllegalAccessException e) { + // impossible + throw new AssertionError(e); +@@ -142,6 +148,17 @@ + } + } + ++ private void validateInputs(Object proxy, Method method) { ++ if (proxy == null || !Proxy.isProxyClass(proxy.getClass())) { ++ throw new IllegalStateException("Passed object is not proxy!"); ++ } ++ Class declaringClass = method.getDeclaringClass(); ++ if (method == null || declaringClass == null ++ || Modifier.isStatic(method.getModifiers())) { ++ throw new IllegalStateException("Invoking static method is not allowed!"); ++ } ++ } ++ + public final Packet doProcess(Packet request, RequestContext rc, ResponseContextReceiver receiver) { + return super.process(request, rc, receiver); + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.developer; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java 2013-09-06 11:24:05.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -64,7 +64,12 @@ + @XmlType(name = "EndpointReferenceType", namespace = MemberSubmissionEndpointReference.MSNS) + public final class MemberSubmissionEndpointReference extends EndpointReference implements MemberSubmissionAddressingConstants { + +- private final static JAXBContext msjc = MemberSubmissionEndpointReference.getMSJaxbContext(); ++ private final static ContextClassloaderLocal msjc = new ContextClassloaderLocal() { ++ @Override ++ protected JAXBContext initialValue() throws Exception { ++ return MemberSubmissionEndpointReference.getMSJaxbContext(); ++ } ++ }; + + public MemberSubmissionEndpointReference() { + } +@@ -85,7 +90,7 @@ + throw new WebServiceException("Source parameter can not be null on constructor"); + + try { +- Unmarshaller unmarshaller = MemberSubmissionEndpointReference.msjc.createUnmarshaller(); ++ Unmarshaller unmarshaller = MemberSubmissionEndpointReference.msjc.get().createUnmarshaller(); + MemberSubmissionEndpointReference epr = unmarshaller.unmarshal(source,MemberSubmissionEndpointReference.class).getValue(); + + this.addr = epr.addr; +@@ -104,7 +109,7 @@ + + public void writeTo(Result result) { + try { +- Marshaller marshaller = MemberSubmissionEndpointReference.msjc.createMarshaller(); ++ Marshaller marshaller = MemberSubmissionEndpointReference.msjc.get().createMarshaller(); + //marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); + marshaller.marshal(this, result); + } catch (JAXBException e) { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java 2013-09-06 11:24:05.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -34,9 +34,6 @@ + import com.sun.xml.internal.ws.api.pipe.ContentType; + import com.sun.xml.internal.ws.developer.StreamingAttachmentFeature; + +-import javax.activation.CommandMap; +-import javax.activation.MailcapCommandMap; +-import javax.activation.DataContentHandler; + import java.io.IOException; + import java.io.InputStream; + import java.io.OutputStream; +@@ -62,33 +59,6 @@ + */ + abstract class MimeCodec implements Codec { + +- static { +- // DataHandler.writeTo() may search for DCH. So adding some default ones. +- try { +- CommandMap map = CommandMap.getDefaultCommandMap(); +- if (map instanceof MailcapCommandMap) { +- MailcapCommandMap mailMap = (MailcapCommandMap) map; +- String hndlrStr = ";;x-java-content-handler="; +- // registering our DCH since javamail's DCH doesn't handle +- // Source +- mailMap.addMailcap( +- "text/xml" + hndlrStr + XmlDataContentHandler.class.getName()); +- mailMap.addMailcap( +- "application/xml" + hndlrStr + XmlDataContentHandler.class.getName()); +- if (map.createDataContentHandler("image/*") == null) { +- mailMap.addMailcap( +- "image/*" + hndlrStr + ImageDataContentHandler.class.getName()); +- } +- if (map.createDataContentHandler("text/plain") == null) { +- mailMap.addMailcap( +- "text/plain" + hndlrStr + StringDataContentHandler.class.getName()); +- } +- } +- } catch (Throwable t) { +- // ignore the exception. +- } +- } +- + public static final String MULTIPART_RELATED_MIME_TYPE = "multipart/related"; + + private String boundary; +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java 2013-09-06 11:24:05.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -59,6 +59,12 @@ + import java.lang.reflect.Constructor; + import java.lang.reflect.Field; + import java.lang.reflect.Method; ++import java.lang.reflect.ReflectPermission; ++import java.security.AccessControlContext; ++import java.security.AccessController; ++import java.security.Permissions; ++import java.security.PrivilegedAction; ++import java.security.ProtectionDomain; + import java.util.Iterator; + import java.util.Map; + import java.util.logging.Level; +@@ -546,10 +552,40 @@ + // ignore + } + +- try { +- JAXB_CONTEXT = (JAXBRIContext)JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); +- } catch (JAXBException e) { +- throw new Error(e); // this must be a bug in our code ++ JAXB_CONTEXT = createJAXBContext(); ++ } ++ ++ private static JAXBRIContext createJAXBContext() { ++ ++ // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages ++ if (isJDKRuntime()) { ++ Permissions permissions = new Permissions(); ++ permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault")); ++ permissions.add(new ReflectPermission("suppressAccessChecks")); ++ return AccessController.doPrivileged( ++ new PrivilegedAction() { ++ @Override ++ public JAXBRIContext run() { ++ try { ++ return (JAXBRIContext) JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); ++ } catch (JAXBException e) { ++ throw new Error(e); ++ } ++ } ++ }, ++ new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)}) ++ ); ++ ++ } else { ++ try { ++ return (JAXBRIContext) JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); ++ } catch (JAXBException e) { ++ throw new Error(e); ++ } + } + } ++ ++ private static boolean isJDKRuntime() { ++ return SOAPFaultBuilder.class.getName().contains("internal"); ++ } + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 +28,6 @@ + import com.sun.istack.internal.NotNull; + import com.sun.xml.internal.bind.api.CompositeStructure; + import com.sun.xml.internal.bind.api.TypeReference; +-import com.sun.xml.internal.bind.v2.model.nav.Navigator; + import com.sun.xml.internal.ws.api.BindingID; + import com.sun.xml.internal.ws.api.SOAPVersion; + import com.sun.xml.internal.ws.api.model.ExceptionType; +@@ -735,7 +734,7 @@ + //set the actual type argument of Holder in the TypeReference + if (isHolder) { + if(clazzType==Holder.class){ +- clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); ++ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); + } + } + Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; +@@ -932,7 +931,7 @@ + //set the actual type argument of Holder in the TypeReference + if (isHolder) { + if (clazzType==Holder.class) +- clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); ++ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); + } + Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; + for (Annotation annotation : pannotations[pos]) { +@@ -1172,7 +1171,7 @@ + //set the actual type argument of Holder in the TypeReference + if (isHolder) { + if (clazzType==Holder.class) +- clazzType = Navigator.REFLECTION.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); ++ clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]); + } + + Mode paramMode = isHolder ? Mode.INOUT : Mode.IN; +@@ -1258,14 +1257,14 @@ + private Class getAsyncReturnType(Method method, Class returnType) { + if(Response.class.isAssignableFrom(returnType)){ + Type ret = method.getGenericReturnType(); +- return Navigator.REFLECTION.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]); ++ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]); + }else{ + Type[] types = method.getGenericParameterTypes(); + Class[] params = method.getParameterTypes(); + int i = 0; + for(Class cls : params){ + if(AsyncHandler.class.isAssignableFrom(cls)){ +- return Navigator.REFLECTION.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]); ++ return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]); + } + i++; + } +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java 2014-01-18 12:16:09.000000000 -0800 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.model; ++ ++import com.sun.xml.internal.bind.v2.model.nav.Navigator; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utils class. ++ * ++ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages. ++ * ++ * Has *package private* access to avoid inappropriate usage. ++ */ ++/* package */ final class Utils { ++ ++ private static final Logger LOGGER = Logger.getLogger(Utils.class.getName()); ++ ++ /** ++ * static ReflectionNavigator field to avoid usage of reflection every time we use it. ++ */ ++ /* package */ static final Navigator REFLECTION_NAVIGATOR; ++ ++ static { // we statically initializing REFLECTION_NAVIGATOR property ++ Class refNav = null; ++ try { ++ refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator"); ++ //noinspection unchecked ++ Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ getInstance.setAccessible(true); ++ //noinspection unchecked ++ REFLECTION_NAVIGATOR = (Navigator) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("Can't find ReflectionNavigator class"); ++ } catch (InvocationTargetException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception"); ++ } catch (NoSuchMethodException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance can't be found"); ++ } catch (IllegalAccessException e) { ++ e.printStackTrace(); ++ throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible"); ++ } catch (SecurityException e) { ++ LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e); ++ throw e; ++ } ++ } ++ ++ /** ++ * private constructor to avoid util class instantiating ++ */ ++ private Utils() { ++ } ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java 2014-01-18 12:16:09.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -61,7 +61,7 @@ + + private static final AbstractWrapperBeanGenerator RUNTIME_GENERATOR = + new RuntimeWrapperBeanGenerator(new RuntimeInlineAnnotationReader(), +- Navigator.REFLECTION, FIELD_FACTORY); ++ Utils.REFLECTION_NAVIGATOR, FIELD_FACTORY); + + private static final class RuntimeWrapperBeanGenerator extends AbstractWrapperBeanGenerator { + +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionSet.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionSet.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionValidationProcessor.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionValidationProcessor.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/ComplexAssertion.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/ComplexAssertion.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectiveAlternativeSelector.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectiveAlternativeSelector.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectivePolicyModifier.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectivePolicyModifier.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/NestedPolicy.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/NestedPolicy.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/Policy.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/Policy.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyAssertion.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyAssertion.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyConstants.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyConstants.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyException.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyException.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyIntersector.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyIntersector.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMap.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMap.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapExtender.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapExtender.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKey.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKey.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKeyHandler.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKeyHandler.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapMutator.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapMutator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMerger.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMerger.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyScope.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyScope.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicySubject.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicySubject.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/SimpleAssertion.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/SimpleAssertion.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/package-info.java 2013-09-06 11:24:06.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/package-info.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java 2013-12-01 11:13:43.000000000 -0800 +@@ -0,0 +1,92 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.policy.privateutil; ++ ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks ++ * to java.lang,reflect.Method.invoke() ++ */ ++class MethodUtil { ++ ++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); ++ private static final Method INVOKE_METHOD; ++ ++ static { ++ Method method; ++ try { ++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); ++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); ++ } ++ } catch (Throwable t) { ++ method = null; ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); ++ } ++ } ++ INVOKE_METHOD = method; ++ } ++ ++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { ++ if (INVOKE_METHOD != null) { ++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); ++ } ++ try { ++ return INVOKE_METHOD.invoke(null, method, target, args); ++ } catch (InvocationTargetException ite) { ++ // unwrap invocation exception added by reflection code ... ++ throw unwrapException(ite); ++ } ++ } else { ++ // other then Oracle JDK ... ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); ++ } ++ return method.invoke(target, args); ++ } ++ } ++ ++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { ++ Throwable targetException = ite.getTargetException(); ++ if (targetException != null && targetException instanceof InvocationTargetException) { ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); ++ } ++ return (InvocationTargetException) targetException; ++ } else { ++ return ite; ++ } ++ } ++ ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyLogger.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyLogger.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java 2013-12-01 11:13:43.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -282,13 +282,13 @@ + /** + * Reflection utilities wrapper + */ +- public static class Reflection { ++ static class Reflection { + private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtils.Reflection.class); + + /** + * Reflectively invokes specified method on the specified target + */ +- public static T invoke(final Object target, final String methodName, ++ static T invoke(final Object target, final String methodName, + final Class resultClass, final Object... parameters) throws RuntimePolicyUtilsException { + Class[] parameterTypes; + if (parameters != null && parameters.length > 0) { +@@ -311,7 +311,7 @@ + final Object[] parameters, final Class[] parameterTypes) throws RuntimePolicyUtilsException { + try { + final Method method = target.getClass().getMethod(methodName, parameterTypes); +- final Object result = method.invoke(target, parameters); ++ final Object result = MethodUtil.invoke(target, method,parameters); + + return resultClass.cast(result); + } catch (IllegalArgumentException e) { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/RuntimePolicyUtilsException.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/RuntimePolicyUtilsException.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceConfigurationError.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceConfigurationError.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/package-info.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/package-info.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/AssertionData.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/AssertionData.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/CompactModelGenerator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/CompactModelGenerator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/DefaultPolicyAssertionCreator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/DefaultPolicyAssertionCreator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/ModelNode.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/ModelNode.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/NormalizedModelGenerator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/NormalizedModelGenerator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelGenerator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelGenerator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelMarshaller.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelMarshaller.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelTranslator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelTranslator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelUnmarshaller.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelUnmarshaller.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyReferenceData.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyReferenceData.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModel.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModel.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModelContext.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModelContext.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelMarshaller.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelMarshaller.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelUnmarshaller.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelUnmarshaller.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.policy.sourcemodel.attach; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -83,7 +83,13 @@ + private static final QName POLICY = new QName("http://www.w3.org/ns/ws-policy", "Policy"); + private static final QName URI = new QName("http://www.w3.org/ns/ws-policy", "URI"); + private static final QName POLICIES = new QName(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "Policies"); +- private static final XMLInputFactory XML_INPUT_FACTORY = XMLInputFactory.newInstance(); ++ private static final ContextClassloaderLocal XML_INPUT_FACTORY = new ContextClassloaderLocal() { ++ @Override ++ protected XMLInputFactory initialValue() throws Exception { ++ return XMLInputFactory.newInstance(); ++ } ++ }; ++ + private static final PolicyModelUnmarshaller POLICY_UNMARSHALLER = PolicyModelUnmarshaller.getXmlUnmarshaller(); + + private final Map map = new HashMap(); +@@ -93,7 +99,7 @@ + public static Map unmarshal(final Reader source) throws PolicyException { + LOGGER.entering(source); + try { +- XMLEventReader reader = XML_INPUT_FACTORY.createXMLEventReader(source); ++ XMLEventReader reader = XML_INPUT_FACTORY.get().createXMLEventReader(source); + ExternalAttachmentsUnmarshaller instance = new ExternalAttachmentsUnmarshaller(); + final Map map = instance.unmarshal(reader, null); + LOGGER.exiting(map); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/package-info.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/package-info.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/package-info.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/package-info.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/NamespaceVersion.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/NamespaceVersion.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/XmlToken.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/XmlToken.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AbstractQNameValidator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AbstractQNameValidator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AssertionCreationException.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AssertionCreationException.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionCreator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionCreator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionValidator.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionValidator.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PrefixMapper.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PrefixMapper.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/package-info.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/package-info.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/PolicyMapKeyConverter.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/PolicyMapKeyConverter.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/WsdlBindingSubject.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/WsdlBindingSubject.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/package-info.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/package-info.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, 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 +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractInstanceResolver.java 2013-12-01 11:13:43.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -157,7 +157,7 @@ + if (!method.isAccessible()) { + method.setAccessible(true); + } +- method.invoke(instance,args); ++ MethodUtil.invoke(instance,method,args); + } catch (IllegalAccessException e) { + throw new ServerRtException("server.rt.err",e); + } catch (InvocationTargetException e) { +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MethodUtil.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MethodUtil.java 2013-12-01 11:13:43.000000000 -0800 +@@ -0,0 +1,94 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.server; ++ ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ ++/** ++ * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks ++ * to java.lang,reflect.Method.invoke() ++ * ++ * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too! ++ */ ++class MethodUtil { ++ ++ private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName()); ++ private static final Method INVOKE_METHOD; ++ ++ static { ++ Method method; ++ try { ++ Class clazz = Class.forName("sun.reflect.misc.MethodUtil"); ++ method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class); ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods."); ++ } ++ } catch (Throwable t) { ++ method = null; ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM"); ++ } ++ } ++ INVOKE_METHOD = method; ++ } ++ ++ static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { ++ if (INVOKE_METHOD != null) { ++ // sun.reflect.misc.MethodUtil.invoke(method, owner, args) ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil"); ++ } ++ try { ++ return INVOKE_METHOD.invoke(null, method, target, args); ++ } catch (InvocationTargetException ite) { ++ // unwrap invocation exception added by reflection code ... ++ throw unwrapException(ite); ++ } ++ } else { ++ // other then Oracle JDK ... ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM"); ++ } ++ return method.invoke(target, args); ++ } ++ } ++ ++ private static InvocationTargetException unwrapException(InvocationTargetException ite) { ++ Throwable targetException = ite.getTargetException(); ++ if (targetException != null && targetException instanceof InvocationTargetException) { ++ if (LOGGER.isLoggable(Level.FINE)) { ++ LOGGER.log(Level.FINE, "Unwrapping invocation target exception"); ++ } ++ return (InvocationTargetException) targetException; ++ } else { ++ return ite; ++ } ++ } ++ ++} +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.spi; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for StaticCache utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java 2013-09-06 11:24:07.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -77,7 +77,12 @@ + */ + public class ProviderImpl extends Provider { + +- private final static JAXBContext eprjc = getEPRJaxbContext(); ++ private final static ContextClassloaderLocal eprjc = new ContextClassloaderLocal() { ++ @Override ++ protected JAXBContext initialValue() throws Exception { ++ return getEPRJaxbContext(); ++ } ++ }; + + /** + * Convenient singleton instance. +@@ -140,7 +145,7 @@ + return AccessController.doPrivileged(new PrivilegedAction() { + public EndpointReference run() { + try { +- Unmarshaller unmarshaller = eprjc.createUnmarshaller(); ++ Unmarshaller unmarshaller = eprjc.get().createUnmarshaller(); + return (EndpointReference) unmarshaller.unmarshal(eprInfoset); + } catch (JAXBException e) { + throw new WebServiceException("Error creating Marshaller or marshalling.", e); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.ws.util.xml; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for StaticCache utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java 2013-09-06 11:24:08.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -199,20 +199,28 @@ + } + } + +- static final TransformerFactory transformerFactory = TransformerFactory.newInstance(); +- +- static final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); ++ static final ContextClassloaderLocal transformerFactory = new ContextClassloaderLocal() { ++ @Override ++ protected TransformerFactory initialValue() throws Exception { ++ return TransformerFactory.newInstance(); ++ } ++ }; + +- static { +- saxParserFactory.setNamespaceAware(true); +- } ++ static final ContextClassloaderLocal saxParserFactory = new ContextClassloaderLocal() { ++ @Override ++ protected SAXParserFactory initialValue() throws Exception { ++ SAXParserFactory factory = SAXParserFactory.newInstance(); ++ factory.setNamespaceAware(true); ++ return factory; ++ } ++ }; + + /** + * Creates a new identity transformer. + */ + public static Transformer newTransformer() { + try { +- return transformerFactory.newTransformer(); ++ return transformerFactory.get().newTransformer(); + } catch (TransformerConfigurationException tex) { + throw new IllegalStateException("Unable to create a JAXP transformer"); + } +@@ -227,9 +235,9 @@ + // work around a bug in JAXP in JDK6u4 and earlier where the namespace processing + // is not turned on by default + StreamSource ssrc = (StreamSource) src; +- TransformerHandler th = ((SAXTransformerFactory) transformerFactory).newTransformerHandler(); ++ TransformerHandler th = ((SAXTransformerFactory) transformerFactory.get()).newTransformerHandler(); + th.setResult(result); +- XMLReader reader = saxParserFactory.newSAXParser().getXMLReader(); ++ XMLReader reader = saxParserFactory.get().newSAXParser().getXMLReader(); + reader.setContentHandler(th); + reader.setProperty(LEXICAL_HANDLER_PROPERTY, th); + reader.parse(toInputSource(ssrc)); +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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.xml.internal.xsom.util; ++ ++import java.security.AccessController; ++import java.security.PrivilegedAction; ++import java.text.MessageFormat; ++import java.util.ResourceBundle; ++import java.util.WeakHashMap; ++ ++/** ++ * Simple utility ensuring that the value is cached only in case it is non-internal implementation ++ */ ++abstract class ContextClassloaderLocal { ++ ++ private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE"; ++ ++ private WeakHashMap CACHE = new WeakHashMap(); ++ ++ public V get() throws Error { ++ ClassLoader tccl = getContextClassLoader(); ++ V instance = CACHE.get(tccl); ++ if (instance == null) { ++ instance = createNewInstance(); ++ CACHE.put(tccl, instance); ++ } ++ return instance; ++ } ++ ++ public void set(V instance) { ++ CACHE.put(getContextClassLoader(), instance); ++ } ++ ++ protected abstract V initialValue() throws Exception; ++ ++ private V createNewInstance() { ++ try { ++ return initialValue(); ++ } catch (Exception e) { ++ throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e); ++ } ++ } ++ ++ private static String format(String property, Object... args) { ++ String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property); ++ return MessageFormat.format(text, args); ++ } ++ ++ private static ClassLoader getContextClassLoader() { ++ return (ClassLoader) ++ AccessController.doPrivileged(new PrivilegedAction() { ++ public Object run() { ++ ClassLoader cl = null; ++ try { ++ cl = Thread.currentThread().getContextClassLoader(); ++ } catch (SecurityException ex) { ++ } ++ return cl; ++ } ++ }); ++ } ++} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -0,0 +1,27 @@ ++# ++# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++# Error messages for ContextClassloaderLocal utility class ++FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0} ++ +--- ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java 2013-09-06 11:24:10.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -60,7 +60,12 @@ + return new AnnotationParserImpl(); + } + +- private static final SAXTransformerFactory stf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); ++ private static final ContextClassloaderLocal stf = new ContextClassloaderLocal() { ++ @Override ++ protected SAXTransformerFactory initialValue() throws Exception { ++ return (SAXTransformerFactory) SAXTransformerFactory.newInstance(); ++ } ++ }; + + private static class AnnotationParserImpl extends AnnotationParser { + +@@ -72,7 +77,7 @@ + + AnnotationParserImpl() { + try { +- transformer = stf.newTransformerHandler(); ++ transformer = stf.get().newTransformerHandler(); + } catch (TransformerConfigurationException e) { + throw new Error(e); // impossible + } +--- ./jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java 2013-09-06 11:24:10.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,9 +27,14 @@ + + import java.math.BigDecimal; + import java.math.BigInteger; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + import java.util.Calendar; ++import java.util.Collections; + import java.util.GregorianCalendar; ++import java.util.Map; + import java.util.TimeZone; ++import java.util.WeakHashMap; + + import javax.xml.namespace.QName; + import javax.xml.namespace.NamespaceContext; +@@ -418,7 +423,7 @@ + + public static GregorianCalendar _parseDateTime(CharSequence s) { + String val = WhiteSpaceProcessor.trim(s).toString(); +- return datatypeFactory.newXMLGregorianCalendar(val).toGregorianCalendar(); ++ return getDatatypeFactory().newXMLGregorianCalendar(val).toGregorianCalendar(); + } + + public String printDateTime(Calendar val) { +@@ -492,7 +497,7 @@ + } + + public Calendar parseTime(String lexicalXSDTime) { +- return datatypeFactory.newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar(); ++ return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar(); + } + + public String printTime(Calendar val) { +@@ -500,7 +505,7 @@ + } + + public Calendar parseDate(String lexicalXSDDate) { +- return datatypeFactory.newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar(); ++ return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar(); + } + + public String printDate(Calendar val) { +@@ -882,14 +887,30 @@ + } + return false; + } +- private static final DatatypeFactory datatypeFactory; + +- static { +- try { +- datatypeFactory = DatatypeFactory.newInstance(); +- } catch (DatatypeConfigurationException e) { +- throw new Error(e); ++ private static final Map DF_CACHE = Collections.synchronizedMap(new WeakHashMap()); ++ ++ public static DatatypeFactory getDatatypeFactory() { ++ ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction() { ++ public ClassLoader run() { ++ return Thread.currentThread().getContextClassLoader(); ++ } ++ }); ++ DatatypeFactory df = DF_CACHE.get(tccl); ++ if (df == null) { ++ synchronized (DatatypeConverterImpl.class) { ++ df = DF_CACHE.get(tccl); ++ if (df == null) { // to prevent multiple initialization ++ try { ++ df = DatatypeFactory.newInstance(); ++ } catch (DatatypeConfigurationException e) { ++ throw new Error(Messages.format(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY), e); ++ } ++ DF_CACHE.put(tccl, df); ++ } ++ } + } ++ return df; + } + + private static final class CalendarFormatter { +--- ./jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.java 2013-09-06 11:24:10.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -88,4 +88,6 @@ + + static final String ILLEGAL_CAST = // 2 args + "JAXBContext.IllegalCast"; ++ ++ static final String FAILED_TO_INITIALE_DATATYPE_FACTORY = "FAILED_TO_INITIALE_DATATYPE_FACTORY"; + } +--- ./jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.properties 2013-09-06 11:24:10.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/bind/Messages.properties 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -49,3 +49,6 @@ + + JAXBContext.IllegalCast = \ + ClassCastException: attempting to cast {0} to {1}. Please make sure that you are specifying the proper ClassLoader. ++ ++FAILED_TO_INITIALE_DATATYPE_FACTORY = \ ++ Failed to initialize JAXP 1.3 DatatypeFactory class. +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/Detail.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/FactoryFinder.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/FactoryFinder.java 2014-06-06 19:56:15.000000000 -0700 +@@ -40,11 +40,12 @@ + */ + private static Object newInstance(String className, + ClassLoader classLoader) +- throws SOAPException ++ throws SOAPException + { + try { + Class spiClass = safeLoadClass(className, classLoader); + return spiClass.newInstance(); ++ + } catch (ClassNotFoundException x) { + throw new SOAPException("Provider " + className + " not found", x); + } catch (Exception x) { +@@ -66,7 +67,7 @@ + * @exception SOAPException if there is a SOAP error + */ + static Object find(String factoryId) +- throws SOAPException ++ throws SOAPException + { + return find(factoryId, null, false); + } +@@ -92,7 +93,7 @@ + * @exception SOAPException if there is a SOAP error + */ + static Object find(String factoryId, String fallbackClassName) +- throws SOAPException ++ throws SOAPException + { + return find(factoryId, fallbackClassName, true); + } +@@ -122,7 +123,7 @@ + * @exception SOAPException if there is a SOAP error + */ + static Object find(String factoryId, String defaultClassName, +- boolean tryFallback) throws SOAPException { ++ boolean tryFallback) throws SOAPException { + ClassLoader classLoader; + try { + classLoader = Thread.currentThread().getContextClassLoader(); +@@ -133,7 +134,7 @@ + // Use the system property first + try { + String systemProp = +- System.getProperty( factoryId ); ++ System.getProperty( factoryId ); + if( systemProp!=null) { + return newInstance(systemProp, classLoader); + } +@@ -144,7 +145,7 @@ + try { + String javah=System.getProperty( "java.home" ); + String configFile = javah + File.separator + +- "lib" + File.separator + "jaxm.properties"; ++ "lib" + File.separator + "jaxm.properties"; + File f=new File( configFile ); + if( f.exists()) { + Properties props=new Properties(); +@@ -167,13 +168,13 @@ + + if( is!=null ) { + BufferedReader rd = +- new BufferedReader(new InputStreamReader(is, "UTF-8")); ++ new BufferedReader(new InputStreamReader(is, "UTF-8")); + + String factoryClassName = rd.readLine(); + rd.close(); + + if (factoryClassName != null && +- ! "".equals(factoryClassName)) { ++ ! "".equals(factoryClassName)) { + return newInstance(factoryClassName, classLoader); + } + } +@@ -188,7 +189,7 @@ + // (built in) factory if specified. + if (defaultClassName == null) { + throw new SOAPException( +- "Provider for " + factoryId + " cannot be found", null); ++ "Provider for " + factoryId + " cannot be found", null); + } + return newInstance(defaultClassName, classLoader); + } +@@ -200,7 +201,7 @@ + * Class.forName() on it so it will be loaded by the bootstrap class loader. + */ + private static Class safeLoadClass(String className, +- ClassLoader classLoader) ++ ClassLoader classLoader) + throws ClassNotFoundException { + try { + // make sure that the current thread has an access to the package of the given name. +@@ -218,7 +219,7 @@ + return classLoader.loadClass(className); + } catch (SecurityException se) { + // (only) default implementation can be loaded +- // using bootstrap class loader ... ++ // using bootstrap class loader: + if (isDefaultImplementation(className)) + return Class.forName(className); + +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java 2014-06-06 19:56:15.000000000 -0700 +@@ -96,8 +96,9 @@ + * @see SAAJMetaFactory + */ + +- public static MessageFactory newInstance() +- throws SOAPException { ++ public static MessageFactory newInstance() throws SOAPException { ++ ++ + try { + MessageFactory factory = (MessageFactory) FactoryFinder.find( + MESSAGE_FACTORY_PROPERTY, +@@ -107,8 +108,8 @@ + if (factory != null) { + return factory; + } +- + return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); ++ + } catch (Exception ex) { + throw new SOAPException( + "Unable to create message factory for SOAP: " +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/Name.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/Name.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/Node.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/Node.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPException.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPException.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java 2014-06-06 19:56:15.000000000 -0700 +@@ -261,7 +261,8 @@ + throws SOAPException + { + try { +- SOAPFactory factory = (SOAPFactory) FactoryFinder.find(SOAP_FACTORY_PROPERTY, DEFAULT_SOAP_FACTORY, false); ++ SOAPFactory factory = (SOAPFactory) FactoryFinder.find( ++ SOAP_FACTORY_PROPERTY, DEFAULT_SOAP_FACTORY, false); + if (factory != null) + return factory; + return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/soap/Text.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/soap/Text.java 2014-06-06 19:56:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, 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 +--- ./jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2013-09-06 11:24:11.000000000 -0700 ++++ ./jaxws/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java 2014-04-19 01:27:03.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -69,7 +69,7 @@ + @XmlType(name="EndpointReferenceType",namespace=W3CEndpointReference.NS) + public final class W3CEndpointReference extends EndpointReference { + +- private final static JAXBContext w3cjc = getW3CJaxbContext(); ++ private final JAXBContext w3cjc = getW3CJaxbContext(); + + protected W3CEndpointReference() { + } +--- ./jdk/.hgtags 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/.hgtags 2014-06-06 19:56:34.000000000 -0700 +@@ -123,6 +123,7 @@ + 539e576793a8e64aaf160e0d6ab0b9723cd0bef0 jdk7-b146 + 69e973991866c948cf1808b06884ef2d28b64fcb jdk7u1-b01 + f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147 ++0870207843e2a74816dff1e33a717ffaf6f0a919 7u0 + 2baf612764d215e6f3a5b48533f74c6924ac98d7 jdk7u1-b02 + a4781b6d9cfb6901452579adee17c9a17c1b584c jdk7u1-b03 + b223ed9a5fdf8ce3af42adfa8815975811d70eae jdk7u1-b04 +@@ -342,3 +343,84 @@ + b479996d5c924128c3490165b592bf66a3034932 jdk7u40-b42 + fb25cdef17e9610db5cb89fc35c0c4abef5ad781 jdk7u40-b43 + ed444a09a5fd32237deaef6e43804e20ba4f6352 jdk7u40-b60 ++e045f6a3ad1d9f7b8982418addb3803ab63458f2 jdk7u40-b61 ++26cc60a250a0d333b1d5d7a9acb233ad62b2fb0b jdk7u40-b62 ++55f01444cf58c8004df9a9634c1bd7ff87caa370 jdk7u25-b32 ++b06abd965701459a868e88af9a3e564c0301971c jdk7u45-b01 ++d23a877da2d5dad6520a268c83f183295a9e7299 jdk7u45-b02 ++a56eb4f801232c409d34cd1190df4eec5fefe8a9 jdk7u45-b03 ++702c8d83dd8c5b6c76fe53a694244a36d23fa860 jdk7u45-b04 ++a70540e8a5e96773b83c7dc0accdb323d946c045 jdk7u45-b05 ++f39399baf36761571719f6ff5dc69c514d97842d jdk7u45-b06 ++a35d4a4ebcfa895202544c2f6b2d09e0b29bddfc jdk7u45-b07 ++2f01847eb9530ed5ec08b1b663f3a02cac57b048 jdk7u45-b08 ++6e2313d45f0c50d824531b32d3f577aa0b357551 jdk7u45-b09 ++d4506b816f63330489e00ba0b9e3c6583a8a9efa jdk7u45-b10 ++ee87452ba9e2b4b7d847bd2a7910a8aaeacfea7b jdk7u45-b11 ++d5e393a55e6adc2f1b9aaa752a5004fa07561480 jdk7u45-b12 ++34997920efe962b2e4422e2c2de8ae91cd1d563d jdk7u45-b13 ++59a78e4ca635a469a763ee408b11f8e1033f2584 jdk7u45-b14 ++96782fe0c38c41cc4806e27ee64b20dc647ea808 jdk7u45-b15 ++3c9a6d9eafd31be44b0ade0354e60f5078b417a4 jdk7u45-b16 ++3a65c1b0c6d15fb24298bcd133d7ab4baa741ae2 jdk7u45-b17 ++c5ca4daec23b5e7f99ac8d684f5016ff8bfebbb0 jdk7u45-b18 ++4797f984f6c93c433aa797e9b2d8f904cf083f96 jdk7u45-b30 ++8c343a783777b8728cb819938f387db0acf7f3ac jdk7u45-b31 ++402d54c7d8ce95f3945cc3d698e528e4adec7b9b jdk7u45-b33 ++34e8f9f26ae612ebac36357eecbe70ea20e0233c jdk7u45-b34 ++3dbb06a924cdf73d39b8543824ec88ae501ba5c6 jdk7u45-b35 ++3c9a6d9eafd31be44b0ade0354e60f5078b417a4 jdk7u51-b00 ++d76613074ff357d0664b97b4aaf99fbb65dcec47 jdk7u51-b01 ++fb057871f094ebe4906ad6856326768b01a62c45 jdk7u51-b02 ++6b3c195c73b051ee3c4a0ac44f050011414ab08b jdk7u51-b03 ++96431826ae3a927008c56aeefa1397a33bda3e70 jdk7u51-b04 ++8ee582bb96a6b79311d55a7170f42844af77a269 jdk7u51-b05 ++594ae80153afaeced6acedff5d37f889a9821690 jdk7u51-b06 ++7b84e6514c297861d85ed9457b2260805311d9e8 jdk7u51-b07 ++40fca6b57cd81114d4aace3d0469e20274f015c3 jdk7u51-b08 ++33ae35eeb5a4c04a4d05351ff68d4021e4cad752 jdk7u51-b09 ++4a6e31d94b29c7115235824a6e317289819bb00f jdk7u51-b10 ++f0425ecbbb0ca9d8c87c250c19e8f9524b38833d jdk7u51-b11 ++f5eee4f1d5b4a1e19febc9c26c863ae853ed6d2e jdk7u51-b12 ++d19a89fdfb9b959b8638441d9d396685d6c7ab7b jdk7u51-b13 ++ef58b2b9a9a1e1a42b0139b57816a160c4681371 jdk7u51-b30 ++5bca0d0969b13b1d9b8caba3cce8293a98d68318 jdk7u51-b31 ++e9143dc3dc2a8f4b896e74f70d6c503d73c40533 jdk7u51-b33 ++c1eaf405fb8d7beddd75c6f81671970f6baa70d8 jdk7u51-b34 ++f5eee4f1d5b4a1e19febc9c26c863ae853ed6d2e jdk7u55-b00 ++5010db5b9b5ab07a9409a5c557d3f43ab32dc428 jdk7u55-b01 ++2ca3e1fa4455ad564228ad6e654498167af2f20d jdk7u55-b02 ++c12b3c81366cb067ff4444952209d54bfa387353 jdk7u55-b03 ++476d1bddaa32bf440953c3b1814ba38f16886c03 jdk7u55-b04 ++7fa6d3ba2cc77cd1e6f24e33f0c39788cb2893b8 jdk7u55-b05 ++795654fce29c38d4c8504f760d8d8a36248d38ed jdk7u55-b06 ++4b2ed892b195e95f7541aaa3b129a2caa5faae1d jdk7u55-b07 ++db1323224053a18ecc62bdc1d3902d93b33f0b70 jdk7u55-b08 ++534eeff29ac9fcbbb99ef8908548dbb368d04baf jdk7u55-b09 ++d39dd4135844ca5c707bc39ae1d7e020d49880ce jdk7u55-b09 ++b231536550067c3b00c77d0e035afe8faaa15581 jdk7u55-b10 ++2d80b7cd7aae76f0909a210414317dcf846ad651 jdk7u55-b11 ++07be5d5508733ed37c11fcd21a13ae3c8288313b jdk7u55-b12 ++92fd166252c2701092a510002f4cf9285a20473d jdk7u55-b13 ++4a5651c84b1e6cf26dc9b19f00747e5004efba68 jdk7u55-b30 ++ffd99c5975217a14609851602c5f5dc005234aba jdk7u55-b14 ++88f1bf248cc520e0bf7ef17bc862f87aab958373 jdk7u55-b31 ++db5a29c812ee25c34ce9cd97de6e0dae284a4e34 jdk7u60-b00 ++def34c4a798678c424786a8f0d0508e90185958d jdk7u60-b01 ++ff67c89658525e8903fb870861ed3645befd6bc5 jdk7u60-b02 ++b1bcc999a8f1b4b4452b59c6636153bb0154cf5a jdk7u60-b03 ++efc8886310cbccb941f826acfad2ad51a2891be5 jdk7u60-b04 ++4fb749a3110727d5334c69793578a3254a053bf5 jdk7u60-b05 ++46ca1ce7550f1463d60c3eacaf7b8cdc44b0c66e jdk7u60-b06 ++d5a2f60006e3c4243abeee0f623e5c3f79372fd8 jdk7u60-b07 ++0dd27693876d66d176457749d0f2161b219eba2d jdk7u60-b08 ++7b571638b0f51bcbe04c088dfff569b4cba6bbdf jdk7u60-b09 ++fb4981489b09594d2449527e2d511834cf8ad370 jdk7u60-b10 ++c2bb87dae8a08eab6f4f336ce5a59865aa0214d6 jdk7u60-b11 ++1a90de8005e3de2475fd9355dcdb6f5e60bf89cc jdk7u60-b12 ++b06d4ed71ae0bc6e13f5a8437cb6388f17c66e84 jdk7u60-b13 ++b7fbd9b4febf8961091fdf451d3da477602a8f1d jdk7u60-b14 ++04882f9a073e8de153ec7ad32486569fd9a087ec jdk7u60-b15 ++41547583c3a035c3924ffedfa8704e58d69e5c50 jdk7u60-b16 ++e484202d9a4104840d758a21b2bba1250e766343 jdk7u60-b18 ++e484202d9a4104840d758a21b2bba1250e766343 jdk7u60-b17 +--- ./jdk/make/bridge/AccessBridgeJava/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/bridge/AccessBridgeJava/Makefile 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -51,7 +51,7 @@ + # + # Java files to compile. + # +-FILES_java = com/sun/java/accessibility/AccessBridge.java ++FILES_java = com/sun/java/accessibility/AccessBridgeLoader.java com/sun/java/accessibility/AccessBridge.java + + # + # Location for the newly built classfiles. +@@ -68,7 +68,7 @@ + build: prebuild + + prebuild: +- $(CP) $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility/$(ABPLATFORM)/AccessBridge.java \ ++ $(CP) $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility/$(ABPLATFORM)/AccessBridgeLoader.java \ + $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility + + all : build $(JARFILE) +--- ./jdk/make/bridge/Jabswitch/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/bridge/Jabswitch/Makefile 2013-12-01 11:14:27.000000000 -0800 +@@ -53,7 +53,7 @@ + buildexe : + $(CD) $(TEMPDIR) + $(RC) $(RC_FLAGS) $(VERSIONINFO_RESOURCE) +- $(CC) $(CPPFLAGS) $(JAB_SRC) $(LDDFLAGS) $(VERSIONRES) -o $(JAB_EXE) ++ $(CC) $(CPPFLAGS) $(JAB_SRC) $(VERSIONRES) /link $(LDDFLAGS) -out:$(JAB_EXE) + $(MT) /nologo /verbose /manifest $(JAB_MANIFEST_INP) /outputresource:$(JAB_EXE) + + copyfilejab : +--- ./jdk/make/com/oracle/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/com/oracle/Makefile 2014-06-06 19:56:29.000000000 -0700 +@@ -30,22 +30,8 @@ + #SUBDIRS_MAKEFLAGS += JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation,-path + include $(BUILDDIR)/common/Defs.gmk + +-JFR_SRCDIRS_EXIST := $(shell \ +- if [ -d $(CLOSED_SHARE_SRC)/native/oracle/jfr ] ; then \ +- echo true; \ +- else \ +- echo false; \ +- fi) +- +-JFR = +-ifndef OPENJDK +- ifndef JAVASE_EMBEDDED +- ifeq ($(JFR_SRCDIRS_EXIST), true) +- ifneq (${ARCH},arm) +- JFR = jfr +- endif +- endif +- endif ++ifeq ($(BUILD_JFR), true) ++ JFR = jfr + endif + + # build com/oracle/security/ucrypto on Solaris platform for non-OpenJDK builds +--- ./jdk/make/com/sun/jmx/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/com/sun/jmx/Makefile 2013-12-01 11:14:27.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -115,6 +115,8 @@ + + ifeq ($(CROSS_COMPILE_ARCH),) + RMIC = $(RMIC_JAVA) $(JAVA_TOOLS_FLAGS) -cp $(OUTPUTDIR)/classes sun.rmi.rmic.Main ++else ++RMIC = $(BOOT_JAVA_CMD) $(JAVA_TOOLS_FLAGS) -cp $(OUTPUTDIR)/classes sun.rmi.rmic.Main + endif + + $(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class +@@ -130,11 +132,13 @@ + $(RMIC) -classpath "$(CLASSDESTDIR)" \ + -d $(CLASSDESTDIR) \ + -iiop -v1.2 \ ++ -emitPermissionCheck \ + $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) + $(RMIC) $(HOTSPOT_INTERPRETER_FLAG) -classpath "$(CLASSDESTDIR)" \ + -d $(CLASSDESTDIR) \ + -iiop -v1.2 \ + -standardPackage \ ++ -emitPermissionCheck \ + $(subst /,.,$(<:$(CLASSDESTDIR)/%.class=%)) + @$(java-vm-cleanup) + +--- ./jdk/make/com/sun/nio/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/com/sun/nio/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -31,11 +31,18 @@ + include $(BUILDDIR)/common/Defs.gmk + + # MMM: disable for now +-ifneq ($(PLATFORM), macosx) ++ifeq (,$(findstring $(PLATFORM), bsd macosx)) + include $(BUILDDIR)/common/Subdirs.gmk + SUBDIRS = sctp + endif + ++ifeq ($(OS_VENDOR), FreeBSD) ++# FreeBSD 5.x and lower are unsupported, 6.x has no sctp support. ++ifneq ($(call MajorVersion,$(shell uname -r)), 6) ++include $(BUILDDIR)/common/Subdirs.gmk ++SUBDIRS = sctp ++endif ++endif + + all build clean clobber:: + $(SUBDIRS-loop) +--- ./jdk/make/com/sun/nio/sctp/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/com/sun/nio/sctp/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -59,15 +59,11 @@ + -I$(PLATFORM_SRC)/native/java/net \ + -I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders + ++OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio + ifeq ($(PLATFORM), linux) + COMPILER_WARNINGS_FATAL=true +-#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl +-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl ++OTHER_LDLIBS += -lpthread $(LIBDL) + endif +-ifeq ($(PLATFORM), solaris) +-#LIBSCTP = -lsctp +-OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio +-endif # PLATFORM + + else # windows + include $(BUILDDIR)/common/Classes.gmk +--- ./jdk/make/com/sun/security/auth/module/Makefile 2013-09-06 11:27:36.000000000 -0700 ++++ ./jdk/make/com/sun/security/auth/module/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -67,7 +67,7 @@ + include FILES_c_solaris.gmk + endif # solaris + +-ifneq (,$(findstring $(PLATFORM), linux macosx)) ++ifneq (,$(findstring $(PLATFORM), linux bsd macosx)) + LIBRARY = jaas_unix + include FILES_export_unix.gmk + include FILES_c_unix.gmk +--- ./jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -43,7 +43,7 @@ + sun/tools/attach/LinuxVirtualMachine.java + endif + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + FILES_export = \ + sun/tools/attach/BsdVirtualMachine.java + endif +--- ./jdk/make/com/sun/tools/attach/FILES_c.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/com/sun/tools/attach/FILES_c.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -39,7 +39,7 @@ + LinuxVirtualMachine.c + endif + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + FILES_c = \ + BsdVirtualMachine.c + endif +--- ./jdk/make/com/sun/tools/attach/FILES_java.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/com/sun/tools/attach/FILES_java.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -43,7 +43,7 @@ + sun/tools/attach/LinuxAttachProvider.java + endif + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + FILES_java += \ + sun/tools/attach/BsdAttachProvider.java + endif +--- ./jdk/make/com/sun/tools/attach/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/com/sun/tools/attach/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -38,7 +38,7 @@ + ifeq ($(PLATFORM), linux) + FILES_m = mapfile-linux + endif +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + FILES_m = mapfile-bsd + endif + include $(BUILDDIR)/common/Mapfile-vers.gmk +@@ -57,7 +57,7 @@ + EXTRA_LIBS += psapi.lib + endif + +-ifeq ($PLATFORM), macosx) ++ifeq ($(PLATFORM), macosx) + vpath %.c $(call NativeSrcDirList,,native/sun/tools/attach) + else + vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach +--- ./jdk/make/com/sun/tools/attach/mapfile-bsd 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/com/sun/tools/attach/mapfile-bsd 2014-06-06 19:56:34.000000000 -0700 +@@ -30,6 +30,7 @@ + Java_sun_tools_attach_BsdVirtualMachine_checkPermissions; + Java_sun_tools_attach_BsdVirtualMachine_close; + Java_sun_tools_attach_BsdVirtualMachine_connect; ++ Java_sun_tools_attach_BsdVirtualMachine_getTempDir; + Java_sun_tools_attach_BsdVirtualMachine_open; + Java_sun_tools_attach_BsdVirtualMachine_sendQuitTo; + Java_sun_tools_attach_BsdVirtualMachine_socket; +--- ./jdk/make/common/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/make/common/Defs-bsd.gmk 2014-06-06 19:56:39.000000000 -0700 +@@ -0,0 +1,482 @@ ++# ++# 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 ++# 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. ++# ++ ++# ++# Makefile to specify compiler flags for programs and libraries ++# targeted to BSD. Should not contain any rules. ++# ++# WARNING: This file is shared with other workspaces. ++# So when it includes other files, it must use JDK_TOPDIR. ++# ++ ++# Warning: the following variables are overriden by Defs.gmk. Set ++# values will be silently ignored: ++# CFLAGS (set $(OTHER_CFLAGS) instead) ++# CPPFLAGS (set $(OTHER_CPPFLAGS) instead) ++# CXXFLAGS (set $(OTHER_CXXFLAGS) instead) ++# LDFLAGS (set $(OTHER_LDFAGS) instead) ++# LDLIBS (set $(EXTRA_LIBS) instead) ++# LDLIBS_COMMON (set $(EXTRA_LIBS) instead) ++ ++# Get shared JDK settings ++include $(JDK_MAKE_SHARED_DIR)/Defs.gmk ++ ++# Part of INCREMENTAL_BUILD mechanism. ++# Compiler emits things like: path/file.o: file.h ++# We want something like: relative_path/file.o relative_path/file.d: file.h ++CC_DEPEND = -MM ++CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' ++ ++ifndef PLATFORM_SRC ++ PLATFORM_SRC = $(BUILDDIR)/../src/solaris ++endif # PLATFORM_SRC ++ ++# Location of the various .properties files specific to BSD platform ++ifndef PLATFORM_PROPERTIES ++ PLATFORM_PROPERTIES = $(BUILDDIR)/../src/solaris/lib ++endif # PLATFORM_SRC ++ ++# BSD build pulls its platform sources from the solaris tree. ++JAVA_SRCDIR_LIST = src/macosx src/solaris src/share ++NATIVE_SRCDIR_LIST = src/macosx src/solaris src/share ++ ++# Platform specific closed sources ++ifndef OPENJDK ++ ifndef CLOSED_PLATFORM_SRC ++ CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris ++ endif ++endif ++ ++# platform specific include files ++PLATFORM_INCLUDE_NAME = $(OS_NAME) ++PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) ++ ++# suffix used for make dependencies files. ++DEPEND_SUFFIX = d ++# The suffix applied to the library name for FDLIBM ++FDDLIBM_SUFFIX = a ++# The suffix applied to scripts (.bat for windows, nothing for unix) ++SCRIPT_SUFFIX = ++# CC compiler object code output directive flag value ++CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! ++CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required! ++ ++# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is ++# enabled with debug info files ZIP'ed to save space. For VARIANT != ++# OPT builds, FDS is always enabled, after all a debug build without ++# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has ++# meaning when FDS is enabled. ++# ++# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be ++# disabled for a VARIANT == OPT build. ++# ++# Note: Use of a different variable name for the FDS override option ++# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS ++# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass ++# in options via environment variables, use of distinct variables ++# prevents strange behaviours. For example, in a VARIANT != OPT build, ++# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the ++# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same ++# variable name is used, then different values can be picked up by ++# different parts of the build. Just to be clear, we only need two ++# variable names because the incoming option value can be overridden ++# in some situations, e.g., a VARIANT != OPT build. ++ ++ifeq ($(VARIANT), OPT) ++ FULL_DEBUG_SYMBOLS ?= 1 ++ ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) ++else ++ # debug variants always get Full Debug Symbols (if available) ++ ENABLE_FULL_DEBUG_SYMBOLS = 1 ++endif ++_JUNK_ := $(shell \ ++ echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)") ++# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later ++ ++ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ++ # Default OBJCOPY comes from GNU Binutils on BSD: ++ DEF_OBJCOPY=/usr/bin/objcopy ++ ifdef CROSS_COMPILE_ARCH ++ # don't try to generate .debuginfo files when cross compiling ++ _JUNK_ := $(shell \ ++ echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \ ++ "skipping .debuginfo generation.") ++ OBJCOPY= ++ else ++ OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) ++ ifneq ($(ALT_OBJCOPY),) ++ _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)") ++ # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path ++ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) ++ endif ++ endif ++ ++ # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the ++ # JDK build to import .debuginfo or .diz files from the HotSpot build. ++ # However, adding FDS support to the JDK build will occur in phases ++ # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS ++ # and PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS) is used to indicate that a ++ # particular library or program supports FDS. ++ ++ ifeq ($(OBJCOPY),) ++ _JUNK_ := $(shell \ ++ echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.") ++ ENABLE_FULL_DEBUG_SYMBOLS=0 ++ else ++ _JUNK_ := $(shell \ ++ echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.") ++ ++ # Library stripping policies for .debuginfo configs: ++ # all_strip - strips everything from the library ++ # min_strip - strips most stuff from the library; leaves minimum symbols ++ # no_strip - does not strip the library at all ++ # ++ # Oracle security policy requires "all_strip". A waiver was granted on ++ # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. ++ # ++ # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. ++ STRIP_POLICY ?= min_strip ++ ++ _JUNK_ := $(shell \ ++ echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)") ++ ++ ZIP_DEBUGINFO_FILES ?= 1 ++ ++ _JUNK_ := $(shell \ ++ echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)") ++ endif ++endif ++ ++# ++# Default optimization ++# ++ ++ifndef OPTIMIZATION_LEVEL ++ ifeq ($(PRODUCT), java) ++ OPTIMIZATION_LEVEL = HIGHER ++ else ++ OPTIMIZATION_LEVEL = LOWER ++ endif ++endif ++ifndef FASTDEBUG_OPTIMIZATION_LEVEL ++ FASTDEBUG_OPTIMIZATION_LEVEL = LOWER ++endif ++ ++CC_OPT/NONE = ++CC_OPT/LOWER = -O2 ++CC_OPT/HIGHER = -O3 ++CC_OPT/HIGHEST = -O3 ++ ++CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) ++ ++# For all platforms, do not omit the frame pointer register usage. ++# We need this frame pointer to make it easy to walk the stacks. ++# This should be the default on X86, but ia64 and amd64 may not have this ++# as the default. ++CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++LDFLAGS_COMMON_amd64 += -m64 ++CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++LDFLAGS_COMMON_i586 += -m32 ++CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 ++LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 ++CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 ++LDFLAGS_COMMON_sparc += -m32 -mcpu=v9 ++CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN ++ifeq ($(ZERO_BUILD), true) ++ CFLAGS_REQUIRED = $(ZERO_ARCHFLAG) ++ ifeq ($(ZERO_ENDIANNESS), little) ++ CFLAGS_REQUIRED += -D_LITTLE_ENDIAN ++ endif ++ LDFLAGS_COMMON += $(ZERO_ARCHFLAG) ++else ++ CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) ++ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) ++endif ++ ++# ++# Selection of warning messages ++# ++GCC_INHIBIT = -Wno-unused -Wno-parentheses ++GCC_STYLE = ++GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT) ++ ++# ++# Treat compiler warnings as errors, if warnings not allowed ++# ++ifeq ($(COMPILER_WARNINGS_FATAL),true) ++ GCC_WARNINGS += -Werror ++endif ++ ++# ++# Misc compiler options ++# ++ifneq ($(ARCH),ppc) ++ CFLAGS_COMMON = -fno-strict-aliasing ++endif ++PIC_CODE_LARGE = -fPIC ++PIC_CODE_SMALL = -fpic ++GLOBAL_KPIC = $(PIC_CODE_LARGE) ++CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS) ++ifeq ($(ARCH), amd64) ++ CFLAGS_COMMON += -pipe ++endif ++ ++# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1 ++DEBUG_FLAG = -g ++ifeq ($(FASTDEBUG), true) ++ ifeq ($(ARCH_DATA_MODEL), 64) ++ DEBUG_FLAG = -g1 ++ endif ++endif ++ ++# DEBUG_BINARIES overrides everything, use full -g debug information ++ifeq ($(DEBUG_BINARIES), true) ++ DEBUG_FLAG = -g ++ CFLAGS_REQUIRED += $(DEBUG_FLAG) ++endif ++ ++# If Full Debug Symbols is enabled, then we want the same debug and ++# optimization flags as used by FASTDEBUG. ++# ++ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) ++ ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1) ++ ifeq ($(VARIANT), OPT) ++ CC_OPT = $(DEBUG_FLAG) $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) ++ endif ++ endif ++endif ++ ++CFLAGS_OPT = $(CC_OPT) ++CFLAGS_DBG = $(DEBUG_FLAG) ++CFLAGS_COMMON += $(CFLAGS_REQUIRED) ++ ++CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS) ++CXXFLAGS_OPT = $(CC_OPT) ++CXXFLAGS_DBG = $(DEBUG_FLAG) ++CXXFLAGS_COMMON += $(CFLAGS_REQUIRED) ++ ++# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java ++ifeq ($(FASTDEBUG), true) ++ CFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) ++ CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) ++endif ++ ++CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"' ++ ++# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here) ++ifneq ($(ARCH),alpha) ++ CPP_ARCH_FLAGS += -D$(ARCH) ++else ++ CPP_ARCH_FLAGS += -D_$(ARCH)_ ++endif ++ ++CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ ++ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT ++ ++ifeq ($(ARCH_DATA_MODEL), 64) ++CPPFLAGS_COMMON += -D_LP64=1 ++endif ++ ++CPPFLAGS_OPT = -DNDEBUG ++CPPFLAGS_DBG = -DDEBUG ++ifneq ($(PRODUCT), java) ++ CPPFLAGS_DBG += -DLOGGING ++endif ++ ++# Libraries need to locate other libraries at runtime, and you can tell ++# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) ++# buried inside the .so. The $ORIGIN says to look relative to where ++# the library itself is and it can be followed with relative paths from ++# that. By default we always look in $ORIGIN, optionally we add relative ++# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. ++# On BSD we add a flag -z origin, not sure if this is necessary, but ++# doesn't seem to hurt. ++# The environment variable LD_LIBRARY_PATH will over-ride these runpaths. ++# Try: 'readelf -d lib*.so' to see these settings in a library. ++# ++Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin ++Z_ORIGIN_FLAG/i586 = -Xlinker -z -Xlinker origin ++Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin ++Z_ORIGIN_FLAG/ia64 = -Xlinker -z -Xlinker origin ++Z_ORIGIN_FLAG/arm = ++Z_ORIGIN_FLAG/ppc = ++Z_ORIGIN_FLAG/zero = -Xlinker -z -Xlinker origin ++ ++LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY)) ++ ++LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN ++LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%) ++ ++# ++# -L paths for finding and -ljava ++# ++LDFLAGS_OPT = -Xlinker -O1 ++LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) ++LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) ++ ++# ++# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always ++# statically link libgcc but will print a warning with the flag. We don't ++# want the warning, so check gcc version first. ++# ++ifeq ($(CC_MAJORVER),3) ++ OTHER_LDFLAGS += -static-libgcc ++endif ++ ++# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) ++# (See Rules.gmk) The gcc 5 compiler might have an option for this? ++AUTOMATIC_PCH_OPTION = ++ ++# ++# Post Processing of libraries/executables ++# ++ifeq ($(VARIANT), OPT) ++ ifneq ($(NO_STRIP), true) ++ ifneq ($(DEBUG_BINARIES), true) ++ # Debug 'strip -S' leaves local function Elf symbols (better stack ++ # traces) ++ POST_STRIP_PROCESS = $(STRIP) -S ++ endif ++ endif ++endif ++ ++# ++# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o ++# ++LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker ++ ++# ++# Support for Quantify. ++# ++ifdef QUANTIFY ++QUANTIFY_CMD = quantify ++QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes ++LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS) ++endif ++ ++# Using map files currently break compilation on FreeBSD during shared library ++# checks for some of the AWT native libraries. ++ifeq ($(OS_VENDOR), FreeBSD) ++LDNOMAP=true ++endif ++ ++# ++# Path and option to link against the VM, if you have to. Note that ++# there are libraries that link against only -ljava, but they do get ++# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas ++# the library itself should not. ++# ++VM_NAME = server ++JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm ++JAVALIB = -ljava $(JVMLIB) ++ ++# ++# We want to privatize JVM symbols on Solaris. This is so the user can ++# write a function called FindClass and this should not override the ++# FindClass that is inside the JVM. At this point in time we are not ++# concerned with other JNI libraries because we hope that there will ++# not be as many clashes there. ++# ++PRIVATIZE_JVM_SYMBOLS = false ++ ++USE_PTHREADS = true ++override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME ++override AWT_RUNPATH = ++override HAVE_ALTZONE = false ++override HAVE_FILIOH = false ++override HAVE_GETHRTIME = false ++override HAVE_GETHRVTIME = false ++override LEX_LIBRARY = -lfl ++ifeq ($(STATIC_CXX),true) ++override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic ++else ++override LIBCXX = -lstdc++ ++endif ++override LIBPOSIX4 = ++override LIBSOCKET = ++override LIBNSL = ++override LIBSCF = ++override LIBTHREAD = ++override LIBDL = ++override MOOT_PRIORITIES = true ++override NO_INTERRUPTIBLE_IO = true ++override OPENWIN_HOME = $(X11_PATH) ++override OPENWIN_LIB = $(OPENWIN_HOME)/lib ++override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER ++override SUN_CMM_SUBDIR = ++override THREADS_FLAG = native ++override USE_GNU_M4 = true ++override USING_GNU_TAR = true ++override WRITE_LIBVERSION = false ++ ++# 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 ++# installation area. ++override USE_EXECNAME = true ++ ++# If your platform has DPS, it will have Type1 fonts too, in which case ++# it is best to enable DPS support until such time as 2D's rasteriser ++# can fully handle Type1 fonts in all cases. Default is "yes". ++# HAVE_DPS should only be "no" if the platform has no DPS headers or libs ++# DPS (Displayable PostScript) is available on Solaris machines ++HAVE_DPS = no ++ ++ifeq ($(OS_VENDOR), FreeBSD) ++ SYSTEM_ZLIB = true ++endif ++ ++ifeq ($(OS_VENDOR), OpenBSD) ++ SYSTEM_ZLIB = true ++endif ++ ++# ++# Japanese manpages ++# ++JA_SOURCE_ENCODING = eucJP ++JA_TARGET_ENCODINGS = UTF-8 ++ ++# Settings for the JDI - Serviceability Agent binding. ++HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) ++SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) ++SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo ++SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz ++ ++# The JDI - Serviceability Agent binding is not currently supported ++# on ia64. ++ifeq ($(ARCH), ia64) ++ INCLUDE_SA = false ++else ++ INCLUDE_SA = true ++endif ++ ++ifdef CROSS_COMPILE_ARCH ++ # X11 headers are not under /usr/include ++ OTHER_CFLAGS += -I$(OPENWIN_HOME)/include ++ OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include ++ OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include ++endif +--- ./jdk/make/common/Defs-embedded.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Defs-embedded.gmk 2014-04-19 01:27:12.000000000 -0700 +@@ -71,7 +71,9 @@ + # and it must be linked after fdlibm - this places it at the end after libc + # -z muldefs avoids linker errors for duplicate symbols. + ifeq ($(CROSS_COMPILE_ARCH), arm) +- EXTRA_LIBS += $(EXT_LIBS_PATH)/sflt_glibc_jdk.a -Xlinker -z -Xlinker muldefs ++ ifneq ($(EXT_LIBS_PATH),) ++ EXTRA_LIBS += $(EXT_LIBS_PATH)/sflt_glibc_jdk.a -Xlinker -z -Xlinker muldefs ++ endif + endif + endif + +--- ./jdk/make/common/Defs-linux.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Defs-linux.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -426,6 +426,7 @@ + override LIBDL = -ldl + override MOOT_PRIORITIES = true + override NO_INTERRUPTIBLE_IO = true ++override OPENWIN_HOME = $(X11_PATH) + ifeq ($(ARCH), amd64) + override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 + else +--- ./jdk/make/common/Defs-macosx.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Defs-macosx.gmk 2014-06-06 19:56:29.000000000 -0700 +@@ -397,11 +397,14 @@ + INCLUDE_SA = true + endif + +-ifdef CROSS_COMPILE_ARCH +- # X11 headers are not under /usr/include +- OTHER_CFLAGS += -I$(OPENWIN_HOME)/include +- OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include +- OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include +-endif ++# X11 headers are not under /usr/include ++OTHER_CFLAGS += -I$(OPENWIN_HOME)/include ++OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include ++OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include ++ ++# Use unlimited select ++OTHER_CFLAGS += -D_DARWIN_UNLIMITED_SELECT ++OTHER_CXXFLAGS += -D_DARWIN_UNLIMITED_SELECT ++OTHER_CPPFLAGS += -D_DARWIN_UNLIMITED_SELECT + + LIB_LOCATION ?= $(LIBDIR) +--- ./jdk/make/common/Defs-solaris.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Defs-solaris.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -753,6 +753,9 @@ + # Network Services library + LIBNSL = -lnsl + ++# Dynamic Loading library ++LIBDL = -ldl ++ + # service configuration facility library + LIBSCF = -lscf + +--- ./jdk/make/common/Defs.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Defs.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -179,15 +179,15 @@ + + ifdef ALT_FREETYPE_LIB_PATH + FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH) +- ifeq ($(PLATFORM), macosx) ++ ifneq (,$(findstring $(PLATFORM), bsd macosx)) + USING_SYSTEM_FT_LIB=true + endif + else + ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) + FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib + else +- ifeq ($(PLATFORM), macosx) +- FREETYPE_LIB_PATH = /usr/X11R6/lib ++ ifneq (,$(findstring $(PLATFORM), bsd macosx)) ++ FREETYPE_LIB_PATH = $(X11_PATH)/lib + else + FREETYPE_LIB_PATH = /usr/lib + endif +@@ -201,8 +201,8 @@ + ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) + FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include + else +- ifeq ($(PLATFORM), macosx) +- FREETYPE_HEADERS_PATH = /usr/X11R6/include ++ ifneq (,$(findstring $(PLATFORM), bsd macosx)) ++ FREETYPE_HEADERS_PATH = $(X11_PATH)/include + else + FREETYPE_HEADERS_PATH = /usr/include + endif +@@ -258,6 +258,10 @@ + LDLIBS_COMMON = -pthread + endif + ++ ifeq ($(PLATFORM), bsd) ++ LDLIBS_COMMON = -pthread ++ endif ++ + endif # PROGRAM + + LDLIBS_COMMON += $(EXTRA_LIBS) +@@ -400,7 +404,7 @@ + # We define an intermediate variable for Java files because + # we use its value later to help define $SOURCEPATH + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes)) + else + VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes +--- ./jdk/make/common/Library.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Library.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -299,8 +299,12 @@ + ifeq ($(PLATFORM), solaris) + $(STRIP) -x $@ + else +- # assume Linux +- $(STRIP) -g $@ ++ ifeq ($(PLATFORM), linux) ++ $(STRIP) -g $@ ++ else ++ # assume BSD ++ $(STRIP) -S $@ ++ endif + endif + # implied else here is no stripping at all + endif +--- ./jdk/make/common/Mapfile-vers.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Mapfile-vers.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -76,7 +76,7 @@ + + endif # PLATFORM + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + + ifeq ($(VARIANT), OPT) + # OPT build MUST have a mapfile? +--- ./jdk/make/common/Program.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Program.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -95,23 +95,31 @@ + endif # SYSTEM_ZLIB + endif # PLATFORM + ++ifeq ($(PLATFORM), bsd) ++ LDFLAGS += -Wl,--whole-archive ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ LDFLAGS += -Wl,--no-whole-archive ++# Work-around an dlsym(RTLD_DEFAULT) bug in at least FreeBSD & OpenBSD ++ LDFLAGS += -Wl,--export-dynamic ++ ifeq ($(SYSTEM_ZLIB),true) ++ OTHER_LDLIBS += -lz ++ endif ++endif #PLATFORM ++ + ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems + LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli + OTHER_LDLIBS += -ljli + ifeq ($(PLATFORM), solaris) + ifeq ($(ARCH_DATA_MODEL), 32) + LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli +- LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH)/jli + else # ! ARCH_DATA_MODEL 64-bit + LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli +- LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH)/jli + endif # ARCH_DATA_MODEL + endif # PLATFORM SOLARIS + ifeq ($(PLATFORM), linux) + LDFLAGS += $(LDFLAG_Z_ORIGIN) + LDFLAGS += -Wl,--allow-shlib-undefined + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli +- LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli + endif # PLATFORM LINUX + endif # PLATFORM linux solaris + +@@ -226,6 +234,11 @@ + INFO_PLIST_FILE= + endif # MACOSX + ++ ifeq ($(PLATFORM), bsd) ++ THREADLIBS = -pthread ++ OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"' ++ endif ++ + # + # This rule only applies on unix. It supports quantify and its ilk. + # +@@ -280,8 +293,12 @@ + ifeq ($(PLATFORM), solaris) + $(STRIP) -x $@ + else +- # assume Linux +- $(STRIP) -g $@ ++ ifeq ($(PLATFORM), linux) ++ $(STRIP) -g $@ ++ else ++ # assume BSD ++ $(STRIP) -S $@ ++ endif + endif + # implied else here is no stripping at all + endif +@@ -349,7 +366,9 @@ + + + ifneq ($(PLATFORM), windows) +- HAVE_GETHRTIME=true ++ ifneq ($(PLATFORM), bsd) ++ HAVE_GETHRTIME=true ++ endif + endif #PLATFORM + + ifeq ($(HAVE_GETHRTIME),true) +@@ -359,12 +378,10 @@ + OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin + ifeq ($(PLATFORM), macosx) + OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin +- ifneq ($(SYSTEM_ZLIB), true) +- OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +- endif # SYSTEM_ZLIB +-else # PLATFORM !MACOSX ++endif # PLATFORM ++ifneq ($(SYSTEM_ZLIB), true) + OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +-endif ++endif # SYSTEM_ZLIB + + OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"' + VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"' +--- ./jdk/make/common/Release-macosx.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Release-macosx.gmk 2014-06-06 19:56:29.000000000 -0700 +@@ -58,6 +58,9 @@ + jdk-bundle-setup: + $(RM) -r $(JDK_BUNDLE_DIR) + ++jdk-server-bundle-setup: ++ $(RM) -r $(JDK_SERVER_BUNDLE_DIR) ++ + jre-bundle-files: + $(MKDIR) -p $(JRE_BUNDLE_DIR)/MacOS + ln -s ../Home/lib/jli/libjli.dylib $(JRE_BUNDLE_DIR)/MacOS/ +@@ -79,6 +82,6 @@ + $(SED) -e "s/@@ID@@/$(BUNDLE_ID_JDK)/g" -e "s/@@NAME@@/$(BUNDE_NAME_JDK)/g" -e "s/@@INFO@@/$(BUNDLE_INFO_JDK)/g" -e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" -e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" -e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" < $(MACOSX_SRC)/bundle/JDK-Info.plist > $(JDK_SERVER_BUNDLE_DIR)/Info.plist + /usr/bin/SetFile -a B $(JDK_SERVER_BUNDLE_DIR)/../ + +-EXTRA_IMAGE_TARGETS += jre-bundle-setup jdk-bundle-setup jre-bundle-files jdk-bundle-files jdk-server-bundle-files ++EXTRA_IMAGE_TARGETS += jre-bundle-setup jdk-bundle-setup jdk-server-bundle-setup jre-bundle-files jdk-bundle-files jdk-server-bundle-files + + .PHONY: $(EXTRA_JRE_TARGETS) $(EXTRA_IMAGE_TARGETS) +--- ./jdk/make/common/Release.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Release.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -180,6 +180,12 @@ + JA_DIRNAME=ja_JP.UTF-8 + endif # linux + ++ifeq ($(PLATFORM), bsd) ++ MANBASEDIRS=$(JDK_TOPDIR)/src/linux/doc $(IMPORTDOCDIR) ++ MAN1SUBDIR=man ++ JA_DIRNAME=ja_JP.UTF-8 ++endif # linux ++ + define copy-man-pages + $(MKDIR) -p $1/man/man1 + for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ +@@ -402,25 +408,9 @@ + 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 ++ifeq ($(BUILD_JFR), true) + JFR_CLASSES_DIRS= \ + com/oracle/jrockit/jfr \ + oracle/jrockit/jfr \ +@@ -629,7 +619,7 @@ + $(ECHO) "sun/tools/jstack/" >> $@ + $(ECHO) "sun/tools/jinfo/" >> $@ + $(ECHO) "sun/tools/jmap/" >> $@ +-ifdef BUILD_JFR ++ifeq ($(BUILD_JFR), true) + $(ECHO) "com/oracle/jrockit/jfr/" >> $@ + $(ECHO) "com/oracle/jrockit/jfr/client/" >> $@ + $(ECHO) "com/oracle/jrockit/jfr/management/" >> $@ +@@ -668,7 +658,7 @@ + + # Create jfr.jar + JFR_JAR= +-ifdef BUILD_JFR ++ifeq ($(BUILD_JFR), true) + JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar + $(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE) + $(prep-target) +@@ -852,10 +842,6 @@ + $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \ + -o meta-index *.jar + @$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup) +-ifeq ($(PLATFORM), macosx) +- @#install jobjc, apple mac only +- $(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar +-endif # macosx + ifeq ($(PLATFORM), windows) + @# Remove certain *.lib files + $(CD) $(JRE_IMAGE_DIR)/lib && \ +@@ -982,6 +968,11 @@ + endif + $(RM) -rf $(JDK_IMAGE_DIR)/jre/man + $(CHMOD) a+rx `$(FIND) $(JDK_IMAGE_DIR) -type d` ++ ifneq (,$(findstring $(PLATFORM), linux solaris)) # If linux or solaris ++ ($(CD) $(LIBDIR)/.. && $(TAR) cf - \ ++ `$(FIND) lib -name $(LIB_PREFIX)jli.$(LIB_SUFFIX) -print `) | \ ++ ($(CD) $(JDK_IMAGE_DIR) && $(TAR) xf -) ++ endif # PLATFORM + + initial-image-jdk64-bindemos: + for dir in bin demo ; do \ +@@ -1025,12 +1016,18 @@ + FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \ + $(wildcard $(PLATFORM_SRC)/bin/java_md*) + ++ifeq ($(OS_VENDOR), OpenBSD) ++ FILES_FROM_ARG=-I ++else ++ FILES_FROM_ARG=-T ++endif ++ + # Standard jdk image + initial-image-jdk:: initial-image-jdk-setup \ + initial-image-jdk-db \ + $(JDK_DOCFILES) \ + $(JDK_DEMOS_AND_SAMPLES_DOCFILES) +- $(MKDIR) $(JDK_IMAGE_DIR)/lib ++ $(MKDIR) -p $(JDK_IMAGE_DIR)/lib + @# + @# Copy in the jars in lib that only belong in the JDK + @# +@@ -1112,7 +1109,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. + +- ifneq (,$(findstring $(PLATFORM), linux macosx)) ++ ifneq (,$(findstring $(PLATFORM), linux macosx bsd)) + for d in $(SOURCE_DIRS); do \ + $(RM) $(ABS_TEMPDIR)/src-files.list; \ + ($(CD) $$d && \ +@@ -1125,7 +1122,7 @@ + done ; \ + ) ; \ + if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ +- ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \ ++ ($(CD) $$d && $(TAR) cf - $(FILES_FROM_ARG) $(ABS_TEMPDIR)/src-files.list ) \ + | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \ + fi; \ + done +--- ./jdk/make/common/Rules.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/Rules.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -51,7 +51,7 @@ + # + # All source tree areas for java/properties files (a few may be closed) + # +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + ifdef OPENJDK + ALL_CLASSES_SRC = $(call JavaSrcDirList,,classes) + else +@@ -212,7 +212,7 @@ + $(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java + @$(add-java-file) + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + # TODO(cpc): need to document why this is necessary... + $(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java + @$(add-java-file) +--- ./jdk/make/common/shared/Compiler-gcc.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/shared/Compiler-gcc.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -72,6 +72,21 @@ + + endif + ++ifeq ($(PLATFORM), bsd) ++ ++ # Settings specific to BSD ++ CC = $(COMPILER_PATH)gcc ++ CPP = $(COMPILER_PATH)gcc -E ++ CXX = $(COMPILER_PATH)g++ ++ ++ # Option used to create a shared library ++ ifeq ($(OS_VENDOR), Apple) ++ SHARED_LIBRARY_FLAG = -dynamiclib ++ else ++ SHARED_LIBRARY_FLAG = -shared ++ endif ++endif ++ + ifeq ($(PLATFORM), solaris) + + # 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 2014-06-06 19:56:34.000000000 -0700 +@@ -0,0 +1,267 @@ ++# ++# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# ++ ++# ++# Definitions for BSD. ++# ++ ++# Default for COMPILER_WARNINGS_FATAL on BSD (C & C++ compiler warnings) ++ifndef COMPILER_WARNINGS_FATAL ++ COMPILER_WARNINGS_FATAL=false ++endif ++ ++# BSD should use parallel compilation for best build times ++ifndef COMPILE_APPROACH ++ COMPILE_APPROACH = parallel ++endif ++ ++# Indication that we are doing an incremental build. ++# This may trigger the creation of make depend files. ++ifndef INCREMENTAL_BUILD ++ INCREMENTAL_BUILD = false ++endif ++ ++# FullPath just makes sure it never ends with a / and no duplicates ++define FullPath ++$(shell cd $1 2> $(DEV_NULL) && pwd) ++endef ++ ++# OptFullPath: Absolute path name of a dir that might not initially exist. ++define OptFullPath ++$(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) ++ ++# UNIXCOMMAND_PATH: path to where the most common Unix commands are. ++# NOTE: Must end with / so that it could be empty, allowing PATH usage. ++ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined" ++ UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH)) ++else ++ UNIXCOMMAND_PATH = /bin/ ++endif ++ ++# USRBIN_PATH: path to where the most common Unix commands are. ++# NOTE: Must end with / so that it could be empty, allowing PATH usage. ++ifneq "$(origin ALT_USRBIN_PATH)" "undefined" ++ USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH)) ++else ++ USRBIN_PATH = /usr/bin/ ++endif ++ ++# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found ++# NOTE: Must end with / so that it could be empty, allowing PATH usage. ++ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined" ++ UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH)) ++else ++ UNIXCCS_PATH = /usr/ccs/bin/ ++endif ++ ++# SLASH_JAVA: location of all network accessable files ++ifdef ALT_SLASH_JAVA ++ SLASH_JAVA :=$(ALT_SLASH_JAVA) ++else ++ SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET) ++endif ++ ++# JDK_DEVTOOLS_DIR: common path for all the java devtools ++ifdef ALT_JDK_DEVTOOLS_DIR ++ JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR) ++else ++ JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools ++endif ++ ++# COMPILER_PATH: path to where the compiler and tools are installed. ++# NOTE: Must end with / so that it could be empty, allowing PATH usage. ++ifneq "$(origin ALT_COMPILER_PATH)" "undefined" ++ COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH)) ++else ++ COMPILER_PATH =/usr/bin/ ++endif ++ ++# OPENWIN_HOME: path to where the X11 environment is installed. ++# NOTE: Must end with / so that it could be empty, allowing PATH usage. ++ifneq ($(ALT_OPENWIN_HOME),) ++ OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME)) ++else ++ OPENWIN_HOME =$(X11_PATH) ++endif ++ ++# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.) ++# NOTE: Must end with / so that it could be empty, allowing PATH usage. ++ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined" ++ DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH)) ++else ++ DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/ ++endif ++ ++# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK. ++# _BOOTDIR2: Second choice ++ifndef ALT_BOOTDIR ++ _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH) ++ _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION) ++endif ++ ++# Always build headless on BSD ++BUILD_HEADLESS = true ++LIBM=-lm ++ ++# Set ZLIB_LIBS if not already set ++ifeq ("$(ZLIB_LIBS)", "") ++ ZLIB_LIBS=-lz ++endif ++ ++_CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include ++ ++# Import JDK images allow for partial builds, components not built are ++# imported (or copied from) these import areas when needed. ++ ++# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for ++# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc. ++ifdef ALT_BUILD_JDK_IMPORT_PATH ++ BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH)) ++else ++ BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES) ++endif ++BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH) ++ ++# JDK_IMPORT_PATH: location of JDK install tree (this version) to import ++ifdef ALT_JDK_IMPORT_PATH ++ JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH)) ++else ++ JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT) ++endif ++JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH) ++ ++# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files ++ifdef ALT_HOTSPOT_IMPORT_PATH ++ HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH)) ++else ++ HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH) ++endif ++HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH) ++ ++# HOTSPOT_CLIENT_PATH: location of client jvm library file. ++ifeq ($(ARCH_DATA_MODEL), 32) ++ ifdef ALT_HOTSPOT_CLIENT_PATH ++ HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH)) ++ else ++ HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client ++ endif ++ HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH) ++endif ++ ++# HOTSPOT_SERVER_PATH: location of server jvm library file. ++ifdef ALT_HOTSPOT_SERVER_PATH ++ HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH)) ++else ++ HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server ++endif ++HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH) ++ ++# Special define for checking the binaries ++ ++# Debug builds should downgrade warnings to just info ++MAPFILE_WARNING-DBG=INFO ++MAPFILE_WARNING-OPT=WARNING ++MAPFILE_WARNING-=WARNING ++MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT)) ++ ++# Macro to check it's input file for banned dependencies and verify the ++# binary built properly. Relies on process exit code. ++ifndef CROSS_COMPILE_ARCH ++ifeq ($(OS_VENDOR), OpenBSD) ++define binary_file_verification # binary_file ++( \ ++ $(ECHO) "Checking for mapfile use in: $1" && \ ++ if [ "`$(OBJDUMP) -T $1 | $(EGREP) '[0-9a-f]* g *DF \.text.*SUNWprivate'`" = "" ] ; then \ ++ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \ ++ fi && \ ++ $(ECHO) "Library loads for: $1" && \ ++ $(LDD) $1 && \ ++ $(ECHO) "RUNPATH for: $1" && \ ++ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \ ++) || true ++endef ++else ++define binary_file_verification # binary_file ++( \ ++ $(ECHO) "Checking for mapfile use in: $1" && \ ++ if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \ ++ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \ ++ fi && \ ++ $(ECHO) "Library loads for: $1" && \ ++ $(LDD) $1 && \ ++ $(ECHO) "RUNPATH for: $1" && \ ++ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \ ++) ++endef ++endif ++else ++define binary_file_verification ++( \ ++ $(ECHO) "Skipping binary file verification for cross-compile build" \ ++) ++endef ++endif ++ +--- ./jdk/make/common/shared/Defs-utils.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/shared/Defs-utils.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -74,6 +74,13 @@ + UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) + endif + ++ifeq ($(PLATFORM),bsd) ++ UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) ++ UTILS_USR_BIN_PATH=$(USRBIN_PATH) ++ UTILS_CCS_BIN_PATH=$(USRBIN_PATH) ++ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) ++endif ++ + # Utilities + ifdef CROSS_COMPILE_ARCH + AR = $(COMPILER_PATH)ar +@@ -251,3 +258,35 @@ + # Builtin shell command, no -e option needed + ECHO = echo + endif ++ ++# BSD specific ++ifeq ($(PLATFORM),bsd) ++ BASENAME = $(UTILS_USR_BIN_PATH)basename ++ EGREP = $(UTILS_USR_BIN_PATH)egrep ++ EXPR = $(UTILS_COMMAND_PATH)expr ++ FMT = $(UTILS_USR_BIN_PATH)fmt ++ GREP = $(UTILS_USR_BIN_PATH)grep ++ GUNZIP = $(UTILS_USR_BIN_PATH)gunzip ++ ID = $(UTILS_USR_BIN_PATH)id ++ MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt ++ SED = $(UTILS_USR_BIN_PATH)sed ++ SORT = $(UTILS_USR_BIN_PATH)sort ++ TEST = $(UTILS_COMMAND_PATH)test ++ TOUCH = $(UTILS_USR_BIN_PATH)touch ++ TRUE = $(UTILS_USR_BIN_PATH)true ++ UNAME = $(UTILS_USR_BIN_PATH)uname ++ UNZIP = $(UTILS_DEVTOOL_PATH)unzip ++ # BSD OS_VENDOR specific ++ ifeq ($(OS_VENDOR), OpenBSD) ++ NAWK = $(UTILS_USR_BIN_PATH)awk ++ OBJDUMP = $(UTILS_USR_BIN_PATH)objdump ++ else ++ CPIO = $(UTILS_USR_BIN_PATH)cpio ++ TAR = $(UTILS_USR_BIN_PATH)tar ++ endif ++ ifeq ($(OS_VENDOR), NetBSD) ++ NAWK = $(UTILS_USR_BIN_PATH)awk ++ ZIPEXE = $(UTILS_DEVTOOL_PATH)zip ++ UNZIP = $(UTILS_DEVTOOL_PATH)unzip ++ endif ++endif +--- ./jdk/make/common/shared/Defs-versions.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/shared/Defs-versions.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -44,6 +44,11 @@ + override CC_VERSION = gcc + endif + ++# BSD uses GNU compilers by default ++ifeq ($(PLATFORM), bsd) ++ override CC_VERSION = gcc ++endif ++ + # Mac OS X uses LLVM by default + ifeq ($(PLATFORM), macosx) + override CC_VERSION = llvm +@@ -169,6 +174,13 @@ + endif + endif + ++# BSD specific ++ifeq ($(PLATFORM), macosx) ++ REQUIRED_COMPILER_NAME = GCC4 ++ REQUIRED_COMPILER_VERSION = GCC4 ++ REQUIRED_CC_VER = 4.2.1 ++endif ++ + # Mac specific + ifeq ($(PLATFORM), macosx) + REQUIRED_OS_NAME = Darwin +--- ./jdk/make/common/shared/Defs.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/shared/Defs.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -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 + # macosx trees, depending on the component. +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + define JavaSrcDirList + $(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2) + endef +@@ -296,10 +296,8 @@ + RELEASE = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE) + endif + +-# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set +-ifdef BUILD_NUMBER +- FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) +-else ++# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set ++ifndef BUILD_NUMBER + BUILD_NUMBER = b00 + ifndef USER_RELEASE_SUFFIX + BUILD_DATE := $(shell $(DATE) '+%Y_%m_%d_%H_%M') +@@ -307,6 +305,12 @@ + USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' ) + endif + export USER_RELEASE_SUFFIX ++endif ++ ++# FULL_VERSION is RELEASE and BUILD_NUMBER if USER_RELEASE_SUFFIX is not set ++ifndef USER_RELEASE_SUFFIX ++ FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER) ++else + FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) + endif + +--- ./jdk/make/common/shared/Platform.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/common/shared/Platform.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -298,6 +298,85 @@ + # How much RAM does this machine have: + endif + ++ifeq ($(SYSTEM_UNAME), FreeBSD) ++ PLATFORM = bsd ++ OS_NAME = freebsd ++ OS_VENDOR = FreeBSD ++ REQUIRED_OS_VERSION = 6.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), NetBSD) ++ PLATFORM = bsd ++ OS_NAME = netbsd ++ OS_VENDOR = NetBSD ++ REQUIRED_OS_VERSION = 3.0 ++endif ++ ++ifeq ($(SYSTEM_UNAME), OpenBSD) ++ PLATFORM = bsd ++ OS_NAME = openbsd ++ OS_VENDOR = OpenBSD ++ REQUIRED_OS_VERSION = 4.9 ++endif ++ ++# Platform settings specific to BSD ++ifeq ($(PLATFORM), bsd) ++ OS_VERSION := $(shell uname -r) ++ # Arch and OS name/version ++ mach := $(shell uname -m) ++ archExpr = case "$(mach)" in \ ++ i[3-9]86) \ ++ echo i586 \ ++ ;; \ ++ sparc64) \ ++ echo sparcv9 \ ++ ;; \ ++ sparc*) \ ++ echo sparc \ ++ ;; \ ++ x86_64) \ ++ echo amd64 \ ++ ;; \ ++ "Power Macintosh") \ ++ echo ppc \ ++ ;; \ ++ *) \ ++ echo $(mach) \ ++ ;; \ ++ esac ++ ARCH := $(shell $(archExpr) ) ++ ARCH_FAMILY := $(ARCH) ++ ++ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64 ++ ifneq (,$(findstring $(ARCH), i586 sparc ppc)) ++ ARCH_DATA_MODEL=32 ++ else ++ ARCH_DATA_MODEL=64 ++ endif ++ ++ # Need to maintain the jre/lib/i386 location for 32-bit Intel ++ ifeq ($(ARCH), i586) ++ LIBARCH = i386 ++ else ++ LIBARCH = $(ARCH) ++ endif ++ ++ # Value of Java os.arch property ++ ARCHPROP = $(LIBARCH) ++ ++ # Suffix for file bundles used in previous release ++ BUNDLE_FILE_SUFFIX=.tar.gz ++ # Minimum disk space needed as determined by running 'du -sk' on ++ # a fully built workspace. ++ REQUIRED_FREE_SPACE=1500000 ++ # How much RAM does this machine have: ++ ifeq ($(OS_VENDOR), OpenBSD) ++ MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' ) ++ else ++ MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' ) ++ endif ++endif ++ + # Windows with and without CYGWIN will be slightly different + ifeq ($(SYSTEM_UNAME), Windows_NT) + PLATFORM = windows +--- ./jdk/make/java/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -53,14 +53,10 @@ + endif + endif # PLATFORM + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + SUBDIRS += jexec + endif # PLATFORM + +-ifeq ($(PLATFORM), macosx) +- SUBDIRS += jobjc +-endif # PLATFORM +- + include $(BUILDDIR)/common/Subdirs.gmk + + all build clean clobber:: +--- ./jdk/make/java/instrument/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/instrument/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -104,12 +104,24 @@ + # equivalent of strcasecmp is stricmp on Windows + CPPFLAGS_COMMON += -Dstrcasecmp=stricmp + else +-ifneq (,$(findstring $(PLATFORM), macosx)) +- ifneq ($(ARCH), universal) +- LDFLAGS += -Wl,-all_load ++ifneq (,$(findstring $(PLATFORM), macosx bsd)) ++ ifeq ($(OS_VENDOR), Apple) ++ ifneq ($(ARCH), universal) ++ LDFLAGS += -Wl,-all_load ++ endif ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ OTHER_LDLIBS += -liconv ++ else ++ LDFLAGS += -Wl,--whole-archive ++ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a ++ LDFLAGS += -Wl,--no-whole-archive ++ ifneq ($(OS_NAME), netbsd) ++# Use CPPFLAGS instead of OTHER_INCLUDES to force this last ++ CPPFLAGS += -I$(PACKAGE_PATH)/include ++ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv ++ endif + endif +- LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a +- OTHER_LDLIBS += -liconv ++ + ifeq ($(SYSTEM_ZLIB), true) + OTHER_LDLIBS += -lz + endif +--- ./jdk/make/java/java/Exportedfiles.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/Exportedfiles.gmk 2014-04-19 01:27:12.000000000 -0700 +@@ -50,6 +50,7 @@ + java/lang/SecurityManager.java \ + java/lang/Shutdown.java \ + java/lang/Package.java \ ++ java/lang/UNIXProcess.java \ + java/lang/ref/Finalizer.java \ + java/lang/reflect/AccessibleObject.java \ + java/lang/reflect/Field.java \ +--- ./jdk/make/java/java/FILES_c.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/FILES_c.gmk 2014-06-06 19:56:29.000000000 -0700 +@@ -37,7 +37,6 @@ + FileInputStream.c \ + FileInputStream_md.c \ + FileOutputStream_md.c \ +- Finalizer.c \ + Float.c \ + Object.c \ + ObjectOutputStream.c \ +--- ./jdk/make/java/java/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -84,6 +84,7 @@ + java/util/prefs/FileSystemPreferencesFactory.java \ + + FILES_c += UNIXProcess_md.c \ ++ childproc.c \ + UnixFileSystem_md.c \ + canonicalize_md.c \ + TimeZone.c \ +@@ -101,6 +102,7 @@ + java/util/prefs/MacOSXPreferencesFactory.java + + CFLAGS_$(VARIANT)/java_props_md.o = -Os -x objective-c ++CFLAGS_$(VARIANT)/java_props_macosx.o = -Os -x objective-c + endif + + # +@@ -175,9 +177,11 @@ + # + ifneq ($(PLATFORM), windows) + ifneq ($(PLATFORM), macosx) ++ifneq ($(PLATFORM), bsd) + HAVE_ALTZONE=true + endif + endif ++endif + + ifeq ($(HAVE_ALTZONE),true) + OTHER_CPPFLAGS += -DHAVE_ALTZONE +@@ -221,6 +225,7 @@ + ifeq ($(PLATFORM), macosx) + OTHER_LDLIBS += \ + -framework CoreFoundation \ ++ -framework Foundation \ + -framework Security \ + -framework SystemConfiguration + endif +@@ -451,3 +456,39 @@ + clean:: + $(RM) $(GENSRCDIR)/sun/util/CoreResourceBundleControl.java + ++ ++HELPER_EXE = $(LIBDIR)/$(LIBARCH)/jspawnhelper ++BUILDHELPER = ++ifeq ($(PLATFORM), solaris) ++ BUILDHELPER = 1 ++endif ++ifeq ($(PLATFORM), macosx) ++ HELPER_EXE = $(LIBDIR)/jspawnhelper ++ BUILDHELPER = 1 ++endif ++ifeq ($(PLATFORM), bsd) ++ BUILDHELPER = 1 ++endif ++ ++ARCHFLAG = ++ifeq ($(ARCH_DATA_MODEL), 64) ++ARCHFLAG = -m64 ++endif ++ ++ifdef BUILDHELPER ++ ++HELPER_EXE_FILES_c = jspawnhelper.c ++HELPER_EXE_FILES_o = $(OBJDIR)/jspawnhelper.o \ ++ $(OBJDIR)/childproc.o ++ ++$(HELPER_EXE): $(HELPER_EXE_FILES_o) ++ $(CC) $(ARCHFLAG) $(HELPER_EXE_FILES_o) \ ++ -o $(TEMPDIR)/jspawnhelper ++ $(CP) $(TEMPDIR)/jspawnhelper $(HELPER_EXE) ++ ++build: $(HELPER_EXE) ++ ++clean clobber:: ++ $(RM) $(HELPER_EXE_FILES_o) $(HELPER_EXE) ++ ++endif #BUILDHELPER +--- ./jdk/make/java/java/genlocales.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/genlocales.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -93,18 +93,66 @@ + + 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 ++ ++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) +- @$(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/java/mapfile-vers 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/mapfile-vers 2014-06-06 19:56:29.000000000 -0700 +@@ -121,6 +121,7 @@ + Java_java_io_UnixFileSystem_setReadOnly; + Java_java_io_UnixFileSystem_setPermission; + Java_java_lang_Class_forName0; ++ Java_java_lang_Class_getCheckMemberAccessMethod; + Java_java_lang_Class_getPrimitiveClass; + Java_java_lang_Class_isAssignableFrom; + Java_java_lang_Class_isInstance; +@@ -140,7 +141,6 @@ + Java_java_lang_Double_doubleToRawLongBits; + Java_java_lang_reflect_Proxy_defineClass0; + Java_java_lang_Shutdown_runAllFinalizers; +- Java_java_lang_ref_Finalizer_invokeFinalizeMethod; + Java_java_lang_Float_intBitsToFloat; + Java_java_lang_Float_floatToRawIntBits; + Java_java_lang_StrictMath_IEEEremainder; +@@ -215,7 +215,7 @@ + Java_java_lang_Throwable_fillInStackTrace; + Java_java_lang_Throwable_getStackTraceDepth; + Java_java_lang_Throwable_getStackTraceElement; +- Java_java_lang_UNIXProcess_initIDs; ++ Java_java_lang_UNIXProcess_init; + Java_java_lang_UNIXProcess_waitForProcessExit; + Java_java_lang_UNIXProcess_forkAndExec; + Java_java_lang_UNIXProcess_destroyProcess; +--- ./jdk/make/java/java/reorder-i586 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/reorder-i586 2014-06-06 19:56:29.000000000 -0700 +@@ -77,7 +77,6 @@ + text: .text%JNU_GetEnv; + text: .text%Java_java_io_UnixFileSystem_checkAccess; + text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0; +-text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod; + text: .text%Java_java_io_FileInputStream_available; + text: .text%Java_java_lang_reflect_Array_newArray; + text: .text%Java_java_lang_Throwable_getStackTraceDepth; +--- ./jdk/make/java/java/reorder-sparc 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/reorder-sparc 2014-06-06 19:56:29.000000000 -0700 +@@ -87,7 +87,6 @@ + text: .text%throwFileNotFoundException; + text: .text%JNU_NotifyAll; + # Test LoadFrame +-text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod; + text: .text%JNU_CallMethodByName; + text: .text%JNU_CallMethodByNameV; + text: .text%Java_java_io_UnixFileSystem_createDirectory; +--- ./jdk/make/java/java/reorder-sparcv9 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/java/reorder-sparcv9 2014-06-06 19:56:29.000000000 -0700 +@@ -77,7 +77,6 @@ + text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; + text: .text%JNU_GetEnv; + text: .text%Java_java_io_UnixFileSystem_checkAccess; +-text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod; + text: .text%Java_java_lang_reflect_Array_newArray; + text: .text%Java_java_lang_Throwable_getStackTraceDepth; + text: .text%Java_java_lang_Throwable_getStackTraceElement; +--- ./jdk/make/java/jli/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/jli/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -119,9 +119,9 @@ + LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"' + endif # PLATFORM + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), macosx bsd)) + OTHER_CPPFLAGS += $(LIBARCH_DEFINES) -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" +-else # ! MACOSX ++else # ! MACOSX || BSD + OTHER_CPPFLAGS += $(LIBARCH_DEFINES) + endif #PLATFORM + +@@ -134,7 +134,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 +- LDLIBS = -ldl -lc ++ LDLIBS = $(LIBDL) -lc + ifeq ($(USE_PTHREADS),true) + LDLIBS += -lpthread + endif # USE_PTHREADS +--- ./jdk/make/java/management/mapfile-vers 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/management/mapfile-vers 2013-12-01 11:14:27.000000000 -0800 +@@ -53,7 +53,7 @@ + Java_sun_management_GcInfoBuilder_fillGcAttributeInfo; + Java_sun_management_GcInfoBuilder_getLastGcInfo0; + Java_sun_management_GcInfoBuilder_getNumGcExtAttributes; +- Java_sun_management_HotSpotDiagnostic_dumpHeap; ++ Java_sun_management_HotSpotDiagnostic_dumpHeap0; + Java_sun_management_HotspotThread_getInternalThreadCount; + Java_sun_management_HotspotThread_getInternalThreadTimes0; + Java_sun_management_MemoryImpl_getMemoryManagers0; +--- ./jdk/make/java/net/FILES_c.gmk 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/net/FILES_c.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -24,20 +24,21 @@ + # + + FILES_c = \ +- DatagramPacket.c \ +- InetAddress.c \ +- Inet4Address.c \ +- Inet6Address.c \ +- NetworkInterface.c \ +- InetAddressImplFactory.c \ +- Inet4AddressImpl.c \ +- Inet6AddressImpl.c \ +- SocketInputStream.c \ +- SocketOutputStream.c \ +- net_util.c \ +- net_util_md.c \ +- ResolverConfigurationImpl.c \ +- DefaultProxySelector.c ++ DatagramPacket.c \ ++ InetAddress.c \ ++ Inet4Address.c \ ++ Inet6Address.c \ ++ NetworkInterface.c \ ++ InetAddressImplFactory.c \ ++ Inet4AddressImpl.c \ ++ Inet6AddressImpl.c \ ++ SocketInputStream.c \ ++ SocketOutputStream.c \ ++ net_util.c \ ++ net_util_md.c \ ++ portconfig.c \ ++ ResolverConfigurationImpl.c \ ++ DefaultProxySelector.c + + ifeq ($(PLATFORM), linux) + FILES_c += linux_close.c +@@ -47,6 +48,10 @@ + FILES_c += bsd_close.c + endif + ++ifeq ($(OS_VENDOR), FreeBSD) ++ FILES_c += bsd_close.c ++endif ++ + ifeq ($(PLATFORM), windows) + FILES_c += TwoStacksPlainSocketImpl.c + FILES_c += DualStackPlainSocketImpl.c +--- ./jdk/make/java/net/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/net/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -83,7 +83,8 @@ + # Find platform specific native code + # + vpath %.c $(PLATFORM_SRC)/native/sun/net/dns $(PLATFORM_SRC)/native/sun/net/www/protocol/http/ntlm \ +- $(PLATFORM_SRC)/native/sun/net/sdp $(PLATFORM_SRC)/native/sun/net/spi ++ $(PLATFORM_SRC)/native/sun/net/sdp $(PLATFORM_SRC)/native/sun/net/spi \ ++ $(PLATFORM_SRC)/native/sun/net + + # + # Include rules +@@ -92,7 +93,7 @@ + + include $(BUILDDIR)/common/Library.gmk + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), macosx bsd)) + ifdef DONT_ENABLE_IPV6 + OTHER_CFLAGS += -DDONT_ENABLE_IPV6 + endif +--- ./jdk/make/java/net/mapfile-vers 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/net/mapfile-vers 2014-01-18 12:16:22.000000000 -0800 +@@ -26,84 +26,86 @@ + # Define public interface. + + SUNWprivate_1.1 { +- global: +- JNI_OnLoad; +- Java_java_net_PlainSocketImpl_socketListen; +- Java_java_net_PlainDatagramSocketImpl_getTTL; +- Java_java_net_PlainDatagramSocketImpl_init; +- Java_java_net_SocketOutputStream_socketWrite0; +- Java_java_net_PlainSocketImpl_socketCreate; +- Java_java_net_PlainSocketImpl_socketAvailable; +- Java_java_net_PlainDatagramSocketImpl_join; +- Java_java_net_PlainDatagramSocketImpl_socketGetOption; +- Java_java_net_InetAddress_init; +- Java_java_net_Inet4Address_init; +- Java_java_net_Inet6Address_init; +- Java_java_net_PlainDatagramSocketImpl_setTTL; +- Java_java_net_PlainDatagramSocketImpl_socketSetOption; +- Java_java_net_PlainDatagramSocketImpl_bind0; +- Java_java_net_PlainSocketImpl_socketAccept; +- Java_java_net_DatagramPacket_init; +- Java_java_net_PlainDatagramSocketImpl_leave; +- Java_java_net_SocketInputStream_socketRead0; +- Java_java_net_InetAddressImplFactory_isIPv6Supported; +- Java_java_net_Inet4AddressImpl_getLocalHostName; +- Java_java_net_Inet4AddressImpl_lookupAllHostAddr; +- Java_java_net_Inet4AddressImpl_getHostByAddr; +- Java_java_net_Inet4AddressImpl_isReachable0; +- Java_java_net_Inet6AddressImpl_getLocalHostName; +- Java_java_net_Inet6AddressImpl_lookupAllHostAddr; +- Java_java_net_Inet6AddressImpl_getHostByAddr; +- Java_java_net_Inet6AddressImpl_isReachable0; +- Java_java_net_NetworkInterface_init; +- Java_java_net_NetworkInterface_getByName0; +- Java_java_net_NetworkInterface_getByIndex0; +- Java_java_net_NetworkInterface_getByInetAddress0; +- Java_java_net_NetworkInterface_getAll; +- Java_java_net_NetworkInterface_isUp0; +- Java_java_net_NetworkInterface_isLoopback0; +- Java_java_net_NetworkInterface_isP2P0; +- Java_java_net_NetworkInterface_supportsMulticast0; +- Java_java_net_NetworkInterface_getMacAddr0; +- Java_java_net_NetworkInterface_getMTU0; +- Java_java_net_PlainDatagramSocketImpl_send; +- Java_java_net_PlainSocketImpl_socketClose0; +- Java_java_net_SocketOutputStream_init; +- Java_java_net_PlainDatagramSocketImpl_peek; +- Java_java_net_PlainDatagramSocketImpl_peekData; +- Java_java_net_PlainSocketImpl_socketSetOption; +- Java_java_net_PlainSocketImpl_socketSendUrgentData; +- Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate; +- Java_java_net_PlainSocketImpl_socketGetOption; +- Java_java_net_PlainDatagramSocketImpl_receive0; +- Java_java_net_PlainDatagramSocketImpl_connect0; +- Java_java_net_PlainDatagramSocketImpl_disconnect0; +- Java_java_net_PlainDatagramSocketImpl_datagramSocketClose; +- Java_java_net_PlainSocketImpl_initProto; +- Java_java_net_PlainSocketImpl_socketBind; +- Java_java_net_PlainSocketImpl_socketShutdown; +- Java_java_net_SocketInputStream_init; +- Java_java_net_PlainSocketImpl_socketConnect; +- Java_java_net_PlainDatagramSocketImpl_getTimeToLive; +- Java_java_net_PlainDatagramSocketImpl_setTimeToLive; +- Java_sun_net_dns_ResolverConfigurationImpl_localDomain0; +- Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0; +- Java_sun_net_sdp_SdpSupport_convert0; +- Java_sun_net_sdp_SdpSupport_create0; +- Java_sun_net_spi_DefaultProxySelector_init; +- Java_sun_net_spi_DefaultProxySelector_getSystemProxy; +- NET_AllocSockaddr; +- NET_SockaddrToInetAddress; ++ global: ++ JNI_OnLoad; ++ Java_java_net_PlainSocketImpl_socketListen; ++ Java_java_net_PlainDatagramSocketImpl_getTTL; ++ Java_java_net_PlainDatagramSocketImpl_init; ++ Java_java_net_SocketOutputStream_socketWrite0; ++ Java_java_net_PlainSocketImpl_socketCreate; ++ Java_java_net_PlainSocketImpl_socketAvailable; ++ Java_java_net_PlainDatagramSocketImpl_join; ++ Java_java_net_PlainDatagramSocketImpl_socketGetOption; ++ Java_java_net_InetAddress_init; ++ Java_java_net_Inet4Address_init; ++ Java_java_net_Inet6Address_init; ++ Java_java_net_PlainDatagramSocketImpl_setTTL; ++ Java_java_net_PlainDatagramSocketImpl_socketSetOption; ++ Java_java_net_PlainDatagramSocketImpl_bind0; ++ Java_java_net_PlainSocketImpl_socketAccept; ++ Java_java_net_DatagramPacket_init; ++ Java_java_net_PlainDatagramSocketImpl_leave; ++ Java_java_net_SocketInputStream_socketRead0; ++ Java_java_net_InetAddressImplFactory_isIPv6Supported; ++ Java_java_net_Inet4AddressImpl_getLocalHostName; ++ Java_java_net_Inet4AddressImpl_lookupAllHostAddr; ++ Java_java_net_Inet4AddressImpl_getHostByAddr; ++ Java_java_net_Inet4AddressImpl_isReachable0; ++ Java_java_net_Inet6AddressImpl_getLocalHostName; ++ Java_java_net_Inet6AddressImpl_lookupAllHostAddr; ++ Java_java_net_Inet6AddressImpl_getHostByAddr; ++ Java_java_net_Inet6AddressImpl_isReachable0; ++ Java_java_net_NetworkInterface_init; ++ Java_java_net_NetworkInterface_getByName0; ++ Java_java_net_NetworkInterface_getByIndex0; ++ Java_java_net_NetworkInterface_getByInetAddress0; ++ Java_java_net_NetworkInterface_getAll; ++ Java_java_net_NetworkInterface_isUp0; ++ Java_java_net_NetworkInterface_isLoopback0; ++ Java_java_net_NetworkInterface_isP2P0; ++ Java_java_net_NetworkInterface_supportsMulticast0; ++ Java_java_net_NetworkInterface_getMacAddr0; ++ Java_java_net_NetworkInterface_getMTU0; ++ Java_java_net_PlainDatagramSocketImpl_send; ++ Java_java_net_PlainSocketImpl_socketClose0; ++ Java_java_net_SocketOutputStream_init; ++ Java_java_net_PlainDatagramSocketImpl_peek; ++ Java_java_net_PlainDatagramSocketImpl_peekData; ++ Java_java_net_PlainSocketImpl_socketSetOption; ++ Java_java_net_PlainSocketImpl_socketSendUrgentData; ++ Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate; ++ Java_java_net_PlainSocketImpl_socketGetOption; ++ Java_java_net_PlainDatagramSocketImpl_receive0; ++ Java_java_net_PlainDatagramSocketImpl_connect0; ++ Java_java_net_PlainDatagramSocketImpl_disconnect0; ++ Java_java_net_PlainDatagramSocketImpl_datagramSocketClose; ++ Java_java_net_PlainSocketImpl_initProto; ++ Java_java_net_PlainSocketImpl_socketBind; ++ Java_java_net_PlainSocketImpl_socketShutdown; ++ Java_java_net_SocketInputStream_init; ++ Java_java_net_PlainSocketImpl_socketConnect; ++ Java_java_net_PlainDatagramSocketImpl_getTimeToLive; ++ Java_java_net_PlainDatagramSocketImpl_setTimeToLive; ++ Java_sun_net_PortConfig_getLower0; ++ Java_sun_net_PortConfig_getUpper0; ++ Java_sun_net_dns_ResolverConfigurationImpl_localDomain0; ++ Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0; ++ Java_sun_net_sdp_SdpSupport_convert0; ++ Java_sun_net_sdp_SdpSupport_create0; ++ Java_sun_net_spi_DefaultProxySelector_init; ++ Java_sun_net_spi_DefaultProxySelector_getSystemProxy; ++ NET_AllocSockaddr; ++ NET_SockaddrToInetAddress; + NET_SockaddrEqualsInetAddress; +- NET_InetAddressToSockaddr; +- NET_GetPortFromSockaddr; +- NET_SetSockOpt; +- NET_GetSockOpt; +- NET_Bind; +- NET_MapSocketOption; +- NET_Wait; ++ NET_InetAddressToSockaddr; ++ NET_GetPortFromSockaddr; ++ NET_SetSockOpt; ++ NET_GetSockOpt; ++ NET_Bind; ++ NET_MapSocketOption; ++ NET_Wait; + ipv6_available; + +- local: +- *; ++ local: ++ *; + }; +--- ./jdk/make/java/nio/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/nio/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -263,13 +263,89 @@ + sun/nio/fs/UnixConstants.java + endif # PLATFORM = linux + ++ifeq ($(PLATFORM), bsd) ++FILES_java += \ ++ sun/nio/ch/AbstractPollSelectorImpl.java \ ++ sun/nio/ch/BsdAsynchronousChannelProvider.java \ ++ sun/nio/ch/InheritedChannel.java \ ++ sun/nio/ch/KQueue.java \ ++ sun/nio/ch/KQueueArrayWrapper.java \ ++ sun/nio/ch/KQueuePort.java \ ++ sun/nio/ch/KQueueSelectorProvider.java \ ++ sun/nio/ch/KQueueSelectorImpl.java \ ++ sun/nio/ch/PollSelectorProvider.java \ ++ sun/nio/ch/PollSelectorImpl.java \ ++ sun/nio/ch/Port.java \ ++ sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \ ++ sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \ ++ sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \ ++ \ ++ sun/nio/fs/BsdFileStore.java \ ++ sun/nio/fs/BsdFileSystem.java \ ++ sun/nio/fs/BsdFileSystemProvider.java \ ++ sun/nio/fs/BsdNativeDispatcher.java \ ++ sun/nio/fs/PollingWatchService.java \ ++ sun/nio/fs/UnixChannelFactory.java \ ++ sun/nio/fs/UnixCopyFile.java \ ++ sun/nio/fs/UnixDirectoryStream.java \ ++ sun/nio/fs/UnixException.java \ ++ sun/nio/fs/UnixFileAttributeViews.java \ ++ sun/nio/fs/UnixFileAttributes.java \ ++ sun/nio/fs/UnixFileKey.java \ ++ sun/nio/fs/UnixFileModeAttribute.java \ ++ sun/nio/fs/UnixFileStore.java \ ++ sun/nio/fs/UnixFileStoreAttributes.java \ ++ sun/nio/fs/UnixFileSystem.java \ ++ sun/nio/fs/UnixFileSystemProvider.java \ ++ sun/nio/fs/UnixMountEntry.java \ ++ sun/nio/fs/UnixNativeDispatcher.java \ ++ sun/nio/fs/UnixPath.java \ ++ sun/nio/fs/UnixSecureDirectoryStream.java \ ++ sun/nio/fs/UnixUriUtils.java \ ++ sun/nio/fs/UnixUserPrincipals.java ++ ++FILES_c += \ ++ InheritedChannel.c \ ++ NativeThread.c \ ++ PollArrayWrapper.c \ ++ UnixAsynchronousServerSocketChannelImpl.c \ ++ UnixAsynchronousSocketChannelImpl.c \ ++ \ ++ BsdNativeDispatcher.c \ ++ UnixCopyFile.c \ ++ UnixNativeDispatcher.c \ ++ \ ++ KQueue.c \ ++ KQueueArrayWrapper.c \ ++ KQueuePort.c ++ ++FILES_export += \ ++ sun/nio/ch/InheritedChannel.java \ ++ sun/nio/ch/KQueue.java \ ++ sun/nio/ch/KQueuePort.java \ ++ sun/nio/ch/NativeThread.java \ ++ sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \ ++ sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \ ++ \ ++ sun/nio/fs/BsdNativeDispatcher.java \ ++ sun/nio/fs/UnixCopyFile.java \ ++ sun/nio/fs/UnixNativeDispatcher.java ++ ++FILES_gen += \ ++ sun/nio/fs/UnixConstants.java ++ ++endif # PLATFORM = bsd ++ + ifeq ($(PLATFORM), macosx) + FILES_java += \ + sun/nio/ch/AbstractPollSelectorImpl.java \ + sun/nio/ch/BsdAsynchronousChannelProvider.java \ + sun/nio/ch/InheritedChannel.java \ + sun/nio/ch/KQueue.java \ ++ sun/nio/ch/KQueueArrayWrapper.java + sun/nio/ch/KQueuePort.java \ ++ sun/nio/ch/KQueueSelectorProvider.java \ ++ sun/nio/ch/KQueueSelectorImpl.java \ + sun/nio/ch/PollSelectorProvider.java \ + sun/nio/ch/PollSelectorImpl.java \ + sun/nio/ch/Port.java \ +@@ -317,6 +393,7 @@ + UnixNativeDispatcher.c \ + \ + KQueue.c \ ++ KQueueArrayWrapper.c \ + KQueuePort.c + + FILES_export += \ +@@ -330,19 +407,13 @@ + sun/nio/fs/BsdNativeDispatcher.java \ + sun/nio/fs/UnixCopyFile.java \ + sun/nio/fs/UnixNativeDispatcher.java +- ++ + FILES_gen += \ + sun/nio/fs/UnixConstants.java +-endif # PLATFORM = bsd, macosx + +-ifeq ($(PLATFORM), macosx) +-FILES_java += \ +- sun/nio/ch/KQueueSelectorProvider.java \ +- sun/nio/ch/KQueueSelectorImpl.java \ +- sun/nio/ch/KQueueArrayWrapper.java ++endif # PLATFORM = macosx + +-FILES_c += \ +- KQueueArrayWrapper.c ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + + vpath %.c $(call NativeSrcDirList,,native/sun/nio/fs) + vpath %.c $(call NativeSrcDirList,,native/sun/nio/ch) +@@ -388,6 +459,9 @@ + ifeq ($(PLATFORM), macosx) + OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread -framework CoreFoundation + endif ++ifeq ($(PLATFORM), bsd) ++OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread ++endif + ifeq ($(PLATFORM), solaris) + OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \ + -L$(LIBDIR)/$(LIBARCH) -ljava -lnet +@@ -410,7 +484,7 @@ + ifeq ($(PLATFORM), linux) + FILES_m = mapfile-linux + endif +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + FILES_m = mapfile-bsd + endif + include $(BUILDDIR)/common/Mapfile-vers.gmk +--- ./jdk/make/java/nio/mapfile-bsd 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/nio/mapfile-bsd 2014-06-06 19:56:34.000000000 -0700 +@@ -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_makePipe; + Java_sun_nio_ch_IOUtil_randomBytes; + Java_sun_nio_ch_IOUtil_setfdVal; +@@ -80,6 +81,11 @@ + Java_sun_nio_ch_KQueue_identOffset; + Java_sun_nio_ch_KQueue_filterOffset; + Java_sun_nio_ch_KQueue_flagsOffset; ++ Java_sun_nio_ch_KQueueArrayWrapper_initStructSizes; ++ Java_sun_nio_ch_KQueueArrayWrapper_init; ++ Java_sun_nio_ch_KQueueArrayWrapper_register0; ++ Java_sun_nio_ch_KQueueArrayWrapper_kevent0; ++ Java_sun_nio_ch_KQueueArrayWrapper_interrupt; + Java_sun_nio_ch_KQueuePort_socketpair; + Java_sun_nio_ch_KQueuePort_interrupt; + Java_sun_nio_ch_KQueuePort_drain1; +--- ./jdk/make/java/npt/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/npt/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -74,6 +74,14 @@ + OTHER_LDLIBS += -liconv + endif + ++# Add location of iconv headers ++ifeq ($(PLATFORM), bsd) ++ ifneq ($(OS_NAME), netbsd) ++ CPPFLAGS += -I$(PACKAGE_PATH)/include ++ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv ++ endif ++endif ++ + # + # Add to ambient vpath so we pick up the library files + # +--- ./jdk/make/java/redist/fonts/Makefile 2013-09-06 11:27:37.000000000 -0700 ++++ ./jdk/make/java/redist/fonts/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -42,7 +42,7 @@ + $(LIBDIR)/fonts/LucidaSansRegular.ttf \ + $(LIBDIR)/fonts/LucidaSansDemiBold.ttf \ + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + + # The oblique versions of the font are derived from the base versions + # and since 2D can do this derivation on the fly at run time there is no +@@ -82,7 +82,7 @@ + $(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir + $(install-file) + +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + + # The oblique fonts are only needed/wanted on Linux. + +@@ -96,7 +96,7 @@ + $(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir + $(install-file) + +-endif # linux ++endif # linux || bsd + + all build : $(INTERNAL_IMPORT_LIST) + +--- ./jdk/make/javax/sound/Makefile 2013-09-06 11:27:38.000000000 -0700 ++++ ./jdk/make/javax/sound/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -111,6 +111,21 @@ + #MXSPP_ADD = $(PLATFORM)-$(ARCH)/ + endif # PLATFORM linux + ++ifeq ($(PLATFORM), bsd) ++ifeq ($(OS_VENDOR), FreeBSD) ++ # ALSA handles directaudio, ports, and MIDI ++ SUBDIRS += jsoundalsa ++ EXTRA_SOUND_JNI_LIBS += jsoundalsa ++else ++ # build with empty MIDI i/o ++ INCLUDE_MIDI = TRUE ++ # build with empty ports ++ INCLUDE_PORTS = TRUE ++ # build with empty direct audio ++ INCLUDE_DAUDIO = TRUE ++endif ++endif # PLATFORM bsd ++ + ifeq ($(PLATFORM), macosx) + CPPFLAGS += -DUSE_PORTS=TRUE \ + -DUSE_DAUDIO=TRUE \ +--- ./jdk/make/javax/sound/SoundDefs.gmk 2013-09-06 11:27:38.000000000 -0700 ++++ ./jdk/make/javax/sound/SoundDefs.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -40,6 +40,10 @@ + CPPFLAGS += -DX_PLATFORM=X_LINUX + endif # PLATFORM linux + ++ifeq ($(PLATFORM), bsd) ++ CPPFLAGS += -DX_PLATFORM=X_BSD ++endif # PLATFORM bsd ++ + ifeq ($(PLATFORM), macosx) + CPPFLAGS += -DX_PLATFORM=X_MACOSX + endif # PLATFORM macosx +--- ./jdk/make/javax/sound/jsoundalsa/Makefile 2013-09-06 11:27:38.000000000 -0700 ++++ ./jdk/make/javax/sound/jsoundalsa/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -51,6 +51,7 @@ + $(PORTFILES_c) + + # platform dependent files ++ifeq ($(PLATFORM), linux) + FILES_c += \ + PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \ + PLATFORM_API_LinuxOS_ALSA_PCM.c \ +@@ -60,19 +61,37 @@ + PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \ + PLATFORM_API_LinuxOS_ALSA_Ports.c + ++MIDI_CPPFLAGS= \ ++ -DUSE_PLATFORM_MIDI_OUT=TRUE \ ++ -DUSE_PLATFORM_MIDI_IN=TRUE ++endif ++ ++ifeq ($(PLATFORM), bsd) ++FILES_c += \ ++ PLATFORM_API_BsdOS_ALSA_CommonUtils.c \ ++ PLATFORM_API_BsdOS_ALSA_PCM.c \ ++ PLATFORM_API_BsdOS_ALSA_PCMUtils.c \ ++ PLATFORM_API_BsdOS_ALSA_MidiIn.c \ ++ PLATFORM_API_BsdOS_ALSA_MidiOut.c \ ++ PLATFORM_API_BsdOS_ALSA_MidiUtils.c \ ++ PLATFORM_API_BsdOS_ALSA_Ports.c ++ ++MIDI_CPPFLAGS= ++endif ++ + FILES_export = \ + $(DAUDIOFILES_export) \ + $(MIDIFILES_export) \ + $(PORTFILES_export) + +-OTHER_LDLIBS += -lasound ++OTHER_LDLIBS += -L$(ALSA_LIB_PATH) -lasound + + CPPFLAGS += \ + -DUSE_DAUDIO=TRUE \ + -DUSE_PORTS=TRUE \ +- -DUSE_PLATFORM_MIDI_OUT=TRUE \ +- -DUSE_PLATFORM_MIDI_IN=TRUE \ +- -I$(SHARE_SRC)/native/com/sun/media/sound ++ $(MIDI_CPPFLAGS) \ ++ -I$(SHARE_SRC)/native/com/sun/media/sound \ ++ -I$(ALSA_HEADERS_PATH) + + # + # Add to the ambient VPATH. +--- ./jdk/make/jpda/transport/socket/Makefile 2013-09-06 11:27:38.000000000 -0700 ++++ ./jdk/make/jpda/transport/socket/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -38,6 +38,11 @@ + + include $(BUILDDIR)/common/Defs.gmk + ++ifeq ($(PLATFORM), bsd)) ++ LIBSOCKET = ++ OTHER_LDLIBS += -pthread ++endif ++ + ifeq ($(PLATFORM), linux) + OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET) -lpthread + endif +--- ./jdk/make/sun/awt/FILES_c_macosx.gmk 2013-09-06 11:27:39.000000000 -0700 ++++ ./jdk/make/sun/awt/FILES_c_macosx.gmk 1969-12-31 16:00:00.000000000 -0800 +@@ -1,28 +0,0 @@ +-# +-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. +-# 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. +-# +- +-FILES_AWT_objc = \ +- $(TARGDIR)MacOSXResourceBundle.m +- +--- ./jdk/make/sun/awt/FILES_export_macosx.gmk 2013-09-06 11:27:39.000000000 -0700 ++++ ./jdk/make/sun/awt/FILES_export_macosx.gmk 1969-12-31 16:00:00.000000000 -0800 +@@ -1,29 +0,0 @@ +-# +-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. +-# 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. +-# +- +-# FILES_export definitions for Mac OS X +- +-FILES_export += \ +- com/apple/resources/MacOSXResourceBundle.java +--- ./jdk/make/sun/awt/Makefile 2013-09-06 11:27:39.000000000 -0700 ++++ ./jdk/make/sun/awt/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -127,7 +127,12 @@ + OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL) + endif + +-FILES_c += initIDs.c ++ifeq ($(PLATFORM), bsd) ++FILES_c = $(FILES_2D_c) ++FILES_c += awt_LoadLibrary.c ++OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH ++OTHER_LDLIBS = $(JVMLIB) $(LIBM) ++endif + + ifeq ($(PLATFORM), macosx) + FILES_c = $(FILES_2D_c) +@@ -136,6 +141,8 @@ + OTHER_LDLIBS = $(JVMLIB) $(LIBM) + endif + ++FILES_c += initIDs.c ++ + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX + endif # PLATFORM + +@@ -145,8 +152,6 @@ + # + # Files + # +-include FILES_c_macosx.gmk +-include FILES_export_macosx.gmk + + FILES_objc = $(FILES_AWT_objc) + OTHER_LDLIBS = -lmlib_image $(JVMLIB) $(LIBM) \ +@@ -193,6 +198,10 @@ + sun/awt/windows/awtLocalization.properties + endif + ++ifeq ($(PLATFORM), macosx) ++ NEW_RESOURCE_BUNDLES_COMPILED_PROPERTIES += \ ++ sun/awt/resources/awtosx.properties ++endif + # + # Rules + # +@@ -502,6 +511,17 @@ + # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS + endif # PLATFORM + ++ifeq ($(PLATFORM), bsd) ++# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD ++ ++FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs ++_FONTCONFIGS = \ ++ fontconfig.properties ++ ++FONTCONFIGS_SRC_PREFIX = $(PLATFORM). ++ ++# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD ++endif # PLATFORM + + ifeq ($(PLATFORM), macosx) + # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X +@@ -607,6 +627,9 @@ + -I$(OPENWIN_HOME)/include/X11/extensions \ + -I$(PLATFORM_SRC)/native/$(PKGDIR)/font + endif ++ifeq ($(PLATFORM), bsd) ++CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font ++endif + CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ + -I$(SHARE_SRC)/native/$(PKGDIR)/../font \ + -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \ +@@ -628,7 +651,13 @@ + -I$(PLATFORM_SRC)/native/$(PKGDIR) \ + $(EVENT_MODEL) + +-ifeq ($(PLATFORM), linux) ++# include these last so we don't pick up unintentional includes ++ifeq ($(PLATFORM), bsd) ++CPPFLAGS += -I$(OPENWIN_HOME)/include \ ++ -I$(OPENWIN_HOME)/include/X11/extensions ++endif ++ ++ifneq (,$(findstring $(PLATFORM), linux bsd)) + LDFLAGS += -L$(OPENWIN_LIB) + endif + +--- ./jdk/make/sun/awt/mawt.gmk 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/awt/mawt.gmk 2014-06-06 19:56:34.000000000 -0700 +@@ -169,7 +169,7 @@ + OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi + endif + +-ifneq (,$(findstring $(PLATFORM), linux macosx)) ++ifneq (,$(findstring $(PLATFORM), bsd linux macosx)) + OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH + # XXX what is this define below? Isn't it motif-related? + OTHER_CFLAGS += -DXMSTRINGDEFINES=1 +@@ -193,6 +193,7 @@ + # + # Other extra flags needed for compiling. + # ++ifneq ($(PLATFORM), bsd)) + CPPFLAGS += -I$(CUPS_HEADERS_PATH) + + ifndef HEADLESS +@@ -200,6 +201,7 @@ + LDFLAGS += -L$(OPENWIN_LIB) + + endif # !HEADLESS ++endif # !PLATFORM + + CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ + -I$(SHARE_SRC)/native/$(PKGDIR)/../font \ +@@ -223,13 +225,16 @@ + -I$(PLATFORM_SRC)/native/$(PKGDIR) \ + $(EVENT_MODEL) + +-ifeq ($(PLATFORM), macosx) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + CPPFLAGS += -I$(CUPS_HEADERS_PATH) + + ifndef HEADLESS + CPPFLAGS += -I$(MOTIF_DIR)/include \ + -I$(OPENWIN_HOME)/include + LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) ++ifeq ($(OS_NAME), netbsd) ++LDFLAGS += -Wl,-R$(OPENWIN_LIB) ++endif + + endif # !HEADLESS + endif # PLATFORM +@@ -240,6 +245,12 @@ + $(wildcard /usr/include/X11/extensions)) + endif + ++ifeq ($(PLATFORM), bsd)) ++ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ ++ -I$(OPENWIN_HOME)/include \ ++ -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" ++endif ++ + ifeq ($(PLATFORM), macosx)) + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ + -I$(OPENWIN_HOME)/include +--- ./jdk/make/sun/font/Makefile 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/font/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -36,7 +36,11 @@ + CPLUSPLUSLIBRARY=true + + # Use higher optimization level +-OPTIMIZATION_LEVEL = HIGHER ++ifeq ($(PLATFORM), windows) ++ OPTIMIZATION_LEVEL = HIGHEST ++else ++ OPTIMIZATION_LEVEL = HIGHER ++endif + + include $(BUILDDIR)/common/Defs.gmk + +@@ -91,7 +95,7 @@ + endif # PLATFORM + + # Turn off aliasing with GCC for ExtensionSubtables.cpp +-ifeq ($(PLATFORM), linux) ++ifneq (,$(findstring $(PLATFORM), bsd linux)) + CXXFLAGS += $(CXXFLAGS_$(@F)) + CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing + endif +@@ -178,7 +182,7 @@ + # Libraries to link, and other C flags. + # + +-ifeq ($(PLATFORM), macosx)) ++ifneq (,$(findstring $(PLATFORM), bsd macosx)) + OTHER_INCLUDES += -I$(X11_PATH)/include + OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX) + ifeq ($(OS_VENDOR),Apple) +--- ./jdk/make/sun/javazic/tzdata/VERSION 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/VERSION 2014-06-06 19:56:30.000000000 -0700 +@@ -21,4 +21,4 @@ + # or visit www.oracle.com if you need additional information or have any + # questions. + # +-tzdata2013d ++tzdata2014b +--- ./jdk/make/sun/javazic/tzdata/africa 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/africa 2014-06-06 19:56:30.000000000 -0700 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -474,6 +474,14 @@ + # (either two days before them or five days after them, so as to fall on + # lastFri instead of lastSun). + ++# From Even Scharning (2013-10-25): ++# The scheduled end of DST in Libya on Friday, October 25, 2013 was ++# cancelled yesterday.... ++# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/ ++# ++# From Paul Eggert (2013-10-25): ++# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2. ++ + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Libya 1951 only - Oct 14 2:00 1:00 S + Rule Libya 1952 only - Jan 1 0:00 0 - +@@ -490,8 +498,8 @@ + Rule Libya 1987 1989 - Oct 1 0:00 0 - + Rule Libya 1997 only - Apr 4 0:00 1:00 S + Rule Libya 1997 only - Oct 4 0:00 0 - +-Rule Libya 2013 max - Mar lastFri 1:00 1:00 S +-Rule Libya 2013 max - Oct lastFri 2:00 0 - ++Rule Libya 2013 only - Mar lastFri 1:00 1:00 S ++Rule Libya 2013 only - Oct lastFri 2:00 0 - + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Africa/Tripoli 0:52:44 - LMT 1920 + 1:00 Libya CE%sT 1959 +@@ -502,7 +510,8 @@ + 2:00 - EET 1996 Sep 30 + 1:00 Libya CE%sT 1997 Oct 4 + 2:00 - EET 2012 Nov 10 2:00 +- 1:00 Libya CE%sT ++ 1:00 Libya CE%sT 2013 Oct 25 2:00 ++ 2:00 - EET + + # Madagascar + # Zone NAME GMTOFF RULES FORMAT [UNTIL] +@@ -707,15 +716,6 @@ + # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search + # + +-# From Alex Krivenyshev (2008-05-09): +-# Is Western Sahara (part which administrated by Morocco) going to follow +-# Morocco DST changes? Any information? What about other part of +-# Western Sahara - under administration of POLISARIO Front (also named +-# SADR Saharawi Arab Democratic Republic)? +- +-# From Arthur David Olson (2008-05-09): +-# 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 +@@ -881,13 +881,26 @@ + # transitions would be 2013-07-07 and 2013-08-10; see: + # http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10 + +-# From Paul Eggert (2013-07-03): ++# From Steffen Thorsen (2013-09-28): ++# Morocco extends DST by one month, on very short notice, just 1 day ++# before it was going to end. There is a new decree (2.13.781) for ++# this, where DST from now on goes from last Sunday of March at 02:00 ++# to last Sunday of October at 03:00, similar to EU rules. Official ++# source (French): ++# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013 ++# Another source (specifying the time for start and end in the decree): ++# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html ++ ++# From Sebastien Willemijns (2014-03-18): ++# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp ++ ++# From Paul Eggert (2014-03-19): + # To estimate what the Moroccan government will do in future years, +-# transition dates for 2014 through 2021 were determined by running ++# transition dates for 2014 through 2038 were determined by running + # the following program under GNU Emacs 24.3: + # + # (let ((islamic-year 1435)) +-# (while (< islamic-year 1444) ++# (while (< islamic-year 1461) + # (let ((a + # (calendar-gregorian-from-absolute + # (calendar-islamic-to-absolute (list 9 1 islamic-year)))) +@@ -902,13 +915,18 @@ + # (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) + # (setq islamic-year (+ 1 islamic-year)))) + # +-# with the results hand-edited for 2020-2022, when the normal spring-forward +-# date falls during the estimated Ramadan. +-# +-# From 2023 through 2038 Ramadan is not predicted to overlap with +-# daylight saving time. Starting in 2039 there will be overlap again, +-# but 32-bit time_t values roll around in 2038 so for now do not worry +-# about dates after 2038. ++# with spring-forward transitions removed for 2023-2025, when the ++# normal spring-forward date falls during the estimated Ramadan; with ++# all transitions removed for 2026-2035, where the estimated Ramadan ++# falls entirely outside daylight-saving time; and with fall-back ++# transitions removed for 2036-2037, where the normal fall-back ++# date falls during the estimated Ramadan. Normally, the table would ++# stop after 2037 because 32-bit time_t values roll around early in 2038, ++# but that would imply a prediction of perpetual DST after March 2038 ++# due to the year-2037 glitches. So, this table instead stops after ++# 2038, the first non-glitchy year after the 32-bit rollover. ++# An advantage of stopping after 2038 is that it lets zic guess ++# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. + + # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S + +@@ -935,12 +953,14 @@ + Rule Morocco 2010 only - Aug 8 0:00 0 - + Rule Morocco 2011 only - Apr 3 0:00 1:00 S + Rule Morocco 2011 only - Jul 31 0 0 - +-Rule Morocco 2012 2019 - Apr lastSun 2:00 1:00 S +-Rule Morocco 2012 max - Sep lastSun 3:00 0 - ++Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S ++Rule Morocco 2012 only - Sep 30 3:00 0 - + Rule Morocco 2012 only - Jul 20 3:00 0 - + Rule Morocco 2012 only - Aug 20 2:00 1:00 S + Rule Morocco 2013 only - Jul 7 3:00 0 - + Rule Morocco 2013 only - Aug 10 2:00 1:00 S ++Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - ++Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S + Rule Morocco 2014 only - Jun 29 3:00 0 - + Rule Morocco 2014 only - Jul 29 2:00 1:00 S + Rule Morocco 2015 only - Jun 18 3:00 0 - +@@ -953,20 +973,42 @@ + Rule Morocco 2018 only - Jun 15 2:00 1:00 S + Rule Morocco 2019 only - May 6 3:00 0 - + Rule Morocco 2019 only - Jun 5 2:00 1:00 S ++Rule Morocco 2020 only - Apr 24 3:00 0 - + Rule Morocco 2020 only - May 24 2:00 1:00 S ++Rule Morocco 2021 only - Apr 13 3:00 0 - + Rule Morocco 2021 only - May 13 2:00 1:00 S ++Rule Morocco 2022 only - Apr 3 3:00 0 - + Rule Morocco 2022 only - May 3 2:00 1:00 S +-Rule Morocco 2023 max - Apr lastSun 2:00 1:00 S ++Rule Morocco 2023 only - Apr 22 2:00 1:00 S ++Rule Morocco 2024 only - Apr 10 2:00 1:00 S ++Rule Morocco 2025 only - Mar 31 2:00 1:00 S ++Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S ++Rule Morocco 2036 only - Oct 21 3:00 0 - ++Rule Morocco 2037 only - Oct 11 3:00 0 - ++Rule Morocco 2038 only - Sep 30 3:00 0 - ++Rule Morocco 2038 only - Oct 30 2:00 1:00 S ++Rule Morocco 2038 max - Oct lastSun 3:00 0 - + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 + 0:00 Morocco WE%sT 1984 Mar 16 + 1:00 - CET 1986 + 0:00 Morocco WE%sT ++ + # Western Sahara ++# ++# From Gwillim Law (2013-10-22): ++# A correspondent who is usually well informed about time zone matters ++# ... says that Western Sahara observes daylight saving time, just as ++# Morocco does. ++# ++# From Paul Eggert (2013-10-23): ++# Assume that this has been true since Western Sahara switched to GMT, ++# since most of it was then controlled by Morocco. ++ + Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan + -1:00 - WAT 1976 Apr 14 +- 0:00 - WET ++ 0:00 Morocco WE%sT + + # Mozambique + # Zone NAME GMTOFF RULES FORMAT [UNTIL] +@@ -1123,9 +1165,7 @@ + 3:00 - EAT + + # South Sudan +-Zone Africa/Juba 2:06:24 - LMT 1931 +- 2:00 Sudan CA%sT 2000 Jan 15 12:00 +- 3:00 - EAT ++Link Africa/Khartoum Africa/Juba + + # Swaziland + # Zone NAME GMTOFF RULES FORMAT [UNTIL] +--- ./jdk/make/sun/javazic/tzdata/antarctica 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/antarctica 2014-06-06 19:56:30.000000000 -0700 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -39,9 +39,9 @@ + # + # Except for the French entries, + # I made up all time zone abbreviations mentioned here; corrections welcome! +-# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited. ++# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited. + +-# These rules are stolen from the `southamerica' file. ++# These rules are stolen from the 'southamerica' file. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule ArgAQ 1964 1966 - Mar 1 0:00 0 - + Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S +@@ -251,25 +251,43 @@ + # Scott Island (never inhabited) + # + # year-round base +-# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo. +-# +-# These rules for New Zealand are stolen from the `australasia' file. +-# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +-Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D +-Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D +-Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D +-Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D +-Rule NZAQ 1975 only - Feb 23 2:00s 0 S +-Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S +-Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S +-Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D +-Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S ++# Scott Base, Ross Island, since 1957-01. ++# See Pacific/Auckland. + + # Norway - territories + # Bouvet (never inhabited) + # + # claims + # Peter I Island (never inhabited) ++# ++# year-round base ++# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 ++# ++# From Paul-Inge Flakstad (2014-03-10): ++# I recently had a long dialog about this with the developer of timegenie.com. ++# In the absence of specific dates, he decided to choose some likely ones: ++# GMT +1 - From March 1 to the last Sunday in March ++# GMT +2 - From the last Sunday in March until the last Sunday in October ++# GMT +1 - From the last Sunday in October until November 7 ++# GMT +0 - From November 7 until March 1 ++# The dates for switching to and from UTC+0 will probably not be absolutely ++# correct, but they should be quite close to the actual dates. ++# ++# From Paul Eggert (2014-03-21): ++# The CET-switching Troll rules require zic from tzcode 2014b or later, so as ++# suggested by Bengt-Inge Larsson comment them out for now, and approximate ++# with only UTC and CEST. Uncomment them when 2014b is more prevalent. ++# ++# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S ++#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET ++Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST ++#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET ++#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC ++# Remove the following line when uncommenting the above '#Rule' lines. ++Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC ++# Zone NAME GMTOFF RULES FORMAT [UNTIL] ++Zone Antarctica/Troll 0 - zzz 2005 Feb 12 ++ 0:00 Troll %s + + # Poland - year-round base + # Arctowski, King George Island, -620945-0582745, since 1977 +@@ -291,11 +309,11 @@ + # From Lee Hotz (2001-03-08): + # I queried the folks at Columbia who spent the summer at Vostok and this is + # what they had to say about time there: +-# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo) ++# "in the US Camp (East Camp) we have been on New Zealand (McMurdo) + # time, which is 12 hours ahead of GMT. The Russian Station Vostok was + # 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead + # of GMT). This is a time zone I think two hours east of Moscow. The +-# natural time zone is in between the two: 8 hours ahead of GMT.'' ++# natural time zone is in between the two: 8 hours ahead of GMT." + # + # From Paul Eggert (2001-05-04): + # This seems to be hopelessly confusing, so I asked Lee Hotz about it +@@ -360,16 +378,8 @@ + -4:00 ChileAQ CL%sT + # + # +-# McMurdo, Ross Island, since 1955-12 +-# Zone NAME GMTOFF RULES FORMAT [UNTIL] +-Zone Antarctica/McMurdo 0 - zzz 1956 +- 12:00 NZAQ NZ%sT +-# +-# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20 +-# +-# From Paul Eggert (1996-09-03): +-# Normally it wouldn't have a separate entry, since it's like the +-# larger Antarctica/McMurdo since 1970, but it's too famous to omit. ++# McMurdo Station, Ross Island, since 1955-12 ++# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20 + # + # From Chris Carrier (1996-06-27): + # Siple, the first commander of the South Pole station, +@@ -391,4 +401,4 @@ + # we have to go around and set them back 5 minutes or so. + # Maybe if we let them run fast all of the time, we'd get to leave here sooner!! + # +-Link Antarctica/McMurdo Antarctica/South_Pole ++# See 'australasia' for Antarctica/McMurdo. +--- ./jdk/make/sun/javazic/tzdata/asia 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/asia 2014-06-06 19:56:30.000000000 -0700 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -29,7 +29,7 @@ + # go ahead and edit the file (and please send any changes to + # tz@iana.org for general use in the future). + +-# From Paul Eggert (2013-02-21): ++# From Paul Eggert (2013-08-11): + # + # A good source for time zone historical data outside the U.S. is + # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), +@@ -67,11 +67,11 @@ + # 4:00 GST Gulf* + # 5:30 IST India + # 7:00 ICT Indochina* +-# 7:00 WIT west Indonesia +-# 8:00 CIT central Indonesia ++# 7:00 WIB west Indonesia (Waktu Indonesia Barat) ++# 8:00 WITA central Indonesia (Waktu Indonesia Tengah) + # 8:00 CST China + # 9:00 CJT Central Japanese Time (1896/1937)* +-# 9:00 EIT east Indonesia ++# 9:00 WIT east Indonesia (Waktu Indonesia Timur) + # 9:00 JST JDT Japan + # 9:00 KST KDT Korea + # 9:30 CST (Australian) Central Standard Time +@@ -779,7 +779,7 @@ + 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time + 9:00 - JST 1945 Sep 23 + 9:00 - TLT 1976 May 3 +- 8:00 - CIT 2000 Sep 17 00:00 ++ 8:00 - WITA 2000 Sep 17 00:00 + 9:00 - TLT + + # India +@@ -816,36 +816,53 @@ + # (Hollandia). For now, assume all Indonesian locations other than Jayapura + # switched on 1945-09-23. + # ++# From Paul Eggert (2013-08-11): ++# Normally the tz database uses English-language abbreviations, but in ++# Indonesia it's typical to use Indonesian-language abbreviations even ++# when writing in English. For example, see the English-language ++# summary published by the Time and Frequency Laboratory of the ++# Research Center for Calibration, Instrumentation and Metrology, ++# Indonesia, (2006-09-29). ++# The abbreviations are: ++# ++# WIB - UTC+7 - Waktu Indonesia Barat (Indonesia western time) ++# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time) ++# WIT - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time) ++# + # Zone NAME GMTOFF RULES FORMAT [UNTIL] ++# Java, Sumatra + Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 + # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, + # but this must be a typo. +- 7:07:12 - JMT 1923 Dec 31 23:47:12 # Jakarta ++ 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia + 7:20 - JAVT 1932 Nov # Java Time +- 7:30 - WIT 1942 Mar 23 ++ 7:30 - WIB 1942 Mar 23 + 9:00 - JST 1945 Sep 23 +- 7:30 - WIT 1948 May +- 8:00 - WIT 1950 May +- 7:30 - WIT 1964 +- 7:00 - WIT ++ 7:30 - WIB 1948 May ++ 8:00 - WIB 1950 May ++ 7:30 - WIB 1964 ++ 7:00 - WIB ++# west and central Borneo + Zone Asia/Pontianak 7:17:20 - LMT 1908 May + 7:17:20 - PMT 1932 Nov # Pontianak MT +- 7:30 - WIT 1942 Jan 29 ++ 7:30 - WIB 1942 Jan 29 + 9:00 - JST 1945 Sep 23 +- 7:30 - WIT 1948 May +- 8:00 - WIT 1950 May +- 7:30 - WIT 1964 +- 8:00 - CIT 1988 Jan 1 +- 7:00 - WIT ++ 7:30 - WIB 1948 May ++ 8:00 - WIB 1950 May ++ 7:30 - WIB 1964 ++ 8:00 - WITA 1988 Jan 1 ++ 7:00 - WIB ++# Sulawesi, Lesser Sundas, east and south Borneo + Zone Asia/Makassar 7:57:36 - LMT 1920 + 7:57:36 - MMT 1932 Nov # Macassar MT +- 8:00 - CIT 1942 Feb 9 ++ 8:00 - WITA 1942 Feb 9 + 9:00 - JST 1945 Sep 23 +- 8:00 - CIT ++ 8:00 - WITA ++# Maluku Islands, West Papua, Papua + Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov +- 9:00 - EIT 1944 Sep 1 ++ 9:00 - WIT 1944 Sep 1 + 9:30 - CST 1964 +- 9:00 - EIT ++ 9:00 - WIT + + # Iran + +@@ -1096,8 +1113,13 @@ + Rule Zion 1986 only - Sep 7 0:00 0 S + Rule Zion 1987 only - Apr 15 0:00 1:00 D + Rule Zion 1987 only - Sep 13 0:00 0 S +-Rule Zion 1988 only - Apr 9 0:00 1:00 D +-Rule Zion 1988 only - Sep 3 0:00 0 S ++ ++# From Avigdor Finkelstein (2014-03-05): ++# I check the Parliament (Knesset) records and there it's stated that the ++# [1988] transition should take place on Saturday night, when the Sabbath ++# ends and changes to Sunday. ++Rule Zion 1988 only - Apr 10 0:00 1:00 D ++Rule Zion 1988 only - Sep 4 0:00 0 S + + # From Ephraim Silverberg + # (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17, 2000-07-25, 2004-12-22, +@@ -1386,10 +1408,22 @@ + # 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. ++ ++# From Steffen Thorsen (2013-12-11): ++# Jordan Times and other sources say that Jordan is going back to ++# UTC+2 on 2013-12-19 at midnight: ++# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime ++# Official, in Arabic: ++# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14 ++# ... Our background/permalink about it ++# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html ++# ... ++# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P ++# ... says midnight for the coming one and 1:00 for the ones in the future ++# (and they will use DST again next year, using the normal schedule). ++ ++# From Paul Eggert (2013-12-11): ++# As Steffen suggested, consider the past 21-month experiment to be DST. + + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Jordan 1973 only - Jun 6 0:00 1:00 S +@@ -1415,12 +1449,14 @@ + Rule Jordan 1999 only - Jul 1 0:00s 1:00 S + Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 - + Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S +-Rule Jordan 2002 max - Mar lastThu 24:00 1:00 S ++Rule Jordan 2002 2012 - Mar lastThu 24:00 1:00 S + 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 2011 - Oct lastFri 0:00s 0 - +-Rule Jordan 2013 max - Oct lastFri 0:00s 0 - ++Rule Jordan 2013 only - Dec 20 0:00 0 - ++Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S ++Rule Jordan 2014 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 +@@ -2303,9 +2339,18 @@ + # http://www.samanews.com/index.php?act=Show&id=154120 + # http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html + +-# From Paul Eggert (2013-04-15): ++# From Steffen Thorsen (2013-09-24): ++# The Gaza and West Bank are ending DST Thursday at midnight ++# (2013-09-27 00:00:00) (one hour earlier than last year...). ++# This source in English, says "that winter time will go into effect ++# at midnight on Thursday in the West Bank and Gaza Strip": ++# http://english.wafa.ps/index.php?action=detail&id=23246 ++# official source...: ++# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 ++ ++# From Paul Eggert (2013-09-24): + # For future dates, guess the last Thursday in March at 24:00 through +-# the first Friday on or after September 21 at 01:00. This is consistent with ++# the first Friday on or after September 21 at 00:00. This is consistent with + # the predictions in today's editions of the following URLs, + # which are for Gaza and Hebron respectively: + # http://www.timeanddate.com/worldclock/timezone.html?n=702 +@@ -2336,7 +2381,8 @@ + Rule Palestine 2011 only - Aug 30 0:00 1:00 S + Rule Palestine 2011 only - Sep 30 0:00 0 - + Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +-Rule Palestine 2012 max - Sep Fri>=21 1:00 0 - ++Rule Palestine 2012 only - Sep 21 1:00 0 - ++Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Asia/Gaza 2:17:52 - LMT 1900 Oct +--- ./jdk/make/sun/javazic/tzdata/australasia 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/australasia 2014-06-06 19:56:30.000000000 -0700 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -375,18 +375,30 @@ + # 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. ++ ++# From the Fijian Government Media Center (2013-08-30) via David Wheeler: ++# Fiji will start daylight savings on Sunday 27th October, 2013 ... ++# move clocks forward by one hour from 2am ++# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx ++ ++# From Steffen Thorsen (2013-01-10): ++# Fiji will end DST on 2014-01-19 02:00: ++# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx ++ ++# From Paul Eggert (2014-01-10): ++# For now, guess that Fiji springs forward the Sunday before the fourth ++# Monday in October, and springs back the penultimate Sunday in January. ++# This is ad hoc, but matches recent practice. + + # 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 max - Oct Sun>=18 2:00 1:00 S ++Rule Fiji 2010 max - Oct Sun>=21 2:00 1:00 S + Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - +-Rule Fiji 2012 max - Jan Sun>=18 3:00 0 - ++Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 - ++Rule Fiji 2014 max - Jan Sun>=18 2:00 0 - + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva + 12:00 Fiji FJ%sT # Fiji Time +@@ -510,6 +522,7 @@ + Zone Pacific/Chatham 12:13:48 - LMT 1957 Jan 1 + 12:45 Chatham CHA%sT + ++Link Pacific/Auckland Antarctica/McMurdo + + # Auckland Is + # uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers, +@@ -759,7 +772,7 @@ + # 1886-1891; Baker was similar but exact dates are not known. + # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944; + # uninhabited thereafter. +-# Howland observed Hawaii Standard Time (UTC-10:30) in 1937; ++# Howland observed Hawaii Standard Time (UT-10:30) in 1937; + # see page 206 of Elgen M. Long and Marie K. Long, + # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000). + # So most likely Howland and Baker observed Hawaii Time from 1935 +@@ -772,8 +785,32 @@ + # no information; was probably like Pacific/Kiritimati + + # Johnston +-# Zone NAME GMTOFF RULES FORMAT [UNTIL] +-Zone Pacific/Johnston -10:00 - HST ++# ++# From Paul Eggert (2014-03-11): ++# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. ++# Details are uncertain. We have no data for Johnston after 1970, so ++# treat it like Hawaii for now. ++# ++# In his memoirs of June 6th to October 4, 1945 ++# (2005), Herbert C. Bach writes, ++# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM ++# Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and ++# confirms that Johnston kept the same time as Honolulu in summer 1945. ++# ++# From Lyle McElhaney (2014-03-11): ++# [W]hen JI was being used for that [atomic bomb] testing, the time being used ++# was not Hawaiian time but rather the same time being used on the ships, ++# which had a GMT offset of -11 hours. This apparently applied to at least the ++# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last ++# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, ++# "The United States High-Altitude Test Experience: A Review Emphasizing the ++# Impact on the Environment", Los Alamos LA-6405, Oct 1976 ++# . ++# See the table on page 4 where he lists GMT and local times for the tests; a ++# footnote for the JI tests reads that local time is "JI time = Hawaii Time ++# Minus One Hour". ++# ++# See 'northamerica' for Pacific/Johnston. + + # Kingman + # uninhabited +--- ./jdk/make/sun/javazic/tzdata/backward 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/backward 2014-01-18 12:16:25.000000000 -0800 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -45,15 +45,17 @@ + Link America/Argentina/Mendoza America/Mendoza + Link America/Rio_Branco America/Porto_Acre + Link America/Argentina/Cordoba America/Rosario +-Link America/St_Thomas America/Virgin ++Link America/Denver America/Shiprock ++Link America/Port_of_Spain America/Virgin ++Link Pacific/Auckland Antarctica/South_Pole + Link Asia/Ashgabat Asia/Ashkhabad ++Link Asia/Kolkata Asia/Calcutta + Link Asia/Chongqing Asia/Chungking + Link Asia/Dhaka Asia/Dacca + Link Asia/Kathmandu Asia/Katmandu +-Link Asia/Kolkata Asia/Calcutta + Link Asia/Macau Asia/Macao +-Link Asia/Jerusalem Asia/Tel_Aviv + Link Asia/Ho_Chi_Minh Asia/Saigon ++Link Asia/Jerusalem Asia/Tel_Aviv + Link Asia/Thimphu Asia/Thimbu + Link Asia/Makassar Asia/Ujung_Pandang + Link Asia/Ulaanbaatar Asia/Ulan_Bator +@@ -111,10 +113,10 @@ + Link Pacific/Chatham NZ-CHAT + Link America/Denver Navajo + Link Asia/Shanghai PRC ++Link Pacific/Pohnpei Pacific/Ponape + Link Pacific/Pago_Pago Pacific/Samoa +-Link Pacific/Chuuk Pacific/Yap + Link Pacific/Chuuk Pacific/Truk +-Link Pacific/Pohnpei Pacific/Ponape ++Link Pacific/Chuuk Pacific/Yap + Link Europe/Warsaw Poland + Link Europe/Lisbon Portugal + Link Asia/Taipei ROC +--- ./jdk/make/sun/javazic/tzdata/etcetera 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/etcetera 2014-01-18 12:16:25.000000000 -0800 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -54,9 +54,9 @@ + # even though this is the opposite of what many people expect. + # POSIX has positive signs west of Greenwich, but many people expect + # positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses +-# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC ++# the abbreviation "GMT+4" and corresponds to 4 hours behind UT + # (i.e. west of Greenwich) even though many people would expect it to +-# mean 4 hours ahead of UTC (i.e. east of Greenwich). ++# mean 4 hours ahead of UT (i.e. east of Greenwich). + # + # In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for + # TZ='+4'; if you want time zone abbreviations conforming to +--- ./jdk/make/sun/javazic/tzdata/europe 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/europe 2014-06-06 19:56:30.000000000 -0700 +@@ -1,22 +1,22 @@ + # + # 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. +@@ -65,7 +65,7 @@ + # (1998-09-21, in Portuguese) + + # +-# I invented the abbreviations marked `*' in the following table; ++# I invented the abbreviations marked '*' in the following table; + # the rest are from earlier versions of this file, or from other sources. + # Corrections are welcome! + # std dst 2dst +@@ -119,7 +119,7 @@ + # and a sketch map showing some of the sightlines involved. One paragraph + # of the text said: + # +-# `An old stone obelisk marking a forgotten terrestrial meridian stands ++# 'An old stone obelisk marking a forgotten terrestrial meridian stands + # beside the river at Kew. In the 18th century, before time and longitude + # was standardised by the Royal Observatory in Greenwich, scholars observed + # this stone and the movement of stars from Kew Observatory nearby. They +@@ -163,7 +163,7 @@ + # From Paul Eggert (2003-09-27): + # Summer Time was first seriously proposed by William Willett (1857-1915), + # a London builder and member of the Royal Astronomical Society +-# who circulated a pamphlet ``The Waste of Daylight'' (1907) ++# who circulated a pamphlet "The Waste of Daylight" (1907) + # that proposed advancing clocks 20 minutes on each of four Sundays in April, + # and retarding them by the same amount on four Sundays in September. + # A bill was drafted in 1909 and introduced in Parliament several times, +@@ -188,10 +188,10 @@ + # + + # From Paul Eggert (1996-09-03): +-# The OED Supplement says that the English originally said ``Daylight Saving'' ++# The OED Supplement says that the English originally said "Daylight Saving" + # when they were debating the adoption of DST in 1908; but by 1916 this + # term appears only in quotes taken from DST's opponents, whereas the +-# proponents (who eventually won the argument) are quoted as using ``Summer''. ++# proponents (who eventually won the argument) are quoted as using "Summer". + + # From Arthur David Olson (1989-01-19): + # +@@ -231,9 +231,9 @@ + # which could not be said to run counter to any official description. + + # From Paul Eggert (2000-10-02): +-# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common ++# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common + # and follows the more usual convention of putting the location name first, +-# so we use `BDST'. ++# so we use 'BDST'. + + # Peter Ilieve (1998-04-19) described at length + # the history of summer time legislation in the United Kingdom. +@@ -454,6 +454,8 @@ + Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT + # Summer Time Order 1997 (S.I. 1997/2982) + # See EU for rules starting in 1996. ++# ++# Use Europe/London for Jersey, Guernsey, and the Isle of Man. + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s +@@ -820,7 +822,7 @@ + 1:00 EU CE%sT + + # Bosnia and Herzegovina +-# see Serbia ++# See Europe/Belgrade. + + # Bulgaria + # +@@ -848,10 +850,10 @@ + 2:00 EU EE%sT + + # Croatia +-# see Serbia ++# See Europe/Belgrade. + + # Cyprus +-# Please see the `asia' file for Asia/Nicosia. ++# Please see the 'asia' file for Asia/Nicosia. + + # Czech Republic + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +@@ -868,6 +870,7 @@ + 1:00 C-Eur CE%sT 1944 Sep 17 2:00s + 1:00 Czech CE%sT 1979 + 1:00 EU CE%sT ++# Use Europe/Prague also for Slovakia. + + # Denmark, Faroe Islands, and Greenland + +@@ -1031,12 +1034,12 @@ + # From Peter Ilieve (1996-10-28): + # [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s, + # but a relative confirms that Estonia still switches at 02:00s, writing:] +-# ``I do not [know] exactly but there are some little different ++# "I do not [know] exactly but there are some little different + # (confusing) rules for International Air and Railway Transport Schedules + # conversion in Sunday connected with end of summer time in Estonia.... + # A discussion is running about the summer time efficiency and effect on + # human physiology. It seems that Estonia maybe will not change to +-# summer time next spring.'' ++# summer time next spring." + + # From Peter Ilieve (1998-11-04), heavily edited: + # +@@ -1091,7 +1094,7 @@ + # Well, here in Helsinki we're just changing from summer time to regular one, + # and it's supposed to change at 4am... + +-# From Janne Snabb (2010-0715): ++# From Janne Snabb (2010-07-15): + # + # I noticed that the Finland data is not accurate for years 1981 and 1982. + # During these two first trial years the DST adjustment was made one hour +@@ -1148,7 +1151,7 @@ + + + # +-# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman. ++# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule France 1916 only - Jun 14 23:00s 1:00 S + Rule France 1916 1919 - Oct Sun>=1 23:00s 0 - +@@ -1438,7 +1441,7 @@ + # + # Day-light Saving Time in Italy (2006-02-03) + # +-# (`FP' below), taken from an Italian National Electrotechnical Institute ++# ('FP' below), taken from an Italian National Electrotechnical Institute + # publication. When the three sources disagree, guess who's right, as follows: + # + # year FP Shanks&P. (S) Whitman (W) Go with: +@@ -1584,10 +1587,22 @@ + 2:00 EU EE%sT + + # Liechtenstein +-# Zone NAME GMTOFF RULES FORMAT [UNTIL] +-Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun +- 1:00 - CET 1981 +- 1:00 EU CE%sT ++ ++# From Paul Eggert (2013-09-09): ++# Shanks & Pottenger say Vaduz is like Zurich. ++ ++# From Alois Treindl (2013-09-18): ++# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf ++# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942. ++# I ... translate only the last two paragraphs: ++# ... during second world war, in the years 1941 and 1942, Liechtenstein ++# introduced daylight saving time, adapting to Switzerland. From 1943 on ++# central European time was in force throughout the year. ++# From a report of the duke's government to the high council, ++# regarding the introduction of a time law, of 31 May 1977. ++ ++Link Europe/Zurich Europe/Vaduz ++ + + # Lithuania + +@@ -1675,7 +1690,7 @@ + 1:00 EU CE%sT + + # Macedonia +-# see Serbia ++# See Europe/Belgrade. + + # Malta + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +@@ -1768,7 +1783,7 @@ + 1:00 EU CE%sT + + # Montenegro +-# see Serbia ++# See Europe/Belgrade. + + # Netherlands + +@@ -1883,7 +1898,7 @@ + # before 1895, and therefore probably changed the local time somewhere + # between 1895 and 1925 (inclusive). + +-# From Paul Eggert (2001-05-01): ++# From Paul Eggert (2013-09-04): + # + # Actually, Jan Mayen was never occupied by Germany during World War II, + # so it must have diverged from Oslo time during the war, as Oslo was +@@ -1894,7 +1909,7 @@ + # 1941 with a small Norwegian garrison and continued operations despite + # frequent air ttacks from Germans. In 1943 the Americans established a + # radiolocating station on the island, called "Atlantic City". Possibly +-# the UTC offset changed during the war, but I think it unlikely that ++# the UT offset changed during the war, but I think it unlikely that + # Jan Mayen used German daylight-saving rules. + # + # Svalbard is more complicated, as it was raided in August 1941 by an +@@ -1907,9 +1922,8 @@ + # the German armed forces at the Svalbard weather station code-named + # Haudegen did not surrender to the Allies until September 1945. + # +-# All these events predate our cutoff date of 1970. Unless we can +-# come up with more definitive info about the timekeeping during the +-# war years it's probably best just do...the following for now: ++# All these events predate our cutoff date of 1970, so use Europe/Oslo ++# for these regions. + Link Europe/Oslo Arctic/Longyearbyen + + # Poland +@@ -2167,7 +2181,7 @@ + # so we (Novosibirsk) simply did not switch. + # + # From Andrey A. Chernov (1996-10-04): +-# `MSK' and `MSD' were born and used initially on Moscow computers with ++# 'MSK' and 'MSD' were born and used initially on Moscow computers with + # UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group).... + # The next step was the UUCP network, the Relcom predecessor + # (used mainly for mail), and MSK/MSD was actively used there. +@@ -2466,6 +2480,9 @@ + 11:00 Russia ANA%sT 2011 Mar 27 2:00s + 12:00 - ANAT + ++# San Marino ++# See Europe/Rome. ++ + # Serbia + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + Zone Europe/Belgrade 1:22:00 - LMT 1884 +@@ -2488,7 +2505,7 @@ + Link Europe/Prague Europe/Bratislava + + # Slovenia +-# see Serbia ++# See Europe/Belgrade. + + # Spain + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +@@ -2622,7 +2639,7 @@ + # and their performance improved enormously. Communities began to keep + # mean time in preference to apparent time -- Geneva from 1780 .... + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +-# From Whitman (who writes ``Midnight?''): ++# From Whitman (who writes "Midnight?"): + # Rule Swiss 1940 only - Nov 2 0:00 1:00 S + # Rule Swiss 1940 only - Dec 31 0:00 0 - + # From Shanks & Pottenger: +@@ -2667,23 +2684,53 @@ + # The 1940 rules must be deleted. + # + # One further detail for Switzerland, which is probably out of scope for +-# most users of tzdata: +-# The zone file +-# Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12 +-# 0:29:44 - BMT 1894 Jun #Bern Mean Time +-# 1:00 Swiss CE%sT 1981 +-# 1:00 EU CE%sT ++# most users of tzdata: The [Europe/Zurich zone] ... + # describes all of Switzerland correctly, with the exception of + # the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not + # follow Bern Mean Time but kept its own local mean time. + # To represent this, an extra zone would be needed. ++# ++# From Alois Treindl (2013-09-11): ++# The Federal regulations say ++# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html ++# ... the meridian for Bern mean time ... is 7 degrees 26'22.50". ++# Expressed in time, it is 0h29m45.5s. ++ ++# From Pierre-Yves Berger (2013-09-11): ++# the "Circulaire du conseil federal" (December 11 1893) ++# ... ++# clearly states that the [1894-06-01] change should be done at midnight ++# but if no one is present after 11 at night, could be postponed until one ++# hour before the beginning of service. ++ ++# From Paul Eggert (2013-09-11): ++# Round BMT to the nearest even second, 0:29:46. ++# ++# We can find no reliable source for Shanks's assertion that all of Switzerland ++# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12. This book: ++# ++# Jakob Messerli. Gleichmassig, punktlich, schnell: Zeiteinteilung und ++# Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995, ++# ISBN 3-905311-68-2, OCLC 717570797. ++# ++# suggests that the transition was more gradual, and that the Swiss did not ++# agree about civil time during the transition. The timekeeping it gives the ++# most detail for is postal and telegraph time: here, federal legislation (the ++# "Bundesgesetz uber die Erstellung von elektrischen Telegraphen") passed on ++# 1851-11-23, and an official implementation notice was published 1853-07-16 ++# (Bundesblatt 1853, Bd. II, S. 859). On p 72 Messerli writes that in ++# practice since July 1853 Bernese time was used in "all postal and telegraph ++# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso" ++# (Google translation). For now, model this transition as occurring on ++# 1853-07-16, though it probably occurred at some other date in Zurich, and ++# legal civil time probably changed at still some other transition date. + + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S + Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 - + # Zone NAME GMTOFF RULES FORMAT [UNTIL] +-Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12 +- 0:29:44 - BMT 1894 Jun # Bern Mean Time ++Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment. ++ 0:29:46 - BMT 1894 Jun # Bern Mean Time + 1:00 Swiss CE%sT 1981 + 1:00 EU CE%sT + +@@ -2721,14 +2768,18 @@ + # 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. +-# +-# + # http://www.worldbulletin.net/?aType=haber&ArticleID=70872 +-# + # Turkish: +-# + # http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373 +-# ++ ++# From Faruk Pasin (2014-02-14): ++# The DST for Turkey has been changed for this year because of the ++# Turkish Local election.... ++# http://www.sabah.com.tr/Ekonomi/2014/02/12/yaz-saatinde-onemli-degisiklik ++# ... so Turkey will move clocks forward one hour on March 31 at 3:00 a.m. ++# From Paul Eggert (2014-02-17): ++# Here is an English-language source: ++# http://www.worldbulletin.net/turkey/129016/turkey-switches-to-daylight-saving-time-march-31 + + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S + Rule Turkey 1916 only - May 1 0:00 1:00 S +@@ -2797,6 +2848,8 @@ + 2:00 Turkey EE%sT 2007 + 2:00 EU EE%sT 2011 Mar 27 1:00u + 2:00 - EET 2011 Mar 28 1:00u ++ 2:00 EU EE%sT 2014 Mar 30 1:00u ++ 2:00 - EET 2014 Mar 31 1:00u + 2:00 EU EE%sT + Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. + +@@ -2818,19 +2871,13 @@ + # approval from 266 deputies. + # + # Ukraine abolishes transter back to the winter time (in Russian) +-# + # http://news.mail.ru/politics/6861560/ +-# + # + # The Ukrainians will no longer change the clock (in Russian) +-# + # http://www.segodnya.ua/news/14290482.html +-# + # + # Deputies cancelled the winter time (in Russian) +-# + # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/ +-# + # + # From Philip Pizzey (2011-10-18): + # Today my Ukrainian colleagues have informed me that the +@@ -2841,18 +2888,39 @@ + # As far as I understand, the recent change to the Ukrainian time zone + # (Europe/Kiev) to introduce permanent daylight saving time (similar + # to Russia) was reverted today: +-# +-# + # http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995 +-# + # + # Also reported by Alexander Bokovoy (2011-10-18) who also noted: + # The law documents themselves are at +-# +-# + # http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484 +-# + ++# From Vladimir in Moscow via Alois Treindl re Kiev time 1991/2 (2014-02-28): ++# First in Ukraine they changed Time zone from UTC+3 to UTC+2 with DST: ++# 03 25 1990 02:00 -03.00 1 Time Zone 3 with DST ++# 07 01 1990 02:00 -02.00 1 Time Zone 2 with DST ++# * Ukrainian Government's Resolution of 18.06.1990, No. 134. ++# http://search.ligazakon.ua/l_doc2.nsf/link1/T001500.html ++# ++# They did not end DST in September, 1990 (according to the law, ++# "summer time" was still in action): ++# 09 30 1990 03:00 -02.00 1 Time Zone 2 with DST ++# * Ukrainian Government's Resolution of 21.09.1990, No. 272. ++# http://search.ligazakon.ua/l_doc2.nsf/link1/KP900272.html ++# ++# Again no change in March, 1991 ("summer time" in action): ++# 03 31 1991 02:00 -02.00 1 Time Zone 2 with DST ++# ++# DST ended in September 1991 ("summer time" ended): ++# 09 29 1991 03:00 -02.00 0 Time Zone 2, no DST ++# * Ukrainian Government's Resolution of 25.09.1991, No. 225. ++# http://www.uazakon.com/documents/date_21/pg_iwgdoc.htm ++# This is an answer. ++# ++# Since 1992 they had normal DST procedure: ++# 03 29 1992 02:00 -02.00 1 DST started ++# 09 27 1992 03:00 -02.00 0 DST ended ++# * Ukrainian Government's Resolution of 20.03.1992, No. 139. ++# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm + + # Zone NAME GMTOFF RULES FORMAT [UNTIL] + # Most of Ukraine since 1970 has been like Kiev. +@@ -2863,9 +2931,8 @@ + 2:00 - EET 1930 Jun 21 + 3:00 - MSK 1941 Sep 20 + 1:00 C-Eur CE%sT 1943 Nov 6 +- 3:00 Russia MSK/MSD 1990 +- 3:00 - MSK 1990 Jul 1 2:00 +- 2:00 - EET 1992 ++ 3:00 Russia MSK/MSD 1990 Jul 1 2:00 ++ 2:00 1:00 EEST 1991 Sep 29 3:00 + 2:00 E-Eur EE%sT 1995 + 2:00 EU EE%sT + # Ruthenia used CET 1990/1991. +@@ -2907,7 +2974,7 @@ + # From Paul Eggert (2006-03-22): + # The _Economist_ (1994-05-28, p 45) reports that central Crimea switched + # from Kiev to Moscow time sometime after the January 1994 elections. +-# Shanks (1999) says ``date of change uncertain'', but implies that it happened ++# Shanks (1999) says "date of change uncertain", but implies that it happened + # sometime between the 1994 DST switches. Shanks & Pottenger simply say + # 1994-09-25 03:00, but that can't be right. For now, guess it + # changed in May. +@@ -2919,7 +2986,14 @@ + # Assume it happened in March by not changing the clocks. + 3:00 Russia MSK/MSD 1997 + 3:00 - MSK 1997 Mar lastSun 1:00u +- 2:00 EU EE%sT ++# From Alexander Krivenyshev (2014-03-17): ++# time change at 2:00 (2am) on March 30, 2014 ++# http://vz.ru/news/2014/3/17/677464.html ++ 2:00 EU EE%sT 2014 Mar 30 2:00 ++ 4:00 - MSK ++ ++# Vatican City ++# See Europe/Rome. + + ############################################################################### + +--- ./jdk/make/sun/javazic/tzdata/factory 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/factory 2014-01-18 12:16:25.000000000 -0800 +@@ -1,22 +1,22 @@ + # + # 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. +--- ./jdk/make/sun/javazic/tzdata/iso3166.tab 2013-09-06 11:27:40.000000000 -0700 ++++ ./jdk/make/sun/javazic/tzdata/iso3166.tab 2014-01-18 12:16:25.000000000 -0800 +@@ -1,30 +1,30 @@ + # + # 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. + # +-#

++# ISO 3166 alpha-2 country codes
++#
+ # This file is in the public domain, so clarified as of
+ # 2009-05-17 by Arthur David Olson.
+-# ISO 3166 alpha-2 country codes
+ #
+ # From Paul Eggert (2013-05-27):
+ #
+@@ -32,7 +32,7 @@
+ # 1.  ISO 3166-1 alpha-2 country code, current as of
+ #     ISO 3166-1 Newsletter VI-15 (2013-05-10).  See: Updates on ISO 3166
+ #   http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
+-# 2.  The usual English name for the country,
++# 2.  The usual English name for the coded region,
+ #     chosen so that alphabetic sorting of subsets produces helpful lists.
+ #     This is not the same as the English name in the ISO 3166 tables.
+ #
+@@ -46,7 +46,7 @@
+ # to take or endorse any position on legal or territorial claims.
+ #
+ #country-
+-#code	country name
++#code	name of country, territory, area, or subdivision
+ AD	Andorra
+ AE	United Arab Emirates
+ AF	Afghanistan
+@@ -76,7 +76,7 @@
+ BM	Bermuda
+ BN	Brunei
+ BO	Bolivia
+-BQ	Bonaire, St Eustatius & Saba
++BQ	Caribbean Netherlands
+ BR	Brazil
+ BS	Bahamas
+ BT	Bhutan
+--- ./jdk/make/sun/javazic/tzdata/leapseconds	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/leapseconds	2014-06-06 19:56:30.000000000 -0700
+@@ -1,37 +1,43 @@
+ #
+ # 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.
+ #
+-# 
+-# This file is in the public domain, so clarified as of
+-# 2009-05-17 by Arthur David Olson.
+-
+ # Allowance for leapseconds added to each timezone file.
+ 
++# This file is in the public domain.
++
++# This file is generated automatically from the data in the public-domain
++# leap-seconds.list file available from most NIST time servers.
++# If the URL  does not work,
++# you should be able to pick up leap-seconds.list from a secondary NIST server.
++# For more about leap-seconds.list, please see
++# The NTP Timescale and Leap Seconds
++# .
++
+ # The International Earth Rotation Service periodically uses leap seconds
+ # to keep UTC to within 0.9 s of UT1
+ # (which measures the true angular orientation of the earth in space); see
+ # Terry J Quinn, The BIPM and the accurate measure of time,
+-# Proc IEEE 79, 7 (July 1991), 894-905.
++# Proc IEEE 79, 7 (July 1991), 894-905 .
+ # There were no leap seconds before 1972, because the official mechanism
+ # accounting for the discrepancy between atomic time and the earth's rotation
+ # did not exist until the early 1970s.
+@@ -42,8 +48,8 @@
+ # or
+ #	Leap	YEAR	MON	DAY	23:59:59	-	R/S
+ 
+-# If the leapsecond is Rolling (R) the given time is local time
+-# If the leapsecond is Stationary (S) the given time is UTC
++# If the leapsecond is Rolling (R) the given time is local time.
++# If the leapsecond is Stationary (S) the given time is UTC.
+ 
+ # Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+ Leap	1972	Jun	30	23:59:60	+	S
+@@ -71,53 +77,3 @@
+ Leap	2005	Dec	31	23:59:60	+	S
+ Leap	2008	Dec	31	23:59:60	+	S
+ Leap	2012	Jun	30	23:59:60	+	S
+-
+-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
+-#
+-# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
+-#
+-#
+-# SERVICE DE LA ROTATION TERRESTRE
+-# OBSERVATOIRE DE PARIS
+-# 61, Av. de l'Observatoire 75014 PARIS (France)
+-# Tel.      : 33 (0) 1 40 51 22 26
+-# FAX       : 33 (0) 1 40 51 22 91
+-# e-mail    : (E-Mail Removed)
+-# http://hpiers.obspm.fr/eop-pc
+-#
+-# Paris, 5 January 2012
+-#
+-#
+-# Bulletin C 43
+-#
+-# To authorities responsible
+-# for the measurement and
+-# distribution of time
+-#
+-#
+-# UTC TIME STEP
+-# on the 1st of July 2012
+-#
+-#
+-# A positive leap second will be introduced at the end of June 2012.
+-# 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
+-#
+-# The difference between UTC and the International Atomic Time TAI is:
+-#
+-# from 2009 January 1, 0h UTC, to 2012 July 1  0h UTC  : UTC-TAI = - 34s
+-# from 2012 July 1,    0h UTC, until further notice    : UTC-TAI = - 35s
+-#
+-# Leap seconds can be introduced in UTC at the end of the months of December
+-# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
+-# six months, either to announce a time step in UTC or to confirm that there
+-# will be no time step at the next possible date.
+-#
+-#
+-# Daniel GAMBIS
+-# Head
+-# Earth Orientation Center of IERS
+-# Observatoire de Paris, France
+--- ./jdk/make/sun/javazic/tzdata/northamerica	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/northamerica	2014-06-06 19:56:30.000000000 -0700
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+@@ -43,7 +43,7 @@
+ # Howse writes (pp 121-125) that time zones were invented by
+ # Professor Charles Ferdinand Dowd (1825-1904),
+ # Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY).
+-# His pamphlet ``A System of National Time for Railroads'' (1870)
++# His pamphlet "A System of National Time for Railroads" (1870)
+ # was the result of his proposals at the Convention of Railroad Trunk Lines
+ # in New York City (1869-10).  His 1870 proposal was based on Washington, DC,
+ # but in 1872-05 he moved the proposed origin to Greenwich.
+@@ -63,8 +63,8 @@
+ 
+ # From Paul Eggert (2001-03-06):
+ # Daylight Saving Time was first suggested as a joke by Benjamin Franklin
+-# in his whimsical essay ``An Economical Project for Diminishing the Cost
+-# of Light'' published in the Journal de Paris (1784-04-26).
++# in his whimsical essay "An Economical Project for Diminishing the Cost
++# of Light" published in the Journal de Paris (1784-04-26).
+ # Not everyone is happy with the results:
+ #
+ #	I don't really care how time is reckoned so long as there is some
+@@ -190,8 +190,8 @@
+ #    of the Aleutian islands.   No DST.
+ 
+ # From Paul Eggert (1995-12-19):
+-# The tables below use `NST', not `NT', for Nome Standard Time.
+-# I invented `CAWT' for Central Alaska War Time.
++# The tables below use 'NST', not 'NT', for Nome Standard Time.
++# I invented 'CAWT' for Central Alaska War Time.
+ 
+ # From U. S. Naval Observatory (1989-01-19):
+ # USA  EASTERN       5 H  BEHIND UTC    NEW YORK, WASHINGTON
+@@ -260,9 +260,9 @@
+ # H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS.
+ #   (a) Amendment- Section 3(a) of the Uniform Time Act of 1966 (15
+ #   U.S.C. 260a(a)) is amended--
+-#     (1) by striking `first Sunday of April' and inserting `second
++#     (1) by striking 'first Sunday of April' and inserting 'second
+ #     Sunday of March'; and
+-#     (2) by striking `last Sunday of October' and inserting `first
++#     (2) by striking 'last Sunday of October' and inserting 'first
+ #     Sunday of November'.
+ #   (b) Effective Date- Subsection (a) shall take effect 1 year after the
+ #   date of enactment of this Act or March 1, 2007, whichever is later.
+@@ -414,9 +414,10 @@
+ # US Pacific time, represented by Los Angeles
+ #
+ # California, northern Idaho (Benewah, Bonner, Boundary, Clearwater,
+-# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties,
+-# and the northern three-quarters of Idaho county),
+-# most of Nevada, most of Oregon, and Washington
++# Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties, Idaho county
++# north of the Salmon River, and the towns of Burgdorf and Warren),
++# Nevada (except West Wendover), Oregon (except the northern 3/4 of
++# Malheur county), and Washington
+ #
+ # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER
+ Rule	CA	1948	only	-	Mar	14	2:00	1:00	D
+@@ -623,6 +624,8 @@
+ 			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
+ 			-10:00	-	HST
+ 
++Link Pacific/Honolulu Pacific/Johnston
++
+ # Now we turn to US areas that have diverged from the consensus since 1970.
+ 
+ # Arizona mostly uses MST.
+@@ -659,8 +662,9 @@
+ # Navajo Nation participates in the Daylight Saving Time policy, due to its
+ # large size and location in three states."  (The "only" means that other
+ # tribal nations don't use DST.)
+-
+-Link America/Denver America/Shiprock
++#
++# From Paul Eggert (2013-08-26):
++# See America/Denver for a zone appropriate for the Navajo Nation.
+ 
+ # Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine,
+ # Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
+@@ -700,13 +704,13 @@
+ #   and Switzerland counties have their own time zone histories as noted below.
+ #
+ # Shanks partitioned Indiana into 345 regions, each with its own time history,
+-# and wrote ``Even newspaper reports present contradictory information.''
++# and wrote "Even newspaper reports present contradictory information."
+ # Those Hoosiers!  Such a flighty and changeable people!
+ # Fortunately, most of the complexity occurred before our cutoff date of 1970.
+ #
+ # Other than Indianapolis, the Indiana place names are so nondescript
+-# that they would be ambiguous if we left them at the `America' level.
+-# So we reluctantly put them all in a subdirectory `America/Indiana'.
++# that they would be ambiguous if we left them at the 'America' level.
++# So we reluctantly put them all in a subdirectory 'America/Indiana'.
+ 
+ # From Paul Eggert (2005-08-16):
+ # http://www.mccsc.edu/time.html says that Indiana will use DST starting 2006.
+@@ -970,8 +974,8 @@
+ # This story is too entertaining to be false, so go with Howse over Shanks.
+ #
+ # From Paul Eggert (2001-03-06):
+-# Garland (1927) writes ``Cleveland and Detroit advanced their clocks
+-# one hour in 1914.''  This change is not in Shanks.  We have no more
++# Garland (1927) writes "Cleveland and Detroit advanced their clocks
++# one hour in 1914."  This change is not in Shanks.  We have no more
+ # info, so omit this for now.
+ #
+ # Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
+@@ -1011,7 +1015,7 @@
+ # occupied 1857/1900 by the Navassa Phosphate Co
+ # US lighthouse 1917/1996-09
+ # currently uninhabited
+-# see Mark Fineman, ``An Isle Rich in Guano and Discord'',
++# see Mark Fineman, "An Isle Rich in Guano and Discord",
+ # _Los Angeles Times_ (1998-11-10), A1, A10; it cites
+ # Jimmy Skaggs, _The Great Guano Rush_ (1994).
+ 
+@@ -1045,7 +1049,7 @@
+ #	Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
+ #	.
+ #
+-# See the `europe' file for Greenland.
++# See the 'europe' file for Greenland.
+ 
+ # Canada
+ 
+@@ -1246,7 +1250,7 @@
+ 
+ # most of east Labrador
+ 
+-# The name `Happy Valley-Goose Bay' is too long; use `Goose Bay'.
++# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'.
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone America/Goose_Bay	-4:01:40 -	LMT	1884 # Happy Valley-Goose Bay
+ 			-3:30:52 -	NST	1918
+@@ -1363,25 +1367,27 @@
+ 
+ # Quebec
+ 
+-# From Paul Eggert (2006-07-09):
+-# Shanks & Pottenger write that since 1970 most of Quebec has been
+-# like Montreal.
++# From Paul Eggert (2013-08-30):
++# Since 1970 most of Quebec has been like Toronto.
++# However, because earlier versions of the tz database mistakenly relied on data
++# from Shanks & Pottenger saying that Quebec differed from Ontario after 1970,
++# a separate entry was created for most of Quebec.  We're loath to lose
++# its pre-1970 info, even though the tz database is normally limited to
++# zones that differ after 1970, so keep this otherwise out-of-scope entry.
+ 
+-# From Paul Eggert (2006-06-27):
+ # Matthews and Vincent (1998) also write that Quebec east of the -63
+ # meridian is supposed to observe AST, but residents as far east as
+ # Natashquan use EST/EDT, and residents east of Natashquan use AST.
+-# In "Official time in Quebec" the Quebec department of justice writes in
+-# http://www.justice.gouv.qc.ca/english/publications/generale/temps-regl-1-a.htm
+-# that "The residents of the Municipality of the
+-# Cote-Nord-du-Golfe-Saint-Laurent and the municipalities of Saint-Augustin,
+-# Bonne-Esperance and Blanc-Sablon apply the Official Time Act as it is
+-# written and use Atlantic standard time all year round. The same applies to
+-# the residents of the Native facilities along the lower North Shore."
+-# 
++# The Quebec department of justice writes in
++# "The situation in Minganie and Basse-Cote-Nord"
++# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm
++# that the coastal strip from just east of Natashquan to Blanc-Sablon
++# observes Atlantic standard time all year round.
++# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en
+ # says this common practice was codified into law as of 2007.
+ # For lack of better info, guess this practice began around 1970, contra to
+ # Shanks & Pottenger who have this region observing AST/ADT.
++# for post-1970 data America/Puerto_Rico.
+ 
+ # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+ Rule	Mont	1917	only	-	Mar	25	2:00	1:00	D
+@@ -1425,7 +1431,6 @@
+ 			-5:00	Mont	E%sT	1974
+ 			-5:00	Canada	E%sT
+ 
+-
+ # Ontario
+ 
+ # From Paul Eggert (2006-07-09):
+@@ -1644,7 +1649,7 @@
+ 			-6:00	-	CST	1910
+ 			-5:00	-	EST	1942
+ 			-5:00	Canada	E%sT	1970
+-			-5:00	Mont	E%sT	1973
++			-5:00	Toronto	E%sT	1973
+ 			-5:00	-	EST	1974
+ 			-5:00	Canada	E%sT
+ Zone America/Nipigon	-5:53:04 -	LMT	1895
+@@ -2231,7 +2236,7 @@
+ # From Paul Eggert (1996-06-12):
+ # For an English translation of the decree, see
+ # 
+-# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
++# "Diario Oficial: Time Zone Changeover" (1996-01-04).
+ # 
+ 
+ # From Rives McDow (1998-10-08):
+@@ -2568,9 +2573,7 @@
+ ###############################################################################
+ 
+ # Anguilla
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/Anguilla	-4:12:16 -	LMT	1912 Mar 2
+-			-4:00	-	AST
++# See 'southamerica'.
+ 
+ # Antigua and Barbuda
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+@@ -2639,13 +2642,13 @@
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone Atlantic/Bermuda	-4:19:18 -	LMT	1930 Jan  1 2:00    # Hamilton
+ 			-4:00	-	AST	1974 Apr 28 2:00
+-			-4:00	Bahamas	A%sT	1976
++			-4:00	Canada	A%sT	1976
+ 			-4:00	US	A%sT
+ 
+ # Cayman Is
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone	America/Cayman	-5:25:32 -	LMT	1890		# Georgetown
+-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
++			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
+ 			-5:00	-	EST
+ 
+ # Costa Rica
+@@ -2660,7 +2663,7 @@
+ # go with Shanks & Pottenger.
+ Rule	CR	1991	only	-	Jul	 1	0:00	0	S
+ Rule	CR	1992	only	-	Mar	15	0:00	0	S
+-# There are too many San Joses elsewhere, so we'll use `Costa Rica'.
++# There are too many San Joses elsewhere, so we'll use 'Costa Rica'.
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone America/Costa_Rica	-5:36:13 -	LMT	1890		# San Jose
+ 			-5:36:13 -	SJMT	1921 Jan 15 # San Jose Mean Time
+@@ -2686,6 +2689,11 @@
+ # to DST--and one more hour on 1999-04-04--when the announcers will have
+ # returned to Baltimore, which switches on that date.)
+ 
++# From Steffen Thorsen (2013-11-11):
++# DST start in Cuba in 2004 ... does not follow the same rules as the
++# years before.  The correct date should be Sunday 2004-03-28 00:00 ...
++# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html
++
+ # From Evert van der Veer via Steffen Thorsen (2004-10-28):
+ # Cuba is not going back to standard time this year.
+ # From Paul Eggert (2006-03-22):
+@@ -2875,7 +2883,8 @@
+ Rule	Cuba	1997	only	-	Oct	12	0:00s	0	S
+ Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
+ Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
+-Rule	Cuba	2000	2004	-	Apr	Sun>=1	0:00s	1:00	D
++Rule	Cuba	2000	2003	-	Apr	Sun>=1	0:00s	1:00	D
++Rule	Cuba	2004	only	-	Mar	lastSun	0:00s	1:00	D
+ Rule	Cuba	2006	2010	-	Oct	lastSun	0:00s	0	S
+ Rule	Cuba	2007	only	-	Mar	Sun>=8	0:00s	1:00	D
+ Rule	Cuba	2008	only	-	Mar	Sun>=15	0:00s	1:00	D
+@@ -2892,9 +2901,7 @@
+ 			-5:00	Cuba	C%sT
+ 
+ # Dominica
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/Dominica	-4:05:36 -	LMT	1911 Jul 1 0:01		# Roseau
+-			-4:00	-	AST
++# See 'southamerica'.
+ 
+ # Dominican Republic
+ 
+@@ -2943,18 +2950,10 @@
+ 			-6:00	Salv	C%sT
+ 
+ # Grenada
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone	America/Grenada	-4:07:00 -	LMT	1911 Jul	# St George's
+-			-4:00	-	AST
+-
+ # Guadeloupe
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/Guadeloupe	-4:06:08 -	LMT	1911 Jun 8	# Pointe a Pitre
+-			-4:00	-	AST
+ # St Barthelemy
+-Link America/Guadeloupe	America/St_Barthelemy
+ # St Martin (French part)
+-Link America/Guadeloupe	America/Marigot
++# See 'southamerica'.
+ 
+ # Guatemala
+ #
+@@ -3097,17 +3096,12 @@
+ # Great Swan I ceded by US to Honduras in 1972
+ 
+ # Jamaica
+-
+-# From Bob Devine (1988-01-28):
+-# Follows US rules.
+-
+-# From U. S. Naval Observatory (1989-01-19):
+-# JAMAICA             5 H  BEHIND UTC
+-
+-# From Shanks & Pottenger:
++# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
++# unspecified official document, and says "This time is used throughout the
++# island".  Go with Milne.  Round to the nearest second as required by zic.
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone	America/Jamaica	-5:07:12 -	LMT	1890		# Kingston
+-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
++Zone	America/Jamaica	-5:07:11 -	LMT	1890		# Kingston
++			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
+ 			-5:00	-	EST	1974 Apr 28 2:00
+ 			-5:00	US	E%sT	1984
+ 			-5:00	-	EST
+@@ -3121,12 +3115,7 @@
+ 			-4:00	-	AST
+ 
+ # Montserrat
+-# From Paul Eggert (2006-03-22):
+-# In 1995 volcanic eruptions forced evacuation of Plymouth, the capital.
+-# world.gazetteer.com says Cork Hill is the most populous location now.
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/Montserrat	-4:08:52 -	LMT	1911 Jul 1 0:01   # Cork Hill
+-			-4:00	-	AST
++# See 'southamerica'.
+ 
+ # Nicaragua
+ #
+@@ -3200,7 +3189,7 @@
+ 			-5:00	-	EST
+ 
+ # Puerto Rico
+-# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'.
++# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone America/Puerto_Rico -4:24:25 -	LMT	1899 Mar 28 12:00    # San Juan
+ 			-4:00	-	AST	1942 May  3
+@@ -3208,18 +3197,11 @@
+ 			-4:00	-	AST
+ 
+ # St Kitts-Nevis
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/St_Kitts	-4:10:52 -	LMT	1912 Mar 2	# Basseterre
+-			-4:00	-	AST
+-
+ # St Lucia
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/St_Lucia	-4:04:00 -	LMT	1890		# Castries
+-			-4:04:00 -	CMT	1912	    # Castries Mean Time
+-			-4:00	-	AST
++# See 'southamerica'.
+ 
+ # St Pierre and Miquelon
+-# There are too many St Pierres elsewhere, so we'll use `Miquelon'.
++# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone America/Miquelon	-3:44:40 -	LMT	1911 May 15	# St Pierre
+ 			-4:00	-	AST	1980 May
+@@ -3227,10 +3209,7 @@
+ 			-3:00	Canada	PM%sT
+ 
+ # St Vincent and the Grenadines
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/St_Vincent	-4:04:56 -	LMT	1890		# Kingstown
+-			-4:04:56 -	KMT	1912	   # Kingstown Mean Time
+-			-4:00	-	AST
++# See 'southamerica'.
+ 
+ # Turks and Caicos
+ #
+@@ -3260,15 +3239,9 @@
+ Rule	TC	2007	max	-	Nov	Sun>=1	2:00	0	S
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+ Zone America/Grand_Turk	-4:44:32 -	LMT	1890
+-			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
++			-5:07:11 -	KMT	1912 Feb    # Kingston Mean Time
+ 			-5:00	TC	E%sT
+ 
+ # British Virgin Is
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/Tortola	-4:18:28 -	LMT	1911 Jul    # Road Town
+-			-4:00	-	AST
+-
+ # Virgin Is
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone America/St_Thomas	-4:19:44 -	LMT	1911 Jul    # Charlotte Amalie
+-			-4:00	-	AST
++# See 'southamerica'.
+--- ./jdk/make/sun/javazic/tzdata/pacificnew	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/pacificnew	2014-01-18 12:16:25.000000000 -0800
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+--- ./jdk/make/sun/javazic/tzdata/solar87	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/solar87	2014-01-18 12:16:26.000000000 -0800
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+--- ./jdk/make/sun/javazic/tzdata/solar88	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/solar88	2014-01-18 12:16:26.000000000 -0800
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+--- ./jdk/make/sun/javazic/tzdata/solar89	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/solar89	2014-01-18 12:16:26.000000000 -0800
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+--- ./jdk/make/sun/javazic/tzdata/southamerica	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/southamerica	2014-06-06 19:56:30.000000000 -0700
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+@@ -474,6 +474,17 @@
+ # rules...San Luis is still using "Western ARgentina Time" and it got
+ # stuck on Summer daylight savings time even though the summer is over.
+ 
++# From Paul Eggert (2013-09-05):
++# Perhaps San Luis operates on the legal fiction that it is at UTC-4
++# with perpetual summer time, but ordinary usage typically seems to
++# just say it's at UTC-3; see, for example,
++# .
++# We've documented similar situations as being plain changes to
++# standard time, so let's do that here too.  This does not change UTC
++# offsets, only tm_isdst and the time zone abbreviations.  One minor
++# plus is that this silences a zic complaint that there's no POSIX TZ
++# setting for time stamps past 2038.
++
+ # From Paul Eggert (2013-02-21):
+ # Milne says Cordoba time was -4:16:48.2.  Round to the nearest second.
+ 
+@@ -611,7 +622,7 @@
+ # San Luis (SL)
+ 
+ Rule	SanLuis	2008	2009	-	Mar	Sun>=8	0:00	0	-
+-Rule	SanLuis	2007	2009	-	Oct	Sun>=8	0:00	1:00	S
++Rule	SanLuis	2007	2008	-	Oct	Sun>=8	0:00	1:00	S
+ 
+ Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
+ 			-4:16:48 -	CMT	1920 May
+@@ -627,7 +638,8 @@
+ 			-3:00	-	ART	2004 May 31
+ 			-4:00	-	WART	2004 Jul 25
+ 			-3:00	Arg	AR%sT	2008 Jan 21
+-			-4:00	SanLuis	WAR%sT
++			-4:00	SanLuis	WAR%sT	2009 Oct 11
++			-3:00	-	ART
+ #
+ # Santa Cruz (SC)
+ Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
+@@ -654,10 +666,7 @@
+ 			-3:00	-	ART
+ 
+ # Aruba
+-# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+-Zone	America/Aruba	-4:40:24 -	LMT	1912 Feb 12	# Oranjestad
+-			-4:30	-	ANT	1965 # Netherlands Antilles Time
+-			-4:00	-	AST
++Link America/Curacao America/Aruba
+ 
+ # Bolivia
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+@@ -859,6 +868,21 @@
+ # Tocantins state will have DST.
+ # http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
+ 
++# From Steffen Thorsen (2013-09-20):
++# Tocantins in Brazil is very likely not to observe DST from October....
++# http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto
++# We will keep this article updated when this is confirmed:
++# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html
++
++# From Steffen Thorsen (2013-10-17):
++# http://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html
++# Senator Jorge Viana announced that Acre will change time zone on November 10.
++# He did not specify the time of the change, nor if western parts of Amazonas
++# will change as well.
++#
++# From Paul Eggert (2013-10-17):
++# For now, assume western Amazonas will change as well.
++
+ # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+ # Decree 20,466 (1931-10-01)
+ # Decree 21,896 (1932-01-10)
+@@ -1078,7 +1102,8 @@
+ 			-3:00	-	BRT	1995 Sep 14
+ 			-3:00	Brazil	BR%sT	2003 Sep 24
+ 			-3:00	-	BRT	2012 Oct 21
+-			-3:00	Brazil	BR%sT
++			-3:00	Brazil	BR%sT	2013 Sep
++			-3:00	-	BRT
+ #
+ # Alagoas (AL), Sergipe (SE)
+ Zone America/Maceio	-2:22:52 -	LMT	1914
+@@ -1146,13 +1171,15 @@
+ 			-5:00	-	ACT	1993 Sep 28
+ 			-5:00	Brazil	AC%sT	1994 Sep 22
+ 			-5:00	-	ACT	2008 Jun 24 00:00
+-			-4:00	-	AMT
++			-4:00	-	AMT	2013 Nov 10
++			-5:00	-	ACT
+ #
+ # Acre (AC)
+ Zone America/Rio_Branco	-4:31:12 -	LMT	1914
+ 			-5:00	Brazil	AC%sT	1988 Sep 12
+ 			-5:00	-	ACT	2008 Jun 24 00:00
+-			-4:00	-	AMT
++			-4:00	-	AMT	2013 Nov 10
++			-5:00	-	ACT
+ 
+ # Chile
+ 
+@@ -1271,6 +1298,13 @@
+ # start date is 2013-09-08 00:00....
+ # http://www.gob.cl/informa/2013/02/15/gobierno-anuncia-fechas-de-cambio-de-hora-para-el-ano-2013.htm
+ 
++# From Jose Miguel Garrido (2014-02-19):
++# Today appeared in the Diario Oficial a decree amending the time change
++# dates to 2014.
++# DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC)
++# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
++# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
++
+ # NOTE: ChileAQ rules for Antarctic bases are stored separately in the
+ # 'antarctica' file.
+ 
+@@ -1373,12 +1407,12 @@
+ 			-4:00	-	AST
+ 
+ # From Arthur David Olson (2011-06-15):
+-# At least for now, use links for places with new iso3166 codes.
++# use links for places with new iso3166 codes.
+ # The name "Lower Prince's Quarter" is both longer than fourteen charaters
+ # and contains an apostrophe; use "Lower_Princes" below.
+ 
+-Link	America/Curacao	America/Lower_Princes # Sint Maarten
+-Link	America/Curacao	America/Kralendijk # Bonaire, Sint Estatius and Saba
++Link	America/Curacao	America/Lower_Princes	# Sint Maarten
++Link	America/Curacao	America/Kralendijk	# Caribbean Netherlands
+ 
+ # Ecuador
+ #
+@@ -1519,10 +1553,16 @@
+ 			-4:00	-	GYT
+ 
+ # Paraguay
++#
+ # From Paul Eggert (2006-03-22):
+ # Shanks & Pottenger say that spring transitions are from 01:00 -> 02:00,
+ # and autumn transitions are from 00:00 -> 23:00.  Go with pre-1999
+ # editions of Shanks, and with the IATA, who say transitions occur at 00:00.
++#
++# From Waldemar Villamayor-Venialbo (2013-09-20):
++# No time of the day is established for the adjustment, so people normally
++# adjust their clocks at 0 hour of the given dates.
++#
+ # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+ Rule	Para	1975	1988	-	Oct	 1	0:00	1:00	S
+ Rule	Para	1975	1978	-	Mar	 1	0:00	0	-
+@@ -1598,6 +1638,9 @@
+ # From Carlos Raul Perasso (2013-03-15):
+ # The change in Paraguay is now final.  Decree number 10780
+ # http://www.presidencia.gov.py/uploads/pdf/presidencia-3b86ff4b691c79d4f5927ca964922ec74772ce857c02ca054a52a37b49afc7fb.pdf
++# From Carlos Raul Perasso (2014-02-28):
++# Decree 1264 can be found at:
++# http://www.presidencia.gov.py/archivos/documentos/DECRETO1264_ey9r8zai.pdf
+ Rule	Para	2013	max	-	Mar	Sun>=22	0:00	0	-
+ 
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+@@ -1656,6 +1699,20 @@
+ Zone America/Port_of_Spain -4:06:04 -	LMT	1912 Mar 2
+ 			-4:00	-	AST
+ 
++# These all agree with Trinidad and Tobago since 1970.
++Link America/Port_of_Spain America/Anguilla
++Link America/Port_of_Spain America/Dominica
++Link America/Port_of_Spain America/Grenada
++Link America/Port_of_Spain America/Guadeloupe
++Link America/Port_of_Spain America/Marigot	# St Martin (French part)
++Link America/Port_of_Spain America/Montserrat
++Link America/Port_of_Spain America/St_Barthelemy
++Link America/Port_of_Spain America/St_Kitts	# St Kitts & Nevis
++Link America/Port_of_Spain America/St_Lucia
++Link America/Port_of_Spain America/St_Thomas	# Virgin Islands (US)
++Link America/Port_of_Spain America/St_Vincent
++Link America/Port_of_Spain America/Tortola	# Virgin Islands (UK)
++
+ # Uruguay
+ # From Paul Eggert (1993-11-18):
+ # Uruguay wins the prize for the strangest peacetime manipulation of the rules.
+@@ -1673,7 +1730,7 @@
+ # Whitman gives 1937 Oct 3; go with Shanks & Pottenger.
+ Rule	Uruguay	1937	1940	-	Oct	lastSun	 0:00	0:30	HS
+ # Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13,
+-# and 1943 Apr 13 ``to present time''; go with Shanks & Pottenger.
++# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger.
+ Rule	Uruguay	1941	only	-	Aug	 1	 0:00	0:30	HS
+ Rule	Uruguay	1942	only	-	Jan	 1	 0:00	0	-
+ Rule	Uruguay	1942	only	-	Dec	14	 0:00	1:00	S
+--- ./jdk/make/sun/javazic/tzdata/systemv	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/systemv	2014-01-18 12:16:26.000000000 -0800
+@@ -1,22 +1,22 @@
+ #
+ # 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.
+--- ./jdk/make/sun/javazic/tzdata/zone.tab	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/javazic/tzdata/zone.tab	2014-06-06 19:56:30.000000000 -0700
+@@ -1,53 +1,55 @@
+ #
+ # 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.
+ #
+-# 
++# TZ zone descriptions
++#
+ # This file is in the public domain, so clarified as of
+ # 2009-05-17 by Arthur David Olson.
+ #
+-# TZ zone descriptions
++# From Paul Eggert (2013-08-14):
+ #
+-# From Paul Eggert (2013-05-27):
++# This file contains a table where each row stands for an area that is
++# the intersection of a region identified by a country code and of a
++# zone where civil clocks have agreed since 1970.  The columns of the
++# table are as follows:
+ #
+-# This file contains a table with the following columns:
+-# 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
+-#     This identifies a country that overlaps the zone.  The country may
+-#     overlap other zones and the zone may overlap other countries.
+-# 2.  Latitude and longitude of the zone's principal location
++# 1.  ISO 3166 2-character country code.  See the file 'iso3166.tab'.
++# 2.  Latitude and longitude of the area's principal location
+ #     in ISO 6709 sign-degrees-minutes-seconds format,
+ #     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
+ #     first latitude (+ is north), then longitude (+ is east).
+-#     This location need not lie within the column-1 country.
+ # 3.  Zone name used in value of TZ environment variable.
+ #     Please see the 'Theory' file for how zone names are chosen.
++#     If multiple zones overlap a country, each has a row in the
++#     table, with column 1 being duplicated.
+ # 4.  Comments; present if and only if the country has multiple rows.
+ #
+ # Columns are separated by a single tab.
+ # The table is sorted first by country, then an order within the country that
+ # (1) makes some geographical sense, and
+-# (2) puts the most populous zones first, where that does not contradict (1).
++# (2) puts the most populous areas first, where that does not contradict (1).
+ #
+-# Lines beginning with `#' are comments.
++# Lines beginning with '#' are comments.
+ #
+ # This table is intended as an aid for users, to help them select time
+ # zone data appropriate for their practical needs.  It is not intended
+@@ -63,8 +65,7 @@
+ AL	+4120+01950	Europe/Tirane
+ AM	+4011+04430	Asia/Yerevan
+ AO	-0848+01314	Africa/Luanda
+-AQ	-7750+16636	Antarctica/McMurdo	McMurdo Station, Ross Island
+-AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
++AQ	-7750+16636	Antarctica/McMurdo	McMurdo, South Pole, Scott (New Zealand time)
+ AQ	-6734-06808	Antarctica/Rothera	Rothera Station, Adelaide Island
+ AQ	-6448-06406	Antarctica/Palmer	Palmer Station, Anvers Island
+ AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
+@@ -73,6 +74,7 @@
+ AQ	-7824+10654	Antarctica/Vostok	Vostok Station, Lake Vostok
+ AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
+ AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
++AQ	-720041+0023206	Antarctica/Troll	Troll Station, Queen Maud Land
+ AR	-3436-05827	America/Argentina/Buenos_Aires	Buenos Aires (BA, CF)
+ AR	-3124-06411	America/Argentina/Cordoba	most locations (CB, CC, CN, ER, FM, MN, SE, SF)
+ AR	-2447-06525	America/Argentina/Salta	(SA, LP, NQ, RN)
+@@ -144,8 +146,7 @@
+ CA	+4606-06447	America/Moncton	Atlantic Time - New Brunswick
+ CA	+5320-06025	America/Goose_Bay	Atlantic Time - Labrador - most locations
+ CA	+5125-05707	America/Blanc-Sablon	Atlantic Standard Time - Quebec - Lower North Shore
+-CA	+4531-07334	America/Montreal	Eastern Time - Quebec - most locations
+-CA	+4339-07923	America/Toronto	Eastern Time - Ontario - most locations
++CA	+4339-07923	America/Toronto	Eastern Time - Ontario & Quebec - most locations
+ CA	+4901-08816	America/Nipigon	Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
+ CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
+ CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
+@@ -256,7 +257,7 @@
+ IS	+6409-02151	Atlantic/Reykjavik
+ IT	+4154+01229	Europe/Rome
+ JE	+4912-00207	Europe/Jersey
+-JM	+1800-07648	America/Jamaica
++JM	+175805-0764736	America/Jamaica
+ JO	+3157+03556	Asia/Amman
+ JP	+353916+1394441	Asia/Tokyo
+ KE	-0117+03649	Africa/Nairobi
+@@ -366,6 +367,7 @@
+ RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
+ RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
+ RU	+5312+05009	Europe/Samara	Moscow+00 - Samara, Udmurtia
++RU	+4457+03406	Europe/Simferopol	Moscow+00 - Crimea
+ RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
+ RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
+ RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
+@@ -421,7 +423,6 @@
+ UA	+5026+03031	Europe/Kiev	most locations
+ UA	+4837+02218	Europe/Uzhgorod	Ruthenia
+ UA	+4750+03510	Europe/Zaporozhye	Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
+-UA	+4457+03406	Europe/Simferopol	central Crimea
+ UG	+0019+03225	Africa/Kampala
+ UM	+1645-16931	Pacific/Johnston	Johnston Atoll
+ UM	+2813-17722	Pacific/Midway	Midway Islands
+@@ -445,8 +446,7 @@
+ US	+471551-1014640	America/North_Dakota/Beulah	Central Time - North Dakota - Mercer County
+ US	+394421-1045903	America/Denver	Mountain Time
+ US	+433649-1161209	America/Boise	Mountain Time - south Idaho & east Oregon
+-US	+364708-1084111	America/Shiprock	Mountain Time - Navajo
+-US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona
++US	+332654-1120424	America/Phoenix	Mountain Standard Time - Arizona (except Navajo)
+ US	+340308-1181434	America/Los_Angeles	Pacific Time
+ US	+611305-1495401	America/Anchorage	Alaska Time
+ US	+581807-1342511	America/Juneau	Alaska Time - Alaska panhandle
+--- ./jdk/make/sun/jawt/Makefile	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/jawt/Makefile	2014-06-06 19:56:34.000000000 -0700
+@@ -99,8 +99,7 @@
+ #
+ # Other extra flags needed for compiling.
+ #
+-CPPFLAGS += -I$(OPENWIN_HOME)/include \
+-	    -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
+             -I$(SHARE_SRC)/native/$(PKGDIR)/image \
+ 	    -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
+ 	    -I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \
+@@ -114,6 +113,7 @@
+ 	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
+ 	    -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
+             -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
++            -I$(OPENWIN_HOME)/include \
+ 	    $(EVENT_MODEL)
+ 
+ #
+@@ -127,7 +127,7 @@
+   endif
+ endif # PLATFORM
+ 
+-ifeq ($(PLATFORM), linux)
++ifneq (,$(findstring $(PLATFORM), linux bsd))
+   ifndef BUILD_HEADLESS_ONLY
+     OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
+   else
+--- ./jdk/make/sun/net/FILES_java.gmk	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/net/FILES_java.gmk	2014-01-18 12:16:26.000000000 -0800
+@@ -24,122 +24,123 @@
+ #
+ 
+ FILES_java = \
+-	sun/net/InetAddressCachePolicy.java \
+-	sun/net/URLCanonicalizer.java \
+-	sun/net/NetworkClient.java \
+-	sun/net/NetworkServer.java \
+-	sun/net/ProgressMonitor.java \
+-	sun/net/ProgressSource.java \
+-	sun/net/ProgressEvent.java \
+-	sun/net/ProgressListener.java \
+-	sun/net/ProgressMeteringPolicy.java \
+-	sun/net/SocksProxy.java \
+-	sun/net/ResourceManager.java \
+-	sun/net/TelnetInputStream.java \
+-	sun/net/TelnetOutputStream.java \
+-	sun/net/TelnetProtocolException.java \
+-	sun/net/TransferProtocolClient.java \
+-	sun/net/ConnectionResetException.java \
+-	sun/net/NetProperties.java \
+-	sun/net/NetHooks.java \
+-	sun/net/util/IPAddressUtil.java \
+-	sun/net/util/URLUtil.java \
+-	sun/net/dns/ResolverConfiguration.java \
+-	sun/net/dns/ResolverConfigurationImpl.java \
+-	sun/net/ftp/FtpClient.java \
+-	sun/net/ftp/FtpClientProvider.java \
+-	sun/net/ftp/FtpDirEntry.java \
+-	sun/net/ftp/FtpReplyCode.java \
+-	sun/net/ftp/FtpDirParser.java \
+-	sun/net/ftp/FtpLoginException.java \
+-	sun/net/ftp/FtpProtocolException.java \
+-	sun/net/ftp/impl/FtpClient.java \
+-	sun/net/ftp/impl/DefaultFtpClientProvider.java \
+-	sun/net/sdp/SdpSupport.java \
+-	sun/net/spi/DefaultProxySelector.java \
+-	sun/net/spi/nameservice/NameServiceDescriptor.java \
+-	sun/net/spi/nameservice/NameService.java \
+-	sun/net/smtp/SmtpClient.java \
+-	sun/net/smtp/SmtpProtocolException.java \
+-	sun/net/www/content/text/Generic.java \
+-	sun/net/www/content/text/plain.java \
+-	sun/net/www/content/text/PlainTextInputStream.java \
+-	sun/net/www/MessageHeader.java \
+-	sun/net/www/HeaderParser.java \
+-	sun/net/www/MeteredStream.java \
+-	sun/net/www/MimeEntry.java \
+-	sun/net/www/MimeLauncher.java \
+-	sun/net/www/ApplicationLaunchException.java \
+-	sun/net/www/MimeTable.java \
+-	sun/net/www/URLConnection.java \
+-	sun/net/www/ParseUtil.java \
+-	sun/net/www/protocol/file/Handler.java \
+-	sun/net/www/protocol/file/FileURLConnection.java \
+-	sun/net/www/http/HttpClient.java \
+-	sun/net/www/http/HttpCapture.java \
+-	sun/net/www/http/HttpCaptureInputStream.java \
+-	sun/net/www/http/HttpCaptureOutputStream.java \
+-	sun/net/www/http/PosterOutputStream.java \
+-	sun/net/www/http/ChunkedInputStream.java \
+-	sun/net/www/http/ChunkedOutputStream.java \
+-	sun/net/www/http/KeepAliveCache.java \
+-	sun/net/www/http/KeepAliveStream.java \
+-	sun/net/www/http/KeepAliveStreamCleaner.java \
+-	sun/net/www/http/Hurryable.java \
+-	sun/net/www/protocol/http/Handler.java \
+-	sun/net/www/protocol/http/HttpURLConnection.java \
+-	sun/net/www/protocol/http/HttpAuthenticator.java \
+-	sun/net/www/protocol/http/AuthenticationHeader.java \
+-	sun/net/www/protocol/http/AuthenticationInfo.java \
+-	sun/net/www/protocol/http/AuthCache.java \
+-	sun/net/www/protocol/http/AuthCacheImpl.java \
+-	sun/net/www/protocol/http/AuthCacheValue.java \
+-	sun/net/www/protocol/http/AuthScheme.java \
+-	sun/net/www/protocol/http/BasicAuthentication.java \
+-	sun/net/www/protocol/http/DigestAuthentication.java \
+-	sun/net/www/protocol/http/NTLMAuthenticationProxy.java \
+-	sun/net/www/protocol/http/NegotiateAuthentication.java \
+-	sun/net/www/protocol/http/Negotiator.java \
+-	sun/net/www/protocol/http/ntlm/NTLMAuthentication.java \
+-	sun/net/www/protocol/http/ntlm/NTLMAuthenticationCallback.java \
+-	sun/net/www/protocol/http/spnego/NegotiatorImpl.java \
+-	sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java \
+-	sun/net/www/protocol/http/logging/HttpLogFormatter.java \
+-	sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java \
+-	sun/net/www/protocol/https/HttpsClient.java \
+-	sun/net/www/protocol/https/DefaultHostnameVerifier.java \
+-	sun/net/www/protocol/https/HttpsURLConnectionImpl.java \
+-	sun/net/www/protocol/https/DelegateHttpsURLConnection.java \
+-	sun/net/www/protocol/https/Handler.java \
+-	sun/net/www/protocol/jar/Handler.java \
+-	sun/net/www/protocol/jar/URLJarFile.java \
+-	sun/net/www/protocol/jar/JarFileFactory.java \
+-	sun/net/www/protocol/jar/JarURLConnection.java \
+-	sun/net/www/protocol/netdoc/Handler.java \
+-	sun/net/www/content/image/gif.java \
+-	sun/net/www/content/image/jpeg.java \
+-	sun/net/www/content/image/x_xbitmap.java \
+-	sun/net/www/content/image/x_xpixmap.java \
+-	sun/net/www/content/image/png.java \
+-	sun/net/www/content/audio/aiff.java \
+-	sun/net/www/content/audio/basic.java \
+-	sun/net/www/content/audio/wav.java \
+-	sun/net/www/content/audio/x_aiff.java \
+-	sun/net/www/content/audio/x_wav.java \
+-	sun/net/www/protocol/ftp/Handler.java \
+-	sun/net/www/protocol/ftp/FtpURLConnection.java \
+-	sun/net/www/protocol/gopher/GopherClient.java \
+-	sun/net/www/protocol/gopher/Handler.java \
+-	sun/net/www/protocol/mailto/Handler.java \
+-	sun/net/www/protocol/mailto/MailToURLConnection.java \
+-	sun/net/idn/Punycode.java \
+-	sun/net/idn/UCharacterEnums.java \
+-	sun/net/idn/UCharacterDirection.java \
+-	sun/net/idn/StringPrepDataReader.java \
+-	sun/net/idn/StringPrep.java
++        sun/net/InetAddressCachePolicy.java \
++        sun/net/URLCanonicalizer.java \
++        sun/net/NetworkClient.java \
++        sun/net/NetworkServer.java \
++        sun/net/PortConfig.java \
++        sun/net/ProgressMonitor.java \
++        sun/net/ProgressSource.java \
++        sun/net/ProgressEvent.java \
++        sun/net/ProgressListener.java \
++        sun/net/ProgressMeteringPolicy.java \
++        sun/net/SocksProxy.java \
++        sun/net/ResourceManager.java \
++        sun/net/TelnetInputStream.java \
++        sun/net/TelnetOutputStream.java \
++        sun/net/TelnetProtocolException.java \
++        sun/net/TransferProtocolClient.java \
++        sun/net/ConnectionResetException.java \
++        sun/net/NetProperties.java \
++        sun/net/NetHooks.java \
++        sun/net/util/IPAddressUtil.java \
++        sun/net/util/URLUtil.java \
++        sun/net/dns/ResolverConfiguration.java \
++        sun/net/dns/ResolverConfigurationImpl.java \
++        sun/net/ftp/FtpClient.java \
++        sun/net/ftp/FtpClientProvider.java \
++        sun/net/ftp/FtpDirEntry.java \
++        sun/net/ftp/FtpReplyCode.java \
++        sun/net/ftp/FtpDirParser.java \
++        sun/net/ftp/FtpLoginException.java \
++        sun/net/ftp/FtpProtocolException.java \
++        sun/net/ftp/impl/FtpClient.java \
++        sun/net/ftp/impl/DefaultFtpClientProvider.java \
++        sun/net/sdp/SdpSupport.java \
++        sun/net/spi/DefaultProxySelector.java \
++        sun/net/spi/nameservice/NameServiceDescriptor.java \
++        sun/net/spi/nameservice/NameService.java \
++        sun/net/smtp/SmtpClient.java \
++        sun/net/smtp/SmtpProtocolException.java \
++        sun/net/www/content/text/Generic.java \
++        sun/net/www/content/text/plain.java \
++        sun/net/www/content/text/PlainTextInputStream.java \
++        sun/net/www/MessageHeader.java \
++        sun/net/www/HeaderParser.java \
++        sun/net/www/MeteredStream.java \
++        sun/net/www/MimeEntry.java \
++        sun/net/www/MimeLauncher.java \
++        sun/net/www/ApplicationLaunchException.java \
++        sun/net/www/MimeTable.java \
++        sun/net/www/URLConnection.java \
++        sun/net/www/ParseUtil.java \
++        sun/net/www/protocol/file/Handler.java \
++        sun/net/www/protocol/file/FileURLConnection.java \
++        sun/net/www/http/HttpClient.java \
++        sun/net/www/http/HttpCapture.java \
++        sun/net/www/http/HttpCaptureInputStream.java \
++        sun/net/www/http/HttpCaptureOutputStream.java \
++        sun/net/www/http/PosterOutputStream.java \
++        sun/net/www/http/ChunkedInputStream.java \
++        sun/net/www/http/ChunkedOutputStream.java \
++        sun/net/www/http/KeepAliveCache.java \
++        sun/net/www/http/KeepAliveStream.java \
++        sun/net/www/http/KeepAliveStreamCleaner.java \
++        sun/net/www/http/Hurryable.java \
++        sun/net/www/protocol/http/Handler.java \
++        sun/net/www/protocol/http/HttpURLConnection.java \
++        sun/net/www/protocol/http/HttpAuthenticator.java \
++        sun/net/www/protocol/http/AuthenticationHeader.java \
++        sun/net/www/protocol/http/AuthenticationInfo.java \
++        sun/net/www/protocol/http/AuthCache.java \
++        sun/net/www/protocol/http/AuthCacheImpl.java \
++        sun/net/www/protocol/http/AuthCacheValue.java \
++        sun/net/www/protocol/http/AuthScheme.java \
++        sun/net/www/protocol/http/BasicAuthentication.java \
++        sun/net/www/protocol/http/DigestAuthentication.java \
++        sun/net/www/protocol/http/NTLMAuthenticationProxy.java \
++        sun/net/www/protocol/http/NegotiateAuthentication.java \
++        sun/net/www/protocol/http/Negotiator.java \
++        sun/net/www/protocol/http/ntlm/NTLMAuthentication.java \
++        sun/net/www/protocol/http/ntlm/NTLMAuthenticationCallback.java \
++        sun/net/www/protocol/http/spnego/NegotiatorImpl.java \
++        sun/net/www/protocol/http/spnego/NegotiateCallbackHandler.java \
++        sun/net/www/protocol/http/logging/HttpLogFormatter.java \
++        sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java \
++        sun/net/www/protocol/https/HttpsClient.java \
++        sun/net/www/protocol/https/DefaultHostnameVerifier.java \
++        sun/net/www/protocol/https/HttpsURLConnectionImpl.java \
++        sun/net/www/protocol/https/DelegateHttpsURLConnection.java \
++        sun/net/www/protocol/https/Handler.java \
++        sun/net/www/protocol/jar/Handler.java \
++        sun/net/www/protocol/jar/URLJarFile.java \
++        sun/net/www/protocol/jar/JarFileFactory.java \
++        sun/net/www/protocol/jar/JarURLConnection.java \
++        sun/net/www/protocol/netdoc/Handler.java \
++        sun/net/www/content/image/gif.java \
++        sun/net/www/content/image/jpeg.java \
++        sun/net/www/content/image/x_xbitmap.java \
++        sun/net/www/content/image/x_xpixmap.java \
++        sun/net/www/content/image/png.java \
++        sun/net/www/content/audio/aiff.java \
++        sun/net/www/content/audio/basic.java \
++        sun/net/www/content/audio/wav.java \
++        sun/net/www/content/audio/x_aiff.java \
++        sun/net/www/content/audio/x_wav.java \
++        sun/net/www/protocol/ftp/Handler.java \
++        sun/net/www/protocol/ftp/FtpURLConnection.java \
++        sun/net/www/protocol/gopher/GopherClient.java \
++        sun/net/www/protocol/gopher/Handler.java \
++        sun/net/www/protocol/mailto/Handler.java \
++        sun/net/www/protocol/mailto/MailToURLConnection.java \
++        sun/net/idn/Punycode.java \
++        sun/net/idn/UCharacterEnums.java \
++        sun/net/idn/UCharacterDirection.java \
++        sun/net/idn/StringPrepDataReader.java \
++        sun/net/idn/StringPrep.java
+ 
+ ifeq ($(PLATFORM), windows)
+-    FILES_java += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java 
++    FILES_java += sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java
+ else
+     FILES_java += sun/net/sdp/SdpProvider.java
+ endif
+--- ./jdk/make/sun/nio/cs/FILES_java.gmk	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/nio/cs/FILES_java.gmk	2013-12-01 11:14:29.000000000 -0800
+@@ -329,6 +329,7 @@
+ 	sun/nio/cs/ext/IBM280.java \
+ 	sun/nio/cs/ext/IBM284.java \
+ 	sun/nio/cs/ext/IBM285.java \
++	sun/nio/cs/ext/IBM290.java \
+ 	sun/nio/cs/ext/IBM297.java \
+ 	sun/nio/cs/ext/IBM420.java \
+ 	sun/nio/cs/ext/IBM424.java \
+--- ./jdk/make/sun/nio/cs/Makefile	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/nio/cs/Makefile	2014-06-06 19:56:30.000000000 -0700
+@@ -85,9 +85,6 @@
+ #
+ # Extra rules to build character converters.
+ 
+-SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
+-SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
+-
+ GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
+ GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
+ GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
+@@ -116,10 +113,6 @@
+ 		$(GENCSSRCDIR)/HKSCS.java
+ 	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
+ 
+-$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
+-  $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
+-	$(install-file)
+-
+ # no compression unless requested
+ ifndef COMPRESS_JARS
+   CREATE_JAR_OPTS_NOMANIFEST = cf0
+@@ -127,10 +120,9 @@
+   CREATE_JAR_OPTS_NOMANIFEST = cf
+ endif
+ 
+-$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
++$(CHARSETS_JAR): $(FILES_class) $(FILES_DAT)
+ 	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(CHARSETS_JAR) \
+ 	      -C $(CLASSDESTDIR) sun \
+-	      -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH)  \
+ 	      $(BOOT_JAR_JFLAGS)
+ 	@$(java-vm-cleanup)
+ 
+--- ./jdk/make/sun/rmi/rmi/Makefile	2013-09-06 11:27:40.000000000 -0700
++++ ./jdk/make/sun/rmi/rmi/Makefile	2014-06-06 19:56:34.000000000 -0700
+@@ -71,6 +71,9 @@
+     BUILD_TARGETS += bin
+   endif
+ endif
++ifeq ($(PLATFORM), bsd)
++  BUILD_TARGETS += bin
++endif
+ 
+ build: $(BUILD_TARGETS)
+ 
+--- ./jdk/make/sun/splashscreen/Makefile	2013-09-06 11:27:41.000000000 -0700
++++ ./jdk/make/sun/splashscreen/Makefile	2014-06-06 19:56:34.000000000 -0700
+@@ -61,6 +61,12 @@
+ 
+ CFLAGS += -DSPLASHSCREEN
+ 
++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
++ifneq ($(SYSTEM_ZLIB),true)
++  CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
++endif
++
+ ifeq ($(PLATFORM), macosx)
+   CFLAGS += -DWITH_MACOSX
+ 
+@@ -83,15 +89,16 @@
+ 				  -framework JavaNativeFoundation
+ else ifneq ($(PLATFORM), windows)
+   CFLAGS += -DWITH_X11
+-  ifeq ($(PLATFORM), macosx))
+-    OTHER_LDLIBS += -liconv
+-    CPPFLAGS += -I$(OPENWIN_HOME)/include \
+-                -I$(OPENWIN_HOME)/include/X11/extensions
+-    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -pthread
+-  else
+-    CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+-    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
++  ifeq ($(PLATFORM), bsd))
++    ifeq ($(OS_NAME), netbsd)
++      OTHER_LDLIBS += -Wl,-R$(OPENWIN_LIB)
++    else
++      CPPFLAGS += -I$(PACKAGE_PATH)/include
++      OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
++    endif
+   endif
++  CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
++  OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
+ else # PLATFORM
+   CFLAGS += -DWITH_WIN32
+   OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
+@@ -121,11 +128,7 @@
+   CPPFLAGS += $(call NativeSrcDirList,-I,native/$(PKGDIR)/splashscreen)
+   CPPFLAGS += $(call NativeSrcDirList,-I,/native/sun/osxapp)
+ endif
+-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
+-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+-ifneq ($(SYSTEM_ZLIB),true)
+-  CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
+-else
++ifeq ($(SYSTEM_ZLIB),true)
+   OTHER_CFLAGS += $(ZLIB_CFLAGS)
+   OTHER_LDLIBS += $(ZLIB_LIBS)
+ endif
+--- ./jdk/make/sun/xawt/Makefile	2013-09-06 11:27:41.000000000 -0700
++++ ./jdk/make/sun/xawt/Makefile	2014-06-06 19:56:34.000000000 -0700
+@@ -52,6 +52,9 @@
+ AUTO_JAVA_PRUNE = WrapperGenerator.java
+ 
+ LDFLAGS += -L$(OPENWIN_LIB)
++ifeq ($(OS_NAME), netbsd)
++LDFLAGS += -Wl,-R$(OPENWIN_LIB)
++endif
+ 
+ # For Xrender extension.
+ ifeq ($(PLATFORM), solaris)
+@@ -63,6 +66,11 @@
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+ 
++ifeq ($(PLATFORM), bsd)
++LDFLAGS += -pthread
++dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
++endif
++
+ ifeq ($(PLATFORM), macosx))
+ LDFLAGS += -pthread
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+@@ -110,8 +118,6 @@
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+ 
+-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+-
+ CPPFLAGS += -DXAWT -DXAWT_HACK \
+         -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
+         -I$(PLATFORM_SRC)/native/sun/awt \
+@@ -138,6 +144,8 @@
+         -I$(SHARE_SRC)/native/sun/awt \
+         -I$(PLATFORM_SRC)/native/sun/awt
+ 
++CPPFLAGS += -I$(CUPS_HEADERS_PATH)
++
+ ifeq ($(PLATFORM), linux)
+   ifndef CROSS_COMPILE_ARCH
+     # Allows for builds on Debian GNU Linux, X11 is in a different place 
+@@ -173,6 +181,11 @@
+  endif
+ endif
+ 
++ifeq ($(PLATFORM), bsd)
++  CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(OPENWIN_HOME)/include
++  CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
++endif
++
+ ifeq ($(PLATFORM), macosx)
+   CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+ endif
+--- ./jdk/make/tools/CharsetMapping/IBM290.c2b	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/make/tools/CharsetMapping/IBM290.c2b	2013-12-01 11:14:30.000000000 -0800
+@@ -0,0 +1,100 @@
++# 
++# Diff of 
++# b2c: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
++# c2b: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.UPMAP100
++#
++# fullwidth form
++0x4B    U+FF0E
++0x4C    U+FF1C
++0x4D    U+FF08
++0x4E    U+FF0B
++0x4F    U+FF5C
++0x50    U+FF06
++0x5A    U+FF01
++0x5C    U+FF0A
++0x5D    U+FF09
++0x5E    U+FF1B
++0x60    U+FF0D
++0x61    U+FF0F
++0x62    U+FF41
++0x63    U+FF42
++0x64    U+FF43
++0x65    U+FF44
++0x66    U+FF45
++0x67    U+FF46
++0x68    U+FF47
++0x69    U+FF48
++0x6B    U+FF0C
++0x6C    U+FF05
++0x6D    U+FF3F
++0x6E    U+FF1E
++0x6F    U+FF1F
++0x70    U+FF3B
++0x71    U+FF49
++0x72    U+FF4A
++0x73    U+FF4B
++0x74    U+FF4C
++0x75    U+FF4D
++0x76    U+FF4E
++0x77    U+FF4F
++0x78    U+FF50
++0x79    U+FF40
++0x7A    U+FF1A
++0x7B    U+FF03
++0x7C    U+FF20
++0x7D    U+FF07
++0x7E    U+FF1D
++0x7F    U+FF02
++0x80    U+FF3D
++0x8B    U+FF51
++0x9B    U+FF52
++0xA0    U+FF5E
++0xAB    U+FF53
++0xB0    U+FF3E
++0xB2    U+FF3C
++0xB3    U+FF54
++0xB4    U+FF55
++0xB5    U+FF56
++0xB6    U+FF57
++0xB7    U+FF58
++0xB8    U+FF59
++0xB9    U+FF5A
++0xC0    U+FF5B
++0xC1    U+FF21
++0xC2    U+FF22
++0xC3    U+FF23
++0xC4    U+FF24
++0xC5    U+FF25
++0xC6    U+FF26
++0xC7    U+FF27
++0xC8    U+FF28
++0xC9    U+FF29
++0xD0    U+FF5D
++0xD1    U+FF2A
++0xD2    U+FF2B
++0xD3    U+FF2C
++0xD4    U+FF2D
++0xD5    U+FF2E
++0xD6    U+FF2F
++0xD7    U+FF30
++0xD8    U+FF31
++0xD9    U+FF32
++0xE0    U+FF04
++0xE2    U+FF33
++0xE3    U+FF34
++0xE4    U+FF35
++0xE5    U+FF36
++0xE6    U+FF37
++0xE7    U+FF38
++0xE8    U+FF39
++0xE9    U+FF3A
++0xF0    U+FF10
++0xF1    U+FF11
++0xF2    U+FF12
++0xF3    U+FF13
++0xF4    U+FF14
++0xF5    U+FF15
++0xF6    U+FF16
++0xF7    U+FF17
++0xF8    U+FF18
++0xF9    U+FF19
+--- ./jdk/make/tools/CharsetMapping/IBM290.map	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/make/tools/CharsetMapping/IBM290.map	2013-12-01 11:14:30.000000000 -0800
+@@ -0,0 +1,232 @@
++#
++# b2c mapping for IBM290, generated from
++# cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
++#
++0x00    U+0000
++0x01    U+0001
++0x02    U+0002
++0x03    U+0003
++0x04    U+009C
++0x05    U+0009
++0x06    U+0086
++0x07    U+007F
++0x08    U+0097
++0x09    U+008D
++0x0A    U+008E
++0x0B    U+000B
++0x0C    U+000C
++0x0D    U+000D
++0x0E    U+000E
++0x0F    U+000F
++0x10    U+0010
++0x11    U+0011
++0x12    U+0012
++0x13    U+0013
++0x14    U+009D
++0x15    U+0085
++0x16    U+0008
++0x17    U+0087
++0x18    U+0018
++0x19    U+0019
++0x1A    U+0092
++0x1B    U+008F
++0x1C    U+001C
++0x1D    U+001D
++0x1E    U+001E
++0x1F    U+001F
++0x20    U+0080
++0x21    U+0081
++0x22    U+0082
++0x23    U+0083
++0x24    U+0084
++0x25    U+000A
++0x26    U+0017
++0x27    U+001B
++0x28    U+0088
++0x29    U+0089
++0x2A    U+008A
++0x2B    U+008B
++0x2C    U+008C
++0x2D    U+0005
++0x2E    U+0006
++0x2F    U+0007
++0x30    U+0090
++0x31    U+0091
++0x32    U+0016
++0x33    U+0093
++0x34    U+0094
++0x35    U+0095
++0x36    U+0096
++0x37    U+0004
++0x38    U+0098
++0x39    U+0099
++0x3A    U+009A
++0x3B    U+009B
++0x3C    U+0014
++0x3D    U+0015
++0x3E    U+009E
++0x3F    U+001A
++0x40    U+0020
++0x41    U+FF61
++0x42    U+FF62
++0x43    U+FF63
++0x44    U+FF64
++0x45    U+FF65
++0x46    U+FF66
++0x47    U+FF67
++0x48    U+FF68
++0x49    U+FF69
++0x4A    U+00A3
++0x4B    U+002E
++0x4C    U+003C
++0x4D    U+0028
++0x4E    U+002B
++0x4F    U+007C
++0x50    U+0026
++0x51    U+FF6A
++0x52    U+FF6B
++0x53    U+FF6C
++0x54    U+FF6D
++0x55    U+FF6E
++0x56    U+FF6F
++0x58    U+FF70
++0x5A    U+0021
++0x5B    U+00A5
++0x5C    U+002A
++0x5D    U+0029
++0x5E    U+003B
++0x5F    U+00AC
++0x60    U+002D
++0x61    U+002F
++0x62    U+0061
++0x63    U+0062
++0x64    U+0063
++0x65    U+0064
++0x66    U+0065
++0x67    U+0066
++0x68    U+0067
++0x69    U+0068
++0x6B    U+002C
++0x6C    U+0025
++0x6D    U+005F
++0x6E    U+003E
++0x6F    U+003F
++0x70    U+005B
++0x71    U+0069
++0x72    U+006A
++0x73    U+006B
++0x74    U+006C
++0x75    U+006D
++0x76    U+006E
++0x77    U+006F
++0x78    U+0070
++0x79    U+0060
++0x7A    U+003A
++0x7B    U+0023
++0x7C    U+0040
++0x7D    U+0027
++0x7E    U+003D
++0x7F    U+0022
++0x80    U+005D
++0x81    U+FF71
++0x82    U+FF72
++0x83    U+FF73
++0x84    U+FF74
++0x85    U+FF75
++0x86    U+FF76
++0x87    U+FF77
++0x88    U+FF78
++0x89    U+FF79
++0x8A    U+FF7A
++0x8B    U+0071
++0x8C    U+FF7B
++0x8D    U+FF7C
++0x8E    U+FF7D
++0x8F    U+FF7E
++0x90    U+FF7F
++0x91    U+FF80
++0x92    U+FF81
++0x93    U+FF82
++0x94    U+FF83
++0x95    U+FF84
++0x96    U+FF85
++0x97    U+FF86
++0x98    U+FF87
++0x99    U+FF88
++0x9A    U+FF89
++0x9B    U+0072
++0x9D    U+FF8A
++0x9E    U+FF8B
++0x9F    U+FF8C
++0xA0    U+007E
++0xA1    U+203E
++0xA2    U+FF8D
++0xA3    U+FF8E
++0xA4    U+FF8F
++0xA5    U+FF90
++0xA6    U+FF91
++0xA7    U+FF92
++0xA8    U+FF93
++0xA9    U+FF94
++0xAA    U+FF95
++0xAB    U+0073
++0xAC    U+FF96
++0xAD    U+FF97
++0xAE    U+FF98
++0xAF    U+FF99
++0xB0    U+005E
++0xB1    U+00A2
++0xB2    U+005C
++0xB3    U+0074
++0xB4    U+0075
++0xB5    U+0076
++0xB6    U+0077
++0xB7    U+0078
++0xB8    U+0079
++0xB9    U+007A
++0xBA    U+FF9A
++0xBB    U+FF9B
++0xBC    U+FF9C
++0xBD    U+FF9D
++0xBE    U+FF9E
++0xBF    U+FF9F
++0xC0    U+007B
++0xC1    U+0041
++0xC2    U+0042
++0xC3    U+0043
++0xC4    U+0044
++0xC5    U+0045
++0xC6    U+0046
++0xC7    U+0047
++0xC8    U+0048
++0xC9    U+0049
++0xD0    U+007D
++0xD1    U+004A
++0xD2    U+004B
++0xD3    U+004C
++0xD4    U+004D
++0xD5    U+004E
++0xD6    U+004F
++0xD7    U+0050
++0xD8    U+0051
++0xD9    U+0052
++0xE0    U+0024
++0xE2    U+0053
++0xE3    U+0054
++0xE4    U+0055
++0xE5    U+0056
++0xE6    U+0057
++0xE7    U+0058
++0xE8    U+0059
++0xE9    U+005A
++0xF0    U+0030
++0xF1    U+0031
++0xF2    U+0032
++0xF3    U+0033
++0xF4    U+0034
++0xF5    U+0035
++0xF6    U+0036
++0xF7    U+0037
++0xF8    U+0038
++0xF9    U+0039
++0xFF    U+009F
+--- ./jdk/make/tools/CharsetMapping/extsbcs	2013-09-06 11:27:42.000000000 -0700
++++ ./jdk/make/tools/CharsetMapping/extsbcs	2013-12-01 11:14:30.000000000 -0800
+@@ -28,6 +28,7 @@
+ IBM280		IBM280		Cp280		false		sun.nio.cs.ext
+ IBM284		IBM284		Cp284		false		sun.nio.cs.ext
+ IBM285		IBM285		Cp285		false		sun.nio.cs.ext
++IBM290		IBM290		Cp290		false		sun.nio.cs.ext
+ IBM297		IBM297		Cp297		false		sun.nio.cs.ext
+ IBM420		IBM420		Cp420		false		sun.nio.cs.ext
+ IBM424		IBM424		Cp424		false		sun.nio.cs.ext
+--- ./jdk/make/tools/freetypecheck/Makefile	2013-09-06 11:27:43.000000000 -0700
++++ ./jdk/make/tools/freetypecheck/Makefile	2014-06-06 19:56:34.000000000 -0700
+@@ -52,8 +52,15 @@
+   else 
+     ifeq ($(PLATFORM), macosx)
+       FT_LD_OPTIONS += -lfreetype -lz
+-    else # linux
+-      FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
++    else
++      ifeq ($(PLATFORM), bsd)
++        ifeq ($(OS_NAME), netbsd)
++          FT_LD_OPTIONS += -Wl,-R$(FREETYPE_LIB_PATH)
++        endif
++        FT_LD_OPTIONS += -lfreetype -lz
++      else # linux
++        FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
++      endif
+     endif
+   endif
+ endif
+--- ./jdk/make/tools/sharing/classlist.bsd	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/make/tools/sharing/classlist.bsd	2014-06-06 19:56:34.000000000 -0700
+@@ -0,0 +1,2327 @@
++java/lang/Object
++java/lang/String
++java/io/Serializable
++java/lang/Comparable
++java/lang/CharSequence
++java/lang/Class
++java/lang/reflect/GenericDeclaration
++java/lang/reflect/Type
++java/lang/reflect/AnnotatedElement
++java/lang/Cloneable
++java/lang/ClassLoader
++java/lang/System
++java/lang/Throwable
++java/lang/Error
++java/lang/ThreadDeath
++java/lang/Exception
++java/lang/RuntimeException
++java/security/ProtectionDomain
++java/security/AccessControlContext
++java/lang/ClassNotFoundException
++java/lang/NoClassDefFoundError
++java/lang/LinkageError
++java/lang/ClassCastException
++java/lang/ArrayStoreException
++java/lang/VirtualMachineError
++java/lang/OutOfMemoryError
++java/lang/StackOverflowError
++java/lang/IllegalMonitorStateException
++java/lang/ref/Reference
++java/lang/ref/SoftReference
++java/lang/ref/WeakReference
++java/lang/ref/FinalReference
++java/lang/ref/PhantomReference
++java/lang/ref/Finalizer
++java/lang/Thread
++java/lang/Runnable
++java/lang/ThreadGroup
++java/lang/Thread$UncaughtExceptionHandler
++java/util/Properties
++java/util/Hashtable
++java/util/Map
++java/util/Dictionary
++java/lang/reflect/AccessibleObject
++java/lang/reflect/Field
++java/lang/reflect/Member
++java/lang/reflect/Method
++java/lang/reflect/Constructor
++sun/reflect/MagicAccessorImpl
++sun/reflect/MethodAccessorImpl
++sun/reflect/MethodAccessor
++sun/reflect/ConstructorAccessorImpl
++sun/reflect/ConstructorAccessor
++sun/reflect/DelegatingClassLoader
++sun/reflect/ConstantPool
++sun/reflect/UnsafeStaticFieldAccessorImpl
++sun/reflect/UnsafeFieldAccessorImpl
++sun/reflect/FieldAccessorImpl
++sun/reflect/FieldAccessor
++java/util/Vector
++java/util/List
++java/util/Collection
++java/lang/Iterable
++java/util/RandomAccess
++java/util/AbstractList
++java/util/AbstractCollection
++java/lang/StringBuffer
++java/lang/AbstractStringBuilder
++java/lang/Appendable
++java/lang/StackTraceElement
++java/nio/Buffer
++java/lang/Boolean
++java/lang/Character
++java/lang/Float
++java/lang/Number
++java/lang/Double
++java/lang/Byte
++java/lang/Short
++java/lang/Integer
++java/lang/Long
++java/lang/NullPointerException
++java/lang/ArithmeticException
++java/io/ObjectStreamField
++java/lang/String$CaseInsensitiveComparator
++java/util/Comparator
++java/lang/RuntimePermission
++java/security/BasicPermission
++java/security/Permission
++java/security/Guard
++sun/misc/SoftCache
++java/util/AbstractMap
++java/lang/ref/ReferenceQueue
++java/lang/ref/ReferenceQueue$Null
++java/lang/ref/ReferenceQueue$Lock
++java/util/HashMap
++java/lang/annotation/Annotation
++java/util/HashMap$Entry
++java/util/Map$Entry
++java/security/AccessController
++java/lang/reflect/ReflectPermission
++sun/reflect/ReflectionFactory$GetReflectionFactoryAction
++java/security/PrivilegedAction
++java/util/Stack
++sun/reflect/ReflectionFactory
++java/lang/ref/Reference$Lock
++java/lang/ref/Reference$ReferenceHandler
++java/lang/ref/Finalizer$FinalizerThread
++java/util/Enumeration
++java/util/Iterator
++java/util/Hashtable$Entry
++java/nio/charset/Charset
++sun/nio/cs/StandardCharsets
++sun/nio/cs/FastCharsetProvider
++java/nio/charset/spi/CharsetProvider
++sun/nio/cs/StandardCharsets$Aliases
++sun/util/PreHashedMap
++sun/nio/cs/StandardCharsets$Classes
++sun/nio/cs/StandardCharsets$Cache
++java/lang/ThreadLocal
++java/util/concurrent/atomic/AtomicInteger
++sun/misc/Unsafe
++java/lang/NoSuchMethodError
++java/lang/IncompatibleClassChangeError
++sun/reflect/Reflection
++java/util/Collections
 +java/util/Collections$EmptySet
 +java/util/AbstractSet
 +java/util/Set
@@ -27518,8 +51238,53 @@
 +sun/applet/AppletPanel$6
 +javax/swing/BufferStrategyPaintManager$1
 +# f3ac8b467e7f8c49
---- jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java	2014-06-06 19:56:32.000000000 -0700
+@@ -31,6 +31,7 @@
+ import javax.swing.*;
+ import javax.swing.plaf.MenuBarUI;
+ 
++import com.apple.laf.ScreenMenuBar;
+ import sun.lwawt.macosx.CMenuBar;
+ 
+ import com.apple.laf.AquaMenuBarUI;
+@@ -72,12 +73,15 @@
+         // scan the current frames, and see if any are foreground
+         final Frame[] frames = Frame.getFrames();
+         for (final Frame frame : frames) {
+-            if (frame.isVisible() && !isFrameMinimized(frame)) return;
++            if (frame.isVisible() && !isFrameMinimized(frame)) {
++                return;
++            }
+         }
+ 
+         // if we have no foreground frames, then we have to "kick" the menubar
+         final JFrame pingFrame = new JFrame();
+         pingFrame.getRootPane().putClientProperty("Window.alpha", new Float(0.0f));
++        pingFrame.setUndecorated(true);
+         pingFrame.setVisible(true);
+         pingFrame.toFront();
+         pingFrame.setVisible(false);
+@@ -101,7 +105,6 @@
+             // Aqua was not installed
+             throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel");
+         }
+-/* TODO: disabled until ScreenMenuBar is working
+ 
+         final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
+         final ScreenMenuBar screenMenuBar = aquaUI.getScreenMenuBar();
+@@ -118,8 +121,7 @@
+         }
+ 
+         // grab the pointer to the CMenuBar, and retain it in native
+-        nativeSetDefaultMenuBar(((CMenuBar)peer).getNativeMenuBarPeer());
+-*/
++        nativeSetDefaultMenuBar(((CMenuBar)peer).getModel());
+     }
+ 
+     void setAboutMenuItemVisible(final boolean present) {
+--- ./jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/com/apple/laf/AquaLookAndFeel.java	2013-12-01 11:14:34.000000000 -0800
 @@ -37,8 +37,6 @@
  import sun.swing.*;
  import apple.laf.*;
@@ -27538,8 +51303,8 @@
              final Enumeration propertyKeys = aquaProperties.getKeys();
  
              while (propertyKeys.hasMoreElements()) {
---- jdk/src/macosx/classes/com/apple/laf/AquaUtils.java	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/com/apple/laf/AquaUtils.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/com/apple/laf/AquaUtils.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/com/apple/laf/AquaUtils.java	2013-12-01 11:14:34.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -27987,8 +51752,8 @@
          if (!(g instanceof Graphics2D)) {
              return;
          }
---- jdk/src/macosx/classes/com/apple/laf/ScreenMenu.java	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/com/apple/laf/ScreenMenu.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/com/apple/laf/ScreenMenu.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/com/apple/laf/ScreenMenu.java	2013-12-01 11:14:34.000000000 -0800
 @@ -37,26 +37,31 @@
  import sun.lwawt.LWToolkit;
  import sun.lwawt.macosx.*;
@@ -28282,8 +52047,8 @@
          if (!m.isVisible()) return;
          MenuItem sm = fItems.get(m);
  
---- jdk/src/macosx/classes/com/apple/laf/resources/aqua_ko.properties	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/com/apple/laf/resources/aqua_ko.properties	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/com/apple/laf/resources/aqua_ko.properties	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/com/apple/laf/resources/aqua_ko.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -46,7 +46,7 @@
  FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30
  FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
@@ -28293,8 +52058,8 @@
  FileChooser.helpButton.textAndMnemonic=\uB3C4\uC6C0\uB9D0
  FileChooser.directoryOpenButton.textAndMnemonic=\uC5F4\uAE30
  
---- jdk/src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java	1969-12-31 16:00:00.000000000 -0800
+--- ./jdk/src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/com/apple/resources/MacOSXResourceBundle.java	1969-12-31 16:00:00.000000000 -0800
 @@ -1,110 +0,0 @@
 -/*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -28406,8 +52171,82 @@
 -    private static native String getPathToBundleFile(String filename);
 -}
 -
---- jdk/src/macosx/classes/sun/font/CFontManager.java	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/sun/font/CFontManager.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/awt/resources/awtosx.properties	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/src/macosx/classes/sun/awt/resources/awtosx.properties	2014-06-06 19:56:32.000000000 -0700
+@@ -0,0 +1,71 @@
++#
++# OS X specific AWT properties
++#
++
++# Modifier names
++AWT.shift=\u21e7
++AWT.control=\u2303
++AWT.alt=\u2325
++AWT.meta=\u2318
++AWT.altGraph=\u2325
++
++# Key names
++AWT.enter=\u23ce
++AWT.backSpace=\u232b
++AWT.tab=\u21e5
++AWT.cancel=\u238b
++AWT.clear=\u2327
++AWT.capsLock=\u21ea
++AWT.escape=\u238b
++AWT.space=\u2423
++AWT.pgup=\u21de
++AWT.pgdn=\u21df
++AWT.end=\u2198
++AWT.home=\u2196
++AWT.left=\u2190
++AWT.up=\u2191
++AWT.right=\u2192
++AWT.down=\u2193
++AWT.comma=,
++AWT.period=.
++AWT.slash=/
++AWT.semicolon=;
++AWT.equals=\u003d
++AWT.openBracket=[
++AWT.backSlash=\\
++AWT.closeBracket=]
++AWT.multiply=\u2328 *
++AWT.add=\u2328 +
++AWT.separator=\u2328 ,
++AWT.separater=\u2328 ,
++AWT.subtract=\u2328 -
++AWT.decimal=\u2328 .
++AWT.divide=\u2328 /
++AWT.delete=\u2326
++AWT.printScreen=\u2399
++AWT.backQuote=`
++AWT.quote='
++AWT.ampersand=&
++AWT.asterisk=*
++AWT.quoteDbl="
++AWT.Less=<
++AWT.greater=>
++AWT.braceLeft=[
++AWT.braceRight=]
++AWT.at=@
++AWT.colon=:
++AWT.circumflex=^
++AWT.dollar=$
++AWT.euro=\u20ac
++AWT.exclamationMark=!
++AWT.invertedExclamationMark=\u00a1
++AWT.leftParenthesis=(
++AWT.numberSign=#
++AWT.plus=+
++AWT.minus=-
++AWT.rightParenthesis=)
++AWT.underscore=_
++
++# Numeric Keypad
++AWT.numpad=\u2328
++
+--- ./jdk/src/macosx/classes/sun/font/CFontManager.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/font/CFontManager.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -28465,8 +52304,8 @@
                  }
              }
          }
---- jdk/src/macosx/classes/sun/font/CStrike.java	2013-09-06 11:27:48.000000000 -0700
-+++ jdk/src/macosx/classes/sun/font/CStrike.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/font/CStrike.java	2013-09-06 11:27:48.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/font/CStrike.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -28660,8 +52499,8 @@
                  this.shift = shift;
                  this.cache = new float[1 << shift][];
                  this.secondLayerLength = size >> shift;
---- jdk/src/macosx/classes/sun/lwawt/LWToolkit.java	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/classes/sun/lwawt/LWToolkit.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/lwawt/LWToolkit.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/LWToolkit.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
@@ -28717,8 +52556,8 @@
          toolkitThread.setDaemon(true);
          toolkitThread.setPriority(Thread.NORM_PRIORITY + 1);
          toolkitThread.start();
---- jdk/src/macosx/classes/sun/lwawt/macosx/CClipboard.java	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/classes/sun/lwawt/macosx/CClipboard.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/CClipboard.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/CClipboard.java	2014-04-19 01:27:12.000000000 -0700
 @@ -53,7 +53,7 @@
      }
  
@@ -28728,8 +52567,122 @@
          // Don't use delayed Clipboard rendering for the Transferable's data.
          // If we did that, we would call Transferable.getTransferData on
          // the Toolkit thread, which is a security hole.
---- jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/CDropTargetContextPeer.java	2014-06-06 19:56:32.000000000 -0700
+@@ -26,6 +26,7 @@
+ package sun.lwawt.macosx;
+ 
+ import java.awt.*;
++import java.awt.dnd.DropTarget;
+ 
+ import sun.awt.dnd.SunDropTargetContextPeer;
+ import sun.awt.dnd.SunDropTargetEvent;
+@@ -38,7 +39,7 @@
+     private long    fNativeDropTransfer = 0;
+     private long    fNativeDataAvailable = 0;
+     private Object  fNativeData    = null;
+-    private boolean insideTarget = true;
++    private DropTarget insideTarget = null;
+ 
+     Object awtLockAccess = new Object();
+ 
+@@ -88,26 +89,19 @@
+         return fNativeData;
+     }
+ 
+-    // We need to take care of dragExit message because for some reason it is not being
+-    // generated for lightweight components
++    // We need to take care of dragEnter and dragExit messages because
++    // native system generates them only for heavyweights
+     @Override
+     protected void processMotionMessage(SunDropTargetEvent event, boolean operationChanged) {
+-        Component eventSource = (Component)event.getComponent();
+-        Point screenPoint = event.getPoint();
+-        SwingUtilities.convertPointToScreen(screenPoint, eventSource);
+-        Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
+-                eventSource.getLocationOnScreen().y,
+-                eventSource.getWidth(), eventSource.getHeight());
+-        if(insideTarget) {
+-            if(!screenBounds.contains(screenPoint)) {
++        boolean eventInsideTarget = isEventInsideTarget(event);
++        if (event.getComponent().getDropTarget() == insideTarget) {
++            if (!eventInsideTarget) {
+                 processExitMessage(event);
+-                insideTarget = false;
+                 return;
+             }
+         } else {
+-            if(screenBounds.contains(screenPoint)) {
++            if (eventInsideTarget) {
+                 processEnterMessage(event);
+-                insideTarget = true;
+             } else {
+                 return;
+             }
+@@ -115,19 +109,54 @@
+         super.processMotionMessage(event, operationChanged);
+     }
+ 
++    /**
++     * Could be called when DnD enters a heavyweight or synthesized in processMotionMessage
++     */
++    @Override
++    protected void processEnterMessage(SunDropTargetEvent event) {
++        Component c = event.getComponent();
++        DropTarget dt = event.getComponent().getDropTarget();
++        if (isEventInsideTarget(event)
++                && dt != insideTarget
++                && c.isShowing()
++                && dt != null
++                && dt.isActive()) {
++            insideTarget = dt;
++            super.processEnterMessage(event);
++        }
++    }
++
++    /**
++     * Could be called when DnD exits a heavyweight or synthesized in processMotionMessage
++     */
++    @Override
++    protected void processExitMessage(SunDropTargetEvent event) {
++        if (event.getComponent().getDropTarget() == insideTarget) {
++            insideTarget = null;
++            super.processExitMessage(event);
++        }
++    }
++
+     @Override
+     protected void processDropMessage(SunDropTargetEvent event) {
+-        Component eventSource = (Component)event.getComponent();
+-        Point screenPoint = event.getPoint();
+-        SwingUtilities.convertPointToScreen(screenPoint, eventSource);
+-        Rectangle screenBounds = new Rectangle(eventSource.getLocationOnScreen().x,
+-                eventSource.getLocationOnScreen().y,
+-                eventSource.getWidth(), eventSource.getHeight());
+-        if(screenBounds.contains(screenPoint)) {
++        if (isEventInsideTarget(event)) {
+             super.processDropMessage(event);
++            insideTarget = null;
+         }
+     }
+ 
++    private boolean isEventInsideTarget(SunDropTargetEvent event) {
++        Component eventSource = event.getComponent();
++        Point screenPoint = event.getPoint();
++        SwingUtilities.convertPointToScreen(screenPoint, eventSource);
++        Point locationOnScreen = eventSource.getLocationOnScreen();
++        Rectangle screenBounds = new Rectangle(locationOnScreen.x,
++                                               locationOnScreen.y,
++                                               eventSource.getWidth(),
++                                               eventSource.getHeight());
++        return screenBounds.contains(screenPoint);
++    }
++
+     @Override
+     protected int postDropTargetEvent(Component component, int x, int y, int dropAction,
+                                       int actions, long[] formats, long nativeCtxt, int eventID,
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java	2014-04-19 01:27:12.000000000 -0700
 @@ -620,8 +620,7 @@
                      retString[0] = new String(selectedText);
                  }}
@@ -28780,8 +52733,19 @@
  
          // This bit of gymnastics ensures that the returned location is within the composed text.
          // If it falls outside that region, the input method will commit the text, which is inconsistent with native
---- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java	2014-06-06 19:56:32.000000000 -0700
+@@ -43,7 +43,7 @@
+         return target;
+     }
+ 
+-    long getModel() {
++    public long getModel() {
+         return modelPtr;
+     }
+ 
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	2014-04-19 01:27:12.000000000 -0700
 @@ -918,7 +918,7 @@
                          //Posting an empty to flush the EventQueue without blocking the main thread
                      }
@@ -28791,8 +52755,8 @@
                  e.printStackTrace();
              }
          }
---- jdk/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	2014-04-19 01:27:12.000000000 -0700
 @@ -97,6 +97,6 @@
                      setVisible(true);
                  }
@@ -28801,9 +52765,48 @@
 +        } catch (InvocationTargetException ex) {}
      }
  }
---- jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	2014-04-20 12:39:22.000000000 -0700
-@@ -414,8 +414,15 @@
+--- ./jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	2014-06-06 19:56:32.000000000 -0700
+@@ -44,6 +44,8 @@
+ import sun.lwawt.LWWindowPeer.PeerType;
+ import sun.security.action.GetBooleanAction;
+ 
++import sun.util.CoreResourceBundleControl;
++
+ 
+ class NamedCursor extends Cursor {
+     NamedCursor(String name) {
+@@ -68,13 +70,26 @@
+ 
+     static {
+         System.err.flush();
+-        java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
+-            public Object run() {
++        ResourceBundle platformResources = java.security.AccessController.doPrivileged(
++                new java.security.PrivilegedAction() {
++            public ResourceBundle run() {
++                ResourceBundle platformResources = null;
++                try {
++                    platformResources =
++                            ResourceBundle.getBundle("sun.awt.resources.awtosx",
++                                    CoreResourceBundleControl.getRBControlInstance());
++                } catch (MissingResourceException e) {
++                    // No resource file; defaults will be used.
++                }
++
+                 System.loadLibrary("awt");
+                 System.loadLibrary("fontmanager");
+-                return null;
++                return platformResources;
+             }
+         });
++
++        AWTAccessor.getToolkitAccessor().setPlatformResources(platformResources);
++
+         if (!GraphicsEnvironment.isHeadless()) {
+             initIDs();
+         }
+@@ -414,8 +429,15 @@
      }
  
      // Intended to be called from the LWCToolkit.m only.
@@ -28820,7 +52823,7 @@
      }
  
      @Override
-@@ -518,22 +525,21 @@
+@@ -518,22 +540,21 @@
      // Any selector invoked using ThreadUtilities performOnMainThread will be processed in doAWTRunLoop
      // The InvocationEvent will call LWCToolkit.stopAWTRunLoop() when finished, which will stop our manual runloop
      // Does not dispatch native events while in the loop
@@ -28855,8 +52858,17 @@
  
          if (component != null) {
              AppContext appContext = SunToolkit.targetToAppContext(component);
---- jdk/src/macosx/native/com/apple/resources/MacOSXResourceBundle.m	2013-09-06 11:27:49.000000000 -0700
-+++ jdk/src/macosx/native/com/apple/resources/MacOSXResourceBundle.m	1969-12-31 16:00:00.000000000 -0800
+--- ./jdk/src/macosx/lib/flavormap.properties	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/lib/flavormap.properties	2014-06-06 19:56:32.000000000 -0700
+@@ -76,5 +76,6 @@
+ text/uri-list=application/x-java-file-list;class=java.util.List
+ PNG=image/x-java-image;class=java.awt.Image
+ JFIF=image/x-java-image;class=java.awt.Image
++TIFF=image/x-java-image;class=java.awt.Image
+ RICH_TEXT=text/rtf
+ HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
+--- ./jdk/src/macosx/native/com/apple/resources/MacOSXResourceBundle.m	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/native/com/apple/resources/MacOSXResourceBundle.m	1969-12-31 16:00:00.000000000 -0800
 @@ -1,110 +0,0 @@
 -/*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -28968,8 +52980,202 @@
 -
 -    return returnVal;
 -}
---- jdk/src/macosx/native/sun/awt/LWCToolkit.m	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/awt/LWCToolkit.m	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m	2013-09-06 11:27:49.000000000 -0700
++++ ./jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m	2014-06-06 19:56:32.000000000 -0700
+@@ -103,7 +103,6 @@
+         CFTypeRef realmInfo = SCDynamicStoreCopyValue(store, (CFStringRef) [NSString stringWithFormat:@"Kerberos:%@", realm]);
+ 
+         if (CFGetTypeID(realmInfo) != CFDictionaryGetTypeID()) {
+-            NSLog(@"Unexpected CFType for realm Info: %lu", CFGetTypeID(realmInfo));
+             return nil;
+         }
+ 
+@@ -140,7 +139,6 @@
+ 
+     SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
+     if (store == NULL) {
+-        NSLog(@"Unable to load SCDynamicStore to install NotificationCallback");
+         return;
+     }
+ 
+@@ -171,19 +169,11 @@
+ 
+     SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java-kerberos"), NULL, NULL);
+     if (store == NULL) {
+-        NSLog(@"Unable to load SCDynamicStore");
+-        return NULL;
+-    }
+-
+-    // Create the store if it is NULL and set it.
+-    if (store == NULL) {
+-        NSLog(@"Invalid value for SCDynamicStore");
+         return NULL;
+     }
+ 
+     CFTypeRef realms = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALMS);
+     if (realms == NULL || CFGetTypeID(realms) != CFArrayGetTypeID()) {
+-        NSLog(@"Unable to load realm info from SCDynamicStore");
+         if (realms) CFRelease(realms);
+         CFRelease(store);
+         return NULL;
+@@ -192,7 +182,6 @@
+     CFTypeRef realmMappings = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALM_MAPPINGS);
+ 
+     if (realmMappings == NULL || CFGetTypeID(realmMappings) != CFArrayGetTypeID()) {
+-        NSLog(@"Unable to load realm mapping info from SCDynamicStore");
+         if (realmMappings) CFRelease(realmMappings);
+         CFRelease(realms);
+         CFRelease(store);
+--- ./jdk/src/macosx/native/sun/awt/AWTEvent.m	2013-09-06 11:27:50.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/AWTEvent.m	2014-06-06 19:56:32.000000000 -0700
+@@ -382,7 +382,7 @@
+ {
+     TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
+     CFDataRef uchr = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
+-    if (uchr == nil) { return; }
++    if (uchr == nil) { return 0; }
+     const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout*)CFDataGetBytePtr(uchr);
+     // Carbon modifiers should be used instead of NSEvent modifiers
+     UInt32 modifierKeyState = (GetCurrentEventKeyModifiers() >> 8) & 0xFF;
+--- ./jdk/src/macosx/native/sun/awt/AWTWindow.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/AWTWindow.m	2014-06-06 19:56:32.000000000 -0700
+@@ -30,6 +30,7 @@
+ #import "sun_lwawt_macosx_CPlatformWindow.h"
+ #import "com_apple_eawt_event_GestureHandler.h"
+ #import "com_apple_eawt_FullScreenHandler.h"
++#import "ApplicationDelegate.h"
+ 
+ #import "AWTWindow.h"
+ #import "AWTView.h"
+@@ -585,17 +586,26 @@
+ AWT_ASSERT_APPKIT_THREAD;
+     [AWTToolkit eventCountPlusPlus];
+     AWTWindow *opposite = [AWTWindow lastKeyWindow];
+-    
++
+     // Finds appropriate menubar in our hierarchy,
+     AWTWindow *awtWindow = self;
+     while (awtWindow.ownerWindow != nil) {
+         awtWindow = awtWindow.ownerWindow;
+     }
++
+     CMenuBar *menuBar = nil;
++    BOOL isDisabled = NO;
+     if ([awtWindow.nsWindow isVisible]){
+         menuBar = awtWindow.javaMenuBar;
++        isDisabled = !awtWindow.isEnabled;
++    }
++
++    if (menuBar == nil) {
++        menuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
++        isDisabled = NO;
+     }
+-    [CMenuBar activate:menuBar modallyDisabled:!awtWindow.isEnabled];
++
++    [CMenuBar activate:menuBar modallyDisabled:isDisabled];
+ 
+     [AWTWindow setLastKeyWindow:nil];
+ 
+@@ -608,6 +618,14 @@
+     [AWTToolkit eventCountPlusPlus];
+     [self.javaMenuBar deactivate];
+ 
++    // In theory, this might cause flickering if the window gaining focus
++    // has its own menu. However, I couldn't reproduce it on practice, so
++    // perhaps this is a non issue.
++    CMenuBar* defaultMenu = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
++    if (defaultMenu != nil) {
++        [CMenuBar activate:defaultMenu modallyDisabled:NO];
++    }
++
+     // the new key window
+     NSWindow *keyWindow = [NSApp keyWindow];
+     AWTWindow *opposite = nil;
+@@ -875,11 +893,19 @@
+ 
+         AWTWindow *window = (AWTWindow*)[nsWindow delegate];
+ 
+-        if ([nsWindow isKeyWindow]) [window.javaMenuBar deactivate];
++        if ([nsWindow isKeyWindow]) {
++            [window.javaMenuBar deactivate];
++        }
++
+         window.javaMenuBar = menuBar;
+ 
++        CMenuBar* actualMenuBar = menuBar;
++        if (actualMenuBar == nil) {
++            actualMenuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
++        }
++
+         if ([nsWindow isKeyWindow]) {
+-            [CMenuBar activate:window.javaMenuBar modallyDisabled:NO];
++            [CMenuBar activate:actualMenuBar modallyDisabled:NO];
+         }
+     }];
+ 
+--- ./jdk/src/macosx/native/sun/awt/CDropTarget.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/CDropTarget.m	2014-06-06 19:56:32.000000000 -0700
+@@ -477,6 +477,8 @@
+         sDraggingExited = FALSE;
+         sDraggingLocation = [sender draggingLocation];
+         NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
++        javaLocation.y = fView.window.frame.size.height - javaLocation.y;
++
+         DLog5(@"+ dragEnter: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
+ 
+                 ////////// BEGIN Calculate the current drag actions //////////
+@@ -570,8 +572,7 @@
+     // Should we notify Java things have changed?
+     if (sDraggingError == FALSE && notifyJava) {
+         NSPoint javaLocation = [fView convertPoint:sDraggingLocation fromView:nil];
+-                // For some reason even after the convertPoint drag events come with the y coordinate reverted
+-                javaLocation.y = fView.window.frame.size.height - javaLocation.y;
++        javaLocation.y = fView.window.frame.size.height - javaLocation.y;
+         //DLog5(@"  : dragMoved: loc native %f, %f, java %f, %f\n", sDraggingLocation.x, sDraggingLocation.y, javaLocation.x, javaLocation.y);
+ 
+         jlongArray formats = sDraggingFormats;
+--- ./jdk/src/macosx/native/sun/awt/CMenuItem.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/CMenuItem.m	2014-06-06 19:56:32.000000000 -0700
+@@ -70,9 +70,15 @@
+     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
++    // If we are called as a result of user pressing a shortcut, do nothing,
++    // because AVTView has already sent corresponding key event to the Java
++    // layer from performKeyEquivalent.
++    // There is an exception from the rule above, though: if a window with
++    // a menu gets minimized by user and there are no other windows to take
++    // focus, the window's menu won't be removed from the global menu bar.
++    // However, the Java layer won't handle invocation by a shortcut coming
++    // from this "frameless" menu, because there are no active windows. This
++    // means we have to handle it here.
+     NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
+     if ([currEvent type] == NSKeyDown) {
+         NSString *menuKey = [sender keyEquivalent];
+@@ -91,7 +97,8 @@
+             eventKey = [NSString stringWithCharacters: &newChar length: 1];
+         }
+ 
+-        if ([menuKey isEqualToString:eventKey]) {
++        NSWindow *keyWindow = [NSApp keyWindow];
++        if ([menuKey isEqualToString:eventKey] && keyWindow != nil) {
+             return;
+         }
+     }
+@@ -289,7 +296,7 @@
+ 
+         case java_awt_event_KeyEvent_VK_HELP            : macKey = NSHelpFunctionKey; break;
+         case java_awt_event_KeyEvent_VK_TAB             : macKey = NSTabCharacter; break;
+-        case java_awt_event_KeyEvent_VK_ENTER           : macKey = NSCarriageReturnCharacter; break;
++        case java_awt_event_KeyEvent_VK_ENTER           : macKey = NSNewlineCharacter; break;
+         case java_awt_event_KeyEvent_VK_BACK_SPACE      : macKey = NSBackspaceCharacter; break;
+         case java_awt_event_KeyEvent_VK_DELETE          : macKey = NSDeleteCharacter; break;
+         case java_awt_event_KeyEvent_VK_CLEAR           : macKey = NSClearDisplayFunctionKey; break;
+--- ./jdk/src/macosx/native/sun/awt/LWCToolkit.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/LWCToolkit.m	2014-04-19 01:27:12.000000000 -0700
 @@ -193,8 +193,8 @@
  
          JNIEnv *env = [ThreadUtilities getJNIEnv];
@@ -28981,8 +53187,8 @@
      });
      
      gNumberOfButtons = sun_lwawt_macosx_LWCToolkit_BUTTONS;
---- jdk/src/macosx/native/sun/awt/awt.m	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/awt/awt.m	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/awt/awt.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/awt.m	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -29007,8 +53213,8 @@
      BOOL headless = isHeadless(env);
  
      // We need to let Foundation know that this is a multithreaded application, if it isn't already.
---- jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	2014-01-18 12:16:22.000000000 -0800
 @@ -290,8 +290,8 @@
          SplashUnlock(splash);
          rc = poll(pfd, 1, timeout);
@@ -29020,8 +53226,8 @@
              SplashNextFrame(splash);
              SplashRedrawWindow(splash);
          }
---- jdk/src/macosx/native/sun/font/AWTStrike.h	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/font/AWTStrike.h	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/font/AWTStrike.h	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/font/AWTStrike.h	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -29044,8 +53250,8 @@
      CGAffineTransform        fAltTx; // alternate strike tx used for Sun2D
      CGAffineTransform        fFontTx;
  }
---- jdk/src/macosx/native/sun/font/AWTStrike.m	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/font/AWTStrike.m	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/font/AWTStrike.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/font/AWTStrike.m	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -29082,8 +53288,8 @@
  
  JNF_COCOA_EXIT(env);
      return advance.width;
---- jdk/src/macosx/native/sun/font/CGGlyphImages.m	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/font/CGGlyphImages.m	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/font/CGGlyphImages.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/font/CGGlyphImages.m	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -29143,8 +53349,8 @@
  
          if (maxWidth < glyphInfo->width)   maxWidth = glyphInfo->width;
          if (maxHeight < glyphInfo->height) maxHeight = glyphInfo->height;
---- jdk/src/macosx/native/sun/osxapp/ThreadUtilities.h	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/osxapp/ThreadUtilities.h	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/osxapp/ThreadUtilities.h	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/osxapp/ThreadUtilities.h	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -29161,8 +53367,8 @@
  
  //Wrappers for the corresponding JNFRunLoop methods with a check for main thread
  + (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block;
---- jdk/src/macosx/native/sun/osxapp/ThreadUtilities.m	2013-09-06 11:27:51.000000000 -0700
-+++ jdk/src/macosx/native/sun/osxapp/ThreadUtilities.m	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/macosx/native/sun/osxapp/ThreadUtilities.m	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/macosx/native/sun/osxapp/ThreadUtilities.m	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
@@ -29217,8 +53423,94 @@
  + (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block {
      if ([NSThread isMainThread] && wait == YES) {
          block(); 
---- jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/back/SDE.c	2013-09-06 11:27:51.000000000 -0700
++++ ./jdk/src/share/back/SDE.c	2014-06-06 19:56:32.000000000 -0700
+@@ -28,6 +28,12 @@
+ #include "util.h"
+ #include "SDE.h"
+ 
++#ifdef __APPLE__
++/* use setjmp/longjmp versions that do not save/restore the signal mask */
++#define setjmp _setjmp
++#define longjmp _longjmp
++#endif
++
+ /**
+  * This SourceDebugExtension code does not
+  * allow concurrent translation - due to caching method.
+--- ./jdk/src/share/back/export/sys.h	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/back/export/sys.h	2014-06-06 19:56:32.000000000 -0700
+@@ -37,7 +37,7 @@
+ 
+ /* Implemented in linker_md.c */
+ 
+-void    dbgsysBuildLibName(char *, int, char *, char *);
++void    dbgsysBuildLibName(char *, int, const char *, const char *);
+ void *  dbgsysLoadLibrary(const char *, char *err_buf, int err_buflen);
+ void    dbgsysUnloadLibrary(void *);
+ void *  dbgsysFindLibraryEntry(void *, const char *);
+--- ./jdk/src/share/back/transport.c	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/back/transport.c	2014-06-06 19:56:33.000000000 -0700
+@@ -97,12 +97,12 @@
+ 
+ /* Load transport library (directory=="" means do system search) */
+ static void *
+-loadTransportLibrary(char *libdir, char *name)
++loadTransportLibrary(const char *libdir, const char *name)
+ {
+     void *handle;
+     char libname[MAXPATHLEN+2];
+     char buf[MAXPATHLEN*2+100];
+-    char *plibdir;
++    const char *plibdir;
+ 
+     /* Convert libdir from UTF-8 to platform encoding */
+     plibdir = NULL;
+@@ -117,6 +117,9 @@
+ 
+     /* Construct library name (simple name or full path) */
+     dbgsysBuildLibName(libname, sizeof(libname), plibdir, name);
++    if (strlen(libname) == 0) {
++        return NULL;
++    }
+ 
+     /* dlopen (unix) / LoadLibrary (windows) the transport library */
+     handle = dbgsysLoadLibrary(libname, buf, sizeof(buf));
+@@ -128,12 +131,12 @@
+  * JDK 1.2 javai.c v1.61
+  */
+ static jdwpError
+-loadTransport(char *name, jdwpTransportEnv **transportPtr)
++loadTransport(const char *name, jdwpTransportEnv **transportPtr)
+ {
+     JNIEnv                 *env;
+     jdwpTransport_OnLoad_t  onLoad;
+     void                   *handle;
+-    char                   *libdir;
++    const char             *libdir;
+ 
+     /* Make sure library name is not empty */
+     if (name == NULL) {
+--- ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	2014-06-06 19:56:33.000000000 -0700
+@@ -17,7 +17,7 @@
+ awtcomponent=AWT-Komponente
+ checkbox=Kontrollk\u00E4stchen
+ colorchooser=Farbauswahl
+-columnheader=Spalten-Header
++columnheader=Spaltenheader
+ combobox=Kombinationsfeld
+ canvas=Leinwand
+ desktopicon=Desktopsymbol
+@@ -46,7 +46,7 @@
+ pushbutton=Schaltfl\u00E4che
+ radiobutton=Optionsfeld
+ rootpane=Root-Bereich
+-rowheader=Zeilen-Header
++rowheader=Zeilenheader
+ scrollbar=Bildlaufleiste
+ scrollpane=Bildlaufbereich
+ separator=Trennzeichen
 @@ -102,7 +102,7 @@
  #
  # accessible actions
@@ -29228,8 +53520,8 @@
  
  # new relations, roles and states for J2SE 1.5.0
  
---- jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -102,7 +102,7 @@
  #
  # accessible actions
@@ -29239,8 +53531,8 @@
  
  # new relations, roles and states for J2SE 1.5.0
  
---- jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -102,7 +102,7 @@
  #
  # accessible actions
@@ -29250,8 +53542,8 @@
  
  # new relations, roles and states for J2SE 1.5.0
  
---- jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -102,7 +102,7 @@
  #
  # accessible actions
@@ -29261,8 +53553,8 @@
  
  # new relations, roles and states for J2SE 1.5.0
  
---- jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -102,7 +102,7 @@
  #
  # accessible actions
@@ -29272,8 +53564,8 @@
  
  # new relations, roles and states for J2SE 1.5.0
  
---- jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -102,7 +102,7 @@
  #
  # accessible actions
@@ -29283,8 +53575,38 @@
  
  # new relations, roles and states for J2SE 1.5.0
  
---- jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	2013-09-06 11:27:52.000000000 -0700
-+++ jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java	2014-06-06 19:56:33.000000000 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -110,6 +110,20 @@
+     }
+ 
+     /**
++     * Tests whether the value of this element can be used
++     * as an argument of the element that contained in this one.
++     *
++     * @return {@code true} if the value of this element can be used
++     *         as an argument of the element that contained in this one,
++     *         {@code false} otherwise
++     */
++    @Override
++    protected boolean isArgument() {
++        return true; // hack for compatibility
++    }
++
++
++    /**
+      * Creates an instance of the array.
+      *
+      * @param type  the base class
+--- ./jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	2014-01-18 12:16:22.000000000 -0800
 @@ -29,6 +29,7 @@
  import java.beans.ExceptionListener;
  
@@ -29308,8 +53630,806 @@
       * Prepares this handler to read objects from XML document.
       */
      @Override
---- jdk/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	2013-09-06 11:27:53.000000000 -0700
-+++ jdk/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java	2014-06-06 19:56:33.000000000 -0700
+@@ -24,11 +24,12 @@
+  */
+ package com.sun.beans.finder;
+ 
+-import com.sun.beans.WeakCache;
++import com.sun.beans.util.Cache;
+ 
+ import java.lang.reflect.Constructor;
+ import java.lang.reflect.Modifier;
+ 
++import static com.sun.beans.util.Cache.Kind.SOFT;
+ import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
+ 
+ /**
+@@ -41,7 +42,18 @@
+  * @author Sergey A. Malenkov
+  */
+ public final class ConstructorFinder extends AbstractFinder> {
+-    private static final WeakCache> CACHE = new WeakCache>();
++    private static final Cache> CACHE = new Cache>(SOFT, SOFT) {
++        @Override
++        public Constructor create(Signature signature) {
++            try {
++                ConstructorFinder finder = new ConstructorFinder(signature.getArgs());
++                return finder.find(signature.getType().getConstructors());
++            }
++            catch (Exception exception) {
++                throw new SignatureException(exception);
++            }
++        }
++    };
+ 
+     /**
+      * Finds public constructor
+@@ -69,13 +81,12 @@
+         PrimitiveWrapperMap.replacePrimitivesWithWrappers(args);
+         Signature signature = new Signature(type, args);
+ 
+-        Constructor constructor = CACHE.get(signature);
+-        if (constructor != null) {
+-            return constructor;
+-        }
+-        constructor = new ConstructorFinder(args).find(type.getConstructors());
+-        CACHE.put(signature, constructor);
+-        return constructor;
++        try {
++            return CACHE.get(signature);
++        }
++        catch (SignatureException exception) {
++            throw exception.toNoSuchMethodException("Constructor is not found");
++        }
+     }
+ 
+     /**
+--- ./jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java	2014-06-06 19:56:33.000000000 -0700
+@@ -25,7 +25,7 @@
+ package com.sun.beans.finder;
+ 
+ import com.sun.beans.TypeResolver;
+-import com.sun.beans.WeakCache;
++import com.sun.beans.util.Cache;
+ 
+ import java.lang.reflect.Method;
+ import java.lang.reflect.Modifier;
+@@ -33,6 +33,7 @@
+ import java.lang.reflect.Type;
+ import java.util.Arrays;
+ 
++import static com.sun.beans.util.Cache.Kind.SOFT;
+ import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
+ 
+ /**
+@@ -45,7 +46,18 @@
+  * @author Sergey A. Malenkov
+  */
+ public final class MethodFinder extends AbstractFinder {
+-    private static final WeakCache CACHE = new WeakCache();
++    private static final Cache CACHE = new Cache(SOFT, SOFT) {
++        @Override
++        public Method create(Signature signature) {
++            try {
++                MethodFinder finder = new MethodFinder(signature.getName(), signature.getArgs());
++                return findAccessibleMethod(finder.find(signature.getType().getMethods()));
++            }
++            catch (Exception exception) {
++                throw new SignatureException(exception);
++            }
++        }
++    };
+ 
+     /**
+      * Finds public method (static or non-static)
+@@ -65,16 +77,13 @@
+         PrimitiveWrapperMap.replacePrimitivesWithWrappers(args);
+         Signature signature = new Signature(type, name, args);
+ 
+-        Method method = CACHE.get(signature);
+-        boolean cached = method != null;
+-        if (cached && isPackageAccessible(method.getDeclaringClass())) {
+-            return method;
++        try {
++            Method method = CACHE.get(signature);
++            return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
+         }
+-        method = findAccessibleMethod(new MethodFinder(name, args).find(type.getMethods()));
+-        if (!cached) {
+-            CACHE.put(signature, method);
++        catch (SignatureException exception) {
++            throw exception.toNoSuchMethodException("Method '" + name + "' is not found");
+         }
+-        return method;
+     }
+ 
+     /**
+--- ./jdk/src/share/classes/com/sun/beans/finder/Signature.java	2013-09-06 11:27:52.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/beans/finder/Signature.java	2014-06-06 19:56:29.000000000 -0700
+@@ -62,6 +62,18 @@
+         this.args = args;
+     }
+ 
++    Class getType() {
++        return this.type;
++    }
++
++    String getName() {
++        return this.name;
++    }
++
++    Class[] getArgs() {
++        return this.args;
++    }
++
+     /**
+      * Indicates whether some other object is "equal to" this one.
+      *
+--- ./jdk/src/share/classes/com/sun/beans/finder/SignatureException.java	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/src/share/classes/com/sun/beans/finder/SignatureException.java	2014-06-06 19:56:29.000000000 -0700
+@@ -0,0 +1,41 @@
++/*
++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
++ * 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.finder;
++
++final class SignatureException extends RuntimeException {
++    SignatureException(Throwable cause) {
++        super(cause);
++    }
++
++    NoSuchMethodException toNoSuchMethodException(String message) {
++        Throwable throwable = getCause();
++        if (throwable instanceof NoSuchMethodException) {
++            return (NoSuchMethodException) throwable;
++        }
++        NoSuchMethodException exception = new NoSuchMethodException(message);
++        exception.initCause(throwable);
++        return exception;
++    }
++}
+--- ./jdk/src/share/classes/com/sun/beans/util/Cache.java	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/src/share/classes/com/sun/beans/util/Cache.java	2014-06-06 19:56:29.000000000 -0700
+@@ -0,0 +1,613 @@
++/*
++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
++ * 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.util;
++
++import java.lang.ref.ReferenceQueue;
++import java.lang.ref.SoftReference;
++import java.lang.ref.WeakReference;
++import java.util.Objects;
++
++/**
++ * Hash table based implementation of the cache,
++ * which allows to use weak or soft references for keys and values.
++ * An entry in a {@code Cache} will automatically be removed
++ * when its key or value is no longer in ordinary use.
++ *
++ * @author Sergey Malenkov
++ * @since 1.8
++ */
++public abstract class Cache {
++    private static final int MAXIMUM_CAPACITY = 1 << 30; // maximum capacity MUST be a power of two <= 1<<30
++
++    private final boolean identity; // defines whether the identity comparison is used
++    private final Kind keyKind; // a reference kind for the cache keys
++    private final Kind valueKind; // a reference kind for the cache values
++
++    private final ReferenceQueue queue = new ReferenceQueue<>(); // queue for references to remove
++
++    private volatile CacheEntry[] table = newTable(1 << 3); // table's length MUST be a power of two
++    private int threshold = 6; // the next size value at which to resize
++    private int size; // the number of key-value mappings contained in this map
++
++    /**
++     * Creates a corresponding value for the specified key.
++     *
++     * @param key a key that can be used to create a value
++     * @return a corresponding value for the specified key
++     */
++    public abstract V create(K key);
++
++    /**
++     * Constructs an empty {@code Cache}.
++     * The default initial capacity is 8.
++     * The default load factor is 0.75.
++     *
++     * @param keyKind   a reference kind for keys
++     * @param valueKind a reference kind for values
++     *
++     * @throws NullPointerException if {@code keyKind} or {@code valueKind} are {@code null}
++     */
++    public Cache(Kind keyKind, Kind valueKind) {
++        this(keyKind, valueKind, false);
++    }
++
++    /**
++     * Constructs an empty {@code Cache}
++     * with the specified comparison method.
++     * The default initial capacity is 8.
++     * The default load factor is 0.75.
++     *
++     * @param keyKind   a reference kind for keys
++     * @param valueKind a reference kind for values
++     * @param identity  defines whether reference-equality
++     *                  is used in place of object-equality
++     *
++     * @throws NullPointerException if {@code keyKind} or {@code valueKind} are {@code null}
++     */
++    public Cache(Kind keyKind, Kind valueKind, boolean identity) {
++        Objects.requireNonNull(keyKind, "keyKind");
++        Objects.requireNonNull(valueKind, "valueKind");
++        this.keyKind = keyKind;
++        this.valueKind = valueKind;
++        this.identity = identity;
++    }
++
++    /**
++     * Returns the value to which the specified key is mapped,
++     * or {@code null} if there is no mapping for the key.
++     *
++     * @param key the key whose cached value is to be returned
++     * @return a value to which the specified key is mapped,
++     *         or {@code null} if there is no mapping for {@code key}
++     *
++     * @throws NullPointerException if {@code key} is {@code null}
++     *                              or corresponding value is {@code null}
++     */
++    public final V get(K key) {
++        Objects.requireNonNull(key, "key");
++        removeStaleEntries();
++        int hash = hash(key);
++        // unsynchronized search improves performance
++        // the null value does not mean that there are no needed entry
++        CacheEntry[] table = this.table; // unsynchronized access
++        V current = getEntryValue(key, hash, table[index(hash, table)]);
++        if (current != null) {
++            return current;
++        }
++        synchronized (this.queue) {
++            // synchronized search improves stability
++            // we must create and add new value if there are no needed entry
++            int index = index(hash, this.table);
++            current = getEntryValue(key, hash, this.table[index]);
++            if (current != null) {
++                return current;
++            }
++            V value = create(key);
++            Objects.requireNonNull(value, "value");
++            this.table[index] = new CacheEntry<>(hash, key, value, this.table[index]);
++            if (++this.size >= this.threshold) {
++                if (this.table.length == MAXIMUM_CAPACITY) {
++                    this.threshold = Integer.MAX_VALUE;
++                } else {
++                    removeStaleEntries();
++                    table = newTable(this.table.length << 1);
++                    transfer(this.table, table);
++                    // If ignoring null elements and processing ref queue caused massive
++                    // shrinkage, then restore old table.  This should be rare, but avoids
++                    // unbounded expansion of garbage-filled tables.
++                    if (this.size >= this.threshold / 2) {
++                        this.table = table;
++                        this.threshold <<= 1;
++                    } else {
++                        transfer(table, this.table);
++                    }
++                    removeStaleEntries();
++                }
++            }
++            return value;
++        }
++    }
++
++    /**
++     * Removes the cached value that corresponds to the specified key.
++     *
++     * @param key the key whose mapping is to be removed from this cache
++     */
++    public final void remove(K key) {
++        if (key != null) {
++            synchronized (this.queue) {
++                removeStaleEntries();
++                int hash = hash(key);
++                int index = index(hash, this.table);
++                CacheEntry prev = this.table[index];
++                CacheEntry entry = prev;
++                while (entry != null) {
++                    CacheEntry next = entry.next;
++                    if (entry.matches(hash, key)) {
++                        if (entry == prev) {
++                            this.table[index] = next;
++                        } else {
++                            prev.next = next;
++                        }
++                        entry.unlink();
++                        break;
++                    }
++                    prev = entry;
++                    entry = next;
++                }
++            }
++        }
++    }
++
++    /**
++     * Removes all of the mappings from this cache.
++     * It will be empty after this call returns.
++     */
++    public final void clear() {
++        synchronized (this.queue) {
++            int index = this.table.length;
++            while (0 < index--) {
++                CacheEntry entry = this.table[index];
++                while (entry != null) {
++                    CacheEntry next = entry.next;
++                    entry.unlink();
++                    entry = next;
++                }
++                this.table[index] = null;
++            }
++            while (null != this.queue.poll()) {
++                // Clear out the reference queue.
++            }
++        }
++    }
++
++    /**
++     * Retrieves object hash code and applies a supplemental hash function
++     * to the result hash, which defends against poor quality hash functions.
++     * This is critical because {@code Cache} uses power-of-two length hash tables,
++     * that otherwise encounter collisions for hashCodes that do not differ
++     * in lower bits.
++     *
++     * @param key the object which hash code is to be calculated
++     * @return a hash code value for the specified object
++     */
++    private int hash(Object key) {
++        if (this.identity) {
++            int hash = System.identityHashCode(key);
++            return (hash << 1) - (hash << 8);
++        }
++        int hash = key.hashCode();
++        // This function ensures that hashCodes that differ only by
++        // constant multiples at each bit position have a bounded
++        // number of collisions (approximately 8 at default load factor).
++        hash ^= (hash >>> 20) ^ (hash >>> 12);
++        return hash ^ (hash >>> 7) ^ (hash >>> 4);
++    }
++
++    /**
++     * Returns index of the specified hash code in the given table.
++     * Note that the table size must be a power of two.
++     *
++     * @param hash  the hash code
++     * @param table the table
++     * @return an index of the specified hash code in the given table
++     */
++    private static int index(int hash, Object[] table) {
++        return hash & (table.length - 1);
++    }
++
++    /**
++     * Creates a new array for the cache entries.
++     *
++     * @param size requested capacity MUST be a power of two
++     * @return a new array for the cache entries
++     */
++    @SuppressWarnings("unchecked")
++    private CacheEntry[] newTable(int size) {
++        return (CacheEntry[]) new CacheEntry[size];
++    }
++
++    private V getEntryValue(K key, int hash, CacheEntry entry) {
++        while (entry != null) {
++            if (entry.matches(hash, key)) {
++                return entry.value.getReferent();
++            }
++            entry = entry.next;
++        }
++        return null;
++    }
++
++    private void removeStaleEntries() {
++        Object reference = this.queue.poll();
++        if (reference != null) {
++            synchronized (this.queue) {
++                do {
++                    if (reference instanceof Ref) {
++                        Ref ref = (Ref) reference;
++                        @SuppressWarnings("unchecked")
++                        CacheEntry owner = (CacheEntry) ref.getOwner();
++                        if (owner != null) {
++                            int index = index(owner.hash, this.table);
++                            CacheEntry prev = this.table[index];
++                            CacheEntry entry = prev;
++                            while (entry != null) {
++                                CacheEntry next = entry.next;
++                                if (entry == owner) {
++                                    if (entry == prev) {
++                                        this.table[index] = next;
++                                    } else {
++                                        prev.next = next;
++                                    }
++                                    entry.unlink();
++                                    break;
++                                }
++                                prev = entry;
++                                entry = next;
++                            }
++                        }
++                    }
++                    reference = this.queue.poll();
++                }
++                while (reference != null);
++            }
++        }
++    }
++
++    private void transfer(CacheEntry[] oldTable, CacheEntry[] newTable) {
++        int oldIndex = oldTable.length;
++        while (0 < oldIndex--) {
++            CacheEntry entry = oldTable[oldIndex];
++            oldTable[oldIndex] = null;
++            while (entry != null) {
++                CacheEntry next = entry.next;
++                if (entry.key.isStale() || entry.value.isStale()) {
++                    entry.unlink();
++                } else {
++                    int newIndex = index(entry.hash, newTable);
++                    entry.next = newTable[newIndex];
++                    newTable[newIndex] = entry;
++                }
++                entry = next;
++            }
++        }
++    }
++
++    /**
++     * Represents a cache entry (key-value pair).
++     */
++    private final class CacheEntry {
++        private final int hash;
++        private final Ref key;
++        private final Ref value;
++        private volatile CacheEntry next;
++
++        /**
++         * Constructs an entry for the cache.
++         *
++         * @param hash  the hash code calculated for the entry key
++         * @param key   the entry key
++         * @param value the initial value of the entry
++         * @param next  the next entry in a chain
++         */
++        private CacheEntry(int hash, K key, V value, CacheEntry next) {
++            this.hash = hash;
++            this.key = Cache.this.keyKind.create(this, key, Cache.this.queue);
++            this.value = Cache.this.valueKind.create(this, value, Cache.this.queue);
++            this.next = next;
++        }
++
++        /**
++         * Determines whether the entry has the given key with the given hash code.
++         *
++         * @param hash   an expected hash code
++         * @param object an object to be compared with the entry key
++         * @return {@code true} if the entry has the given key with the given hash code;
++         *         {@code false} otherwise
++         */
++        private boolean matches(int hash, Object object) {
++            if (this.hash != hash) {
++                return false;
++            }
++            Object key = this.key.getReferent();
++            return (key == object) || !Cache.this.identity && (key != null) && key.equals(object);
++        }
++
++        /**
++         * Marks the entry as actually removed from the cache.
++         */
++        private void unlink() {
++            this.next = null;
++            this.key.removeOwner();
++            this.value.removeOwner();
++            Cache.this.size--;
++        }
++    }
++
++    /**
++     * Basic interface for references.
++     * It defines the operations common for the all kind of references.
++     *
++     * @param  the type of object to refer
++     */
++    private static interface Ref {
++        /**
++         * Returns the object that possesses information about the reference.
++         *
++         * @return the owner of the reference or {@code null} if the owner is unknown
++         */
++        Object getOwner();
++
++        /**
++         * Returns the object to refer.
++         *
++         * @return the referred object or {@code null} if it was collected
++         */
++        T getReferent();
++
++        /**
++         * Determines whether the referred object was taken by the garbage collector or not.
++         *
++         * @return {@code true} if the referred object was collected
++         */
++        boolean isStale();
++
++        /**
++         * Marks this reference as removed from the cache.
++         */
++        void removeOwner();
++    }
++
++    /**
++     * Represents a reference kind.
++     */
++    public static enum Kind {
++        STRONG {
++             Ref create(Object owner, T value, ReferenceQueue queue) {
++                return new Strong<>(owner, value);
++            }
++        },
++        SOFT {
++             Ref create(Object owner, T referent, ReferenceQueue queue) {
++                return (referent == null)
++                        ? new Strong<>(owner, referent)
++                        : new Soft<>(owner, referent, queue);
++            }
++        },
++        WEAK {
++             Ref create(Object owner, T referent, ReferenceQueue queue) {
++                return (referent == null)
++                        ? new Strong<>(owner, referent)
++                        : new Weak<>(owner, referent, queue);
++            }
++        };
++
++        /**
++         * Creates a reference to the specified object.
++         *
++         * @param       the type of object to refer
++         * @param owner    the owner of the reference, if needed
++         * @param referent the object to refer
++         * @param queue    the queue to register the reference with,
++         *                 or {@code null} if registration is not required
++         * @return the reference to the specified object
++         */
++        abstract  Ref create(Object owner, T referent, ReferenceQueue queue);
++
++        /**
++         * This is an implementation of the {@link Cache.Ref} interface
++         * that uses the strong references that prevent their referents
++         * from being made finalizable, finalized, and then reclaimed.
++         *
++         * @param  the type of object to refer
++         */
++        private static final class Strong implements Ref {
++            private Object owner;
++            private final T referent;
++
++            /**
++             * Creates a strong reference to the specified object.
++             *
++             * @param owner    the owner of the reference, if needed
++             * @param referent the non-null object to refer
++             */
++            private Strong(Object owner, T referent) {
++                this.owner = owner;
++                this.referent = referent;
++            }
++
++            /**
++             * Returns the object that possesses information about the reference.
++             *
++             * @return the owner of the reference or {@code null} if the owner is unknown
++             */
++            public Object getOwner() {
++                return this.owner;
++            }
++
++            /**
++             * Returns the object to refer.
++             *
++             * @return the referred object
++             */
++            public T getReferent() {
++                return this.referent;
++            }
++
++            /**
++             * Determines whether the referred object was taken by the garbage collector or not.
++             *
++             * @return {@code true} if the referred object was collected
++             */
++            public boolean isStale() {
++                return false;
++            }
++
++            /**
++             * Marks this reference as removed from the cache.
++             */
++            public void removeOwner() {
++                this.owner = null;
++            }
++        }
++
++        /**
++         * This is an implementation of the {@link Cache.Ref} interface
++         * that uses the soft references that are cleared at the discretion
++         * of the garbage collector in response to a memory request.
++         *
++         * @param  the type of object to refer
++         * @see java.lang.ref.SoftReference
++         */
++        private static final class Soft extends SoftReference implements Ref {
++            private Object owner;
++
++            /**
++             * Creates a soft reference to the specified object.
++             *
++             * @param owner    the owner of the reference, if needed
++             * @param referent the non-null object to refer
++             * @param queue    the queue to register the reference with,
++             *                 or {@code null} if registration is not required
++             */
++            private Soft(Object owner, T referent, ReferenceQueue queue) {
++                super(referent, queue);
++                this.owner = owner;
++            }
++
++            /**
++             * Returns the object that possesses information about the reference.
++             *
++             * @return the owner of the reference or {@code null} if the owner is unknown
++             */
++            public Object getOwner() {
++                return this.owner;
++            }
++
++            /**
++             * Returns the object to refer.
++             *
++             * @return the referred object or {@code null} if it was collected
++             */
++            public T getReferent() {
++                return get();
++            }
++
++            /**
++             * Determines whether the referred object was taken by the garbage collector or not.
++             *
++             * @return {@code true} if the referred object was collected
++             */
++            public boolean isStale() {
++                return null == get();
++            }
++
++            /**
++             * Marks this reference as removed from the cache.
++             */
++            public void removeOwner() {
++                this.owner = null;
++            }
++        }
++
++        /**
++         * This is an implementation of the {@link Cache.Ref} interface
++         * that uses the weak references that do not prevent their referents
++         * from being made finalizable, finalized, and then reclaimed.
++         *
++         * @param  the type of object to refer
++         * @see java.lang.ref.WeakReference
++         */
++        private static final class Weak extends WeakReference implements Ref {
++            private Object owner;
++
++            /**
++             * Creates a weak reference to the specified object.
++             *
++             * @param owner    the owner of the reference, if needed
++             * @param referent the non-null object to refer
++             * @param queue    the queue to register the reference with,
++             *                 or {@code null} if registration is not required
++             */
++            private Weak(Object owner, T referent, ReferenceQueue queue) {
++                super(referent, queue);
++                this.owner = owner;
++            }
++
++            /**
++             * Returns the object that possesses information about the reference.
++             *
++             * @return the owner of the reference or {@code null} if the owner is unknown
++             */
++            public Object getOwner() {
++                return this.owner;
++            }
++
++            /**
++             * Returns the object to refer.
++             *
++             * @return the referred object or {@code null} if it was collected
++             */
++            public T getReferent() {
++                return get();
++            }
++
++            /**
++             * Determines whether the referred object was taken by the garbage collector or not.
++             *
++             * @return {@code true} if the referred object was collected
++             */
++            public boolean isStale() {
++                return null == get();
++            }
++
++            /**
++             * Marks this reference as removed from the cache.
++             */
++            public void removeOwner() {
++                this.owner = null;
++            }
++        }
++    }
++}
+--- ./jdk/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/DHKeyAgreement.java	2014-01-18 12:16:22.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -29329,8 +54449,8 @@
          } else {
              throw new NoSuchAlgorithmException("Unsupported secret key "
                                                 + "algorithm: "+ algorithm);
---- jdk/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	2013-09-06 11:27:53.000000000 -0700
-+++ jdk/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/DHPrivateKey.java	2013-12-01 11:14:37.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -29361,8 +54481,8 @@
      private void parseKeyBits() throws InvalidKeyException {
          try {
              DerInputStream in = new DerInputStream(this.key);
---- jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	2013-09-06 11:27:53.000000000 -0700
-+++ jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	2014-01-18 12:16:22.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -29394,8 +54514,8 @@
          return new SecretKeySpec(b, "TlsRsaPremasterSecret");
      }
  
---- jdk/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	2013-09-06 11:27:53.000000000 -0700
-+++ jdk/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/demo/jvmti/hprof/Tracker.java	2013-12-01 11:14:37.000000000 -0800
 @@ -53,7 +53,10 @@
  
      public static void ObjectInit(Object obj)
@@ -29450,8 +54570,8 @@
              nativeReturnSite(Thread.currentThread(), cnum, mnum);
          }
      }
---- jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	2013-09-06 11:27:53.000000000 -0700
-+++ jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	2013-12-01 11:14:37.000000000 -0800
 @@ -1160,6 +1160,11 @@
              target = imRas;
          }
@@ -29464,8 +54584,8 @@
  
          /*
           * If the process is sequential, and we have restart markers,
---- jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	2013-09-06 11:27:53.000000000 -0700
-+++ jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java	2013-12-01 11:14:37.000000000 -0800
 @@ -490,8 +490,8 @@
              // handle <= 8-bit samples.  We now check the band sizes and throw
              // an exception for images, such as USHORT_GRAY, with > 8 bits
@@ -29477,8 +54597,32 @@
              }
              // 4450894 part 2: We expand IndexColorModel images to full 24-
              // or 32-bit in grabPixels() for each scanline.  For indexed
---- jdk/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	2013-09-06 11:27:54.000000000 -0700
-+++ jdk/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	2013-09-06 11:27:53.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	2014-06-06 19:56:29.000000000 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -278,10 +278,11 @@
+                         (JFIFMarkerSegment) findMarkerSegment
+                         (JFIFMarkerSegment.class, true);
+                     if (jfif == null) {
+-                        throw new IIOException
+-                            ("ICC APP2 encountered without prior JFIF!");
++                        newGuy = new MarkerSegment(buffer);
++                        newGuy.loadData(buffer);
++                    } else {
++                        jfif.addICC(buffer);
+                     }
+-                    jfif.addICC(buffer);
+                     // newGuy remains null
+                 } else {
+                     newGuy = new MarkerSegment(buffer);
+--- ./jdk/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	2013-09-06 11:27:54.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -41,7 +41,7 @@
  FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
  FileChooser.pathLabel.textAndMnemonic=Aus&wahl:
@@ -29488,8 +54632,8 @@
  FileChooser.filesLabel.textAndMnemonic=&Dateien
  
  FileChooser.cancelButtonToolTip.textAndMnemonic=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
---- jdk/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	2013-09-06 11:27:54.000000000 -0700
-+++ jdk/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	2013-09-06 11:27:54.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	2014-01-18 12:16:22.000000000 -0800
 @@ -24,7 +24,7 @@
  FileChooser.openButton.textAndMnemonic=\uD655\uC778
  FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
@@ -29506,8 +54650,397 @@
 -FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uAC31\uC2E0\uD569\uB2C8\uB2E4.
 +FileChooser.updateButtonToolTip.textAndMnemonic=\uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.
  FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0\uC785\uB2C8\uB2E4.
---- jdk/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	2013-09-06 11:27:56.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_fr.properties	2013-09-06 11:27:55.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_fr.properties	2014-06-06 19:56:29.000000000 -0700
+@@ -25,8 +25,8 @@
+ FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier :
+ FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
+ FileChooser.upFolderAccessibleName=Monter
+-FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
+-FileChooser.homeFolderAccessibleName=R\u00E9pertoire d'origine
++FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire de base
++FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
+ FileChooser.newFolderToolTip.textAndMnemonic=Cr\u00E9e un dossier.
+ FileChooser.newFolderAccessibleName=Nouveau dossier
+ FileChooser.newFolderActionLabel.textAndMnemonic=Nouveau dossier
+--- ./jdk/src/share/classes/com/sun/java/util/jar/pack/Code.java	2013-09-06 11:27:55.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/java/util/jar/pack/Code.java	2014-06-06 19:56:29.000000000 -0700
+@@ -146,7 +146,6 @@
+         int verbose = getPackage().verbose;
+         if (verbose > 2)
+             System.out.println("Reference scan "+this);
+-        Class cls = thisClass();
+         refs.addAll(Arrays.asList(handler_class));
+         if (fixups != null) {
+             fixups.visitRefs(refs);
+--- ./jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	2013-09-06 11:27:55.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	2014-06-06 19:56:29.000000000 -0700
+@@ -670,53 +670,55 @@
+         return new String(sig);
+     }
+ 
+-    static private int skipClassNameChars(String sig, int i) {
+-        int len = sig.length();
+-        for (; i < len; i++) {
+-            char ch = sig.charAt(i);
+-            if (ch <= ' ')  break;
+-            if (ch >= ';' && ch <= '@')  break;
+-        }
+-        return i;
++    static private int skipTo(char semi, String sig, int i) {
++        i = sig.indexOf(semi, i);
++        return (i >= 0) ? i : sig.length();
+     }
+ 
+     static String[] structureSignature(String sig) {
+-        sig = sig.intern();
+-
+-        int formLen = 0;
+-        int nparts = 1;
+-        for (int i = 0; i < sig.length(); i++) {
+-            char ch = sig.charAt(i);
+-            formLen++;
+-            if (ch == 'L') {
+-                nparts++;
+-                int i2 = skipClassNameChars(sig, i+1);
+-                i = i2-1;  // keep the semicolon in the form
+-                int i3 = sig.indexOf('<', i+1);
+-                if (i3 > 0 && i3 < i2)
+-                    i = i3-1;
+-            }
+-        }
+-        char[] form = new char[formLen];
+-        if (nparts == 1) {
++        int firstl = sig.indexOf('L');
++        if (firstl < 0) {
+             String[] parts = { sig };
+             return parts;
+         }
+-        String[] parts = new String[nparts];
+-        int j = 0;
+-        int k = 1;
+-        for (int i = 0; i < sig.length(); i++) {
+-            char ch = sig.charAt(i);
+-            form[j++] = ch;
+-            if (ch == 'L') {
+-                int i2 = skipClassNameChars(sig, i+1);
+-                parts[k++] = sig.substring(i+1, i2);
+-                i = i2;
+-                --i;  // keep the semicolon in the form
+-            }
++        // Segment the string like sig.split("L\\([^;<]*\\)").
++        // N.B.: Previous version of this code did a more complex match,
++        // to next ch < ' ' or ch in [';'..'@'].  The only important
++        // characters are ';' and '<', since they are part of the
++        // signature syntax.
++        // Examples:
++        //   "(Ljava/lang/Object;IJLLoo;)V" => {"(L;IJL;)V", "java/lang/Object", "Loo"}
++        //   "Ljava/util/List;" => {"L;", "java/util/List", "java/lang/String"}
++        char[] form = null;
++        String[] parts = null;
++        for (int pass = 0; pass <= 1; pass++) {
++            // pass 0 is a sizing pass, pass 1 packs the arrays
++            int formPtr = 0;
++            int partPtr = 1;
++            int nextsemi = 0, nextangl = 0;  // next ';' or '<', or zero, or sigLen
++            int lastj = 0;
++            for (int i = firstl + 1, j; i > 0; i = sig.indexOf('L', j) + 1) {
++                // sig[i-1] is 'L', while sig[j] will be the first ';' or '<' after it
++                // each part is in sig[i .. j-1]
++                if (nextsemi < i)  nextsemi = skipTo(';', sig, i);
++                if (nextangl < i)  nextangl = skipTo('<', sig, i);
++                j = (nextsemi < nextangl ? nextsemi : nextangl);
++                if (pass != 0) {
++                    sig.getChars(lastj, i, form, formPtr);
++                    parts[partPtr] = sig.substring(i, j);
++                }
++                formPtr += (i - lastj);
++                partPtr += 1;
++                lastj = j;
++            }
++            if (pass != 0) {
++                sig.getChars(lastj, sig.length(), form, formPtr);
++                break;
++            }
++            formPtr += (sig.length() - lastj);
++            form = new char[formPtr];
++            parts = new String[partPtr];
+         }
+-        assert(j == formLen);
+-        assert(k == parts.length);
+         parts[0] = new String(form);
+         //assert(flattenSignature(parts).equals(sig));
+         return parts;
+--- ./jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource_ja.java	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource_ja.java	2014-06-06 19:56:29.000000000 -0700
+@@ -0,0 +1,131 @@
++/*
++ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
++ * 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.java.util.jar.pack;
++
++import java.util.ListResourceBundle;
++
++public class DriverResource_ja extends ListResourceBundle {
++        public static final String VERSION ="VERSION";
++        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
++        public static final String BAD_OPTION ="BAD_OPTION";
++        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
++        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
++        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
++        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
++        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
++        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
++        public static final String PACK_HELP="PACK_HELP";
++        public static final String UNPACK_HELP ="UNPACK_HELP";
++        public static final String MORE_INFO = "MORE_INFO";
++        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
++        public static final String BAD_SPEC = "BAD_SPEC";
++
++        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
++        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
++        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
++        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
++        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
++        private static final String PARAMETER_VER = "  -V, --version                   print program version";
++        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
++
++
++        //The following are outputs of command 'pack200' and 'unpack200'.
++        //Don't translate command arguments ,words with a prefix of '-' or '--'.
++        //
++        private static final Object[][] resource= {
++                {VERSION,"{0}\u30D0\u30FC\u30B8\u30E7\u30F3{1}"},//parameter 0:class name;parameter 1: version value
++                {BAD_ARGUMENT,"\u7121\u52B9\u306A\u5F15\u6570: {0}"},
++                {BAD_OPTION,"\u7121\u52B9\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}={1}"},//parameter 0:option name;parameter 1:option value
++                {BAD_REPACK_OUTPUT,"\u7121\u52B9\u306A--repack\u51FA\u529B: {0}"},//parameter 0:filename
++                {DETECTED_ZIP_COMMENT,"\u691C\u51FA\u3055\u308C\u305FZIP\u30B3\u30E1\u30F3\u30C8: {0}"},//parameter 0:comment
++                {SKIP_FOR_REPACKED,"\u3059\u3067\u306B\u518D\u5727\u7E2E\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059: {0}"},//parameter 0:filename
++                {WRITE_PACK_FILE,"*.pack\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\u306B\u306F\u3001--no-gzip\u3092\u6307\u5B9A\u3057\u307E\u3059: {0}"},//parameter 0:filename
++                {WIRTE_PACKGZ_FILE,"*.pack.gz\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\u306B\u306F\u3001--gzip\u3092\u6307\u5B9A\u3057\u307E\u3059: {0}"},//parameter 0:filename
++                {SKIP_FOR_MOVE_FAILED,"\u79FB\u52D5\u304C\u5931\u6557\u3057\u305F\u305F\u3081\u89E3\u51CD\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u3066\u3044\u307E\u3059: {0}"},//parameter 0:filename
++                {PACK_HELP,new String[]{
++                                "\u4F7F\u7528\u65B9\u6CD5:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
++                                "",
++                                "\u5727\u7E2E\u30AA\u30D7\u30B7\u30E7\u30F3",
++                                "  -g\u3001--no-gzip                   \u30D7\u30EC\u30FC\u30F3\u306A*.pack\u30D5\u30A1\u30A4\u30EB\u3092\u5727\u7E2E\u305B\u305A\u306B\u51FA\u529B\u3057\u307E\u3059",
++                                "  --gzip                          (\u30C7\u30D5\u30A9\u30EB\u30C8)\u5727\u7E2E\u51FA\u529B\u3092gzip\u3067\u5F8C\u51E6\u7406\u3057\u307E\u3059",
++                                "  -G\u3001--strip-debug               \u5727\u7E2E\u4E2D\u306B\u30C7\u30D0\u30C3\u30B0\u5C5E\u6027\u3092\u524A\u9664\u3057\u307E\u3059",
++                                "  -O\u3001--no-keep-file-order        \u30D5\u30A1\u30A4\u30EB\u306E\u9806\u5E8F\u4ED8\u3051\u60C5\u5831\u3092\u8EE2\u9001\u3057\u307E\u305B\u3093",
++                                "  --keep-file-order               (\u30C7\u30D5\u30A9\u30EB\u30C8)\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u9806\u5E8F\u4ED8\u3051\u3092\u4FDD\u6301\u3057\u307E\u3059",
++                                "  -S{N}\u3001--segment-limit={N}       \u30BB\u30B0\u30E1\u30F3\u30C8\u5236\u9650\u3092\u51FA\u529B\u3057\u307E\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8N=1Mb)",
++                                "  -E{N}\u3001--effort={N}             \u5727\u7E2E\u306E\u8A66\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8N=5)",
++                                "  -H{h}\u3001--deflate-hint={h}       \u30C7\u30D5\u30EC\u30FC\u30C8\u30FB\u30D2\u30F3\u30C8\u3092\u8EE2\u9001\u3057\u307E\u3059: true\u3001false\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
++                                "  -m{V}\u3001--modification-time={V}  \u5909\u66F4\u6642\u9593\u3092\u8EE2\u9001\u3057\u307E\u3059: latest\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
++                                "  -P{F}\u3001--pass-file={F}          \u6307\u5B9A\u3055\u308C\u305F\u5727\u7E2E\u3055\u308C\u3066\u3044\u306A\u3044\u5165\u529B\u8981\u7D20\u3092\u8EE2\u9001\u3057\u307E\u3059",
++                                "  -U{a}\u3001--unknown-attribute={a}  \u4E0D\u660E\u306E\u5C5E\u6027\u30A2\u30AF\u30B7\u30E7\u30F3: error\u3001strip\u307E\u305F\u306Fpass(\u30C7\u30D5\u30A9\u30EB\u30C8)",
++                                "  -C{N}={L}\u3001--class-attribute={N}={L}  (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
++                                "  -F{N}={L}\u3001--field-attribute={N}={L}  (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
++                                "  -M{N}={L}\u3001--method-attribute={N}={L} (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
++                                "  -D{N}={L}\u3001--code-attribute={N}={L}   (\u30E6\u30FC\u30B6\u30FC\u5B9A\u7FA9\u5C5E\u6027)",
++                                "  -f{F}\u3001--config-file={F}        Pack200.Packer\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u30D5\u30A1\u30A4\u30EBF\u3092\u8AAD\u307F\u8FBC\u307F\u307E\u3059",
++                                PARAMETER_V ,
++                                PARAMETER_Q ,
++                                PARAMETER_LF ,
++                                PARAMETER_H ,
++                                PARAMETER_VER ,
++                                PARAMETER_J,
++                                "",
++                                "\u6CE8\u610F:",
++                                "  -P\u3001-C\u3001-F\u3001-M\u304A\u3088\u3073-D\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u7D2F\u7A4D\u3055\u308C\u307E\u3059\u3002",
++                                "  \u5C5E\u6027\u5B9A\u7FA9\u306E\u4F8B:  -C SourceFile=RUH .",
++                                "  Config.\u30D5\u30A1\u30A4\u30EB\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u3001Pack200 API\u306B\u3088\u3063\u3066\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002",
++                                "  -S\u3001-E\u3001-H\u3001-m\u3001-U\u306E\u5024\u306E\u610F\u5473\u306F\u3001Pack200 API\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
++                                "  \u30EC\u30A4\u30A2\u30A6\u30C8\u5B9A\u7FA9(RUH\u306A\u3069)\u306FJSR 200\u306B\u3088\u3063\u3066\u5B9A\u7FA9\u3055\u308C\u307E\u3059\u3002",
++                                "",
++                                "\u518D\u5727\u7E2E\u30E2\u30FC\u30C9\u3067\u306F\u3001JAR\u30D5\u30A1\u30A4\u30EB\u304C\u5727\u7E2E/\u89E3\u51CD\u30B5\u30A4\u30AF\u30EB\u3067\u66F4\u65B0\u3055\u308C\u307E\u3059:",
++                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
++                                }
++                },
++                {UNPACK_HELP,new String[]{
++                                "\u4F7F\u7528\u65B9\u6CD5:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
++                                "",
++                                "\u89E3\u51CD\u30AA\u30D7\u30B7\u30E7\u30F3",
++                                "  -H{h}\u3001--deflate-hint={h}     \u8EE2\u9001\u3055\u308C\u305F\u30C7\u30D5\u30EC\u30FC\u30C8\u30FB\u30D2\u30F3\u30C8\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059: true\u3001false\u307E\u305F\u306Fkeep(\u30C7\u30D5\u30A9\u30EB\u30C8)",
++                                "  -r\u3001--remove-pack-file        \u89E3\u51CD\u5F8C\u306B\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3059",
++                                PARAMETER_V ,
++                                PARAMETER_Q ,
++                                PARAMETER_LF ,
++                                PARAMETER_H ,
++                                PARAMETER_VER ,
++                                PARAMETER_J,
++                            }
++                },
++
++                {MORE_INFO,"(\u8A73\u7D30\u306F\u3001{0} --help\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002)"},//parameter 0:command name
++                {DUPLICATE_OPTION,"\u91CD\u8907\u30AA\u30D7\u30B7\u30E7\u30F3: {0}"},//parameter 0:option
++                {BAD_SPEC,"{0}\u306E\u7121\u52B9\u306A\u4ED5\u69D8: {1}"},//parameter 0:option;parameter 1:specifier
++        };
++
++        protected Object[][] getContents() {
++                return resource;
++        }
++
++
++}
+--- ./jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource_zh_CN.java	1969-12-31 16:00:00.000000000 -0800
++++ ./jdk/src/share/classes/com/sun/java/util/jar/pack/DriverResource_zh_CN.java	2014-06-06 19:56:29.000000000 -0700
+@@ -0,0 +1,131 @@
++/*
++ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
++ * 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.java.util.jar.pack;
++
++import java.util.ListResourceBundle;
++
++public class DriverResource_zh_CN extends ListResourceBundle {
++        public static final String VERSION ="VERSION";
++        public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
++        public static final String BAD_OPTION ="BAD_OPTION";
++        public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
++        public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
++        public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
++        public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
++        public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
++        public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
++        public static final String PACK_HELP="PACK_HELP";
++        public static final String UNPACK_HELP ="UNPACK_HELP";
++        public static final String MORE_INFO = "MORE_INFO";
++        public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
++        public static final String BAD_SPEC = "BAD_SPEC";
++
++        //The following string is duplicate in PACK and UNPACK comment,which was draw out to ruduce translation work.
++        private static final String PARAMETER_V = "  -v, --verbose                   increase program verbosity";
++        private static final String PARAMETER_Q = "  -q, --quiet                     set verbosity to lowest level";
++        private static final String PARAMETER_LF = "  -l{F}, --log-file={F}           output to the given log file, or '-' for System.out";
++        private static final String PARAMETER_H = "  -?, -h, --help                  print this message";
++        private static final String PARAMETER_VER = "  -V, --version                   print program version";
++        private static final String PARAMETER_J = "  -J{X}                           pass option X to underlying Java VM";
++
++
++        //The following are outputs of command 'pack200' and 'unpack200'.
++        //Don't translate command arguments ,words with a prefix of '-' or '--'.
++        //
++        private static final Object[][] resource= {
++                {VERSION,"{0}\u7248\u672C {1}"},//parameter 0:class name;parameter 1: version value
++                {BAD_ARGUMENT,"\u9519\u8BEF\u53C2\u6570: {0}"},
++                {BAD_OPTION,"\u9519\u8BEF\u9009\u9879: {0}={1}"},//parameter 0:option name;parameter 1:option value
++                {BAD_REPACK_OUTPUT,"--repack \u8F93\u51FA\u9519\u8BEF: {0}"},//parameter 0:filename
++                {DETECTED_ZIP_COMMENT,"\u68C0\u6D4B\u5230 ZIP \u6CE8\u91CA: {0}"},//parameter 0:comment
++                {SKIP_FOR_REPACKED,"\u7531\u4E8E\u5DF2\u91CD\u65B0\u6253\u5305\u800C\u8DF3\u8FC7: {0}"},//parameter 0:filename
++                {WRITE_PACK_FILE,"\u8981\u5199\u5165 *.pack \u6587\u4EF6, \u8BF7\u6307\u5B9A --no-gzip: {0}"},//parameter 0:filename
++                {WIRTE_PACKGZ_FILE,"\u8981\u5199\u5165 *.pack.gz \u6587\u4EF6, \u8BF7\u6307\u5B9A --gzip: {0}"},//parameter 0:filename
++                {SKIP_FOR_MOVE_FAILED,"\u7531\u4E8E\u79FB\u52A8\u5931\u8D25\u800C\u8DF3\u8FC7\u91CD\u65B0\u6253\u5305: {0}"},//parameter 0:filename
++                {PACK_HELP,new String[]{
++                                "\u7528\u6CD5:  pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
++                                "",
++                                "\u6253\u5305\u9009\u9879",
++                                "  -g, --no-gzip                   \u8F93\u51FA\u65E0\u683C\u5F0F\u7684 *.pack \u6587\u4EF6, \u4E0D\u538B\u7F29",
++                                "  --gzip                          (\u9ED8\u8BA4\u503C) \u4F7F\u7528 gzip \u5BF9\u6253\u5305\u8FDB\u884C\u540E\u5904\u7406",
++                                "  -G, --strip-debug               \u6253\u5305\u65F6\u5220\u9664\u8C03\u8BD5\u5C5E\u6027",
++                                "  -O, --no-keep-file-order        \u4E0D\u4F20\u8F93\u6587\u4EF6\u6392\u5E8F\u4FE1\u606F",
++                                "  --keep-file-order               (\u9ED8\u8BA4\u503C) \u4FDD\u7559\u8F93\u5165\u6587\u4EF6\u6392\u5E8F",
++                                "  -S{N}, --segment-limit={N}      \u8F93\u51FA\u6BB5\u9650\u5236 (\u9ED8\u8BA4\u503C N=1Mb)",
++                                "  -E{N}, --effort={N}             \u6253\u5305\u6548\u679C (\u9ED8\u8BA4\u503C N=5)",
++                                "  -H{h}, --deflate-hint={h}       \u4F20\u8F93\u538B\u7F29\u63D0\u793A: true, false \u6216 keep (\u9ED8\u8BA4\u503C)",
++                                "  -m{V}, --modification-time={V}  \u4F20\u8F93 modtimes: latest \u6216 keep (\u9ED8\u8BA4\u503C)",
++                                "  -P{F}, --pass-file={F}          \u4F20\u8F93\u672A\u89E3\u538B\u7F29\u7684\u7ED9\u5B9A\u8F93\u5165\u5143\u7D20",
++                                "  -U{a}, --unknown-attribute={a}  \u672A\u77E5\u5C5E\u6027\u64CD\u4F5C: error, strip \u6216 pass (\u9ED8\u8BA4\u503C)",
++                                "  -C{N}={L}, --class-attribute={N}={L}  (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
++                                "  -F{N}={L}, --field-attribute={N}={L}  (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
++                                "  -M{N}={L}, --method-attribute={N}={L} (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
++                                "  -D{N}={L}, --code-attribute={N}={L}   (\u7528\u6237\u5B9A\u4E49\u7684\u5C5E\u6027)",
++                                "  -f{F}, --config-file={F}        \u8BFB\u53D6\u6587\u4EF6 F \u7684 Pack200.Packer \u5C5E\u6027",
++                                PARAMETER_V ,
++                                PARAMETER_Q ,
++                                PARAMETER_LF ,
++                                PARAMETER_H ,
++                                PARAMETER_VER ,
++                                PARAMETER_J,
++                                "",
++                                "\u6CE8:",
++                                "  -P, -C, -F, -M \u548C -D \u9009\u9879\u7D2F\u8BA1\u3002",
++                                "  \u793A\u4F8B\u5C5E\u6027\u5B9A\u4E49:  -C SourceFile=RUH\u3002",
++                                "  Config. \u6587\u4EF6\u5C5E\u6027\u7531 Pack200 API \u5B9A\u4E49\u3002",
++                                "  \u6709\u5173 -S, -E, -H-, -m, -U \u503C\u7684\u542B\u4E49, \u8BF7\u53C2\u9605 Pack200 API\u3002",
++                                "  \u5E03\u5C40\u5B9A\u4E49 (\u4F8B\u5982 RUH) \u7531 JSR 200 \u5B9A\u4E49\u3002",
++                                "",
++                                "\u91CD\u65B0\u6253\u5305\u6A21\u5F0F\u901A\u8FC7\u6253\u5305/\u89E3\u5305\u5468\u671F\u66F4\u65B0 JAR \u6587\u4EF6:",
++                                "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
++                                }
++                },
++                {UNPACK_HELP,new String[]{
++                                "\u7528\u6CD5:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
++                                "",
++                                "\u89E3\u5305\u9009\u9879",
++                                "  -H{h}, --deflate-hint={h}     \u8986\u76D6\u5DF2\u4F20\u8F93\u7684\u538B\u7F29\u63D0\u793A: true, false \u6216 keep (\u9ED8\u8BA4\u503C)",
++                                "  -r, --remove-pack-file        \u89E3\u5305\u4E4B\u540E\u5220\u9664\u8F93\u5165\u6587\u4EF6",
++                                PARAMETER_V ,
++                                PARAMETER_Q ,
++                                PARAMETER_LF ,
++                                PARAMETER_H ,
++                                PARAMETER_VER ,
++                                PARAMETER_J,
++                            }
++                },
++
++                {MORE_INFO,"(\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u8FD0\u884C {0} --help\u3002)"},//parameter 0:command name
++                {DUPLICATE_OPTION,"\u91CD\u590D\u7684\u9009\u9879: {0}"},//parameter 0:option
++                {BAD_SPEC,"{0}\u7684\u89C4\u8303\u9519\u8BEF: {1}"},//parameter 0:option;parameter 1:specifier
++        };
++
++        protected Object[][] getContents() {
++                return resource;
++        }
++
++
++}
+--- ./jdk/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	2013-09-06 11:27:56.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/remote/protocol/iiop/IIOPProxyImpl.java	2013-12-01 11:14:38.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
@@ -29578,8 +55111,8 @@
 +        }
      }
  }
---- jdk/src/share/classes/com/sun/jmx/remote/security/SubjectDelegator.java	2013-09-06 11:27:56.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/remote/security/SubjectDelegator.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/remote/security/SubjectDelegator.java	2013-09-06 11:27:56.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/remote/security/SubjectDelegator.java	2014-04-19 01:27:12.000000000 -0700
 @@ -35,6 +35,8 @@
  import javax.management.remote.SubjectDelegationPermission;
  
@@ -29627,8 +55160,8 @@
                          AccessController.checkPermission(sdp);
                      }
                      return null;
---- jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	2013-09-06 11:27:57.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	2013-09-06 11:27:57.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	2014-01-18 12:16:22.000000000 -0800
 @@ -27,17 +27,9 @@
  
  // java imports
@@ -29657,8 +55190,8 @@
      }
  
      /**
---- jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	2013-09-06 11:27:57.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	2013-09-06 11:27:57.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	2014-01-18 12:16:22.000000000 -0800
 @@ -116,7 +116,7 @@
      public void validateVarId(long arc, Object userData)
          throws SnmpStatusException {
@@ -29724,8 +55257,8 @@
  
          } catch (SnmpStatusException e) {
              // We didn't find anything at the given arc, so we're going
---- jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	2013-09-06 11:27:57.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	2013-09-06 11:27:57.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	2014-01-18 12:16:22.000000000 -0800
 @@ -155,7 +155,7 @@
                            long[] oid, int depth,
                            SnmpRequestTree handlers)
@@ -29782,8 +55315,8 @@
 -    static final protected SnmpStatusException noSuchNameException =
 -        new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName);
  }
---- jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	2013-09-06 11:27:57.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	2013-09-06 11:27:57.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	2014-01-18 12:16:22.000000000 -0800
 @@ -157,11 +157,11 @@
  
          if (depth > length) {
@@ -29842,8 +55375,8 @@
          return child;
      }
  
---- jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	2013-09-06 11:27:57.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	2013-09-06 11:27:57.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	2014-01-18 12:16:22.000000000 -0800
 @@ -279,7 +279,7 @@
              SnmpVarBind     var = null;
              for (Enumeration e= r.getElements(); e.hasMoreElements();) {
@@ -29973,8 +55506,8 @@
  
      }
  
---- jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	2013-09-06 11:27:58.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	2013-09-06 11:27:58.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	2014-01-18 12:16:22.000000000 -0800
 @@ -1146,7 +1146,4 @@
  
      static final private String InterruptSysCallMsg =
@@ -29983,8 +55516,8 @@
 -    static final private SnmpStatusException noSuchNameException =
 -        new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName) ;
  }
---- jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	2013-09-06 11:27:58.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	2013-09-06 11:27:58.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -30192,8 +55725,8 @@
                  resps.put(hdr.xid, pkt);
              }
          }
---- jdk/src/share/classes/com/sun/jndi/ldap/LdapBindingEnumeration.java	2013-09-06 11:27:58.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jndi/ldap/LdapBindingEnumeration.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jndi/ldap/LdapBindingEnumeration.java	2013-09-06 11:27:58.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jndi/ldap/LdapBindingEnumeration.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
@@ -30248,8 +55781,8 @@
          }
          if (obj == null) {
              // DirContext object
---- jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	2013-09-06 11:27:58.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	2013-09-06 11:27:58.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
@@ -30305,8 +55838,8 @@
              }
              if (obj == null) {
                  obj = new LdapCtx(homeCtx, dn);
---- jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	2013-09-06 11:27:58.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	2013-09-06 11:27:58.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	2013-12-01 11:14:38.000000000 -0800
 @@ -25,11 +25,12 @@
  
  package com.sun.jndi.ldap;
@@ -30343,8 +55876,8 @@
          );
      }
  }
---- jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	2013-09-06 11:27:59.000000000 -0700
-+++ jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	2013-09-06 11:27:59.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java	2013-12-01 11:14:38.000000000 -0800
 @@ -66,6 +66,11 @@
       *                     cannot be created, opened, or written to.
       * @throws UnsupportedOperationException if this operation is not supported.
@@ -30357,8 +55890,8 @@
       */
      public void dumpHeap(String outputFile, boolean live) throws java.io.IOException;
  
---- jdk/src/share/classes/com/sun/media/sound/JDK13Services.java	2013-09-06 11:27:59.000000000 -0700
-+++ jdk/src/share/classes/com/sun/media/sound/JDK13Services.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/media/sound/JDK13Services.java	2013-09-06 11:27:59.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/media/sound/JDK13Services.java	2014-04-19 01:27:12.000000000 -0700
 @@ -25,27 +25,33 @@
  
  package com.sun.media.sound;
@@ -30533,8 +56066,8 @@
 -        public List providers;
 -    }
  }
---- jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java	2013-09-06 11:27:59.000000000 -0700
-+++ jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java	2013-09-06 11:27:59.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java	2014-04-19 01:27:12.000000000 -0700
 @@ -187,7 +187,7 @@
          return thread;
      }
@@ -30544,8 +56077,8 @@
          List p = new ArrayList();
          // Service.providers(Class) just creates "lazy" iterator instance,
          // so it doesn't require do be called from privileged section
---- jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java	2014-01-18 12:16:22.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
@@ -30592,8 +56125,8 @@
                  }
                  // Instantiate Class to get factory
                  answer = ((Class) answer).newInstance();
---- jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java	2014-04-19 01:27:12.000000000 -0700
 @@ -69,6 +69,14 @@
      private static final String JRELIB_PROPERTY_FILE_NAME = "jndi.properties";
  
@@ -30623,8 +56156,8 @@
          // Merge the above with the values read from all application
          // resource files.  Colon-separated lists are concatenated.
          mergeTables(env, getApplicationResources());
---- jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	2014-01-18 12:16:23.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
@@ -30740,8 +56273,8 @@
      /**
       * Given an enumeration of URLs, an instance of this class represents
       * an enumeration of their InputStreams.  Each operation on the URL
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	2014-01-18 12:16:23.000000000 -0800
 @@ -358,7 +358,8 @@
              } else if (!isVisible(xmlns)) {
                  // There is a defn but the xmlns is not selected by the xpath.
@@ -30752,8 +56285,8 @@
              }
              // output the xmlns def if needed.
              if (n != null) {
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	2014-01-18 12:16:23.000000000 -0800
 @@ -302,7 +302,8 @@
          } else if ( !isVisible(xmlns)) {
                  //There is a definition but the xmlns is not selected by the xpath.
@@ -30764,8 +56297,8 @@
          }
          //output the xmlns def if needed.
          if (n!=null) {
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	2014-01-18 12:16:23.000000000 -0800
 @@ -300,7 +300,7 @@
             if ((xmlns!=null) &&  (!isVisible(xmlns))) {
                //There is a definition but the xmlns is not selected by the xpath.
@@ -30775,8 +56308,8 @@
              }
  
                          if (E.getNamespaceURI() != null) {
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	2013-09-06 11:28:00.000000000 -0700
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	2013-09-06 11:28:00.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	2014-01-18 12:16:23.000000000 -0800
 @@ -34,7 +34,6 @@
  import java.util.Map;
  import java.util.Set;
@@ -31042,8 +56575,8 @@
 +    }
 +
  }
---- jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	2013-09-06 11:28:02.000000000 -0700
-+++ jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	2014-04-20 12:39:21.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java	2013-12-01 11:14:38.000000000 -0800
 @@ -44,6 +44,9 @@
      }
  
@@ -31087,8 +56620,8 @@
          }
          byte newBuf[] = new byte[newSize];
          System.arraycopy(buf, 0, newBuf, 0, pos);
---- jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	2013-09-06 11:28:02.000000000 -0700
-+++ jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
@@ -31138,8 +56671,41 @@
                  }
                  // get the attributes from the struct
                  Object attribs[] = s.getAttributes(map);
---- jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	2013-09-06 11:28:02.000000000 -0700
-+++ jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_de.properties	2014-06-06 19:56:29.000000000 -0700
+@@ -140,7 +140,7 @@
+ #WebRowSetXmlReader exception
+ wrsxmlreader.invalidcp = Ende von RowSet wurde erreicht. Ung\u00FCltige Cursorposition
+ wrsxmlreader.readxml = readXML: {0}
+-wrsxmlreader.parseerr = ** Parsing-Fehler: {0}, Zeile: {1} , URI: {2}
++wrsxmlreader.parseerr = ** Parsingfehler: {0}, Zeile: {1} , URI: {2}
+ 
+ #WebRowSetXmlWriter exceptions
+ wrsxmlwriter.ioex = IOException: {0}
+--- ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_ja.properties	2014-06-06 19:56:29.000000000 -0700
+@@ -51,8 +51,8 @@
+ cachedrowsetimpl.last = last: TYPE_FORWARD_ONLY
+ cachedrowsetimpl.absolute = absolute: \u7121\u52B9\u306A\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E
+ cachedrowsetimpl.relative = relative: \u7121\u52B9\u306A\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E
+-cachedrowsetimpl.asciistream = ascii\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+-cachedrowsetimpl.binstream = \u30D0\u30A4\u30CA\u30EA\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F
++cachedrowsetimpl.asciistream = ascii\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u304C\u5931\u6557\u3057\u307E\u3057\u305F
++cachedrowsetimpl.binstream = \u30D0\u30A4\u30CA\u30EA\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u8AAD\u8FBC\u307F\u304C\u5931\u6557\u3057\u307E\u3057\u305F
+ cachedrowsetimpl.failedins = \u884C\u306E\u633F\u5165\u306B\u5931\u6557
+ cachedrowsetimpl.updateins = \u633F\u5165\u884C\u306B\u304A\u3044\u3066updateRow\u304C\u547C\u3073\u51FA\u3055\u308C\u307E\u3057\u305F
+ cachedrowsetimpl.movetoins = moveToInsertRow: CONCUR_READ_ONLY
+@@ -101,7 +101,7 @@
+ 
+ #JdbcRowSetImpl exceptions
+ jdbcrowsetimpl.invalstate = \u7121\u52B9\u306A\u72B6\u614B
+-jdbcrowsetimpl.connect = JdbcRowSet(connect): JNDI\u304C\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093
++jdbcrowsetimpl.connect = JdbcRowSet (connect): JNDI\u304C\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093
+ jdbcrowsetimpl.paramtype = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093
+ jdbcrowsetimpl.matchcols = \u4E00\u81F4\u5217\u304C\u5217\u306E\u30BB\u30C3\u30C8\u3068\u540C\u3058\u3067\u306F\u3042\u308A\u307E\u305B\u3093
+ jdbcrowsetimpl.setmatchcols = \u4E00\u81F4\u5217\u3092\u53D6\u5F97\u3059\u308B\u524D\u306B\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
+--- ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	2014-01-18 12:16:23.000000000 -0800
 @@ -44,7 +44,7 @@
  cachedrowsetimpl.dtypemismt = \uB370\uC774\uD130 \uC720\uD615\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 
  cachedrowsetimpl.datefail = {1} \uC5F4\uC758 \uAC12({0})\uC5D0\uC11C getDate\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
@@ -31167,8 +56733,43 @@
  xmlrch.chars = \uBB38\uC790:
  xmlrch.badvalue = \uC798\uBABB\uB41C \uAC12: \uB110\uC77C \uC218 \uC5C6\uB294 \uC18D\uC131\uC785\uB2C8\uB2E4.
  xmlrch.badvalue1 = \uC798\uBABB\uB41C \uAC12: \uB110\uC77C \uC218 \uC5C6\uB294 \uBA54\uD0C0 \uB370\uC774\uD130\uC785\uB2C8\uB2E4.
---- jdk/src/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	2013-09-06 11:28:02.000000000 -0700
-+++ jdk/src/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	2014-06-06 19:56:29.000000000 -0700
+@@ -29,11 +29,11 @@
+ cachedrowsetimpl.nullhash = Kan inte instansiera CachedRowSetImpl. Null-hashtabell skickades till konstruktor
+ cachedrowsetimpl.invalidop = En ogiltig \u00E5tg\u00E4rd utf\u00F6rdes p\u00E5 infogad rad
+ cachedrowsetimpl.accfailed = acceptChanges utf\u00F6rdes inte
+-cachedrowsetimpl.invalidcp = Mark\u00F6rpositionen \u00E4r ogiltig
++cachedrowsetimpl.invalidcp = Ogiltigt mark\u00F6rl\u00E4ge
+ cachedrowsetimpl.illegalop = En otill\u00E5ten \u00E5tg\u00E4rd utf\u00F6rdes p\u00E5 en icke infogad rad
+ cachedrowsetimpl.clonefail = Kloningen utf\u00F6rdes inte: {0}
+-cachedrowsetimpl.invalidcol = Kolumnindexet \u00E4r ogiltigt
+-cachedrowsetimpl.invalcolnm = Kolumnnamnet \u00E4r ogiltigt
++cachedrowsetimpl.invalidcol = Ogiltigt kolumnindex
++cachedrowsetimpl.invalcolnm = Ogiltigt kolumnnamn
+ cachedrowsetimpl.boolfail = getBoolen utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
+ cachedrowsetimpl.bytefail = getByte utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
+ cachedrowsetimpl.shortfail = getShort utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
+@@ -60,7 +60,7 @@
+ cachedrowsetimpl.movetoins2 = moveToInsertRow: ogiltigt antal kolumner
+ cachedrowsetimpl.tablename = Tabellnamnet kan inte vara null
+ cachedrowsetimpl.keycols = Ogiltiga nyckelkolumner
+-cachedrowsetimpl.invalidcol = Kolumnindexet \u00E4r ogiltigt
++cachedrowsetimpl.invalidcol = Ogiltigt kolumnindex
+ cachedrowsetimpl.opnotsupp = Databasen har inte st\u00F6d f\u00F6r denna \u00E5tg\u00E4rd
+ cachedrowsetimpl.matchcols = Matchningskolumnerna \u00E4r inte samma som de som st\u00E4llts in
+ cachedrowsetimpl.setmatchcols = St\u00E4ll in matchningskolumnerna innan du h\u00E4mtar dem
+@@ -81,7 +81,7 @@
+ 
+ # WebRowSetImpl exceptions
+ webrowsetimpl.nullhash = Kan inte instansiera WebRowSetImpl. Null-hashtabell skickades till konstruktor.
+-webrowsetimpl.invalidwr = Ogiltig f\u00F6rfattare
++webrowsetimpl.invalidwr = Ogiltig skrivfunktion
+ webrowsetimpl.invalidrd = Ogiltig l\u00E4sare
+ 
+ #FilteredRowSetImpl exceptions
+--- ./jdk/src/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	2014-04-19 01:27:12.000000000 -0700
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -31201,8 +56802,8 @@
                          }
                          // get the attributes from the struct
                          Object attribs[] = s.getAttributes(map);
---- jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java	2013-09-06 11:28:02.000000000 -0700
-+++ jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java	2014-01-18 12:16:23.000000000 -0800
 @@ -1,5 +1,5 @@
  /*
 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -31219,8 +56820,8 @@
  
                          }catch(ClassNotFoundException ex) {
                            throw new SAXException(MessageFormat.format(resBundle.handleGetObject("xmlrch.errmap").toString(), ex.getMessage()));
---- jdk/src/share/classes/com/sun/script/util/InterfaceImplementor.java	2013-09-06 11:28:02.000000000 -0700
-+++ jdk/src/share/classes/com/sun/script/util/InterfaceImplementor.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/script/util/InterfaceImplementor.java	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/script/util/InterfaceImplementor.java	2013-12-01 11:14:27.000000000 -0800
 @@ -28,6 +28,7 @@
  import javax.script.*;
  import java.lang.reflect.*;
@@ -31270,8 +56871,62 @@
 +        return loader;
 +    }
  }
---- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	2013-09-06 11:28:03.000000000 -0700
-+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	2013-09-06 11:28:02.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	2014-06-06 19:56:29.000000000 -0700
+@@ -875,8 +875,7 @@
+                 char[] tmpPassword = ((PasswordCallback)
+                                       callbacks[0]).getPassword();
+                 if (tmpPassword == null) {
+-                    // treat a NULL password as an empty password
+-                    tmpPassword = new char[0];
++                    throw new LoginException("No password provided");
+                 }
+                 password = new char[tmpPassword.length];
+                 System.arraycopy(tmpPassword, 0,
+--- ./jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	2013-09-06 11:28:03.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	2014-06-06 19:56:29.000000000 -0700
+@@ -252,11 +252,12 @@
+ 
+ 
+     /**
+-     * Outputs a byte array and converts
++     * Outputs a byte array. Can be null.
+      */
+     protected static final void traceOutput(String srcClass, String srcMethod,
+         String traceTag, byte[] output) {
+-        traceOutput(srcClass, srcMethod, traceTag, output, 0, output.length);
++        traceOutput(srcClass, srcMethod, traceTag, output, 0,
++                output == null ? 0 : output.length);
+     }
+ 
+     protected static final void traceOutput(String srcClass, String srcMethod,
+@@ -272,13 +273,20 @@
+                 lev = Level.FINEST;
+             }
+ 
+-            ByteArrayOutputStream out = new ByteArrayOutputStream(len);
+-            new HexDumpEncoder().encodeBuffer(
+-                new ByteArrayInputStream(output, offset, len), out);
++            String content;
++
++            if (output != null) {
++                ByteArrayOutputStream out = new ByteArrayOutputStream(len);
++                new HexDumpEncoder().encodeBuffer(
++                    new ByteArrayInputStream(output, offset, len), out);
++                content = out.toString();
++            } else {
++                content = "NULL";
++            }
+ 
+             // Message id supplied by caller as part of traceTag
+             logger.logp(lev, srcClass, srcMethod, "{0} ( {1} ): {2}",
+-                new Object[] {traceTag, new Integer(origlen), out.toString()});
++                new Object[] {traceTag, new Integer(origlen), content});
+         } catch (Exception e) {
+             logger.logp(Level.WARNING, srcClass, srcMethod,
+                 "SASLIMPL09:Error generating trace output: {0}", e);
+--- ./jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	2013-09-06 11:28:03.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties	2014-01-18 12:16:23.000000000 -0800
 @@ -46,7 +46,7 @@
  FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30(&O)
  FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
@@ -31290,8 +56945,21 @@
  FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0
  FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uB514\uB809\uD1A0\uB9AC \uC5F4\uAE30
  
---- jdk/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	2013-09-06 11:28:03.000000000 -0700
-+++ jdk/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	2013-09-06 11:28:03.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	2014-06-06 19:56:29.000000000 -0700
+@@ -25,8 +25,8 @@
+ FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier :
+ FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
+ FileChooser.upFolderAccessibleName=Monter
+-FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
+-FileChooser.homeFolderAccessibleName=R\u00E9pertoire d'origine
++FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire de base
++FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
+ FileChooser.newFolderToolTip.textAndMnemonic=Cr\u00E9e un dossier.
+ FileChooser.newFolderAccessibleName=Nouveau dossier
+ FileChooser.newFolderActionLabel.textAndMnemonic=Nouveau dossier
+--- ./jdk/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	2013-09-06 11:28:03.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	2014-01-18 12:16:23.000000000 -0800
 @@ -20,8 +20,8 @@
  
  FileChooser.lookInLabel.textAndMnemonic=Leta &i:
@@ -31303,8 +56971,21 @@
  FileChooser.filesOfTypeLabel.textAndMnemonic=Mapp&namn:
  FileChooser.upFolderToolTip.textAndMnemonic=Upp en niv\u00E5
  FileChooser.upFolderAccessibleName=Upp
---- jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	2013-09-06 11:28:04.000000000 -0700
-+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	2014-04-20 12:39:22.000000000 -0700
+--- ./jdk/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_fr.properties	2013-09-06 11:28:03.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_fr.properties	2014-06-06 19:56:29.000000000 -0700
+@@ -25,8 +25,8 @@
+ FileChooser.filesOfTypeLabel.textAndMnemonic=&Type de fichier :
+ FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
+ FileChooser.upFolderAccessibleName=Monter
+-FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
+-FileChooser.homeFolderAccessibleName=R\u00E9pertoire d'origine
++FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire de base
++FileChooser.homeFolderAccessibleName=R\u00E9pertoire de base
+ FileChooser.newFolderToolTip.textAndMnemonic=Cr\u00E9e un dossier.
+ FileChooser.newFolderAccessibleName=Nouveau dossier
+ FileChooser.newFolderActionLabel.textAndMnemonic=Nouveau dossier
+--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	2013-09-06 11:28:04.000000000 -0700
++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	2013-12-01 11:14:27.000000000 -0800
 @@ -84,7 +84,7 @@
              lastPackage = pkg;
              printClass(clazz);
@@ -31314,8 +56995,8 @@
              }
              out.println("
"); } ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java 2013-12-01 11:14:27.000000000 -0800 @@ -112,12 +112,12 @@ out.println("

Instances

"); @@ -31354,8 +57035,8 @@ out.print("\">"); out.println("References summary by type"); ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/HttpReader.java 2013-12-01 11:14:27.000000000 -0800 @@ -41,21 +41,17 @@ @@ -31397,8 +57078,8 @@ out.println(""); } ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java 2013-12-01 11:14:27.000000000 -0800 @@ -102,7 +102,7 @@ int count = clazz.getInstancesCount(false); print("" + count); @@ -31417,8 +57098,8 @@ out.print("\">"); print("" + newInst + " new"); out.print(") "); ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java 2013-12-01 11:14:27.000000000 -0800 @@ -54,10 +54,7 @@ out.print((char)ch); } @@ -31431,8 +57112,8 @@ } } } ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java 2013-12-01 11:14:27.000000000 -0800 @@ -32,10 +32,7 @@ package com.sun.tools.hat.internal.server; @@ -31477,8 +57158,8 @@ } } ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java 2013-12-01 11:14:27.000000000 -0800 @@ -36,6 +36,7 @@ import com.sun.tools.hat.internal.model.*; @@ -31529,8 +57210,8 @@ + out.println(Misc.encodeHtml(str)); + } } ---- jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java 2013-09-06 11:28:04.000000000 -0700 -+++ jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java 2013-09-06 11:28:04.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java 2013-12-01 11:14:27.000000000 -0800 @@ -89,7 +89,7 @@ out.println("

"); printClass(clazz); @@ -31552,8 +57233,71 @@ out.println(""); out.println(""); out.println(map.get(clazz)); ---- jdk/src/share/classes/java/awt/EventQueue.java 2013-09-06 11:28:05.000000000 -0700 -+++ jdk/src/share/classes/java/awt/EventQueue.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/com/sun/tools/jdi/resources/jdi_ja.properties 2013-09-06 11:28:05.000000000 -0700 ++++ ./jdk/src/share/classes/com/sun/tools/jdi/resources/jdi_ja.properties 2014-06-06 19:56:29.000000000 -0700 +@@ -47,6 +47,6 @@ + memory_listening.name = VM\u3078\u306E\u63A5\u7D9A\u3092\u30EA\u30B9\u30CB\u30F3\u30B0\u3059\u308B\u305F\u3081\u306E\u5171\u6709\u30E1\u30E2\u30EA\u30FC\u9818\u57DF\u540D + memory_listening.name.label = \u540D\u524D + memory_listening.description = \u305D\u306E\u4ED6\u306EVM\u306B\u3088\u308A\u958B\u59CB\u3055\u308C\u308B\u5171\u6709\u30E1\u30E2\u30EA\u30FC\u63A5\u7D9A\u3092\u53D7\u3051\u5165\u308C\u307E\u3059 +-process_attaching.description = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9\u306B\u30D7\u30ED\u30BB\u30B9ID(pid)\u3092\u4F7F\u7528\u3057\u3066\u63A5\u7D9A\u3057\u307E\u3059 ++process_attaching.description = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9\u306B\u30D7\u30ED\u30BB\u30B9ID (pid)\u3092\u4F7F\u7528\u3057\u3066\u63A5\u7D9A\u3057\u307E\u3059 + process_attaching.pid = pid +-process_attaching.pid.label = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9ID(pid) ++process_attaching.pid.label = \u30C7\u30D0\u30C3\u30B0\u3059\u308B\u30D7\u30ED\u30BB\u30B9ID (pid) +--- ./jdk/src/share/classes/java/awt/AWTException.java 2013-09-06 11:28:05.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/AWTException.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 +26,7 @@ + + + /** +- * Signals that an Absract Window Toolkit exception has occurred. ++ * Signals that an Abstract Window Toolkit exception has occurred. + * + * @author Arthur van Hoff + */ +--- ./jdk/src/share/classes/java/awt/Component.java 2013-09-06 11:28:05.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/Component.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -972,6 +972,10 @@ + public AccessControlContext getAccessControlContext(Component comp) { + return comp.getAccessControlContext(); + } ++ ++ public void revalidateSynchronously(Component comp) { ++ comp.revalidateSynchronously(); ++ } + }); + } + +@@ -2963,6 +2967,13 @@ + * @since 1.7 + */ + public void revalidate() { ++ revalidateSynchronously(); ++ } ++ ++ /** ++ * Revalidates the component synchronously. ++ */ ++ final void revalidateSynchronously() { + synchronized (getTreeLock()) { + invalidate(); + +--- ./jdk/src/share/classes/java/awt/EventQueue.java 2013-09-06 11:28:05.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/EventQueue.java 2014-04-19 01:27:12.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. @@ -31585,8 +57329,76 @@ if (prev == null) { queues[i].head = entry.next; } else { ---- jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java 2013-09-06 11:28:06.000000000 -0700 -+++ jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/awt/Toolkit.java 2013-09-06 11:28:06.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/Toolkit.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + import sun.awt.NullComponentPeer; + import sun.awt.PeerEvent; + import sun.awt.SunToolkit; ++import sun.awt.AWTAccessor; + import sun.security.util.SecurityConstants; + + import sun.util.CoreResourceBundleControl; +@@ -1607,6 +1608,12 @@ + * here, so that only one copy is maintained. + */ + private static ResourceBundle resources; ++ private static ResourceBundle platformResources; ++ ++ // called by platform toolkit ++ private static void setPlatformResources(ResourceBundle bundle) { ++ platformResources = bundle; ++ } + + /** + * Initialize JNI field and method ids +@@ -1650,6 +1657,13 @@ + } + + static { ++ AWTAccessor.setToolkitAccessor( ++ new AWTAccessor.ToolkitAccessor() { ++ @Override ++ public void setPlatformResources(ResourceBundle bundle) { ++ Toolkit.setPlatformResources(bundle); ++ } ++ }); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Object run() { +@@ -1677,6 +1691,14 @@ + * This method returns defaultValue if the property is not found. + */ + public static String getProperty(String key, String defaultValue) { ++ // first try platform specific bundle ++ if (platformResources != null) { ++ try { ++ return platformResources.getString(key); ++ } catch (MissingResourceException e) {} ++ } ++ ++ // then shared one + if (resources != null) { + try { + return resources.getString(key); +@@ -2544,7 +2566,7 @@ + Runnable updater = new Runnable() { + public void run() { + PropertyChangeSupport pcs = (PropertyChangeSupport) +- AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY); ++ AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY); + if (null != pcs) { + pcs.firePropertyChange(evt); + } +--- ./jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java 2013-09-06 11:28:06.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java 2013-12-01 11:14:27.000000000 -0800 @@ -25,12 +25,14 @@ package java.awt.datatransfer; @@ -31655,8 +57467,8 @@ } /* ---- jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java 2013-09-06 11:28:06.000000000 -0700 -+++ jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java 2013-09-06 11:28:06.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java 2014-04-19 01:27:12.000000000 -0700 @@ -45,8 +45,8 @@ import java.util.List; import java.util.Map; @@ -31758,8 +57570,8 @@ if (flavormapURL != null) { try { parseAndStoreReader(flavormapURL); ---- jdk/src/share/classes/java/awt/event/InvocationEvent.java 2013-09-06 11:28:07.000000000 -0700 -+++ jdk/src/share/classes/java/awt/event/InvocationEvent.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/awt/event/InvocationEvent.java 2013-09-06 11:28:07.000000000 -0700 ++++ ./jdk/src/share/classes/java/awt/event/InvocationEvent.java 2014-04-19 01:27:13.000000000 -0700 @@ -25,6 +25,8 @@ package java.awt.event; @@ -31916,8 +57728,8 @@ * Returns a parameter string identifying this event. * This method is useful for event-logging and for debugging. * ---- jdk/src/share/classes/java/beans/Beans.java 2013-09-06 11:28:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/Beans.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/beans/Beans.java 2013-09-06 11:28:08.000000000 -0700 ++++ ./jdk/src/share/classes/java/beans/Beans.java 2013-12-01 11:14:27.000000000 -0800 @@ -42,6 +42,8 @@ import java.io.ObjectStreamClass; import java.io.StreamCorruptedException; @@ -31938,8 +57750,8 @@ /* * Try to instantiate the class. */ ---- jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java 2013-09-06 11:28:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java 2013-09-06 11:28:08.000000000 -0700 ++++ ./jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java 2013-12-01 11:14:27.000000000 -0800 @@ -220,6 +220,9 @@ // Write out the properties of this instance. private void initBean(Class type, Object oldInstance, Object newInstance, Encoder out) { @@ -31950,8 +57762,8 @@ int mod = field.getModifiers(); if (Modifier.isFinal(mod) || Modifier.isStatic(mod) || Modifier.isTransient(mod)) { continue; ---- jdk/src/share/classes/java/beans/MetaData.java 2013-09-06 11:28:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/MetaData.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/beans/MetaData.java 2013-09-06 11:28:08.000000000 -0700 ++++ ./jdk/src/share/classes/java/beans/MetaData.java 2013-12-01 11:14:27.000000000 -0800 @@ -42,6 +42,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -31992,8 +57804,8 @@ } } } ---- jdk/src/share/classes/java/beans/ThreadGroupContext.java 2013-09-06 11:28:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/ThreadGroupContext.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/beans/ThreadGroupContext.java 2013-09-06 11:28:08.000000000 -0700 ++++ ./jdk/src/share/classes/java/beans/ThreadGroupContext.java 2014-01-18 12:16:24.000000000 -0800 @@ -41,24 +41,20 @@ */ final class ThreadGroupContext { @@ -32026,8 +57838,8 @@ } private volatile boolean isDesignTime; ---- jdk/src/share/classes/java/beans/WeakIdentityMap.java 2013-09-06 11:28:08.000000000 -0700 -+++ jdk/src/share/classes/java/beans/WeakIdentityMap.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/beans/WeakIdentityMap.java 2013-09-06 11:28:08.000000000 -0700 ++++ ./jdk/src/share/classes/java/beans/WeakIdentityMap.java 2014-01-18 12:16:24.000000000 -0800 @@ -33,18 +33,22 @@ * and reference-equality in place of object-equality to compare them. * An entry will automatically be removed when its key is no longer @@ -32205,8 +58017,8 @@ Entry(Object key, int hash, T value, ReferenceQueue queue, Entry next) { super(key, queue); ---- jdk/src/share/classes/java/io/File.java 2013-09-06 11:28:09.000000000 -0700 -+++ jdk/src/share/classes/java/io/File.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/io/File.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/io/File.java 2013-12-01 11:14:28.000000000 -0800 @@ -1885,10 +1885,18 @@ } else { n = Math.abs(n); @@ -32228,8 +58040,8 @@ return f; } } ---- jdk/src/share/classes/java/io/ObjectInputStream.java 2013-09-06 11:28:09.000000000 -0700 -+++ jdk/src/share/classes/java/io/ObjectInputStream.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/io/ObjectInputStream.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/io/ObjectInputStream.java 2013-12-01 11:14:28.000000000 -0800 @@ -490,11 +490,12 @@ public void defaultReadObject() throws IOException, ClassNotFoundException @@ -32270,8 +58082,8 @@ Class cl = desc.forClass(); if (cl != null && obj != null && !cl.isInstance(obj)) { throw new ClassCastException(); ---- jdk/src/share/classes/java/io/ObjectOutputStream.java 2013-09-06 11:28:09.000000000 -0700 -+++ jdk/src/share/classes/java/io/ObjectOutputStream.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/io/ObjectOutputStream.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/io/ObjectOutputStream.java 2013-12-01 11:14:28.000000000 -0800 @@ -430,11 +430,12 @@ * OutputStream */ @@ -32317,8 +58129,28 @@ desc.checkDefaultSerialize(); int primDataSize = desc.getPrimDataSize(); ---- jdk/src/share/classes/java/lang/Class.java 2013-09-06 11:28:09.000000000 -0700 -+++ jdk/src/share/classes/java/lang/Class.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/AbstractStringBuilder.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/AbstractStringBuilder.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1273,7 +1273,7 @@ + * specified substring, starting at the specified index. The integer + * returned is the smallest value k for which: + *
+-     *     k >= Math.min(fromIndex, str.length()) &&
++     *     k >= Math.min(fromIndex, this.length()) &&
+      *                   this.toString().startsWith(str, k)
+      * 
+ * If no such value of k exists, then -1 is returned. +@@ -1317,7 +1317,7 @@ + * specified substring. The integer returned is the largest value k + * such that: + *
+-     *     k <= Math.min(fromIndex, str.length()) &&
++     *     k <= Math.min(fromIndex, this.length()) &&
+      *                   this.toString().startsWith(str, k)
+      * 
+ * If no such value of k exists, then -1 is returned. +--- ./jdk/src/share/classes/java/lang/Class.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/Class.java 2014-06-06 19:56:29.000000000 -0700 @@ -1096,7 +1096,17 @@ * @return the declaring class for this class * @since JDK1.1 @@ -32338,8 +58170,67 @@ /** ---- jdk/src/share/classes/java/lang/ClassLoader.java 2013-09-06 11:28:09.000000000 -0700 -+++ jdk/src/share/classes/java/lang/ClassLoader.java 2014-04-20 12:39:18.000000000 -0700 +@@ -2197,14 +2207,53 @@ + */ + static native Class getPrimitiveClass(String name); + +- private static boolean isCheckMemberAccessOverridden(SecurityManager smgr) { +- if (smgr.getClass() == SecurityManager.class) return false; ++ private static class SecurityManagerHelper { ++ final SecurityManager sm; ++ final boolean overrideCheckMemberAccess; ++ SecurityManagerHelper(SecurityManager sm) { ++ this.sm = sm; ++ ++ boolean overridden = false; ++ if (sm.getClass() != SecurityManager.class) { ++ try { ++ overridden = getCheckMemberAccessMethod(sm.getClass()). ++ getDeclaringClass() != SecurityManager.class; ++ } catch (NoSuchMethodError e) { ++ // fall back to invoke sm.checkMemberAccess for the member access check ++ } ++ } ++ this.overrideCheckMemberAccess = overridden; ++ } ++ ++ } ++ ++ private static volatile SecurityManagerHelper smHelper; ++ private static boolean isCheckMemberAccessOverridden(SecurityManager sm) { ++ if (sm.getClass() == SecurityManager.class) return false; + +- Class[] paramTypes = new Class[] {Class.class, int.class}; +- return smgr.getClass().getMethod0("checkMemberAccess", paramTypes). +- getDeclaringClass() != SecurityManager.class; ++ SecurityManagerHelper helper = smHelper; ++ if (helper == null || helper.sm != sm) { ++ helper = new SecurityManagerHelper(sm); ++ smHelper = helper; ++ } ++ return helper.overrideCheckMemberAccess; + } + ++ /** ++ * Finds the checkMemberAccess method of the given SecurityManager class. ++ * ++ * This method calls JNI_GetMethodID to look up the checkMemberAccess method ++ * instead of Class.getMethod0 that may cause loading of classes referenced ++ * by the SecurityManager subclass and cause ClassCircularityError. ++ * ++ * JNI_GetMethodID may throw NoSuchMethodError if the given class ++ * has a static checkMemberAccess method. ++ * ++ * @throws NoSuchMethodError if the method cannot be found. ++ */ ++ private static native Method getCheckMemberAccessMethod(Class c) ++ throws NoSuchMethodError; ++ + + /* + * Check if client is allowed to access members. If access is denied, +--- ./jdk/src/share/classes/java/lang/ClassLoader.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/ClassLoader.java 2013-12-01 11:14:28.000000000 -0800 @@ -58,6 +58,7 @@ import sun.misc.VM; import sun.reflect.CallerSensitive; @@ -32362,8 +58253,30 @@ final String name = cls.getName(); final int i = name.lastIndexOf('.'); if (i != -1) { ---- jdk/src/share/classes/java/lang/SecurityManager.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/SecurityManager.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java 2013-09-06 11:28:09.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java 2014-06-06 19:56:29.000000000 -0700 +@@ -74,7 +74,6 @@ + new Entry(0x00CC, new char[]{0x0069, 0x0307, 0x0300}, new char[]{0x00CC}, "lt", 0), // # LATIN CAPITAL LETTER I WITH GRAVE + new Entry(0x00CD, new char[]{0x0069, 0x0307, 0x0301}, new char[]{0x00CD}, "lt", 0), // # LATIN CAPITAL LETTER I WITH ACUTE + new Entry(0x0128, new char[]{0x0069, 0x0307, 0x0303}, new char[]{0x0128}, "lt", 0), // # LATIN CAPITAL LETTER I WITH TILDE +- new Entry(0x0130, new char[]{0x0069, 0x0307}, new char[]{0x0130}, "lt", 0), // # LATIN CAPITAL LETTER I WITH DOT ABOVE + + //# ================================================================================ + //# Turkish and Azeri +@@ -85,10 +84,7 @@ + new Entry(0x0049, new char[]{0x0131}, new char[]{0x0049}, "tr", NOT_BEFORE_DOT), // # LATIN CAPITAL LETTER I + new Entry(0x0049, new char[]{0x0131}, new char[]{0x0049}, "az", NOT_BEFORE_DOT), // # LATIN CAPITAL LETTER I + new Entry(0x0069, new char[]{0x0069}, new char[]{0x0130}, "tr", 0), // # LATIN SMALL LETTER I +- new Entry(0x0069, new char[]{0x0069}, new char[]{0x0130}, "az", 0), // # LATIN SMALL LETTER I +- //# ================================================================================ +- //# Other +- new Entry(0x0130, new char[]{0x0069, 0x0307}, new char[]{0x0130}, "en", 0), // # LATIN CAPITALLETTER I WITH DOT ABOVE ++ new Entry(0x0069, new char[]{0x0069}, new char[]{0x0130}, "az", 0) // # LATIN SMALL LETTER I + }; + + // A hash table that contains the above entries +--- ./jdk/src/share/classes/java/lang/SecurityManager.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/SecurityManager.java 2014-01-18 12:16:24.000000000 -0800 @@ -1131,12 +1131,8 @@ * @see #checkPermission(java.security.Permission) checkPermission */ @@ -32379,8 +58292,34 @@ } /** ---- jdk/src/share/classes/java/lang/System.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/System.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/String.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/String.java 2014-06-06 19:56:29.000000000 -0700 +@@ -2461,21 +2461,14 @@ + } + if (localeDependent || srcChar == '\u03A3') { // GREEK CAPITAL LETTER SIGMA + lowerChar = ConditionalSpecialCasing.toLowerCaseEx(this, i, locale); +- } else if (srcChar == '\u0130') { // LATIN CAPITAL LETTER I DOT +- lowerChar = Character.ERROR; + } else { + lowerChar = Character.toLowerCase(srcChar); + } + if ((lowerChar == Character.ERROR) + || (lowerChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) { + if (lowerChar == Character.ERROR) { +- if (!localeDependent && srcChar == '\u0130') { +- lowerCharArray = +- ConditionalSpecialCasing.toLowerCaseCharArray(this, i, Locale.ENGLISH); +- } else { +- lowerCharArray = +- ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale); +- } ++ lowerCharArray = ++ ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale); + } else if (srcCount == 2) { + resultOffset += Character.toChars(lowerChar, result, i + resultOffset) - srcCount; + continue; +--- ./jdk/src/share/classes/java/lang/System.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/System.java 2014-06-06 19:56:29.000000000 -0700 @@ -25,6 +25,7 @@ package java.lang; @@ -32389,18 +58328,21 @@ import java.util.Properties; import java.util.PropertyPermission; import java.util.StringTokenizer; -@@ -1202,6 +1203,9 @@ +@@ -1202,6 +1203,12 @@ public int getStringHash32(String string) { return string.hash32(); } + public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) { + return new Thread(target, acc); ++ } ++ public void invokeFinalize(Object o) throws Throwable { ++ o.finalize(); + } }); } } ---- jdk/src/share/classes/java/lang/Thread.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/Thread.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/Thread.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/Thread.java 2014-04-19 01:27:13.000000000 -0700 @@ -341,6 +341,15 @@ } @@ -32466,8 +58408,8 @@ * Allocates a new {@code Thread} object. This constructor has the same * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread} * {@code (group, target, gname)} ,where {@code gname} is a newly generated ---- jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2014-04-19 01:27:13.000000000 -0700 @@ -140,7 +140,7 @@ * Return the {@link SpeciesData} instance representing this BMH species. All subclasses must provide a * static field containing this value, and they must accordingly implement this method. @@ -32691,8 +58633,20 @@ mv.visitCode(); mv.visitLdcInsn(types); mv.visitLdcInsn(Type.getObjectType(className)); ---- jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/invoke/DirectMethodHandle.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/invoke/DirectMethodHandle.java 2014-06-06 19:56:29.000000000 -0700 +@@ -53,7 +53,8 @@ + if (!member.isResolved()) + throw new InternalError(); + +- if (member.getDeclaringClass().isInterface() && !member.isAbstract()) { ++ if (member.getDeclaringClass().isInterface() && ++ member.isMethod() && !member.isAbstract()) { + // Check for corner case: invokeinterface of Object method + MemberName m = new MemberName(Object.class, member.getName(), member.getMethodType(), member.getReferenceKind()); + m = MemberName.getFactory().resolveOrNull(m.getReferenceKind(), m, null); +--- ./jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2014-04-19 01:27:13.000000000 -0700 @@ -289,8 +289,9 @@ * Set up class file generation. */ @@ -32704,8 +58658,20 @@ cw.visitSource(sourceFile, null); String invokerDesc = invokerType.toMethodDescriptorString(); ---- jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2014-06-06 19:56:29.000000000 -0700 +@@ -742,7 +742,8 @@ + GuardWithCatch gguard = new GuardWithCatch(gtarget, exType, gcatcher); + if (gtarget == null || gcatcher == null) throw new InternalError(); + MethodHandle ginvoker = GuardWithCatch.VARARGS_INVOKE.bindReceiver(gguard); +- return makeCollectArguments(ginvoker, ValueConversions.varargsArray(nargs), 0, false); ++ MethodHandle gcollect = makeCollectArguments(ginvoker, ValueConversions.varargsArray(nargs), 0, false); ++ return makePairwiseConvert(gcollect, type, 2); + } + } + +--- ./jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2013-12-01 11:14:28.000000000 -0800 @@ -456,6 +456,7 @@ case "getDeclaredField": case "getDeclaredMethod": @@ -32722,8 +58688,8 @@ case "getProxyClass": case "newProxyInstance": return defc == java.lang.reflect.Proxy.class; ---- jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2013-09-06 11:28:10.000000000 -0700 -+++ jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/invoke/MethodHandles.java 2014-04-19 01:27:13.000000000 -0700 @@ -426,7 +426,7 @@ Lookup(Class lookupClass) { @@ -32790,9 +58756,600 @@ MethodType newType = MethodType.methodType(oldType.returnType(), ptypes); return target.dropArguments(newType, pos, dropped); } ---- jdk/src/share/classes/java/lang/reflect/Proxy.java 2013-09-06 11:28:11.000000000 -0700 -+++ jdk/src/share/classes/java/lang/reflect/Proxy.java 2014-04-20 12:39:18.000000000 -0700 -@@ -788,6 +788,7 @@ +--- ./jdk/src/share/classes/java/lang/ref/Finalizer.java 2013-09-06 11:28:10.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/ref/Finalizer.java 2014-06-06 19:56:29.000000000 -0700 +@@ -27,17 +27,14 @@ + + import java.security.PrivilegedAction; + import java.security.AccessController; +- ++import sun.misc.JavaLangAccess; ++import sun.misc.SharedSecrets; ++import sun.misc.VM; + + final class Finalizer extends FinalReference { /* Package-private; must be in + same package as the Reference + class */ + +- /* A native method that invokes an arbitrary object's finalize method is +- required since the finalize method is protected +- */ +- static native void invokeFinalizeMethod(Object o) throws Throwable; +- + private static ReferenceQueue queue = new ReferenceQueue(); + private static Finalizer unfinalized = null; + private static final Object lock = new Object(); +@@ -90,7 +87,7 @@ + new Finalizer(finalizee); + } + +- private void runFinalizer() { ++ private void runFinalizer(JavaLangAccess jla) { + synchronized (this) { + if (hasBeenFinalized()) return; + remove(); +@@ -98,7 +95,8 @@ + try { + Object finalizee = this.get(); + if (finalizee != null && !(finalizee instanceof java.lang.Enum)) { +- invokeFinalizeMethod(finalizee); ++ jla.invokeFinalize(finalizee); ++ + /* Clear stack slot containing this variable, to decrease + the chances of false retention with a conservative GC */ + finalizee = null; +@@ -141,16 +139,21 @@ + + /* Called by Runtime.runFinalization() */ + static void runFinalization() { ++ if (!VM.isBooted()) { ++ return; ++ } ++ + forkSecondaryFinalizer(new Runnable() { + private volatile boolean running; + public void run() { + if (running) + return; ++ final JavaLangAccess jla = SharedSecrets.getJavaLangAccess(); + running = true; + for (;;) { + Finalizer f = (Finalizer)queue.poll(); + if (f == null) break; +- f.runFinalizer(); ++ f.runFinalizer(jla); + } + } + }); +@@ -158,11 +161,16 @@ + + /* Invoked by java.lang.Shutdown */ + static void runAllFinalizers() { ++ if (!VM.isBooted()) { ++ return; ++ } ++ + forkSecondaryFinalizer(new Runnable() { + private volatile boolean running; + public void run() { + if (running) + return; ++ final JavaLangAccess jla = SharedSecrets.getJavaLangAccess(); + running = true; + for (;;) { + Finalizer f; +@@ -171,7 +179,7 @@ + if (f == null) break; + unfinalized = f.next; + } +- f.runFinalizer(); ++ f.runFinalizer(jla); + }}}); + } + +@@ -183,13 +191,25 @@ + public void run() { + if (running) + return; ++ ++ // Finalizer thread starts before System.initializeSystemClass ++ // is called. Wait until JavaLangAccess is available ++ while (!VM.isBooted()) { ++ // delay until VM completes initialization ++ try { ++ VM.awaitBooted(); ++ } catch (InterruptedException x) { ++ // ignore and continue ++ } ++ } ++ final JavaLangAccess jla = SharedSecrets.getJavaLangAccess(); + running = true; + for (;;) { + try { + Finalizer f = (Finalizer)queue.remove(); +- f.runFinalizer(); ++ f.runFinalizer(jla); + } catch (InterruptedException x) { +- continue; ++ // ignore and continue + } + } + } +--- ./jdk/src/share/classes/java/lang/reflect/Proxy.java 2013-09-06 11:28:11.000000000 -0700 ++++ ./jdk/src/share/classes/java/lang/reflect/Proxy.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,19 +25,15 @@ + + package java.lang.reflect; + +-import java.lang.ref.Reference; + import java.lang.ref.WeakReference; ++import java.lang.reflect.WeakCache.BiFunction; + import java.security.AccessController; + import java.security.Permission; + import java.security.PrivilegedAction; + import java.util.Arrays; +-import java.util.Collections; +-import java.util.HashMap; +-import java.util.HashSet; ++import java.util.IdentityHashMap; + import java.util.Map; +-import java.util.Set; +-import java.util.List; +-import java.util.WeakHashMap; ++import java.util.concurrent.atomic.AtomicLong; + import sun.misc.ProxyGenerator; + import sun.reflect.CallerSensitive; + import sun.reflect.Reflection; +@@ -230,27 +226,15 @@ + + private static final long serialVersionUID = -2222568056686623797L; + +- /** prefix for all proxy class names */ +- private final static String proxyClassNamePrefix = "$Proxy"; +- + /** parameter types of a proxy class constructor */ +- private final static Class[] constructorParams = ++ private static final Class[] constructorParams = + { InvocationHandler.class }; + +- /** maps a class loader to the proxy class cache for that loader */ +- private static Map, Object>> loaderToCache +- = new WeakHashMap<>(); +- +- /** marks that a particular proxy class is currently being generated */ +- private static Object pendingGenerationMarker = new Object(); +- +- /** next number to use for generation of unique proxy class names */ +- private static long nextUniqueNumber = 0; +- private static Object nextUniqueNumberLock = new Object(); +- +- /** set of all generated proxy classes, for isProxyClass implementation */ +- private static Map, Void> proxyClasses = +- Collections.synchronizedMap(new WeakHashMap, Void>()); ++ /** ++ * a cache of proxy classes ++ */ ++ private static final WeakCache[], Class> ++ proxyClassCache = new WeakCache<>(new KeyFactory(), new ProxyClassFactory()); + + /** + * the invocation handler for this proxy instance. +@@ -464,131 +448,190 @@ + throw new IllegalArgumentException("interface limit exceeded"); + } + +- Class proxyClass = null; ++ // If the proxy class defined by the given loader implementing ++ // the given interfaces exists, this will simply return the cached copy; ++ // otherwise, it will create the proxy class via the ProxyClassFactory ++ return proxyClassCache.get(loader, interfaces); ++ } + +- /* collect interface names to use as key for proxy class cache */ +- String[] interfaceNames = new String[interfaces.length]; ++ /* ++ * a key used for proxy class with 0 implemented interfaces ++ */ ++ private static final Object key0 = new Object(); + +- // for detecting duplicates +- Set> interfaceSet = new HashSet<>(); ++ /* ++ * Key1 and Key2 are optimized for the common use of dynamic proxies ++ * that implement 1 or 2 interfaces. ++ */ + +- for (int i = 0; i < interfaces.length; i++) { +- /* +- * Verify that the class loader resolves the name of this +- * interface to the same Class object. +- */ +- String interfaceName = interfaces[i].getName(); +- Class interfaceClass = null; +- try { +- interfaceClass = Class.forName(interfaceName, false, loader); +- } catch (ClassNotFoundException e) { +- } +- if (interfaceClass != interfaces[i]) { +- throw new IllegalArgumentException( +- interfaces[i] + " is not visible from class loader"); +- } ++ /* ++ * a key used for proxy class with 1 implemented interface ++ */ ++ private static final class Key1 extends WeakReference> { ++ private final int hash; + +- /* +- * Verify that the Class object actually represents an +- * interface. +- */ +- if (!interfaceClass.isInterface()) { +- throw new IllegalArgumentException( +- interfaceClass.getName() + " is not an interface"); +- } ++ Key1(Class intf) { ++ super(intf); ++ this.hash = intf.hashCode(); ++ } ++ ++ @Override ++ public int hashCode() { ++ return hash; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ Class intf; ++ return this == obj || ++ obj != null && ++ obj.getClass() == Key1.class && ++ (intf = get()) != null && ++ intf == ((Key1) obj).get(); ++ } ++ } + +- /* +- * Verify that this interface is not a duplicate. +- */ +- if (interfaceSet.contains(interfaceClass)) { +- throw new IllegalArgumentException( +- "repeated interface: " + interfaceClass.getName()); ++ /* ++ * a key used for proxy class with 2 implemented interfaces ++ */ ++ private static final class Key2 extends WeakReference> { ++ private final int hash; ++ private final WeakReference> ref2; ++ ++ Key2(Class intf1, Class intf2) { ++ super(intf1); ++ hash = 31 * intf1.hashCode() + intf2.hashCode(); ++ ref2 = new WeakReference>(intf2); ++ } ++ ++ @Override ++ public int hashCode() { ++ return hash; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ Class intf1, intf2; ++ return this == obj || ++ obj != null && ++ obj.getClass() == Key2.class && ++ (intf1 = get()) != null && ++ intf1 == ((Key2) obj).get() && ++ (intf2 = ref2.get()) != null && ++ intf2 == ((Key2) obj).ref2.get(); ++ } ++ } ++ ++ /* ++ * a key used for proxy class with any number of implemented interfaces ++ * (used here for 3 or more only) ++ */ ++ private static final class KeyX { ++ private final int hash; ++ private final WeakReference>[] refs; ++ ++ KeyX(Class[] interfaces) { ++ hash = Arrays.hashCode(interfaces); ++ refs = new WeakReference[interfaces.length]; ++ for (int i = 0; i < interfaces.length; i++) { ++ refs[i] = new WeakReference(interfaces[i]); + } +- interfaceSet.add(interfaceClass); ++ } + +- interfaceNames[i] = interfaceName; ++ @Override ++ public int hashCode() { ++ return hash; + } + +- /* +- * Using string representations of the proxy interfaces as +- * keys in the proxy class cache (instead of their Class +- * objects) is sufficient because we require the proxy +- * interfaces to be resolvable by name through the supplied +- * class loader, and it has the advantage that using a string +- * representation of a class makes for an implicit weak +- * reference to the class. +- */ +- List key = Arrays.asList(interfaceNames); ++ @Override ++ public boolean equals(Object obj) { ++ return this == obj || ++ obj != null && ++ obj.getClass() == KeyX.class && ++ equals(refs, ((KeyX) obj).refs); ++ } + +- /* +- * Find or create the proxy class cache for the class loader. +- */ +- Map, Object> cache; +- synchronized (loaderToCache) { +- cache = loaderToCache.get(loader); +- if (cache == null) { +- cache = new HashMap<>(); +- loaderToCache.put(loader, cache); ++ private static boolean equals(WeakReference>[] refs1, ++ WeakReference>[] refs2) { ++ if (refs1.length != refs2.length) { ++ return false; + } +- /* +- * This mapping will remain valid for the duration of this +- * method, without further synchronization, because the mapping +- * will only be removed if the class loader becomes unreachable. +- */ ++ for (int i = 0; i < refs1.length; i++) { ++ Class intf = refs1[i].get(); ++ if (intf == null || intf != refs2[i].get()) { ++ return false; ++ } ++ } ++ return true; + } ++ } + +- /* +- * Look up the list of interfaces in the proxy class cache using +- * the key. This lookup will result in one of three possible +- * kinds of values: +- * null, if there is currently no proxy class for the list of +- * interfaces in the class loader, +- * the pendingGenerationMarker object, if a proxy class for the +- * list of interfaces is currently being generated, +- * or a weak reference to a Class object, if a proxy class for +- * the list of interfaces has already been generated. +- */ +- synchronized (cache) { +- /* +- * Note that we need not worry about reaping the cache for +- * entries with cleared weak references because if a proxy class +- * has been garbage collected, its class loader will have been +- * garbage collected as well, so the entire cache will be reaped +- * from the loaderToCache map. +- */ +- do { +- Object value = cache.get(key); +- if (value instanceof Reference) { +- proxyClass = (Class) ((Reference) value).get(); ++ /** ++ * A function that maps an array of interfaces to an optimal key where ++ * Class objects representing interfaces are weakly referenced. ++ */ ++ private static final class KeyFactory ++ implements BiFunction[], Object> ++ { ++ @Override ++ public Object apply(ClassLoader classLoader, Class[] interfaces) { ++ switch (interfaces.length) { ++ case 1: return new Key1(interfaces[0]); // the most frequent ++ case 2: return new Key2(interfaces[0], interfaces[1]); ++ case 0: return key0; ++ default: return new KeyX(interfaces); ++ } ++ } ++ } ++ ++ /** ++ * A factory function that generates, defines and returns the proxy class given ++ * the ClassLoader and array of interfaces. ++ */ ++ private static final class ProxyClassFactory ++ implements BiFunction[], Class> ++ { ++ // prefix for all proxy class names ++ private static final String proxyClassNamePrefix = "$Proxy"; ++ ++ // next number to use for generation of unique proxy class names ++ private static final AtomicLong nextUniqueNumber = new AtomicLong(); ++ ++ @Override ++ public Class apply(ClassLoader loader, Class[] interfaces) { ++ ++ Map, Boolean> interfaceSet = new IdentityHashMap<>(interfaces.length); ++ for (Class intf : interfaces) { ++ /* ++ * Verify that the class loader resolves the name of this ++ * interface to the same Class object. ++ */ ++ Class interfaceClass = null; ++ try { ++ interfaceClass = Class.forName(intf.getName(), false, loader); ++ } catch (ClassNotFoundException e) { + } +- if (proxyClass != null) { +- // proxy class already generated: return it +- return proxyClass; +- } else if (value == pendingGenerationMarker) { +- // proxy class being generated: wait for it +- try { +- cache.wait(); +- } catch (InterruptedException e) { +- /* +- * The class generation that we are waiting for should +- * take a small, bounded time, so we can safely ignore +- * thread interrupts here. +- */ +- } +- continue; +- } else { +- /* +- * No proxy class for this list of interfaces has been +- * generated or is being generated, so we will go and +- * generate it now. Mark it as pending generation. +- */ +- cache.put(key, pendingGenerationMarker); +- break; ++ if (interfaceClass != intf) { ++ throw new IllegalArgumentException( ++ intf + " is not visible from class loader"); + } +- } while (true); +- } ++ /* ++ * Verify that the Class object actually represents an ++ * interface. ++ */ ++ if (!interfaceClass.isInterface()) { ++ throw new IllegalArgumentException( ++ interfaceClass.getName() + " is not an interface"); ++ } ++ /* ++ * Verify that this interface is not a duplicate. ++ */ ++ if (interfaceSet.put(interfaceClass, Boolean.TRUE) != null) { ++ throw new IllegalArgumentException( ++ "repeated interface: " + interfaceClass.getName()); ++ } ++ } + +- try { + String proxyPkg = null; // package to define proxy class in + + /* +@@ -596,10 +639,10 @@ + * proxy class will be defined in the same package. Verify that + * all non-public proxy interfaces are in the same package. + */ +- for (int i = 0; i < interfaces.length; i++) { +- int flags = interfaces[i].getModifiers(); ++ for (Class intf : interfaces) { ++ int flags = intf.getModifiers(); + if (!Modifier.isPublic(flags)) { +- String name = interfaces[i].getName(); ++ String name = intf.getName(); + int n = name.lastIndexOf('.'); + String pkg = ((n == -1) ? "" : name.substring(0, n + 1)); + if (proxyPkg == null) { +@@ -616,60 +659,31 @@ + proxyPkg = ReflectUtil.PROXY_PACKAGE + "."; + } + +- { +- /* +- * Choose a name for the proxy class to generate. +- */ +- long num; +- synchronized (nextUniqueNumberLock) { +- num = nextUniqueNumber++; +- } +- String proxyName = proxyPkg + proxyClassNamePrefix + num; +- /* +- * Verify that the class loader hasn't already +- * defined a class with the chosen name. +- */ +- +- /* +- * Generate the specified proxy class. +- */ +- byte[] proxyClassFile = ProxyGenerator.generateProxyClass( +- proxyName, interfaces); +- try { +- proxyClass = defineClass0(loader, proxyName, +- proxyClassFile, 0, proxyClassFile.length); +- } catch (ClassFormatError e) { +- /* +- * A ClassFormatError here means that (barring bugs in the +- * proxy class generation code) there was some other +- * invalid aspect of the arguments supplied to the proxy +- * class creation (such as virtual machine limitations +- * exceeded). +- */ +- throw new IllegalArgumentException(e.toString()); +- } +- } +- // add to set of all generated proxy classes, for isProxyClass +- proxyClasses.put(proxyClass, null); ++ /* ++ * Choose a name for the proxy class to generate. ++ */ ++ long num = nextUniqueNumber.getAndIncrement(); ++ String proxyName = proxyPkg + proxyClassNamePrefix + num; + +- } finally { + /* +- * We must clean up the "pending generation" state of the proxy +- * class cache entry somehow. If a proxy class was successfully +- * generated, store it in the cache (with a weak reference); +- * otherwise, remove the reserved entry. In all cases, notify +- * all waiters on reserved entries in this cache. ++ * Generate the specified proxy class. + */ +- synchronized (cache) { +- if (proxyClass != null) { +- cache.put(key, new WeakReference>(proxyClass)); +- } else { +- cache.remove(key); +- } +- cache.notifyAll(); ++ byte[] proxyClassFile = ProxyGenerator.generateProxyClass( ++ proxyName, interfaces); ++ try { ++ return defineClass0(loader, proxyName, ++ proxyClassFile, 0, proxyClassFile.length); ++ } catch (ClassFormatError e) { ++ /* ++ * A ClassFormatError here means that (barring bugs in the ++ * proxy class generation code) there was some other ++ * invalid aspect of the arguments supplied to the proxy ++ * class creation (such as virtual machine limitations ++ * exceeded). ++ */ ++ throw new IllegalArgumentException(e.toString()); + } + } +- return proxyClass; + } + + /** +@@ -773,11 +787,7 @@ + * @throws NullPointerException if {@code cl} is {@code null} + */ + public static boolean isProxyClass(Class cl) { +- if (cl == null) { +- throw new NullPointerException(); +- } +- +- return proxyClasses.containsKey(cl); ++ return Proxy.class.isAssignableFrom(cl) && proxyClassCache.containsValue(cl); + } + + /** +@@ -788,6 +798,7 @@ * @throws IllegalArgumentException if the argument is not a * proxy instance */ @@ -32800,7 +59357,7 @@ public static InvocationHandler getInvocationHandler(Object proxy) throws IllegalArgumentException { -@@ -798,8 +799,19 @@ +@@ -798,8 +809,19 @@ throw new IllegalArgumentException("not a proxy instance"); } @@ -32822,8 +59379,467 @@ } private static native Class defineClass0(ClassLoader loader, String name, ---- jdk/src/share/classes/java/net/Inet6Address.java 2013-09-06 11:28:11.000000000 -0700 -+++ jdk/src/share/classes/java/net/Inet6Address.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/java/lang/reflect/WeakCache.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/share/classes/java/lang/reflect/WeakCache.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,393 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 java.lang.reflect; ++ ++import java.lang.ref.ReferenceQueue; ++import java.lang.ref.WeakReference; ++import java.util.Objects; ++import java.util.concurrent.ConcurrentHashMap; ++import java.util.concurrent.ConcurrentMap; ++ ++/** ++ * Cache mapping pairs of {@code (key, sub-key) -> value}. Keys and values are ++ * weakly but sub-keys are strongly referenced. Keys are passed directly to ++ * {@link #get} method which also takes a {@code parameter}. Sub-keys are ++ * calculated from keys and parameters using the {@code subKeyFactory} function ++ * passed to the constructor. Values are calculated from keys and parameters ++ * using the {@code valueFactory} function passed to the constructor. ++ * Keys can be {@code null} and are compared by identity while sub-keys returned by ++ * {@code subKeyFactory} or values returned by {@code valueFactory} ++ * can not be null. Sub-keys are compared using their {@link #equals} method. ++ * Entries are expunged from cache lazily on each invocation to {@link #get}, ++ * {@link #containsValue} or {@link #size} methods when the WeakReferences to ++ * keys are cleared. Cleared WeakReferences to individual values don't cause ++ * expunging, but such entries are logically treated as non-existent and ++ * trigger re-evaluation of {@code valueFactory} on request for their ++ * key/subKey. ++ * ++ * @author Peter Levart ++ * @param type of keys ++ * @param

type of parameters ++ * @param type of values ++ */ ++final class WeakCache { ++ ++ interface BiFunction { ++ ++ /** ++ * Applies this function to the given arguments. ++ * ++ * @param t the first function argument ++ * @param u the second function argument ++ * @return the function result ++ */ ++ R apply(T t, U u); ++ } ++ ++ interface Supplier { ++ T get(); ++ } ++ ++ private final ReferenceQueue refQueue ++ = new ReferenceQueue<>(); ++ // the key type is Object for supporting null key ++ private final ConcurrentMap>> map ++ = new ConcurrentHashMap<>(); ++ private final ConcurrentMap, Boolean> reverseMap ++ = new ConcurrentHashMap<>(); ++ private final BiFunction subKeyFactory; ++ private final BiFunction valueFactory; ++ ++ /** ++ * Construct an instance of {@code WeakCache} ++ * ++ * @param subKeyFactory a function mapping a pair of ++ * {@code (key, parameter) -> sub-key} ++ * @param valueFactory a function mapping a pair of ++ * {@code (key, parameter) -> value} ++ * @throws NullPointerException if {@code subKeyFactory} or ++ * {@code valueFactory} is null. ++ */ ++ public WeakCache(BiFunction subKeyFactory, ++ BiFunction valueFactory) { ++ this.subKeyFactory = Objects.requireNonNull(subKeyFactory); ++ this.valueFactory = Objects.requireNonNull(valueFactory); ++ } ++ ++ /** ++ * Look-up the value through the cache. This always evaluates the ++ * {@code subKeyFactory} function and optionally evaluates ++ * {@code valueFactory} function if there is no entry in the cache for given ++ * pair of (key, subKey) or the entry has already been cleared. ++ * ++ * @param key possibly null key ++ * @param parameter parameter used together with key to create sub-key and ++ * value (should not be null) ++ * @return the cached value (never null) ++ * @throws NullPointerException if {@code parameter} passed in or ++ * {@code sub-key} calculated by ++ * {@code subKeyFactory} or {@code value} ++ * calculated by {@code valueFactory} is null. ++ */ ++ public V get(K key, P parameter) { ++ Objects.requireNonNull(parameter); ++ ++ expungeStaleEntries(); ++ ++ Object cacheKey = CacheKey.valueOf(key, refQueue); ++ ++ // lazily install the 2nd level valuesMap for the particular cacheKey ++ ConcurrentMap> valuesMap = map.get(cacheKey); ++ if (valuesMap == null) { ++ ConcurrentMap> oldValuesMap ++ = map.putIfAbsent(cacheKey, ++ valuesMap = new ConcurrentHashMap<>()); ++ if (oldValuesMap != null) { ++ valuesMap = oldValuesMap; ++ } ++ } ++ ++ // create subKey and retrieve the possible Supplier stored by that ++ // subKey from valuesMap ++ Object subKey = Objects.requireNonNull(subKeyFactory.apply(key, parameter)); ++ Supplier supplier = valuesMap.get(subKey); ++ Factory factory = null; ++ ++ while (true) { ++ if (supplier != null) { ++ // supplier might be a Factory or a CacheValue instance ++ V value = supplier.get(); ++ if (value != null) { ++ return value; ++ } ++ } ++ // else no supplier in cache ++ // or a supplier that returned null (could be a cleared CacheValue ++ // or a Factory that wasn't successful in installing the CacheValue) ++ ++ // lazily construct a Factory ++ if (factory == null) { ++ factory = new Factory(key, parameter, subKey, valuesMap); ++ } ++ ++ if (supplier == null) { ++ supplier = valuesMap.putIfAbsent(subKey, factory); ++ if (supplier == null) { ++ // successfully installed Factory ++ supplier = factory; ++ } ++ // else retry with winning supplier ++ } else { ++ if (valuesMap.replace(subKey, supplier, factory)) { ++ // successfully replaced ++ // cleared CacheEntry / unsuccessful Factory ++ // with our Factory ++ supplier = factory; ++ } else { ++ // retry with current supplier ++ supplier = valuesMap.get(subKey); ++ } ++ } ++ } ++ } ++ ++ /** ++ * Checks whether the specified non-null value is already present in this ++ * {@code WeakCache}. The check is made using identity comparison regardless ++ * of whether value's class overrides {@link Object#equals} or not. ++ * ++ * @param value the non-null value to check ++ * @return true if given {@code value} is already cached ++ * @throws NullPointerException if value is null ++ */ ++ public boolean containsValue(V value) { ++ Objects.requireNonNull(value); ++ ++ expungeStaleEntries(); ++ return reverseMap.containsKey(new LookupValue<>(value)); ++ } ++ ++ /** ++ * Returns the current number of cached entries that ++ * can decrease over time when keys/values are GC-ed. ++ */ ++ public int size() { ++ expungeStaleEntries(); ++ return reverseMap.size(); ++ } ++ ++ private void expungeStaleEntries() { ++ CacheKey cacheKey; ++ while ((cacheKey = (CacheKey)refQueue.poll()) != null) { ++ cacheKey.expungeFrom(map, reverseMap); ++ } ++ } ++ ++ /** ++ * A factory {@link Supplier} that implements the lazy synchronized ++ * construction of the value and installment of it into the cache. ++ */ ++ private final class Factory implements Supplier { ++ ++ private final K key; ++ private final P parameter; ++ private final Object subKey; ++ private final ConcurrentMap> valuesMap; ++ ++ Factory(K key, P parameter, Object subKey, ++ ConcurrentMap> valuesMap) { ++ this.key = key; ++ this.parameter = parameter; ++ this.subKey = subKey; ++ this.valuesMap = valuesMap; ++ } ++ ++ @Override ++ public synchronized V get() { // serialize access ++ // re-check ++ Supplier supplier = valuesMap.get(subKey); ++ if (supplier != this) { ++ // something changed while we were waiting: ++ // might be that we were replaced by a CacheValue ++ // or were removed because of failure -> ++ // return null to signal WeakCache.get() to retry ++ // the loop ++ return null; ++ } ++ // else still us (supplier == this) ++ ++ // create new value ++ V value = null; ++ try { ++ value = Objects.requireNonNull(valueFactory.apply(key, parameter)); ++ } finally { ++ if (value == null) { // remove us on failure ++ valuesMap.remove(subKey, this); ++ } ++ } ++ // the only path to reach here is with non-null value ++ assert value != null; ++ ++ // wrap value with CacheValue (WeakReference) ++ CacheValue cacheValue = new CacheValue<>(value); ++ ++ // try replacing us with CacheValue (this should always succeed) ++ if (valuesMap.replace(subKey, this, cacheValue)) { ++ // put also in reverseMap ++ reverseMap.put(cacheValue, Boolean.TRUE); ++ } else { ++ throw new AssertionError("Should not reach here"); ++ } ++ ++ // successfully replaced us with new CacheValue -> return the value ++ // wrapped by it ++ return value; ++ } ++ } ++ ++ /** ++ * Common type of value suppliers that are holding a referent. ++ * The {@link #equals} and {@link #hashCode} of implementations is defined ++ * to compare the referent by identity. ++ */ ++ private interface Value extends Supplier {} ++ ++ /** ++ * An optimized {@link Value} used to look-up the value in ++ * {@link WeakCache#containsValue} method so that we are not ++ * constructing the whole {@link CacheValue} just to look-up the referent. ++ */ ++ private static final class LookupValue implements Value { ++ private final V value; ++ ++ LookupValue(V value) { ++ this.value = value; ++ } ++ ++ @Override ++ public V get() { ++ return value; ++ } ++ ++ @Override ++ public int hashCode() { ++ return System.identityHashCode(value); // compare by identity ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ return obj == this || ++ obj instanceof Value && ++ this.value == ((Value) obj).get(); // compare by identity ++ } ++ } ++ ++ /** ++ * A {@link Value} that weakly references the referent. ++ */ ++ private static final class CacheValue ++ extends WeakReference implements Value ++ { ++ private final int hash; ++ ++ CacheValue(V value) { ++ super(value); ++ this.hash = System.identityHashCode(value); // compare by identity ++ } ++ ++ @Override ++ public int hashCode() { ++ return hash; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ V value; ++ return obj == this || ++ obj instanceof Value && ++ // cleared CacheValue is only equal to itself ++ (value = get()) != null && ++ value == ((Value) obj).get(); // compare by identity ++ } ++ } ++ ++ /** ++ * CacheKey containing a weakly referenced {@code key}. It registers ++ * itself with the {@code refQueue} so that it can be used to expunge ++ * the entry when the {@link WeakReference} is cleared. ++ */ ++ private static final class CacheKey extends WeakReference { ++ ++ // a replacement for null keys ++ private static final Object NULL_KEY = new Object(); ++ ++ static Object valueOf(K key, ReferenceQueue refQueue) { ++ return key == null ++ // null key means we can't weakly reference it, ++ // so we use a NULL_KEY singleton as cache key ++ ? NULL_KEY ++ // non-null key requires wrapping with a WeakReference ++ : new CacheKey<>(key, refQueue); ++ } ++ ++ private final int hash; ++ ++ private CacheKey(K key, ReferenceQueue refQueue) { ++ super(key, refQueue); ++ this.hash = System.identityHashCode(key); // compare by identity ++ } ++ ++ @Override ++ public int hashCode() { ++ return hash; ++ } ++ ++ @Override ++ public boolean equals(Object obj) { ++ K key; ++ return obj == this || ++ obj != null && ++ obj.getClass() == this.getClass() && ++ // cleared CacheKey is only equal to itself ++ (key = this.get()) != null && ++ // compare key by identity ++ key == ((CacheKey) obj).get(); ++ } ++ ++ void expungeFrom(ConcurrentMap> map, ++ ConcurrentMap reverseMap) { ++ // removing just by key is always safe here because after a CacheKey ++ // is cleared and enqueue-ed it is only equal to itself ++ // (see equals method)... ++ ConcurrentMap valuesMap = map.remove(this); ++ // remove also from reverseMap if needed ++ if (valuesMap != null) { ++ for (Object cacheValue : valuesMap.values()) { ++ reverseMap.remove(cacheValue); ++ } ++ } ++ } ++ } ++} +--- ./jdk/src/share/classes/java/net/IDN.java 2013-09-06 11:28:11.000000000 -0700 ++++ ./jdk/src/share/classes/java/net/IDN.java 2014-06-06 19:56:29.000000000 -0700 +@@ -271,13 +271,17 @@ + if (useSTD3ASCIIRules) { + for (int i = 0; i < dest.length(); i++) { + int c = dest.charAt(i); +- if (!isLDHChar(c)) { +- throw new IllegalArgumentException("Contains non-LDH characters"); ++ if (isNonLDHAsciiCodePoint(c)) { ++ throw new IllegalArgumentException( ++ "Contains non-LDH ASCII characters"); + } + } + +- if (dest.charAt(0) == '-' || dest.charAt(dest.length() - 1) == '-') { +- throw new IllegalArgumentException("Has leading or trailing hyphen"); ++ if (dest.charAt(0) == '-' || ++ dest.charAt(dest.length() - 1) == '-') { ++ ++ throw new IllegalArgumentException( ++ "Has leading or trailing hyphen"); + } + } + +@@ -380,26 +384,20 @@ + // + // LDH stands for "letter/digit/hyphen", with characters restricted to the + // 26-letter Latin alphabet , the digits <0-9>, and the hyphen +- // <-> +- // non-LDH = 0..0x2C, 0x2E..0x2F, 0x3A..0x40, 0x56..0x60, 0x7B..0x7F +- // +- private static boolean isLDHChar(int ch){ +- // high runner case +- if(ch > 0x007A){ +- return false; +- } +- //['-' '0'..'9' 'A'..'Z' 'a'..'z'] +- if((ch == 0x002D) || +- (0x0030 <= ch && ch <= 0x0039) || +- (0x0041 <= ch && ch <= 0x005A) || +- (0x0061 <= ch && ch <= 0x007A) +- ){ +- return true; +- } +- return false; ++ // <->. ++ // Non LDH refers to characters in the ASCII range, but which are not ++ // letters, digits or the hypen. ++ // ++ // non-LDH = 0..0x2C, 0x2E..0x2F, 0x3A..0x40, 0x5B..0x60, 0x7B..0x7F ++ // ++ private static boolean isNonLDHAsciiCodePoint(int ch){ ++ return (0x0000 <= ch && ch <= 0x002C) || ++ (0x002E <= ch && ch <= 0x002F) || ++ (0x003A <= ch && ch <= 0x0040) || ++ (0x005B <= ch && ch <= 0x0060) || ++ (0x007B <= ch && ch <= 0x007F); + } + +- + // + // search dots in a string and return the index of that character; + // or if there is no dots, return the length of input string +--- ./jdk/src/share/classes/java/net/Inet6Address.java 2013-09-06 11:28:11.000000000 -0700 ++++ ./jdk/src/share/classes/java/net/Inet6Address.java 2013-12-01 11:14:29.000000000 -0800 @@ -26,6 +26,8 @@ package java.net; @@ -33539,8 +60555,8 @@ - s.defaultWriteObject(); - } } ---- jdk/src/share/classes/java/net/InetAddress.java 2013-09-06 11:28:11.000000000 -0700 -+++ jdk/src/share/classes/java/net/InetAddress.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/java/net/InetAddress.java 2013-09-06 11:28:11.000000000 -0700 ++++ ./jdk/src/share/classes/java/net/InetAddress.java 2013-12-01 11:14:29.000000000 -0800 @@ -213,6 +213,13 @@ this.family = family; } @@ -33563,8 +60579,8 @@ } } ---- jdk/src/share/classes/java/net/Socket.java 2013-09-06 11:28:11.000000000 -0700 -+++ jdk/src/share/classes/java/net/Socket.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/java/net/Socket.java 2013-09-06 11:28:11.000000000 -0700 ++++ ./jdk/src/share/classes/java/net/Socket.java 2014-01-18 12:16:24.000000000 -0800 @@ -624,6 +624,10 @@ InetAddress addr = epoint.getAddress(); int port = epoint.getPort(); @@ -33576,8 +60592,8 @@ getImpl().bind (addr, port); bound = true; } ---- jdk/src/share/classes/java/net/SocketPermission.java 2013-09-06 11:28:11.000000000 -0700 -+++ jdk/src/share/classes/java/net/SocketPermission.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/java/net/SocketPermission.java 2013-09-06 11:28:11.000000000 -0700 ++++ ./jdk/src/share/classes/java/net/SocketPermission.java 2014-01-18 12:16:24.000000000 -0800 @@ -34,6 +34,9 @@ import java.net.InetAddress; import java.security.Permission; @@ -33736,8 +60752,228 @@ /* public String toString() { ---- jdk/src/share/classes/java/util/ServiceLoader.java 2013-09-06 11:28:15.000000000 -0700 -+++ jdk/src/share/classes/java/util/ServiceLoader.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/nio/charset/Charset.java 2013-09-06 11:28:12.000000000 -0700 ++++ ./jdk/src/share/classes/java/nio/charset/Charset.java 2014-06-06 19:56:29.000000000 -0700 +@@ -426,39 +426,32 @@ + } + + /* The extended set of charsets */ +- private static Object extendedProviderLock = new Object(); +- private static boolean extendedProviderProbed = false; +- private static CharsetProvider extendedProvider = null; +- +- private static void probeExtendedProvider() { +- AccessController.doPrivileged(new PrivilegedAction() { +- public Object run() { +- try { +- Class epc +- = Class.forName("sun.nio.cs.ext.ExtendedCharsets"); +- extendedProvider = (CharsetProvider)epc.newInstance(); +- } catch (ClassNotFoundException x) { +- // Extended charsets not available +- // (charsets.jar not present) +- } catch (InstantiationException x) { +- throw new Error(x); +- } catch (IllegalAccessException x) { +- throw new Error(x); +- } +- return null; +- } +- }); ++ private static class ExtendedProviderHolder { ++ static final CharsetProvider extendedProvider = extendedProvider(); ++ // returns ExtendedProvider, if installed ++ private static CharsetProvider extendedProvider() { ++ return AccessController.doPrivileged( ++ new PrivilegedAction() { ++ public CharsetProvider run() { ++ try { ++ Class epc ++ = Class.forName("sun.nio.cs.ext.ExtendedCharsets"); ++ return (CharsetProvider)epc.newInstance(); ++ } catch (ClassNotFoundException x) { ++ // Extended charsets not available ++ // (charsets.jar not present) ++ } catch (InstantiationException | ++ IllegalAccessException x) { ++ throw new Error(x); ++ } ++ return null; ++ } ++ }); ++ } + } + + private static Charset lookupExtendedCharset(String charsetName) { +- CharsetProvider ecp = null; +- synchronized (extendedProviderLock) { +- if (!extendedProviderProbed) { +- probeExtendedProvider(); +- extendedProviderProbed = true; +- } +- ecp = extendedProvider; +- } ++ CharsetProvider ecp = ExtendedProviderHolder.extendedProvider; + return (ecp != null) ? ecp.charsetForName(charsetName) : null; + } + +@@ -588,6 +581,9 @@ + new TreeMap( + ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER); + put(standardProvider.charsets(), m); ++ CharsetProvider ecp = ExtendedProviderHolder.extendedProvider; ++ if (ecp != null) ++ put(ecp.charsets(), m); + for (Iterator i = providers(); i.hasNext();) { + CharsetProvider cp = (CharsetProvider)i.next(); + put(cp.charsets(), m); +--- ./jdk/src/share/classes/java/nio/file/Files.java 2013-09-06 11:28:12.000000000 -0700 ++++ ./jdk/src/share/classes/java/nio/file/Files.java 2014-06-06 19:56:29.000000000 -0700 +@@ -28,6 +28,8 @@ + import java.nio.file.attribute.*; + import java.nio.file.spi.FileSystemProvider; + import java.nio.file.spi.FileTypeDetector; ++import java.nio.channels.Channels; ++import java.nio.channels.FileChannel; + import java.nio.channels.SeekableByteChannel; + import java.io.InputStream; + import java.io.OutputStream; +@@ -2896,41 +2898,63 @@ + } + + /** +- * Read all the bytes from an input stream. The {@code initialSize} +- * parameter indicates the initial size of the byte[] to allocate. ++ * The maximum size of array to allocate. ++ * Some VMs reserve some header words in an array. ++ * Attempts to allocate larger arrays may result in ++ * OutOfMemoryError: Requested array size exceeds VM limit ++ */ ++ private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8; ++ ++ /** ++ * Reads all the bytes from an input stream. Uses {@code initialSize} as a hint ++ * about how many bytes the stream will have. ++ * ++ * @param source ++ * the input stream to read from ++ * @param initialSize ++ * the initial size of the byte array to allocate ++ * ++ * @return a byte array containing the bytes read from the file ++ * ++ * @throws IOException ++ * if an I/O error occurs reading from the stream ++ * @throws OutOfMemoryError ++ * if an array of the required size cannot be allocated + */ + private static byte[] read(InputStream source, int initialSize) +- throws IOException ++ throws IOException + { + int capacity = initialSize; + byte[] buf = new byte[capacity]; + int nread = 0; +- int rem = buf.length; + int n; +- // read to EOF which may read more or less than initialSize (eg: file +- // is truncated while we are reading) +- while ((n = source.read(buf, nread, rem)) > 0) { +- nread += n; +- rem -= n; +- assert rem >= 0; +- if (rem == 0) { +- // need larger buffer +- int newCapacity = capacity << 1; +- if (newCapacity < 0) { +- if (capacity == Integer.MAX_VALUE) +- throw new OutOfMemoryError("Required array size too large"); +- newCapacity = Integer.MAX_VALUE; +- } +- rem = newCapacity - capacity; +- buf = Arrays.copyOf(buf, newCapacity); +- capacity = newCapacity; ++ for (;;) { ++ // read to EOF which may read more or less than initialSize (eg: file ++ // is truncated while we are reading) ++ while ((n = source.read(buf, nread, capacity - nread)) > 0) ++ nread += n; ++ ++ // if last call to source.read() returned -1, we are done ++ // otherwise, try to read one more byte; if that failed we're done too ++ if (n < 0 || (n = source.read()) < 0) ++ break; ++ ++ // one more byte was read; need to allocate a larger buffer ++ if (capacity <= MAX_BUFFER_SIZE - capacity) { ++ capacity = Math.max(capacity << 1, BUFFER_SIZE); ++ } else { ++ if (capacity == MAX_BUFFER_SIZE) ++ throw new OutOfMemoryError("Required array size too large"); ++ capacity = MAX_BUFFER_SIZE; + } ++ buf = Arrays.copyOf(buf, capacity); ++ buf[nread++] = (byte)n; + } + return (capacity == nread) ? buf : Arrays.copyOf(buf, nread); + } + + /** +- * Read all the bytes from a file. The method ensures that the file is ++ * Reads all the bytes from a file. The method ensures that the file is + * closed when all bytes have been read or an I/O error, or other runtime + * exception, is thrown. + * +@@ -2954,12 +2978,13 @@ + * method is invoked to check read access to the file. + */ + public static byte[] readAllBytes(Path path) throws IOException { +- long size = size(path); +- if (size > (long)Integer.MAX_VALUE) +- throw new OutOfMemoryError("Required array size too large"); ++ try (SeekableByteChannel sbc = Files.newByteChannel(path); ++ InputStream in = Channels.newInputStream(sbc)) { ++ long size = sbc.size(); ++ if (size > (long)MAX_BUFFER_SIZE) ++ throw new OutOfMemoryError("Required array size too large"); + +- try (InputStream in = newInputStream(path)) { +- return read(in, (int)size); ++ return read(in, (int)size); + } + } + +--- ./jdk/src/share/classes/java/util/ComparableTimSort.java 2013-09-06 11:28:15.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/ComparableTimSort.java 2014-06-06 19:56:29.000000000 -0700 +@@ -131,7 +131,7 @@ + */ + int stackLen = (len < 120 ? 5 : + len < 1542 ? 10 : +- len < 119151 ? 19 : 40); ++ len < 119151 ? 24 : 40); + runBase = new int[stackLen]; + runLen = new int[stackLen]; + } +--- ./jdk/src/share/classes/java/util/HashMap.java 2013-09-06 11:28:15.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/HashMap.java 2014-06-06 19:56:29.000000000 -0700 +@@ -300,13 +300,9 @@ + + private static int roundUpToPowerOf2(int number) { + // assert number >= 0 : "number must be non-negative"; +- int rounded = number >= MAXIMUM_CAPACITY ++ return number >= MAXIMUM_CAPACITY + ? MAXIMUM_CAPACITY +- : (rounded = Integer.highestOneBit(number)) != 0 +- ? (Integer.bitCount(number) > 1) ? rounded << 1 : rounded +- : 1; +- +- return rounded; ++ : (number > 1) ? Integer.highestOneBit((number - 1) << 1) : 1; + } + + /** +--- ./jdk/src/share/classes/java/util/ServiceLoader.java 2013-09-06 11:28:15.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/ServiceLoader.java 2014-04-19 01:27:13.000000000 -0700 @@ -375,7 +375,7 @@ return p; } catch (Throwable x) { @@ -33747,8 +60983,19 @@ x); } throw new Error(); // This cannot happen ---- jdk/src/share/classes/java/util/TimeZone.java 2013-09-06 11:28:15.000000000 -0700 -+++ jdk/src/share/classes/java/util/TimeZone.java 2014-04-20 12:39:18.000000000 -0700 +--- ./jdk/src/share/classes/java/util/TimSort.java 2013-09-06 11:28:15.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/TimSort.java 2014-06-06 19:56:29.000000000 -0700 +@@ -158,7 +158,7 @@ + */ + int stackLen = (len < 120 ? 5 : + len < 1542 ? 10 : +- len < 119151 ? 19 : 40); ++ len < 119151 ? 24 : 40); + runBase = new int[stackLen]; + runLen = new int[stackLen]; + } +--- ./jdk/src/share/classes/java/util/TimeZone.java 2013-09-06 11:28:15.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/TimeZone.java 2014-06-06 19:56:34.000000000 -0700 @@ -165,6 +165,11 @@ // Proclaim serialization compatibility with JDK 1.1 static final long serialVersionUID = 3581463369166924961L; @@ -33756,7 +61003,7 @@ + // TimeZone.setDefault maintains the compatible behavior of the AppContext-based + // default setting for untrusted code if allowSetDefault is true. + private static final boolean allowSetDefault = AccessController.doPrivileged( -+ new sun.security.action.GetPropertyAction("jdk.util.TimeZone.allowSetDefault")) != null; ++ new sun.security.action.GetPropertyAction("jdk.util.TimeZone.allowSetDefault")) != null; + /** * Gets the time zone offset, for current date, modified in case of @@ -33779,7 +61026,7 @@ * * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't * been loaded. If so, it implies that AWTSecurityManager is not our -@@ -726,18 +735,20 @@ +@@ -726,14 +735,15 @@ * This works around a build time issue. */ private static TimeZone getDefaultInAppContext() { @@ -33791,28 +61038,19 @@ - if (!javaAWTAccess.isDisposed()) { - TimeZone tz = (TimeZone) - javaAWTAccess.get(TimeZone.class); -- if (tz == null && javaAWTAccess.isMainAppContext()) { -- return mainAppContextDefault; -- } else { -- return tz; + if (allowSetDefault) { + // JavaAWTAccess provides access implementation-private methods without using reflection. + JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); -+ if (javaAWTAccess == null) { ++ if (System.getSecurityManager() == null || javaAWTAccess == null) { + return mainAppContextDefault; ++ } else if (javaAWTAccess.isDisposed()) { ++ return null; + } else { -+ if (!javaAWTAccess.isDisposed()) { -+ TimeZone tz = (TimeZone) -+ javaAWTAccess.get(TimeZone.class); -+ if (tz == null && javaAWTAccess.isMainAppContext()) { -+ return mainAppContextDefault; -+ } else { -+ return tz; -+ } - } - } - } -@@ -745,9 +756,9 @@ ++ TimeZone tz = (TimeZone) javaAWTAccess.get(TimeZone.class); + if (tz == null && javaAWTAccess.isMainAppContext()) { + return mainAppContextDefault; + } else { +@@ -745,9 +755,9 @@ } /** @@ -33825,7 +61063,7 @@ * AppContext otherwise. * * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't -@@ -756,15 +767,17 @@ +@@ -756,12 +766,12 @@ * This works around a build time issue. */ private static void setDefaultInAppContext(TimeZone tz) { @@ -33835,24 +61073,16 @@ - mainAppContextDefault = tz; - } else { - if (!javaAWTAccess.isDisposed()) { -- javaAWTAccess.put(TimeZone.class, tz); -- if (javaAWTAccess.isMainAppContext()) { -- mainAppContextDefault = null; + if (allowSetDefault) { + // JavaAWTAccess provides access implementation-private methods without using reflection. + JavaAWTAccess javaAWTAccess = SharedSecrets.getJavaAWTAccess(); -+ if (javaAWTAccess == null) { ++ if (System.getSecurityManager() == null || javaAWTAccess == null) { + mainAppContextDefault = tz; -+ } else { -+ if (!javaAWTAccess.isDisposed()) { -+ javaAWTAccess.put(TimeZone.class, tz); -+ if (javaAWTAccess.isMainAppContext()) { -+ mainAppContextDefault = null; -+ } - } - } - } -@@ -907,15 +920,13 @@ ++ } else if (!javaAWTAccess.isDisposed()) { + javaAWTAccess.put(TimeZone.class, tz); + if (javaAWTAccess.isMainAppContext()) { + mainAppContextDefault = null; +@@ -907,15 +917,13 @@ } int gmtOffset = (hours * 60 + num) * 60 * 1000; @@ -33869,9 +61099,70 @@ } return zi; } ---- jdk/src/share/classes/java/util/jar/JarVerifier.java 2013-09-06 11:28:16.000000000 -0700 -+++ jdk/src/share/classes/java/util/jar/JarVerifier.java 2014-04-20 12:39:18.000000000 -0700 -@@ -169,7 +169,9 @@ +--- ./jdk/src/share/classes/java/util/jar/JarFile.java 2013-09-06 11:28:16.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/jar/JarFile.java 2014-06-06 19:56:29.000000000 -0700 +@@ -38,6 +38,7 @@ + import sun.security.action.GetPropertyAction; + import sun.security.util.ManifestEntryVerifier; + import sun.misc.SharedSecrets; ++import sun.security.util.SignatureFileVerifier; + + /** + * The JarFile class is used to read the contents of a jar file +@@ -329,11 +330,13 @@ + String[] names = getMetaInfEntryNames(); + if (names != null) { + for (int i = 0; i < names.length; i++) { +- JarEntry e = getJarEntry(names[i]); +- if (e == null) { +- throw new JarException("corrupted jar file"); +- } +- if (!e.isDirectory()) { ++ String uname = names[i].toUpperCase(Locale.ENGLISH); ++ if (MANIFEST_NAME.equals(uname) ++ || SignatureFileVerifier.isBlockOrSF(uname)) { ++ JarEntry e = getJarEntry(names[i]); ++ if (e == null) { ++ throw new JarException("corrupted jar file"); ++ } + if (mev == null) { + mev = new ManifestEntryVerifier + (getManifestFromReference()); +--- ./jdk/src/share/classes/java/util/jar/JarVerifier.java 2013-09-06 11:28:16.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/jar/JarVerifier.java 2014-06-06 19:56:29.000000000 -0700 +@@ -32,6 +32,7 @@ + import java.security.cert.CertificateException; + import java.util.zip.ZipEntry; + ++import sun.misc.JarIndex; + import sun.security.util.ManifestDigester; + import sun.security.util.ManifestEntryVerifier; + import sun.security.util.SignatureFileVerifier; +@@ -139,13 +140,22 @@ + return; + } + ++ if (uname.equals(JarFile.MANIFEST_NAME) || ++ uname.equals(JarIndex.INDEX_NAME)) { ++ return; ++ } ++ + if (SignatureFileVerifier.isBlockOrSF(uname)) { + /* We parse only DSA, RSA or EC PKCS7 blocks. */ + parsingBlockOrSF = true; + baos.reset(); + mev.setEntry(null, je); ++ return; + } +- return; ++ ++ // If a META-INF entry is not MF or block or SF, they should ++ // be normal entries. According to 2 above, no more block or ++ // SF will appear. Let's doneWithMeta. + } + } + +@@ -169,7 +179,9 @@ name = name.substring(1); // only set the jev object for entries that have a signature @@ -33882,7 +61173,7 @@ mev.setEntry(name, je); return; } -@@ -675,6 +677,8 @@ +@@ -675,6 +687,8 @@ } else { matchUnsigned = true; } @@ -33891,7 +61182,7 @@ } } -@@ -777,23 +781,7 @@ +@@ -777,23 +791,7 @@ // true if file is part of the signature mechanism itself static boolean isSigningRelated(String name) { @@ -33916,9 +61207,163 @@ } private Enumeration unsignedEntryNames(JarFile jar) { ---- jdk/src/share/classes/java/util/logging/LogManager.java 2013-09-06 11:28:16.000000000 -0700 -+++ jdk/src/share/classes/java/util/logging/LogManager.java 2014-04-20 12:39:18.000000000 -0700 -@@ -257,6 +257,11 @@ +--- ./jdk/src/share/classes/java/util/logging/Level.java 2013-09-06 11:28:16.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/logging/Level.java 2014-06-06 19:56:30.000000000 -0700 +@@ -27,6 +27,7 @@ + import java.util.ArrayList; + import java.util.HashMap; + import java.util.List; ++import java.util.Locale; + import java.util.Map; + import java.util.ResourceBundle; + +@@ -63,7 +64,7 @@ + */ + + public class Level implements java.io.Serializable { +- private static String defaultBundle = "sun.util.logging.resources.logging"; ++ private static final String defaultBundle = "sun.util.logging.resources.logging"; + + /** + * @serial The non-localized name of the level. +@@ -81,7 +82,8 @@ + private final String resourceBundleName; + + // localized level name +- private String localizedLevelName; ++ private transient String localizedLevelName; ++ private transient Locale cachedLocale; + + /** + * OFF is a special level that can be used to turn off logging. +@@ -209,6 +211,7 @@ + this.value = value; + this.resourceBundleName = resourceBundleName; + this.localizedLevelName = resourceBundleName == null ? name : null; ++ this.cachedLocale = null; + KnownLevel.add(this); + } + +@@ -250,17 +253,71 @@ + return this.name; + } + +- final synchronized String getLocalizedLevelName() { ++ private String computeLocalizedLevelName(Locale newLocale) { ++ ResourceBundle rb = ResourceBundle.getBundle(resourceBundleName, newLocale); ++ final String localizedName = rb.getString(name); ++ ++ final boolean isDefaultBundle = defaultBundle.equals(resourceBundleName); ++ if (!isDefaultBundle) return localizedName; ++ ++ // This is a trick to determine whether the name has been translated ++ // or not. If it has not been translated, we need to use Locale.ROOT ++ // when calling toUpperCase(). ++ final Locale rbLocale = rb.getLocale(); ++ final Locale locale = ++ Locale.ROOT.equals(rbLocale) ++ || name.equals(localizedName.toUpperCase(Locale.ROOT)) ++ ? Locale.ROOT : rbLocale; ++ ++ // ALL CAPS in a resource bundle's message indicates no translation ++ // needed per Oracle translation guideline. To workaround this ++ // in Oracle JDK implementation, convert the localized level name ++ // to uppercase for compatibility reason. ++ return Locale.ROOT.equals(locale) ? name : localizedName.toUpperCase(locale); ++ } ++ ++ // Avoid looking up the localizedLevelName twice if we already ++ // have it. ++ final String getCachedLocalizedLevelName() { ++ + if (localizedLevelName != null) { +- return localizedLevelName; ++ if (cachedLocale != null) { ++ if (cachedLocale.equals(Locale.getDefault())) { ++ // OK: our cached value was looked up with the same ++ // locale. We can use it. ++ return localizedLevelName; ++ } ++ } ++ } ++ ++ if (resourceBundleName == null) { ++ // No resource bundle: just use the name. ++ return name; ++ } ++ ++ // We need to compute the localized name. ++ // Either because it's the first time, or because our cached ++ // value is for a different locale. Just return null. ++ return null; ++ } ++ ++ final synchronized String getLocalizedLevelName() { ++ ++ // See if we have a cached localized name ++ final String cachedLocalizedName = getCachedLocalizedLevelName(); ++ if (cachedLocalizedName != null) { ++ return cachedLocalizedName; + } + ++ // No cached localized name or cache invalid. ++ // Need to compute the localized name. ++ final Locale newLocale = Locale.getDefault(); + try { +- ResourceBundle rb = ResourceBundle.getBundle(resourceBundleName); +- localizedLevelName = rb.getString(name); ++ localizedLevelName = computeLocalizedLevelName(newLocale); + } catch (Exception ex) { + localizedLevelName = name; + } ++ cachedLocale = newLocale; + return localizedLevelName; + } + +@@ -318,6 +375,7 @@ + * + * @return the non-localized name of the Level, for example "INFO". + */ ++ @Override + public final String toString() { + return name; + } +@@ -420,6 +478,7 @@ + * Compare two objects for value equality. + * @return true if and only if the two objects have the same level value. + */ ++ @Override + public boolean equals(Object ox) { + try { + Level lx = (Level)ox; +@@ -433,6 +492,7 @@ + * Generate a hashcode. + * @return a hashcode based on the level value + */ ++ @Override + public int hashCode() { + return this.value; + } +--- ./jdk/src/share/classes/java/util/logging/LogManager.java 2013-09-06 11:28:16.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/logging/LogManager.java 2014-06-06 19:56:30.000000000 -0700 +@@ -149,7 +149,15 @@ + // The global LogManager object + private static LogManager manager; + +- private Properties props = new Properties(); ++ // 'props' is assigned within a lock but accessed without it. ++ // Declaring it volatile makes sure that another thread will not ++ // be able to see a partially constructed 'props' object. ++ // (seeing a partially constructed 'props' object can result in ++ // NPE being thrown in Hashtable.get(), because it leaves the door ++ // open for props.getProperties() to be called before the construcor ++ // of Hashtable is actually completed). ++ private volatile Properties props = new Properties(); ++ + private PropertyChangeSupport changes + = new PropertyChangeSupport(LogManager.class); + private final static Level defaultLevel = Level.INFO; +@@ -257,6 +265,11 @@ * retrieved by calling Logmanager.getLogManager. */ protected LogManager() { @@ -33930,7 +61375,7 @@ // Add a shutdown hook to close the global handlers. try { Runtime.getRuntime().addShutdownHook(new Cleaner()); -@@ -266,6 +271,19 @@ +@@ -266,6 +279,19 @@ } } @@ -33950,7 +61395,7 @@ /** * Return the global LogManager object. */ -@@ -345,6 +363,9 @@ +@@ -345,6 +371,9 @@ changes.removePropertyChangeListener(l); } @@ -33960,7 +61405,7 @@ // Returns the LoggerContext for the user code (i.e. application or AppContext). // Loggers are isolated from each AppContext. private LoggerContext getUserContext() { -@@ -353,33 +374,28 @@ +@@ -353,33 +382,28 @@ SecurityManager sm = System.getSecurityManager(); JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess(); if (sm != null && javaAwtAccess != null) { @@ -34009,7 +61454,7 @@ return context != null ? context : userContext; } -@@ -406,7 +422,7 @@ +@@ -406,7 +430,7 @@ Logger result = getLogger(name); if (result == null) { // only allocate the new logger once @@ -34018,7 +61463,7 @@ do { if (addLogger(newLogger)) { // We successfully added the new Logger that we -@@ -453,12 +469,12 @@ +@@ -453,12 +477,12 @@ } while (logger == null); // LogManager will set the sysLogger's handlers via LogManager.addLogger method. @@ -34033,7 +61478,40 @@ sysLogger.addHandler(hdl); } return null; -@@ -742,7 +758,7 @@ +@@ -524,7 +548,7 @@ + if (logger == null) { + // Hashtable holds stale weak reference + // to a logger which has been GC-ed. +- removeLogger(name); ++ ref.dispose(); + } + return logger; + } +@@ -611,7 +635,7 @@ + // It's possible that the Logger was GC'ed after a + // drainLoggerRefQueueBounded() call so allow + // a new one to be registered. +- removeLogger(name); ++ ref.dispose(); + } else { + // We already have a registered logger with the given name. + return false; +@@ -657,10 +681,10 @@ + return true; + } + +- // note: all calls to removeLogger are synchronized on LogManager's +- // intrinsic lock +- void removeLogger(String name) { +- namedLoggers.remove(name); ++ synchronized void removeLoggerRef(String name, LoggerWeakRef ref) { ++ if (namedLoggers.get(name) == ref) { ++ namedLoggers.remove(name); ++ } + } + + synchronized Enumeration getLoggerNames() { +@@ -742,7 +766,7 @@ Logger result = findLogger(name); if (result == null) { // only allocate the new system logger once @@ -34042,7 +61520,78 @@ do { if (addLocalLogger(newLogger)) { // We successfully added the new Logger that we -@@ -1407,31 +1423,35 @@ +@@ -838,6 +862,7 @@ + private String name; // for namedLoggers cleanup + private LogNode node; // for loggerRef cleanup + private WeakReference parentRef; // for kids cleanup ++ private boolean disposed = false; // avoid calling dispose twice + + LoggerWeakRef(Logger logger) { + super(logger, loggerRefQueue); +@@ -847,14 +872,45 @@ + + // dispose of this LoggerWeakRef object + void dispose() { +- if (node != null) { +- // if we have a LogNode, then we were a named Logger +- // so clear namedLoggers weak ref to us +- node.context.removeLogger(name); +- name = null; // clear our ref to the Logger's name +- +- node.loggerRef = null; // clear LogNode's weak ref to us +- node = null; // clear our ref to LogNode ++ // Avoid calling dispose twice. When a Logger is gc'ed, its ++ // LoggerWeakRef will be enqueued. ++ // However, a new logger of the same name may be added (or looked ++ // up) before the queue is drained. When that happens, dispose() ++ // will be called by addLocalLogger() or findLogger(). ++ // Later when the queue is drained, dispose() will be called again ++ // for the same LoggerWeakRef. Marking LoggerWeakRef as disposed ++ // avoids processing the data twice (even though the code should ++ // now be reentrant). ++ synchronized(this) { ++ // Note to maintainers: ++ // Be careful not to call any method that tries to acquire ++ // another lock from within this block - as this would surely ++ // lead to deadlocks, given that dispose() can be called by ++ // multiple threads, and from within different synchronized ++ // methods/blocks. ++ if (disposed) return; ++ disposed = true; ++ } ++ ++ final LogNode n = node; ++ if (n != null) { ++ // n.loggerRef can only be safely modified from within ++ // a lock on LoggerContext. removeLoggerRef is already ++ // synchronized on LoggerContext so calling ++ // n.context.removeLoggerRef from within this lock is safe. ++ synchronized (n.context) { ++ // if we have a LogNode, then we were a named Logger ++ // so clear namedLoggers weak ref to us ++ n.context.removeLoggerRef(name, this); ++ name = null; // clear our ref to the Logger's name ++ ++ // LogNode may have been reused - so only clear ++ // LogNode.loggerRef if LogNode.loggerRef == this ++ if (n.loggerRef == this) { ++ n.loggerRef = null; // clear LogNode's weak ref to us ++ } ++ node = null; // clear our ref to LogNode ++ } + } + + if (parentRef != null) { +@@ -907,7 +963,7 @@ + // - maximum: 10.9 ms + // + private final static int MAX_ITERATIONS = 400; +- final synchronized void drainLoggerRefQueueBounded() { ++ final void drainLoggerRefQueueBounded() { + for (int i = 0; i < MAX_ITERATIONS; i++) { + if (loggerRefQueue == null) { + // haven't finished loading LogManager yet +@@ -1407,31 +1463,35 @@ // We use a subclass of Logger for the root logger, so // that we only instantiate the global handlers when they // are first needed. @@ -34082,9 +61631,14 @@ } } ---- jdk/src/share/classes/java/util/logging/Logger.java 2013-09-06 11:28:16.000000000 -0700 -+++ jdk/src/share/classes/java/util/logging/Logger.java 2014-04-20 12:39:18.000000000 -0700 -@@ -178,7 +178,7 @@ +--- ./jdk/src/share/classes/java/util/logging/Logger.java 2013-09-06 11:28:16.000000000 -0700 ++++ ./jdk/src/share/classes/java/util/logging/Logger.java 2014-06-06 19:56:30.000000000 -0700 +@@ -174,11 +174,11 @@ + public class Logger { + private static final Handler emptyHandlers[] = new Handler[0]; + private static final int offValue = Level.OFF.intValue(); +- private LogManager manager; ++ private volatile LogManager manager; private String name; private final CopyOnWriteArrayList handlers = new CopyOnWriteArrayList<>(); @@ -34181,7 +61735,17 @@ return handlers.toArray(emptyHandlers); } -@@ -1669,11 +1685,13 @@ +@@ -1557,6 +1573,9 @@ + if (parent == null) { + throw new NullPointerException(); + } ++ if (manager == null) { ++ manager = LogManager.getLogManager(); ++ } + manager.checkPermission(); + doSetParent(parent); + } +@@ -1669,11 +1688,13 @@ private String getEffectiveResourceBundleName() { Logger target = this; while (target != null) { @@ -34197,8 +61761,8 @@ } return null; } ---- jdk/src/share/classes/javax/management/BadAttributeValueExpException.java 2013-09-06 11:28:18.000000000 -0700 -+++ jdk/src/share/classes/javax/management/BadAttributeValueExpException.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/BadAttributeValueExpException.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/BadAttributeValueExpException.java 2013-12-01 11:14:30.000000000 -0800 @@ -25,6 +25,9 @@ package javax.management; @@ -34244,9 +61808,143 @@ + } + } } ---- jdk/src/share/classes/javax/management/MBeanNotificationInfo.java 2013-09-06 11:28:18.000000000 -0700 -+++ jdk/src/share/classes/javax/management/MBeanNotificationInfo.java 2014-04-20 12:39:19.000000000 -0700 -@@ -25,6 +25,9 @@ +--- ./jdk/src/share/classes/javax/management/MBeanAttributeInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanAttributeInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -30,6 +30,7 @@ + + import com.sun.jmx.mbeanserver.GetPropertyAction; + import com.sun.jmx.mbeanserver.Introspector; ++import java.util.Objects; + + + /** +@@ -285,10 +286,10 @@ + if (!(o instanceof MBeanAttributeInfo)) + return false; + MBeanAttributeInfo p = (MBeanAttributeInfo) o; +- return (p.getName().equals(getName()) && +- p.getType().equals(getType()) && +- p.getDescription().equals(getDescription()) && +- p.getDescriptor().equals(getDescriptor()) && ++ return (Objects.equals(p.getName(), getName()) && ++ Objects.equals(p.getType(), getType()) && ++ Objects.equals(p.getDescription(), getDescription()) && ++ Objects.equals(p.getDescriptor(), getDescriptor()) && + p.isReadable() == isReadable() && + p.isWritable() == isWritable() && + p.isIs() == isIs()); +@@ -301,7 +302,7 @@ + right and we needlessly hashed in the description and parameter + array. */ + public int hashCode() { +- return getName().hashCode() ^ getType().hashCode(); ++ return Objects.hash(getName(), getType()); + } + + private static boolean isIs(Method getter) { +--- ./jdk/src/share/classes/javax/management/MBeanConstructorInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanConstructorInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -29,6 +29,7 @@ + import java.lang.annotation.Annotation; + import java.lang.reflect.Constructor; + import java.util.Arrays; ++import java.util.Objects; + + /** + * Describes a constructor exposed by an MBean. Instances of this +@@ -190,10 +191,10 @@ + if (!(o instanceof MBeanConstructorInfo)) + return false; + MBeanConstructorInfo p = (MBeanConstructorInfo) o; +- return (p.getName().equals(getName()) && +- p.getDescription().equals(getDescription()) && ++ return (Objects.equals(p.getName(), getName()) && ++ Objects.equals(p.getDescription(), getDescription()) && + Arrays.equals(p.fastGetSignature(), fastGetSignature()) && +- p.getDescriptor().equals(getDescriptor())); ++ Objects.equals(p.getDescriptor(), getDescriptor())); + } + + /* Unlike attributes and operations, it's quite likely we'll have +@@ -203,11 +204,7 @@ + quite long and yet the same between constructors. Likewise for + the descriptor. */ + public int hashCode() { +- int hash = getName().hashCode(); +- MBeanParameterInfo[] sig = fastGetSignature(); +- for (int i = 0; i < sig.length; i++) +- hash ^= sig[i].hashCode(); +- return hash; ++ return Objects.hash(getName()) ^ Arrays.hashCode(fastGetSignature()); + } + + private static MBeanParameterInfo[] constructorSignature(Constructor cn) { +--- ./jdk/src/share/classes/javax/management/MBeanFeatureInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanFeatureInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -30,6 +30,7 @@ + import java.io.ObjectOutputStream; + import java.io.Serializable; + import java.io.StreamCorruptedException; ++import java.util.Objects; + + /** + *

Provides general information for an MBean descriptor object. +@@ -147,9 +148,9 @@ + if (!(o instanceof MBeanFeatureInfo)) + return false; + MBeanFeatureInfo p = (MBeanFeatureInfo) o; +- return (p.getName().equals(getName()) && +- p.getDescription().equals(getDescription()) && +- p.getDescriptor().equals(getDescriptor())); ++ return (Objects.equals(p.getName(), getName()) && ++ Objects.equals(p.getDescription(), getDescription()) && ++ Objects.equals(p.getDescriptor(), getDescriptor())); + } + + public int hashCode() { +--- ./jdk/src/share/classes/javax/management/MBeanInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -36,6 +36,7 @@ + import java.util.WeakHashMap; + import java.security.AccessController; + import java.security.PrivilegedAction; ++import java.util.Objects; + + import static javax.management.ImmutableDescriptor.nonNullDescriptor; + +@@ -515,24 +516,15 @@ + if (hashCode != 0) + return hashCode; + +- hashCode = +- getClassName().hashCode() ^ +- getDescriptor().hashCode() ^ +- arrayHashCode(fastGetAttributes()) ^ +- arrayHashCode(fastGetOperations()) ^ +- arrayHashCode(fastGetConstructors()) ^ +- arrayHashCode(fastGetNotifications()); ++ hashCode = Objects.hash(getClassName(), getDescriptor()) ++ ^ Arrays.hashCode(fastGetAttributes()) ++ ^ Arrays.hashCode(fastGetOperations()) ++ ^ Arrays.hashCode(fastGetConstructors()) ++ ^ Arrays.hashCode(fastGetNotifications()); + + return hashCode; + } + +- private static int arrayHashCode(Object[] array) { +- int hash = 0; +- for (int i = 0; i < array.length; i++) +- hash ^= array[i].hashCode(); +- return hash; +- } +- + /** + * Cached results of previous calls to arrayGettersSafe. This is + * a WeakHashMap so that we don't prevent a class from being +--- ./jdk/src/share/classes/javax/management/MBeanNotificationInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanNotificationInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -25,7 +25,11 @@ package javax.management; @@ -34254,9 +61952,11 @@ +import java.io.InvalidObjectException; +import java.io.ObjectInputStream; import java.util.Arrays; ++import java.util.Objects; /** -@@ -67,7 +70,7 @@ + *

The MBeanNotificationInfo class is used to describe the +@@ -67,7 +71,7 @@ /** * @serial The different types of the notification. */ @@ -34265,7 +61965,7 @@ /** @see MBeanInfo#arrayGettersSafe */ private final transient boolean arrayGettersSafe; -@@ -114,9 +117,8 @@ +@@ -114,9 +118,8 @@ notifType, though it doesn't explicitly allow it either. */ @@ -34277,7 +61977,20 @@ this.arrayGettersSafe = MBeanInfo.arrayGettersSafe(this.getClass(), MBeanNotificationInfo.class); -@@ -203,4 +205,11 @@ +@@ -191,9 +194,9 @@ + if (!(o instanceof MBeanNotificationInfo)) + return false; + MBeanNotificationInfo p = (MBeanNotificationInfo) o; +- return (p.getName().equals(getName()) && +- p.getDescription().equals(getDescription()) && +- p.getDescriptor().equals(getDescriptor()) && ++ return (Objects.equals(p.getName(), getName()) && ++ Objects.equals(p.getDescription(), getDescription()) && ++ Objects.equals(p.getDescriptor(), getDescriptor()) && + Arrays.equals(p.fastGetNotifTypes(), fastGetNotifTypes())); + } + +@@ -203,4 +206,11 @@ hash ^= types[i].hashCode(); return hash; } @@ -34289,8 +62002,74 @@ + types = (t != null && t.length != 0) ? t.clone() : NO_TYPES; + } } ---- jdk/src/share/classes/javax/management/MBeanTrustPermission.java 2013-09-06 11:28:18.000000000 -0700 -+++ jdk/src/share/classes/javax/management/MBeanTrustPermission.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/MBeanOperationInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanOperationInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -29,6 +29,7 @@ + import java.lang.annotation.Annotation; + import java.lang.reflect.Method; + import java.util.Arrays; ++import java.util.Objects; + + /** + * Describes a management operation exposed by an MBean. Instances of +@@ -293,12 +294,12 @@ + if (!(o instanceof MBeanOperationInfo)) + return false; + MBeanOperationInfo p = (MBeanOperationInfo) o; +- return (p.getName().equals(getName()) && +- p.getReturnType().equals(getReturnType()) && +- p.getDescription().equals(getDescription()) && ++ return (Objects.equals(p.getName(), getName()) && ++ Objects.equals(p.getReturnType(), getReturnType()) && ++ Objects.equals(p.getDescription(), getDescription()) && + p.getImpact() == getImpact() && + Arrays.equals(p.fastGetSignature(), fastGetSignature()) && +- p.getDescriptor().equals(getDescriptor())); ++ Objects.equals(p.getDescriptor(), getDescriptor())); + } + + /* We do not include everything in the hashcode. We assume that +@@ -309,7 +310,7 @@ + parameter array. */ + @Override + public int hashCode() { +- return getName().hashCode() ^ getReturnType().hashCode(); ++ return Objects.hash(getName(), getReturnType()); + } + + private static MBeanParameterInfo[] methodSignature(Method method) { +--- ./jdk/src/share/classes/javax/management/MBeanParameterInfo.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanParameterInfo.java 2014-06-06 19:56:30.000000000 -0700 +@@ -25,6 +25,8 @@ + + package javax.management; + ++import java.util.Objects; ++ + + /** + * Describes an argument of an operation exposed by an MBean. +@@ -136,13 +138,13 @@ + if (!(o instanceof MBeanParameterInfo)) + return false; + MBeanParameterInfo p = (MBeanParameterInfo) o; +- return (p.getName().equals(getName()) && +- p.getType().equals(getType()) && +- p.getDescription().equals(getDescription()) && +- p.getDescriptor().equals(getDescriptor())); ++ return (Objects.equals(p.getName(), getName()) && ++ Objects.equals(p.getType(), getType()) && ++ Objects.equals(p.getDescription(), getDescription()) && ++ Objects.equals(p.getDescriptor(), getDescriptor())); + } + + public int hashCode() { +- return getName().hashCode() ^ getType().hashCode(); ++ return Objects.hash(getName(), getType()); + } + } +--- ./jdk/src/share/classes/javax/management/MBeanTrustPermission.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/MBeanTrustPermission.java 2013-12-01 11:14:30.000000000 -0800 @@ -26,6 +26,9 @@ package javax.management; @@ -34339,8 +62118,8 @@ + } } } ---- jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2013-09-06 11:28:18.000000000 -0700 -+++ jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2013-09-06 11:28:18.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2013-12-01 11:14:30.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. @@ -34372,8 +62151,91 @@ -} \ No newline at end of file +} ---- jdk/src/share/classes/javax/management/remote/JMXPrincipal.java 2013-09-06 11:28:19.000000000 -0700 -+++ jdk/src/share/classes/javax/management/remote/JMXPrincipal.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/openmbean/OpenMBeanInfoSupport.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/openmbean/OpenMBeanInfoSupport.java 2014-06-06 19:56:30.000000000 -0700 +@@ -31,6 +31,7 @@ + // + import java.util.Arrays; + import java.util.HashSet; ++import java.util.Objects; + + import javax.management.Descriptor; + import javax.management.MBeanAttributeInfo; +@@ -269,8 +270,9 @@ + // + + // their MBean className should be equal +- if ( ! this.getClassName().equals(other.getClassName()) ) ++ if (!Objects.equals(this.getClassName(), other.getClassName())) { + return false; ++ } + + // their infos on attributes should be equal (order not + // significant => equality between sets, not arrays or lists) +@@ -342,7 +344,9 @@ + // + if (myHashCode == null) { + int value = 0; +- value += this.getClassName().hashCode(); ++ if (this.getClassName() != null) { ++ value += this.getClassName().hashCode(); ++ } + value += arraySetHash(this.getAttributes()); + value += arraySetHash(this.getConstructors()); + value += arraySetHash(this.getOperations()); +--- ./jdk/src/share/classes/javax/management/relation/RelationNotification.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/relation/RelationNotification.java 2014-06-06 19:56:30.000000000 -0700 +@@ -260,7 +260,7 @@ + + super(notifType, sourceObj, sequence, timeStamp, message); + +- if (!isValidBasic(notifType,sourceObj,id,typeName) || !isValidCreate(notifType)) { ++ if (!isValidBasicStrict(notifType,sourceObj,id,typeName) || !isValidCreate(notifType)) { + throw new IllegalArgumentException("Invalid parameter."); + } + +@@ -310,7 +310,7 @@ + + super(notifType, sourceObj, sequence, timeStamp, message); + +- if (!isValidBasic(notifType,sourceObj,id,typeName) || !isValidUpdate(notifType,name,newValue,oldValue)) { ++ if (!isValidBasicStrict(notifType,sourceObj,id,typeName) || !isValidUpdate(notifType,name,newValue,oldValue)) { + throw new IllegalArgumentException("Invalid parameter."); + } + +@@ -457,14 +457,26 @@ + // - no role old value (for role update) + // - no role new value (for role update) + ++ // Despite the fact, that validation in constructor of RelationNotification prohibit ++ // creation of the class instance with null sourceObj its possible to set it to null later ++ // by public setSource() method. ++ // So we should relax validation rules to preserve serialization behavior compatibility. ++ ++ private boolean isValidBasicStrict(String notifType, Object sourceObj, String id, String typeName){ ++ if (sourceObj == null) { ++ return false; ++ } ++ return isValidBasic(notifType,sourceObj,id,typeName); ++ } ++ + private boolean isValidBasic(String notifType, Object sourceObj, String id, String typeName){ +- if (notifType == null || sourceObj == null || +- id == null || typeName == null) { ++ if (notifType == null || id == null || typeName == null) { + return false; + } + +- if (!(sourceObj instanceof RelationService) && +- !(sourceObj instanceof ObjectName)) { ++ if (sourceObj != null && ( ++ !(sourceObj instanceof RelationService) && ++ !(sourceObj instanceof ObjectName))) { + return false; + } + +--- ./jdk/src/share/classes/javax/management/remote/JMXPrincipal.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/remote/JMXPrincipal.java 2013-12-01 11:14:30.000000000 -0800 @@ -26,6 +26,9 @@ package javax.management.remote; @@ -34416,8 +62278,8 @@ + throw new NullPointerException("illegal null input"); + } } ---- jdk/src/share/classes/javax/management/remote/JMXServiceURL.java 2013-09-06 11:28:19.000000000 -0700 -+++ jdk/src/share/classes/javax/management/remote/JMXServiceURL.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/remote/JMXServiceURL.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/remote/JMXServiceURL.java 2013-12-01 11:14:30.000000000 -0800 @@ -29,6 +29,9 @@ import com.sun.jmx.remote.util.ClassLogger; @@ -34577,8 +62439,8 @@ /** * Cached result of {@link #toString()}. ---- jdk/src/share/classes/javax/management/remote/NotificationResult.java 2013-09-06 11:28:19.000000000 -0700 -+++ jdk/src/share/classes/javax/management/remote/NotificationResult.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/remote/NotificationResult.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/remote/NotificationResult.java 2013-12-01 11:14:30.000000000 -0800 @@ -25,6 +25,9 @@ package javax.management.remote; @@ -34652,8 +62514,8 @@ + notifications have been lost. */ + } } ---- jdk/src/share/classes/javax/management/remote/TargetedNotification.java 2013-09-06 11:28:19.000000000 -0700 -+++ jdk/src/share/classes/javax/management/remote/TargetedNotification.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/remote/TargetedNotification.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/remote/TargetedNotification.java 2013-12-01 11:14:30.000000000 -0800 @@ -26,6 +26,9 @@ package javax.management.remote; @@ -34717,8 +62579,8 @@ + } + } } ---- jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2013-09-06 11:28:19.000000000 -0700 -+++ jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2013-09-06 11:28:19.000000000 -0700 ++++ ./jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java 2014-06-06 19:56:30.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. @@ -34764,7 +62626,58 @@ public synchronized void connect(Map environment) throws IOException { final boolean tracing = logger.traceOn(); -@@ -2359,13 +2370,21 @@ +@@ -394,14 +405,7 @@ + throw new IOException("Not connected"); + } + +- MBeanServerConnection rmbsc = rmbscMap.get(delegationSubject); +- if (rmbsc != null) { +- return rmbsc; +- } +- +- rmbsc = new RemoteMBeanServerConnection(delegationSubject); +- rmbscMap.put(delegationSubject, rmbsc); +- return rmbsc; ++ return getConnectionWithSubject(delegationSubject); + } + + public void +@@ -1820,7 +1824,7 @@ + + // Initialization of transient variables. + private void initTransients() { +- rmbscMap = new WeakHashMap(); ++ rmbscMap = new WeakHashMap>(); + connected = false; + terminated = false; + +@@ -2000,6 +2004,25 @@ + private final ClassLoader loader; + } + ++ private MBeanServerConnection getConnectionWithSubject(Subject delegationSubject) { ++ MBeanServerConnection conn = null; ++ ++ if (delegationSubject == null) { ++ if (nullSubjectConnRef == null ++ || (conn = nullSubjectConnRef.get()) == null) { ++ conn = new RemoteMBeanServerConnection(null); ++ nullSubjectConnRef = new WeakReference(conn); ++ } ++ } else { ++ WeakReference wr = rmbscMap.get(delegationSubject); ++ if (wr == null || (conn = wr.get()) == null) { ++ conn = new RemoteMBeanServerConnection(delegationSubject); ++ rmbscMap.put(delegationSubject, new WeakReference(conn)); ++ } ++ } ++ return conn; ++ } ++ + /* + The following section of code avoids a class loading problem + with RMI. The problem is that an RMI stub, when deserializing +@@ -2359,13 +2382,21 @@ } } @@ -34789,8 +62702,18 @@ private static RMIConnection getConnection(RMIServer server, Object credentials, boolean checkStub) ---- jdk/src/share/classes/javax/print/SimpleDoc.java 2013-09-06 11:28:20.000000000 -0700 -+++ jdk/src/share/classes/javax/print/SimpleDoc.java 2014-04-20 12:39:19.000000000 -0700 +@@ -2540,7 +2571,8 @@ + + private transient long clientNotifSeqNo = 0; + +- private transient WeakHashMap rmbscMap; ++ private transient WeakHashMap> rmbscMap; ++ private transient WeakReference nullSubjectConnRef = null; + + private transient RMINotifClient rmiNotifClient; + // = new RMINotifClient(new Integer(0)); +--- ./jdk/src/share/classes/javax/print/SimpleDoc.java 2013-09-06 11:28:20.000000000 -0700 ++++ ./jdk/src/share/classes/javax/print/SimpleDoc.java 2014-01-18 12:16:24.000000000 -0800 @@ -91,7 +91,10 @@ Class repClass = null; @@ -34803,8 +62726,8 @@ } catch (Throwable e) { throw new IllegalArgumentException("unknown representation class"); } ---- jdk/src/share/classes/javax/script/ScriptEngineManager.java 2013-09-06 11:28:21.000000000 -0700 -+++ jdk/src/share/classes/javax/script/ScriptEngineManager.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/script/ScriptEngineManager.java 2013-09-06 11:28:21.000000000 -0700 ++++ ./jdk/src/share/classes/javax/script/ScriptEngineManager.java 2014-04-19 01:27:13.000000000 -0700 @@ -85,15 +85,18 @@ nameAssociations = new HashMap(); extensionAssociations = new HashMap(); @@ -34859,8 +62782,8 @@ } /** ---- jdk/src/share/classes/javax/security/auth/Policy.java 2013-09-06 11:28:21.000000000 -0700 -+++ jdk/src/share/classes/javax/security/auth/Policy.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/security/auth/Policy.java 2013-09-06 11:28:21.000000000 -0700 ++++ ./jdk/src/share/classes/javax/security/auth/Policy.java 2014-01-18 12:16:24.000000000 -0800 @@ -26,6 +26,10 @@ package javax.security.auth; @@ -34950,8 +62873,8 @@ } catch (Exception e) { throw new SecurityException (sun.security.util.ResourcesMgr.getString ---- jdk/src/share/classes/javax/security/auth/Subject.java 2013-09-06 11:28:21.000000000 -0700 -+++ jdk/src/share/classes/javax/security/auth/Subject.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/security/auth/Subject.java 2013-09-06 11:28:21.000000000 -0700 ++++ ./jdk/src/share/classes/javax/security/auth/Subject.java 2014-04-19 01:27:13.000000000 -0700 @@ -941,10 +941,30 @@ /** * Reads this object from a stream (i.e., deserializes it) @@ -35000,8 +62923,8 @@ } } ---- jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java 2013-09-06 11:28:21.000000000 -0700 -+++ jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java 2013-09-06 11:28:21.000000000 -0700 ++++ ./jdk/src/share/classes/javax/security/auth/kerberos/KeyTab.java 2013-12-01 11:14:30.000000000 -0800 @@ -26,6 +26,7 @@ package javax.security.auth.kerberos; @@ -35031,8 +62954,8 @@ } /** ---- jdk/src/share/classes/javax/security/auth/login/Configuration.java 2013-09-06 11:28:21.000000000 -0700 -+++ jdk/src/share/classes/javax/security/auth/login/Configuration.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/security/auth/login/Configuration.java 2013-09-06 11:28:21.000000000 -0700 ++++ ./jdk/src/share/classes/javax/security/auth/login/Configuration.java 2014-01-18 12:16:24.000000000 -0800 @@ -27,9 +27,6 @@ import javax.security.auth.AuthPermission; @@ -35109,8 +63032,8 @@ } catch (PrivilegedActionException e) { Exception ee = e.getException(); if (ee instanceof InstantiationException) { ---- jdk/src/share/classes/javax/security/auth/login/LoginContext.java 2013-09-06 11:28:21.000000000 -0700 -+++ jdk/src/share/classes/javax/security/auth/login/LoginContext.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/security/auth/login/LoginContext.java 2013-09-06 11:28:21.000000000 -0700 ++++ ./jdk/src/share/classes/javax/security/auth/login/LoginContext.java 2014-01-18 12:16:24.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. @@ -35353,8 +63276,8 @@ boolean status = ((Boolean)methods[mIndex].invoke (moduleStack[i].module, args)).booleanValue(); ---- jdk/src/share/classes/javax/sql/rowset/RowSetProvider.java 2013-09-06 11:28:22.000000000 -0700 -+++ jdk/src/share/classes/javax/sql/rowset/RowSetProvider.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/sql/rowset/RowSetProvider.java 2013-09-06 11:28:22.000000000 -0700 ++++ ./jdk/src/share/classes/javax/sql/rowset/RowSetProvider.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. @@ -35415,8 +63338,8 @@ se.printStackTrace(); } } ---- jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java 2013-09-06 11:28:22.000000000 -0700 -+++ jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java 2013-09-06 11:28:22.000000000 -0700 ++++ ./jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. @@ -35449,8 +63372,8 @@ } // get the attributes from the struct Object attribs[] = s.getAttributes(map); ---- jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java 2013-09-06 11:28:22.000000000 -0700 -+++ jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java 2013-09-06 11:28:22.000000000 -0700 ++++ ./jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. @@ -35583,8 +63506,8 @@ * there. **/ c = Class.forName(providerID, true, cl); ---- jdk/src/share/classes/javax/swing/JTable.java 2013-09-06 11:28:23.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/JTable.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/JTable.java 2013-09-06 11:28:23.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/JTable.java 2013-12-01 11:14:31.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. @@ -35632,8 +63555,8 @@ constructor = type.getConstructor(argTypes); } catch (Exception e) { ---- jdk/src/share/classes/javax/swing/SwingUtilities.java 2013-09-06 11:28:23.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/SwingUtilities.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/SwingUtilities.java 2013-09-06 11:28:23.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/SwingUtilities.java 2014-01-18 12:16:24.000000000 -0800 @@ -24,6 +24,7 @@ */ package javax.swing; @@ -35660,8 +63583,8 @@ return Class.forName(className, true, Thread.currentThread(). getContextClassLoader()); } ---- jdk/src/share/classes/javax/swing/UIDefaults.java 2013-09-06 11:28:24.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/UIDefaults.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/UIDefaults.java 2013-09-06 11:28:24.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/UIDefaults.java 2013-12-01 11:14:31.000000000 -0800 @@ -53,6 +53,7 @@ import sun.reflect.misc.MethodUtil; @@ -35702,8 +63625,8 @@ /* * Coerce the array of class types provided into one which * looks the way the Reflection APIs expect. This is done ---- jdk/src/share/classes/javax/swing/event/EventListenerList.java 2013-09-06 11:28:24.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/event/EventListenerList.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/event/EventListenerList.java 2013-09-06 11:28:24.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/event/EventListenerList.java 2014-01-18 12:16:24.000000000 -0800 @@ -27,6 +27,7 @@ import java.io.*; import java.util.*; @@ -35723,8 +63646,38 @@ } } ---- jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2013-09-06 11:28:27.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java 2013-09-06 11:28:25.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 javax.swing.tree.*; + import javax.swing.text.Position; + import javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag; ++import sun.awt.AWTAccessor; + import sun.swing.SwingUtilities2; + + import sun.swing.DefaultLookup; +@@ -2165,11 +2166,7 @@ + nodeBounds.width, + nodeBounds.height); + editingPath = path; +- if (editingComponent instanceof JComponent) { +- ((JComponent)editingComponent).revalidate(); +- } else { +- editingComponent.validate(); +- } ++ AWTAccessor.getComponentAccessor().revalidateSynchronously(editingComponent); + editingComponent.repaint(); + if(cellEditor.shouldSelectCell(event)) { + stopEditingInCompleteEditing = false; +--- ./jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2013-09-06 11:28:27.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/text/DefaultFormatter.java 2013-12-01 11:14:31.000000000 -0800 @@ -24,7 +24,8 @@ */ package javax.swing.text; @@ -35754,8 +63707,58 @@ return cons.newInstance(new Object[] { string }); } catch (Throwable ex) { throw new ParseException("Error creating instance", 0); ---- jdk/src/share/classes/javax/swing/text/NumberFormatter.java 2013-09-06 11:28:27.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/text/NumberFormatter.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/text/FlowView.java 2013-09-06 11:28:27.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/text/FlowView.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -796,6 +796,22 @@ + v.setParent(parent); + } + ++ /** {@inheritDoc} */ ++ @Override ++ protected void forwardUpdate(DocumentEvent.ElementChange ec, ++ DocumentEvent e, Shape a, ViewFactory f) { ++ calculateUpdateIndexes(e); ++ // Send update event to all views followed by the changed place. ++ lastUpdateIndex = Math.max((getViewCount() - 1), 0); ++ for (int i = firstUpdateIndex; i <= lastUpdateIndex; i++) { ++ View v = getView(i); ++ if (v != null) { ++ Shape childAlloc = getChildAllocation(i, a); ++ forwardUpdateToView(v, e, childAlloc, f); ++ } ++ } ++ } ++ + // The following methods don't do anything useful, they + // simply keep the class from being abstract. + +--- ./jdk/src/share/classes/javax/swing/text/GlyphView.java 2013-09-06 11:28:27.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/text/GlyphView.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -514,7 +514,7 @@ + int x1 = x0 + (int) painter.getSpan(this, p0, p1, getTabExpander(), x0); + + // calculate y coordinate +- int y = alloc.y + alloc.height - (int) painter.getDescent(this); ++ int y = alloc.y + (int)(painter.getHeight(this) - painter.getDescent(this)); + if (underline) { + int yTmp = y + 1; + g.drawLine(x0, yTmp, x1, yTmp); +--- ./jdk/src/share/classes/javax/swing/text/NumberFormatter.java 2013-09-06 11:28:27.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/text/NumberFormatter.java 2013-12-01 11:14:31.000000000 -0800 @@ -27,6 +27,8 @@ import java.lang.reflect.*; import java.text.*; @@ -35779,8 +63782,115 @@ return cons.newInstance(new Object[]{string}); } } catch (Throwable ex) { } ---- jdk/src/share/classes/javax/swing/text/html/ObjectView.java 2013-09-06 11:28:27.000000000 -0700 -+++ jdk/src/share/classes/javax/swing/text/html/ObjectView.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/javax/swing/text/View.java 2013-09-06 11:28:27.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/text/View.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1137,32 +1137,9 @@ + */ + protected void forwardUpdate(DocumentEvent.ElementChange ec, + DocumentEvent e, Shape a, ViewFactory f) { +- Element elem = getElement(); +- int pos = e.getOffset(); +- int index0 = getViewIndex(pos, Position.Bias.Forward); +- if (index0 == -1 && e.getType() == DocumentEvent.EventType.REMOVE && +- pos >= getEndOffset()) { +- // Event beyond our offsets. We may have represented this, that is +- // the remove may have removed one of our child Elements that +- // represented this, so, we should foward to last element. +- index0 = getViewCount() - 1; +- } +- int index1 = index0; +- View v = (index0 >= 0) ? getView(index0) : null; +- if (v != null) { +- if ((v.getStartOffset() == pos) && (pos > 0)) { +- // If v is at a boundary, forward the event to the previous +- // view too. +- index0 = Math.max(index0 - 1, 0); +- } +- } +- if (e.getType() != DocumentEvent.EventType.REMOVE) { +- index1 = getViewIndex(pos + e.getLength(), Position.Bias.Forward); +- if (index1 < 0) { +- index1 = getViewCount() - 1; +- } +- } +- int hole0 = index1 + 1; ++ calculateUpdateIndexes(e); ++ ++ int hole0 = lastUpdateIndex + 1; + int hole1 = hole0; + Element[] addedElems = (ec != null) ? ec.getChildrenAdded() : null; + if ((addedElems != null) && (addedElems.length > 0)) { +@@ -1173,11 +1150,9 @@ + // forward to any view not in the forwarding hole + // formed by added elements (i.e. they will be updated + // by initialization. +- index0 = Math.max(index0, 0); +- index1 = Math.max((getViewCount() - 1), 0); +- for (int i = index0; i <= index1; i++) { ++ for (int i = firstUpdateIndex; i <= lastUpdateIndex; i++) { + if (! ((i >= hole0) && (i <= hole1))) { +- v = getView(i); ++ View v = getView(i); + if (v != null) { + Shape childAlloc = getChildAllocation(i, a); + forwardUpdateToView(v, e, childAlloc, f); +@@ -1187,6 +1162,39 @@ + } + + /** ++ * Calculates the first and the last indexes of the child views ++ * that need to be notified of the change to the model. ++ * @param e the change information from the associated document ++ */ ++ void calculateUpdateIndexes(DocumentEvent e) { ++ int pos = e.getOffset(); ++ firstUpdateIndex = getViewIndex(pos, Position.Bias.Forward); ++ if (firstUpdateIndex == -1 && e.getType() == DocumentEvent.EventType.REMOVE && ++ pos >= getEndOffset()) { ++ // Event beyond our offsets. We may have represented this, that is ++ // the remove may have removed one of our child Elements that ++ // represented this, so, we should forward to last element. ++ firstUpdateIndex = getViewCount() - 1; ++ } ++ lastUpdateIndex = firstUpdateIndex; ++ View v = (firstUpdateIndex >= 0) ? getView(firstUpdateIndex) : null; ++ if (v != null) { ++ if ((v.getStartOffset() == pos) && (pos > 0)) { ++ // If v is at a boundary, forward the event to the previous ++ // view too. ++ firstUpdateIndex = Math.max(firstUpdateIndex - 1, 0); ++ } ++ } ++ if (e.getType() != DocumentEvent.EventType.REMOVE) { ++ lastUpdateIndex = getViewIndex(pos + e.getLength(), Position.Bias.Forward); ++ if (lastUpdateIndex < 0) { ++ lastUpdateIndex = getViewCount() - 1; ++ } ++ } ++ firstUpdateIndex = Math.max(firstUpdateIndex, 0); ++ } ++ ++ /** + * Forwards the DocumentEvent to the give child view. This + * simply messages the view with a call to insertUpdate, + * removeUpdate, or changedUpdate depending +@@ -1345,4 +1353,14 @@ + private View parent; + private Element elem; + ++ /** ++ * The index of the first child view to be notified. ++ */ ++ int firstUpdateIndex; ++ ++ /** ++ * The index of the last child view to be notified. ++ */ ++ int lastUpdateIndex; ++ + }; +--- ./jdk/src/share/classes/javax/swing/text/html/ObjectView.java 2013-09-06 11:28:27.000000000 -0700 ++++ ./jdk/src/share/classes/javax/swing/text/html/ObjectView.java 2013-12-01 11:14:31.000000000 -0800 @@ -31,6 +31,9 @@ import java.beans.*; import java.lang.reflect.*; @@ -35837,8 +63947,70 @@ } catch (Exception ex) { System.err.println("Invocation failed"); // invocation code ---- jdk/src/share/classes/sun/awt/AWTAccessor.java 2013-09-06 11:28:29.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/AWTAccessor.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/applet/resources/MsgAppletViewer_ja.java 2013-09-06 11:28:29.000000000 -0700 ++++ ./jdk/src/share/classes/sun/applet/resources/MsgAppletViewer_ja.java 2014-06-06 19:56:30.000000000 -0700 +@@ -57,9 +57,9 @@ + {"appletviewer.appletinfo.applet", "-- \u30A2\u30D7\u30EC\u30C3\u30C8\u60C5\u5831\u306A\u3057 --"}, + {"appletviewer.appletinfo.param", "-- \u30D1\u30E9\u30E1\u30FC\u30BF\u60C5\u5831\u306A\u3057 --"}, + {"appletviewer.appletinfo.textframe", "\u30A2\u30D7\u30EC\u30C3\u30C8\u60C5\u5831"}, +- {"appletviewer.appletprint.fail", "\u5370\u5237\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"}, +- {"appletviewer.appletprint.finish", "\u5370\u5237\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002"}, +- {"appletviewer.appletprint.cancel", "\u5370\u5237\u304C\u4E2D\u6B62\u3055\u308C\u307E\u3057\u305F\u3002"}, ++ {"appletviewer.appletprint.fail", "\u5370\u5237\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002"}, ++ {"appletviewer.appletprint.finish", "\u5370\u5237\u3092\u7D42\u4E86\u3057\u307E\u3057\u305F\u3002"}, ++ {"appletviewer.appletprint.cancel", "\u5370\u5237\u304C\u53D6\u308A\u6D88\u3055\u308C\u307E\u3057\u305F\u3002"}, + {"appletviewer.appletencoding", "\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0: {0}"}, + {"appletviewer.parse.warning.requiresname", "\u8B66\u544A: \u30BF\u30B0\u306Bname\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"}, + {"appletviewer.parse.warning.paramoutside", "\u8B66\u544A: \u30BF\u30B0\u304C ... \u306E\u5916\u5074\u3067\u3059\u3002"}, +@@ -98,7 +98,7 @@ + {"appletioexception.loadclass.throw.notloaded", "\u30AF\u30E9\u30B9\u304C\u30ED\u30FC\u30C9\u3055\u308C\u307E\u305B\u3093: {0}"}, + {"appletclassloader.loadcode.verbose", "{1}\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306E{0}\u3078\u306E\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u958B\u304D\u307E\u3059"}, + {"appletclassloader.filenotfound", "{0}\u306E\u691C\u7D22\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"}, +- {"appletclassloader.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u30FB\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, ++ {"appletclassloader.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, + {"appletclassloader.fileioexception", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, + {"appletclassloader.fileexception", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, + {"appletclassloader.filedeath", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u304C\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3057\u305F"}, +@@ -132,7 +132,7 @@ + {"appletpanel.notdisposed", "\u30ED\u30FC\u30C9: \u30A2\u30D7\u30EC\u30C3\u30C8\u304C\u7834\u68C4\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"}, + {"appletpanel.bail", "\u4E2D\u65AD\u6E08: \u7D42\u4E86\u3057\u3066\u3044\u307E\u3059\u3002"}, + {"appletpanel.filenotfound", "{0}\u306E\u691C\u7D22\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"}, +- {"appletpanel.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u30FB\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, ++ {"appletpanel.fileformat", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, + {"appletpanel.fileioexception", "{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, + {"appletpanel.fileexception", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F"}, + {"appletpanel.filedeath", "{1}\u306E\u30ED\u30FC\u30C9\u4E2D\u306B{0}\u304C\u5F37\u5236\u7D42\u4E86\u3057\u307E\u3057\u305F"}, +--- ./jdk/src/share/classes/sun/applet/resources/MsgAppletViewer_pt_BR.java 2013-09-06 11:28:29.000000000 -0700 ++++ ./jdk/src/share/classes/sun/applet/resources/MsgAppletViewer_pt_BR.java 2014-06-06 19:56:30.000000000 -0700 +@@ -93,7 +93,7 @@ + {"appletviewer.main.nosecmgr", "Advert\u00EAncia: SecurityManager n\u00E3o instalado!"}, + {"appletviewer.main.warning", "Advert\u00EAncia: Nenhum applet iniciado. Certifique-se de que a entrada contenha uma tag ."}, + {"appletviewer.main.warn.prop.overwrite", "Advert\u00EAncia: Substituindo a propriedade do sistema temporariamente a pedido do usu\u00E1rio: chave: {0} valor antigo: {1} valor novo: {2}"}, +- {"appletviewer.main.warn.cantreadprops", "Advert\u00EAncia: N\u00E3o \u00E9 poss\u00EDvel ler o arquivo de propriedades AppletViewer: {0} Usando defaults."}, ++ {"appletviewer.main.warn.cantreadprops", "Advert\u00EAncia: N\u00E3o \u00E9 poss\u00EDvel ler o arquivo de propriedades AppletViewer: {0} Usando padr\u00F5es."}, + {"appletioexception.loadclass.throw.interrupted", "carregamento de classe interrompido: {0}"}, + {"appletioexception.loadclass.throw.notloaded", "classe n\u00E3o carregada: {0}"}, + {"appletclassloader.loadcode.verbose", "Fluxo de abertura para: {0} para obter {1}"}, +--- ./jdk/src/share/classes/sun/applet/resources/MsgAppletViewer_sv.java 2013-09-06 11:28:29.000000000 -0700 ++++ ./jdk/src/share/classes/sun/applet/resources/MsgAppletViewer_sv.java 2014-06-06 19:56:30.000000000 -0700 +@@ -85,7 +85,7 @@ + {"appletviewer.main.prop.store", "Anv\u00E4ndarspecifika egenskaper f\u00F6r AppletViewer"}, + {"appletviewer.main.err.prop.cantread", "Kan inte l\u00E4sa egenskapsfilen: {0}"}, + {"appletviewer.main.err.prop.cantsave", "Kan inte spara egenskapsfilen: {0}"}, +- {"appletviewer.main.warn.nosecmgr", "Varning: s\u00E4kerheten inaktiveras."}, ++ {"appletviewer.main.warn.nosecmgr", "Varning! S\u00E4kerheten avaktiveras."}, + {"appletviewer.main.debug.cantfinddebug", "Hittar inte fels\u00F6kningsprogrammet!"}, + {"appletviewer.main.debug.cantfindmain", "Hittar inte huvudmetoden i fels\u00F6kningsprogrammet!"}, + {"appletviewer.main.debug.exceptionindebug", "Undantag i fels\u00F6kningsprogrammet!"}, +--- ./jdk/src/share/classes/sun/awt/AWTAccessor.java 2013-09-06 11:28:29.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/AWTAccessor.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 @@ import java.awt.KeyboardFocusManager; import java.awt.DefaultKeyboardFocusManager; @@ -35847,10 +64019,37 @@ import java.awt.event.KeyEvent; import java.awt.geom.Point2D; -@@ -690,6 +691,25 @@ +@@ -39,6 +40,7 @@ + import java.security.AccessControlContext; + + import java.io.File; ++import java.util.ResourceBundle; + import java.util.Vector; + + /** +@@ -236,6 +238,11 @@ + */ + AccessControlContext getAccessControlContext(Component comp); + ++ /** ++ * Revalidates the component synchronously. ++ */ ++ void revalidateSynchronously(Component comp); ++ + } + + /* +@@ -690,6 +697,32 @@ } /* ++ *An accessor for the toolkit class ++ */ ++ public interface ToolkitAccessor { ++ void setPlatformResources(ResourceBundle bundle); ++ } ++ ++ /* + * An accessor object for the InvocationEvent class + */ + public interface InvocationEventAccessor { @@ -35873,20 +64072,39 @@ * Accessor instances are initialized in the static initializers of * corresponding AWT classes by using setters defined below. */ -@@ -716,6 +736,7 @@ +@@ -716,6 +749,8 @@ private static TrayIconAccessor trayIconAccessor; private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor; private static SequencedEventAccessor sequencedEventAccessor; + private static InvocationEventAccessor invocationEventAccessor; ++ private static ToolkitAccessor toolkitAccessor; /* * Set an accessor object for the java.awt.Component class. -@@ -1110,4 +1131,18 @@ +@@ -1110,4 +1145,36 @@ // (so not a single instance of the event has been created). return sequencedEventAccessor; } + + /* ++ * Set an accessor object for the java.awt.Toolkit class. ++ */ ++ public static void setToolkitAccessor(ToolkitAccessor ta) { ++ toolkitAccessor = ta; ++ } ++ ++ /* ++ * Get the accessor object for the java.awt.Toolkit class. ++ */ ++ public static ToolkitAccessor getToolkitAccessor() { ++ if (toolkitAccessor == null) { ++ unsafe.ensureClassInitialized(Toolkit.class); ++ } ++ ++ return toolkitAccessor; ++ } ++ ++ /* + * Get the accessor object for the java.awt.event.InvocationEvent class. + */ + public static void setInvocationEventAccessor(InvocationEventAccessor invocationEventAccessor) { @@ -35900,8 +64118,8 @@ + return invocationEventAccessor; + } } ---- jdk/src/share/classes/sun/awt/AWTAutoShutdown.java 2013-09-06 11:28:29.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/AWTAutoShutdown.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/AWTAutoShutdown.java 2013-09-06 11:28:29.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/AWTAutoShutdown.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. @@ -35953,8 +64171,8 @@ thread.setDaemon(false); blockerThread = thread; thread.start(); ---- jdk/src/share/classes/sun/awt/AppContext.java 2013-09-06 11:28:29.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/AppContext.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/AppContext.java 2013-09-06 11:28:29.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/AppContext.java 2014-04-19 01:27:13.000000000 -0700 @@ -837,21 +837,68 @@ public boolean isMainAppContext() { return (numAppContexts.get() == 1 && mainAppContext != null); @@ -36037,8 +64255,8 @@ }); } } ---- jdk/src/share/classes/sun/awt/FontConfiguration.java 2013-09-06 11:28:30.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/FontConfiguration.java 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/FontConfiguration.java 2014-06-06 19:56:34.000000000 -0700 @@ -1146,7 +1146,7 @@ */ HashMap existsMap; @@ -36048,8 +64266,8 @@ return false; } else if (existsMap == null) { existsMap = new HashMap(); ---- jdk/src/share/classes/sun/awt/OSInfo.java 2013-09-06 11:28:30.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/OSInfo.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/OSInfo.java 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/OSInfo.java 2014-06-06 19:56:34.000000000 -0700 @@ -39,6 +39,7 @@ WINDOWS, LINUX, @@ -36069,8 +64287,8 @@ if (osName.contains("OS X")) { return MACOSX; } ---- jdk/src/share/classes/sun/awt/SunToolkit.java 2013-09-06 11:28:30.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/SunToolkit.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/SunToolkit.java 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/SunToolkit.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -36086,8 +64304,8 @@ import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; ---- jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java 2013-09-06 11:28:30.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/datatransfer/ClipboardTransferable.java 2014-06-06 19:56:30.000000000 -0700 @@ -87,7 +87,7 @@ HashMap cached_data = new HashMap(formats.length, 1.0f); @@ -36097,8 +64315,109 @@ for (Iterator iter = flavorsForFormats.keySet().iterator(); iter.hasNext(); ) { ---- jdk/src/share/classes/sun/awt/datatransfer/SunClipboard.java 2013-09-06 11:28:30.000000000 -0700 -+++ jdk/src/share/classes/sun/awt/datatransfer/SunClipboard.java 2014-04-20 12:39:19.000000000 -0700 +@@ -98,8 +98,7 @@ + } + + flavors = DataTransferer.getInstance(). +- setToSortedDataFlavorArray(flavorsToData.keySet(), +- flavorsForFormats); ++ setToSortedDataFlavorArray(flavorsToData.keySet()); + } + } finally { + clipboard.closeClipboard(); +--- ./jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java 2014-06-06 19:56:30.000000000 -0700 +@@ -2406,15 +2406,6 @@ + } + + /** +- * Helper function to reduce a Map with DataFlavor keys to a DataFlavor +- * array. The array will be sorted according to +- * DataFlavorComparator. +- */ +- public static DataFlavor[] keysToDataFlavorArray(Map map) { +- return setToSortedDataFlavorArray(map.keySet(), map); +- } +- +- /** + * Helper function to convert a Set of DataFlavors to a sorted array. + * The array will be sorted according to DataFlavorComparator. + */ +@@ -2428,24 +2419,6 @@ + } + + /** +- * Helper function to convert a Set of DataFlavors to a sorted array. +- * The array will be sorted according to a +- * DataFlavorComparator created with the specified +- * flavor-to-native map as an argument. +- */ +- public static DataFlavor[] setToSortedDataFlavorArray +- (Set flavorsSet, Map flavorToNativeMap) +- { +- DataFlavor[] flavors = new DataFlavor[flavorsSet.size()]; +- flavorsSet.toArray(flavors); +- Comparator comparator = +- new DataFlavorComparator(flavorToNativeMap, +- IndexedComparator.SELECT_WORST); +- Arrays.sort(flavors, comparator); +- return flavors; +- } +- +- /** + * Helper function to convert an InputStream to a byte[] array. + */ + protected static byte[] inputStreamToByteArray(InputStream str) +@@ -2723,11 +2696,9 @@ + * application/x-java-* MIME types. Unknown application types are preferred + * because if the user provides his own data flavor, it will likely be the + * most descriptive one. For flavors which are otherwise equal, the +- * flavors' native formats are compared, with greater long values +- * taking precedence. ++ * flavors' string representation are compared in the alphabetical order. + */ + public static class DataFlavorComparator extends IndexedComparator { +- protected final Map flavorToFormatMap; + + private final CharsetComparator charsetComparator; + +@@ -2863,20 +2834,6 @@ + super(order); + + charsetComparator = new CharsetComparator(order); +- flavorToFormatMap = Collections.EMPTY_MAP; +- } +- +- public DataFlavorComparator(Map map) { +- this(map, SELECT_BEST); +- } +- +- public DataFlavorComparator(Map map, boolean order) { +- super(order); +- +- charsetComparator = new CharsetComparator(order); +- HashMap hashMap = new HashMap(map.size()); +- hashMap.putAll(map); +- flavorToFormatMap = Collections.unmodifiableMap(hashMap); + } + + public int compare(Object obj1, Object obj2) { +@@ -2972,10 +2929,9 @@ + } + } + +- // As a last resort, take the DataFlavor with the greater integer +- // format. +- return compareLongs(flavorToFormatMap, flavor1, flavor2, +- UNKNOWN_OBJECT_LOSES_L); ++ // The flavours are not equal but still not distinguishable. ++ // Compare String representations in alphabetical order ++ return flavor1.getMimeType().compareTo(flavor2.getMimeType()); + } + } + +--- ./jdk/src/share/classes/sun/awt/datatransfer/SunClipboard.java 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/datatransfer/SunClipboard.java 2014-04-19 01:27:13.000000000 -0700 @@ -64,9 +64,6 @@ public abstract class SunClipboard extends Clipboard implements PropertyChangeListener { @@ -36144,8 +64463,32 @@ + return (FlavorTable) SystemFlavorMap.getDefaultFlavorMap(); + } } ---- jdk/src/share/classes/sun/font/CreatedFontTracker.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/CreatedFontTracker.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/awt/resources/awt_pt_BR.properties 2013-09-06 11:28:30.000000000 -0700 ++++ ./jdk/src/share/classes/sun/awt/resources/awt_pt_BR.properties 2014-06-06 19:56:30.000000000 -0700 +@@ -151,7 +151,7 @@ + AWT.undefined=Indefinido + + # Predefined cursor names +-AWT.DefaultCursor=Cursor Default ++AWT.DefaultCursor=Cursor Padr\u00E3o + AWT.CrosshairCursor=Cursor em Forma de Cruz + AWT.TextCursor=Cursor de Texto + AWT.WaitCursor=Cursor em Forma de Ampulheta +@@ -165,9 +165,9 @@ + AWT.EResizeCursor=Cursor de Seta Que Aponta \u00E0 Direita + AWT.HandCursor=Cursor em Forma de M\u00E3o + AWT.MoveCursor=Cursor de Movimento +-AWT.DefaultDragCursor=Cursor Default de Arrastar +-AWT.DefaultNoDropCursor=Cursor Default sem Arrastar +-AWT.DefaultDropCursor=Cursor Default de Soltar ++AWT.DefaultDragCursor=Cursor Padr\u00E3o de Arrastar ++AWT.DefaultNoDropCursor=Cursor Padr\u00E3o sem Arrastar ++AWT.DefaultDropCursor=Cursor Padr\u00E3o de Soltar + + # Input method related strings + AWT.CompositionWindowTitle=Janela de Entrada +--- ./jdk/src/share/classes/sun/font/CreatedFontTracker.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/CreatedFontTracker.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. @@ -36217,8 +64560,8 @@ } } ---- jdk/src/share/classes/sun/font/FileFont.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/FileFont.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/font/FileFont.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/FileFont.java 2013-12-01 11:14:33.000000000 -0800 @@ -170,7 +170,9 @@ } } @@ -36230,8 +64573,8 @@ scaler = FontScaler.getNullScaler(); } ---- jdk/src/share/classes/sun/font/FontUtilities.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/FontUtilities.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/font/FontUtilities.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/FontUtilities.java 2014-06-06 19:56:34.000000000 -0700 @@ -48,6 +48,8 @@ public static boolean isLinux; @@ -36253,8 +64596,8 @@ isMacOSX = osName.contains("OS X"); // TODO: MacOSX String t2kStr = System.getProperty("sun.java2d.font.scaler"); ---- jdk/src/share/classes/sun/font/GlyphLayout.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/GlyphLayout.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/font/GlyphLayout.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/GlyphLayout.java 2013-12-01 11:14:33.000000000 -0800 @@ -468,9 +468,10 @@ _gvdata.grow(); } @@ -36269,8 +64612,8 @@ } } ---- jdk/src/share/classes/sun/font/StandardGlyphVector.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/StandardGlyphVector.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/font/StandardGlyphVector.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/StandardGlyphVector.java 2013-12-01 11:14:33.000000000 -0800 @@ -1740,8 +1740,9 @@ tx, sgv.font.getStyle(), @@ -36283,8 +64626,8 @@ return new GlyphStrike(sgv, strike, dx, dy); } ---- jdk/src/share/classes/sun/font/SunFontManager.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/SunFontManager.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/font/SunFontManager.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/SunFontManager.java 2014-06-06 19:56:34.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. @@ -36348,8 +64691,8 @@ } } } ---- jdk/src/share/classes/sun/font/TrueTypeFont.java 2013-09-06 11:28:31.000000000 -0700 -+++ jdk/src/share/classes/sun/font/TrueTypeFont.java 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/font/TrueTypeFont.java 2013-09-06 11:28:31.000000000 -0700 ++++ ./jdk/src/share/classes/sun/font/TrueTypeFont.java 2013-12-01 11:14:33.000000000 -0800 @@ -1037,6 +1037,9 @@ if (head_Table != null && head_Table.capacity() >= 18) { ShortBuffer sb = head_Table.asShortBuffer(); @@ -36360,8 +64703,8 @@ } ByteBuffer os2_Table = getTableBuffer(os_2Tag); ---- jdk/src/share/classes/sun/java2d/Disposer.java 2013-09-06 11:28:34.000000000 -0700 -+++ jdk/src/share/classes/sun/java2d/Disposer.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/java2d/Disposer.java 2013-09-06 11:28:34.000000000 -0700 ++++ ./jdk/src/share/classes/sun/java2d/Disposer.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. @@ -36450,8 +64793,8 @@ } finally { pollingQueue = false; } ---- jdk/src/share/classes/sun/java2d/opengl/OGLRenderQueue.java 2013-09-06 11:28:34.000000000 -0700 -+++ jdk/src/share/classes/sun/java2d/opengl/OGLRenderQueue.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/java2d/opengl/OGLRenderQueue.java 2013-09-06 11:28:34.000000000 -0700 ++++ ./jdk/src/share/classes/sun/java2d/opengl/OGLRenderQueue.java 2014-04-19 01:27:13.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. @@ -36482,8 +64825,19 @@ } }); } ---- jdk/src/share/classes/sun/launcher/resources/launcher_fr.properties 2013-09-06 11:28:35.000000000 -0700 -+++ jdk/src/share/classes/sun/launcher/resources/launcher_fr.properties 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/launcher/resources/launcher_de.properties 2013-09-06 11:28:35.000000000 -0700 ++++ ./jdk/src/share/classes/sun/launcher/resources/launcher_de.properties 2014-06-06 19:56:30.000000000 -0700 +@@ -37,7 +37,7 @@ + java.launcher.opt.footer =\ -cp \n -classpath \n Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n und ZIP-Archiven zur Suche nach Klassendateien.\n -D=\n Legt eine Systemeigenschaft fest\n -verbose:[class|gc|jni]\n Aktiviert die Verbose-Ausgabe\n -version Druckt Produktversion und beendet das Programm\n -version:\n Erfordert die angegebene Version zur Ausf\u00FChrung\n -showversion Druckt Produktversion und f\u00E4hrt fort\n -jre-restrict-search | -no-jre-restrict-search\n Bezieht private JREs des Benutzers in Versionssuche ein bzw. schlie\u00DFt sie aus\n -? -help Druckt diese Hilfemeldung\n -X Druckt Hilfe zu Nicht-Standardoptionen\n -ea[:...|:]\n -enableassertions[:...|:]\n Aktiviert Assertionen mit angegebener Granularit\u00E4t\n -da[:...|:]\n -disableassertions[:...|:]\n Deaktiviert Assertionen mit angegebener Granularit\u00E4t\n -esa | -enablesystemassertions\n Aktiviert Systemassertionen\n -dsa | -disablesystemassertions\n Deaktiviert Systemassertionen\n -agentlib:[=]\n L\u00E4dt native Agent Library , z.B. -agentlib:hprof\n siehe auch -agentlib:jdwp=help und -agentlib:hprof=help\n -agentpath:[=]\n L\u00E4dt native Agent Library nach vollem Pfadnamen\n -javaagent:[=]\n L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n -splash:\n Zeigt Startbildschirm mit angegebenem Bild\nWeitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html + + # Translators please note do not translate the options themselves +-java.launcher.X.usage=\ -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xbootclasspath:\n Legt Suchpfad f\u00FCr Bootstrap-Klassen und Ressourcen fest\n -Xbootclasspath/a:\n H\u00E4ngt an das Ende des Bootstrap Classpath an\n -Xbootclasspath/p:\n Stellt Bootstrap Classpath voran\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xnoclassgc Deaktiviert Klassen-Garbage Collection\n -Xincgc Aktiviert inkrementelle Garbage Collection\n -Xloggc: Loggt GC-Status in einer Datei mit Zeitstempeln\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xms Legt anf\u00E4ngliche Java Heap-Gr\u00F6\u00DFe fest\n -Xmx Legt maximale Java Heap-Gr\u00F6\u00DFe fest\n -Xss Legt Java-Thread-Stackgr\u00F6\u00DFe fest\n -Xprof Gibt CPU-Profiling-Daten aus\n -Xfuture Aktiviert strengste Pr\u00FCfungen, antizipiert zuk\u00FCnftigen Standardwert\n -Xrs Reduziert Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen durch\n -Xshare:off Kein Versuch, gemeinsame Klassendaten zu verwenden\n -Xshare:auto Verwendet gemeinsame Klassendaten, wenn m\u00F6glich (Standard)\n -Xshare:on Erfordert die Verwendung gemeinsamer Klassendaten, sonst verl\u00E4uft der Vorgang nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n\nDie -X-Optionen sind keine Standardoptionen und k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n ++java.launcher.X.usage=\ -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xint Nur Ausf\u00FChrung im interpretierten Modus\n -Xbootclasspath:\n Legt Suchpfad f\u00FCr Bootstrap-Klassen und Ressourcen fest\n -Xbootclasspath/a:\n H\u00E4ngt an das Ende des Bootstrap Classpath an\n -Xbootclasspath/p:\n Stellt Bootstrap Classpath voran\n -Xdiag Zeigt zus\u00E4tzliche Diagnosemeldungen an\n -Xnoclassgc Deaktiviert Klassen-Garbage Collection\n -Xincgc Aktiviert inkrementelle Garbage Collection\n -Xloggc: Loggt GC-Status in einer Datei mit Zeitstempeln\n -Xbatch Deaktiviert Hintergrundkompilierung\n -Xms Legt anf\u00E4ngliche Java Heap-Gr\u00F6\u00DFe fest\n -Xmx Legt maximale Java Heap-Gr\u00F6\u00DFe fest\n -Xss Legt Java-Threadstackgr\u00F6\u00DFe fest\n -Xprof Gibt CPU-Profiling-Daten aus\n -Xfuture Aktiviert strengste Pr\u00FCfungen, antizipiert zuk\u00FCnftigen Standardwert\n -Xrs Reduziert Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n -Xcheck:jni F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen durch\n -Xshare:off Kein Versuch, gemeinsame Klassendaten zu verwenden\n -Xshare:auto Verwendet gemeinsame Klassendaten, wenn m\u00F6glich (Standard)\n -Xshare:on Erfordert die Verwendung gemeinsamer Klassendaten, sonst verl\u00E4uft der Vorgang nicht erfolgreich.\n -XshowSettings Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n\nDie -X-Optionen sind keine Standardoptionen und k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.\n + + # Translators please note do not translate the options themselves + java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n -XstartOnFirstThread\n f\u00FChrt die main()-Methode f\u00FCr den ersten (AppKit) Thread aus\n -Xdock:name="\n \u00DCberschreibt den in der Uhr angezeigten Standardanwendungsnamen\n -Xdock:icon=\n \u00DCberschreibt das in der Uhr angezeigte Standardsymbol\n\n +--- ./jdk/src/share/classes/sun/launcher/resources/launcher_fr.properties 2013-09-06 11:28:35.000000000 -0700 ++++ ./jdk/src/share/classes/sun/launcher/resources/launcher_fr.properties 2014-01-18 12:16:25.000000000 -0800 @@ -34,7 +34,7 @@ java.launcher.ergo.message2 =\ car vous ex\u00E9cutez une machine de classe de serveur.\n @@ -36493,8 +64847,8 @@ # Translators please note do not translate the options themselves java.launcher.X.usage=\ -Xmixed ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n -Xint ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n -Xbootclasspath:\n d\u00E9finition du chemin de recherche pour les ressources et classes bootstrap\n -Xbootclasspath/a:\n ajout \u00E0 la fin du chemin de classe bootstrap\n -Xbootclasspath/p:\n ajout au d\u00E9but du chemin de classe bootstrap\n -Xdiag affichage de messages de diagnostic suppl\u00E9mentaires\n -Xnoclassgc d\u00E9sactivation de l''op\u00E9ration de ramasse-miette (garbage collection) de la classe\n -Xincgc activation de l''op\u00E9ration de ramasse-miette (garbage collection) incr\u00E9mentielle\n -Xloggc: journalisation du statut de l''op\u00E9ration de ramasse-miette (garbage collection) dans un fichier avec horodatages\n -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xms d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n -Xss d\u00E9finition de la taille de pile de thread Java\n -Xprof sortie des donn\u00E9es de profilage de l''unit\u00E9 centrale\n -Xfuture activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n -Xrs r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n -Xcheck:jni ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n -Xshare:off aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n -Xshare:auto utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n -Xshare:on utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n -XshowSettings affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:all\n affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n -XshowSettings:properties\n affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n -XshowSettings:locale\n affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n\nLes options -X ne sont pas des options standard et peuvent faire l''objet de modifications sans pr\u00E9avis.\n ---- jdk/src/share/classes/sun/launcher/resources/launcher_ja.properties 2013-09-06 11:28:35.000000000 -0700 -+++ jdk/src/share/classes/sun/launcher/resources/launcher_ja.properties 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/launcher/resources/launcher_ja.properties 2013-09-06 11:28:35.000000000 -0700 ++++ ./jdk/src/share/classes/sun/launcher/resources/launcher_ja.properties 2014-01-18 12:16:25.000000000 -0800 @@ -34,11 +34,11 @@ java.launcher.ergo.message2 =\ \u3053\u308C\u306F\u30B5\u30FC\u30D0\u30FC\u30AF\u30E9\u30B9\u306E\u30DE\u30B7\u30F3\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u305F\u3081\u3067\u3059\u3002\n @@ -36510,8 +64864,8 @@ # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059\u3002\n -XstartOnFirstThread\n main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n -Xdock:name="\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n -Xdock:icon=\n Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n ---- jdk/src/share/classes/sun/launcher/resources/launcher_ko.properties 2013-09-06 11:28:35.000000000 -0700 -+++ jdk/src/share/classes/sun/launcher/resources/launcher_ko.properties 2014-04-20 12:39:19.000000000 -0700 +--- ./jdk/src/share/classes/sun/launcher/resources/launcher_ko.properties 2013-09-06 11:28:35.000000000 -0700 ++++ ./jdk/src/share/classes/sun/launcher/resources/launcher_ko.properties 2014-01-18 12:16:25.000000000 -0800 @@ -34,10 +34,11 @@ java.launcher.ergo.message2 =\ \uC11C\uBC84\uAE09 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uC2E4\uD589 \uC911\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.\n @@ -36526,9 +64880,14 @@ # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n -XstartOnFirstThread\n \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n -Xdock:name="\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n -Xdock:icon=\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n ---- jdk/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties 2013-09-06 11:28:35.000000000 -0700 -+++ jdk/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties 2014-04-20 12:39:19.000000000 -0700 -@@ -34,7 +34,7 @@ +--- ./jdk/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties 2013-09-06 11:28:35.000000000 -0700 ++++ ./jdk/src/share/classes/sun/launcher/resources/launcher_pt_BR.properties 2014-06-06 19:56:30.000000000 -0700 +@@ -30,17 +30,17 @@ + java.launcher.opt.vmselect =\ {0}\t para selecionar a VM "{1}"\n + java.launcher.opt.hotspot =\ {0}\t \u00E9 um sin\u00F4nimo da VM "{1}" [obsoleto]\n + +-java.launcher.ergo.message1 =\ A VM default \u00E9 {0} ++java.launcher.ergo.message1 =\ A VM padr\u00E3o \u00E9 {0} java.launcher.ergo.message2 =\ porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n # Translators please note do not translate the options themselves @@ -36536,9 +64895,17 @@ +java.launcher.opt.footer =\ -cp \n -classpath \n Uma lista separada por {0} de diret\u00F3rios, archives JAR\n e archives ZIP nos quais ser\u00E3o procurados os arquivos de classe.\n -D=\n define uma propriedade do sistema\n -verbose:[class|gc|jni]\n ativa a sa\u00EDda detalhada\n -version imprime a vers\u00E3o do produto e sai do programa\n -version:\n requer a execu\u00E7\u00E3o da vers\u00E3o especificada\n -showversion imprime a vers\u00E3o do produto e continua\n -jre-restrict-search | -no-jre-restrict-search\n inclui/exclui JREs privados do usu\u00E1rio na pesquisa de vers\u00E3o\n -? -help imprime esta mensagem de ajuda\n -X imprime a ajuda sobre op\u00E7\u00F5es n\u00E3o padronizadas\n -ea[:...|:]\n -enableassertions[:...|:]\n ativa asser\u00E7\u00F5es com granularidade especificada\n -da[:...|:]\n -disableassertions[:...|:]\n desativa asser\u00E7\u00F5es com granularidade especificada\n -esa | -enablesystemassertions\n ativa asser\u00E7\u00F5es do sistema\n -dsa | -disablesystemassertions\n desativa asser\u00E7\u00F5es do sistema\n -agentlib:[=]\n carrega a biblioteca de agentes nativa , por exemplo: -agentlib:hprof\n consulte tamb\u00E9m: -agentlib:jdwp=help e -agentlib:hprof=help\n -agentpath:[=]\n carrega a biblioteca de agentes nativa com base no nome do caminho completo\n -javaagent:[=]\n carrega o agente da linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n -splash:\n mostra a tela de abertura com a imagem especificada\nConsulte http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes. # Translators please note do not translate the options themselves - java.launcher.X.usage=\ -Xmixed execu\u00E7\u00E3o no modo misto (default)\n -Xint execu\u00E7\u00E3o somente no modo interpretado\n -Xbootclasspath:\n define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n -Xbootclasspath/a:\n anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n -Xbootclasspath/p:\n anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n -Xdiag mostra mensagens de diagn\u00F3stico adicionais\n -Xnoclassgc desativa a coleta de lixo da classe\n -Xincgc ativa a coleta de lixo incremental\n -Xloggc: registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n -Xbatch desativa a compila\u00E7\u00E3o em segundo plano\n -Xms define o tamanho inicial do heap Java\n -Xmx define o tamanho m\u00E1ximo do heap Java\n -Xss define o tamanho da pilha de threads java\n -Xprof produz dados de perfil da cpu\n -Xfuture ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor default futuro\n -Xrs reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n -Xcheck:jni executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n -Xshare:off n\u00E3o tenta usar dados da classe compartilhada\n -Xshare:auto se poss\u00EDvel, usa dados da classe compartilhada (default)\n -Xshare:on requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n -XshowSettings mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:all\n mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n -XshowSettings:properties\n mostra todas as defini\u00E7\u00F5es da propriedade e continua\n -XshowSettings:locale\n mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n ---- jdk/src/share/classes/sun/management/HotSpotDiagnostic.java 2013-09-06 11:28:35.000000000 -0700 -+++ jdk/src/share/classes/sun/management/HotSpotDiagnostic.java 2014-04-20 12:39:21.000000000 -0700 +-java.launcher.X.usage=\ -Xmixed execu\u00E7\u00E3o no modo misto (default)\n -Xint execu\u00E7\u00E3o somente no modo interpretado\n -Xbootclasspath:\n define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n -Xbootclasspath/a:\n anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n -Xbootclasspath/p:\n anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n -Xdiag mostra mensagens de diagn\u00F3stico adicionais\n -Xnoclassgc desativa a coleta de lixo da classe\n -Xincgc ativa a coleta de lixo incremental\n -Xloggc: registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n -Xbatch desativa a compila\u00E7\u00E3o em segundo plano\n -Xms define o tamanho inicial do heap Java\n -Xmx define o tamanho m\u00E1ximo do heap Java\n -Xss define o tamanho da pilha de threads java\n -Xprof produz dados de perfil da cpu\n -Xfuture ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor default futuro\n -Xrs reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n -Xcheck:jni executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n -Xshare:off n\u00E3o tenta usar dados da classe compartilhada\n -Xshare:auto se poss\u00EDvel, usa dados da classe compartilhada (default)\n -Xshare:on requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n -XshowSettings mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:all\n mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n -XshowSettings:properties\n mostra todas as defini\u00E7\u00F5es da propriedade e continua\n -XshowSettings:locale\n mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n ++java.launcher.X.usage=\ -Xmixed execu\u00E7\u00E3o no modo misto (padr\u00E3o)\n -Xint execu\u00E7\u00E3o somente no modo interpretado\n -Xbootclasspath:\n define o caminho de pesquisa para classes e recursos de inicializa\u00E7\u00E3o\n -Xbootclasspath/a:\n anexa no final do caminho da classe de inicializa\u00E7\u00E3o\n -Xbootclasspath/p:\n anexa no in\u00EDcio do caminho da classe de inicializa\u00E7\u00E3o\n -Xdiag mostra mensagens de diagn\u00F3stico adicionais\n -Xnoclassgc desativa a coleta de lixo da classe\n -Xincgc ativa a coleta de lixo incremental\n -Xloggc: registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n -Xbatch desativa a compila\u00E7\u00E3o em segundo plano\n -Xms define o tamanho inicial do heap Java\n -Xmx define o tamanho m\u00E1ximo do heap Java\n -Xss define o tamanho da pilha de threads java\n -Xprof produz dados de perfil da cpu\n -Xfuture ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor padr\u00E3o futuro\n -Xrs reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n -Xcheck:jni executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n -Xshare:off n\u00E3o tenta usar dados da classe compartilhada\n -Xshare:auto se poss\u00EDvel, usa dados da classe compartilhada (padr\u00E3o)\n -Xshare:on requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n -XshowSettings mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:all\n mostra todas as defini\u00E7\u00F5es e continua\n -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n -XshowSettings:properties\n mostra todas as defini\u00E7\u00F5es da propriedade e continua\n -XshowSettings:locale\n mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n\nAs -X options n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n + + # Translators please note do not translate the options themselves +-java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n -XstartOnFirstThread\n executa o m\u00E9todo main() no primeiro thread (AppKit)\n -Xdock:name="\n substitui o nome da aplica\u00E7\u00E3o default exibido no encaixe\n -Xdock:icon=\n substitui o \u00EDcone exibido no encaixe\n\n ++java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n -XstartOnFirstThread\n executa o m\u00E9todo main() no primeiro thread (AppKit)\n -Xdock:name="\n substitui o nome da aplica\u00E7\u00E3o padr\u00E3o exibido no encaixe\n -Xdock:icon=\n substitui o \u00EDcone exibido no encaixe\n\n + + java.launcher.cls.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0} + java.launcher.cls.error2=Erro: o m\u00E9todo main n\u00E3o \u00E9 {0} na classe {1}; defina o m\u00E9todo main como:\n public static void main(String[] args) +--- ./jdk/src/share/classes/sun/management/HotSpotDiagnostic.java 2013-09-06 11:28:35.000000000 -0700 ++++ ./jdk/src/share/classes/sun/management/HotSpotDiagnostic.java 2013-12-01 11:14:34.000000000 -0800 @@ -40,7 +40,17 @@ public HotSpotDiagnostic() { } @@ -36558,8 +64925,48 @@ public List getDiagnosticOptions() { List allFlags = Flag.getAllFlags(); ---- jdk/src/share/classes/sun/misc/InnocuousThread.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/share/classes/sun/misc/InnocuousThread.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/management/resources/agent_ja.properties 2013-09-06 11:28:36.000000000 -0700 ++++ ./jdk/src/share/classes/sun/management/resources/agent_ja.properties 2014-06-06 19:56:30.000000000 -0700 +@@ -36,7 +36,7 @@ + agent.err.configfile.closed.failed = \u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F + agent.err.configfile.access.denied = \u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F + +-agent.err.exportaddress.failed = JMX\u30B3\u30CD\u30AF\u30BF\u30FB\u30A2\u30C9\u30EC\u30B9\u306E\u8A08\u6E2C\u30D0\u30C3\u30D5\u30A1\u3078\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F ++agent.err.exportaddress.failed = JMX\u30B3\u30CD\u30AF\u30BF\u30FB\u30A2\u30C9\u30EC\u30B9\u306E\u8A08\u6E2C\u30D0\u30C3\u30D5\u30A1\u3078\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u304C\u5931\u6557\u3057\u307E\u3057\u305F + + agent.err.agentclass.notfound = \u7BA1\u7406\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 + agent.err.agentclass.failed = \u7BA1\u7406\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u304C\u5931\u6557\u3057\u307E\u3057\u305F +--- ./jdk/src/share/classes/sun/misc/FloatingDecimal.java 2013-09-06 11:28:37.000000000 -0700 ++++ ./jdk/src/share/classes/sun/misc/FloatingDecimal.java 2014-06-06 19:56:30.000000000 -0700 +@@ -70,6 +70,15 @@ + static final int minDecimalExponent = -324; + static final int bigDecimalExponent = 324; // i.e. abs(minDecimalExponent) + ++ // ++ // The value below is chosen as a conservative threshold. It ++ // can be demonstrated that a decimal ulp less than 10^(-1075) ++ // is enough to guarantee correctness. Compensation is also made ++ // for the binary mantissa which takes 53 binary digits, or ++ // 17 decimal ones. Hence 1075 + 17 =~ 1100. ++ // ++ static final int MAX_NDIGITS = 1100; ++ + static final long highbyte = 0xff00000000000000L; + static final long highbit = 0x8000000000000000L; + static final long lowbytes = ~highbyte; +@@ -1468,6 +1477,10 @@ + * Formulate the EXACT big-number result as + * bigD0 * 10^exp + */ ++ if (nDigits > MAX_NDIGITS) { ++ nDigits = MAX_NDIGITS + 1; ++ digits[MAX_NDIGITS] = '1'; ++ } + FDBigInt bigD0 = new FDBigInt( lValue, digits, kDigits, nDigits ); + exp = decExponent - nDigits; + +--- ./jdk/src/share/classes/sun/misc/InnocuousThread.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/share/classes/sun/misc/InnocuousThread.java 2014-04-19 01:27:13.000000000 -0700 @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -36682,8 +65089,8 @@ + } + } +} ---- jdk/src/share/classes/sun/misc/JavaAWTAccess.java 2013-09-06 11:28:37.000000000 -0700 -+++ jdk/src/share/classes/sun/misc/JavaAWTAccess.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/misc/JavaAWTAccess.java 2013-09-06 11:28:37.000000000 -0700 ++++ ./jdk/src/share/classes/sun/misc/JavaAWTAccess.java 2014-04-19 01:27:13.000000000 -0700 @@ -26,14 +26,16 @@ package sun.misc; @@ -36707,8 +65114,8 @@ public Object get(Object key); public void put(Object key, Object value); public void remove(Object key); ---- jdk/src/share/classes/sun/misc/JavaLangAccess.java 2013-09-06 11:28:37.000000000 -0700 -+++ jdk/src/share/classes/sun/misc/JavaLangAccess.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/misc/JavaLangAccess.java 2013-09-06 11:28:37.000000000 -0700 ++++ ./jdk/src/share/classes/sun/misc/JavaLangAccess.java 2014-06-06 19:56:30.000000000 -0700 @@ -25,6 +25,7 @@ package sun.misc; @@ -36717,7 +65124,7 @@ import sun.reflect.ConstantPool; import sun.reflect.annotation.AnnotationType; import sun.nio.ch.Interruptible; -@@ -88,4 +89,10 @@ +@@ -88,4 +89,15 @@ * Returns the murmur hash value for the specified String. */ int getStringHash32(String string); @@ -36727,9 +65134,14 @@ + * inherited AccessControlContext. + */ + Thread newThreadWithAcc(Runnable target, AccessControlContext acc); ++ ++ /** ++ * Invokes the finalize method of the given object. ++ */ ++ void invokeFinalize(Object o) throws Throwable; } ---- jdk/src/share/classes/sun/misc/Service.java 2013-09-06 11:28:37.000000000 -0700 -+++ jdk/src/share/classes/sun/misc/Service.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/misc/Service.java 2013-09-06 11:28:37.000000000 -0700 ++++ ./jdk/src/share/classes/sun/misc/Service.java 2014-04-19 01:27:14.000000000 -0700 @@ -299,7 +299,7 @@ return service.cast(c.newInstance()); } catch (Throwable x) { @@ -36739,8 +65151,8 @@ x); } return null; /* This cannot happen */ ---- jdk/src/share/classes/sun/misc/SharedSecrets.java 2013-09-06 11:28:37.000000000 -0700 -+++ jdk/src/share/classes/sun/misc/SharedSecrets.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/misc/SharedSecrets.java 2013-09-06 11:28:37.000000000 -0700 ++++ ./jdk/src/share/classes/sun/misc/SharedSecrets.java 2014-04-19 01:27:14.000000000 -0700 @@ -197,9 +197,6 @@ public static JavaAWTAccess getJavaAWTAccess() { // this may return null in which case calling code needs to @@ -36751,8 +65163,8 @@ return javaAWTAccess; } } ---- jdk/src/share/classes/sun/misc/ThreadGroupUtils.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/share/classes/sun/misc/ThreadGroupUtils.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/misc/ThreadGroupUtils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/share/classes/sun/misc/ThreadGroupUtils.java 2014-04-19 01:27:14.000000000 -0700 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. @@ -36809,8 +65221,47 @@ + return currentTG; + } +} ---- jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java 2013-09-06 11:28:38.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/misc/VM.java 2013-09-06 11:28:37.000000000 -0700 ++++ ./jdk/src/share/classes/sun/misc/VM.java 2014-06-06 19:56:30.000000000 -0700 +@@ -147,6 +147,7 @@ + + + private static volatile boolean booted = false; ++ private static final Object lock = new Object(); + + // Invoked by by System.initializeSystemClass just before returning. + // Subsystems that are invoked during initialization can check this +@@ -154,13 +155,27 @@ + // application class loader has been set up. + // + public static void booted() { +- booted = true; ++ synchronized (lock) { ++ booted = true; ++ lock.notifyAll(); ++ } + } + + public static boolean isBooted() { + return booted; + } + ++ // Waits until VM completes initialization ++ // ++ // This method is invoked by the Finalizer thread ++ public static void awaitBooted() throws InterruptedException { ++ synchronized (lock) { ++ while (!booted) { ++ lock.wait(); ++ } ++ } ++ } ++ + // A user-settable upper limit on the maximum amount of allocatable direct + // buffer memory. This value may be changed during VM initialization if + // "java" is launched with "-XX:MaxDirectMemorySize=". +--- ./jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java 2013-09-06 11:28:38.000000000 -0700 ++++ ./jdk/src/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java 2014-01-18 12:16:25.000000000 -0800 @@ -428,6 +428,10 @@ throw new AlreadyBoundException(); InetSocketAddress isa = (local == null) ? @@ -36822,8 +65273,8 @@ NetHooks.beforeTcpBind(fd, isa.getAddress(), isa.getPort()); Net.bind(fd, isa.getAddress(), isa.getPort()); localAddress = Net.localAddress(fd); ---- jdk/src/share/classes/sun/nio/ch/Invoker.java 2013-09-06 11:28:39.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/Invoker.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/nio/ch/Invoker.java 2013-09-06 11:28:39.000000000 -0700 ++++ ./jdk/src/share/classes/sun/nio/ch/Invoker.java 2014-04-19 01:27:14.000000000 -0700 @@ -130,6 +130,18 @@ // clear interrupt @@ -36843,8 +65294,8 @@ } /** ---- jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java 2013-09-06 11:28:39.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java 2013-09-06 11:28:39.000000000 -0700 ++++ ./jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java 2014-01-18 12:16:25.000000000 -0800 @@ -599,6 +599,10 @@ throw new AlreadyBoundException(); InetSocketAddress isa = (local == null) ? @@ -36856,8 +65307,8 @@ NetHooks.beforeTcpBind(fd, isa.getAddress(), isa.getPort()); Net.bind(fd, isa.getAddress(), isa.getPort()); localAddress = Net.localAddress(fd); ---- jdk/src/share/classes/sun/nio/ch/ThreadPool.java 2013-09-06 11:28:39.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/ch/ThreadPool.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/nio/ch/ThreadPool.java 2013-09-06 11:28:39.000000000 -0700 ++++ ./jdk/src/share/classes/sun/nio/ch/ThreadPool.java 2014-04-19 01:27:14.000000000 -0700 @@ -27,6 +27,7 @@ import java.util.concurrent.*; @@ -36921,8 +65372,8 @@ // create thread pool ExecutorService executor = new ThreadPoolExecutor(0, Integer.MAX_VALUE, ---- jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java 2013-09-06 11:28:39.000000000 -0700 -+++ jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java 2013-09-06 11:28:39.000000000 -0700 ++++ ./jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java 2013-12-01 11:14:35.000000000 -0800 @@ -1031,6 +1031,24 @@ "ebcdic-s-871+euro" }); @@ -36948,8 +65399,8 @@ // Macintosh MacOS/Apple char encodingd ---- jdk/src/share/classes/sun/nio/cs/ext/IBM300.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/share/classes/sun/nio/cs/ext/IBM300.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/nio/cs/ext/IBM300.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/share/classes/sun/nio/cs/ext/IBM300.java 2013-12-01 11:14:35.000000000 -0800 @@ -0,0 +1,1875 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -38826,8 +67277,78 @@ + } + } +} ---- jdk/src/share/classes/sun/print/PSPrinterJob.java 2013-09-06 11:28:40.000000000 -0700 -+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/nio/cs/ext/META-INF/services/java.nio.charset.spi.CharsetProvider 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/nio/cs/ext/META-INF/services/java.nio.charset.spi.CharsetProvider 1969-12-31 16:00:00.000000000 -0800 +@@ -1,2 +0,0 @@ +-# NIO charset SPI extended charset provider +-sun.nio.cs.ext.ExtendedCharsets +--- ./jdk/src/share/classes/sun/print/DocumentPropertiesUI.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/share/classes/sun/print/DocumentPropertiesUI.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,62 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.print; ++ ++import java.awt.Window; ++import java.awt.print.PrinterJob; ++import javax.print.PrintService; ++import javax.print.ServiceUIFactory; ++import javax.print.attribute.PrintRequestAttributeSet; ++ ++public abstract class DocumentPropertiesUI { ++ ++ /** ++ * For Win32 doc properties sheet. ++ */ ++ public static final int ++ DOCUMENTPROPERTIES_ROLE = ServiceUIFactory.RESERVED_UIROLE +100; ++ ++ /** ++ * Name of (this) abstract class for Document Properties. ++ */ ++ public static final String ++ DOCPROPERTIESCLASSNAME = DocumentPropertiesUI.class.getName(); ++ ++ /** ++ * Invokes whatever code is needed to display a native dialog ++ * with the specified owner. The owner should be the cross-platform ++ * dialog. If the user cancels the dialog the return value is null. ++ * A non-null return value is always a new attribute set (or is it?) ++ * The cross-platform dialog may need to be updated to reflect the ++ * updated properties. ++ */ ++ public abstract PrintRequestAttributeSet ++ showDocumentProperties(PrinterJob job, ++ Window owner, ++ PrintService service, ++ PrintRequestAttributeSet aset); ++ ++} +--- ./jdk/src/share/classes/sun/print/PSPrinterJob.java 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/PSPrinterJob.java 2014-06-06 19:56:34.000000000 -0700 @@ -1568,7 +1568,7 @@ } @@ -38837,8 +67358,146 @@ execCmd = new String[ncomps]; execCmd[n++] = "/usr/bin/lpr"; if ((pFlags & PRINTER) != 0) { ---- jdk/src/share/classes/sun/print/resources/serviceui_es.properties 2013-09-06 11:28:40.000000000 -0700 -+++ jdk/src/share/classes/sun/print/resources/serviceui_es.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/print/PrinterJobWrapper.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/share/classes/sun/print/PrinterJobWrapper.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,60 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.print; ++ ++import java.awt.print.PrinterJob; ++import javax.print.attribute.PrintRequestAttribute; ++ ++public class PrinterJobWrapper implements PrintRequestAttribute { ++ ++ private static final long serialVersionUID = -8792124426995707237L; ++ ++ private PrinterJob job; ++ ++ public PrinterJobWrapper(PrinterJob job) { ++ this.job = job; ++ } ++ ++ public PrinterJob getPrinterJob() { ++ return job; ++ } ++ ++ public final Class getCategory() { ++ return PrinterJobWrapper.class; ++ } ++ ++ public final String getName() { ++ return "printerjob-wrapper"; ++ } ++ ++ public String toString() { ++ return "printerjob-wrapper: " + job.toString(); ++ } ++ ++ public int hashCode() { ++ return job.hashCode(); ++ } ++} +--- ./jdk/src/share/classes/sun/print/RasterPrinterJob.java 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/RasterPrinterJob.java 2014-06-06 19:56:30.000000000 -0700 +@@ -879,6 +879,9 @@ + int x = bounds.x+bounds.width/3; + int y = bounds.y+bounds.height/3; + PrintService newService; ++ // temporarily add an attribute pointing back to this job. ++ PrinterJobWrapper jobWrapper = new PrinterJobWrapper(this); ++ attributes.add(jobWrapper); + try { + newService = + ServiceUI.printDialog(gc, x, y, +@@ -891,6 +894,7 @@ + DocFlavor.SERVICE_FORMATTED.PAGEABLE, + attributes); + } ++ attributes.remove(PrinterJobWrapper.class); + + if (newService == null) { + return false; +--- ./jdk/src/share/classes/sun/print/ServiceDialog.java 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/ServiceDialog.java 2014-06-06 19:56:30.000000000 -0700 +@@ -46,6 +46,7 @@ + import java.awt.event.ItemListener; + import java.awt.event.WindowEvent; + import java.awt.event.WindowAdapter; ++import java.awt.print.PrinterJob; + import java.io.File; + import java.io.FilePermission; + import java.io.IOException; +@@ -119,8 +120,6 @@ + private AppearancePanel pnlAppearance; + + private boolean isAWT = false; +- +- + static { + initResource(); + } +@@ -801,9 +800,32 @@ + if (dialog != null) { + dialog.show(); + } else { +- // REMIND: may want to notify the user why we're +- // disabling the button +- btnProperties.setEnabled(false); ++ DocumentPropertiesUI docPropertiesUI = null; ++ try { ++ docPropertiesUI = ++ (DocumentPropertiesUI)uiFactory.getUI ++ (DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE, ++ DocumentPropertiesUI.DOCPROPERTIESCLASSNAME); ++ } catch (Exception ex) { ++ } ++ if (docPropertiesUI != null) { ++ PrinterJobWrapper wrapper = (PrinterJobWrapper) ++ asCurrent.get(PrinterJobWrapper.class); ++ if (wrapper == null) { ++ return; // should not happen, defensive only. ++ } ++ PrinterJob job = wrapper.getPrinterJob(); ++ if (job == null) { ++ return; // should not happen, defensive only. ++ } ++ PrintRequestAttributeSet newAttrs = ++ docPropertiesUI.showDocumentProperties ++ (job, ServiceDialog.this, psCurrent, asCurrent); ++ if (newAttrs != null) { ++ asCurrent.addAll(newAttrs); ++ updatePanels(); ++ } ++ } + } + } + } +--- ./jdk/src/share/classes/sun/print/resources/serviceui_es.properties 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/resources/serviceui_es.properties 2014-01-18 12:16:25.000000000 -0800 @@ -36,29 +36,29 @@ label.pstype=Tipo: label.rangeto=A @@ -38875,8 +67534,8 @@ radiobutton.tumble=Cam&bio de Cara # The vkMnemonics correspond with the constants defined in KeyEvent, eg # 65 = KeyEvent.VK_A ---- jdk/src/share/classes/sun/print/resources/serviceui_fr.properties 2013-09-06 11:28:40.000000000 -0700 -+++ jdk/src/share/classes/sun/print/resources/serviceui_fr.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/print/resources/serviceui_fr.properties 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/resources/serviceui_fr.properties 2014-01-18 12:16:25.000000000 -0800 @@ -29,7 +29,7 @@ dialog.writeerror=Impossible d'\u00E9crire dans le fichier : # @@ -38924,8 +67583,8 @@ # error.pagerange=Plage de pages non valide. Sp\u00E9cifiez les valeurs de nouveau (ex. : 1-3,5,7-10) error.destination=Nom de fichier non valide ; recommencez ---- jdk/src/share/classes/sun/print/resources/serviceui_it.properties 2013-09-06 11:28:40.000000000 -0700 -+++ jdk/src/share/classes/sun/print/resources/serviceui_it.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/print/resources/serviceui_it.properties 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/resources/serviceui_it.properties 2014-01-18 12:16:26.000000000 -0800 @@ -47,8 +47,8 @@ label.rightmargin=&destro # @@ -38946,8 +67605,8 @@ tab.general=&Generale tab.pagesetup=Impo&sta pagina # ---- jdk/src/share/classes/sun/print/resources/serviceui_pt_BR.properties 2013-09-06 11:28:40.000000000 -0700 -+++ jdk/src/share/classes/sun/print/resources/serviceui_pt_BR.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/print/resources/serviceui_pt_BR.properties 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/resources/serviceui_pt_BR.properties 2014-01-18 12:16:26.000000000 -0800 @@ -31,7 +31,7 @@ label.info=Informa\u00E7\u00F5es: label.jobname=Nome do &Job: @@ -38995,8 +67654,8 @@ # error.pagerange=Faixa de p\u00E1ginas inv\u00E1lida; insira novamente os valores (por exemplo, 1-3,5,7-10) error.destination=Nome de arquivo inv\u00E1lido; tente novamente ---- jdk/src/share/classes/sun/print/resources/serviceui_sv.properties 2013-09-06 11:28:40.000000000 -0700 -+++ jdk/src/share/classes/sun/print/resources/serviceui_sv.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/print/resources/serviceui_sv.properties 2013-09-06 11:28:40.000000000 -0700 ++++ ./jdk/src/share/classes/sun/print/resources/serviceui_sv.properties 2014-01-18 12:16:26.000000000 -0800 @@ -17,7 +17,7 @@ button.properties=&Egenskaper... # @@ -39043,8 +67702,8 @@ # error.pagerange=Ogiltigt sidintervall. Skriv in v\u00E4rdena igen (t ex 1-3,5,7-10) error.destination=Ogiltigt filnamn. F\u00F6rs\u00F6k igen. ---- jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java 2013-09-06 11:28:41.000000000 -0700 -+++ jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java 2013-09-06 11:28:41.000000000 -0700 ++++ ./jdk/src/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java 2014-01-18 12:16:26.000000000 -0800 @@ -25,13 +25,17 @@ package sun.reflect.generics.reflectiveObjects; @@ -39101,8 +67760,8 @@ TypeVariable that = (TypeVariable) o; GenericDeclaration thatDecl = that.getGenericDeclaration(); ---- jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java 2013-09-06 11:28:41.000000000 -0700 -+++ jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java 2013-09-06 11:28:41.000000000 -0700 ++++ ./jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java 2014-01-18 12:16:26.000000000 -0800 @@ -26,9 +26,13 @@ package sun.reflect.misc; @@ -39208,8 +67867,8 @@ + return false; + } } ---- jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2013-09-06 11:28:41.000000000 -0700 -+++ jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2013-09-06 11:28:41.000000000 -0700 ++++ ./jdk/src/share/classes/sun/rmi/registry/RegistryImpl.java 2014-01-18 12:16:26.000000000 -0800 @@ -352,7 +352,7 @@ public RegistryImpl run() throws RemoteException { return new RegistryImpl(regPort); @@ -39236,8 +67895,8 @@ perms.add(new RuntimePermission("accessClassInPackage.sun.jvmstat.*")); perms.add(new RuntimePermission("accessClassInPackage.sun.jvm.hotspot.*")); ---- jdk/src/share/classes/sun/rmi/server/resources/rmid_ko.properties 2013-09-06 11:28:42.000000000 -0700 -+++ jdk/src/share/classes/sun/rmi/server/resources/rmid_ko.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/rmi/server/resources/rmid_ko.properties 2013-09-06 11:28:42.000000000 -0700 ++++ ./jdk/src/share/classes/sun/rmi/server/resources/rmid_ko.properties 2014-01-18 12:16:26.000000000 -0800 @@ -87,7 +87,7 @@ rmid.restart.service.warning=\nrmid: (\uACBD\uACE0) \uC11C\uBE44\uC2A4 \uC7AC\uC2DC\uC791\uC73C\uB85C \uC778\uD574 \uBC1C\uC0DD\uD55C \uC624\uB958: @@ -39247,8 +67906,8 @@ # "rmid" should not be translated rmid.log.snapshot.warning=\nrmid: (\uC2EC\uAC01) \uB85C\uADF8 \uC2A4\uB0C5\uC0F7\uC73C\uB85C \uC778\uD574 \uBC1C\uC0DD\uD55C \uC624\uB958: ---- jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java 2013-09-06 11:28:42.000000000 -0700 -+++ jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java 2013-09-06 11:28:42.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/ec/ECPrivateKeyImpl.java 2013-12-01 11:14:35.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. @@ -39269,8 +67928,8 @@ - } - } ---- jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java 2013-09-06 11:28:42.000000000 -0700 -+++ jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java 2013-09-06 11:28:42.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/internal/spec/TlsRsaPremasterSecretParameterSpec.java 2014-01-18 12:16:26.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. @@ -39351,8 +68010,8 @@ + return encodedSecret == null ? null : encodedSecret.clone(); + } } ---- jdk/src/share/classes/sun/security/jgss/GSSCredentialImpl.java 2013-09-06 11:28:42.000000000 -0700 -+++ jdk/src/share/classes/sun/security/jgss/GSSCredentialImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/jgss/GSSCredentialImpl.java 2013-09-06 11:28:42.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/jgss/GSSCredentialImpl.java 2013-12-01 11:14:35.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. @@ -39369,8 +68028,21 @@ buffer.append(']'); } catch (GSSException e) { // skip to next element ---- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2013-09-06 11:28:43.000000000 -0700 -+++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java 2013-09-06 11:28:43.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java 2014-06-06 19:56:30.000000000 -0700 +@@ -525,6 +525,10 @@ + + // get the mechanism token + byte[] mechToken = initToken.getMechToken(); ++ if (mechToken == null) { ++ throw new GSSException(GSSException.FAILURE, -1, ++ "mechToken is missing"); ++ } + + /* + * Select the best match between the list of mechs +--- ./jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2013-09-06 11:28:43.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2014-06-06 19:56:34.000000000 -0700 @@ -83,7 +83,8 @@ String osname = System.getProperty("os.name"); if (osname.startsWith("SunOS")) { @@ -39381,8 +68053,53 @@ gssLibs = new String[]{ "libgssapi.so", "libgssapi_krb5.so", ---- jdk/src/share/classes/sun/security/krb5/KdcComm.java 2013-09-06 11:28:43.000000000 -0700 -+++ jdk/src/share/classes/sun/security/krb5/KdcComm.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/krb5/Credentials.java 2013-09-06 11:28:43.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/krb5/Credentials.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -62,7 +62,9 @@ + private static CredentialsCache cache; + static boolean alreadyLoaded = false; + private static boolean alreadyTried = false; +- private static native Credentials acquireDefaultNativeCreds(); ++ ++ // Read native ticket with session key type in the given list ++ private static native Credentials acquireDefaultNativeCreds(int[] eTypes); + + public Credentials(Ticket new_ticket, + PrincipalName new_client, +@@ -373,6 +375,8 @@ + // It assumes that the GSS call has + // the privilege to access the default cache file. + ++ // This method is only called on Windows and Mac OS X, the native ++ // acquireDefaultNativeCreds is also available on these platforms. + public static synchronized Credentials acquireDefaultCreds() { + Credentials result = null; + +@@ -416,10 +420,11 @@ + } + if (alreadyLoaded) { + // There is some native code +- if (DEBUG) +- System.out.println(">> Acquire default native Credentials"); +- result = acquireDefaultNativeCreds(); +- // only TGT with DES key will be returned by native method ++ if (DEBUG) { ++ System.out.println(">> Acquire default native Credentials"); ++ } ++ result = acquireDefaultNativeCreds( ++ EType.getDefaults("default_tkt_enctypes")); + } + } + return result; +--- ./jdk/src/share/classes/sun/security/krb5/KdcComm.java 2013-09-06 11:28:43.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/krb5/KdcComm.java 2013-12-01 11:14:36.000000000 -0800 @@ -239,11 +239,15 @@ savedException = e; } @@ -39403,8 +68120,505 @@ } } return ibuf; ---- jdk/src/share/classes/sun/security/krb5/internal/NetClient.java 2013-09-06 11:28:43.000000000 -0700 -+++ jdk/src/share/classes/sun/security/krb5/internal/NetClient.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/krb5/Realm.java 2013-09-06 11:28:43.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/krb5/Realm.java 2014-06-06 19:56:30.000000000 -0700 +@@ -34,6 +34,7 @@ + import sun.security.krb5.internal.Krb5; + import sun.security.util.*; + import java.io.IOException; ++import java.util.LinkedList; + import java.util.StringTokenizer; + import java.util.Vector; + import java.util.Stack; +@@ -301,21 +302,25 @@ + } + + /** +- * Parses the [capaths] stanza of the configuration file +- * for a list of realms to traverse +- * to obtain credentials from the initiating realm cRealm to +- * the target realm sRealm. +- * @param cRealm the initiating realm +- * @param sRealm the target realm +- * @returns array of realms +- * @ throws KrbException +- */ +- +- /* +- * parseCapaths works for a capaths organized such that +- * for a given client realm C there is a tag C that +- * contains subtags Ci ... Cn that completely define intermediate +- * realms from C to target T. For example: ++ * Parses the [capaths] stanza of the configuration file for a ++ * list of realms to traverse to obtain credentials from the ++ * initiating realm cRealm to the target realm sRealm. ++ * ++ * For a given client realm C there is a tag C in [capaths] whose ++ * subtag S has a value which is a (possibly partial) path from C ++ * to S. When the path is partial, it contains only the tail of the ++ * full path. Values of other subtags will be used to build the full ++ * path. The value "." means a direct path from C to S. If realm S ++ * does not appear as a subtag, there is no path defined here. ++ * ++ * The implementation ignores all values which equals to C or S, or ++ * a "." in multiple values, or any duplicated realm names. ++ * ++ * When a path value has more than two realms, they can be specified ++ * with multiple key-value pairs each having a single value, but the ++ * order must not change. ++ * ++ * For example: + * + * [capaths] + * TIVOLI.COM = { +@@ -324,19 +329,24 @@ + * LDAPCENTRAL.NET = . + * } + * +- * The tag TIVOLI.COM contains subtags IBM.COM, IBM_LDAPCENTRAL.COM +- * and LDAPCENTRAL.NET that completely define the path from TIVOLI.COM +- * to IBM.COM (TIVOLI.COM->LADAPCENTRAL.NET->IBM_LDAPCENTRAL.COM->IBM +- * or TIVOLI.COM->MOONLITE.ORG->IBM.COM). +- * +- * A direct path is assumed for an intermediary whose entry is not +- * "closed" by a "." In the above example, TIVOLI.COM is assumed +- * to have a direct path to MOONLITE.ORG and MOONLITE.COM +- * in turn to IBM.COM. ++ * TIVOLI.COM has a direct path to LDAPCENTRAL.NET, which has a direct ++ * path to IBM_LDAPCENTRAL.COM. It also has a partial path to IBM.COM ++ * being "IBM_LDAPCENTRAL.COM MOONLITE.ORG". Merging these info together, ++ * a full path from TIVOLI.COM to IBM.COM will be ++ * ++ * TIVOLI.COM -> LDAPCENTRAL.NET -> IBM_LDAPCENTRAL.COM ++ * -> IBM_LDAPCENTRAL.COM -> MOONLITE.ORG ++ * ++ * Please note the sRealm IBM.COM does not appear in the path. ++ * ++ * @param cRealm the initiating realm ++ * @param sRealm the target realm, not the same as cRealm ++ * @returns array of realms including at least cRealm as the first ++ * element, or null if the config does not contain a sub-stanza ++ * for cRealm in [capaths] or the sub-stanza does not contain ++ * sRealm as a tag + */ +- +- private static String[] parseCapaths(String cRealm, String sRealm) throws KrbException { +- String[] retList = null; ++ private static String[] parseCapaths(String cRealm, String sRealm) { + + Config cfg = null; + try { +@@ -358,323 +368,102 @@ + return null; + } + +- String tempTarget = null, tempRealm = null; +- Stack iStack = new Stack<>(); +- +- /* +- * The half-established reversed-path, starting from the final target +- * (sRealm), each item can be connected to by the next one. +- * Might contains wrong item, if found, a bad track is performed +- */ +- Vector tempList = new Vector<>(8, 8); +- tempList.add(sRealm); +- +- int count = 0; // For debug only +- tempTarget = sRealm; +- +- out: do { +- if (DEBUG) { +- count++; +- System.out.println(">>> Realm parseCapaths: loop " + +- count + ": target=" + tempTarget); +- } ++ LinkedList path = new LinkedList<>(); + +- if (intermediaries != null && +- !intermediaries.equals(".") && +- !intermediaries.equals(cRealm)) { +- if (DEBUG) { +- System.out.println(">>> Realm parseCapaths: loop " + +- count + ": intermediaries=[" + +- intermediaries + "]"); +- } +- +- /* +- * We have one or more space-separated intermediary realms. +- * Stack them. A null is always added between intermedies of +- * different targets. When this null is popped, it means none +- * of the intermedies for this target is useful (because of +- * infinite loop), the target is then removed from the partial +- * tempList, and the next possible intermediary is tried. +- */ +- iStack.push(null); +- String[] ints = intermediaries.split("\\s+"); +- for (int i = ints.length-1; i>=0; i--) +- { +- tempRealm = ints[i]; +- if (tempRealm.equals(PrincipalName.REALM_COMPONENT_SEPARATOR_STR)) { +- break out; +- } +- if (!tempList.contains(tempRealm)) { +- iStack.push(tempRealm); +- if (DEBUG) { +- System.out.println(">>> Realm parseCapaths: loop " + +- count + +- ": pushed realm on to stack: " + +- tempRealm); +- } +- } else if (DEBUG) { +- System.out.println(">>> Realm parseCapaths: loop " + +- count + +- ": ignoring realm: [" + +- tempRealm + "]"); +- } +- } +- } else { +- if (DEBUG) { +- System.out.println(">>> Realm parseCapaths: loop " + +- count + +- ": no intermediaries"); +- } ++ String head = sRealm; ++ while (true) { ++ String value = cfg.getDefault(head, cRealm); ++ if (value == null) { + break; + } +- +- /* +- * Get next intermediary realm from the stack +- */ +- +- try { +- while ((tempTarget = iStack.pop()) == null) { +- tempList.removeElementAt(tempList.size()-1); +- if (DEBUG) { +- System.out.println(">>> Realm parseCapaths: backtrack, remove tail"); +- } ++ String[] more = value.split("\\s+"); ++ boolean changed = false; ++ for (int i=more.length-1; i>=0; i--) { ++ if (path.contains(more[i]) ++ || more[i].equals(".") ++ || more[i].equals(cRealm) ++ || more[i].equals(sRealm) ++ || more[i].equals(head)) { ++ // Ignore invalid values ++ continue; + } +- } catch (EmptyStackException exc) { +- tempTarget = null; +- } +- +- if (tempTarget == null) { +- /* +- * No more intermediaries. We're done. +- */ +- break; +- } +- +- tempList.add(tempTarget); +- +- if (DEBUG) { +- System.out.println(">>> Realm parseCapaths: loop " + count + +- ": added intermediary to list: " + +- tempTarget); +- } +- +- intermediaries = cfg.getDefault(tempTarget, cRealm); +- +- } while (true); +- +- if (tempList.isEmpty()) { +- return null; +- } +- +- // From (SREALM, T1, T2) to (CREALM, T2, T1) +- retList = new String[tempList.size()]; +- retList[0] = cRealm; +- for (int i=1; i>> Realm parseCapaths [" + i + +- "]=" + retList[i]); ++ changed = true; ++ path.addFirst(more[i]); + } ++ if (!changed) break; ++ head = path.getFirst(); + } +- +- return retList; +- } ++ path.addFirst(cRealm); ++ return path.toArray(new String[path.size()]); ++ } + + /** + * Build a list of realm that can be traversed + * to obtain credentials from the initiating realm cRealm + * for a service in the target realm sRealm. + * @param cRealm the initiating realm +- * @param sRealm the target realm +- * @returns array of realms +- * @throws KrbException ++ * @param sRealm the target realm, not the same as cRealm ++ * @returns array of realms including cRealm as the first element + */ +- private static String[] parseHierarchy(String cRealm, String sRealm) +- throws KrbException +- { +- String[] retList = null; +- +- // Parse the components and determine common part, if any. ++ private static String[] parseHierarchy(String cRealm, String sRealm) { + +- String[] cComponents = null; +- String[] sComponents = null; ++ String[] cComponents = cRealm.split("\\."); ++ String[] sComponents = sRealm.split("\\."); + +- StringTokenizer strTok = +- new StringTokenizer(cRealm, +- PrincipalName.REALM_COMPONENT_SEPARATOR_STR); ++ int cPos = cComponents.length; ++ int sPos = sComponents.length; + +- // Parse cRealm +- +- int cCount = strTok.countTokens(); +- cComponents = new String[cCount]; +- +- for (cCount = 0; strTok.hasMoreTokens(); cCount++) { +- cComponents[cCount] = strTok.nextToken(); +- } +- +- if (DEBUG) { +- System.out.println(">>> Realm parseHierarchy: cRealm has " + +- cCount + " components:"); +- int j = 0; +- while (j < cCount) { +- System.out.println(">>> Realm parseHierarchy: " + +- "cComponents["+j+"]=" + cComponents[j++]); +- } +- } +- +- // Parse sRealm +- +- strTok = new StringTokenizer(sRealm, +- PrincipalName.REALM_COMPONENT_SEPARATOR_STR); +- +- int sCount = strTok.countTokens(); +- sComponents = new String[sCount]; +- +- for (sCount = 0; strTok.hasMoreTokens(); sCount++) { +- sComponents[sCount] = strTok.nextToken(); +- } +- +- if (DEBUG) { +- System.out.println(">>> Realm parseHierarchy: sRealm has " + +- sCount + " components:"); +- int j = 0; +- while (j < sCount) { +- System.out.println(">>> Realm parseHierarchy: sComponents["+j+ +- "]=" + sComponents[j++]); +- } ++ boolean hasCommon = false; ++ for (sPos--, cPos--; sPos >=0 && cPos >= 0 && ++ sComponents[sPos].equals(cComponents[cPos]); ++ sPos--, cPos--) { ++ hasCommon = true; + } + +- // Determine common components, if any. ++ // For those with common components: ++ // length pos ++ // SITES1.SALES.EXAMPLE.COM 4 1 ++ // EVERYWHERE.EXAMPLE.COM 3 0 + +- int commonComponents = 0; ++ // For those without common components: ++ // length pos ++ // DEVEL.EXAMPLE.COM 3 2 ++ // PROD.EXAMPLE.ORG 3 2 + +- //while (sCount > 0 && cCount > 0 && +- // sComponents[--sCount].equals(cComponents[--cCount])) ++ LinkedList path = new LinkedList<>(); + +- for (sCount--, cCount--; sCount >=0 && cCount >= 0 && +- sComponents[sCount].equals(cComponents[cCount]); +- sCount--, cCount--) { +- commonComponents++; ++ // Un-common ones for client side ++ for (int i=0; i<=cPos; i++) { ++ path.addLast(subStringFrom(cComponents, i)); + } + +- int cCommonStart = -1; +- int sCommonStart = -1; +- +- int links = 0; +- +- if (commonComponents > 0) { +- sCommonStart = sCount+1; +- cCommonStart = cCount+1; +- +- // components from common to ancestors +- links += sCommonStart; +- links += cCommonStart; +- } else { +- links++; ++ // Common one ++ if (hasCommon) { ++ path.addLast(subStringFrom(cComponents, cPos+1)); + } + +- if (DEBUG) { +- if (commonComponents > 0) { +- System.out.println(">>> Realm parseHierarchy: " + +- commonComponents + " common component" + +- (commonComponents > 1 ? "s" : " ")); +- +- System.out.println(">>> Realm parseHierarchy: common part " +- + +- "in cRealm (starts at index " + +- cCommonStart + ")"); +- System.out.println(">>> Realm parseHierarchy: common part in sRealm (starts at index " + +- sCommonStart + ")"); +- +- +- String commonPart = substring(cRealm, cCommonStart); +- System.out.println(">>> Realm parseHierarchy: common part in cRealm=" + +- commonPart); +- +- commonPart = substring(sRealm, sCommonStart); +- System.out.println(">>> Realm parseHierarchy: common part in sRealm=" + +- commonPart); +- +- } else +- System.out.println(">>> Realm parseHierarchy: no common part"); +- } +- +- if (DEBUG) { +- System.out.println(">>> Realm parseHierarchy: total links=" + links); ++ // Un-common ones for server side ++ for (int i=sPos; i>=0; i--) { ++ path.addLast(subStringFrom(sComponents, i)); + } + +- retList = new String[links]; +- +- retList[0] = new String(cRealm); ++ // Remove sRealm from path. Note that it might be added at last loop ++ // or as a common component, if sRealm is a parent of cRealm ++ path.removeLast(); + +- if (DEBUG) { +- System.out.println(">>> Realm parseHierarchy A: retList[0]=" + +- retList[0]); +- } +- +- // For an initiator realm A.B.C.D.COM, +- // build a list krbtgt/B.C.D.COM@A.B.C.D.COM up to the common part, +- // ie the issuer realm is the immediate descendant +- // of the target realm. +- +- String cTemp = null, sTemp = null; +- int i; +- for (i = 1, cCount = 0; i < links && cCount < cCommonStart; cCount++) { +- sTemp = substring(cRealm, cCount+1); +- //cTemp = substring(cRealm, cCount); +- retList[i++] = new String(sTemp); +- +- if (DEBUG) { +- System.out.println(">>> Realm parseHierarchy B: retList[" + +- (i-1) +"]="+retList[i-1]); +- } +- } +- +- +- for (sCount = sCommonStart; i < links && sCount - 1 > 0; sCount--) { +- sTemp = substring(sRealm, sCount-1); +- //cTemp = substring(sRealm, sCount); +- retList[i++] = new String(sTemp); +- if (DEBUG) { +- System.out.println(">>> Realm parseHierarchy D: retList[" + +- (i-1) +"]="+retList[i-1]); +- } +- } +- +- return retList; ++ return path.toArray(new String[path.size()]); + } + +- private static String substring(String realm, int componentIndex) +- { +- int i = 0 , j = 0, len = realm.length(); +- +- while(i < len && j != componentIndex) { +- if (realm.charAt(i++) != PrincipalName.REALM_COMPONENT_SEPARATOR) +- continue; +- j++; +- } +- +- return realm.substring(i); +- } +- +- static int getRandIndex(int arraySize) { +- return (int)(Math.random() * 16384.0) % arraySize; +- } +- +- static void printNames(String[] names) { +- if (names == null || names.length == 0) +- return; +- +- int len = names.length; +- int i = 0; +- System.out.println("List length = " + len); +- while (i < names.length) { +- System.out.println("["+ i +"]=" + names[i]); +- i++; ++ /** ++ * Creates a realm name using components from the given postion. ++ * For example, subStringFrom({"A", "B", "C"}, 1) is "B.C". ++ */ ++ private static String subStringFrom(String[] components, int from) { ++ StringBuilder sb = new StringBuilder(); ++ for (int i=from; i i; k--) ++ for (newTgt = null, k = i+1; ++ newTgt == null && k < realms.length; k++) + { + + tempService = new ServiceName( +--- ./jdk/src/share/classes/sun/security/krb5/internal/NetClient.java 2013-09-06 11:28:43.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/krb5/internal/NetClient.java 2013-12-01 11:14:36.000000000 -0800 @@ -31,6 +31,8 @@ package sun.security.krb5.internal; @@ -39435,8 +68649,8 @@ } } ---- jdk/src/share/classes/sun/security/pkcs/PKCS8Key.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs/PKCS8Key.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs/PKCS8Key.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs/PKCS8Key.java 2013-12-01 11:14:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved. @@ -39462,8 +68676,8 @@ /** * Initialize an PKCS8Key object from an input stream. The data * on that input stream must be encoded using DER, obeying the ---- jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2013-12-01 11:14:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. @@ -39552,8 +68766,8 @@ } private static final class P11ECPublicKey extends P11Key ---- jdk/src/share/classes/sun/security/pkcs11/P11KeyAgreement.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs11/P11KeyAgreement.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs11/P11KeyAgreement.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs11/P11KeyAgreement.java 2014-01-18 12:16:26.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. @@ -39570,8 +68784,8 @@ if (keyBytes != newBytes) { key = new SecretKeySpec(newBytes, algorithm); } ---- jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs11/P11RSACipher.java 2014-01-18 12:16:26.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. @@ -39611,8 +68825,8 @@ // XXX implement unwrap using C_Unwrap() for all keys implInit(Cipher.DECRYPT_MODE, p11Key); if (wrappedKey.length > maxInputSize) { ---- jdk/src/share/classes/sun/security/pkcs11/P11Signature.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs11/P11Signature.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs11/P11Signature.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs11/P11Signature.java 2014-01-18 12:16:27.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. @@ -39639,8 +68853,8 @@ int k = Math.max(br.length, bs.length); // r and s each occupy half the array byte[] res = new byte[k << 1]; ---- jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs11/P11TlsRsaPremasterSecretGenerator.java 2014-01-18 12:16:27.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. @@ -39698,8 +68912,8 @@ } } ---- jdk/src/share/classes/sun/security/pkcs11/P11Util.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/pkcs11/P11Util.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/pkcs11/P11Util.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/pkcs11/P11Util.java 2014-01-18 12:16:27.000000000 -0800 @@ -131,20 +131,6 @@ return b; } @@ -39721,8 +68935,8 @@ public static byte[] getMagnitude(BigInteger bi) { byte[] b = bi.toByteArray(); if ((b.length > 1) && (b[0] == 0)) { ---- jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java 2014-01-18 12:16:27.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. @@ -39868,8 +69082,8 @@ } - } ---- jdk/src/share/classes/sun/security/provider/DSAPrivateKey.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/provider/DSAPrivateKey.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/provider/DSAPrivateKey.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/provider/DSAPrivateKey.java 2013-12-01 11:14:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved. @@ -39889,8 +69103,8 @@ protected void parseKeyBits() throws InvalidKeyException { try { DerInputStream in = new DerInputStream(key); ---- jdk/src/share/classes/sun/security/provider/SeedGenerator.java 2013-09-06 11:28:44.000000000 -0700 -+++ jdk/src/share/classes/sun/security/provider/SeedGenerator.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/provider/SeedGenerator.java 2013-09-06 11:28:44.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/provider/SeedGenerator.java 2014-04-19 01:27:14.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. @@ -39941,8 +69155,8 @@ /** * Helper function to convert a long into a byte array (least significant * byte first). ---- jdk/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java 2014-04-19 01:27:14.000000000 -0700 @@ -75,7 +75,7 @@ private PublicKey prevPubKey; @@ -39952,8 +69166,8 @@ private final static DisabledAlgorithmConstraints certPathDefaultConstraints = new DisabledAlgorithmConstraints( ---- jdk/src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java 2014-04-19 01:27:14.000000000 -0700 @@ -50,6 +50,7 @@ import sun.security.util.Cache; import sun.security.util.Debug; @@ -39995,8 +69209,8 @@ try { ctx = new InitialDirContext(env); /* ---- jdk/src/share/classes/sun/security/rsa/RSAPadding.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/rsa/RSAPadding.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/rsa/RSAPadding.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/rsa/RSAPadding.java 2014-04-19 01:27:14.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. @@ -40269,8 +69483,8 @@ } - } ---- jdk/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java 2013-12-01 11:14:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. @@ -40308,8 +69522,8 @@ - } - } ---- jdk/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java 2013-12-01 11:14:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. @@ -40329,8 +69543,8 @@ - } - } ---- jdk/src/share/classes/sun/security/ssl/Handshaker.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/ssl/Handshaker.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/ssl/Handshaker.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/ssl/Handshaker.java 2014-01-18 12:16:27.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. @@ -40440,8 +69654,8 @@ } /* ---- jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/ssl/RSAClientKeyExchange.java 2014-01-18 12:16:27.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. @@ -40663,8 +69877,28 @@ } } ---- jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java 2014-06-06 19:56:30.000000000 -0700 +@@ -172,7 +172,7 @@ + /* + * Drives the protocol state machine. + */ +- private int connectionState; ++ private volatile int connectionState; + + /* + * Flag indicating if the next record we receive MUST be a Finished +@@ -1443,7 +1443,7 @@ + * Return whether the socket has been explicitly closed by the application. + */ + public boolean isClosed() { +- return getConnectionState() == cs_APP_CLOSED; ++ return connectionState == cs_APP_CLOSED; + } + + /** +--- ./jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java 2014-04-19 01:27:14.000000000 -0700 @@ -68,7 +68,7 @@ // performance optimization @@ -40674,8 +69908,8 @@ // supported pairs of signature and hash algorithm private final static Map supportedMap; ---- jdk/src/share/classes/sun/security/tools/JarSigner.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/tools/JarSigner.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/tools/JarSigner.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/tools/JarSigner.java 2014-04-19 01:27:14.000000000 -0700 @@ -88,9 +88,6 @@ private static final String META_INF = "META-INF/"; @@ -40900,8 +70134,8 @@ } // display the certificate(s). The first one is end-entity cert and // its KeyUsage should be checked. ---- jdk/src/share/classes/sun/security/tools/JarSignerResources.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/tools/JarSignerResources.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/tools/JarSignerResources.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/tools/JarSignerResources.java 2014-01-18 12:16:27.000000000 -0800 @@ -110,9 +110,9 @@ {"Please.specify.alias.name", "Please specify alias name"}, {"Only.one.alias.can.be.specified", "Only one alias can be specified"}, @@ -40944,8 +70178,8 @@ }; /** ---- jdk/src/share/classes/sun/security/tools/JarSignerResources_ja.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/tools/JarSignerResources_ja.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/tools/JarSignerResources_ja.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/tools/JarSignerResources_ja.java 2014-01-18 12:16:27.000000000 -0800 @@ -79,7 +79,7 @@ {".verbose.suboptions.verbose.output.when.signing.verifying.", "[-verbose[:suboptions]] \u7F72\u540D/\u691C\u8A3C\u6642\u306E\u8A73\u7D30\u51FA\u529B\u3002"}, @@ -40986,17 +70220,29 @@ }; /** ---- jdk/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java 2013-09-06 11:28:45.000000000 -0700 -+++ jdk/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java 2014-04-20 12:39:21.000000000 -0700 -@@ -53,7 +53,7 @@ +--- ./jdk/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java 2013-09-06 11:28:45.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/tools/JarSignerResources_zh_CN.java 2014-06-06 19:56:30.000000000 -0700 +@@ -53,9 +53,9 @@ {"If.keystore.is.not.password.protected.then.storepass.and.keypass.must.not.be.specified", "\u5982\u679C\u5BC6\u94A5\u5E93\u672A\u53D7\u53E3\u4EE4\u4FDD\u62A4, \u5219\u4E0D\u80FD\u6307\u5B9A -storepass \u548C -keypass"}, {"Usage.jarsigner.options.jar.file.alias", - "\u7528\u6CD5: jarsigner [\u9009\u9879] jar \u6587\u4EF6\u522B\u540D"}, + "\u7528\u6CD5: jarsigner [\u9009\u9879] jar-file \u522B\u540D"}, {".jarsigner.verify.options.jar.file.alias.", - " jarsigner -verify [options] jar-file [alias...]"}, +- " jarsigner -verify [options] jar-file [alias...]"}, ++ " jarsigner -verify [\u9009\u9879] jar-file [\u522B\u540D...]"}, {".keystore.url.keystore.location", + "[-keystore ] \u5BC6\u94A5\u5E93\u4F4D\u7F6E"}, + {".storepass.password.password.for.keystore.integrity", +@@ -65,7 +65,7 @@ + {".keypass.password.password.for.private.key.if.different.", + "[-keypass <\u53E3\u4EE4>] \u79C1\u6709\u5BC6\u94A5\u7684\u53E3\u4EE4 (\u5982\u679C\u4E0D\u540C)"}, + {".certchain.file.name.of.alternative.certchain.file", +- "[-certchain ] \u66FF\u4EE3 certchain \u6587\u4EF6\u7684\u540D\u79F0"}, ++ "[-certchain <\u6587\u4EF6>] \u66FF\u4EE3\u8BC1\u4E66\u94FE\u6587\u4EF6\u7684\u540D\u79F0"}, + {".sigfile.file.name.of.SF.DSA.file", + "[-sigfile <\u6587\u4EF6>] .SF/.DSA \u6587\u4EF6\u7684\u540D\u79F0"}, + {".signedjar.file.name.of.signed.JAR.file", @@ -132,8 +132,11 @@ {".Signature.related.entries.","(\u4E0E\u7B7E\u540D\u76F8\u5173\u7684\u6761\u76EE)"}, {".Unsigned.entries.", "(\u672A\u7B7E\u540D\u6761\u76EE)"}, @@ -41029,8 +70275,8 @@ }; /** ---- jdk/src/share/classes/sun/security/util/KeyUtil.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/KeyUtil.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/KeyUtil.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/KeyUtil.java 2014-01-18 12:16:27.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. @@ -41063,8 +70309,8 @@ + } ---- jdk/src/share/classes/sun/security/util/Resources_de.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/Resources_de.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/Resources_de.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/Resources_de.java 2014-01-18 12:16:27.000000000 -0800 @@ -444,7 +444,7 @@ {"Retain", "Beibehalten"}, @@ -41074,8 +70320,8 @@ {"Add.Public.Key.Alias", "Public Key-Alias hinzuf\u00FCgen"}, {"Remove.Public.Key.Alias", "Public Key-Alias entfernen"}, ---- jdk/src/share/classes/sun/security/util/Resources_fr.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/Resources_fr.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/Resources_fr.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/Resources_fr.java 2014-01-18 12:16:27.000000000 -0800 @@ -557,12 +557,12 @@ {"invalid.null.Class.provided", "classe NULL fournie non valide"}, {"Subject.", "Objet :\n"}, @@ -41093,8 +70339,8 @@ {"Subject.is.read.only", "Sujet en lecture seule"}, {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set", "tentative d'ajout d'un objet qui n'est pas une instance de java.security.Principal dans un ensemble de principaux du sujet"}, ---- jdk/src/share/classes/sun/security/util/Resources_zh_CN.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/Resources_zh_CN.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/Resources_zh_CN.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/Resources_zh_CN.java 2014-01-18 12:16:27.000000000 -0800 @@ -310,7 +310,7 @@ "\u60A8\u7684\u5BC6\u94A5\u5E93\u5305\u542B {0,number,integer} \u4E2A\u6761\u76EE"}, {"Your.keystore.contains.keyStore.size.entries", @@ -41104,8 +70350,8 @@ {"Empty.input", "\u7A7A\u8F93\u5165"}, {"Not.X.509.certificate", "\u975E X.509 \u8BC1\u4E66"}, {"alias.has.no.public.key", "{0}\u6CA1\u6709\u516C\u5171\u5BC6\u94A5"}, ---- jdk/src/share/classes/sun/security/util/Resources_zh_TW.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/Resources_zh_TW.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/Resources_zh_TW.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/Resources_zh_TW.java 2014-01-18 12:16:27.000000000 -0800 @@ -388,7 +388,7 @@ {"Certificate.chain.in.reply.does.not.verify.", "\u56DE\u8986\u6642\u7684\u6191\u8B49\u93C8\u672A\u9A57\u8B49: "}, @@ -41115,8 +70361,8 @@ {".is.not.trusted.", "... \u662F\u4E0D\u88AB\u4FE1\u4EFB\u7684\u3002"}, {"Install.reply.anyway.no.", "\u9084\u662F\u8981\u5B89\u88DD\u56DE\u8986\uFF1F [\u5426]: "}, {"NO", "\u5426"}, ---- jdk/src/share/classes/sun/security/util/SecurityConstants.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/SecurityConstants.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/SecurityConstants.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/SecurityConstants.java 2014-01-18 12:16:27.000000000 -0800 @@ -257,5 +257,5 @@ // java.lang.SecurityManager @@ -41124,8 +70370,8 @@ - new SocketPermission("localhost:1024-", SOCKET_LISTEN_ACTION); + new SocketPermission("localhost:0", SOCKET_LISTEN_ACTION); } ---- jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java 2013-09-06 11:28:46.000000000 -0700 -+++ jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java 2013-09-06 11:28:46.000000000 -0700 ++++ ./jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java 2014-04-19 01:27:14.000000000 -0700 @@ -153,6 +153,52 @@ return false; } @@ -41179,8 +70425,8 @@ /** get digest from cache */ private MessageDigest getDigest(String algorithm) ---- jdk/src/share/classes/sun/swing/SwingLazyValue.java 2013-09-06 11:28:47.000000000 -0700 -+++ jdk/src/share/classes/sun/swing/SwingLazyValue.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/swing/SwingLazyValue.java 2013-09-06 11:28:47.000000000 -0700 ++++ ./jdk/src/share/classes/sun/swing/SwingLazyValue.java 2013-12-01 11:14:36.000000000 -0800 @@ -30,6 +30,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; @@ -41198,9 +70444,171 @@ Class c = Class.forName(className, true, null); if (methodName != null) { Class[] types = getClassArray(args); ---- jdk/src/share/classes/sun/swing/SwingUtilities2.java 2013-09-06 11:28:47.000000000 -0700 -+++ jdk/src/share/classes/sun/swing/SwingUtilities2.java 2014-04-20 12:39:21.000000000 -0700 -@@ -1301,6 +1301,19 @@ +--- ./jdk/src/share/classes/sun/swing/SwingUtilities2.java 2013-09-06 11:28:47.000000000 -0700 ++++ ./jdk/src/share/classes/sun/swing/SwingUtilities2.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -34,6 +34,7 @@ + import java.awt.geom.*; + import java.awt.print.PrinterGraphics; + import java.text.Bidi; ++import java.text.CharacterIterator; + import java.text.AttributedCharacterIterator; + import java.text.AttributedString; + +@@ -503,21 +504,24 @@ + * it to fit in the screen width. This distributes the spacing + * more evenly than directly laying out to the screen advances. + */ +- float screenWidth = (float) +- g2d.getFont().getStringBounds(text, DEFAULT_FRC).getWidth(); +- TextLayout layout = createTextLayout(c, text, g2d.getFont(), +- g2d.getFontRenderContext()); +- +- layout = layout.getJustifiedLayout(screenWidth); +- /* Use alternate print color if specified */ +- Color col = g2d.getColor(); +- if (col instanceof PrintColorUIResource) { +- g2d.setColor(((PrintColorUIResource)col).getPrintColor()); +- } ++ String trimmedText = trimTrailingSpaces(text); ++ if (!trimmedText.isEmpty()) { ++ float screenWidth = (float) g2d.getFont().getStringBounds ++ (trimmedText, DEFAULT_FRC).getWidth(); ++ TextLayout layout = createTextLayout(c, text, g2d.getFont(), ++ g2d.getFontRenderContext()); ++ ++ layout = layout.getJustifiedLayout(screenWidth); ++ /* Use alternate print color if specified */ ++ Color col = g2d.getColor(); ++ if (col instanceof PrintColorUIResource) { ++ g2d.setColor(((PrintColorUIResource)col).getPrintColor()); ++ } + +- layout.draw(g2d, x, y); ++ layout.draw(g2d, x, y); + +- g2d.setColor(col); ++ g2d.setColor(col); ++ } + + return; + } +@@ -777,24 +781,26 @@ + if (frc != null && + !isFontRenderContextPrintCompatible + (deviceFontRenderContext, frc)) { +- TextLayout layout = +- createTextLayout(c, new String(data, offset, length), +- g2d.getFont(), +- deviceFontRenderContext); +- float screenWidth = (float)g2d.getFont(). +- getStringBounds(data, offset, offset + length, frc). +- getWidth(); +- layout = layout.getJustifiedLayout(screenWidth); + +- /* Use alternate print color if specified */ +- Color col = g2d.getColor(); +- if (col instanceof PrintColorUIResource) { +- g2d.setColor(((PrintColorUIResource)col).getPrintColor()); +- } ++ String text = new String(data, offset, length); ++ TextLayout layout = new TextLayout(text, g2d.getFont(), ++ deviceFontRenderContext); ++ String trimmedText = trimTrailingSpaces(text); ++ if (!trimmedText.isEmpty()) { ++ float screenWidth = (float)g2d.getFont(). ++ getStringBounds(trimmedText, frc).getWidth(); ++ layout = layout.getJustifiedLayout(screenWidth); + +- layout.draw(g2d,x,y); ++ /* Use alternate print color if specified */ ++ Color col = g2d.getColor(); ++ if (col instanceof PrintColorUIResource) { ++ g2d.setColor(((PrintColorUIResource)col).getPrintColor()); ++ } + +- g2d.setColor(col); ++ layout.draw(g2d,x,y); ++ ++ g2d.setColor(col); ++ } + + return nextX; + } +@@ -876,14 +882,23 @@ + } else { + frc = g2d.getFontRenderContext(); + } +- TextLayout layout = new TextLayout(iterator, frc); ++ TextLayout layout; + if (isPrinting) { + FontRenderContext deviceFRC = g2d.getFontRenderContext(); + if (!isFontRenderContextPrintCompatible(frc, deviceFRC)) { +- float screenWidth = layout.getAdvance(); + layout = new TextLayout(iterator, deviceFRC); +- layout = layout.getJustifiedLayout(screenWidth); ++ AttributedCharacterIterator trimmedIt = ++ getTrimmedTrailingSpacesIterator(iterator); ++ if (trimmedIt != null) { ++ float screenWidth = new TextLayout(trimmedIt, frc). ++ getAdvance(); ++ layout = layout.getJustifiedLayout(screenWidth); ++ } ++ } else { ++ layout = new TextLayout(iterator, frc); + } ++ } else { ++ layout = new TextLayout(iterator, frc); + } + layout.draw(g2d, x, y); + retVal = layout.getAdvance(); +@@ -1035,6 +1050,39 @@ + return (g instanceof PrinterGraphics || g instanceof PrintGraphics); + } + ++ private static String trimTrailingSpaces(String s) { ++ int i = s.length() - 1; ++ while(i >= 0 && Character.isWhitespace(s.charAt(i))) { ++ i--; ++ } ++ return s.substring(0, i + 1); ++ } ++ ++ private static AttributedCharacterIterator getTrimmedTrailingSpacesIterator ++ (AttributedCharacterIterator iterator) { ++ int curIdx = iterator.getIndex(); ++ ++ char c = iterator.last(); ++ while(c != CharacterIterator.DONE && Character.isWhitespace(c)) { ++ c = iterator.previous(); ++ } ++ ++ if (c != CharacterIterator.DONE) { ++ int endIdx = iterator.getIndex(); ++ ++ if (endIdx == iterator.getEndIndex() - 1) { ++ iterator.setIndex(curIdx); ++ return iterator; ++ } else { ++ AttributedString trimmedText = new AttributedString(iterator, ++ iterator.getBeginIndex(), endIdx + 1); ++ return trimmedText.getIterator(); ++ } ++ } else { ++ return null; ++ } ++ } ++ + /** + * Determines whether the SelectedTextColor should be used for painting text + * foreground for the specified highlight. +@@ -1301,6 +1349,19 @@ } /** @@ -41220,16 +70628,16 @@ * Returns true if EventQueue.getCurrentEvent() has the permissions to * access the system clipboard and if it is allowed gesture (if * checkGesture true) ---- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2014-06-06 19:56:34.000000000 -0700 @@ -30,4 +30,5 @@ #[solaris]sun.tools.attach.SolarisAttachProvider #[windows]sun.tools.attach.WindowsAttachProvider #[linux]sun.tools.attach.LinuxAttachProvider +#[bsd]sun.tools.attach.BsdAttachProvider #[macosx]sun.tools.attach.BsdAttachProvider ---- jdk/src/share/classes/sun/tools/jar/Main.java 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/Main.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/Main.java 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/Main.java 2014-06-06 19:56:34.000000000 -0700 @@ -51,6 +51,7 @@ String zname = ""; String[] files; @@ -41300,8 +70708,8 @@ if (!d.exists() && !d.mkdirs() || !d.isDirectory()) { throw new IOException(formatMsg( "error.create.dir", d.getPath())); ---- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2014-06-06 19:56:34.000000000 -0700 @@ -44,6 +44,8 @@ {0} : could not create directory error.incorrect.length=\ @@ -41311,8 +70719,8 @@ out.added.manifest=\ added manifest out.update.manifest=\ ---- jdk/src/share/classes/sun/tools/jar/resources/jar_de.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_de.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_de.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_de.properties 2014-01-18 12:16:28.000000000 -0800 @@ -41,7 +41,7 @@ out.stored=(0 % gespeichert) out.create=\ erstellt: {0} @@ -41322,8 +70730,8 @@ out.size=(ein = {0}) (aus = {1}) usage=Verwendung: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] Dateien...\nOptionen:\n -c Neues Archiv erstellen\n -t Inhaltsverzeichnis f\u00FCr Archiv auflisten\n -x Genannte (oder alle) Dateien aus Archiv extrahieren\n -u Vorhandenes Archiv aktualisieren\n -v Verbose-Ausgabe f\u00FCr Standardausgabe generieren\n -f Namen der Archivdatei angeben\n -m Manifest-Informationen von angegebener Manifest-Datei einschlie\u00DFen\n -e Anwendungs-Einstiegspunkt f\u00FCr die \n in einer ausf\u00FChrbaren JAR-Datei geb\u00FCndelte Standalone-Anwendung angeben\n -0 Nur speichern (keine ZIP-Komprimierung)\n -M Keine Manifest-Datei f\u00FCr die Eintr\u00E4ge erstellen\n -i Indexinformationen f\u00FCr angegebenen JAR-Dateien erstellen\n -C zum angegebenen Verzeichnis wechseln und folgende Datei einschlie\u00DFen\nFalls eine Datei ein Verzeichnis ist, wird dieses rekursiv verarbeitet.\nDer Name der Manifest-Datei, der Name der Archivdatei und der Name des Einstiegspunkts werden\nin derselben Reihenfolge wie die Kennzeichen "m", "f" und "e" angegeben.\n\nBeispiel 1: Archivieren Sie zwei Klassendateien in ein Archiv mit Namen "classes.jar": \n jar cvf classes.jar Foo.class Bar.class \nBeispiel 2: Verwenden Sie die vorhandenen Manifest-Datei "mymanifest", und archivieren Sie\n alle Dateien im Verzeichnis foo/ in "classes.jar": \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_es.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_es.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_es.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_es.properties 2014-01-18 12:16:28.000000000 -0800 @@ -41,7 +41,7 @@ out.stored=(almacenado 0%) out.create=\ creado: {0} @@ -41334,8 +70742,8 @@ -usage=Sintaxis: jar {ctxui}[vfm0Me] [archive-jar] [archive-manifiesto] [punto-entrada] [-C dir] archivos...\nOpciones:\n -c crear nuevo archivo\n -t crear la tabla de contenido del archivo\n -x extraer el archive mencionado (o todos) del archivo\n -u actualizar archive existente\n -v generar salida detallada de los datos de salida est\u00E1ndar\n -f especificar nombre de archive de almacenamiento\n -m incluir informaci\u00F3n de manifiesto del archive de manifiesto especificado\n -e especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n que se incluye dentro de un archive jar ejecutable\n -0 s\u00F3lo almacenar; no utilizar compresi\u00F3n ZIP\n -M no crear un archive de manifiesto para las entradas\n -i generar informaci\u00F3n de \u00EDndice para los archives jar especificados\n -C cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente.\nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\nespecifican en el mismo orden que los indicadores 'm', 'f' y 'e'.\n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n archivos del directorio foo/ en 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n +usage=Sintaxis: jar {ctxui}[vfm0Me] [archive-jar] [archive-manifiesto] [punto-entrada] [-C dir] archivos...\nOpciones:\n -c crear nuevo archivo\n -t crear la tabla de contenido del archivo\n -x extraer el archive mencionado (o todos) del archivo\n -u actualizar archive existente\n -v generar salida detallada de los datos de salida est\u00E1ndar\n -f especificar nombre de archive de almacenamiento\n -m incluir informaci\u00F3n de manifiesto del archive de manifiesto especificado\n -e especificar punto de entrada de la aplicaci\u00F3n para la aplicaci\u00F3n aut\u00F3noma \n que se incluye dentro de un archive jar ejecutable\n -0 s\u00F3lo almacenar; no utilizar compresi\u00F3n ZIP\n -M no crear un archive de manifiesto para las entradas\n -i generar informaci\u00F3n de \u00EDndice para los archives jar especificados\n -C cambiar al directorio especificado e incluir el archivo siguiente\nSi alg\u00FAn archivo es un directorio, se procesar\u00E1 de forma recurrente.\nEl nombre del archivo de manifiesto, el nombre del archivo de almacenamiento y el nombre del punto de entrada se\nespecifican en el mismo orden que los indicadores 'm', 'f' y 'e'.\n\nEjemplo 1: para archivar archivos de dos clases en un archivo llamado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEjemplo 2: utilice un archivo de manifiesto existente 'mymanifest' y archive todos los\n archivos del directorio foo/ en 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_fr.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_fr.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_fr.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_fr.properties 2014-01-18 12:16:28.000000000 -0800 @@ -41,7 +41,7 @@ out.stored=(stockage : 0 %) out.create=\ cr\u00E9\u00E9 : {0} @@ -41345,8 +70753,8 @@ out.size=(entr\u00E9e = {0}) (sortie = {1}) usage=Syntaxe : jar {ctxui}[vfm0Me] [fichier-jar] [fichier-manifeste] [point-entr\u00E9e] [-C r\u00E9p] fichiers...\nOptions :\n -c cr\u00E9e une archive\n -t affiche la table des mati\u00E8res de l'archive\n -x extrait les fichiers nomm\u00E9s (ou tous les fichiers) de l'archive\n -u met \u00E0 jour l'archive existante\n -v g\u00E9n\u00E8re une version d\u00E9taill\u00E9e d'une sortie standard\n -f sp\u00E9cifie le nom du fichier archive\n -m inclut les informations de manifeste \u00E0 partir du fichier de manifeste sp\u00E9cifi\u00E9\n -e sp\u00E9cifie le point d'entr\u00E9e d'une application en mode autonome \n int\u00E9gr\u00E9e \u00E0 un fichier JAR ex\u00E9cutable\n -0 stockage uniquement, pas de compression ZIP\n -M ne cr\u00E9e pas de fichier manifeste pour les entr\u00E9es\n -i g\u00E9n\u00E8re les informations d'index des fichiers JAR sp\u00E9cifi\u00E9s\n -C passe au r\u00E9pertoire sp\u00E9cifi\u00E9 et inclut le fichier suivant\nSi l'un des fichiers est un r\u00E9pertoire, celui-ci est trait\u00E9 r\u00E9cursivement.\nLes noms du fichier manifeste, du fichier archive et du point d'entr\u00E9e sont\nsp\u00E9cifi\u00E9s dans le m\u00EAme ordre que celui des indicateurs m, f et e.\n\nExemple 1 : pour archiver deux fichiers de classe dans une archive intitul\u00E9e classes.jar : \n jar cvf classes.jar Foo.class Bar.class \nExemple 2 : pour utiliser un fichier manifeste existant 'monmanifeste', puis archiver tous les\n fichiers du r\u00E9pertoire foo/ dans 'classes.jar' : \n jar cvfm classes.jar monmanifeste -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_it.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_it.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_it.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_it.properties 2014-01-18 12:16:28.000000000 -0800 @@ -41,7 +41,7 @@ out.stored=(memorizzato 0%) out.create=\ creato: {0} @@ -41357,8 +70765,8 @@ -usage=Uso: jar {ctxui}[vfm0Me] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file ...\nOpzioni:\n -c crea un nuovo archivio\n -t visualizza l'indice dell'archivio\n -x estrae i file con nome (o tutti i file) dall'archivio\n -u aggiorna l'archivio esistente\n -v genera output commentato dall'output standard\n -f specifica il nome file dell'archivio\n -m include informazioni manifest dal file manifest specificato\n -e specifica il punto di ingresso per l'applicazione stand-alone \n inclusa nel file jar eseguibile\n -0 solo memorizzazione; senza compressione ZIP\n -M consente di non creare un file manifest per le voci\n -i genera informazioni sull'indice per i file jar specificati\n -C imposta la directory specificata e include il file seguente\nSe un file \u00E8 una directory, verr\u00E0 elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n file della directory foo/ in 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/.\n +usage=Uso: jar {ctxui}[vfm0Me] [file-jar] [file-manifest] [punto di ingresso] [-C dir] file ...\nOpzioni:\n -c crea un nuovo archivio\n -t visualizza l'indice dell'archivio\n -x estrae i file con nome (o tutti i file) dall'archivio\n -u aggiorna l'archivio esistente\n -v genera output commentato dall'output standard\n -f specifica il nome file dell'archivio\n -m include informazioni manifest dal file manifest specificato\n -e specifica il punto di ingresso per l'applicazione stand-alone \n inclusa nel file jar eseguibile\n -0 solo memorizzazione; senza compressione ZIP\n -M consente di non creare un file manifest per le voci\n -i genera informazioni sull'indice per i file jar specificati\n -C imposta la directory specificata e include il file seguente\nSe un file \u00E8 una directory, verr\u00E0 elaborato in modo ricorsivo.\nIl nome del file manifest, del file di archivio e del punto di ingresso devono\nessere specificati nello stesso ordine dei flag 'm', 'f' ed 'e'.\n\nEsempio 1: archiviazione di due file di classe in un archivio con il nome classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nEsempio 2: utilizzo del file manifest esistente 'mymanifest' e archiviazione di tutti i\n file della directory foo/ in 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_ja.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_ja.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_ja.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_ja.properties 2014-01-18 12:16:28.000000000 -0800 @@ -41,7 +41,7 @@ out.stored=(0%\u683C\u7D0D\u3055\u308C\u307E\u3057\u305F) out.create=\ {0}\u304C\u4F5C\u6210\u3055\u308C\u307E\u3057\u305F @@ -41369,8 +70777,8 @@ -usage=\u4F7F\u7528\u65B9\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n -c \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B\n -t \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3059\u308B\n -x \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3059\u308B\n -u \u65E2\u5B58\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3059\u308B\n -v \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n -f \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u6307\u5B9A\u3059\u308B\n -m \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\u53D6\u308A\u8FBC\u3080\n -e \u5B9F\u884C\u53EF\u80FDjar\u30D5\u30A1\u30A4\u30EB\u306B\u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n \u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u3092\u6307\u5B9A\u3059\u308B\n -0 \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u306A\u3044\n -M \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u306A\u3044\n -i \u6307\u5B9A\u306Ejar\u30D5\u30A1\u30A4\u30EB\u306E\u7D22\u5F15\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n -C \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u308A\u8FBC\u3080\n\u30D5\u30A1\u30A4\u30EB\u304C\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u5834\u5408\u306F\u518D\u5E30\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\n\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u304A\u3088\u3073\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u540D\u306F\u3001\n\u30D5\u30E9\u30B0'm'\u3001'f'\u3001'e'\u306E\u6307\u5B9A\u3068\u540C\u3058\u9806\u756A\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u4F8B1: 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6classes.jar\u306B\u4FDD\u5B58\u3059\u308B:\n jar cvf classes.jar Foo.class Bar.class\n\u4F8B2: \u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB'mymanifest'\u3092\u4F7F\u7528\u3057\u3001foo/\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\n \u5168\u30D5\u30A1\u30A4\u30EB\u3092'classes.jar'\u306B\u30A2\u30FC\u30AB\u30A4\u30D6\u3059\u308B:\n jar cvfm classes.jar mymanifest -C foo/ \n +usage=\u4F7F\u7528\u65B9\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n -c \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u65B0\u898F\u4F5C\u6210\u3059\u308B\n -t \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3059\u308B\n -x \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3059\u308B\n -u \u65E2\u5B58\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3059\u308B\n -v \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n -f \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u6307\u5B9A\u3059\u308B\n -m \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\u53D6\u308A\u8FBC\u3080\n -e \u5B9F\u884C\u53EF\u80FDjar\u30D5\u30A1\u30A4\u30EB\u306B\u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n \u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u3092\u6307\u5B9A\u3059\u308B\n -0 \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u306A\u3044\n -M \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u306A\u3044\n -i \u6307\u5B9A\u306Ejar\u30D5\u30A1\u30A4\u30EB\u306E\u7D22\u5F15\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n -C \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u53D6\u308A\u8FBC\u3080\n\u30D5\u30A1\u30A4\u30EB\u304C\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u5834\u5408\u306F\u518D\u5E30\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\n\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u304A\u3088\u3073\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8\u540D\u306F\u3001\n\u30D5\u30E9\u30B0'm'\u3001'f'\u3001'e'\u306E\u6307\u5B9A\u3068\u540C\u3058\u9806\u756A\u3067\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\n\u4F8B1: 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6classes.jar\u306B\u4FDD\u5B58\u3059\u308B:\n jar cvf classes.jar Foo.class Bar.class\n\u4F8B2: \u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB'mymanifest'\u3092\u4F7F\u7528\u3057\u3001foo/\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\n \u5168\u30D5\u30A1\u30A4\u30EB\u3092'classes.jar'\u306B\u30A2\u30FC\u30AB\u30A4\u30D6\u3059\u308B:\n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_ko.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_ko.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_ko.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_ko.properties 2014-01-18 12:16:28.000000000 -0800 @@ -34,14 +34,14 @@ error.create.dir={0}: \uB514\uB809\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. error.incorrect.length=\uCC98\uB9AC \uC911 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAE38\uC774\uAC00 \uBC1C\uACAC\uB428: {0} @@ -41389,8 +70797,8 @@ -usage=\uC0AC\uC6A9\uBC95: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\uC635\uC158:\n -c \uC0C8 \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4.\n -t \uC544\uCE74\uC774\uBE0C\uC5D0 \uB300\uD55C \uBAA9\uCC28\uB97C \uB098\uC5F4\uD569\uB2C8\uB2E4.\n -x \uBA85\uBA85\uB41C(\uB610\uB294 \uBAA8\uB4E0) \uD30C\uC77C\uC744 \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C \uCD94\uCD9C\uD569\uB2C8\uB2E4.\n -u \uAE30\uC874 \uC544\uCE74\uC774\uBE0C\uB97C \uAC31\uC2E0\uD569\uB2C8\uB2E4.\n -v \uD45C\uC900 \uCD9C\uB825\uC5D0 \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n -f \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -m \uC9C0\uC815\uB41C Manifest \uD30C\uC77C\uC758 Manifest \uC815\uBCF4\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.\n -e jar \uC2E4\uD589 \uD30C\uC77C\uC5D0 \uBC88\uB4E4\uB85C \uC81C\uACF5\uB41C \uB3C5\uB9BD\uD615 \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8\uC758 \n \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8 \uC2DC\uC791 \uC9C0\uC810\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -0 \uC800\uC7A5 \uC804\uC6A9: ZIP \uC555\uCD95\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -M \uD56D\uBAA9\uC5D0 \uB300\uD574 Manifest \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -i \uC9C0\uC815\uB41C jar \uD30C\uC77C\uC5D0 \uB300\uD55C \uC778\uB371\uC2A4 \uC815\uBCF4\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4.\n -C \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uB85C \uBCC0\uACBD\uD558\uACE0 \uB2E4\uC74C \uD30C\uC77C\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD2B9\uC815 \uD30C\uC77C\uC774 \uB514\uB809\uD1A0\uB9AC\uC77C \uACBD\uC6B0 \uC21C\uD658\uC801\uC73C\uB85C \uCC98\uB9AC\uB429\uB2C8\uB2E4.\nManifest \uD30C\uC77C \uC774\uB984, \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984 \uBC0F \uC2DC\uC791 \uC9C0\uC810 \uC774\uB984\uC740\n'm', 'f' \uBC0F 'e' \uD50C\uB798\uADF8\uC640 \uB3D9\uC77C\uD55C \uC21C\uC11C\uB85C \uC9C0\uC815\uB429\uB2C8\uB2E4.\n\n\uC608 1: classes.jar\uB77C\uB294 \uC544\uCE74\uC774\uBE0C\uC5D0 \uB450 \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uC544\uCE74\uC774\uBE0C\uD558\uB294 \uBC29\uBC95: \n jar cvf classes.jar Foo.class Bar.class \n\uC608 2: \uAE30\uC874 Manifest \uD30C\uC77C 'mymanifest'\uB97C \uC0AC\uC6A9\uD558\uC5EC\n foo/ \uB514\uB809\uD1A0\uB9AC\uC758 \uBAA8\uB4E0 \uD30C\uC77C\uC744 'classes.jar'\uB85C \uC544\uCE74\uC774\uBE0C\uD558\uB294 \uBC29\uBC95: \n jar cvfm classes.jar mymanifest -C foo/ .\n +usage=\uC0AC\uC6A9\uBC95: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\uC635\uC158:\n -c \uC0C8 \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4.\n -t \uC544\uCE74\uC774\uBE0C\uC5D0 \uB300\uD55C \uBAA9\uCC28\uB97C \uB098\uC5F4\uD569\uB2C8\uB2E4.\n -x \uBA85\uBA85\uB41C(\uB610\uB294 \uBAA8\uB4E0) \uD30C\uC77C\uC744 \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C \uCD94\uCD9C\uD569\uB2C8\uB2E4.\n -u \uAE30\uC874 \uC544\uCE74\uC774\uBE0C\uB97C \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n -v \uD45C\uC900 \uCD9C\uB825\uC5D0 \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n -f \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -m \uC9C0\uC815\uB41C Manifest \uD30C\uC77C\uC758 Manifest \uC815\uBCF4\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.\n -e jar \uC2E4\uD589 \uD30C\uC77C\uC5D0 \uBC88\uB4E4\uB85C \uC81C\uACF5\uB41C \uB3C5\uB9BD\uD615 \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8\uC758 \n \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8 \uC2DC\uC791 \uC9C0\uC810\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n -0 \uC800\uC7A5 \uC804\uC6A9: ZIP \uC555\uCD95\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -M \uD56D\uBAA9\uC5D0 \uB300\uD574 Manifest \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n -i \uC9C0\uC815\uB41C jar \uD30C\uC77C\uC5D0 \uB300\uD55C \uC778\uB371\uC2A4 \uC815\uBCF4\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4.\n -C \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uB85C \uBCC0\uACBD\uD558\uACE0 \uB2E4\uC74C \uD30C\uC77C\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD2B9\uC815 \uD30C\uC77C\uC774 \uB514\uB809\uD1A0\uB9AC\uC77C \uACBD\uC6B0 \uC21C\uD658\uC801\uC73C\uB85C \uCC98\uB9AC\uB429\uB2C8\uB2E4.\nManifest \uD30C\uC77C \uC774\uB984, \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984 \uBC0F \uC2DC\uC791 \uC9C0\uC810 \uC774\uB984\uC740\n'm', 'f' \uBC0F 'e' \uD50C\uB798\uADF8\uC640 \uB3D9\uC77C\uD55C \uC21C\uC11C\uB85C \uC9C0\uC815\uB429\uB2C8\uB2E4.\n\n\uC608 1: classes.jar\uB77C\uB294 \uC544\uCE74\uC774\uBE0C\uC5D0 \uB450 \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uC544\uCE74\uC774\uBE0C\uD558\uB294 \uBC29\uBC95: \n jar cvf classes.jar Foo.class Bar.class \n\uC608 2: \uAE30\uC874 Manifest \uD30C\uC77C 'mymanifest'\uB97C \uC0AC\uC6A9\uD558\uC5EC\n foo/ \uB514\uB809\uD1A0\uB9AC\uC758 \uBAA8\uB4E0 \uD30C\uC77C\uC744 'classes.jar'\uB85C \uC544\uCE74\uC774\uBE0C\uD558\uB294 \uBC29\uBC95: \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_pt_BR.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_pt_BR.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_pt_BR.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_pt_BR.properties 2014-06-06 19:56:31.000000000 -0700 @@ -37,11 +37,11 @@ out.update.manifest=manifesto atualizado out.ignore.entry=ignorando entrada {0} @@ -41405,25 +70813,26 @@ +out.inflated=\ inflado: {0} +out.size=(entrada = {0}) (sa\u00EDda= {1}) - usage=Uso: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos ...\nOp\u00E7\u00F5es:\n -c cria novo arquivo compactado\n -t lista o sum\u00E1rio do arquivo compactado\n -x extrai arquivos com o nome (ou todos) do arquivo compactado\n -u atualizar o arquivo compactado existente\n -v gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o\n -f especifica o nome do arquivo do arquivo compactado\n -m inclui as informa\u00E7\u00F5es do manifesto do arquivo de manifesto especificado\n -e especifica o ponto de entrada da aplica\u00E7\u00E3o para aplica\u00E7\u00E3o independente \n empacotando em um arquivo jar execut\u00E1vel\n -0 armazena somente; n\u00E3o usa compacta\u00E7\u00E3o ZIP\n -M n\u00E3o cria um arquivo de manifesto para as entradas\n -i gera informa\u00E7\u00F5es de \u00EDndice para os arquivos especificados\n -C altera para o diret\u00F3rio e inclui o arquivo seguinte\nSe nenhum arquivo for um diret\u00F3rio, ent\u00E3o ser\u00E1 processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada s\u00E3o\nespecificados na mesma ordem dos flags 'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado com o nome classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n arquivos no diret\u00F3rio foo/ na 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_sv.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_sv.properties 2014-04-20 12:39:21.000000000 -0700 +-usage=Uso: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos ...\nOp\u00E7\u00F5es:\n -c cria novo arquivo compactado\n -t lista o sum\u00E1rio do arquivo compactado\n -x extrai arquivos com o nome (ou todos) do arquivo compactado\n -u atualizar o arquivo compactado existente\n -v gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o\n -f especifica o nome do arquivo do arquivo compactado\n -m inclui as informa\u00E7\u00F5es do manifesto do arquivo de manifesto especificado\n -e especifica o ponto de entrada da aplica\u00E7\u00E3o para aplica\u00E7\u00E3o independente \n empacotando em um arquivo jar execut\u00E1vel\n -0 armazena somente; n\u00E3o usa compacta\u00E7\u00E3o ZIP\n -M n\u00E3o cria um arquivo de manifesto para as entradas\n -i gera informa\u00E7\u00F5es de \u00EDndice para os arquivos especificados\n -C altera para o diret\u00F3rio e inclui o arquivo seguinte\nSe nenhum arquivo for um diret\u00F3rio, ent\u00E3o ser\u00E1 processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada s\u00E3o\nespecificados na mesma ordem dos flags 'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado com o nome classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n arquivos no diret\u00F3rio foo/ na 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n ++usage=Uso: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] arquivos ...\nOp\u00E7\u00F5es:\n -c cria novo arquivo compactado\n -t lista o sum\u00E1rio do arquivo compactado\n -x extrai arquivos com o nome (ou todos) do arquivo compactado\n -u atualiza o arquivo compactado existente\n -v gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o\n -f especifica o nome do arquivo do arquivo compactado\n -m inclui as informa\u00E7\u00F5es do manifesto do arquivo de manifesto especificado\n -e especifica o ponto de entrada da aplica\u00E7\u00E3o para aplica\u00E7\u00E3o independente \n empacotando em um arquivo jar execut\u00E1vel\n -0 armazena somente; n\u00E3o usa compacta\u00E7\u00E3o ZIP\n -M n\u00E3o cria um arquivo de manifesto para as entradas\n -i gera informa\u00E7\u00F5es de \u00EDndice para os arquivos especificados\n -C passa para o diret\u00F3rio especificado e inclui o arquivo a seguir\nSe um arquivo tamb\u00E9m for um diret\u00F3rio, ele ser\u00E1 processado repetidamente.\nO nome do arquivo de manifesto, o nome do arquivo compactado e o nome do ponto de entrada s\u00E3o\nespecificados na mesma ordem dos flags 'm', 'f' e 'e'.\n\nExemplo 1: para arquivar dois arquivos de classe em um arquivo compactado denominado classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExemplo 2: use um arquivo de manifesto existente 'mymanifest' e arquive todos os\n arquivos no diret\u00F3rio foo/ na 'classes.jar': \n jar cvfm classes.jar mymanifest -C foo/ .\n +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_sv.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_sv.properties 2014-01-18 12:16:28.000000000 -0800 @@ -44,4 +44,4 @@ out.inflated=\ uppackat: {0} out.size=(in = {0}) (ut = {1}) -usage=Syntax: jar {ctxui}[vfm0Me] [jar fil] [manifestfil] [startpunkt] [-C-katalog] ...\nAlternativ:\n -c skapa nytt arkiv\n -t lista inneh\u00E5llsf\u00F6rteckning f\u00F6r arkiv\n -x extrahera namngivna (eller alla) filer fr\u00E5n arkiv\n -u uppdatera befintligt arkiv\n -v generera utf\u00F6rliga utdata vid standardutmatning\n -f ange arkivfilens namn\n -m inkludera manifestinformation fr\u00E5n angivet manifest\n -e ange programstartpunkt f\u00F6r frist\u00E5ende applikation \n som medf\u00F6ljer i en jar-programfil\n -0 endast lagra (ingen zip-komprimering)\n -M skapa inte n\u00E5gon manifestfil f\u00F6r posterna\n -i generera indexinformation f\u00F6r de angivna jar-filerna\n -C \u00E4ndra till den angivna katalogen och inkludera f\u00F6ljande fil\nOm en fil \u00E4r en katalog bearbetas den rekursivt.\nNamnen p\u00E5 manifestfilen, arkivfilen och startpunkten anges i samma\nordning som m-, f- och e-flaggorna.\n\nExempel 1: S\u00E5 h\u00E4r arkiverar du tv\u00E5 klassfiler i ett arkiv med namnet classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExempel 2: Anv\u00E4nd en befintlig manifestfil (mymanifest) och arkivera alla\n filer fr\u00E5n katalogen foo/ i classes.jar: \n jar cvfm classes.jar mymanifest -C foo/ .\n +usage=Syntax: jar {ctxui}[vfm0Me] [jar-fil] [manifestfil] [startpunkt] [-C katalog] filer...\nAlternativ:\n -c skapa nytt arkiv\n -t lista inneh\u00E5llsf\u00F6rteckning f\u00F6r arkiv\n -x extrahera namngivna (eller alla) filer fr\u00E5n arkiv\n -u uppdatera befintligt arkiv\n -v generera utf\u00F6rliga utdata vid standardutmatning\n -f ange arkivfilens namn\n -m inkludera manifestinformation fr\u00E5n angivet manifest\n -e ange programstartpunkt f\u00F6r frist\u00E5ende applikation \n som medf\u00F6ljer i en jar-programfil\n -0 endast lagra (ingen zip-komprimering)\n -M skapa inte n\u00E5gon manifestfil f\u00F6r posterna\n -i generera indexinformation f\u00F6r de angivna jar-filerna\n -C \u00E4ndra till den angivna katalogen och inkludera f\u00F6ljande fil\nOm en fil \u00E4r en katalog bearbetas den rekursivt.\nNamnen p\u00E5 manifestfilen, arkivfilen och startpunkten anges i samma\nordning som m-, f- och e-flaggorna.\n\nExempel 1: S\u00E5 h\u00E4r arkiverar du tv\u00E5 klassfiler i ett arkiv med namnet classes.jar: \n jar cvf classes.jar Foo.class Bar.class \nExempel 2: Anv\u00E4nd en befintlig manifestfil (mymanifest) och arkivera alla\n filer fr\u00E5n katalogen foo/ i classes.jar: \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_zh_CN.properties 2014-01-18 12:16:28.000000000 -0800 @@ -44,4 +44,4 @@ out.inflated=\ \u5DF2\u89E3\u538B: {0} out.size=(\u8F93\u5165 = {0}) (\u8F93\u51FA = {1}) -usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u9009\u9879\u5305\u62EC: \n -c \u521B\u5EFA\u65B0\u7684\u5F52\u6863\u6587\u4EF6\n -t \u5217\u51FA\u5F52\u6863\u76EE\u5F55\n -x \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u6240\u6709) \u6587\u4EF6\n -u \u66F4\u65B0\u73B0\u6709\u7684\u5F52\u6863\u6587\u4EF6\n -v \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA\n -f \u6307\u5B9A\u5F52\u6863\u6587\u4EF6\u540D\n -m \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\u6E05\u5355\u4FE1\u606F\n -e \u4E3A\u6346\u7ED1\u5230\u53EF\u6267\u884C jar \u6587\u4EF6\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n \u6307\u5B9A\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9\n -0 \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528\u60C5\u51B5\u4EFB\u4F55 ZIP \u538B\u7F29\n -M \u4E0D\u521B\u5EFA\u6761\u76EE\u7684\u6E05\u5355\u6587\u4EF6\n -i \u4E3A\u6307\u5B9A\u7684 jar \u6587\u4EF6\u751F\u6210\u7D22\u5F15\u4FE1\u606F\n -C \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\u5176\u4E2D\u7684\u6587\u4EF6\n\u5982\u679C\u6709\u4EFB\u4F55\u76EE\u5F55\u6587\u4EF6, \u5219\u5BF9\u5176\u8FDB\u884C\u9012\u5F52\u5904\u7406\u3002\n\u6E05\u5355\u6587\u4EF6\u540D, \u5F52\u6863\u6587\u4EF6\u540D\u548C\u5165\u53E3\u70B9\u540D\u79F0\u7684\u6307\u5B9A\u987A\u5E8F\n\u4E0E 'm', 'f' \u548C 'e' \u6807\u8BB0\u7684\u6307\u5B9A\u987A\u5E8F\u76F8\u540C\u3002\n\n\u793A\u4F8B 1: \u5C06\u4E24\u4E2A\u7C7B\u6587\u4EF6\u5F52\u6863\u5230\u4E00\u4E2A\u540D\u4E3A classes.jar \u7684\u5F52\u6863\u6587\u4EF6\u4E2D: \n jar cvf classes.jar Foo.class Bar.class \n\u793A\u4F8B 2: \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u6587\u4EF6 'mymanifest' \u5E76\n \u5C06 foo/ \u76EE\u5F55\u4E2D\u7684\u6240\u6709\u6587\u4EF6\u5F52\u6863\u5230 'classes.jar' \u4E2D: \n jar cvfm classes.jar mymanifest -C foo/\u3002\n +usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...\n\u9009\u9879\u5305\u62EC: \n -c \u521B\u5EFA\u65B0\u7684\u5F52\u6863\u6587\u4EF6\n -t \u5217\u51FA\u5F52\u6863\u76EE\u5F55\n -x \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u6240\u6709) \u6587\u4EF6\n -u \u66F4\u65B0\u73B0\u6709\u7684\u5F52\u6863\u6587\u4EF6\n -v \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA\n -f \u6307\u5B9A\u5F52\u6863\u6587\u4EF6\u540D\n -m \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\u6E05\u5355\u4FE1\u606F\n -e \u4E3A\u6346\u7ED1\u5230\u53EF\u6267\u884C jar \u6587\u4EF6\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n \u6307\u5B9A\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9\n -0 \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528\u60C5\u51B5\u4EFB\u4F55 ZIP \u538B\u7F29\n -M \u4E0D\u521B\u5EFA\u6761\u76EE\u7684\u6E05\u5355\u6587\u4EF6\n -i \u4E3A\u6307\u5B9A\u7684 jar \u6587\u4EF6\u751F\u6210\u7D22\u5F15\u4FE1\u606F\n -C \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\u5176\u4E2D\u7684\u6587\u4EF6\n\u5982\u679C\u6709\u4EFB\u4F55\u76EE\u5F55\u6587\u4EF6, \u5219\u5BF9\u5176\u8FDB\u884C\u9012\u5F52\u5904\u7406\u3002\n\u6E05\u5355\u6587\u4EF6\u540D, \u5F52\u6863\u6587\u4EF6\u540D\u548C\u5165\u53E3\u70B9\u540D\u79F0\u7684\u6307\u5B9A\u987A\u5E8F\n\u4E0E 'm', 'f' \u548C 'e' \u6807\u8BB0\u7684\u6307\u5B9A\u987A\u5E8F\u76F8\u540C\u3002\n\n\u793A\u4F8B 1: \u5C06\u4E24\u4E2A\u7C7B\u6587\u4EF6\u5F52\u6863\u5230\u4E00\u4E2A\u540D\u4E3A classes.jar \u7684\u5F52\u6863\u6587\u4EF6\u4E2D: \n jar cvf classes.jar Foo.class Bar.class \n\u793A\u4F8B 2: \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u6587\u4EF6 'mymanifest' \u5E76\n \u5C06 foo/ \u76EE\u5F55\u4E2D\u7684\u6240\u6709\u6587\u4EF6\u5F52\u6863\u5230 'classes.jar' \u4E2D: \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/tools/jar/resources/jar_zh_TW.properties 2013-09-06 11:28:49.000000000 -0700 -+++ jdk/src/share/classes/sun/tools/jar/resources/jar_zh_TW.properties 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jar/resources/jar_zh_TW.properties 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jar/resources/jar_zh_TW.properties 2014-01-18 12:16:28.000000000 -0800 @@ -41,7 +41,7 @@ out.stored=(\u5132\u5B58 0%) out.create=\ \u5EFA\u7ACB: {0} @@ -41433,33 +70842,982 @@ out.size=\ (\u8B80={0})(\u5BEB={1}) usage=\u7528\u6CD5: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] \u6A94\u6848 ...\n\u9078\u9805:\n -c \u5EFA\u7ACB\u65B0\u7684\u6B78\u6A94\n -t \u5217\u51FA\u6B78\u6A94\u7684\u76EE\u9304\n -x \u5F9E\u6B78\u6A94\u4E2D\u64F7\u53D6\u5DF2\u547D\u540D\u7684 (\u6216\u6240\u6709) \u6A94\u6848\n -u \u66F4\u65B0\u73FE\u6709\u6B78\u6A94\n -v \u5728\u6A19\u6E96\u8F38\u51FA\u4E2D\u7522\u751F\u8A73\u7D30\u8F38\u51FA\n -f \u6307\u5B9A\u6B78\u6A94\u6A94\u6848\u540D\u7A31\n -m \u5305\u542B\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u4E2D\u7684\u8CC7\u8A0A\u6E05\u55AE\u8CC7\u8A0A\n -e \u70BA\u7368\u7ACB\u61C9\u7528\u7A0B\u5F0F\u6307\u5B9A\u61C9\u7528\u7A0B\u5F0F\u9032\u5165\u9EDE\n \u5DF2\u96A8\u9644\u65BC\u53EF\u57F7\u884C jar \u6A94\u6848\u4E2D\n -0 \u50C5\u5132\u5B58; \u4E0D\u4F7F\u7528 ZIP \u58D3\u7E2E\u65B9\u5F0F\n -M \u4E0D\u70BA\u9805\u76EE\u5EFA\u7ACB\u8CC7\u8A0A\u6E05\u55AE\u6A94\u6848\n -i \u70BA\u6307\u5B9A\u7684 jar \u6A94\u6848\u7522\u751F\u7D22\u5F15\u8CC7\u8A0A\n -C \u8B8A\u66F4\u81F3\u6307\u5B9A\u76EE\u9304\u4E26\u5305\u542B\u5F8C\u9762\u6240\u5217\u7684\u6A94\u6848\n\u5982\u679C\u6709\u4EFB\u4F55\u6A94\u6848\u662F\u76EE\u9304\uFF0C\u5247\u6703\u5C0D\u5176\u9032\u884C\u905E\u8FF4\u8655\u7406\u3002\n\u6E05\u55AE\u6A94\u6848\u540D\u7A31\u3001\u6B78\u6A94\u6A94\u6848\u540D\u7A31\u548C\u9032\u5165\u9EDE\u540D\u7A31\n\u7684\u6307\u5B9A\u9806\u5E8F\u8207\u6307\u5B9A 'm' \u65D7\u6A19\u3001'f' \u65D7\u6A19\u548C 'e' \u65D7\u6A19\u7684\u9806\u5E8F\u76F8\u540C\u3002\n\n\u7BC4\u4F8B 1: \u5C07\u5169\u500B\u985E\u5225\u6A94\u6848\u6B78\u6A94\u81F3\u540D\u70BA classes.jar \u7684\u6B78\u6A94\u4E2D: \n jar cvf classes.jar Foo.class Bar.class\n\u7BC4\u4F8B 2: \u4F7F\u7528\u73FE\u6709\u8CC7\u8A0A\u6E05\u55AE\u6A94\u6848 'mymanifest' \u4E26\u5C07\n foo/ \u76EE\u9304\u4E2D\u7684\u6240\u6709\u6A94\u6848\u6B78\u6A94\u81F3 'classes.jar' \u4E2D: \n jar cvfm classes.jar mymanifest -C foo/ .\n ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/tools/jconsole/Messages.java 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/Messages.java 2014-06-06 19:56:31.000000000 -0700 +@@ -36,7 +36,7 @@ + Resources.initializeMessages(Messages.class, BUNDLE_NAME); + } + // TODO: +- // The names of some of the constants below looks strange. ++ // The names of some of the constants below look strange. + // That's because they were generated programmatically + // from the messages. They should be cleaned up, + // ___ should be removed etc. +@@ -265,6 +265,7 @@ + public static String SUMMARY_TAB_TAB_NAME; + public static String SUMMARY_TAB_VM_VERSION; + public static String THREADS; ++ public static String THREAD_TAB_INFO_LABEL_FORMAT; + public static String THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME; + public static String THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME; + public static String THRESHOLD; +@@ -304,9 +305,9 @@ + public static String WRITABLE; + public static String CONNECTION_FAILED1; + public static String CONNECTION_FAILED2; ++ public static String CONNECTION_FAILED_SSL1; ++ public static String CONNECTION_FAILED_SSL2; + public static String CONNECTION_LOST1; +- public static String CONNECTION_INSECURE1; +- public static String CONNECTION_INSECURE2; + public static String CONNECTING_TO1; + public static String CONNECTING_TO2; + public static String DEADLOCK_TAB; +--- ./jdk/src/share/classes/sun/tools/jconsole/SummaryTab.java 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/SummaryTab.java 2014-06-06 19:56:31.000000000 -0700 +@@ -213,8 +213,8 @@ + String[] strings2 = formatKByteStrings(u.getCommitted()); + append(Messages.COMMITTED_MEMORY, strings2[0]); + append(Messages.SUMMARY_TAB_PENDING_FINALIZATION_LABEL, +- Messages.SUMMARY_TAB_PENDING_FINALIZATION_VALUE, +- memoryBean.getObjectPendingFinalizationCount()); ++ Resources.format(Messages.SUMMARY_TAB_PENDING_FINALIZATION_VALUE, ++ memoryBean.getObjectPendingFinalizationCount())); + append(endTable); + + append(newTable); +--- ./jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java 2013-09-06 11:28:49.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/ThreadTab.java 2014-06-06 19:56:31.000000000 -0700 +@@ -66,9 +66,6 @@ + + private static final Border thinEmptyBorder = new EmptyBorder(2, 2, 2, 2); + +- private static final String infoLabelFormat = "ThreadTab.infoLabelFormat"; +- +- + /* + Hierarchy of panels and layouts for this tab: + +@@ -690,7 +687,7 @@ + + private void updateThreadsInfo(long tlCount, long tpCount, long ttCount, long timeStamp) { + getPlotter().addValues(timeStamp, tlCount); +- getInfoLabel().setText(Resources.format(infoLabelFormat, tlCount, tpCount, ttCount)); ++ getInfoLabel().setText(Resources.format(Messages.THREAD_TAB_INFO_LABEL_FORMAT, tlCount, tpCount, ttCount)); + } + } + } +--- ./jdk/src/share/classes/sun/tools/jconsole/VMPanel.java 2013-09-06 11:28:50.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/VMPanel.java 2014-06-06 19:56:31.000000000 -0700 +@@ -469,8 +469,8 @@ + msgExplanation = Resources.format(Messages.CONNECTING_TO2, getConnectionName()); + buttonStr = Messages.RECONNECT; + } else if (shouldUseSSL) { +- msgTitle = Messages.CONNECTION_INSECURE1; +- msgExplanation = Resources.format(Messages.CONNECTION_INSECURE2, getConnectionName()); ++ msgTitle = Messages.CONNECTION_FAILED_SSL1; ++ msgExplanation = Resources.format(Messages.CONNECTION_FAILED_SSL2, getConnectionName()); + buttonStr = Messages.INSECURE; + } else { + msgTitle = Messages.CONNECTION_FAILED1; +--- ./jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties 2013-09-06 11:28:50.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/resources/messages.properties 2014-06-06 19:56:31.000000000 -0700 +@@ -223,6 +223,7 @@ + SUMMARY_TAB_TAB_NAME=VM Summary + SUMMARY_TAB_VM_VERSION={0} version {1} + THREADS=Threads ++THREAD_TAB_INFO_LABEL_FORMAT=Live: {0} Peak: {1} Total: {2} + THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=Thread Information + THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=Chart for number of threads. + THRESHOLD=Threshold +@@ -244,7 +245,7 @@ + UNREGISTER=Unregister + UPTIME=Uptime + USAGE_THRESHOLD=Usage Threshold +-REMOTE_TF_USAGE=Usage: <hostname>:<port> OR service:jmx:<protocol>:<sap> ++REMOTE_TF_USAGE=Usage: &<hostname&>:&<port&> OR service:jmx:&<protocol&>:&<sap&> + USED=Used + USERNAME_COLON_=&Username: + USERNAME_ACCESSIBLE_NAME=User Name +@@ -262,9 +263,9 @@ + WRITABLE=Writable + CONNECTION_FAILED1=Connection Failed: Retry? + CONNECTION_FAILED2=The connection to {0} did not succeed.
Would you like to try again? ++CONNECTION_FAILED_SSL1=Secure connection failed. Retry insecurely? ++CONNECTION_FAILED_SSL2=The connection to {0} could not be made using SSL.
Would you like to try without SSL?
(Username and password will be sent in plain text.) + CONNECTION_LOST1=Connection Lost: Reconnect? +-CONNECTION_INSECURE1=ConnectionFailedSSL1 +-CONNECTION_INSECURE2=ConnectionFailedSSL2 + CONNECTING_TO1=Connecting to {0} + CONNECTING_TO2=You are currently being connected to {0}.
This will take a few moments. + DEADLOCK_TAB=Deadlock +--- ./jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties 2013-09-06 11:28:50.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties 2014-06-06 19:56:31.000000000 -0700 +@@ -52,7 +52,7 @@ + CONNECT_DIALOG_STATUS_BAR_ACCESSIBLE_NAME=\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30D0\u30FC + CONNECT_DIALOG_TITLE=JConsole: \u65B0\u898F\u63A5\u7D9A + CONNECTED_PUNCTUATION_CLICK_TO_DISCONNECT_=\u63A5\u7D9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u5207\u65AD\u3057\u307E\u3059\u3002 +-CONNECTION_FAILED=\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F ++CONNECTION_FAILED=\u63A5\u7D9A\u304C\u5931\u6557\u3057\u307E\u3057\u305F + CONNECTION=\u63A5\u7D9A(&C) + CONNECTION_NAME=\u63A5\u7D9A\u540D + CONNECTION_NAME__DISCONNECTED_={0} (\u5207\u65AD\u6E08) +@@ -88,8 +88,8 @@ + FILE_CHOOSER_FILE_EXISTS_OK_OPTION=\u7F6E\u63DB + FILE_CHOOSER_FILE_EXISTS_TITLE=\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u3066\u3044\u307E\u3059 + FILE_CHOOSER_SAVED_FILE=\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F:
{0}
({1}\u30D0\u30A4\u30C8) +-FILE_CHOOSER_SAVE_FAILED_MESSAGE=
\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F:
{0}
{1} +-FILE_CHOOSER_SAVE_FAILED_TITLE=\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F ++FILE_CHOOSER_SAVE_FAILED_MESSAGE=
\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u4FDD\u5B58\u304C\u5931\u6557\u3057\u307E\u3057\u305F:
{0}
{1} ++FILE_CHOOSER_SAVE_FAILED_TITLE=\u4FDD\u5B58\u304C\u5931\u6557\u3057\u307E\u3057\u305F + FREE_PHYSICAL_MEMORY=\u7A7A\u304D\u7269\u7406\u30E1\u30E2\u30EA\u30FC + FREE_SWAP_SPACE=\u7A7A\u304D\u30B9\u30EF\u30C3\u30D7\u30FB\u30B9\u30DA\u30FC\u30B9 + GARBAGE_COLLECTOR=\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30BF +@@ -161,7 +161,7 @@ + MESSAGE=\u30E1\u30C3\u30BB\u30FC\u30B8 + METHOD_SUCCESSFULLY_INVOKED=\u30E1\u30BD\u30C3\u30C9\u304C\u6B63\u5E38\u306B\u8D77\u52D5\u3055\u308C\u307E\u3057\u305F + MINIMIZE_ALL=\u3059\u3079\u3066\u6700\u5C0F\u5316(&M) +-MONITOR_LOCKED=\ \ \ - \u30ED\u30C3\u30AF\u6E08{0}\n ++MONITOR_LOCKED=\ - \u30ED\u30C3\u30AF\u6E08{0}\n + NAME=\u540D\u524D + NAME_AND_BUILD={0} (\u30D3\u30EB\u30C9{1}) + NAME_STATE=\u540D\u524D: {0}\n\u72B6\u614B: {1}\n +@@ -205,6 +205,7 @@ + PROCESS_CPU_TIME=\u30D7\u30ED\u30BB\u30B9CPU\u6642\u9593 + READABLE=\u8AAD\u53D6\u308A\u53EF\u80FD + RECONNECT=\u518D\u63A5\u7D9A ++INSECURE=\u975E\u30BB\u30AD\u30E5\u30A2 + REMOTE_PROCESS_COLON=\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9(&R): + REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=\u30EA\u30E2\u30FC\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9 + RESTORE_ALL=\u3059\u3079\u3066\u5FA9\u5143(&R) +@@ -222,6 +223,7 @@ + SUMMARY_TAB_TAB_NAME=VM\u30B5\u30DE\u30EA\u30FC + SUMMARY_TAB_VM_VERSION={0}\u30D0\u30FC\u30B8\u30E7\u30F3{1} + THREADS=\u30B9\u30EC\u30C3\u30C9 ++THREAD_TAB_INFO_LABEL_FORMAT=\u5B9F\u884C\u4E2D: {0} \u30D4\u30FC\u30AF: {1} \u5408\u8A08: {2} + THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=\u30B9\u30EC\u30C3\u30C9\u60C5\u5831 + THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=\u30B9\u30EC\u30C3\u30C9\u6570\u306E\u30C1\u30E3\u30FC\u30C8\u3002 + THRESHOLD=\u3057\u304D\u3044\u5024 +@@ -243,7 +245,7 @@ + UNREGISTER=\u767B\u9332\u89E3\u9664 + UPTIME=\u7A3C\u50CD\u6642\u9593 + USAGE_THRESHOLD=\u4F7F\u7528\u3057\u304D\u3044\u5024 +-REMOTE_TF_USAGE=\u4F7F\u7528\u65B9\u6CD5: <hostname>:<port>\u307E\u305F\u306Fservice:jmx:<protocol>:<sap> ++REMOTE_TF_USAGE=\u4F7F\u7528\u65B9\u6CD5: &<hostname&>:&<port&> OR service:jmx:&<protocol&>:&<sap&> + USED=\u4F7F\u7528\u6E08 + USERNAME_COLON_=\u30E6\u30FC\u30B6\u30FC\u540D(&U): + USERNAME_ACCESSIBLE_NAME=\u30E6\u30FC\u30B6\u30FC\u540D +@@ -259,8 +261,10 @@ + WINDOW=\u30A6\u30A3\u30F3\u30C9\u30A6(&W) + WINDOWS=\u30A6\u30A3\u30F3\u30C9\u30A6 + WRITABLE=\u66F8\u8FBC\u307F\u53EF\u80FD +-CONNECTION_FAILED1=\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002 +-CONNECTION_FAILED2={0}\u3078\u306E\u63A5\u7D9A\u304C\u6210\u529F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002
\u3082\u3046\u4E00\u5EA6\u8A66\u3057\u307E\u3059\u304B\u3002 ++CONNECTION_FAILED1=\u63A5\u7D9A\u304C\u5931\u6557\u3057\u307E\u3057\u305F: \u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002 ++CONNECTION_FAILED2={0}\u3078\u306E\u63A5\u7D9A\u304C\u6210\u529F\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002
\u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002 ++CONNECTION_FAILED_SSL1=\u30BB\u30AD\u30E5\u30A2\u306A\u63A5\u7D9A\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u975E\u30BB\u30AD\u30E5\u30A2\u3067\u518D\u8A66\u884C\u3057\u307E\u3059\u304B\u3002 ++CONNECTION_FAILED_SSL2=SSL\u3092\u4F7F\u7528\u3057\u3066{0}\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3002
SSL\u306A\u3057\u3067\u63A5\u7D9A\u3057\u307E\u3059\u304B\u3002
(\u30E6\u30FC\u30B6\u30FC\u540D\u304A\u3088\u3073\u30D1\u30B9\u30EF\u30FC\u30C9\u306F\u30D7\u30EC\u30FC\u30F3\u30FB\u30C6\u30AD\u30B9\u30C8\u3067\u9001\u4FE1\u3055\u308C\u307E\u3059\u3002) + CONNECTION_LOST1=\u63A5\u7D9A\u304C\u5931\u308F\u308C\u307E\u3057\u305F: \u518D\u63A5\u7D9A\u3057\u307E\u3059\u304B\u3002 + CONNECTING_TO1={0}\u306B\u63A5\u7D9A\u4E2D + CONNECTING_TO2={0}\u306B\u73FE\u5728\u63A5\u7D9A\u4E2D\u3067\u3059\u3002
\u3053\u308C\u306B\u306F\u6570\u5206\u304B\u304B\u308A\u307E\u3059\u3002 +@@ -270,4 +274,4 @@ + KBYTES={0} KB + PLOT=\u30D7\u30ED\u30C3\u30C8 + VISUALIZE=\u8996\u899A\u5316 +-ZZ_USAGE_TEXT=\u4F7F\u7528\u65B9\u6CD5: {0} [ -interval=n ] [ -notile ] [ -pluginpath ] [ -version ] [ connection ... ]\n\n -interval \u66F4\u65B0\u9593\u9694\u3092n\u79D2\u306B\u8A2D\u5B9A\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8\u306F4\u79D2)\n -notile \u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u6700\u521D\u306B\u4E26\u3079\u3066\u8868\u793A\u3057\u306A\u3044(2\u3064\u4EE5\u4E0A\u306E\u63A5\u7D9A\u306B\u3064\u3044\u3066)\n -pluginpath JConsole\u304C\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u53C2\u7167\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u30D1\u30B9\u3092\u6307\u5B9A\u3059\u308B\n -version \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5370\u5237\u3059\u308B\n\n connection = pid || host:port || JMX URL (service:jmx:://...)\n pid \u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9\u306E\u30D7\u30ED\u30BB\u30B9ID\n host \u30EA\u30E2\u30FC\u30C8\u30FB\u30DB\u30B9\u30C8\u540D\u307E\u305F\u306FIP\u30A2\u30C9\u30EC\u30B9\n port \u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u7528\u306E\u30DD\u30FC\u30C8\u756A\u53F7\n\n -J JConsole\u304C\u5B9F\u884C\u4E2D\u306EJava\u4EEE\u60F3\u30DE\u30B7\u30F3\u3078\u306E\n \u5165\u529B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B ++ZZ_USAGE_TEXT=\u4F7F\u7528\u65B9\u6CD5: {0} [ -interval=n ] [ -notile ] [ -pluginpath ] [ -version ] [ connection ... ]\n\n -interval \u66F4\u65B0\u9593\u9694\u3092n\u79D2\u306B\u8A2D\u5B9A\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8\u306F4\u79D2)\n -notile \u30A6\u30A3\u30F3\u30C9\u30A6\u3092\u6700\u521D\u306B\u4E26\u3079\u3066\u8868\u793A\u3057\u306A\u3044(2\u3064\u4EE5\u4E0A\u306E\u63A5\u7D9A\u306B\u3064\u3044\u3066)\n -pluginpath JConsole\u304C\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u53C2\u7167\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u30D1\u30B9\u3092\u6307\u5B9A\u3059\u308B\n -version \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3059\u308B\n\n connection = pid || host:port || JMX URL (service:jmx:://...)\n pid \u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30ED\u30BB\u30B9\u306E\u30D7\u30ED\u30BB\u30B9ID\n host \u30EA\u30E2\u30FC\u30C8\u30FB\u30DB\u30B9\u30C8\u540D\u307E\u305F\u306FIP\u30A2\u30C9\u30EC\u30B9\n port \u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u7528\u306E\u30DD\u30FC\u30C8\u756A\u53F7\n\n -J JConsole\u304C\u5B9F\u884C\u4E2D\u306EJava\u4EEE\u60F3\u30DE\u30B7\u30F3\u3078\u306E\n \u5165\u529B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B +--- ./jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties 2013-09-06 11:28:50.000000000 -0700 ++++ ./jdk/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties 2014-06-06 19:56:31.000000000 -0700 +@@ -161,7 +161,7 @@ + MESSAGE=\u6D88\u606F + METHOD_SUCCESSFULLY_INVOKED=\u5DF2\u6210\u529F\u8C03\u7528\u65B9\u6CD5 + MINIMIZE_ALL=\u5168\u90E8\u6700\u5C0F\u5316(&M) +-MONITOR_LOCKED=\ \ \ - \u5DF2\u9501\u5B9A {0}\n ++MONITOR_LOCKED=\ - \u5DF2\u9501\u5B9A {0}\n + NAME=\u540D\u79F0 + NAME_AND_BUILD={0} (\u5DE5\u4F5C\u7248\u672C {1}) + NAME_STATE=\u540D\u79F0: {0}\n\u72B6\u6001: {1}\n +@@ -205,6 +205,7 @@ + PROCESS_CPU_TIME=\u8FDB\u7A0B CPU \u65F6\u95F4 + READABLE=\u53EF\u8BFB + RECONNECT=\u91CD\u65B0\u8FDE\u63A5 ++INSECURE=\u4E0D\u5B89\u5168 + REMOTE_PROCESS_COLON=\u8FDC\u7A0B\u8FDB\u7A0B(&R): + REMOTE_PROCESS_TEXT_FIELD_ACCESSIBLE_NAME=\u8FDC\u7A0B\u8FDB\u7A0B + RESTORE_ALL=\u5168\u90E8\u8FD8\u539F(&R) +@@ -222,6 +223,7 @@ + SUMMARY_TAB_TAB_NAME=VM \u6982\u8981 + SUMMARY_TAB_VM_VERSION={0}\u7248\u672C {1} + THREADS=\u7EBF\u7A0B ++THREAD_TAB_INFO_LABEL_FORMAT=\u6D3B\u52A8: {0} \u5CF0\u503C: {1} \u603B\u8BA1: {2} + THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=\u7EBF\u7A0B\u4FE1\u606F + THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=\u8868\u793A\u7EBF\u7A0B\u6570\u7684\u56FE\u8868\u3002 + THRESHOLD=\u9608\u503C +@@ -243,7 +245,7 @@ + UNREGISTER=\u6CE8\u9500 + UPTIME=\u8FD0\u884C\u65F6\u95F4 + USAGE_THRESHOLD=\u7528\u6CD5\u9608\u503C +-REMOTE_TF_USAGE=\u7528\u6CD5: <hostname>:<port> \u6216 service:jmx:<protocol>:<sap> ++REMOTE_TF_USAGE=\u7528\u6CD5: &<hostname&>:&<port&> \u6216 service:jmx:&<protocol&>:&<sap&> + USED=\u5DF2\u7528 + USERNAME_COLON_=\u7528\u6237\u540D(&U): + USERNAME_ACCESSIBLE_NAME=\u7528\u6237\u540D +@@ -261,6 +263,8 @@ + WRITABLE=\u53EF\u5199\u5165 + CONNECTION_FAILED1=\u8FDE\u63A5\u5931\u8D25: \u662F\u5426\u91CD\u8BD5? + CONNECTION_FAILED2=\u672A\u6210\u529F\u8FDE\u63A5\u5230{0}\u3002
\u662F\u5426\u8981\u91CD\u8BD5? ++CONNECTION_FAILED_SSL1=\u5B89\u5168\u8FDE\u63A5\u5931\u8D25\u3002\u662F\u5426\u4EE5\u4E0D\u5B89\u5168\u7684\u65B9\u5F0F\u91CD\u8BD5? ++CONNECTION_FAILED_SSL2=\u65E0\u6CD5\u4F7F\u7528 SSL \u8FDE\u63A5\u5230{0}\u3002
\u662F\u5426\u5728\u4E0D\u4F7F\u7528 SSL \u7684\u60C5\u51B5\u4E0B\u8FDB\u884C\u5C1D\u8BD5?
(\u7528\u6237\u540D\u548C\u53E3\u4EE4\u5C06\u4EE5\u7EAF\u6587\u672C\u683C\u5F0F\u53D1\u9001\u3002) + CONNECTION_LOST1=\u8FDE\u63A5\u4E22\u5931: \u662F\u5426\u91CD\u65B0\u8FDE\u63A5? + CONNECTING_TO1=\u6B63\u5728\u8FDE\u63A5\u5230{0} + CONNECTING_TO2=\u60A8\u5F53\u524D\u6B63\u5728\u8FDE\u63A5\u5230{0}\u3002
\u8FD9\u5C06\u9700\u8981\u51E0\u5206\u949F\u7684\u65F6\u95F4\u3002 +--- ./jdk/src/share/classes/sun/util/logging/resources/logging.properties 2013-09-06 11:28:51.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/logging/resources/logging.properties 2014-06-06 19:56:31.000000000 -0700 +@@ -27,20 +27,20 @@ + # these are the same as the non-localized level name. + + # The following ALL CAPS words should be translated. +-ALL=ALL ++ALL=All + # The following ALL CAPS words should be translated. +-SEVERE=SEVERE ++SEVERE=Severe + # The following ALL CAPS words should be translated. +-WARNING=WARNING ++WARNING=Warning + # The following ALL CAPS words should be translated. +-INFO=INFO ++INFO=Info + # The following ALL CAPS words should be translated. +-CONFIG= CONFIG ++CONFIG= Config + # The following ALL CAPS words should be translated. +-FINE=FINE ++FINE=Fine + # The following ALL CAPS words should be translated. +-FINER=FINER ++FINER=Finer + # The following ALL CAPS words should be translated. +-FINEST=FINEST ++FINEST=Finest + # The following ALL CAPS words should be translated. +-OFF=OFF ++OFF=Off +--- ./jdk/src/share/classes/sun/util/logging/resources/logging_zh_TW.properties 2013-09-06 11:28:52.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/logging/resources/logging_zh_TW.properties 2014-06-06 19:56:31.000000000 -0700 +@@ -27,7 +27,7 @@ + # these are the same as the non-localized level name. + + # The following ALL CAPS words should be translated. +-ALL=\u5168\u90E8 ++ALL=\u6240\u6709 + # The following ALL CAPS words should be translated. + SEVERE=\u56B4\u91CD + # The following ALL CAPS words should be translated. +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -79,7 +79,7 @@ + "Chamorro Daylight Time", "ChDT"}; + String CHUT[] = new String[] {"Chuuk Time", "CHUT", + "Chuuk Summer Time", "CHUST"}; +- String CIT[] = new String[] {"Central Indonesia Time", "CIT", ++ String CIT[] = new String[] {"Central Indonesia Time", "WITA", + "Central Indonesia Summer Time", "CIST"}; + String CLT[] = new String[] {"Chile Time", "CLT", + "Chile Summer Time", "CLST"}; +@@ -193,7 +193,7 @@ + "Western African Summer Time", "WAST"}; + String WET[] = new String[] {"Western European Time", "WET", + "Western European Summer Time", "WEST"}; +- String WIT[] = new String[] {"West Indonesia Time", "WIT", ++ String WIT[] = new String[] {"West Indonesia Time", "WIB", + "West Indonesia Summer Time", "WIST"}; + String WST_AUS[] = new String[] {"Western Standard Time (Australia)", "WST", + "Western Summer Time (Australia)", "WST"}; +@@ -291,7 +291,7 @@ + {"Africa/Porto-Novo", WAT}, + {"Africa/Sao_Tome", GMT}, + {"Africa/Timbuktu", GMT}, +- {"Africa/Tripoli", CET}, ++ {"Africa/Tripoli", EET}, + {"Africa/Tunis", CET}, + {"Africa/Windhoek", WAT}, + {"America/Adak", HAST}, +@@ -308,7 +308,7 @@ + {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, + {"America/Argentina/San_Juan", AGT}, +- {"America/Argentina/San_Luis", WART}, ++ {"America/Argentina/San_Luis", AGT}, + {"America/Argentina/Tucuman", AGT}, + {"America/Argentina/Ushuaia", AGT}, + {"America/Aruba", AST}, +@@ -349,7 +349,7 @@ + {"America/Detroit", EST}, + {"America/Dominica", AST}, + {"America/Edmonton", MST}, +- {"America/Eirunepe", AMT}, ++ {"America/Eirunepe", ACT}, + {"America/El_Salvador", CST}, + {"America/Ensenada", PST}, + {"America/Fort_Wayne", EST}, +@@ -426,7 +426,7 @@ + "Suriname Summer Time", "SRST"}}, + {"America/Port-au-Prince", EST}, + {"America/Port_of_Spain", AST}, +- {"America/Porto_Acre", AMT}, ++ {"America/Porto_Acre", ACT}, + {"America/Porto_Velho", AMT}, + {"America/Puerto_Rico", AST}, + {"America/Rainy_River", CST}, +@@ -434,7 +434,7 @@ + {"America/Recife", BRT}, + {"America/Regina", CST}, + {"America/Resolute", CST}, +- {"America/Rio_Branco", AMT}, ++ {"America/Rio_Branco", ACT}, + {"America/Rosario", AGT}, + {"America/Santa_Isabel", PST}, + {"America/Santarem", BRT}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Syowa Time", "SYOT", + "Syowa Summer Time", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Coordinated Universal Time", "UTC", ++ "Central European Summer Time", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Vostok Time", "VOST", + "Vostok Summer Time", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Irkutsk Summer Time", "IRKST"}}, + {"Asia/Istanbul", EET}, + {"Asia/Jakarta", WIT}, +- {"Asia/Jayapura", new String[] {"East Indonesia Time", "EIT", ++ {"Asia/Jayapura", new String[] {"East Indonesia Time", "WIT", + "East Indonesia Summer Time", "EIST"}}, + {"Asia/Kabul", new String[] {"Afghanistan Time", "AFT", + "Afghanistan Summer Time", "AFST"}}, +@@ -537,7 +539,8 @@ + {"Asia/Kashgar", CTT}, + {"Asia/Kathmandu", NPT}, + {"Asia/Katmandu", NPT}, +- {"Asia/Khandyga", YAKT}, ++ {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT", ++ "Khandyga Summer Time", "YAKST"}}, + {"Asia/Kolkata", IST}, + {"Asia/Krasnoyarsk", new String[] {"Krasnoyarsk Time", "KRAT", + "Krasnoyarsk Summer Time", "KRAST"}}, +@@ -586,7 +589,8 @@ + {"Asia/Ulaanbaatar", ULAT}, + {"Asia/Ulan_Bator", ULAT}, + {"Asia/Urumqi", CTT}, +- {"Asia/Ust-Nera", VLAT}, ++ {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT", ++ "Ust-Nera Summer Time", "VLAST"}}, + {"Asia/Vientiane", ICT}, + {"Asia/Vladivostok", VLAT}, + {"Asia/Yakutsk", YAKT}, +@@ -635,7 +639,7 @@ + {"Australia/Yancowinna", BROKEN_HILL}, + {"BET", BRT}, + {"BST", BDT}, +- {"Brazil/Acre", AMT}, ++ {"Brazil/Acre", ACT}, + {"Brazil/DeNoronha", NORONHA}, + {"Brazil/East", BRT}, + {"Brazil/West", AMT}, +@@ -705,7 +709,7 @@ + "Samara Summer Time", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ + {"Jamaica", EST}, + {"Japan", JST}, + {"Kwajalein", MHT}, +- {"Libya", CET}, ++ {"Libya", EET}, + {"MET", new String[] {"Middle Europe Time", "MET", + "Middle Europe Summer Time", "MEST"}}, + {"Mexico/BajaNorte", PST}, +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -45,8 +45,8 @@ + protected final Object[][] getContents() { + String ACT[] = new String[] {"Acre Normalzeit", "ACT", + "Acre Sommerzeit", "ACST"}; +- String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00fcdaustralien)", "CST", +- "Zentrale Sommerzeit (S\u00fcdaustralien)", "CST"}; ++ String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien)", "CST", ++ "Zentrale Sommerzeit (S\u00FCdaustralien)", "CST"}; + String AGT[] = new String[] {"Argentinische Zeit", "ART", + "Argentinische Sommerzeit", "ARST"}; + String AKST[] = new String[] {"Alaska Normalzeit", "AKST", +@@ -61,10 +61,10 @@ + "Atlantik Sommerzeit", "ADT"}; + String BDT[] = new String[] {"Bangladesch Zeit", "BDT", + "Bangladesch Sommerzeit", "BDST"}; +- String BRISBANE[] = new String[] {"\u00d6stliche Normalzeit (Queensland)", "EST", +- "\u00d6stliche Sommerzeit (Queensland)", "EST"}; +- String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00fcdaustralien/New South Wales)", "CST", +- "Zentrale Sommerzeit (S\u00fcdaustralien/New South Wales)", "CST"}; ++ String BRISBANE[] = new String[] {"\u00D6stliche Normalzeit (Queensland)", "EST", ++ "\u00D6stliche Sommerzeit (Queensland)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien/New South Wales)", "CST", ++ "Zentrale Sommerzeit (S\u00FCdaustralien/New South Wales)", "CST"}; + String BRT[] = new String[] {"Brasilianische Zeit", "BRT", + "Brasilianische Sommerzeit", "BRST"}; + String BTT[] = new String[] {"Bhutanische Zeit", "BTT", +@@ -77,9 +77,9 @@ + "Chatham Sommerzeit", "CHADT"}; + String ChST[] = new String[] {"Chamorro Normalzeit", "ChST", + "Chamorro Sommerzeit", "ChDT"}; +- String CHUT[] = new String[] {"Chuuk Time", "CHUT", +- "Chuuk Summer Time", "CHUST"}; +- String CIT[] = new String[] {"Zentralindonesische Zeit", "CIT", ++ String CHUT[] = new String[] {"Chuuk Zeit", "CHUT", ++ "Chuuk Sommerzeit", "CHUST"}; ++ String CIT[] = new String[] {"Zentralindonesische Zeit", "WITA", + "Zentralindonesische Sommerzeit", "CIST"}; + String CLT[] = new String[] {"Chilenische Zeit", "CLT", + "Chilenische Sommerzeit", "CLST"}; +@@ -89,7 +89,7 @@ + "Chinesische Sommerzeit", "CDT"}; + String CUBA[] = new String[] {"Kubanische Normalzeit", "CST", + "Kubanische Sommerzeit", "CDT"}; +- String DARWIN[] = new String[] {"Zentrale Normalzeit (Northern Territory)", "CST", ++ String DARWIN[] = new String[] {"Central Normalzeit (Northern Territory)", "CST", + "Zentrale Sommerzeit (Northern Territory)", "CST"}; + String DUBLIN[] = new String[] {"Greenwich Zeit", "GMT", + "Irische Sommerzeit", "IST"}; +@@ -103,10 +103,10 @@ + "Ostgr\u00f6nl\u00e4ndische Sommerzeit", "EGST"}; + String EST[] = new String[] {"\u00d6stliche Normalzeit", "EST", + "\u00d6stliche Sommerzeit", "EDT"}; +- String EST_NSW[] = new String[] {"\u00d6stliche Normalzeit (New South Wales)", "EST", +- "\u00d6stliche Sommerzeit (New South Wales)", "EST"}; +- String FET[] = new String[] {"Further-eastern European Time", "FET", +- "Further-eastern European Summer Time", "FEST"}; ++ String EST_NSW[] = new String[] {"Eastern Normalzeit (Neus\u00FCdwales)", "EST", ++ "\u00D6stliche Sommerzeit (New South Wales)", "EST"}; ++ String FET[] = new String[] {"Kaliningrader Zeit", "FET", ++ "Kaliningrader Sommerzeit", "FEST"}; + String GHMT[] = new String[] {"Ghanaische Normalzeit", "GMT", + "Ghanaische Sommerzeit", "GHST"}; + String GAMBIER[] = new String[] {"Gambier Zeit", "GAMT", +@@ -159,8 +159,8 @@ + "Pitcairn Sommerzeit", "PDT"}; + String PKT[] = new String[] {"Pakistanische Zeit", "PKT", + "Pakistanische Sommerzeit", "PKST"}; +- String PONT[] = new String[] {"Pohnpei Time", "PONT", +- "Pohnpei Summer Time", "PONST"}; ++ String PONT[] = new String[] {"Pohnpei Zeit", "PONT", ++ "Pohnpei Sommerzeit", "PONST"}; + String PST[] = new String[] {"Pazifische Normalzeit", "PST", + "Pazifische Sommerzeit", "PDT"}; + String SAMOA[] = new String[] {"Samoa Normalzeit", "SST", +@@ -173,8 +173,8 @@ + "Singapur Sommerzeit", "SGST"}; + String SLST[] = new String[] {"Greenwich Normalzeit", "GMT", + "Sierra Leone Sommerzeit", "SLST"}; +- String TASMANIA[] = new String[] {"\u00d6stliche Normalzeit (Tasmanien)", "EST", +- "\u00d6stliche Sommerzeit (Tasmanien)", "EST"}; ++ String TASMANIA[] = new String[] {"\u00D6stliche Normalzeit (Tasmanien)", "EST", ++ "\u00D6stliche Sommerzeit (Tasmanien)", "EST"}; + String TMT[] = new String[] {"Turkmenische Zeit", "TMT", + "Turkmenische Sommerzeit", "TMST"}; + String ULAT[]= new String[] {"Ulaanbaatar Zeit", "ULAT", +@@ -183,8 +183,8 @@ + "Koordinierte Universalzeit", "UTC"}; + String UZT[] = new String[] {"Usbekistan Zeit", "UZT", + "Usbekistan Sommerzeit", "UZST"}; +- String VICTORIA[] = new String[] {"\u00d6stliche Normalzeit (Victoria)", "EST", +- "\u00d6stliche Sommerzeit (Victoria)", "EST"}; ++ String VICTORIA[] = new String[] {"\u00D6stliche Normalzeit (Victoria)", "EST", ++ "\u00D6stliche Sommerzeit (Victoria)", "EST"}; + String VLAT[] = new String[] {"Wladiwostok Zeit", "VLAT", + "Wladiwostok Sommerzeit", "VLAST"}; + String WART[] = new String[] {"Westargentinische Zeit", "WART", +@@ -193,7 +193,7 @@ + "Westafrikanische Sommerzeit", "WAST"}; + String WET[] = new String[] {"Westeurop\u00e4ische Zeit", "WEZ", + "Westeurop\u00e4ische Sommerzeit", "WESZ"}; +- String WIT[] = new String[] {"Westindonesische Zeit", "WIT", ++ String WIT[] = new String[] {"Westindonesische Zeit", "WIB", + "Westindonesische Sommerzeit", "WIST"}; + String WST_AUS[] = new String[] {"Westliche Normalzeit (Australien)", "WST", + "Westliche Sommerzeit (Australien)", "WST"}; +@@ -291,7 +291,7 @@ + {"Africa/Porto-Novo", WAT}, + {"Africa/Sao_Tome", GMT}, + {"Africa/Timbuktu", GMT}, +- {"Africa/Tripoli", CET}, ++ {"Africa/Tripoli", EET}, + {"Africa/Tunis", CET}, + {"Africa/Windhoek", WAT}, + {"America/Adak", HAST}, +@@ -308,7 +308,7 @@ + {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, + {"America/Argentina/San_Juan", AGT}, +- {"America/Argentina/San_Luis", WART}, ++ {"America/Argentina/San_Luis", AGT}, + {"America/Argentina/Tucuman", AGT}, + {"America/Argentina/Ushuaia", AGT}, + {"America/Aruba", AST}, +@@ -349,7 +349,7 @@ + {"America/Detroit", EST}, + {"America/Dominica", AST}, + {"America/Edmonton", MST}, +- {"America/Eirunepe", AMT}, ++ {"America/Eirunepe", ACT}, + {"America/El_Salvador", CST}, + {"America/Ensenada", PST}, + {"America/Fort_Wayne", EST}, +@@ -401,8 +401,8 @@ + {"America/Mendoza", AGT}, + {"America/Menominee", CST}, + {"America/Merida", CST}, +- {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", +- "Metlakatla Daylight Time", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"Metlakatla Normalzeit", "MeST", ++ "Metlakatla Sommerzeit", "MeDT"}}, + {"America/Mexico_City", CST}, + {"America/Miquelon", new String[] {"Pierre & Miquelon Normalzeit", "PMST", + "Pierre & Miquelon Sommerzeit", "PMDT"}}, +@@ -426,7 +426,7 @@ + "Suriname Sommerzeit", "SRST"}}, + {"America/Port-au-Prince", EST}, + {"America/Port_of_Spain", AST}, +- {"America/Porto_Acre", AMT}, ++ {"America/Porto_Acre", ACT}, + {"America/Porto_Velho", AMT}, + {"America/Puerto_Rico", AST}, + {"America/Rainy_River", CST}, +@@ -434,7 +434,7 @@ + {"America/Recife", BRT}, + {"America/Regina", CST}, + {"America/Resolute", CST}, +- {"America/Rio_Branco", AMT}, ++ {"America/Rio_Branco", ACT}, + {"America/Rosario", AGT}, + {"America/Santa_Isabel", PST}, + {"America/Santarem", BRT}, +@@ -466,8 +466,8 @@ + "Davis Sommerzeit", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville Zeit", "DDUT", + "Dumont-d'Urville Sommerzeit", "DDUST"}}, +- {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", +- "Macquarie Island Summer Time", "MIST"}}, ++ {"Antarctica/Macquarie", new String[] {"Macquarieinsel Zeit", "MIST", ++ "Macquarieinsel Sommerzeit", "MIST"}}, + {"Antarctica/Mawson", new String[] {"Mawson Zeit", "MAWT", + "Mawson Sommerzeit", "MAWST"}}, + {"Antarctica/McMurdo", NZST}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Syowa Zeit", "SYOT", + "Syowa Sommerzeit", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Koordinierte Universalzeit", "UTC", ++ "Mitteleurop\u00e4ische Sommerzeit", "MESZ"}}, + {"Antarctica/Vostok", new String[] {"Vostok Zeit", "VOST", + "Vostok Sommerzeit", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Irkutsk Sommerzeit", "IRKST"}}, + {"Asia/Istanbul", EET}, + {"Asia/Jakarta", WIT}, +- {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "EIT", ++ {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "WIT", + "Ostindonesische Sommerzeit", "EIST"}}, + {"Asia/Kabul", new String[] {"Afghanistanische Zeit", "AFT", + "Afghanistanische Sommerzeit", "AFST"}}, +@@ -537,7 +539,8 @@ + {"Asia/Kashgar", CTT}, + {"Asia/Kathmandu", NPT}, + {"Asia/Katmandu", NPT}, +- {"Asia/Khandyga", YAKT}, ++ {"Asia/Khandyga", new String[] {"Chandyga Zeit", "YAKT", ++ "Chandyga Sommerzeit", "YAKST"}}, + {"Asia/Kolkata", IST}, + {"Asia/Krasnoyarsk", new String[] {"Krasnojarsker Zeit", "KRAT", + "Krasnojarsker Sommerzeit", "KRAST"}}, +@@ -586,7 +589,8 @@ + {"Asia/Ulaanbaatar", ULAT}, + {"Asia/Ulan_Bator", ULAT}, + {"Asia/Urumqi", CTT}, +- {"Asia/Ust-Nera", VLAT}, ++ {"Asia/Ust-Nera", new String[] {"Ust-Nera Zeit", "VLAT", ++ "Ust-Nera Sommerzeit", "VLAST"}}, + {"Asia/Vientiane", ICT}, + {"Asia/Vladivostok", VLAT}, + {"Asia/Yakutsk", YAKT}, +@@ -635,7 +639,7 @@ + {"Australia/Yancowinna", BROKEN_HILL}, + {"BET", BRT}, + {"BST", BDT}, +- {"Brazil/Acre", AMT}, ++ {"Brazil/Acre", ACT}, + {"Brazil/DeNoronha", NORONHA}, + {"Brazil/East", BRT}, + {"Brazil/West", AMT}, +@@ -705,7 +709,7 @@ + "Samarische Sommerzeit", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ + {"Jamaica", EST}, + {"Japan", JST}, + {"Kwajalein", MHT}, +- {"Libya", CET}, ++ {"Libya", EET}, + {"MET", new String[] {"Zentraleurop\u00e4ische Zeit", "MET", + "Zentraleurop\u00e4ische Sommerzeit", "MEST"}}, + {"Mexico/BajaNorte", PST}, +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -45,7 +45,7 @@ + protected final Object[][] getContents() { + String ACT[] = new String[] {"Hora de Acre", "ACT", + "Hora de verano de Acre", "ACST"}; +- String ADELAIDE[] = new String[] {"Hora est\u00e1ndar Central (Sur de Australia)", "CST", ++ String ADELAIDE[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia)", "CST", + "Hora de verano Central (Sur de Australia)", "CST"}; + String AGT[] = new String[] {"Hora de Argentina", "ART", + "Hora de verano de Argentina", "ARST"}; +@@ -61,9 +61,9 @@ + "Hora de verano Atl\u00e1ntico", "ADT"}; + String BDT[] = new String[] {"Hora de Bangladesh", "BDT", + "Hora de verano de Bangladesh", "BDST"}; +- String BRISBANE[] = new String[] {"Hora est\u00e1ndar del Este (Queensland)", "EST", +- "Hora de verano del Este (Queensland)", "EST"}; +- String BROKEN_HILL[] = new String[] {"Hora est\u00e1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST", ++ String BRISBANE[] = new String[] {"Hora est\u00E1ndar del Este (Queensland)", "EST", ++ "Hora est\u00E1ndar de verano del Este (Queensland)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST", + "Hora de verano Central (Sur de Australia/Nueva Gales del Sur)", "CST"}; + String BRT[] = new String[] {"Hora de Brasil", "BRT", + "Hora de verano de Brasil", "BRST"}; +@@ -79,7 +79,7 @@ + "Hora de verano de Chamorro", "ChDT"}; + String CHUT[] = new String[] {"Chuuk Time", "CHUT", + "Chuuk Summer Time", "CHUST"}; +- String CIT[] = new String[] {"Hora de Indonesia Central", "CIT", ++ String CIT[] = new String[] {"Hora de Indonesia Central", "WITA", + "Hora de verano de Indonesia Central", "CIST"}; + String CLT[] = new String[] {"Hora de Chile", "CLT", + "Hora de verano de Chile", "CLST"}; +@@ -89,7 +89,7 @@ + "Hora de verano de China", "CDT"}; + String CUBA[] = new String[] {"Hora est\u00e1ndar de Cuba", "CST", + "Hora de verano de Cuba", "CDT"}; +- String DARWIN[] = new String[] {"Hora est\u00e1ndar Central (territorio del Norte)", "CST", ++ String DARWIN[] = new String[] {"Hora est\u00E1ndar Central (territorio del Norte)", "CST", + "Hora de verano Central (territorio del Norte)", "CST"}; + String DUBLIN[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", + "Hora de verano de Irlanda", "IST"}; +@@ -103,10 +103,10 @@ + "Hora de verano de Groenlandia Oriental", "EGST"}; + String EST[] = new String[] {"Hora est\u00e1ndar Oriental", "EST", + "Hora de verano Oriental", "EDT"}; +- String EST_NSW[] = new String[] {"Hora est\u00e1ndar Oriental (Nueva Gales del Sur)", "EST", ++ String EST_NSW[] = new String[] {"Hora est\u00E1ndar Oriental (Nueva Gales del Sur)", "EST", + "Hora de verano Oriental (Nueva Gales del Sur)", "EST"}; +- String FET[] = new String[] {"Further-eastern European Time", "FET", +- "Further-eastern European Summer Time", "FEST"}; ++ String FET[] = new String[] {"Hora de Europa m\u00E1s Oriental", "FET", ++ "Hora de verano de Europa m\u00E1s Oriental", "FEST"}; + String GHMT[] = new String[] {"Hora central de Ghana", "GMT", + "Hora de verano de Ghana", "GHST"}; + String GAMBIER[] = new String[] {"Hora de Gambier", "GAMT", +@@ -173,7 +173,7 @@ + "Hora de verano de Singapur", "SGST"}; + String SLST[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", + "Hora de verano de Sierra Leona", "SLST"}; +- String TASMANIA[] = new String[] {"Hora est\u00e1ndar del Este (Tasmania)", "EST", ++ String TASMANIA[] = new String[] {"Hora est\u00E1ndar del Este (Tasmania)", "EST", + "Hora de verano del Este (Tasmania)", "EST"}; + String TMT[] = new String[] {"Hora de Turkmenist\u00e1n", "TMT", + "Hora de verano de Turkmenist\u00e1n", "TMST"}; +@@ -183,7 +183,7 @@ + "Hora Universal Coordinada", "UTC"}; + String UZT[] = new String[] {"Hora de Uzbekist\u00e1n", "UZT", + "Hora de verano de Uzbekist\u00e1n", "UZST"}; +- String VICTORIA[] = new String[] {"Hora est\u00e1ndar del Este (Victoria)", "EST", ++ String VICTORIA[] = new String[] {"Hora est\u00E1ndar del Este (Victoria)", "EST", + "Hora de verano del Este (Victoria)", "EST"}; + String VLAT[] = new String[] {"Hora de Vladivostok", "VLAT", + "Hora de verano de Vladivostok", "VLAST"}; +@@ -193,9 +193,9 @@ + "Hora de verano de \u00c1frica Occidental", "WAST"}; + String WET[] = new String[] {"Hora de Europa Occidental", "WET", + "Hora de verano de Europa Occidental", "WEST"}; +- String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIT", ++ String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIB", + "Indonesia Hora de verano de Indonesia Occidental", "WIST"}; +- String WST_AUS[] = new String[] {"Hora est\u00e1ndar Occidental (Australia)", "WST", ++ String WST_AUS[] = new String[] {"Hora est\u00E1ndar Occidental (Australia)", "WST", + "Hora de verano Occidental (Australia)", "WST"}; + String WST_SAMOA[] = new String[] {"Hora de Samoa Occidental", "WST", + "Hora de verano de Samoa Occidental", "WSDT"}; +@@ -291,7 +291,7 @@ + {"Africa/Porto-Novo", WAT}, + {"Africa/Sao_Tome", GMT}, + {"Africa/Timbuktu", GMT}, +- {"Africa/Tripoli", CET}, ++ {"Africa/Tripoli", EET}, + {"Africa/Tunis", CET}, + {"Africa/Windhoek", WAT}, + {"America/Adak", HAST}, +@@ -308,7 +308,7 @@ + {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, + {"America/Argentina/San_Juan", AGT}, +- {"America/Argentina/San_Luis", WART}, ++ {"America/Argentina/San_Luis", AGT}, + {"America/Argentina/Tucuman", AGT}, + {"America/Argentina/Ushuaia", AGT}, + {"America/Aruba", AST}, +@@ -349,7 +349,7 @@ + {"America/Detroit", EST}, + {"America/Dominica", AST}, + {"America/Edmonton", MST}, +- {"America/Eirunepe", AMT}, ++ {"America/Eirunepe", ACT}, + {"America/El_Salvador", CST}, + {"America/Ensenada", PST}, + {"America/Fort_Wayne", EST}, +@@ -426,7 +426,7 @@ + "Hora de verano de Surinam", "SRST"}}, + {"America/Port-au-Prince", EST}, + {"America/Port_of_Spain", AST}, +- {"America/Porto_Acre", AMT}, ++ {"America/Porto_Acre", ACT}, + {"America/Porto_Velho", AMT}, + {"America/Puerto_Rico", AST}, + {"America/Rainy_River", CST}, +@@ -434,7 +434,7 @@ + {"America/Recife", BRT}, + {"America/Regina", CST}, + {"America/Resolute", CST}, +- {"America/Rio_Branco", AMT}, ++ {"America/Rio_Branco", ACT}, + {"America/Rosario", AGT}, + {"America/Santa_Isabel", PST}, + {"America/Santarem", BRT}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Hora de Syowa", "SYOT", + "Hora de verano de Syowa", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Hora Universal Coordinada", "UTC", ++ "Hora de verano de Europa Central", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Hora de Vostok", "VOST", + "Hora de verano de Vostok", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Hora de verano de Irkutsk", "IRKST"}}, + {"Asia/Istanbul", EET}, + {"Asia/Jakarta", WIT}, +- {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "EIT", ++ {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "WIT", + "Hora de verano de Indonesia Oriental", "EIST"}}, + {"Asia/Kabul", new String[] {"Hora de Afganist\u00e1n", "AFT", + "Hora de verano de Afganist\u00e1n", "AFST"}}, +@@ -537,7 +539,8 @@ + {"Asia/Kashgar", CTT}, + {"Asia/Kathmandu", NPT}, + {"Asia/Katmandu", NPT}, +- {"Asia/Khandyga", YAKT}, ++ {"Asia/Khandyga", new String[] {"Hora de Khandyga", "YAKT", ++ "Hora de verano de Khandyga", "YAKST"}}, + {"Asia/Kolkata", IST}, + {"Asia/Krasnoyarsk", new String[] {"Hora de Krasnoyarsk", "KRAT", + "Hora de verano de Krasnoyarsk", "KRAST"}}, +@@ -586,7 +589,8 @@ + {"Asia/Ulaanbaatar", ULAT}, + {"Asia/Ulan_Bator", ULAT}, + {"Asia/Urumqi", CTT}, +- {"Asia/Ust-Nera", VLAT}, ++ {"Asia/Ust-Nera", new String[] {"Hora de Ust-Nera", "VLAT", ++ "Hora de verano de Ust-Nera", "VLAST"}}, + {"Asia/Vientiane", ICT}, + {"Asia/Vladivostok", VLAT}, + {"Asia/Yakutsk", YAKT}, +@@ -616,8 +620,8 @@ + {"Australia/Canberra", EST_NSW}, + {"Australia/Currie", EST_NSW}, + {"Australia/Darwin", DARWIN}, +- {"Australia/Eucla", new String[] {"Hora est\u00e1ndar de Australia Central y Occidental", "CWST", +- "Hora de verano de Australia Central y Occidental", "CWST"}}, ++ {"Australia/Eucla", new String[] {"Hora est\u00E1ndar de Australia Central y Occidental", "CWST", ++ "Hora est\u00E1ndar de verano de Australia Central y Occidental", "CWST"}}, + {"Australia/Hobart", TASMANIA}, + {"Australia/LHI", LORD_HOWE}, + {"Australia/Lindeman", BRISBANE}, +@@ -635,7 +639,7 @@ + {"Australia/Yancowinna", BROKEN_HILL}, + {"BET", BRT}, + {"BST", BDT}, +- {"Brazil/Acre", AMT}, ++ {"Brazil/Acre", ACT}, + {"Brazil/DeNoronha", NORONHA}, + {"Brazil/East", BRT}, + {"Brazil/West", AMT}, +@@ -705,7 +709,7 @@ + "Hora de verano de Samara", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ + {"Jamaica", EST}, + {"Japan", JST}, + {"Kwajalein", MHT}, +- {"Libya", CET}, ++ {"Libya", EET}, + {"MET", new String[] {"Hora de Europa Central", "MET", + "Hora de verano de Europa Central", "MEST"}}, + {"Mexico/BajaNorte", PST}, +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -79,7 +79,7 @@ - "Chamorro Daylight Time", "ChDT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"Central Indonesia Time", "CIT", -+ String CIT[] = new String[] {"Central Indonesia Time", "WITA", - "Central Indonesia Summer Time", "CIST"}; - String CLT[] = new String[] {"Chile Time", "CLT", - "Chile Summer Time", "CLST"}; -@@ -193,7 +193,7 @@ - "Western African Summer Time", "WAST"}; - String WET[] = new String[] {"Western European Time", "WET", - "Western European Summer Time", "WEST"}; -- String WIT[] = new String[] {"West Indonesia Time", "WIT", -+ String WIT[] = new String[] {"West Indonesia Time", "WIB", - "West Indonesia Summer Time", "WIST"}; - String WST_AUS[] = new String[] {"Western Standard Time (Australia)", "WST", - "Western Summer Time (Australia)", "WST"}; +@@ -46,7 +46,7 @@ + String ACT[] = new String[] {"Heure de l'Acre", "ACT", + "Heure d'\u00e9t\u00e9 de l'Acre", "ACST"}; + String ADELAIDE[] = new String[] {"Heure standard d'Australie centrale (Australie du sud)", "CST", +- "Heure d'\u00e9t\u00e9 d'Australie centrale (Australie du sud)", "CST"}; ++ "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud)", "CST"}; + String AGT[] = new String[] {"Heure D'Argentine", "ART", + "Heure d'\u00e9t\u00e9 D'Argentine", "ARST"}; + String AKST[] = new String[] {"Heure normale d'Alaska", "AKST", +@@ -62,9 +62,9 @@ + String BDT[] = new String[] {"Heure du Bangladesh", "BDT", + "Heure d'\u00e9t\u00e9 du Bangladesh", "BDST"}; + String BRISBANE[] = new String[] {"Heure standard d'Australie orientale (Queensland)", "EST", +- "Heure d'\u00e9t\u00e9 d'Australie orientale (Queensland)", "EST"}; ++ "Heure d'\u00E9t\u00E9 d'Australie orientale (Queensland)", "EST"}; + String BROKEN_HILL[] = new String[] {"Heure standard d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST", +- "Heure d'\u00e9t\u00e9 d'Australie centrale(Australie du sud/Nouvelle-Galles du sud)", "CST"}; ++ "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST"}; + String BRT[] = new String[] {"Heure du Br\u00e9sil", "BRT", + "Heure d'\u00e9t\u00e9 du Br\u00e9sil", "BRST"}; + String BTT[] = new String[] {"Heure du Bhoutan", "BTT", +@@ -77,9 +77,9 @@ + "Heure avanc\u00e9e de Chatham", "CHADT"}; + String ChST[] = new String[] {"Heure normale des \u00eeles Mariannes", "ChST", + "Heure d'\u00e9t\u00e9 des \u00eeles Mariannes", "ChDT"}; +- String CHUT[] = new String[] {"Chuuk Time", "CHUT", +- "Chuuk Summer Time", "CHUST"}; +- String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "CIT", ++ String CHUT[] = new String[] {"Heure de Chuuk", "CHUT", ++ "Heure d'\u00E9t\u00E9 de Chuuk", "CHUST"}; ++ String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "WITA", + "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie centrale", "CIST"}; + String CLT[] = new String[] {"Heure du Chili", "CLT", + "Heure d'\u00e9t\u00e9 du Chili", "CLST"}; +@@ -90,7 +90,7 @@ + String CUBA[] = new String[] {"Heure standard de Cuba", "CST", + "Heure d'\u00e9t\u00e9 de Cuba", "CDT"}; + String DARWIN[] = new String[] {"Heure standard d'Australie centrale (Territoire du Nord)", "CST", +- "Heure d'\u00e9t\u00e9 d'Australie centrale (Territoire du Nord)", "CST"}; ++ "Heure d'\u00E9t\u00E9 d'Australie centrale (Territoire du Nord)", "CST"}; + String DUBLIN[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", + "Heure d'\u00e9t\u00e9 irlandaise", "IST"}; + String EAT[] = new String[] {"Heure d'Afrique de l'Est", "EAT", +@@ -104,9 +104,9 @@ + String EST[] = new String[] {"Heure normale de l'Est", "EST", + "Heure avanc\u00e9e de l'Est", "EDT"}; + String EST_NSW[] = new String[] {"Heure normale de l'Est (Nouvelle-Galles du Sud)", "EST", +- "Heure d'\u00e9t\u00e9 de l'Est (Nouvelle-Galles du Sud)", "EST"}; +- String FET[] = new String[] {"Further-eastern European Time", "FET", +- "Further-eastern European Summer Time", "FEST"}; ++ "Heure d'\u00E9t\u00E9 de l'Est (Nouvelle-Galles du Sud)", "EST"}; ++ String FET[] = new String[] {"Heure d'Europe de l'Est UTC+3", "FET", ++ "Heure d'\u00E9t\u00E9 d'Europe de l'Est UTC+3", "FEST"}; + String GHMT[] = new String[] {"Heure du Ghana", "GMT", + "Heure d'\u00e9t\u00e9 du Ghana", "GHST"}; + String GAMBIER[] = new String[] {"Heure de Gambi", "GAMT", +@@ -159,8 +159,8 @@ + "heure avanc\u00e9e des Pitcairn", "PDT"}; + String PKT[] = new String[] {"Heure du Pakistan", "PKT", + "Heure d'\u00e9t\u00e9 du Pakistan", "PKST"}; +- String PONT[] = new String[] {"Pohnpei Time", "PONT", +- "Pohnpei Summer Time", "PONST"}; ++ String PONT[] = new String[] {"Heure de Pohnpei", "PONT", ++ "Heure d'\u00E9t\u00E9 de Pohnpei", "PONST"}; + String PST[] = new String[] {"Heure normale du Pacifique", "PST", + "Heure avanc\u00e9e du Pacifique", "PDT"}; + String SAMOA[] = new String[] {"Heure standard de Samoa", "SST", +@@ -174,7 +174,7 @@ + String SLST[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", + "Heure d'\u00e9t\u00e9 de Sierra Leone", "SLST"}; + String TASMANIA[] = new String[] {"Heure standard d'Australie orientale (Tasmanie)", "EST", +- "Heure d'\u00e9t\u00e9 d'Australie orientale (Tasmanie)", "EST"}; ++ "Heure d'\u00E9t\u00E9 d'Australie orientale (Tasmanie)", "EST"}; + String TMT[] = new String[] {"Heure du Turkm\u00e9nistan", "TMT", + "Heure d'\u00e9t\u00e9 du Turkm\u00e9nistan", "TMST"}; + String ULAT[]= new String[] {"Heure de l'Ulaanbaatar", "ULAT", +@@ -184,7 +184,7 @@ + String UZT[] = new String[] {"Heure de l'Ouzb\u00e9kistan", "UZT", + "Heure d'\u00e9t\u00e9 de l'Ouzb\u00e9kistan", "UZST"}; + String VICTORIA[] = new String[] {"Heure standard d'Australie orientale (Victoria)", "EST", +- "Heure d'\u00e9t\u00e9 d'Australie orientale (Victoria)", "EST"}; ++ "Heure d'\u00E9t\u00E9 d'Australie orientale (Victoria)", "EST"}; + String VLAT[] = new String[] {"Heure de Vladivostok", "VLAT", + "Heure d'\u00e9t\u00e9 de Vladivostok", "VLAST"}; + String WART[] = new String[] {"Heure D'Argentine de l'Ouest", "WART", +@@ -193,10 +193,10 @@ + "Heure d'\u00e9t\u00e9 d'Afrique de l'Ouest", "WAST"}; + String WET[] = new String[] {"Heure d'Europe de l'Ouest", "WET", + "Heure d'\u00e9t\u00e9 d'Europe de l'Ouest", "WEST"}; +- String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIT", ++ String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIB", + "Heure d'\u00e9t\u00e9 de l'Indon\u00e9sie occidentale", "WIST"}; + String WST_AUS[] = new String[] {"Heure normale de l'Ouest (Australie)", "WST", +- "Heure d'\u00e9t\u00e9 de l'Ouest (Australie)", "WST"}; ++ "Heure d'\u00E9t\u00E9 de l'Ouest (Australie)", "WST"}; + String WST_SAMOA[] = new String[] {"Heure des Samoas occidentales", "WST", + "Heure d'\u00e9t\u00e9 des Samoas occidentales", "WSDT"}; + String YAKT[] = new String[] {"Heure du Iakoutsk", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -41487,8 +71845,19 @@ {"America/El_Salvador", CST}, {"America/Ensenada", PST}, {"America/Fort_Wayne", EST}, +@@ -401,8 +401,8 @@ + {"America/Mendoza", AGT}, + {"America/Menominee", CST}, + {"America/Merida", CST}, +- {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", +- "Metlakatla Daylight Time", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"Heure normale de Metlakatla", "MeST", ++ "Heure avanc\u00E9e de Metlakatla", "MeDT"}}, + {"America/Mexico_City", CST}, + {"America/Miquelon", new String[] {"Heure normale de Saint-Pierre et Miquelon", "PMST", + "Heure avanc\u00e9e de Saint-Pierre et Miquelon", "PMDT"}}, @@ -426,7 +426,7 @@ - "Suriname Summer Time", "SRST"}}, + "Heure d'\u00e9t\u00e9 du Surinam", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -41505,36 +71874,65 @@ {"America/Rosario", AGT}, {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, -@@ -527,7 +527,7 @@ - "Irkutsk Summer Time", "IRKST"}}, +@@ -466,8 +466,8 @@ + "Heure d'\u00e9t\u00e9 de Davis", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Heure de Dumont-d'Urville", "DDUT", + "Heure d'\u00e9t\u00e9 de Dumont-d'Urville", "DDUST"}}, +- {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", +- "Macquarie Island Summer Time", "MIST"}}, ++ {"Antarctica/Macquarie", new String[] {"Heure de l'Ile Macquarie", "MIST", ++ "Heure d'\u00E9t\u00E9 de l'Ile Macquarie", "MIST"}}, + {"Antarctica/Mawson", new String[] {"Heure de Mawson", "MAWT", + "Heure d'\u00e9t\u00e9 de Mawson", "MAWST"}}, + {"Antarctica/McMurdo", NZST}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Heure de Syowa", "SYOT", + "Heure d'\u00e9t\u00e9 de Syowa", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Temps universel coordonn\u00e9", "UTC", ++ "Heure d'\u00e9t\u00e9 d'Europe centrale", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Heure de Vostok", "VOST", + "Heure d'\u00e9t\u00e9 de Vostok", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Heure d'\u00e9t\u00e9 d'Irkutsk", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"East Indonesia Time", "EIT", -+ {"Asia/Jayapura", new String[] {"East Indonesia Time", "WIT", - "East Indonesia Summer Time", "EIST"}}, - {"Asia/Kabul", new String[] {"Afghanistan Time", "AFT", - "Afghanistan Summer Time", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "EIT", ++ {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "WIT", + "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie orientale", "EIST"}}, + {"Asia/Kabul", new String[] {"Heure d'Afghanistan", "AFT", + "Heure d'\u00e9t\u00e9 d'Afghanistan", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Khandyga Time", "YAKT", -+ "Khandyga Summer Time", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"Heure de Khandyga", "YAKT", ++ "Heure d'\u00E9t\u00E9 de Khandyga", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Krasnoyarsk Time", "KRAT", - "Krasnoyarsk Summer Time", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"Heure de Krasno\u00efarsk", "KRAT", + "Heure d'\u00e9t\u00e9 de Krasno\u00efarsk", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Ust-Nera Time", "VLAT", -+ "Ust-Nera Summer Time", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"Heure d'Ust-Nera", "VLAT", ++ "Heure d'\u00E9t\u00E9 d'Ust-Nera", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -635,7 +637,7 @@ +@@ -617,7 +621,7 @@ + {"Australia/Currie", EST_NSW}, + {"Australia/Darwin", DARWIN}, + {"Australia/Eucla", new String[] {"Heure standard de l'Australie occidentale (centre)", "CWST", +- "Heure d'\u00e9t\u00e9 de l'Australie occidentale (centre)", "CWST"}}, ++ "Heure d'\u00E9t\u00E9 de l'Australie occidentale (centre)", "CWST"}}, + {"Australia/Hobart", TASMANIA}, + {"Australia/LHI", LORD_HOWE}, + {"Australia/Lindeman", BRISBANE}, +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -41543,17 +71941,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "Heure d'\u00e9t\u00e9 de Samara", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"Middle Europe Time", "MET", - "Middle Europe Summer Time", "MEST"}}, + {"MET", new String[] {"Heure de l'Europe centrale", "MET", + "Heure d'\u00e9t\u00e9 de l'Europe centrale", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -41563,109 +71970,106 @@ * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,8 @@ protected final Object[][] getContents() { - String ACT[] = new String[] {"Acre Normalzeit", "ACT", - "Acre Sommerzeit", "ACST"}; -- String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00fcdaustralien)", "CST", -- "Zentrale Sommerzeit (S\u00fcdaustralien)", "CST"}; -+ String ADELAIDE[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien)", "CST", -+ "Zentrale Sommerzeit (S\u00FCdaustralien)", "CST"}; - String AGT[] = new String[] {"Argentinische Zeit", "ART", - "Argentinische Sommerzeit", "ARST"}; - String AKST[] = new String[] {"Alaska Normalzeit", "AKST", -@@ -61,10 +61,10 @@ - "Atlantik Sommerzeit", "ADT"}; - String BDT[] = new String[] {"Bangladesch Zeit", "BDT", - "Bangladesch Sommerzeit", "BDST"}; -- String BRISBANE[] = new String[] {"\u00d6stliche Normalzeit (Queensland)", "EST", -- "\u00d6stliche Sommerzeit (Queensland)", "EST"}; -- String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00fcdaustralien/New South Wales)", "CST", -- "Zentrale Sommerzeit (S\u00fcdaustralien/New South Wales)", "CST"}; -+ String BRISBANE[] = new String[] {"\u00D6stliche Normalzeit (Queensland)", "EST", -+ "\u00D6stliche Sommerzeit (Queensland)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"Zentrale Normalzeit (S\u00FCdaustralien/New South Wales)", "CST", -+ "Zentrale Sommerzeit (S\u00FCdaustralien/New South Wales)", "CST"}; - String BRT[] = new String[] {"Brasilianische Zeit", "BRT", - "Brasilianische Sommerzeit", "BRST"}; - String BTT[] = new String[] {"Bhutanische Zeit", "BTT", -@@ -77,9 +77,9 @@ - "Chatham Sommerzeit", "CHADT"}; - String ChST[] = new String[] {"Chamorro Normalzeit", "ChST", - "Chamorro Sommerzeit", "ChDT"}; + String ACT[] = new String[] {"Ora di Acre", "ACT", + "Ora estiva di Acre", "ACST"}; +- String ADELAIDE[] = new String[] {"Ora centrale standard (Australia del Sud)", "CST", +- "Ora estiva standard (Australia del Sud)", "CST"}; ++ String ADELAIDE[] = new String[] {"Ora standard centrale (Australia del Sud)", "CST", ++ "Ora estiva centrale (Australia del Sud)", "CST"}; + String AGT[] = new String[] {"Ora dell'Argentina", "ART", + "Ora estiva dell'Argentina", "ARST"}; + String AKST[] = new String[] {"Ora solare dell'Alaska", "AKST", +@@ -61,9 +61,9 @@ + "Ora legale dell'Atlantico occidentale", "ADT"}; + String BDT[] = new String[] {"Ora del Bangladesh", "BDT", + "Ora estiva del Bangladesh", "BDST"}; +- String BRISBANE[] = new String[] {"Ora orientale standard (Queensland)", "EST", ++ String BRISBANE[] = new String[] {"Ora standard orientale (Queensland)", "EST", + "Ora estiva orientale (Queensland)", "EST"}; +- String BROKEN_HILL[] = new String[] {"Ora centrale standard (Australia del Sud/Nuovo Galles del Sud)", "CST", ++ String BROKEN_HILL[] = new String[] {"Ora standard centrale (Australia del Sud/Nuovo Galles del Sud)", "CST", + "Ora estiva centrale (Australia del Sud/Nuovo Galles del Sud)", "CST"}; + String BRT[] = new String[] {"Ora del Brasile", "BRT", + "Ora estiva del Brasile", "BRST"}; +@@ -75,11 +75,11 @@ + "Ora estiva dell'Europa centrale", "CEST"}; + String CHAST[] = new String[] {"Ora di Chatham standard", "CHAST", + "Ora legale di Chatham", "CHADT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"Zentralindonesische Zeit", "CIT", -+ String CHUT[] = new String[] {"Chuuk Zeit", "CHUT", -+ "Chuuk Sommerzeit", "CHUST"}; -+ String CIT[] = new String[] {"Zentralindonesische Zeit", "WITA", - "Zentralindonesische Sommerzeit", "CIST"}; - String CLT[] = new String[] {"Chilenische Zeit", "CLT", - "Chilenische Sommerzeit", "CLST"}; ++ String CHUT[] = new String[] {"Ora di Chuuk", "CHUT", ++ "Ora estiva di Chuuk", "CHUST"}; + String ChST[] = new String[] {"Ora standard di Chamorro", "ChST", + "Ora legale di Chamorro", "ChDT"}; +- String CIT[] = new String[] {"Ora dell'Indonesia centrale", "CIT", ++ String CIT[] = new String[] {"Ora dell'Indonesia centrale", "WITA", + "Ora estiva dell'Indonesia centrale", "CIST"}; + String CLT[] = new String[] {"Ora del Cile", "CLT", + "Ora estiva del Cile", "CLST"}; @@ -89,7 +89,7 @@ - "Chinesische Sommerzeit", "CDT"}; - String CUBA[] = new String[] {"Kubanische Normalzeit", "CST", - "Kubanische Sommerzeit", "CDT"}; -- String DARWIN[] = new String[] {"Zentrale Normalzeit (Northern Territory)", "CST", -+ String DARWIN[] = new String[] {"Central Normalzeit (Northern Territory)", "CST", - "Zentrale Sommerzeit (Northern Territory)", "CST"}; - String DUBLIN[] = new String[] {"Greenwich Zeit", "GMT", - "Irische Sommerzeit", "IST"}; + "Ora legale della Cina", "CDT"}; + String CUBA[] = new String[] {"Ora solare Cuba", "CST", + "Ora legale Cuba", "CDT"}; +- String DARWIN[] = new String[] {"Ora centrale standard (Territori del Nord)", "CST", ++ String DARWIN[] = new String[] {"Ora standard centrale (Territori del Nord)", "CST", + "Ora estiva centrale (Territori del Nord)", "CST"}; + String DUBLIN[] = new String[] {"Ora media di Greenwich", "GMT", + "Ora estiva irlandese", "IST"}; @@ -103,10 +103,10 @@ - "Ostgr\u00f6nl\u00e4ndische Sommerzeit", "EGST"}; - String EST[] = new String[] {"\u00d6stliche Normalzeit", "EST", - "\u00d6stliche Sommerzeit", "EDT"}; -- String EST_NSW[] = new String[] {"\u00d6stliche Normalzeit (New South Wales)", "EST", -- "\u00d6stliche Sommerzeit (New South Wales)", "EST"}; + "Ora estiva della Groenlandia orientale", "EGST"}; + String EST[] = new String[] {"Ora solare USA orientale", "EST", + "Ora legale USA orientale", "EDT"}; +- String EST_NSW[] = new String[] {"Ora solare dell'Australia orientale (Nuovo Galles del Sud)", "EST", ++ String EST_NSW[] = new String[] {"Ora standard dell'Australia orientale (Nuovo Galles del Sud)", "EST", + "Ora estiva dell'Australia orientale (Nuovo Galles del Sud)", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"Eastern Normalzeit (Neus\u00FCdwales)", "EST", -+ "\u00D6stliche Sommerzeit (New South Wales)", "EST"}; -+ String FET[] = new String[] {"Kaliningrader Zeit", "FET", -+ "Kaliningrader Sommerzeit", "FEST"}; - String GHMT[] = new String[] {"Ghanaische Normalzeit", "GMT", - "Ghanaische Sommerzeit", "GHST"}; - String GAMBIER[] = new String[] {"Gambier Zeit", "GAMT", ++ String FET[] = new String[] {"Ora dei paesi europei pi\u00F9 orientali", "FET", ++ "Ora estiva dei paesi europei pi\u00F9 orientali", "FEST"}; + String GHMT[] = new String[] {"Ora media del Ghana", "GMT", + "Ora legale del Ghana", "GHST"}; + String GAMBIER[] = new String[] {"Ora di Gambier", "GAMT", @@ -159,8 +159,8 @@ - "Pitcairn Sommerzeit", "PDT"}; - String PKT[] = new String[] {"Pakistanische Zeit", "PKT", - "Pakistanische Sommerzeit", "PKST"}; + "Ora legale di Pitcairn", "PDT"}; + String PKT[] = new String[] {"Ora del Pakistan", "PKT", + "Ora estiva del Pakistan", "PKST"}; - String PONT[] = new String[] {"Pohnpei Time", "PONT", - "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"Pohnpei Zeit", "PONT", -+ "Pohnpei Sommerzeit", "PONST"}; - String PST[] = new String[] {"Pazifische Normalzeit", "PST", - "Pazifische Sommerzeit", "PDT"}; - String SAMOA[] = new String[] {"Samoa Normalzeit", "SST", -@@ -173,8 +173,8 @@ - "Singapur Sommerzeit", "SGST"}; - String SLST[] = new String[] {"Greenwich Normalzeit", "GMT", - "Sierra Leone Sommerzeit", "SLST"}; -- String TASMANIA[] = new String[] {"\u00d6stliche Normalzeit (Tasmanien)", "EST", -- "\u00d6stliche Sommerzeit (Tasmanien)", "EST"}; -+ String TASMANIA[] = new String[] {"\u00D6stliche Normalzeit (Tasmanien)", "EST", -+ "\u00D6stliche Sommerzeit (Tasmanien)", "EST"}; - String TMT[] = new String[] {"Turkmenische Zeit", "TMT", - "Turkmenische Sommerzeit", "TMST"}; - String ULAT[]= new String[] {"Ulaanbaatar Zeit", "ULAT", -@@ -183,8 +183,8 @@ - "Koordinierte Universalzeit", "UTC"}; - String UZT[] = new String[] {"Usbekistan Zeit", "UZT", - "Usbekistan Sommerzeit", "UZST"}; -- String VICTORIA[] = new String[] {"\u00d6stliche Normalzeit (Victoria)", "EST", -- "\u00d6stliche Sommerzeit (Victoria)", "EST"}; -+ String VICTORIA[] = new String[] {"\u00D6stliche Normalzeit (Victoria)", "EST", -+ "\u00D6stliche Sommerzeit (Victoria)", "EST"}; - String VLAT[] = new String[] {"Wladiwostok Zeit", "VLAT", - "Wladiwostok Sommerzeit", "VLAST"}; - String WART[] = new String[] {"Westargentinische Zeit", "WART", -@@ -193,7 +193,7 @@ - "Westafrikanische Sommerzeit", "WAST"}; - String WET[] = new String[] {"Westeurop\u00e4ische Zeit", "WEZ", - "Westeurop\u00e4ische Sommerzeit", "WESZ"}; -- String WIT[] = new String[] {"Westindonesische Zeit", "WIT", -+ String WIT[] = new String[] {"Westindonesische Zeit", "WIB", - "Westindonesische Sommerzeit", "WIST"}; - String WST_AUS[] = new String[] {"Westliche Normalzeit (Australien)", "WST", - "Westliche Sommerzeit (Australien)", "WST"}; ++ String PONT[] = new String[] {"Ora di Pohnpei", "PONT", ++ "Ora estiva di Pohnpei", "PONST"}; + String PST[] = new String[] {"Ora solare della costa occidentale USA", "PST", + "Ora legale della costa occidentale USA", "PDT"}; + String SAMOA[] = new String[] {"Ora standard di Samoa", "SST", +@@ -173,7 +173,7 @@ + "Ora estiva di Singapore", "SGST"}; + String SLST[] = new String[] {"Ora media di Greenwich", "GMT", + "Ora legale della Sierra Leone", "SLST"}; +- String TASMANIA[] = new String[] {"Ora orientale standard (Tasmania)", "EST", ++ String TASMANIA[] = new String[] {"Ora standard orientale (Tasmania)", "EST", + "Ora estiva orientale (Tasmania)", "EST"}; + String TMT[] = new String[] {"Ora del Turkmenistan", "TMT", + "Ora estiva del Turkmenistan", "TMST"}; +@@ -183,7 +183,7 @@ + "Tempo universale coordinato", "UTC"}; + String UZT[] = new String[] {"Ora dell'Uzbekistan", "UZT", + "Ora estiva dell'Uzbekistan", "UZST"}; +- String VICTORIA[] = new String[] {"Ora orientale standard (Victoria)", "EST", ++ String VICTORIA[] = new String[] {"Ora standard orientale (Victoria)", "EST", + "Ora estiva orientale (Victoria)", "EST"}; + String VLAT[] = new String[] {"Ora di Vladivostok", "VLAT", + "Ora estiva di Vladivostok", "VLAST"}; +@@ -193,9 +193,9 @@ + "Ora estiva dell'Africa occidentale", "WAST"}; + String WET[] = new String[] {"Ora dell'Europa occidentale", "WET", + "Ora estiva dell'Europa occidentale", "WEST"}; +- String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIT", ++ String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIB", + "Ora estiva dell'Indonesia occidentale", "WIST"}; +- String WST_AUS[] = new String[] {"Ora solare dell'Australia occidentale", "WST", ++ String WST_AUS[] = new String[] {"Ora standard dell'Australia occidentale", "WST", + "Ora estiva dell'Australia occidentale", "WST"}; + String WST_SAMOA[] = new String[] {"Ora di Samoa", "WST", + "Ora estiva di Samoa", "WSDT"}; @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -41699,13 +72103,13 @@ {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"Metlakatla Normalzeit", "MeST", -+ "Metlakatla Sommerzeit", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"Ora standard di Metlakatla", "MeST", ++ "Ora legale di Metlakatla", "MeDT"}}, {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"Pierre & Miquelon Normalzeit", "PMST", - "Pierre & Miquelon Sommerzeit", "PMDT"}}, + {"America/Miquelon", new String[] {"Ora solare di Saint-Pierre e Miquelon", "PMST", + "Ora legale di Saint-Pierre e Miquelon", "PMDT"}}, @@ -426,7 +426,7 @@ - "Suriname Sommerzeit", "SRST"}}, + "Ora estiva di Suriname", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -41723,46 +72127,66 @@ {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, @@ -466,8 +466,8 @@ - "Davis Sommerzeit", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville Zeit", "DDUT", - "Dumont-d'Urville Sommerzeit", "DDUST"}}, + "Ora estiva di Davis", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Ora di Dumont-d'Urville", "DDUT", + "Ora estiva di Dumont-d'Urville", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"Macquarieinsel Zeit", "MIST", -+ "Macquarieinsel Sommerzeit", "MIST"}}, - {"Antarctica/Mawson", new String[] {"Mawson Zeit", "MAWT", - "Mawson Sommerzeit", "MAWST"}}, ++ {"Antarctica/Macquarie", new String[] {"Ora dell'Isola Macquarie", "MIST", ++ "Ora estiva dell'Isola Macquarie", "MIST"}}, + {"Antarctica/Mawson", new String[] {"Ora di Mawson", "MAWT", + "Ora estiva di Mawson", "MAWST"}}, {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "Irkutsk Sommerzeit", "IRKST"}}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Ora di Syowa", "SYOT", + "Ora estiva di Syowa", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Tempo universale coordinato", "UTC", ++ "Ora estiva dell'Europa centrale", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Ora di Vostok", "VOST", + "Ora estiva di Vostok", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Ora estiva di Irkutsk", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "EIT", -+ {"Asia/Jayapura", new String[] {"Ostindonesische Zeit", "WIT", - "Ostindonesische Sommerzeit", "EIST"}}, - {"Asia/Kabul", new String[] {"Afghanistanische Zeit", "AFT", - "Afghanistanische Sommerzeit", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "EIT", ++ {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "WIT", + "Ora estiva dell'Indonesia orientale", "EIST"}}, + {"Asia/Kabul", new String[] {"Ora dell'Afghanistan", "AFT", + "Ora estiva dell'Afghanistan", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Chandyga Zeit", "YAKT", -+ "Chandyga Sommerzeit", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"Ora di Khandyga", "YAKT", ++ "Ora estiva di Khandyga", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Krasnojarsker Zeit", "KRAT", - "Krasnojarsker Sommerzeit", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"Ora di Krasnojarsk", "KRAT", + "Ora estiva di Krasnojarsk", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Ust-Nera Zeit", "VLAT", -+ "Ust-Nera Sommerzeit", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"Ora di Ust-Nera", "VLAT", ++ "Ora estiva di Ust-Nera", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -635,7 +637,7 @@ +@@ -616,8 +620,8 @@ + {"Australia/Canberra", EST_NSW}, + {"Australia/Currie", EST_NSW}, + {"Australia/Darwin", DARWIN}, +- {"Australia/Eucla", new String[] {"Ora solare Australia centrorientale", "CWST", +- "Ora estiva Australia centrorientale", "CWST"}}, ++ {"Australia/Eucla", new String[] {"Ora standard Australia centro-occidentale", "CWST", ++ "Ora estiva Australia centro-occidentale", "CWST"}}, + {"Australia/Hobart", TASMANIA}, + {"Australia/LHI", LORD_HOWE}, + {"Australia/Lindeman", BRISBANE}, +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -41771,17 +72195,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "Ora estiva di Samara", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"Zentraleurop\u00e4ische Zeit", "MET", - "Zentraleurop\u00e4ische Sommerzeit", "MEST"}}, + {"MET", new String[] {"Ora dell'Europa centrale", "MET", + "Ora estiva dell'Europa centrale", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -41789,90 +72222,118 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -45,7 +45,7 @@ +@@ -45,8 +45,8 @@ protected final Object[][] getContents() { - String ACT[] = new String[] {"Hora de Acre", "ACT", - "Hora de verano de Acre", "ACST"}; -- String ADELAIDE[] = new String[] {"Hora est\u00e1ndar Central (Sur de Australia)", "CST", -+ String ADELAIDE[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia)", "CST", - "Hora de verano Central (Sur de Australia)", "CST"}; - String AGT[] = new String[] {"Hora de Argentina", "ART", - "Hora de verano de Argentina", "ARST"}; -@@ -61,9 +61,9 @@ - "Hora de verano Atl\u00e1ntico", "ADT"}; - String BDT[] = new String[] {"Hora de Bangladesh", "BDT", - "Hora de verano de Bangladesh", "BDST"}; -- String BRISBANE[] = new String[] {"Hora est\u00e1ndar del Este (Queensland)", "EST", -- "Hora de verano del Este (Queensland)", "EST"}; -- String BROKEN_HILL[] = new String[] {"Hora est\u00e1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST", -+ String BRISBANE[] = new String[] {"Hora est\u00E1ndar del Este (Queensland)", "EST", -+ "Hora est\u00E1ndar de verano del Este (Queensland)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"Hora est\u00E1ndar Central (Sur de Australia/Nueva Gales del Sur)", "CST", - "Hora de verano Central (Sur de Australia/Nueva Gales del Sur)", "CST"}; - String BRT[] = new String[] {"Hora de Brasil", "BRT", - "Hora de verano de Brasil", "BRST"}; -@@ -79,7 +79,7 @@ - "Hora de verano de Chamorro", "ChDT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"Hora de Indonesia Central", "CIT", -+ String CIT[] = new String[] {"Hora de Indonesia Central", "WITA", - "Hora de verano de Indonesia Central", "CIST"}; - String CLT[] = new String[] {"Hora de Chile", "CLT", - "Hora de verano de Chile", "CLST"}; -@@ -89,7 +89,7 @@ - "Hora de verano de China", "CDT"}; - String CUBA[] = new String[] {"Hora est\u00e1ndar de Cuba", "CST", - "Hora de verano de Cuba", "CDT"}; -- String DARWIN[] = new String[] {"Hora est\u00e1ndar Central (territorio del Norte)", "CST", -+ String DARWIN[] = new String[] {"Hora est\u00E1ndar Central (territorio del Norte)", "CST", - "Hora de verano Central (territorio del Norte)", "CST"}; - String DUBLIN[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", - "Hora de verano de Irlanda", "IST"}; + String ACT[] = new String[] {"\u30a2\u30af\u30ec\u6642\u9593", "ACT", + "\u30a2\u30af\u30ec\u590f\u6642\u9593", "ACST"}; +- String ADELAIDE[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CST", +- "\u4e2d\u90e8\u590f\u6642\u9593 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CST"}; ++ String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST", ++ "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST"}; + String AGT[] = new String[] {"\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "ART", + "\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u590f\u6642\u9593", "ARST"}; + String AKST[] = new String[] {"\u30a2\u30e9\u30b9\u30ab\u6a19\u6e96\u6642", "AKST", +@@ -61,10 +61,10 @@ + "\u5927\u897f\u6d0b\u590f\u6642\u9593", "ADT"}; + String BDT[] = new String[] {"\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u6642\u9593", "BDT", + "\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u590f\u6642\u9593", "BDST"}; +- String BRISBANE[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30af\u30a4\u30fc\u30f3\u30ba\u30e9\u30f3\u30c9)", "EST", +- "\u6771\u90e8\u590f\u6642\u9593 (\u30af\u30a4\u30fc\u30f3\u30ba\u30e9\u30f3\u30c9)", "EST"}; +- String BROKEN_HILL[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2/\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "CST", +- "\u4e2d\u90e8\u590f\u6642\u9593 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2/\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "CST"}; ++ String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST", ++ "\u6771\u90E8\u590F\u6642\u9593(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST", ++ "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST"}; + String BRT[] = new String[] {"\u30d6\u30e9\u30b8\u30eb\u6642\u9593", "BRT", + "\u30d6\u30e9\u30b8\u30eb\u590f\u6642\u9593", "BRST"}; + String BTT[] = new String[] {"\u30d6\u30fc\u30bf\u30f3\u6642\u9593", "BTT", +@@ -77,9 +77,9 @@ + "\u30c1\u30e3\u30bf\u30e0\u590f\u6642\u9593", "CHADT"}; + String ChST[] = new String[] {"\u30b0\u30a2\u30e0\u6a19\u6e96\u6642", "ChST", + "\u30b0\u30a2\u30e0\u590f\u6642\u9593", "ChDT"}; +- String CHUT[] = new String[] {"Chuuk Time", "CHUT", +- "Chuuk Summer Time", "CHUST"}; +- String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "CIT", ++ String CHUT[] = new String[] {"\u30C1\u30E5\u30FC\u30AF\u6642\u9593", "CHUT", ++ "Chuuk Time", "CHUST"}; ++ String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WITA", + "\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "CIST"}; + String CLT[] = new String[] {"\u30c1\u30ea\u6642\u9593", "CLT", + "\u30c1\u30ea\u590f\u6642\u9593", "CLST"}; +@@ -89,8 +89,8 @@ + "\u4e2d\u56fd\u590f\u6642\u9593", "CDT"}; + String CUBA[] = new String[] {"\u30ad\u30e5\u30fc\u30d0\u6a19\u6e96\u6642", "CST", + "\u30ad\u30e5\u30fc\u30d0\u590f\u6642\u9593", "CDT"}; +- String DARWIN[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u30ce\u30fc\u30b6\u30f3\u30c6\u30ea\u30c8\u30ea\u30fc)", "CST", +- "\u4e2d\u90e8\u590f\u6642\u9593 (\u30ce\u30fc\u30b6\u30f3\u30c6\u30ea\u30c8\u30ea\u30fc)", "CST"}; ++ String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST", ++ "\u4E2D\u90E8\u590F\u6642\u9593(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST"}; + String DUBLIN[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", + "\u30a2\u30a4\u30eb\u30e9\u30f3\u30c9\u590f\u6642\u9593", "IST"}; + String EAT[] = new String[] {"\u6771\u30a2\u30d5\u30ea\u30ab\u6642\u9593", "EAT", @@ -103,10 +103,10 @@ - "Hora de verano de Groenlandia Oriental", "EGST"}; - String EST[] = new String[] {"Hora est\u00e1ndar Oriental", "EST", - "Hora de verano Oriental", "EDT"}; -- String EST_NSW[] = new String[] {"Hora est\u00e1ndar Oriental (Nueva Gales del Sur)", "EST", -+ String EST_NSW[] = new String[] {"Hora est\u00E1ndar Oriental (Nueva Gales del Sur)", "EST", - "Hora de verano Oriental (Nueva Gales del Sur)", "EST"}; + "\u6771\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "EGST"}; + String EST[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642", "EST", + "\u6771\u90e8\u590f\u6642\u9593", "EDT"}; +- String EST_NSW[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "EST", +- "\u6771\u90e8\u590f\u6642\u9593 (\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ String FET[] = new String[] {"Hora de Europa m\u00E1s Oriental", "FET", -+ "Hora de verano de Europa m\u00E1s Oriental", "FEST"}; - String GHMT[] = new String[] {"Hora central de Ghana", "GMT", - "Hora de verano de Ghana", "GHST"}; - String GAMBIER[] = new String[] {"Hora de Gambier", "GAMT", -@@ -173,7 +173,7 @@ - "Hora de verano de Singapur", "SGST"}; - String SLST[] = new String[] {"Hora del Meridiano de Greenwich", "GMT", - "Hora de verano de Sierra Leona", "SLST"}; -- String TASMANIA[] = new String[] {"Hora est\u00e1ndar del Este (Tasmania)", "EST", -+ String TASMANIA[] = new String[] {"Hora est\u00E1ndar del Este (Tasmania)", "EST", - "Hora de verano del Este (Tasmania)", "EST"}; - String TMT[] = new String[] {"Hora de Turkmenist\u00e1n", "TMT", - "Hora de verano de Turkmenist\u00e1n", "TMST"}; -@@ -183,7 +183,7 @@ - "Hora Universal Coordinada", "UTC"}; - String UZT[] = new String[] {"Hora de Uzbekist\u00e1n", "UZT", - "Hora de verano de Uzbekist\u00e1n", "UZST"}; -- String VICTORIA[] = new String[] {"Hora est\u00e1ndar del Este (Victoria)", "EST", -+ String VICTORIA[] = new String[] {"Hora est\u00E1ndar del Este (Victoria)", "EST", - "Hora de verano del Este (Victoria)", "EST"}; - String VLAT[] = new String[] {"Hora de Vladivostok", "VLAT", - "Hora de verano de Vladivostok", "VLAST"}; -@@ -193,9 +193,9 @@ - "Hora de verano de \u00c1frica Occidental", "WAST"}; - String WET[] = new String[] {"Hora de Europa Occidental", "WET", - "Hora de verano de Europa Occidental", "WEST"}; -- String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIT", -+ String WIT[] = new String[] {"Hora de Indonesia Occidental", "WIB", - "Indonesia Hora de verano de Indonesia Occidental", "WIST"}; -- String WST_AUS[] = new String[] {"Hora est\u00e1ndar Occidental (Australia)", "WST", -+ String WST_AUS[] = new String[] {"Hora est\u00E1ndar Occidental (Australia)", "WST", - "Hora de verano Occidental (Australia)", "WST"}; - String WST_SAMOA[] = new String[] {"Hora de Samoa Occidental", "WST", - "Hora de verano de Samoa Occidental", "WSDT"}; ++ String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST", ++ "\u6771\u90E8\u590F\u6642\u9593(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST"}; ++ String FET[] = new String[] {"\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "FET", ++ "\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u590F\u6642\u9593", "FEST"}; + String GHMT[] = new String[] {"\u30ac\u30fc\u30ca\u6a19\u6e96\u6642", "GMT", + "\u30ac\u30fc\u30ca\u590f\u6642\u9593", "GHST"}; + String GAMBIER[] = new String[] {"\u30ac\u30f3\u30d3\u30a2\u6642\u9593", "GAMT", +@@ -159,8 +159,8 @@ + "\u30d4\u30c8\u30b1\u30eb\u30f3\u5cf6\u590f\u6642\u9593", "PDT"}; + String PKT[] = new String[] {"\u30d1\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "PKT", + "\u30d1\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "PKST"}; +- String PONT[] = new String[] {"Pohnpei Time", "PONT", +- "Pohnpei Summer Time", "PONST"}; ++ String PONT[] = new String[] {"\u30DD\u30F3\u30DA\u30A4\u6642\u9593", "PONT", ++ "\u30DD\u30F3\u30DA\u30A4\u590F\u6642\u9593", "PONST"}; + String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642", "PST", + "\u592a\u5e73\u6d0b\u590f\u6642\u9593", "PDT"}; + String SAMOA[] = new String[] {"\u30b5\u30e2\u30a2\u6a19\u6e96\u6642", "SST", +@@ -173,8 +173,8 @@ + "\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u590f\u6642\u9593", "SGST"}; + String SLST[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", + "\u30b7\u30a8\u30e9\u30ec\u30aa\u30cd\u590f\u6642\u9593", "SLST"}; +- String TASMANIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30bf\u30b9\u30de\u30cb\u30a2)", "EST", +- "\u6771\u90e8\u590f\u6642\u9593 (\u30bf\u30b9\u30de\u30cb\u30a2)", "EST"}; ++ String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST", ++ "\u6771\u90E8\u590F\u6642\u9593(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST"}; + String TMT[] = new String[] {"\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "TMT", + "\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TMST"}; + String ULAT[]= new String[] {"\u30a6\u30e9\u30fc\u30f3\u30d0\u30fc\u30c8\u30eb\u6642\u9593", "ULAT", +@@ -183,8 +183,8 @@ + "\u5354\u5b9a\u4e16\u754c\u6642", "UTC"}; + String UZT[] = new String[] {"\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "UZT", + "\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "UZST"}; +- String VICTORIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30d3\u30af\u30c8\u30ea\u30a2)", "EST", +- "\u6771\u90e8\u590f\u6642\u9593 (\u30d3\u30af\u30c8\u30ea\u30a2)", "EST"}; ++ String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST", ++ "\u6771\u90E8\u590F\u6642\u9593(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST"}; + String VLAT[] = new String[] {"\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u6642\u9593", "VLAT", + "\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u590f\u6642\u9593", "VLAST"}; + String WART[] = new String[] {"\u897f\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "WART", +@@ -193,10 +193,10 @@ + "\u897f\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "WAST"}; + String WET[] = new String[] {"\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "WET", + "\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "WEST"}; +- String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT", ++ String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIB", + "\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "WIST"}; +- String WST_AUS[] = new String[] {"\u897f\u90e8\u6a19\u6e96\u6642 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "WST", +- "\u897f\u90e8\u590f\u6642\u9593 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "WST"}; ++ String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST", ++ "\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST"}; + String WST_SAMOA[] = new String[] {"\u897f\u30b5\u30e2\u30a2\u6642\u9593", "WST", + "\u897f\u30b5\u30e2\u30a2\u590f\u6642\u9593", "WSDT"}; + String YAKT[] = new String[] {"\u30e4\u30af\u30fc\u30c4\u30af\u6642\u9593", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -41900,8 +72361,19 @@ {"America/El_Salvador", CST}, {"America/Ensenada", PST}, {"America/Fort_Wayne", EST}, +@@ -401,8 +401,8 @@ + {"America/Mendoza", AGT}, + {"America/Menominee", CST}, + {"America/Merida", CST}, +- {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", +- "Metlakatla Daylight Time", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u6A19\u6E96\u6642\u9593", "MeST", ++ "\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u590F\u6642\u9593", "MeDT"}}, + {"America/Mexico_City", CST}, + {"America/Miquelon", new String[] {"\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u6a19\u6e96\u6642", "PMST", + "\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "PMDT"}}, @@ -426,7 +426,7 @@ - "Hora de verano de Surinam", "SRST"}}, + "\u30b9\u30ea\u30ca\u30e0\u590f\u6642\u9593", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -41918,47 +72390,67 @@ {"America/Rosario", AGT}, {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, -@@ -527,7 +527,7 @@ - "Hora de verano de Irkutsk", "IRKST"}}, +@@ -466,8 +466,8 @@ + "\u30c7\u30a4\u30d3\u30b9\u590f\u6642\u9593", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u6642\u9593", "DDUT", + "\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u590f\u6642\u9593", "DDUST"}}, +- {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", +- "Macquarie Island Summer Time", "MIST"}}, ++ {"Antarctica/Macquarie", new String[] {"\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u6642\u9593", "MIST", ++ "\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u590F\u6642\u9593", "MIST"}}, + {"Antarctica/Mawson", new String[] {"\u30e2\u30fc\u30bd\u30f3\u6642\u9593", "MAWT", + "\u30e2\u30fc\u30bd\u30f3\u590f\u6642\u9593", "MAWST"}}, + {"Antarctica/McMurdo", NZST}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"\u662d\u548c\u57fa\u5730\u6642\u9593", "SYOT", + "\u662d\u548c\u57fa\u5730\u590f\u6642\u9593", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"\u5354\u5b9a\u4e16\u754c\u6642", "UTC", ++ "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "CEST"}}, + {"Antarctica/Vostok", new String[] {"\u30dc\u30b9\u30c8\u30fc\u30af\u57fa\u5730\u6642\u9593", "VOST", + "\u30dc\u30b9\u30c8\u30fc\u30af\u57fa\u5730\u590f\u6642\u9593", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "\u30a4\u30eb\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "EIT", -+ {"Asia/Jayapura", new String[] {"Hora de Indonesia Oriental", "WIT", - "Hora de verano de Indonesia Oriental", "EIST"}}, - {"Asia/Kabul", new String[] {"Hora de Afganist\u00e1n", "AFT", - "Hora de verano de Afganist\u00e1n", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "EIT", ++ {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT", + "\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "EIST" }}, + {"Asia/Kabul", new String[] {"\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "AFT", + "\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Hora de Khandyga", "YAKT", -+ "Hora de verano de Khandyga", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u6642\u9593", "YAKT", ++ "\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u590F\u6642\u9593", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Hora de Krasnoyarsk", "KRAT", - "Hora de verano de Krasnoyarsk", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u6642\u9593", "KRAT", + "\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u590f\u6642\u9593", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Hora de Ust-Nera", "VLAT", -+ "Hora de verano de Ust-Nera", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"\u30A6\u30B9\u30C1\u30CD\u30E9\u6642\u9593", "VLAT", ++ "\u30A6\u30B9\u30C1\u30CD\u30E9\u590F\u6642\u9593", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ +@@ -616,8 +620,8 @@ {"Australia/Canberra", EST_NSW}, {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"Hora est\u00e1ndar de Australia Central y Occidental", "CWST", -- "Hora de verano de Australia Central y Occidental", "CWST"}}, -+ {"Australia/Eucla", new String[] {"Hora est\u00E1ndar de Australia Central y Occidental", "CWST", -+ "Hora est\u00E1ndar de verano de Australia Central y Occidental", "CWST"}}, +- {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6a19\u6e96\u6642 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CWST", +- "\u4e2d\u897f\u90e8\u590f\u6642\u9593 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CWST"}}, ++ {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST", ++ "\u4E2D\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -41967,17 +72459,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "\u30b5\u30de\u30e9\u590f\u6642\u9593", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"Hora de Europa Central", "MET", - "Hora de verano de Europa Central", "MEST"}}, + {"MET", new String[] {"\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "MET", + "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -41985,104 +72486,118 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -46,7 +46,7 @@ - String ACT[] = new String[] {"Heure de l'Acre", "ACT", - "Heure d'\u00e9t\u00e9 de l'Acre", "ACST"}; - String ADELAIDE[] = new String[] {"Heure standard d'Australie centrale (Australie du sud)", "CST", -- "Heure d'\u00e9t\u00e9 d'Australie centrale (Australie du sud)", "CST"}; -+ "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud)", "CST"}; - String AGT[] = new String[] {"Heure D'Argentine", "ART", - "Heure d'\u00e9t\u00e9 D'Argentine", "ARST"}; - String AKST[] = new String[] {"Heure normale d'Alaska", "AKST", -@@ -62,9 +62,9 @@ - String BDT[] = new String[] {"Heure du Bangladesh", "BDT", - "Heure d'\u00e9t\u00e9 du Bangladesh", "BDST"}; - String BRISBANE[] = new String[] {"Heure standard d'Australie orientale (Queensland)", "EST", -- "Heure d'\u00e9t\u00e9 d'Australie orientale (Queensland)", "EST"}; -+ "Heure d'\u00E9t\u00E9 d'Australie orientale (Queensland)", "EST"}; - String BROKEN_HILL[] = new String[] {"Heure standard d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST", -- "Heure d'\u00e9t\u00e9 d'Australie centrale(Australie du sud/Nouvelle-Galles du sud)", "CST"}; -+ "Heure d'\u00E9t\u00E9 d'Australie centrale (Australie du sud/Nouvelle-Galles du sud)", "CST"}; - String BRT[] = new String[] {"Heure du Br\u00e9sil", "BRT", - "Heure d'\u00e9t\u00e9 du Br\u00e9sil", "BRST"}; - String BTT[] = new String[] {"Heure du Bhoutan", "BTT", +@@ -45,8 +45,8 @@ + protected final Object[][] getContents() { + String ACT[] = new String[] {"\uc5d0\uc774\ucee4 \uc2dc\uac04", "ACT", + "\uc5d0\uc774\ucee4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ACST"}; +- String ADELAIDE[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CST", +- "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CST"}; ++ String ADELAIDE[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST", ++ "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST"}; + String AGT[] = new String[] {"\uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "ART", + "\uc544\ub974\ud5e8\ud2f0\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ARST"}; + String AKST[] = new String[] {"\uc54c\ub798\uc2a4\uce74 \ud45c\uc900\uc2dc", "AKST", +@@ -61,10 +61,10 @@ + "\ub300\uc11c\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT"}; + String BDT[] = new String[] {"\ubc29\uae00\ub77c\ub370\uc2dc \uc2dc\uac04", "BDT", + "\ubc29\uae00\ub77c\ub370\uc2dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BDST"}; +- String BRISBANE[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ud038\uc990\ub79c\ub4dc)", "EST", +- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud038\uc990\ub79c\ub4dc)", "EST"}; +- String BROKEN_HILL[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544/\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "CST", +- "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544/\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "CST"}; ++ String BRISBANE[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD038\uC990\uB79C\uB4DC)", "EST", ++ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD038\uC990\uB79C\uB4DC)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST", ++ "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST"}; + String BRT[] = new String[] {"\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc2dc\uac04", "BRT", + "\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BRST"}; + String BTT[] = new String[] {"\ubd80\ud0c4 \uc2dc\uac04", "BTT", @@ -77,9 +77,9 @@ - "Heure avanc\u00e9e de Chatham", "CHADT"}; - String ChST[] = new String[] {"Heure normale des \u00eeles Mariannes", "ChST", - "Heure d'\u00e9t\u00e9 des \u00eeles Mariannes", "ChDT"}; + "Chatham \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHADT"}; + String ChST[] = new String[] {"\ucc28\ubaa8\ub85c \ud45c\uc900\uc2dc", "ChST", + "\ucc28\ubaa8\ub85c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ChDT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "CIT", -+ String CHUT[] = new String[] {"Heure de Chuuk", "CHUT", -+ "Heure d'\u00E9t\u00E9 de Chuuk", "CHUST"}; -+ String CIT[] = new String[] {"Heure d'Indon\u00e9sie centrale", "WITA", - "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie centrale", "CIST"}; - String CLT[] = new String[] {"Heure du Chili", "CLT", - "Heure d'\u00e9t\u00e9 du Chili", "CLST"}; -@@ -90,7 +90,7 @@ - String CUBA[] = new String[] {"Heure standard de Cuba", "CST", - "Heure d'\u00e9t\u00e9 de Cuba", "CDT"}; - String DARWIN[] = new String[] {"Heure standard d'Australie centrale (Territoire du Nord)", "CST", -- "Heure d'\u00e9t\u00e9 d'Australie centrale (Territoire du Nord)", "CST"}; -+ "Heure d'\u00E9t\u00E9 d'Australie centrale (Territoire du Nord)", "CST"}; - String DUBLIN[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", - "Heure d'\u00e9t\u00e9 irlandaise", "IST"}; - String EAT[] = new String[] {"Heure d'Afrique de l'Est", "EAT", -@@ -104,9 +104,9 @@ - String EST[] = new String[] {"Heure normale de l'Est", "EST", - "Heure avanc\u00e9e de l'Est", "EDT"}; - String EST_NSW[] = new String[] {"Heure normale de l'Est (Nouvelle-Galles du Sud)", "EST", -- "Heure d'\u00e9t\u00e9 de l'Est (Nouvelle-Galles du Sud)", "EST"}; +- String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "CIT", ++ String CHUT[] = new String[] {"\uCD94\uD06C \uD45C\uC900\uC2DC", "CHUT", ++ "\uCD94\uD06C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "CHUST"}; ++ String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WITA", + "\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CIST"}; + String CLT[] = new String[] {"\uce60\ub808 \uc2dc\uac04", "CLT", + "\uce60\ub808 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CLST"}; +@@ -89,8 +89,8 @@ + "\uc911\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; + String CUBA[] = new String[] {"\ucfe0\ubc14 \ud45c\uc900\uc2dc", "CST", + "\ucfe0\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; +- String DARWIN[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\ub178\ub358 \uc9c0\uc5ed)", "CST", +- "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ub178\ub358 \uc9c0\uc5ed)", "CST"}; ++ String DARWIN[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uBD81\uBD80 \uC9C0\uC5ED)", "CST", ++ "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBD81\uBD80 \uC9C0\uC5ED)", "CST"}; + String DUBLIN[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", + "\uc544\uc77c\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IST"}; + String EAT[] = new String[] {"\ub3d9\ubd80 \uc544\ud504\ub9ac\uce74 \uc2dc\uac04", "EAT", +@@ -103,10 +103,10 @@ + "\ub3d9\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EGST"}; + String EST[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc", "EST", + "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EDT"}; +- String EST_NSW[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "EST", +- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ "Heure d'\u00E9t\u00E9 de l'Est (Nouvelle-Galles du Sud)", "EST"}; -+ String FET[] = new String[] {"Heure d'Europe de l'Est UTC+3", "FET", -+ "Heure d'\u00E9t\u00E9 d'Europe de l'Est UTC+3", "FEST"}; - String GHMT[] = new String[] {"Heure du Ghana", "GMT", - "Heure d'\u00e9t\u00e9 du Ghana", "GHST"}; - String GAMBIER[] = new String[] {"Heure de Gambi", "GAMT", ++ String EST_NSW[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST", ++ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST"}; ++ String FET[] = new String[] {"\uADF9\uB3D9 \uC720\uB7FD \uD45C\uC900\uC2DC", "FET", ++ "\uADF9\uB3D9 \uC720\uB7FD \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "FEST"}; + String GHMT[] = new String[] {"\uac00\ub098 \ud45c\uc900\uc2dc", "GMT", + "\uac00\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GHST"}; + String GAMBIER[] = new String[] {"\uac10\ube44\uc544 \uc2dc\uac04", "GAMT", @@ -159,8 +159,8 @@ - "heure avanc\u00e9e des Pitcairn", "PDT"}; - String PKT[] = new String[] {"Heure du Pakistan", "PKT", - "Heure d'\u00e9t\u00e9 du Pakistan", "PKST"}; + "Pitcairn \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"}; + String PKT[] = new String[] {"\ud30c\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "PKT", + "\ud30c\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PKST"}; - String PONT[] = new String[] {"Pohnpei Time", "PONT", - "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"Heure de Pohnpei", "PONT", -+ "Heure d'\u00E9t\u00E9 de Pohnpei", "PONST"}; - String PST[] = new String[] {"Heure normale du Pacifique", "PST", - "Heure avanc\u00e9e du Pacifique", "PDT"}; - String SAMOA[] = new String[] {"Heure standard de Samoa", "SST", -@@ -174,7 +174,7 @@ - String SLST[] = new String[] {"Heure du m\u00e9ridien de Greenwich", "GMT", - "Heure d'\u00e9t\u00e9 de Sierra Leone", "SLST"}; - String TASMANIA[] = new String[] {"Heure standard d'Australie orientale (Tasmanie)", "EST", -- "Heure d'\u00e9t\u00e9 d'Australie orientale (Tasmanie)", "EST"}; -+ "Heure d'\u00E9t\u00E9 d'Australie orientale (Tasmanie)", "EST"}; - String TMT[] = new String[] {"Heure du Turkm\u00e9nistan", "TMT", - "Heure d'\u00e9t\u00e9 du Turkm\u00e9nistan", "TMST"}; - String ULAT[]= new String[] {"Heure de l'Ulaanbaatar", "ULAT", -@@ -184,7 +184,7 @@ - String UZT[] = new String[] {"Heure de l'Ouzb\u00e9kistan", "UZT", - "Heure d'\u00e9t\u00e9 de l'Ouzb\u00e9kistan", "UZST"}; - String VICTORIA[] = new String[] {"Heure standard d'Australie orientale (Victoria)", "EST", -- "Heure d'\u00e9t\u00e9 d'Australie orientale (Victoria)", "EST"}; -+ "Heure d'\u00E9t\u00E9 d'Australie orientale (Victoria)", "EST"}; - String VLAT[] = new String[] {"Heure de Vladivostok", "VLAT", - "Heure d'\u00e9t\u00e9 de Vladivostok", "VLAST"}; - String WART[] = new String[] {"Heure D'Argentine de l'Ouest", "WART", ++ String PONT[] = new String[] {"\uD3F0\uD398\uC774 \uD45C\uC900\uC2DC", "PONT", ++ "\uD3F0\uD398\uC774 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "PONST"}; + String PST[] = new String[] {"\ud0dc\ud3c9\uc591 \ud45c\uc900\uc2dc", "PST", + "\ud0dc\ud3c9\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"}; + String SAMOA[] = new String[] {"\uc0ac\ubaa8\uc544 \ud45c\uc900\uc2dc", "SST", +@@ -173,8 +173,8 @@ + "\uc2f1\uac00\ud3ec\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SGST"}; + String SLST[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", + "\uc2dc\uc5d0\ub77c\ub9ac\uc628 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SLST"}; +- String TASMANIA[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ud0dc\uc988\uba54\uc774\ub2c8\uc544)", "EST", +- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud0dc\uc988\uba54\uc774\ub2c8\uc544)", "EST"}; ++ String TASMANIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST", ++ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST"}; + String TMT[] = new String[] {"\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "TMT", + "\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TMST"}; + String ULAT[]= new String[] {"\uc6b8\ub780\ubc14\ud0c0\ub974 \uc2dc\uac04", "ULAT", +@@ -183,8 +183,8 @@ + "\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC"}; + String UZT[] = new String[] {"\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "UZT", + "\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "UZST"}; +- String VICTORIA[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ube45\ud1a0\ub9ac\uc544)", "EST", +- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ube45\ud1a0\ub9ac\uc544)", "EST"}; ++ String VICTORIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uBE45\uD1A0\uB9AC\uC544)", "EST", ++ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBE45\uD1A0\uB9AC\uC544)", "EST"}; + String VLAT[] = new String[] {"\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc2dc\uac04", "VLAT", + "\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VLAST"}; + String WART[] = new String[] {"\uc11c\ubd80 \uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "WART", @@ -193,10 +193,10 @@ - "Heure d'\u00e9t\u00e9 d'Afrique de l'Ouest", "WAST"}; - String WET[] = new String[] {"Heure d'Europe de l'Ouest", "WET", - "Heure d'\u00e9t\u00e9 d'Europe de l'Ouest", "WEST"}; -- String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIT", -+ String WIT[] = new String[] {"Heure de l'Indon\u00e9sie occidentale", "WIB", - "Heure d'\u00e9t\u00e9 de l'Indon\u00e9sie occidentale", "WIST"}; - String WST_AUS[] = new String[] {"Heure normale de l'Ouest (Australie)", "WST", -- "Heure d'\u00e9t\u00e9 de l'Ouest (Australie)", "WST"}; -+ "Heure d'\u00E9t\u00E9 de l'Ouest (Australie)", "WST"}; - String WST_SAMOA[] = new String[] {"Heure des Samoas occidentales", "WST", - "Heure d'\u00e9t\u00e9 des Samoas occidentales", "WSDT"}; - String YAKT[] = new String[] {"Heure du Iakoutsk", "YAKT", + "\uc11c\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAST"}; + String WET[] = new String[] {"\uc11c\uc720\ub7fd \uc2dc\uac04", "WET", + "\uc11c\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WEST"}; +- String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT", ++ String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIB", + "\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WIST"}; +- String WST_AUS[] = new String[] {"\uc11c\ubd80 \ud45c\uc900\uc2dc(\ud638\uc8fc)", "WST", +- "\uc11c\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud638\uc8fc)", "WST"}; ++ String WST_AUS[] = new String[] {"\uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST", ++ "\uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST"}; + String WST_SAMOA[] = new String[] {"\uc11c\uc0ac\ubaa8\uc544 \uc2dc\uac04", "WST", + "\uc11c\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WSDT"}; + String YAKT[] = new String[] {"\uc57c\uce20\ud06c \uc2dc\uac04", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -42116,13 +72631,13 @@ {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"Heure normale de Metlakatla", "MeST", -+ "Heure avanc\u00E9e de Metlakatla", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uD45C\uC900\uC2DC", "MeST", ++ "\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MeDT"}}, {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"Heure normale de Saint-Pierre et Miquelon", "PMST", - "Heure avanc\u00e9e de Saint-Pierre et Miquelon", "PMDT"}}, + {"America/Miquelon", new String[] {"\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \ud45c\uc900\uc2dc", "PMST", + "\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PMDT"}}, @@ -426,7 +426,7 @@ - "Heure d'\u00e9t\u00e9 du Surinam", "SRST"}}, + "\uc218\ub9ac\ub0a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -42140,55 +72655,66 @@ {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, @@ -466,8 +466,8 @@ - "Heure d'\u00e9t\u00e9 de Davis", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Heure de Dumont-d'Urville", "DDUT", - "Heure d'\u00e9t\u00e9 de Dumont-d'Urville", "DDUST"}}, + "Davis \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"\ub4a4\ubabd \ub4a4\ub974\ube4c \uc2dc\uac04", "DDUT", + "\ub4a4\ubabd \ub4a4\ub974\ube4c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"Heure de l'Ile Macquarie", "MIST", -+ "Heure d'\u00E9t\u00E9 de l'Ile Macquarie", "MIST"}}, - {"Antarctica/Mawson", new String[] {"Heure de Mawson", "MAWT", - "Heure d'\u00e9t\u00e9 de Mawson", "MAWST"}}, ++ {"Antarctica/Macquarie", new String[] {"\uB9E4\uCF70\uB9AC \uC12C \uD45C\uC900\uC2DC", "MIST", ++ "\uB9E4\uCF70\uB9AC \uC12C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MIST"}}, + {"Antarctica/Mawson", new String[] {"\ubaa8\uc2a8 \uc2dc\uac04", "MAWT", + "\ubaa8\uc2a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAWST"}}, {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "Heure d'\u00e9t\u00e9 d'Irkutsk", "IRKST"}}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Syowa \uc2dc\uac04", "SYOT", + "Syowa \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC", ++ "\uc911\uc559 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Vostok \uc2dc\uac04", "VOST", + "Vostok \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "\uc774\ub974\ucfe0\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "EIT", -+ {"Asia/Jayapura", new String[] {"Heure d'Indon\u00e9sie orientale", "WIT", - "Heure d'\u00e9t\u00e9 d'Indon\u00e9sie orientale", "EIST"}}, - {"Asia/Kabul", new String[] {"Heure d'Afghanistan", "AFT", - "Heure d'\u00e9t\u00e9 d'Afghanistan", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "EIT", ++ {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT", + "\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EIST"}}, + {"Asia/Kabul", new String[] {"\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "AFT", + "\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Heure de Khandyga", "YAKT", -+ "Heure d'\u00E9t\u00E9 de Khandyga", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"\uD55C\uB514\uAC00 \uD45C\uC900\uC2DC", "YAKT", ++ "\uD55C\uB514\uAC00 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Heure de Krasno\u00efarsk", "KRAT", - "Heure d'\u00e9t\u00e9 de Krasno\u00efarsk", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc2dc\uac04", "KRAT", + "\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Heure d'Ust-Nera", "VLAT", -+ "Heure d'\u00E9t\u00E9 d'Ust-Nera", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"\uC6B0\uC2A4\uD2F0\uB124\uB77C \uD45C\uC900\uC2DC", "VLAT", ++ "\uC6B0\uC2A4\uD2F0\uB124\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -617,7 +619,7 @@ +@@ -616,8 +620,8 @@ + {"Australia/Canberra", EST_NSW}, {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, - {"Australia/Eucla", new String[] {"Heure standard de l'Australie occidentale (centre)", "CWST", -- "Heure d'\u00e9t\u00e9 de l'Australie occidentale (centre)", "CWST"}}, -+ "Heure d'\u00E9t\u00E9 de l'Australie occidentale (centre)", "CWST"}}, +- {"Australia/Eucla", new String[] {"\uc911\uc11c\ubd80 \ud45c\uc900\uc2dc(\uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CWST", +- "\uc911\uc11c\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CWST"}}, ++ {"Australia/Eucla", new String[] {"\uC911\uC559 \uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST", ++ "\uC911\uC559 \uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -42197,17 +72723,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "\uc0ac\ub9c8\ub77c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"Heure de l'Europe centrale", "MET", - "Heure d'\u00e9t\u00e9 de l'Europe centrale", "MEST"}}, + {"MET", new String[] {"\uc911\ubd80 \uc720\ub7fd \uc2dc\uac04", "MET", + "\uc911\ubd80 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -42217,106 +72752,117 @@ * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,8 @@ protected final Object[][] getContents() { - String ACT[] = new String[] {"Ora di Acre", "ACT", - "Ora estiva di Acre", "ACST"}; -- String ADELAIDE[] = new String[] {"Ora centrale standard (Australia del Sud)", "CST", -- "Ora estiva standard (Australia del Sud)", "CST"}; -+ String ADELAIDE[] = new String[] {"Ora standard centrale (Australia del Sud)", "CST", -+ "Ora estiva centrale (Australia del Sud)", "CST"}; - String AGT[] = new String[] {"Ora dell'Argentina", "ART", - "Ora estiva dell'Argentina", "ARST"}; - String AKST[] = new String[] {"Ora solare dell'Alaska", "AKST", -@@ -61,9 +61,9 @@ - "Ora legale dell'Atlantico occidentale", "ADT"}; - String BDT[] = new String[] {"Ora del Bangladesh", "BDT", - "Ora estiva del Bangladesh", "BDST"}; -- String BRISBANE[] = new String[] {"Ora orientale standard (Queensland)", "EST", -+ String BRISBANE[] = new String[] {"Ora standard orientale (Queensland)", "EST", - "Ora estiva orientale (Queensland)", "EST"}; -- String BROKEN_HILL[] = new String[] {"Ora centrale standard (Australia del Sud/Nuovo Galles del Sud)", "CST", -+ String BROKEN_HILL[] = new String[] {"Ora standard centrale (Australia del Sud/Nuovo Galles del Sud)", "CST", - "Ora estiva centrale (Australia del Sud/Nuovo Galles del Sud)", "CST"}; - String BRT[] = new String[] {"Ora del Brasile", "BRT", - "Ora estiva del Brasile", "BRST"}; -@@ -75,11 +75,11 @@ - "Ora estiva dell'Europa centrale", "CEST"}; - String CHAST[] = new String[] {"Ora di Chatham standard", "CHAST", - "Ora legale di Chatham", "CHADT"}; -- String CHUT[] = new String[] {"Chuuk Time", "CHUT", -- "Chuuk Summer Time", "CHUST"}; -+ String CHUT[] = new String[] {"Ora di Chuuk", "CHUT", -+ "Ora estiva di Chuuk", "CHUST"}; - String ChST[] = new String[] {"Ora standard di Chamorro", "ChST", - "Ora legale di Chamorro", "ChDT"}; -- String CIT[] = new String[] {"Ora dell'Indonesia centrale", "CIT", -+ String CIT[] = new String[] {"Ora dell'Indonesia centrale", "WITA", - "Ora estiva dell'Indonesia centrale", "CIST"}; - String CLT[] = new String[] {"Ora del Cile", "CLT", - "Ora estiva del Cile", "CLST"}; -@@ -89,7 +89,7 @@ - "Ora legale della Cina", "CDT"}; - String CUBA[] = new String[] {"Ora solare Cuba", "CST", - "Ora legale Cuba", "CDT"}; -- String DARWIN[] = new String[] {"Ora centrale standard (Territori del Nord)", "CST", -+ String DARWIN[] = new String[] {"Ora standard centrale (Territori del Nord)", "CST", - "Ora estiva centrale (Territori del Nord)", "CST"}; - String DUBLIN[] = new String[] {"Ora media di Greenwich", "GMT", - "Ora estiva irlandese", "IST"}; -@@ -103,10 +103,10 @@ - "Ora estiva della Groenlandia orientale", "EGST"}; - String EST[] = new String[] {"Ora solare USA orientale", "EST", - "Ora legale USA orientale", "EDT"}; -- String EST_NSW[] = new String[] {"Ora solare dell'Australia orientale (Nuovo Galles del Sud)", "EST", -+ String EST_NSW[] = new String[] {"Ora standard dell'Australia orientale (Nuovo Galles del Sud)", "EST", - "Ora estiva dell'Australia orientale (Nuovo Galles del Sud)", "EST"}; + String ACT[] = new String[] {"Fuso hor\u00e1rio do Acre", "ACT", + "Fuso hor\u00e1rio de ver\u00e3o do Acre", "ACST"}; +- String ADELAIDE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Austr\u00e1lia do Sul)", "CST", +- "Fuso hor\u00e1rio de ver\u00e3o central (Austr\u00e1lia do Sul)", "CST"}; ++ String ADELAIDE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul)", "CST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul)", "CST"}; + String AGT[] = new String[] {"Fuso hor\u00e1rio da Argentina", "ART", + "Fuso hor\u00e1rio de ver\u00e3o da Argentina", "ARST"}; + String AKST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Alaska", "AKST", +@@ -61,10 +61,10 @@ + "Hor\u00e1rio de luz natural do Atl\u00e2ntico", "ADT"}; + String BDT[] = new String[] {"Fuso hor\u00e1rio de Bangladesh", "BDT", + "Fuso hor\u00e1rio de ver\u00e3o de Bangladesh", "BDST"}; +- String BRISBANE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Queensland)", "EST", +- "Fuso hor\u00e1rio de ver\u00e3o oriental (Queensland)", "EST"}; +- String BROKEN_HILL[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Austr\u00e1lia do Sul/Nova Gales do Sul)", "CST", +- "Fuso hor\u00e1rio de ver\u00e3o central (Austr\u00e1lia do Sul/Nova Gales do Sul)", "CST"}; ++ String BRISBANE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Queensland)", "EST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Queensland)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST"}; + String BRT[] = new String[] {"Fuso hor\u00e1rio de Bras\u00edlia", "BRT", + "Fuso hor\u00e1rio de ver\u00e3o de Bras\u00edlia", "BRST"}; + String BTT[] = new String[] {"Fuso hor\u00e1rio de But\u00e3o", "BTT", +@@ -77,7 +77,7 @@ + "Hor\u00e1rio de luz natural de Chatham", "CHADT"}; + String ChST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Chamorro", "ChST", + "Hor\u00e1rio de luz natural de Chamorro", "ChDT"}; +- String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "CIT", ++ String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "WITA", + "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Central", "CIST"}; + String CLT[] = new String[] {"Fuso hor\u00e1rio do Chile", "CLT", + "Fuso hor\u00e1rio de ver\u00e3o do Chile", "CLST"}; +@@ -87,8 +87,8 @@ + "Hor\u00e1rio de luz natural da China", "CDT"}; + String CUBA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Cuba", "CST", + "Hor\u00e1rio de luz natural de Cuba", "CDT"}; +- String DARWIN[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Territ\u00f3rio do Norte)", "CST", +- "Fuso hor\u00e1rio de ver\u00e3o central (Territ\u00f3rio do Norte)", "CST"}; ++ String DARWIN[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Territ\u00F3rio do Norte)", "CST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Central (Territ\u00F3rio do Norte)", "CST"}; + String DUBLIN[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", + "Fuso hor\u00e1rio de ver\u00e3o da Irlanda", "IST"}; + String EAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Oriental", "EAT", +@@ -101,10 +101,10 @@ + "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Oriental", "EGST"}; + String EST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental", "EST", + "Hor\u00e1rio de luz natural oriental", "EDT"}; +- String EST_NSW[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Nova Gales do Sul)", "EST", +- "Fuso hor\u00e1rio de ver\u00e3o oriental (Nova Gales do Sul)", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ String FET[] = new String[] {"Ora dei paesi europei pi\u00F9 orientali", "FET", -+ "Ora estiva dei paesi europei pi\u00F9 orientali", "FEST"}; - String GHMT[] = new String[] {"Ora media del Ghana", "GMT", - "Ora legale del Ghana", "GHST"}; - String GAMBIER[] = new String[] {"Ora di Gambier", "GAMT", -@@ -159,8 +159,8 @@ - "Ora legale di Pitcairn", "PDT"}; - String PKT[] = new String[] {"Ora del Pakistan", "PKT", - "Ora estiva del Pakistan", "PKST"}; -- String PONT[] = new String[] {"Pohnpei Time", "PONT", -- "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"Ora di Pohnpei", "PONT", -+ "Ora estiva di Pohnpei", "PONST"}; - String PST[] = new String[] {"Ora solare della costa occidentale USA", "PST", - "Ora legale della costa occidentale USA", "PDT"}; - String SAMOA[] = new String[] {"Ora standard di Samoa", "SST", -@@ -173,7 +173,7 @@ - "Ora estiva di Singapore", "SGST"}; - String SLST[] = new String[] {"Ora media di Greenwich", "GMT", - "Ora legale della Sierra Leone", "SLST"}; -- String TASMANIA[] = new String[] {"Ora orientale standard (Tasmania)", "EST", -+ String TASMANIA[] = new String[] {"Ora standard orientale (Tasmania)", "EST", - "Ora estiva orientale (Tasmania)", "EST"}; - String TMT[] = new String[] {"Ora del Turkmenistan", "TMT", - "Ora estiva del Turkmenistan", "TMST"}; -@@ -183,7 +183,7 @@ - "Tempo universale coordinato", "UTC"}; - String UZT[] = new String[] {"Ora dell'Uzbekistan", "UZT", - "Ora estiva dell'Uzbekistan", "UZST"}; -- String VICTORIA[] = new String[] {"Ora orientale standard (Victoria)", "EST", -+ String VICTORIA[] = new String[] {"Ora standard orientale (Victoria)", "EST", - "Ora estiva orientale (Victoria)", "EST"}; - String VLAT[] = new String[] {"Ora di Vladivostok", "VLAT", - "Ora estiva di Vladivostok", "VLAST"}; -@@ -193,9 +193,9 @@ - "Ora estiva dell'Africa occidentale", "WAST"}; - String WET[] = new String[] {"Ora dell'Europa occidentale", "WET", - "Ora estiva dell'Europa occidentale", "WEST"}; -- String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIT", -+ String WIT[] = new String[] {"Ora dell'Indonesia occidentale", "WIB", - "Ora estiva dell'Indonesia occidentale", "WIST"}; -- String WST_AUS[] = new String[] {"Ora solare dell'Australia occidentale", "WST", -+ String WST_AUS[] = new String[] {"Ora standard dell'Australia occidentale", "WST", - "Ora estiva dell'Australia occidentale", "WST"}; - String WST_SAMOA[] = new String[] {"Ora di Samoa", "WST", - "Ora estiva di Samoa", "WSDT"}; ++ String EST_NSW[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Oriental (Nova Gales do Sul)", "EST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Nova Gales do Sul)", "EST"}; ++ String FET[] = new String[] {"Hor\u00E1rio do Extremo Leste Europeu (FET)", "FET", ++ "Fuso Hor\u00E1rio de Ver\u00E3o do Extremo Leste Europeu", "FEST"}; + String GHMT[] = new String[] {"Fuso hor\u00e1rio do meridiano de Gana", "GMT", + "Fuso hor\u00e1rio de ver\u00e3o de Gana", "GHST"}; + String GAMBIER[] = new String[] {"Fuso hor\u00e1rio de Gambier", "GAMT", +@@ -157,8 +157,8 @@ + "Hor\u00e1rio de luz natural de Pitcairn", "PDT"}; + String PKT[] = new String[] {"Fuso hor\u00e1rio do Paquist\u00e3o", "PKT", + "Fuso hor\u00e1rio de ver\u00e3o do Paquist\u00e3o", "PKST"}; +- String PONT[] = new String[] {"Fuso hor\u00e1rio de Pohnpei", "PONT", +- "Fuso hor\u00e1rio de ver\u00e3o de Pohnpei", "PONST"}; ++ String PONT[] = new String[] {"Fuso Hor\u00E1rio de Pohnpei", "PONT", ++ "Fuso Hor\u00E1rio de Ver\u00E3o de Pohnpei", "PONST"}; + String PST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Pac\u00edfico", "PST", + "Hor\u00e1rio de luz natural do Pac\u00edfico", "PDT"}; + String SAMOA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Samoa", "SST", +@@ -171,20 +171,20 @@ + "Fuso hor\u00e1rio de ver\u00e1 de Cingapura", "SGST"}; + String SLST[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", + "Fuso hor\u00e1rio de ver\u00e3o de Serra Leoa", "SLST"}; +- String TASMANIA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Tasm\u00e2nia)", "EST", +- "Fuso hor\u00e1rio de ver\u00e3o oriental (Tasm\u00e2nia)", "EST"}; ++ String TASMANIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Tasm\u00E2nia)", "EST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Tasm\u00E2nia)", "EST"}; + String TMT[] = new String[] {"Fuso hor\u00e1rio do Turcomenist\u00e3o", "TMT", + "Fuso hor\u00e1rio de ver\u00e3o do Turcomenist\u00e3o", "TMST"}; +- String TRUT[] = new String[] {"Fuso hor\u00e1rio de Chuuk", "CHUT", +- "Fuso hor\u00e1rio de ver\u00e3o de Chuuk", "CHUST"}; ++ String TRUT[] = new String[] {"Fuso Hor\u00E1rio de Chuuk", "CHUT", ++ "Fuso Hor\u00E1rio de Ver\u00E3o de Chuuk", "CHUST"}; + String ULAT[]= new String[] {"Fuso hor\u00e1rio de Ulan Bator", "ULAT", + "Fuso hor\u00e1rio de ver\u00e3o de Ulan Bator", "ULAST"}; + String UTC[] = new String[] {"Tempo universal coordenado", "UTC", + "Tempo universal coordenado", "UTC"}; + String UZT[] = new String[] {"Fuso hor\u00e1rio do Uzbequist\u00e3o", "UZT", + "Fuso hor\u00e1rio de ver\u00e3o do Uzbequist\u00e3o", "UZST"}; +- String VICTORIA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Victoria)", "EST", +- "Fuso hor\u00e1rio de ver\u00e3o oriental (Victoria)", "EST"}; ++ String VICTORIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Victoria)", "EST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Victoria)", "EST"}; + String VLAT[] = new String[] {"Fuso hor\u00e1rio de Vladivostok", "VLAT", + "Fuso hor\u00e1rio de ver\u00e3o de Vladivostok", "VLAST"}; + String WART[] = new String[] {"Fuso hor\u00e1rio da Argentina Ocidental", "WART", +@@ -193,10 +193,10 @@ + "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Ocidental", "WAST"}; + String WET[] = new String[] {"Fuso hor\u00e1rio da Europa Ocidental", "WET", + "Fuso hor\u00e1rio de ver\u00e3o da Europa Ocidental", "WEST"}; +- String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIT", ++ String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIB", + "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Ocidental", "WIST"}; +- String WST_AUS[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o ocidental (Austr\u00e1lia)", "WST", +- "Fuso hor\u00e1rio de ver\u00e3o ocidental (Austr\u00e1lia)", "WST"}; ++ String WST_AUS[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Ocidental (Austr\u00E1lia)", "WST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental (Austr\u00E1lia)", "WST"}; + String WST_SAMOA[] = new String[] {"Fuso hor\u00e1rio de Samoa Ocidental", "WST", + "Fuso hor\u00e1rio de ver\u00e3o de Samoa Ocidental", "WSDT"}; + String YAKT[] = new String[] {"Fuso hor\u00e1rio de Yakutsk", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -42350,13 +72896,13 @@ {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"Ora standard di Metlakatla", "MeST", -+ "Ora legale di Metlakatla", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"Hor\u00E1rio Padr\u00E3o de Metlakatla", "MeST", ++ "Hor\u00E1rio de Luz Natural de Metlakatla", "MeDT"}}, {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"Ora solare di Saint-Pierre e Miquelon", "PMST", - "Ora legale di Saint-Pierre e Miquelon", "PMDT"}}, + {"America/Miquelon", new String[] {"Fuso hor\u00e1rio padr\u00e3o de S\u00e3o Pedro e Miquelon", "PMST", + "Hor\u00e1rio de luz natural de S\u00e3o Pedro e Miquelon", "PMDT"}}, @@ -426,7 +426,7 @@ - "Ora estiva di Suriname", "SRST"}}, + "Fuso hor\u00e1rio de ver\u00e3o do Suriname", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -42374,57 +72920,66 @@ {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, @@ -466,8 +466,8 @@ - "Ora estiva di Davis", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Ora di Dumont-d'Urville", "DDUT", - "Ora estiva di Dumont-d'Urville", "DDUST"}}, + "Fuso hor\u00e1rio de ver\u00e3o de Davis", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Fuso hor\u00e1rio de Dumont-d'Urville", "DDUT", + "Fuso hor\u00e1rio de ver\u00e3o de Dumont-d'Urville", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"Ora dell'Isola Macquarie", "MIST", -+ "Ora estiva dell'Isola Macquarie", "MIST"}}, - {"Antarctica/Mawson", new String[] {"Ora di Mawson", "MAWT", - "Ora estiva di Mawson", "MAWST"}}, ++ {"Antarctica/Macquarie", new String[] {"Fuso Hor\u00E1rio da Ilha de Macquarie", "MIST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o da Ilha de Macquarie", "MIST"}}, + {"Antarctica/Mawson", new String[] {"Fuso hor\u00e1rio de Mawson", "MAWT", + "Fuso hor\u00e1rio de ver\u00e3o de Mawson", "MAWST"}}, {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "Ora estiva di Irkutsk", "IRKST"}}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Fuso hor\u00e1rio de Syowa", "SYOT", + "Fuso hor\u00e1rio de ver\u00e3o de Syowa", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Tempo universal coordenado", "UTC", ++ "Fuso hor\u00e1rio de ver\u00e3o da Europa Central", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Fuso hor\u00e1rio de Vostok", "VOST", + "Fuso hor\u00e1rio de ver\u00e3o de Vostok", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Fuso hor\u00e1rio de ver\u00e3o de Irkutsk", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "EIT", -+ {"Asia/Jayapura", new String[] {"Ora dell'Indonesia orientale", "WIT", - "Ora estiva dell'Indonesia orientale", "EIST"}}, - {"Asia/Kabul", new String[] {"Ora dell'Afghanistan", "AFT", - "Ora estiva dell'Afghanistan", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "EIT", ++ {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "WIT", + "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Oriental", "EIST"}}, + {"Asia/Kabul", new String[] {"Fuso hor\u00e1rio do Afeganist\u00e3o", "AFT", + "Fuso hor\u00e1rio de ver\u00e3o do Afeganist\u00e3o", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Ora di Khandyga", "YAKT", -+ "Ora estiva di Khandyga", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"Hor\u00E1rio de Khandyga", "YAKT", ++ "Hor\u00E1rio de Ver\u00E3o de Khandyga", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Ora di Krasnojarsk", "KRAT", - "Ora estiva di Krasnojarsk", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"Fuso hor\u00e1rio de Krasnoyarsk", "KRAT", + "Fuso hor\u00e1rio de ver\u00e3o de Krasnoyarsk", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Ora di Ust-Nera", "VLAT", -+ "Ora estiva di Ust-Nera", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"Hor\u00E1rio de Ust-Nera", "VLAT", ++ "Hor\u00E1rio de Ver\u00E3o de Ust-Nera", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ +@@ -616,8 +620,8 @@ {"Australia/Canberra", EST_NSW}, {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"Ora solare Australia centrorientale", "CWST", -- "Ora estiva Australia centrorientale", "CWST"}}, -+ {"Australia/Eucla", new String[] {"Ora standard Australia centro-occidentale", "CWST", -+ "Ora estiva Australia centro-occidentale", "CWST"}}, +- {"Australia/Eucla", new String[] {"Fuso hor\u00e1rio ocidental central (Austr\u00e1lia)", "CWST", +- "Fuso hor\u00e1rio de ver\u00e3o ocidental central (Austr\u00e1lia)", "CWST"}}, ++ {"Australia/Eucla", new String[] {"Fuso Hor\u00E1rio Ocidental Central (Austr\u00E1lia)", "CWST", ++ "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental Central (Austr\u00E1lia)", "CWST"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -42433,17 +72988,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "Fuso hor\u00e1rio de ver\u00e3o de Samara", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"Ora dell'Europa centrale", "MET", - "Ora estiva dell'Europa centrale", "MEST"}}, + {"MET", new String[] {"Fuso hor\u00e1rio da Europa M\u00e9dia", "MET", + "Fuso hor\u00e1rio de ver\u00e3o da Europa M\u00e9dia", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -42453,116 +73017,114 @@ * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,8 @@ protected final Object[][] getContents() { - String ACT[] = new String[] {"\u30a2\u30af\u30ec\u6642\u9593", "ACT", - "\u30a2\u30af\u30ec\u590f\u6642\u9593", "ACST"}; -- String ADELAIDE[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CST", -- "\u4e2d\u90e8\u590f\u6642\u9593 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CST"}; -+ String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST", -+ "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CST"}; - String AGT[] = new String[] {"\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "ART", - "\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u590f\u6642\u9593", "ARST"}; - String AKST[] = new String[] {"\u30a2\u30e9\u30b9\u30ab\u6a19\u6e96\u6642", "AKST", + String ACT[] = new String[] {"Acre, normaltid", "ACT", + "Acre, sommartid", "ACST"}; +- String ADELAIDE[] = new String[] {"Central normaltid (S\u00f6dra Australien)", "CST", +- "Central sommartid (S\u00f6dra Australien)", "CST"}; ++ String ADELAIDE[] = new String[] {"Central standardtid (Sydaustralien)", "CST", ++ "Central sommartid (South Australia)", "CST"}; + String AGT[] = new String[] {"Argentina, normaltid", "ART", + "Argentina, sommartid", "ARST"}; + String AKST[] = new String[] {"Alaska, normaltid", "AKST", @@ -61,10 +61,10 @@ - "\u5927\u897f\u6d0b\u590f\u6642\u9593", "ADT"}; - String BDT[] = new String[] {"\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u6642\u9593", "BDT", - "\u30d0\u30f3\u30b0\u30e9\u30c7\u30b7\u30e5\u590f\u6642\u9593", "BDST"}; -- String BRISBANE[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30af\u30a4\u30fc\u30f3\u30ba\u30e9\u30f3\u30c9)", "EST", -- "\u6771\u90e8\u590f\u6642\u9593 (\u30af\u30a4\u30fc\u30f3\u30ba\u30e9\u30f3\u30c9)", "EST"}; -- String BROKEN_HILL[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2/\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "CST", -- "\u4e2d\u90e8\u590f\u6642\u9593 (\u5357\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2/\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "CST"}; -+ String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST", -+ "\u6771\u90E8\u590F\u6642\u9593(\u30AF\u30A4\u30FC\u30F3\u30BA\u30E9\u30F3\u30C9)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST", -+ "\u4E2D\u90E8\u590F\u6642\u9593(\u5357\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2/\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "CST"}; - String BRT[] = new String[] {"\u30d6\u30e9\u30b8\u30eb\u6642\u9593", "BRT", - "\u30d6\u30e9\u30b8\u30eb\u590f\u6642\u9593", "BRST"}; - String BTT[] = new String[] {"\u30d6\u30fc\u30bf\u30f3\u6642\u9593", "BTT", + "Atlantisk sommartid", "ADT"}; + String BDT[] = new String[] {"Bangladesh, normaltid", "BDT", + "Bangladesh, sommartid", "BDST"}; +- String BRISBANE[] = new String[] {"\u00d6stlig normaltid (Queensland)", "EST", +- "\u00d6stlig sommartid (Queensland)", "EST"}; +- String BROKEN_HILL[] = new String[] {"Central normaltid (S\u00f6dra Australien/Nya Sydwales)", "CST", +- "Central sommartid (S\u00f6dra Australien/Nya Sydwales)", "CST"}; ++ String BRISBANE[] = new String[] {"\u00D6stlig standardtid (Queensland)", "EST", ++ "\u00D6stlig sommartid (Queensland)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien)/New South Wales)", "CST", ++ "Central sommartid (South Australia/New South Wales)", "CST"}; + String BRT[] = new String[] {"Brasilien, normaltid", "BRT", + "Brasilien, sommartid", "BRST"}; + String BTT[] = new String[] {"Bhutan, normaltid", "BTT", @@ -77,9 +77,9 @@ - "\u30c1\u30e3\u30bf\u30e0\u590f\u6642\u9593", "CHADT"}; - String ChST[] = new String[] {"\u30b0\u30a2\u30e0\u6a19\u6e96\u6642", "ChST", - "\u30b0\u30a2\u30e0\u590f\u6642\u9593", "ChDT"}; + "Chatham, sommartid", "CHADT"}; + String ChST[] = new String[] {"Chamorro, normaltid", "ChST", + "Chamorro, sommartid", "ChDT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "CIT", -+ String CHUT[] = new String[] {"\u30C1\u30E5\u30FC\u30AF\u6642\u9593", "CHUT", -+ "Chuuk Time", "CHUST"}; -+ String CIT[] = new String[] {"\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WITA", - "\u4e2d\u592e\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "CIST"}; - String CLT[] = new String[] {"\u30c1\u30ea\u6642\u9593", "CLT", - "\u30c1\u30ea\u590f\u6642\u9593", "CLST"}; -@@ -89,8 +89,8 @@ - "\u4e2d\u56fd\u590f\u6642\u9593", "CDT"}; - String CUBA[] = new String[] {"\u30ad\u30e5\u30fc\u30d0\u6a19\u6e96\u6642", "CST", - "\u30ad\u30e5\u30fc\u30d0\u590f\u6642\u9593", "CDT"}; -- String DARWIN[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642 (\u30ce\u30fc\u30b6\u30f3\u30c6\u30ea\u30c8\u30ea\u30fc)", "CST", -- "\u4e2d\u90e8\u590f\u6642\u9593 (\u30ce\u30fc\u30b6\u30f3\u30c6\u30ea\u30c8\u30ea\u30fc)", "CST"}; -+ String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST", -+ "\u4E2D\u90E8\u590F\u6642\u9593(\u30CE\u30FC\u30B6\u30F3\u30C6\u30EA\u30C8\u30EA\u30FC)", "CST"}; - String DUBLIN[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", - "\u30a2\u30a4\u30eb\u30e9\u30f3\u30c9\u590f\u6642\u9593", "IST"}; - String EAT[] = new String[] {"\u6771\u30a2\u30d5\u30ea\u30ab\u6642\u9593", "EAT", +- String CIT[] = new String[] {"Centralindonesisk tid", "CIT", ++ String CHUT[] = new String[] {"Chuuk, normaltid", "CHUT", ++ "Chuuk, sommartid", "CHUST"}; ++ String CIT[] = new String[] {"Centralindonesisk tid", "WITA", + "Centralindonesisk sommartid", "CIST"}; + String CLT[] = new String[] {"Chile, normaltid", "CLT", + "Chile, sommartid", "CLST"}; +@@ -89,7 +89,7 @@ + "Kina, sommartid", "CDT"}; + String CUBA[] = new String[] {"Kuba, normaltid", "CST", + "Kuba, sommartid", "CDT"}; +- String DARWIN[] = new String[] {"Central normaltid (Nordterritoriet)", "CST", ++ String DARWIN[] = new String[] {"Central standardtid (Nordterritoriet)", "CST", + "Central sommartid (Nordterritoriet)", "CST"}; + String DUBLIN[] = new String[] {"Greenwichtid", "GMT", + "Irland, sommartid", "IST"}; @@ -103,10 +103,10 @@ - "\u6771\u30b0\u30ea\u30fc\u30f3\u30e9\u30f3\u30c9\u590f\u6642\u9593", "EGST"}; - String EST[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642", "EST", - "\u6771\u90e8\u590f\u6642\u9593", "EDT"}; -- String EST_NSW[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "EST", -- "\u6771\u90e8\u590f\u6642\u9593 (\u30cb\u30e5\u30fc\u30b5\u30a6\u30b9\u30a6\u30a7\u30fc\u30eb\u30ba)", "EST"}; + "\u00d6stgr\u00f6nl\u00e4ndsk sommartid", "EGST"}; + String EST[] = new String[] {"Eastern, normaltid", "EST", + "Eastern, sommartid", "EDT"}; +- String EST_NSW[] = new String[] {"Eastern, normaltid (Nya Sydwales)", "EST", +- "Eastern, sommartid (Nya Sydwales)", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST", -+ "\u6771\u90E8\u590F\u6642\u9593(\u30CB\u30E5\u30FC\u30B5\u30A6\u30B9\u30A6\u30A7\u30FC\u30EB\u30BA)", "EST"}; -+ String FET[] = new String[] {"\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u6642\u9593", "FET", -+ "\u6975\u6771\u30E8\u30FC\u30ED\u30C3\u30D1\u590F\u6642\u9593", "FEST"}; - String GHMT[] = new String[] {"\u30ac\u30fc\u30ca\u6a19\u6e96\u6642", "GMT", - "\u30ac\u30fc\u30ca\u590f\u6642\u9593", "GHST"}; - String GAMBIER[] = new String[] {"\u30ac\u30f3\u30d3\u30a2\u6642\u9593", "GAMT", ++ String EST_NSW[] = new String[] {"\u00D6stlig standardtid (New South Wales)", "EST", ++ "\u00D6stlig sommartid (New South Wales)", "EST"}; ++ String FET[] = new String[] {"Kaliningradtid", "FET", ++ "\u00D6steuropeisk sommartid", "FEST"}; + String GHMT[] = new String[] {"Ghana, normaltid", "GMT", + "Ghana, sommartid", "GHST"}; + String GAMBIER[] = new String[] {"Gambier, normaltid", "GAMT", @@ -159,8 +159,8 @@ - "\u30d4\u30c8\u30b1\u30eb\u30f3\u5cf6\u590f\u6642\u9593", "PDT"}; - String PKT[] = new String[] {"\u30d1\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "PKT", - "\u30d1\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "PKST"}; + "Pitcairn, sommartid", "PDT"}; + String PKT[] = new String[] {"Pakistan, normaltid", "PKT", + "Pakistan, sommartid", "PKST"}; - String PONT[] = new String[] {"Pohnpei Time", "PONT", - "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"\u30DD\u30F3\u30DA\u30A4\u6642\u9593", "PONT", -+ "\u30DD\u30F3\u30DA\u30A4\u590F\u6642\u9593", "PONST"}; - String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642", "PST", - "\u592a\u5e73\u6d0b\u590f\u6642\u9593", "PDT"}; - String SAMOA[] = new String[] {"\u30b5\u30e2\u30a2\u6a19\u6e96\u6642", "SST", ++ String PONT[] = new String[] {"Pohnpei, normaltid", "PONT", ++ "Pohnpei, sommartid", "PONST"}; + String PST[] = new String[] {"Stilla havet, normaltid", "PST", + "Stilla havet, sommartid", "PDT"}; + String SAMOA[] = new String[] {"Samoa, normaltid", "SST", @@ -173,8 +173,8 @@ - "\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb\u590f\u6642\u9593", "SGST"}; - String SLST[] = new String[] {"\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642", "GMT", - "\u30b7\u30a8\u30e9\u30ec\u30aa\u30cd\u590f\u6642\u9593", "SLST"}; -- String TASMANIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30bf\u30b9\u30de\u30cb\u30a2)", "EST", -- "\u6771\u90e8\u590f\u6642\u9593 (\u30bf\u30b9\u30de\u30cb\u30a2)", "EST"}; -+ String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST", -+ "\u6771\u90E8\u590F\u6642\u9593(\u30BF\u30B9\u30DE\u30CB\u30A2)", "EST"}; - String TMT[] = new String[] {"\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "TMT", - "\u30c8\u30eb\u30af\u30e1\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "TMST"}; - String ULAT[]= new String[] {"\u30a6\u30e9\u30fc\u30f3\u30d0\u30fc\u30c8\u30eb\u6642\u9593", "ULAT", + "Singapore, sommartid", "SGST"}; + String SLST[] = new String[] {"Greenwichtid", "GMT", + "Sierra Leone, sommartid", "SLST"}; +- String TASMANIA[] = new String[] {"Eastern, normaltid (Tasmanien)", "EST", +- "Eastern, sommartid (Tasmanien)", "EST"}; ++ String TASMANIA[] = new String[] {"\u00D6stlig standardtid (Tasmania)", "EST", ++ "\u00D6stlig sommartid (Tasmanien)", "EST"}; + String TMT[] = new String[] {"Turkmenistan, normaltid", "TMT", + "Turkmenistan, sommartid", "TMST"}; + String ULAT[]= new String[] {"Ulaanbaatar, normaltid", "ULAT", @@ -183,8 +183,8 @@ - "\u5354\u5b9a\u4e16\u754c\u6642", "UTC"}; - String UZT[] = new String[] {"\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u6642\u9593", "UZT", - "\u30a6\u30ba\u30d9\u30ad\u30b9\u30bf\u30f3\u590f\u6642\u9593", "UZST"}; -- String VICTORIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642 (\u30d3\u30af\u30c8\u30ea\u30a2)", "EST", -- "\u6771\u90e8\u590f\u6642\u9593 (\u30d3\u30af\u30c8\u30ea\u30a2)", "EST"}; -+ String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST", -+ "\u6771\u90E8\u590F\u6642\u9593(\u30D3\u30AF\u30C8\u30EA\u30A2)", "EST"}; - String VLAT[] = new String[] {"\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u6642\u9593", "VLAT", - "\u30a6\u30e9\u30b8\u30aa\u30b9\u30c8\u30af\u590f\u6642\u9593", "VLAST"}; - String WART[] = new String[] {"\u897f\u30a2\u30eb\u30bc\u30f3\u30c1\u30f3\u6642\u9593", "WART", + "Koordinerad universell tid", "UTC"}; + String UZT[] = new String[] {"Uzbekistan, normaltid", "UZT", + "Uzbekistan, sommartid", "UZST"}; +- String VICTORIA[] = new String[] {"\u00d6stlig normaltid (Victoria)", "EST", +- "\u00d6stlig sommartid (Victoria)", "EST"}; ++ String VICTORIA[] = new String[] {"\u00D6stlig standardtid (Victoria)", "EST", ++ "\u00D6stlig sommartid (Victoria)", "EST"}; + String VLAT[] = new String[] {"Vladivostok, normaltid", "VLAT", + "Vladivostok, sommartid", "VLAST"}; + String WART[] = new String[] {"V\u00e4stargentina, normaltid", "WART", @@ -193,10 +193,10 @@ - "\u897f\u30a2\u30d5\u30ea\u30ab\u590f\u6642\u9593", "WAST"}; - String WET[] = new String[] {"\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "WET", - "\u897f\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "WEST"}; -- String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT", -+ String WIT[] = new String[] {"\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIB", - "\u897f\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "WIST"}; -- String WST_AUS[] = new String[] {"\u897f\u90e8\u6a19\u6e96\u6642 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "WST", -- "\u897f\u90e8\u590f\u6642\u9593 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "WST"}; -+ String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST", -+ "\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "WST"}; - String WST_SAMOA[] = new String[] {"\u897f\u30b5\u30e2\u30a2\u6642\u9593", "WST", - "\u897f\u30b5\u30e2\u30a2\u590f\u6642\u9593", "WSDT"}; - String YAKT[] = new String[] {"\u30e4\u30af\u30fc\u30c4\u30af\u6642\u9593", "YAKT", + "V\u00e4stafrikansk sommartid", "WAST"}; + String WET[] = new String[] {"V\u00e4steuropeisk tid", "WET", + "V\u00e4steuropeisk sommartid", "WEST"}; +- String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIT", ++ String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIB", + "V\u00e4stindonesisk sommartid", "WIST"}; +- String WST_AUS[] = new String[] {"V\u00e4stlig normaltid (Australien)", "WST", +- "V\u00e4stlig sommartid (Australien)", "WST"}; ++ String WST_AUS[] = new String[] {"Western Standard Time (Australien)", "WST", ++ "V\u00E4stlig sommartid (Australien)", "WST"}; + String WST_SAMOA[] = new String[] {"V\u00e4stsamoansk tid", "WST", + "V\u00e4stsamoansk sommartid", "WSDT"}; + String YAKT[] = new String[] {"Jakutsk, normaltid", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -42596,13 +73158,13 @@ {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u6A19\u6E96\u6642\u9593", "MeST", -+ "\u30E1\u30C8\u30E9\u30AB\u30C8\u30E9\u590F\u6642\u9593", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"Metlakatla, normaltid", "MeST", ++ "Metlakatla, sommartid", "MeDT"}}, {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u6a19\u6e96\u6642", "PMST", - "\u30b5\u30f3\u30d4\u30a8\u30fc\u30eb\u30fb\u30df\u30af\u30ed\u30f3\u8af8\u5cf6\u590f\u6642\u9593", "PMDT"}}, + {"America/Miquelon", new String[] {"Saint-Pierre-et-Miquelon, normaltid", "PMST", + "Saint-Pierre-et-Miquelon, sommartid", "PMDT"}}, @@ -426,7 +426,7 @@ - "\u30b9\u30ea\u30ca\u30e0\u590f\u6642\u9593", "SRST"}}, + "Surinam, sommartid", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -42620,57 +73182,66 @@ {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, @@ -466,8 +466,8 @@ - "\u30c7\u30a4\u30d3\u30b9\u590f\u6642\u9593", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u6642\u9593", "DDUT", - "\u30c7\u30e5\u30e2\u30f3\u30c7\u30e5\u30eb\u30f4\u30a3\u30eb\u590f\u6642\u9593", "DDUST"}}, + "Davis, sommartid", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville, normaltid", "DDUT", + "Dumont-d'Urville, sommartid", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u6642\u9593", "MIST", -+ "\u30DE\u30C3\u30B3\u30FC\u30EA\u30FC\u5CF6\u590F\u6642\u9593", "MIST"}}, - {"Antarctica/Mawson", new String[] {"\u30e2\u30fc\u30bd\u30f3\u6642\u9593", "MAWT", - "\u30e2\u30fc\u30bd\u30f3\u590f\u6642\u9593", "MAWST"}}, ++ {"Antarctica/Macquarie", new String[] {"Macquarie\u00F6n, normaltid", "MIST", ++ "Macquarie\u00F6n, sommartid", "MIST"}}, + {"Antarctica/Mawson", new String[] {"Mawson, normaltid", "MAWT", + "Mawson, sommartid", "MAWST"}}, {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "\u30a4\u30eb\u30af\u30fc\u30c4\u30af\u590f\u6642\u9593", "IRKST"}}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Syowa, normaltid", "SYOT", + "Syowa, sommartid", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"Koordinerad universell tid", "UTC", ++ "Centraleuropeisk sommartid", "CEST"}}, + {"Antarctica/Vostok", new String[] {"Vostok, normaltid", "VOST", + "Vostok, sommartid", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Irkutsk, sommartid", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "EIT", -+ {"Asia/Jayapura", new String[] {"\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u6642\u9593", "WIT", - "\u6771\u30a4\u30f3\u30c9\u30cd\u30b7\u30a2\u590f\u6642\u9593", "EIST" }}, - {"Asia/Kabul", new String[] {"\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u6642\u9593", "AFT", - "\u30a2\u30d5\u30ac\u30cb\u30b9\u30bf\u30f3\u590f\u6642\u9593", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "EIT", ++ {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "WIT", + "\u00d6stindonesisk sommartid", "EIST"}}, + {"Asia/Kabul", new String[] {"Afghanistan, normaltid", "AFT", + "Afghanistan, sommartid", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u6642\u9593", "YAKT", -+ "\u30CF\u30F3\u30C9\u30A5\u30A4\u30AC\u590F\u6642\u9593", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"Khandyga, normaltid", "YAKT", ++ "Khandyga, sommartid", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u6642\u9593", "KRAT", - "\u30af\u30e9\u30b9\u30ce\u30e4\u30eb\u30b9\u30af\u590f\u6642\u9593", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"Krasnojarsk, normaltid", "KRAT", + "Krasnojarsk, sommartid", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"\u30A6\u30B9\u30C1\u30CD\u30E9\u6642\u9593", "VLAT", -+ "\u30A6\u30B9\u30C1\u30CD\u30E9\u590F\u6642\u9593", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"Ust-Nera, normaltid", "VLAT", ++ "Ust-Nera, sommartid", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ +@@ -616,8 +620,8 @@ {"Australia/Canberra", EST_NSW}, {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6a19\u6e96\u6642 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CWST", -- "\u4e2d\u897f\u90e8\u590f\u6642\u9593 (\u30aa\u30fc\u30b9\u30c8\u30e9\u30ea\u30a2)", "CWST"}}, -+ {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST", -+ "\u4E2D\u897F\u90E8\u590F\u6642\u9593(\u30AA\u30FC\u30B9\u30C8\u30E9\u30EA\u30A2)", "CWST"}}, +- {"Australia/Eucla", new String[] {"Central v\u00e4stlig normaltid (Australien)", "CWST", +- "Central v\u00e4stlig sommartid (Australien)", "CWST"}}, ++ {"Australia/Eucla", new String[] {"Central v\u00E4stlig normaltid (Australien)", "CWST", ++ "Central v\u00E4stlig sommartid (Australien)", "CWST"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -42679,17 +73250,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "Samara, sommartid", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u6642\u9593", "MET", - "\u4e2d\u90e8\u30e8\u30fc\u30ed\u30c3\u30d1\u590f\u6642\u9593", "MEST"}}, + {"MET", new String[] {"Mellaneuropeisk tid", "MET", + "Mellaneuropeisk sommartid", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -42699,116 +73279,116 @@ * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,8 @@ protected final Object[][] getContents() { - String ACT[] = new String[] {"\uc5d0\uc774\ucee4 \uc2dc\uac04", "ACT", - "\uc5d0\uc774\ucee4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ACST"}; -- String ADELAIDE[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CST", -- "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CST"}; -+ String ADELAIDE[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST", -+ "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CST"}; - String AGT[] = new String[] {"\uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "ART", - "\uc544\ub974\ud5e8\ud2f0\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ARST"}; - String AKST[] = new String[] {"\uc54c\ub798\uc2a4\uce74 \ud45c\uc900\uc2dc", "AKST", + String ACT[] = new String[] {"Acre \u65f6\u95f4", "ACT", + "Acre \u590f\u4ee4\u65f6", "ACST"}; +- String ADELAIDE[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5357\u6fb3\u5927\u5229\u4e9a\uff09", "CST", +- "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5357\u6fb3\u5927\u5229\u4e9a\uff09", "CST"}; ++ String ADELAIDE[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST", ++ "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST"}; + String AGT[] = new String[] {"\u963f\u6839\u5ef7\u65f6\u95f4", "ART", + "\u963f\u6839\u5ef7\u590f\u4ee4\u65f6", "ARST"}; + String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6807\u51c6\u65f6\u95f4", "AKST", @@ -61,10 +61,10 @@ - "\ub300\uc11c\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ADT"}; - String BDT[] = new String[] {"\ubc29\uae00\ub77c\ub370\uc2dc \uc2dc\uac04", "BDT", - "\ubc29\uae00\ub77c\ub370\uc2dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BDST"}; -- String BRISBANE[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ud038\uc990\ub79c\ub4dc)", "EST", -- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud038\uc990\ub79c\ub4dc)", "EST"}; -- String BROKEN_HILL[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544/\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "CST", -- "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc0ac\uc6b0\uc2a4 \uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544/\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "CST"}; -+ String BRISBANE[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD038\uC990\uB79C\uB4DC)", "EST", -+ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD038\uC990\uB79C\uB4DC)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST", -+ "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB0A8\uBD80 \uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544/\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "CST"}; - String BRT[] = new String[] {"\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc2dc\uac04", "BRT", - "\ube0c\ub77c\uc9c8\ub9ac\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "BRST"}; - String BTT[] = new String[] {"\ubd80\ud0c4 \uc2dc\uac04", "BTT", + "\u5927\u897f\u6d0b\u590f\u4ee4\u65f6", "ADT"}; + String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u65f6\u95f4", "BDT", + "\u5b5f\u52a0\u62c9\u590f\u4ee4\u65f6", "BDST"}; +- String BRISBANE[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6606\u58eb\u5170\uff09", "EST", +- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u6606\u58eb\u5170\uff09", "EST"}; +- String BROKEN_HILL[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5357\u6fb3\u5927\u5229\u4e9a/\u65b0\u5357\u5a01\u5c14\u65af\uff09", "CST", +- "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5357\u6fb3\u5927\u5229\u4e9a/\u65b0\u5357\u5a01\u5c14\u65af\uff09", "CST"}; ++ String BRISBANE[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u6606\u58EB\u5170)", "EST", ++ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u6606\u58EB\u5170)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST", ++ "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST"}; + String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9a\u65f6\u95f4", "BRT", + "\u5df4\u897f\u5229\u4e9a\u590f\u4ee4\u65f6", "BRST"}; + String BTT[] = new String[] {"\u4e0d\u4e39\u65f6\u95f4", "BTT", @@ -77,9 +77,9 @@ - "Chatham \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CHADT"}; - String ChST[] = new String[] {"\ucc28\ubaa8\ub85c \ud45c\uc900\uc2dc", "ChST", - "\ucc28\ubaa8\ub85c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "ChDT"}; + "\u67e5\u8428\u59c6\u590f\u4ee4\u65f6", "CHADT"}; + String ChST[] = new String[] {"Chamorro \u6807\u51c6\u65f6\u95f4", "ChST", + "Chamorro \u590f\u4ee4\u65f6", "ChDT"}; - String CHUT[] = new String[] {"Chuuk Time", "CHUT", - "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "CIT", -+ String CHUT[] = new String[] {"\uCD94\uD06C \uD45C\uC900\uC2DC", "CHUT", -+ "\uCD94\uD06C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "CHUST"}; -+ String CIT[] = new String[] {"\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WITA", - "\uc911\uc559 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CIST"}; - String CLT[] = new String[] {"\uce60\ub808 \uc2dc\uac04", "CLT", - "\uce60\ub808 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CLST"}; +- String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "CIT", ++ String CHUT[] = new String[] {"\u4E18\u514B\u65F6\u95F4", "CHUT", ++ "\u4E18\u514B\u590F\u4EE4\u65F6", "CHUST"}; ++ String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WITA", + "\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "CIST"}; + String CLT[] = new String[] {"\u667a\u5229\u65f6\u95f4", "CLT", + "\u667a\u5229\u590f\u4ee4\u65f6", "CLST"}; @@ -89,8 +89,8 @@ - "\uc911\uad6d \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; - String CUBA[] = new String[] {"\ucfe0\ubc14 \ud45c\uc900\uc2dc", "CST", - "\ucfe0\ubc14 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "CDT"}; -- String DARWIN[] = new String[] {"\uc911\ubd80 \ud45c\uc900\uc2dc(\ub178\ub358 \uc9c0\uc5ed)", "CST", -- "\uc911\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ub178\ub358 \uc9c0\uc5ed)", "CST"}; -+ String DARWIN[] = new String[] {"\uC911\uBD80 \uD45C\uC900\uC2DC(\uBD81\uBD80 \uC9C0\uC5ED)", "CST", -+ "\uC911\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBD81\uBD80 \uC9C0\uC5ED)", "CST"}; - String DUBLIN[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", - "\uc544\uc77c\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IST"}; - String EAT[] = new String[] {"\ub3d9\ubd80 \uc544\ud504\ub9ac\uce74 \uc2dc\uac04", "EAT", + "\u4e2d\u56fd\u590f\u4ee4\u65f6", "CDT"}; + String CUBA[] = new String[] {"\u53e4\u5df4\u6807\u51c6\u65f6\u95f4", "CST", + "\u53e4\u5df4\u590f\u4ee4\u65f6", "CDT"}; +- String DARWIN[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5317\u9886\u5730\uff09", "CST", +- "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5317\u9886\u5730\uff09", "CST"}; ++ String DARWIN[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5317\u9886\u5730)", "CST", ++ "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5317\u9886\u5730)", "CST"}; + String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", + "\u7231\u5c14\u5170\u590f\u4ee4\u65f6", "IST"}; + String EAT[] = new String[] {"\u4e1c\u975e\u65f6\u95f4", "EAT", @@ -103,10 +103,10 @@ - "\ub3d9\ubd80 \uadf8\ub9b0\ub79c\ub4dc \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EGST"}; - String EST[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc", "EST", - "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EDT"}; -- String EST_NSW[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "EST", -- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ub274 \uc0ac\uc6b0\uc2a4 \uc6e8\uc77c\uc988)", "EST"}; + "\u4e1c\u683c\u6797\u5c9b\u590f\u4ee4\u65f6", "EGST"}; + String EST[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4", "EST", + "\u4e1c\u90e8\u590f\u4ee4\u65f6", "EDT"}; +- String EST_NSW[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09", "EST", +- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST", -+ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uB274\uC0AC\uC6B0\uC2A4\uC6E8\uC77C\uC988)", "EST"}; -+ String FET[] = new String[] {"\uADF9\uB3D9 \uC720\uB7FD \uD45C\uC900\uC2DC", "FET", -+ "\uADF9\uB3D9 \uC720\uB7FD \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "FEST"}; - String GHMT[] = new String[] {"\uac00\ub098 \ud45c\uc900\uc2dc", "GMT", - "\uac00\ub098 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "GHST"}; - String GAMBIER[] = new String[] {"\uac10\ube44\uc544 \uc2dc\uac04", "GAMT", ++ String EST_NSW[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST", ++ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST"}; ++ String FET[] = new String[] {"\u8FDC\u4E1C\u6B27\u65F6\u95F4", "FET", ++ "\u8FDC\u4E1C\u6B27\u590F\u4EE4\u65F6", "FEST"}; + String GHMT[] = new String[] {"\u52a0\u7eb3\u65f6\u95f4", "GMT", + "\u52a0\u7eb3\u590f\u4ee4\u65f6", "GHST"}; + String GAMBIER[] = new String[] {"\u5188\u6bd4\u4e9a\u65f6\u95f4", "GAMT", @@ -159,8 +159,8 @@ - "Pitcairn \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"}; - String PKT[] = new String[] {"\ud30c\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "PKT", - "\ud30c\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PKST"}; + "\u76ae\u7279\u5eb7\u5c9b\u590f\u4ee4\u65f6", "PDT"}; + String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u65f6\u95f4", "PKT", + "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u65f6", "PKST"}; - String PONT[] = new String[] {"Pohnpei Time", "PONT", - "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"\uD3F0\uD398\uC774 \uD45C\uC900\uC2DC", "PONT", -+ "\uD3F0\uD398\uC774 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "PONST"}; - String PST[] = new String[] {"\ud0dc\ud3c9\uc591 \ud45c\uc900\uc2dc", "PST", - "\ud0dc\ud3c9\uc591 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PDT"}; - String SAMOA[] = new String[] {"\uc0ac\ubaa8\uc544 \ud45c\uc900\uc2dc", "SST", ++ String PONT[] = new String[] {"\u6CE2\u7EB3\u4F69\u65F6\u95F4", "PONT", ++ "\u6CE2\u7EB3\u4F69\u590F\u4EE4\u65F6", "PONST"}; + String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6807\u51c6\u65f6\u95f4", "PST", + "\u592a\u5e73\u6d0b\u590f\u4ee4\u65f6", "PDT"}; + String SAMOA[] = new String[] {"\u8428\u6469\u4e9a\u7fa4\u5c9b\u6807\u51c6\u65f6\u95f4", "SST", @@ -173,8 +173,8 @@ - "\uc2f1\uac00\ud3ec\ub974 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SGST"}; - String SLST[] = new String[] {"\uadf8\ub9ac\ub2c8\uce58 \ud45c\uc900\uc2dc", "GMT", - "\uc2dc\uc5d0\ub77c\ub9ac\uc628 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SLST"}; -- String TASMANIA[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ud0dc\uc988\uba54\uc774\ub2c8\uc544)", "EST", -- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud0dc\uc988\uba54\uc774\ub2c8\uc544)", "EST"}; -+ String TASMANIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST", -+ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uD0DC\uC988\uBA54\uC774\uB2C8\uC544)", "EST"}; - String TMT[] = new String[] {"\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "TMT", - "\ud22c\ub974\ud06c\uba54\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "TMST"}; - String ULAT[]= new String[] {"\uc6b8\ub780\ubc14\ud0c0\ub974 \uc2dc\uac04", "ULAT", + "\u65b0\u52a0\u5761\u590f\u4ee4\u65f6", "SGST"}; + String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", + "\u585e\u62c9\u5229\u6602\u590f\u4ee4\u65f6", "SLST"}; +- String TASMANIA[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u5854\u65af\u9a6c\u5c3c\u4e9a\uff09", "EST", +- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u5854\u65af\u9a6c\u5c3c\u4e9a\uff09", "EST"}; ++ String TASMANIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST", ++ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST"}; + String TMT[] = new String[] {"\u571f\u5e93\u66fc\u65f6\u95f4", "TMT", + "\u571f\u5e93\u66fc\u590f\u4ee4\u65f6", "TMST"}; + String ULAT[]= new String[] {"\u5e93\u4f26\u65f6\u95f4", "ULAT", @@ -183,8 +183,8 @@ - "\uc138\uacc4 \ud45c\uc900\uc2dc", "UTC"}; - String UZT[] = new String[] {"\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc2dc\uac04", "UZT", - "\uc6b0\uc988\ubca0\ud0a4\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "UZST"}; -- String VICTORIA[] = new String[] {"\ub3d9\ubd80 \ud45c\uc900\uc2dc(\ube45\ud1a0\ub9ac\uc544)", "EST", -- "\ub3d9\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ube45\ud1a0\ub9ac\uc544)", "EST"}; -+ String VICTORIA[] = new String[] {"\uB3D9\uBD80 \uD45C\uC900\uC2DC(\uBE45\uD1A0\uB9AC\uC544)", "EST", -+ "\uB3D9\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uBE45\uD1A0\uB9AC\uC544)", "EST"}; - String VLAT[] = new String[] {"\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc2dc\uac04", "VLAT", - "\ube14\ub77c\ub514\ubcf4\uc2a4\ud1a1 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "VLAST"}; - String WART[] = new String[] {"\uc11c\ubd80 \uc544\ub974\ud5e8\ud2f0\ub098 \uc2dc\uac04", "WART", + "\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC"}; + String UZT[] = new String[] {"\u4e4c\u5179\u522b\u514b\u65af\u5766\u65f6\u95f4", "UZT", + "\u4e4c\u5179\u522b\u514b\u65af\u5766\u590f\u4ee4\u65f6", "UZST"}; +- String VICTORIA[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u7ef4\u591a\u5229\u4e9a\uff09", "EST", +- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u7ef4\u591a\u5229\u4e9a\uff09", "EST"}; ++ String VICTORIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u7EF4\u591A\u5229\u4E9A)", "EST", ++ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u7EF4\u591A\u5229\u4E9A)", "EST"}; + String VLAT[] = new String[] {"\u6d77\u53c2\u5d34\u65f6\u95f4", "VLAT", + "\u6d77\u53c2\u5d34\u590f\u4ee4\u65f6", "VLAST"}; + String WART[] = new String[] {"\u897f\u963f\u6839\u5ef7\u65f6\u95f4", "WART", @@ -193,10 +193,10 @@ - "\uc11c\ubd80 \uc544\ud504\ub9ac\uce74 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WAST"}; - String WET[] = new String[] {"\uc11c\uc720\ub7fd \uc2dc\uac04", "WET", - "\uc11c\uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WEST"}; -- String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT", -+ String WIT[] = new String[] {"\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIB", - "\uc11c\uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WIST"}; -- String WST_AUS[] = new String[] {"\uc11c\ubd80 \ud45c\uc900\uc2dc(\ud638\uc8fc)", "WST", -- "\uc11c\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\ud638\uc8fc)", "WST"}; -+ String WST_AUS[] = new String[] {"\uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST", -+ "\uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "WST"}; - String WST_SAMOA[] = new String[] {"\uc11c\uc0ac\ubaa8\uc544 \uc2dc\uac04", "WST", - "\uc11c\uc0ac\ubaa8\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "WSDT"}; - String YAKT[] = new String[] {"\uc57c\uce20\ud06c \uc2dc\uac04", "YAKT", + "\u897f\u975e\u590f\u4ee4\u65f6", "WAST"}; + String WET[] = new String[] {"\u897f\u6b27\u65f6\u95f4", "WET", + "\u897f\u6b27\u590f\u4ee4\u65f6", "WEST"}; +- String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT", ++ String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIB", + "\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "WIST"}; +- String WST_AUS[] = new String[] {"\u897f\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "WST", +- "\u897f\u90e8\u590f\u4ee4\u65f6\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "WST"}; ++ String WST_AUS[] = new String[] {"\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "WST", ++ "\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "WST"}; + String WST_SAMOA[] = new String[] {"\u897f\u8428\u6469\u4e9a\u65f6\u95f4", "WST", + "\u897f\u8428\u6469\u4e9a\u590f\u4ee4\u65f6", "WSDT"}; + String YAKT[] = new String[] {"\u4e9a\u5e93\u6b21\u514b\u65f6\u95f4", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -42842,13 +73422,13 @@ {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uD45C\uC900\uC2DC", "MeST", -+ "\uBA54\uD2B8\uB77C\uCE74\uD2B8\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6807\u51C6\u65F6\u95F4", "MeST", ++ "\u6885\u7279\u62C9\u5361\u7279\u62C9\u590F\u4EE4\u65F6", "MeDT"}}, {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \ud45c\uc900\uc2dc", "PMST", - "\ud53c\uc5d0\ub974 \ubbf8\ud06c\ub860 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PMDT"}}, + {"America/Miquelon", new String[] {"\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u6807\u51c6\u65f6\u95f4", "PMST", + "\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u590f\u4ee4\u65f6", "PMDT"}}, @@ -426,7 +426,7 @@ - "\uc218\ub9ac\ub0a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "SRST"}}, + "\u82cf\u5229\u5357\u590f\u4ee4\u65f6", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -42866,57 +73446,66 @@ {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, @@ -466,8 +466,8 @@ - "Davis \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"\ub4a4\ubabd \ub4a4\ub974\ube4c \uc2dc\uac04", "DDUT", - "\ub4a4\ubabd \ub4a4\ub974\ube4c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "DDUST"}}, + "\u6234\u7ef4\u65af\u590f\u4ee4\u65f6", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u65f6\u95f4", "DDUT", + "Dumont-d'Urville \u590f\u4ee4\u65f6", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"\uB9E4\uCF70\uB9AC \uC12C \uD45C\uC900\uC2DC", "MIST", -+ "\uB9E4\uCF70\uB9AC \uC12C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "MIST"}}, - {"Antarctica/Mawson", new String[] {"\ubaa8\uc2a8 \uc2dc\uac04", "MAWT", - "\ubaa8\uc2a8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAWST"}}, ++ {"Antarctica/Macquarie", new String[] {"\u9EA6\u5938\u91CC\u5C9B\u65F6\u95F4", "MIST", ++ "\u9EA6\u5938\u91CC\u5C9B\u590F\u4EE4\u65F6", "MIST"}}, + {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u65f6\u95f4", "MAWT", + "\u83ab\u68ee\u590f\u4ee4\u65f6", "MAWST"}}, {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "\uc774\ub974\ucfe0\uce20\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "IRKST"}}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"Syowa \u65f6\u95f4", "SYOT", + "Syowa \u590f\u4ee4\u65f6", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC", ++ "\u4e2d\u6b27\u590f\u4ee4\u65f6", "CEST"}}, + {"Antarctica/Vostok", new String[] {"\u83ab\u65af\u6258\u514b\u65f6\u95f4", "VOST", + "\u83ab\u65af\u6258\u514b\u590f\u4ee4\u65f6", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "\u4f0a\u5c14\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "IRKST"}}, {"Asia/Istanbul", EET}, {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "EIT", -+ {"Asia/Jayapura", new String[] {"\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc2dc\uac04", "WIT", - "\ub3d9\ubd80 \uc778\ub3c4\ub124\uc2dc\uc544 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "EIST"}}, - {"Asia/Kabul", new String[] {"\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc2dc\uac04", "AFT", - "\uc544\ud504\uac00\ub2c8\uc2a4\ud0c4 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "AFST"}}, -@@ -537,7 +537,8 @@ +- {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "EIT", ++ {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT", + "\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "EIST"}}, + {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u65f6\u95f4", "AFT", + "\u963f\u5bcc\u6c57\u590f\u4ee4\u65f6", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"\uD55C\uB514\uAC00 \uD45C\uC900\uC2DC", "YAKT", -+ "\uD55C\uB514\uAC00 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"\u6C49\u5FB7\u52A0\u65F6\u95F4", "YAKT", ++ "\u6C49\u5FB7\u52A0\u590F\u4EE4\u65F6", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc2dc\uac04", "KRAT", - "\ud06c\ub77c\uc2a4\ub178\uc57c\ub974\uc2a4\ud06c \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u65f6\u95f4", "KRAT", + "\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u590f\u4ee4\u65f6", "KRAST"}}, +@@ -586,7 +589,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"\uC6B0\uC2A4\uD2F0\uB124\uB77C \uD45C\uC900\uC2DC", "VLAT", -+ "\uC6B0\uC2A4\uD2F0\uB124\uB77C \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"\u4E4C\u65AF\u5B63\u6D85\u62C9\u65F6\u95F4", "VLAT", ++ "\u4E4C\u65AF\u5B63\u6D85\u62C9\u590F\u4EE4\u65F6", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ +@@ -616,8 +620,8 @@ {"Australia/Canberra", EST_NSW}, {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"\uc911\uc11c\ubd80 \ud45c\uc900\uc2dc(\uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CWST", -- "\uc911\uc11c\ubd80 \uc77c\uad11\uc808\uc57d\uc2dc\uac04(\uc624\uc2a4\ud2b8\ub808\uc77c\ub9ac\uc544)", "CWST"}}, -+ {"Australia/Eucla", new String[] {"\uC911\uC559 \uC11C\uBD80 \uD45C\uC900\uC2DC(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST", -+ "\uC911\uC559 \uC11C\uBD80 \uC77C\uAD11 \uC808\uC57D \uC2DC\uAC04(\uC624\uC2A4\uD2B8\uB808\uC77C\uB9AC\uC544)", "CWST"}}, +- {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "CWST", +- "\u4e2d\u897f\u90e8\u590f\u4ee4\u65f6\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "CWST"}}, ++ {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "CWST", ++ "\u4E2D\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "CWST"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ +@@ -635,7 +639,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -42925,17 +73514,26 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -705,7 +709,7 @@ + "\u6c99\u9a6c\u62c9\u590f\u4ee4\u65f6", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -753,7 +757,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"\uc911\ubd80 \uc720\ub7fd \uc2dc\uac04", "MET", - "\uc911\ubd80 \uc720\ub7fd \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MEST"}}, + {"MET", new String[] {"\u4e2d\u6b27\u65f6\u95f4", "MET", + "\u4e2d\u6b27\u590f\u4ee4\u65f6", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_pt_BR.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java 2013-09-06 11:28:53.000000000 -0700 ++++ ./jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java 2014-06-06 19:56:31.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -42945,117 +73543,116 @@ * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,8 @@ protected final Object[][] getContents() { - String ACT[] = new String[] {"Fuso hor\u00e1rio do Acre", "ACT", - "Fuso hor\u00e1rio de ver\u00e3o do Acre", "ACST"}; -- String ADELAIDE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Austr\u00e1lia do Sul)", "CST", -- "Fuso hor\u00e1rio de ver\u00e3o central (Austr\u00e1lia do Sul)", "CST"}; -+ String ADELAIDE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul)", "CST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul)", "CST"}; - String AGT[] = new String[] {"Fuso hor\u00e1rio da Argentina", "ART", - "Fuso hor\u00e1rio de ver\u00e3o da Argentina", "ARST"}; - String AKST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Alaska", "AKST", + String ACT[] = new String[] {"Acre \u6642\u9593", "ACT", + "Acre \u590f\u4ee4\u6642\u9593", "ACST"}; +- String ADELAIDE[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340)", "CST", +- "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340)", "CST"}; ++ String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u90E8)", "CST", ++ "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340)", "CST"}; + String AGT[] = new String[] {"\u963f\u6839\u5ef7\u6642\u9593", "ART", + "\u963f\u6839\u5ef7\u590f\u4ee4\u6642\u9593", "ARST"}; + String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6a19\u6e96\u6642\u9593", "AKST", @@ -61,10 +61,10 @@ - "Hor\u00e1rio de luz natural do Atl\u00e2ntico", "ADT"}; - String BDT[] = new String[] {"Fuso hor\u00e1rio de Bangladesh", "BDT", - "Fuso hor\u00e1rio de ver\u00e3o de Bangladesh", "BDST"}; -- String BRISBANE[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Queensland)", "EST", -- "Fuso hor\u00e1rio de ver\u00e3o oriental (Queensland)", "EST"}; -- String BROKEN_HILL[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Austr\u00e1lia do Sul/Nova Gales do Sul)", "CST", -- "Fuso hor\u00e1rio de ver\u00e3o central (Austr\u00e1lia do Sul/Nova Gales do Sul)", "CST"}; -+ String BRISBANE[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Queensland)", "EST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Queensland)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Central (Austr\u00E1lia do Sul/Nova Gales do Sul)", "CST"}; - String BRT[] = new String[] {"Fuso hor\u00e1rio de Bras\u00edlia", "BRT", - "Fuso hor\u00e1rio de ver\u00e3o de Bras\u00edlia", "BRST"}; - String BTT[] = new String[] {"Fuso hor\u00e1rio de But\u00e3o", "BTT", -@@ -77,7 +77,7 @@ - "Hor\u00e1rio de luz natural de Chatham", "CHADT"}; - String ChST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Chamorro", "ChST", - "Hor\u00e1rio de luz natural de Chamorro", "ChDT"}; -- String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "CIT", -+ String CIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Central", "WITA", - "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Central", "CIST"}; - String CLT[] = new String[] {"Fuso hor\u00e1rio do Chile", "CLT", - "Fuso hor\u00e1rio de ver\u00e3o do Chile", "CLST"}; -@@ -87,8 +87,8 @@ - "Hor\u00e1rio de luz natural da China", "CDT"}; - String CUBA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Cuba", "CST", - "Hor\u00e1rio de luz natural de Cuba", "CDT"}; -- String DARWIN[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o central (Territ\u00f3rio do Norte)", "CST", -- "Fuso hor\u00e1rio de ver\u00e3o central (Territ\u00f3rio do Norte)", "CST"}; -+ String DARWIN[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Central (Territ\u00F3rio do Norte)", "CST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Central (Territ\u00F3rio do Norte)", "CST"}; - String DUBLIN[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o da Irlanda", "IST"}; - String EAT[] = new String[] {"Fuso hor\u00e1rio da \u00c1frica Oriental", "EAT", -@@ -101,10 +101,10 @@ - "Fuso hor\u00e1rio de ver\u00e3o da Groenl\u00e2ndia Oriental", "EGST"}; - String EST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental", "EST", - "Hor\u00e1rio de luz natural oriental", "EDT"}; -- String EST_NSW[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Nova Gales do Sul)", "EST", -- "Fuso hor\u00e1rio de ver\u00e3o oriental (Nova Gales do Sul)", "EST"}; + "\u5927\u897f\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT"}; + String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u6642\u9593", "BDT", + "\u5b5f\u52a0\u62c9\u590f\u4ee4\u6642\u9593", "BDST"}; +- String BRISBANE[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u6606\u58eb\u862d)", "EST", +- "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u6606\u58eb\u862d)", "EST"}; +- String BROKEN_HILL[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340/\u65b0\u5357\u5a01\u723e\u65af)", "CST", +- "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340/\u65b0\u5357\u5a01\u723e\u65af)", "CST"}; ++ String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u6606\u58EB\u862D)", "EST", ++ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u6606\u58EB\u862D)", "EST"}; ++ String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST", ++ "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST"}; + String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9e\u6642\u9593", "BRT", + "\u5df4\u897f\u5229\u4e9e\u590f\u4ee4\u6642\u9593", "BRST"}; + String BTT[] = new String[] {"\u4e0d\u4e39\u6642\u9593", "BTT", +@@ -77,9 +77,9 @@ + "\u67e5\u5766\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CHADT"}; + String ChST[] = new String[] {"\u67e5\u83ab\u6d1b\u6a19\u6e96\u6642\u9593", "ChST", + "\u67e5\u83ab\u6d1b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ChDT"}; +- String CHUT[] = new String[] {"Chuuk Time", "CHUT", +- "Chuuk Summer Time", "CHUST"}; +- String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "CIT", ++ String CHUT[] = new String[] {"\u695A\u514B\u6642\u9593", "CHUT", ++ "\u695A\u514B\u590F\u4EE4\u6642\u9593", "CHUST"}; ++ String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WITA", + "\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "CIST"}; + String CLT[] = new String[] {"\u667a\u5229\u6642\u9593", "CLT", + "\u667a\u5229\u590f\u4ee4\u6642\u9593", "CLST"}; +@@ -89,8 +89,8 @@ + "\u4e2d\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; + String CUBA[] = new String[] {"\u53e4\u5df4\u6a19\u6e96\u6642\u9593", "CST", + "\u53e4\u5df4\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; +- String DARWIN[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u5317\u90e8\u5404\u5730\u5340)", "CST", +- "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u5317\u90e8\u5404\u5730\u5340)", "CST"}; ++ String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST", ++ "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST"}; + String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", + "\u611b\u723e\u862d\u590f\u4ee4\u6642\u9593", "IST"}; + String EAT[] = new String[] {"\u6771\u975e\u6642\u9593", "EAT", +@@ -103,10 +103,10 @@ + "\u6771\u683c\u6797\u5cf6\u590f\u4ee4\u6642\u9593", "EGST"}; + String EST[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593", "EST", + "\u6771\u65b9\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "EDT"}; +- String EST_NSW[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)", "EST", +- "\u6771\u65b9\u590f\u4ee4\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)", "EST"}; - String FET[] = new String[] {"Further-eastern European Time", "FET", - "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Oriental (Nova Gales do Sul)", "EST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Nova Gales do Sul)", "EST"}; -+ String FET[] = new String[] {"Hor\u00E1rio do Extremo Leste Europeu (FET)", "FET", -+ "Fuso Hor\u00E1rio de Ver\u00E3o do Extremo Leste Europeu", "FEST"}; - String GHMT[] = new String[] {"Fuso hor\u00e1rio do meridiano de Gana", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o de Gana", "GHST"}; - String GAMBIER[] = new String[] {"Fuso hor\u00e1rio de Gambier", "GAMT", -@@ -157,8 +157,8 @@ - "Hor\u00e1rio de luz natural de Pitcairn", "PDT"}; - String PKT[] = new String[] {"Fuso hor\u00e1rio do Paquist\u00e3o", "PKT", - "Fuso hor\u00e1rio de ver\u00e3o do Paquist\u00e3o", "PKST"}; -- String PONT[] = new String[] {"Fuso hor\u00e1rio de Pohnpei", "PONT", -- "Fuso hor\u00e1rio de ver\u00e3o de Pohnpei", "PONST"}; -+ String PONT[] = new String[] {"Fuso Hor\u00E1rio de Pohnpei", "PONT", -+ "Fuso Hor\u00E1rio de Ver\u00E3o de Pohnpei", "PONST"}; - String PST[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o do Pac\u00edfico", "PST", - "Hor\u00e1rio de luz natural do Pac\u00edfico", "PDT"}; - String SAMOA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o de Samoa", "SST", -@@ -171,20 +171,20 @@ - "Fuso hor\u00e1rio de ver\u00e1 de Cingapura", "SGST"}; - String SLST[] = new String[] {"Fuso hor\u00e1rio do meridiano de Greenwich", "GMT", - "Fuso hor\u00e1rio de ver\u00e3o de Serra Leoa", "SLST"}; -- String TASMANIA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Tasm\u00e2nia)", "EST", -- "Fuso hor\u00e1rio de ver\u00e3o oriental (Tasm\u00e2nia)", "EST"}; -+ String TASMANIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Tasm\u00E2nia)", "EST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Tasm\u00E2nia)", "EST"}; - String TMT[] = new String[] {"Fuso hor\u00e1rio do Turcomenist\u00e3o", "TMT", - "Fuso hor\u00e1rio de ver\u00e3o do Turcomenist\u00e3o", "TMST"}; -- String TRUT[] = new String[] {"Fuso hor\u00e1rio de Chuuk", "CHUT", -- "Fuso hor\u00e1rio de ver\u00e3o de Chuuk", "CHUST"}; -+ String TRUT[] = new String[] {"Fuso Hor\u00E1rio de Chuuk", "CHUT", -+ "Fuso Hor\u00E1rio de Ver\u00E3o de Chuuk", "CHUST"}; - String ULAT[]= new String[] {"Fuso hor\u00e1rio de Ulan Bator", "ULAT", - "Fuso hor\u00e1rio de ver\u00e3o de Ulan Bator", "ULAST"}; - String UTC[] = new String[] {"Tempo universal coordenado", "UTC", - "Tempo universal coordenado", "UTC"}; - String UZT[] = new String[] {"Fuso hor\u00e1rio do Uzbequist\u00e3o", "UZT", - "Fuso hor\u00e1rio de ver\u00e3o do Uzbequist\u00e3o", "UZST"}; -- String VICTORIA[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o oriental (Victoria)", "EST", -- "Fuso hor\u00e1rio de ver\u00e3o oriental (Victoria)", "EST"}; -+ String VICTORIA[] = new String[] {"Hor\u00E1rio-Padr\u00E3o do Leste (Victoria)", "EST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Oriental (Victoria)", "EST"}; - String VLAT[] = new String[] {"Fuso hor\u00e1rio de Vladivostok", "VLAT", - "Fuso hor\u00e1rio de ver\u00e3o de Vladivostok", "VLAST"}; - String WART[] = new String[] {"Fuso hor\u00e1rio da Argentina Ocidental", "WART", ++ String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST", ++ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST"}; ++ String FET[] = new String[] {"\u6771\u6B50\u5167\u9678\u6642\u9593", "FET", ++ "\u6771\u6B50\u5167\u9678\u590F\u4EE4\u6642\u9593", "FEST"}; + String GHMT[] = new String[] {"\u8fe6\u7d0d\u5e73\u5747\u6642\u9593", "GMT", + "\u8fe6\u7d0d\u590f\u4ee4\u6642\u9593", "GHST"}; + String GAMBIER[] = new String[] {"\u7518\u6bd4\u723e\u6642\u9593", "GAMT", +@@ -159,8 +159,8 @@ + "\u76ae\u7279\u5eb7\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"}; + String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u6642\u9593", "PKT", + "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u6642\u9593", "PKST"}; +- String PONT[] = new String[] {"Pohnpei Time", "PONT", +- "Pohnpei Summer Time", "PONST"}; ++ String PONT[] = new String[] {"\u6CE2\u7D0D\u4F69\u6642\u9593", "PONT", ++ "\u6CE2\u7D0D\u4F69\u590F\u4EE4\u6642\u9593", "PONST"}; + String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642\u9593", "PST", + "\u592a\u5e73\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"}; + String SAMOA[] = new String[] {"\u85a9\u6469\u4e9e\u6a19\u6e96\u6642\u9593", "SST", +@@ -173,8 +173,8 @@ + "\u65b0\u52a0\u5761\u590f\u4ee4\u6642\u9593", "SGST"}; + String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", + "\u7345\u5b50\u5c71\u590f\u4ee4\u6642\u9593", "SLST"}; +- String TASMANIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u5854\u65af\u6885\u5c3c\u4e9e\u5cf6)", "EST", +- "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u5854\u65af\u6885\u5c3c\u4e9e\u5cf6)", "EST"}; ++ String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST", ++ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST"}; + String TMT[] = new String[] {"\u571f\u5eab\u66fc\u6642\u9593", "TMT", + "\u571f\u5eab\u66fc\u590f\u4ee4\u6642\u9593", "TMST"}; + String ULAT[]= new String[] {"\u5eab\u502b\u6642\u9593", "ULAT", +@@ -183,8 +183,8 @@ + "\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC"}; + String UZT[] = new String[] {"\u70cf\u8332\u5225\u514b\u65af\u5766\u6642\u9593", "UZT", + "\u70cf\u8332\u5225\u514b\u65af\u5766\u590f\u4ee4\u6642\u9593", "UZST"}; +- String VICTORIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u7dad\u591a\u5229\u4e9e\u90a6)", "EST", +- "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u7dad\u591a\u5229\u4e9e\u90a6)", "EST"}; ++ String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST", ++ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST"}; + String VLAT[] = new String[] {"\u6d77\u53c3\u5d34\u6642\u9593", "VLAT", + "\u6d77\u53c3\u5d34\u590f\u4ee4\u6642\u9593", "VLAST"}; + String WART[] = new String[] {"\u897f\u963f\u6839\u5ef7\u6642\u9593", "WART", @@ -193,10 +193,10 @@ - "Fuso hor\u00e1rio de ver\u00e3o da \u00c1frica Ocidental", "WAST"}; - String WET[] = new String[] {"Fuso hor\u00e1rio da Europa Ocidental", "WET", - "Fuso hor\u00e1rio de ver\u00e3o da Europa Ocidental", "WEST"}; -- String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIT", -+ String WIT[] = new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Ocidental", "WIB", - "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Ocidental", "WIST"}; -- String WST_AUS[] = new String[] {"Fuso hor\u00e1rio padr\u00e3o ocidental (Austr\u00e1lia)", "WST", -- "Fuso hor\u00e1rio de ver\u00e3o ocidental (Austr\u00e1lia)", "WST"}; -+ String WST_AUS[] = new String[] {"Hor\u00E1rio-Padr\u00E3o Ocidental (Austr\u00E1lia)", "WST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental (Austr\u00E1lia)", "WST"}; - String WST_SAMOA[] = new String[] {"Fuso hor\u00e1rio de Samoa Ocidental", "WST", - "Fuso hor\u00e1rio de ver\u00e3o de Samoa Ocidental", "WSDT"}; - String YAKT[] = new String[] {"Fuso hor\u00e1rio de Yakutsk", "YAKT", + "\u897f\u975e\u590f\u4ee4\u6642\u9593", "WAST"}; + String WET[] = new String[] {"\u897f\u6b50\u6642\u9593", "WET", + "\u897f\u6b50\u590f\u4ee4\u6642\u9593", "WEST"}; +- String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIT", ++ String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIB", + "\u897f\u5370\u5c3c\u590f\u4ee4\u6642\u9593", "WIST"}; +- String WST_AUS[] = new String[] {"\u897f\u65b9\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "WST", +- "\u897f\u65b9\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "WST"}; ++ String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST", ++ "\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST"}; + String WST_SAMOA[] = new String[] {"\u897f\u85a9\u6469\u4e9e\u6642\u9593", "WST", + "\u897f\u85a9\u6469\u4e9e\u590f\u4ee4\u6642\u9593", "WSDT"}; + String YAKT[] = new String[] {"\u4e9e\u5eab\u6b21\u514b\u6642\u9593", "YAKT", @@ -291,7 +291,7 @@ {"Africa/Porto-Novo", WAT}, {"Africa/Sao_Tome", GMT}, @@ -43089,13 +73686,13 @@ {"America/Merida", CST}, - {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", - "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"Hor\u00E1rio Padr\u00E3o de Metlakatla", "MeST", -+ "Hor\u00E1rio de Luz Natural de Metlakatla", "MeDT"}}, ++ {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6A19\u6E96\u6642\u9593", "MeST", ++ "\u6885\u7279\u62C9\u5361\u7279\u62C9\u65E5\u5149\u7BC0\u7D04\u6642\u9593", "MeDT"}}, {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"Fuso hor\u00e1rio padr\u00e3o de S\u00e3o Pedro e Miquelon", "PMST", - "Hor\u00e1rio de luz natural de S\u00e3o Pedro e Miquelon", "PMDT"}}, + {"America/Miquelon", new String[] {"\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u6a19\u6e96\u6642\u9593", "PMST", + "\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PMDT"}}, @@ -426,7 +426,7 @@ - "Fuso hor\u00e1rio de ver\u00e3o do Suriname", "SRST"}}, + "\u8607\u5229\u5357\u590f\u4ee4\u6642\u9593", "SRST"}}, {"America/Port-au-Prince", EST}, {"America/Port_of_Spain", AST}, - {"America/Porto_Acre", AMT}, @@ -43113,57 +73710,66 @@ {"America/Santa_Isabel", PST}, {"America/Santarem", BRT}, @@ -466,8 +466,8 @@ - "Fuso hor\u00e1rio de ver\u00e3o de Davis", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Fuso hor\u00e1rio de Dumont-d'Urville", "DDUT", - "Fuso hor\u00e1rio de ver\u00e3o de Dumont-d'Urville", "DDUST"}}, + "\u81fa\u7dad\u65af\u590f\u4ee4\u6642\u9593", "DAVST"}}, + {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u6642\u9593", "DDUT", + "Dumont-d'Urville \u590f\u4ee4\u6642\u9593", "DDUST"}}, - {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", - "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"Fuso Hor\u00E1rio da Ilha de Macquarie", "MIST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o da Ilha de Macquarie", "MIST"}}, - {"Antarctica/Mawson", new String[] {"Fuso hor\u00e1rio de Mawson", "MAWT", - "Fuso hor\u00e1rio de ver\u00e3o de Mawson", "MAWST"}}, - {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "Fuso hor\u00e1rio de ver\u00e3o de Irkutsk", "IRKST"}}, - {"Asia/Istanbul", EET}, - {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "EIT", -+ {"Asia/Jayapura", new String[] {"Fuso hor\u00e1rio da Indon\u00e9sia Oriental", "WIT", - "Fuso hor\u00e1rio de ver\u00e3o da Indon\u00e9sia Oriental", "EIST"}}, - {"Asia/Kabul", new String[] {"Fuso hor\u00e1rio do Afeganist\u00e3o", "AFT", - "Fuso hor\u00e1rio de ver\u00e3o do Afeganist\u00e3o", "AFST"}}, -@@ -537,7 +537,8 @@ ++ {"Antarctica/Macquarie", new String[] {"\u9EA5\u5938\u5229\u5CF6\u6642\u9593", "MIST", ++ "\u9EA5\u5938\u5229\u5CF6\u590F\u4EE4\u6642\u9593", "MIST"}}, + {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u6642\u9593", "MAWT", + "\u83ab\u68ee\u590f\u4ee4\u6642\u9593", "MAWST"}}, + {"Antarctica/McMurdo", NZST}, +@@ -477,6 +477,8 @@ + {"Antarctica/South_Pole", NZST}, + {"Antarctica/Syowa", new String[] {"\u5915\u6b50\u74e6 (Syowa) \u6642\u9593", "SYOT", + "\u5915\u6b50\u74e6 (Syowa) \u590f\u4ee4\u6642\u9593", "SYOST"}}, ++ {"Antarctica/Troll", new String[] {"\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC", ++ "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "CEST"}}, + {"Antarctica/Vostok", new String[] {"\u4f5b\u65af\u6258 (Vostok) \u6642\u9593", "VOST", + "\u4f5b\u65af\u6258 (Vostok) \u590f\u4ee4\u6642\u9593", "VOSST"}}, + {"Arctic/Longyearbyen", CET}, +@@ -527,7 +529,7 @@ + "Irkutsk \u590f\u4ee4\u6642\u9593", "IRKST"}}, + {"Asia/Istanbul", EET}, + {"Asia/Jakarta", WIT}, +- {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "EIT", ++ {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WIT", + "\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u65e5\u6642\u9593", "EIST"}}, + {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u6642\u9593", "AFT", + "\u963f\u5bcc\u6c57\u590f\u4ee4\u6642\u9593", "AFST"}}, +@@ -537,7 +539,8 @@ {"Asia/Kashgar", CTT}, {"Asia/Kathmandu", NPT}, {"Asia/Katmandu", NPT}, - {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Hor\u00E1rio de Khandyga", "YAKT", -+ "Hor\u00E1rio de Ver\u00E3o de Khandyga", "YAKST"}}, ++ {"Asia/Khandyga", new String[] {"\u6F22\u5730\u52A0 (Khandyga) \u6642\u9593", "YAKT", ++ "\u6F22\u5730\u52A0 (Khandyga) \u590F\u4EE4\u6642\u9593", "YAKST"}}, {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Fuso hor\u00e1rio de Krasnoyarsk", "KRAT", - "Fuso hor\u00e1rio de ver\u00e3o de Krasnoyarsk", "KRAST"}}, -@@ -586,7 +587,8 @@ + {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u6642\u9593", "KRAT", + "\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u590f\u4ee4\u6642\u9593", "KRAST"}}, +@@ -587,7 +590,8 @@ {"Asia/Ulaanbaatar", ULAT}, {"Asia/Ulan_Bator", ULAT}, {"Asia/Urumqi", CTT}, - {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Hor\u00E1rio de Ust-Nera", "VLAT", -+ "Hor\u00E1rio de Ver\u00E3o de Ust-Nera", "VLAST"}}, ++ {"Asia/Ust-Nera", new String[] {"\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u6642\u9593", "VLAT", ++ "\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u590F\u4EE4\u6642\u9593", "VLAST"}}, {"Asia/Vientiane", ICT}, {"Asia/Vladivostok", VLAT}, {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ +@@ -617,8 +621,8 @@ {"Australia/Canberra", EST_NSW}, {"Australia/Currie", EST_NSW}, {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"Fuso hor\u00e1rio ocidental central (Austr\u00e1lia)", "CWST", -- "Fuso hor\u00e1rio de ver\u00e3o ocidental central (Austr\u00e1lia)", "CWST"}}, -+ {"Australia/Eucla", new String[] {"Fuso Hor\u00E1rio Ocidental Central (Austr\u00E1lia)", "CWST", -+ "Fuso Hor\u00E1rio de Ver\u00E3o Ocidental Central (Austr\u00E1lia)", "CWST"}}, +- {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "CWST", +- "\u4e2d\u897f\u90e8\u65e5\u5149\u7bc0\u7d04\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "CWST"}}, ++ {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST", ++ "\u4E2D\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST"}}, {"Australia/Hobart", TASMANIA}, {"Australia/LHI", LORD_HOWE}, {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ +@@ -636,7 +640,7 @@ {"Australia/Yancowinna", BROKEN_HILL}, {"BET", BRT}, {"BST", BDT}, @@ -43172,13463 +73778,26986 @@ {"Brazil/DeNoronha", NORONHA}, {"Brazil/East", BRT}, {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ +@@ -706,7 +710,7 @@ + "\u6c99\u99ac\u62c9\u590f\u4ee4\u6642\u9593", "SAMST"}}, + {"Europe/San_Marino", CET}, + {"Europe/Sarajevo", CET}, +- {"Europe/Simferopol", EET}, ++ {"Europe/Simferopol", MSK}, + {"Europe/Skopje", CET}, + {"Europe/Sofia", EET}, + {"Europe/Stockholm", CET}, +@@ -754,7 +758,7 @@ {"Jamaica", EST}, {"Japan", JST}, {"Kwajalein", MHT}, - {"Libya", CET}, + {"Libya", EET}, - {"MET", new String[] {"Fuso hor\u00e1rio da Europa M\u00e9dia", "MET", - "Fuso hor\u00e1rio de ver\u00e3o da Europa M\u00e9dia", "MEST"}}, + {"MET", new String[] {"\u4e2d\u6b50\u6642\u9593", "MET", + "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "MEST"}}, {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java 2014-04-20 12:39:21.000000000 -0700 +--- ./jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2013-09-06 11:28:55.000000000 -0700 ++++ ./jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2014-06-06 19:56:34.000000000 -0700 +@@ -38,6 +38,7 @@ + # gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] + # gnumake JDK= OSNAME=linux [OPT=true] + # gnumake JDK= OSNAME=win32 [OPT=true] ++# gnumake JDK= OSNAME=bsd [OPT=true] + # + ######################################################################## + +@@ -120,6 +121,29 @@ + LINK_SHARED=link -dll -out:$@ + endif + ++# BSD GNU C Compiler ++ifeq ($(OSNAME), bsd) ++ # GNU Compiler options needed to build it ++ COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer ++ # Options that help find errors ++ COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses ++ ifeq ($(OPT), true) ++ CFLAGS=-O2 $(COMMON_FLAGS) ++ else ++ CFLAGS=-g $(COMMON_FLAGS) ++ endif ++ # Object files needed to create library ++ OBJECTS=$(SOURCES:%.c=%.o) ++ # Library name and options needed to build it ++ # XXX: Needs to be fixed for MacOS X ++ LIBRARY=lib$(LIBNAME).so ++ LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text ++ # Libraries we are dependent on ++ LIBRARIES=-lc ++ # Building a shared library ++ LINK_SHARED=$(LINK.c) -shared -o $@ ++endif ++ + # Common -I options + CFLAGS += -I. + CFLAGS += -I../agent_util +--- ./jdk/src/share/demo/jvmti/hprof/hprof_class.c 2013-09-06 11:28:55.000000000 -0700 ++++ ./jdk/src/share/demo/jvmti/hprof/hprof_class.c 2013-12-01 11:14:27.000000000 -0800 +@@ -527,7 +527,12 @@ + jmethodID method; + + info = get_info(index); +- HPROF_ASSERT(mnum < info->method_count); ++ if (mnum >= info->method_count) { ++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); ++ (*env)->ThrowNew(env, newExcCls, "Illegal mnum"); ++ ++ return NULL; ++ } + method = info->method[mnum].method_id; + if ( method == NULL ) { + char * name; +@@ -535,7 +540,12 @@ + jclass clazz; + + name = (char *)string_get(info->method[mnum].name_index); +- HPROF_ASSERT(name!=NULL); ++ if (name==NULL) { ++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); ++ (*env)->ThrowNew(env, newExcCls, "Name not found"); ++ ++ return NULL; ++ } + sig = (char *)string_get(info->method[mnum].sig_index); + HPROF_ASSERT(sig!=NULL); + clazz = class_get_class(env, index); +--- ./jdk/src/share/demo/jvmti/hprof/hprof_event.c 2013-09-06 11:28:55.000000000 -0700 ++++ ./jdk/src/share/demo/jvmti/hprof/hprof_event.c 2013-12-01 11:14:27.000000000 -0800 +@@ -195,7 +195,12 @@ + + HPROF_ASSERT(env!=NULL); + HPROF_ASSERT(thread!=NULL); +- HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum); ++ if (cnum == 0 || cnum == gdata->tracker_cnum) { ++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); ++ (*env)->ThrowNew(env, newExcCls, "Illegal cnum."); ++ ++ return; ++ } + + /* Prevent recursion into any BCI function for this thread (pstatus). */ + if ( tls_get_tracker_status(env, thread, JNI_FALSE, +@@ -204,8 +209,10 @@ + + (*pstatus) = 1; + method = class_get_methodID(env, cnum, mnum); +- HPROF_ASSERT(method!=NULL); +- tls_push_method(tls_index, method); ++ if (method != NULL) { ++ tls_push_method(tls_index, method); ++ } ++ + (*pstatus) = 0; + } + } +@@ -248,7 +255,13 @@ + + HPROF_ASSERT(env!=NULL); + HPROF_ASSERT(thread!=NULL); +- HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum); ++ ++ if (cnum == 0 || cnum == gdata->tracker_cnum) { ++ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); ++ (*env)->ThrowNew(env, newExcCls, "Illegal cnum."); ++ ++ return; ++ } + + /* Prevent recursion into any BCI function for this thread (pstatus). */ + if ( tls_get_tracker_status(env, thread, JNI_FALSE, +@@ -257,8 +270,10 @@ + + (*pstatus) = 1; + method = class_get_methodID(env, cnum, mnum); +- HPROF_ASSERT(method!=NULL); +- tls_pop_method(tls_index, thread, method); ++ if (method != NULL) { ++ tls_pop_method(tls_index, thread, method); ++ } ++ + (*pstatus) = 0; + } + } +--- ./jdk/src/share/demo/jvmti/hprof/hprof_init.c 2013-09-06 11:28:55.000000000 -0700 ++++ ./jdk/src/share/demo/jvmti/hprof/hprof_init.c 2014-06-06 19:56:31.000000000 -0700 +@@ -1899,11 +1899,17 @@ + */ + getSystemProperty("sun.boot.library.path", &boot_path); + md_build_library_name(lname, FILENAME_MAX, boot_path, name); ++ if ( strlen(lname) == 0 ) { ++ HPROF_ERROR(JNI_TRUE, "Could not find library"); ++ } + jvmtiDeallocate(boot_path); + handle = md_load_library(lname, err_buf, (int)sizeof(err_buf)); + if ( handle == NULL ) { + /* This may be necessary on Windows. */ + md_build_library_name(lname, FILENAME_MAX, "", name); ++ if ( strlen(lname) == 0 ) { ++ HPROF_ERROR(JNI_TRUE, "Could not find library"); ++ } + handle = md_load_library(lname, err_buf, (int)sizeof(err_buf)); + if ( handle == NULL ) { + HPROF_ERROR(JNI_TRUE, err_buf); +@@ -1968,6 +1974,9 @@ + getSystemProperty("sun.boot.library.path", &boot_path); + /* Load in NPT library for character conversions */ + md_build_library_name(npt_lib, sizeof(npt_lib), boot_path, NPT_LIBNAME); ++ if ( strlen(npt_lib) == 0 ) { ++ HPROF_ERROR(JNI_TRUE, "Could not find npt library"); ++ } + jvmtiDeallocate(boot_path); + NPT_INITIALIZE(npt_lib, &(gdata->npt), NPT_VERSION, NULL); + if ( gdata->npt == NULL ) { +--- ./jdk/src/share/demo/jvmti/hprof/hprof_md.h 2013-09-06 11:28:55.000000000 -0700 ++++ ./jdk/src/share/demo/jvmti/hprof/hprof_md.h 2014-06-06 19:56:31.000000000 -0700 +@@ -69,7 +69,7 @@ + unsigned md_ntohs(unsigned short s); + unsigned md_ntohl(unsigned l); + +-void md_build_library_name(char *holder, int holderlen, char *pname, char *fname); ++void md_build_library_name(char *holder, int holderlen, const char *pname, const char *fname); + void * md_load_library(const char *name, char *err_buf, int err_buflen); + void md_unload_library(void *handle); + void * md_find_library_entry(void *handle, const char *name); +--- ./jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013 Oracle and/or its affiliates. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +@@ -54,7 +54,7 @@ + * jconsole's script console. + */ + +-class ScriptShellPanel extends JPanel { ++public class ScriptShellPanel extends JPanel { + + private static final long serialVersionUID = 4116273141148726319L; + +--- ./jdk/src/share/lib/security/java.policy 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/lib/security/java.policy 2014-01-18 12:16:29.000000000 -0800 +@@ -2,48 +2,51 @@ + // Standard extensions get all permissions by default + + grant codeBase "file:${{java.ext.dirs}}/*" { +- permission java.security.AllPermission; ++ permission java.security.AllPermission; + }; + + // default permissions granted to all domains + +-grant { +- // Allows any thread to stop itself using the java.lang.Thread.stop() +- // method that takes no argument. +- // Note that this permission is granted by default only to remain +- // backwards compatible. +- // It is strongly recommended that you either remove this permission +- // from this policy file or further restrict it to code sources +- // that you specify, because Thread.stop() is potentially unsafe. +- // See the API specification of java.lang.Thread.stop() for more ++grant { ++ // Allows any thread to stop itself using the java.lang.Thread.stop() ++ // method that takes no argument. ++ // Note that this permission is granted by default only to remain ++ // backwards compatible. ++ // It is strongly recommended that you either remove this permission ++ // from this policy file or further restrict it to code sources ++ // that you specify, because Thread.stop() is potentially unsafe. ++ // See the API specification of java.lang.Thread.stop() for more + // information. +- permission java.lang.RuntimePermission "stopThread"; ++ permission java.lang.RuntimePermission "stopThread"; + +- // allows anyone to listen on un-privileged ports +- permission java.net.SocketPermission "localhost:1024-", "listen"; ++ // allows anyone to listen on dynamic ports ++ permission java.net.SocketPermission "localhost:0", "listen"; + +- // "standard" properies that can be read by anyone ++ // permission for standard RMI registry port ++ permission java.net.SocketPermission "localhost:1099", "listen"; + +- permission java.util.PropertyPermission "java.version", "read"; +- permission java.util.PropertyPermission "java.vendor", "read"; +- permission java.util.PropertyPermission "java.vendor.url", "read"; +- permission java.util.PropertyPermission "java.class.version", "read"; +- permission java.util.PropertyPermission "os.name", "read"; +- permission java.util.PropertyPermission "os.version", "read"; +- permission java.util.PropertyPermission "os.arch", "read"; +- permission java.util.PropertyPermission "file.separator", "read"; +- permission java.util.PropertyPermission "path.separator", "read"; +- permission java.util.PropertyPermission "line.separator", "read"; +- +- permission java.util.PropertyPermission "java.specification.version", "read"; +- permission java.util.PropertyPermission "java.specification.vendor", "read"; +- permission java.util.PropertyPermission "java.specification.name", "read"; +- +- permission java.util.PropertyPermission "java.vm.specification.version", "read"; +- permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; +- permission java.util.PropertyPermission "java.vm.specification.name", "read"; +- permission java.util.PropertyPermission "java.vm.version", "read"; +- permission java.util.PropertyPermission "java.vm.vendor", "read"; +- permission java.util.PropertyPermission "java.vm.name", "read"; ++ // "standard" properies that can be read by anyone ++ ++ permission java.util.PropertyPermission "java.version", "read"; ++ permission java.util.PropertyPermission "java.vendor", "read"; ++ permission java.util.PropertyPermission "java.vendor.url", "read"; ++ permission java.util.PropertyPermission "java.class.version", "read"; ++ permission java.util.PropertyPermission "os.name", "read"; ++ permission java.util.PropertyPermission "os.version", "read"; ++ permission java.util.PropertyPermission "os.arch", "read"; ++ permission java.util.PropertyPermission "file.separator", "read"; ++ permission java.util.PropertyPermission "path.separator", "read"; ++ permission java.util.PropertyPermission "line.separator", "read"; ++ ++ permission java.util.PropertyPermission "java.specification.version", "read"; ++ permission java.util.PropertyPermission "java.specification.vendor", "read"; ++ permission java.util.PropertyPermission "java.specification.name", "read"; ++ ++ permission java.util.PropertyPermission "java.vm.specification.version", "read"; ++ permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; ++ permission java.util.PropertyPermission "java.vm.specification.name", "read"; ++ permission java.util.PropertyPermission "java.vm.version", "read"; ++ permission java.util.PropertyPermission "java.vm.vendor", "read"; ++ permission java.util.PropertyPermission "java.vm.name", "read"; + }; + +--- ./jdk/src/share/lib/security/java.security-linux 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/lib/security/java.security-linux 2014-06-06 19:56:31.000000000 -0700 +@@ -128,7 +128,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -165,7 +168,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -423,4 +429,3 @@ + # + # Example: + # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 +- +--- ./jdk/src/share/lib/security/java.security-macosx 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/lib/security/java.security-macosx 2014-06-06 19:56:31.000000000 -0700 +@@ -129,7 +129,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -168,7 +171,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -428,4 +434,3 @@ + # + # Example: + # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 +- +--- ./jdk/src/share/lib/security/java.security-solaris 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/lib/security/java.security-solaris 2014-06-06 19:56:31.000000000 -0700 +@@ -130,7 +130,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -168,7 +171,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -427,4 +433,3 @@ + # + # Example: + # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 +-i +--- ./jdk/src/share/lib/security/java.security-windows 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/lib/security/java.security-windows 2014-06-06 19:56:31.000000000 -0700 +@@ -129,7 +129,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -168,7 +171,10 @@ + com.sun.imageio.,\ + com.sun.istack.internal.,\ + com.sun.jmx.,\ ++ com.sun.naming.internal.,\ + com.sun.proxy.,\ ++ com.sun.corba.se.,\ ++ com.sun.script.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ +@@ -428,4 +434,3 @@ + # + # Example: + # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 +- +--- ./jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp 2014-04-19 01:27:15.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -4780,39 +4780,7 @@ + } else if (log_file[0] != '\0' && (errstrm = fopen(log_file,"a+")) != NULL) { + return; + } else { +- char log_file_name[PATH_MAX+100]; +- char tmpdir[PATH_MAX]; +-#ifdef WIN32 +- int n = GetTempPath(PATH_MAX,tmpdir); //API returns with trailing '\' +- if (n < 1 || n > PATH_MAX) { +- sprintf(tmpdir,"C:\\"); +- } +- sprintf(log_file_name, "%sunpack.log", tmpdir); +-#else +- sprintf(tmpdir,"/tmp"); +- sprintf(log_file_name, "/tmp/unpack.log"); +-#endif +- if ((errstrm = fopen(log_file_name, "a+")) != NULL) { +- log_file = errstrm_name = saveStr(log_file_name); +- return ; +- } +- +- char *tname = tempnam(tmpdir,"#upkg"); +- if (tname == NULL) return; +- sprintf(log_file_name, "%s", tname); +- ::free(tname); +- if ((errstrm = fopen(log_file_name, "a+")) != NULL) { +- log_file = errstrm_name = saveStr(log_file_name); +- return ; +- } +-#ifndef WIN32 +- sprintf(log_file_name, "/dev/null"); +- // On windows most likely it will fail. +- if ( (errstrm = fopen(log_file_name, "a+")) != NULL) { +- log_file = errstrm_name = saveStr(log_file_name); +- return ; +- } +-#endif ++ fprintf(stderr, "Can not open log file %s\n", log_file); + // Last resort + // (Do not use stdout, since it might be jarout->jarfp.) + errstrm = stderr; +--- ./jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2013-09-06 11:28:57.000000000 -0700 ++++ ./jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -62,7 +62,7 @@ + + #endif // End of ZLIB + +-#ifdef sparc ++#ifdef _BIG_ENDIAN + #define SWAP_BYTES(a) \ + ((((a) << 8) & 0xff00) | 0x00ff) & (((a) >> 8) | 0xff00) + #else +@@ -340,6 +340,10 @@ + struct tm sbuf; + (void)memset((void*)&sbuf,0, sizeof(sbuf)); + struct tm* s = gmtime_r(&t, &sbuf); ++ if (s == NULL) { ++ fprintf(u->errstrm, "Error: gmtime failure, invalid input archive\n"); ++ exit(2); ++ } + modtime_cache = modtime; + dostime_cache = dostime(s->tm_year + 1900, s->tm_mon + 1, s->tm_mday, + s->tm_hour, s->tm_min, s->tm_sec); +@@ -384,7 +388,7 @@ + } + + deflated.empty(); +- zs.next_out = (uchar*) deflated.grow(len + (len/2)); ++ zs.next_out = (uchar*) deflated.grow(add_size(len, (len/2))); + zs.avail_out = (int)deflated.size(); + + zs.next_in = (uchar*)head.ptr; +--- ./jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2014-06-06 19:56:34.000000000 -0700 +@@ -64,7 +64,7 @@ + + + // following is needed for _LP64 +-#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX)) ++#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX)) + #include + #endif + +--- ./jdk/src/share/native/common/check_code.c 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/common/check_code.c 2014-06-06 19:56:34.000000000 -0700 +@@ -90,6 +90,12 @@ + #include "classfile_constants.h" + #include "opcodes.in_out" + ++#ifdef __APPLE__ ++/* use setjmp/longjmp versions that do not save/restore the signal mask */ ++#define setjmp _setjmp ++#define longjmp _longjmp ++#endif ++ + #define MAX_ARRAY_DIMENSIONS 255 + /* align byte code */ + #ifndef ALIGN_UP +--- ./jdk/src/share/native/java/lang/Class.c 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/java/lang/Class.c 2014-06-06 19:56:31.000000000 -0700 +@@ -70,7 +70,7 @@ + {"getProtectionDomain0", "()" PD, (void *)&JVM_GetProtectionDomain}, + {"setProtectionDomain0", "(" PD ")V", (void *)&JVM_SetProtectionDomain}, + {"getDeclaredClasses0", "()[" CLS, (void *)&JVM_GetDeclaredClasses}, +- {"getDeclaringClass", "()" CLS, (void *)&JVM_GetDeclaringClass}, ++ {"getDeclaringClass0", "()" CLS, (void *)&JVM_GetDeclaringClass}, + {"getGenericSignature", "()" STR, (void *)&JVM_GetClassSignature}, + {"getRawAnnotations", "()" BA, (void *)&JVM_GetClassAnnotations}, + {"getConstantPool", "()" CPL, (void *)&JVM_GetClassConstantPool}, +@@ -187,3 +187,16 @@ + + return result; + } ++ ++JNIEXPORT jobject JNICALL ++Java_java_lang_Class_getCheckMemberAccessMethod(JNIEnv *env, jclass cls, jclass smClass) ++{ ++ jmethodID mid; ++ ++ mid = (*env)->GetMethodID(env, smClass, "checkMemberAccess", "(Ljava/lang/Class;I)V"); ++ if (mid == NULL) { ++ return NULL; ++ } ++ return (*env)->ToReflectedMethod(env, smClass, mid, JNI_FALSE); ++} ++ +--- ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2014-06-06 19:56:34.000000000 -0700 +@@ -24,6 +24,9 @@ + * questions. + */ + ++#ifdef __OpenBSD__ ++#include ++#endif + #ifdef _ALLBSD_SOURCE + #include + #elif __linux__ +@@ -32,6 +35,12 @@ + #endif + #include "jfdlibm.h" + ++/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */ ++#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \ ++ _BYTE_ORDER == _BIG_ENDIAN ++#undef _LITTLE_ENDIAN ++#endif ++ + #ifdef __NEWVALID /* special setup for Sun test regime */ + #if defined(i386) || defined(i486) || \ + defined(intel) || defined(x86) || defined(arm) || \ +--- ./jdk/src/share/native/java/lang/ref/Finalizer.c 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/java/lang/ref/Finalizer.c 1969-12-31 16:00:00.000000000 -0800 +@@ -1,42 +0,0 @@ +-/* +- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved. +- * 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. +- */ +- +-#include "jni.h" +-#include "java_lang_ref_Finalizer.h" +- +- +-JNIEXPORT void JNICALL +-Java_java_lang_ref_Finalizer_invokeFinalizeMethod(JNIEnv *env, jclass clazz, +- jobject ob) +-{ +- jclass cls; +- jmethodID mid; +- +- cls = (*env)->GetObjectClass(env, ob); +- if (cls == NULL) return; +- mid = (*env)->GetMethodID(env, cls, "finalize", "()V"); +- if (mid == NULL) return; +- (*env)->CallVoidMethod(env, ob, mid); +-} +--- ./jdk/src/share/native/java/net/Inet6Address.c 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/java/net/Inet6Address.c 2013-12-01 11:14:28.000000000 -0800 +@@ -33,6 +33,8 @@ + */ + + jclass ia6_class; ++jfieldID ia6_holder6ID; ++ + jfieldID ia6_ipaddressID; + jfieldID ia6_scopeidID; + jfieldID ia6_cachedscopeidID; +@@ -48,21 +50,26 @@ + */ + JNIEXPORT void JNICALL + Java_java_net_Inet6Address_init(JNIEnv *env, jclass cls) { ++ jclass ia6h_class; + jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); + CHECK_NULL(c); + ia6_class = (*env)->NewGlobalRef(env, c); + CHECK_NULL(ia6_class); +- ia6_ipaddressID = (*env)->GetFieldID(env, ia6_class, "ipaddress", "[B"); ++ ia6h_class = (*env)->FindClass(env, "java/net/Inet6Address$Inet6AddressHolder"); ++ CHECK_NULL(ia6h_class); ++ ia6_holder6ID = (*env)->GetFieldID(env, ia6_class, "holder6", "Ljava/net/Inet6Address$Inet6AddressHolder;"); ++ CHECK_NULL(ia6_holder6ID); ++ ia6_ipaddressID = (*env)->GetFieldID(env, ia6h_class, "ipaddress", "[B"); + CHECK_NULL(ia6_ipaddressID); +- ia6_scopeidID = (*env)->GetFieldID(env, ia6_class, "scope_id", "I"); ++ ia6_scopeidID = (*env)->GetFieldID(env, ia6h_class, "scope_id", "I"); + CHECK_NULL(ia6_scopeidID); + ia6_cachedscopeidID = (*env)->GetFieldID(env, ia6_class, "cached_scope_id", "I"); + CHECK_NULL(ia6_cachedscopeidID); +- ia6_scopeidsetID = (*env)->GetFieldID(env, ia6_class, "scope_id_set", "Z"); ++ ia6_scopeidsetID = (*env)->GetFieldID(env, ia6h_class, "scope_id_set", "Z"); + CHECK_NULL(ia6_scopeidID); +- ia6_scopeifnameID = (*env)->GetFieldID(env, ia6_class, "scope_ifname", "Ljava/net/NetworkInterface;"); ++ ia6_scopeifnameID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname", "Ljava/net/NetworkInterface;"); + CHECK_NULL(ia6_scopeifnameID); +- ia6_scopeifnamesetID = (*env)->GetFieldID(env, ia6_class, "scope_ifname_set", "Z"); ++ ia6_scopeifnamesetID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname_set", "Z"); + CHECK_NULL(ia6_scopeifnamesetID); + ia6_ctrID = (*env)->GetMethodID(env, ia6_class, "", "()V"); + CHECK_NULL(ia6_ctrID); +--- ./jdk/src/share/native/java/net/net_util.c 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/java/net/net_util.c 2013-12-01 11:14:28.000000000 -0800 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -45,8 +45,8 @@ - protected final Object[][] getContents() { - String ACT[] = new String[] {"Acre, normaltid", "ACT", - "Acre, sommartid", "ACST"}; -- String ADELAIDE[] = new String[] {"Central normaltid (S\u00f6dra Australien)", "CST", -- "Central sommartid (S\u00f6dra Australien)", "CST"}; -+ String ADELAIDE[] = new String[] {"Central standardtid (Sydaustralien)", "CST", -+ "Central sommartid (South Australia)", "CST"}; - String AGT[] = new String[] {"Argentina, normaltid", "ART", - "Argentina, sommartid", "ARST"}; - String AKST[] = new String[] {"Alaska, normaltid", "AKST", -@@ -61,10 +61,10 @@ - "Atlantisk sommartid", "ADT"}; - String BDT[] = new String[] {"Bangladesh, normaltid", "BDT", - "Bangladesh, sommartid", "BDST"}; -- String BRISBANE[] = new String[] {"\u00d6stlig normaltid (Queensland)", "EST", -- "\u00d6stlig sommartid (Queensland)", "EST"}; -- String BROKEN_HILL[] = new String[] {"Central normaltid (S\u00f6dra Australien/Nya Sydwales)", "CST", -- "Central sommartid (S\u00f6dra Australien/Nya Sydwales)", "CST"}; -+ String BRISBANE[] = new String[] {"\u00D6stlig standardtid (Queensland)", "EST", -+ "\u00D6stlig sommartid (Queensland)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"Central standardtid (Sydaustralien)/New South Wales)", "CST", -+ "Central sommartid (South Australia/New South Wales)", "CST"}; - String BRT[] = new String[] {"Brasilien, normaltid", "BRT", - "Brasilien, sommartid", "BRST"}; - String BTT[] = new String[] {"Bhutan, normaltid", "BTT", -@@ -77,9 +77,9 @@ - "Chatham, sommartid", "CHADT"}; - String ChST[] = new String[] {"Chamorro, normaltid", "ChST", - "Chamorro, sommartid", "ChDT"}; -- String CHUT[] = new String[] {"Chuuk Time", "CHUT", -- "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"Centralindonesisk tid", "CIT", -+ String CHUT[] = new String[] {"Chuuk, normaltid", "CHUT", -+ "Chuuk, sommartid", "CHUST"}; -+ String CIT[] = new String[] {"Centralindonesisk tid", "WITA", - "Centralindonesisk sommartid", "CIST"}; - String CLT[] = new String[] {"Chile, normaltid", "CLT", - "Chile, sommartid", "CLST"}; -@@ -89,7 +89,7 @@ - "Kina, sommartid", "CDT"}; - String CUBA[] = new String[] {"Kuba, normaltid", "CST", - "Kuba, sommartid", "CDT"}; -- String DARWIN[] = new String[] {"Central normaltid (Nordterritoriet)", "CST", -+ String DARWIN[] = new String[] {"Central standardtid (Nordterritoriet)", "CST", - "Central sommartid (Nordterritoriet)", "CST"}; - String DUBLIN[] = new String[] {"Greenwichtid", "GMT", - "Irland, sommartid", "IST"}; -@@ -103,10 +103,10 @@ - "\u00d6stgr\u00f6nl\u00e4ndsk sommartid", "EGST"}; - String EST[] = new String[] {"Eastern, normaltid", "EST", - "Eastern, sommartid", "EDT"}; -- String EST_NSW[] = new String[] {"Eastern, normaltid (Nya Sydwales)", "EST", -- "Eastern, sommartid (Nya Sydwales)", "EST"}; -- String FET[] = new String[] {"Further-eastern European Time", "FET", -- "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"\u00D6stlig standardtid (New South Wales)", "EST", -+ "\u00D6stlig sommartid (New South Wales)", "EST"}; -+ String FET[] = new String[] {"Kaliningradtid", "FET", -+ "\u00D6steuropeisk sommartid", "FEST"}; - String GHMT[] = new String[] {"Ghana, normaltid", "GMT", - "Ghana, sommartid", "GHST"}; - String GAMBIER[] = new String[] {"Gambier, normaltid", "GAMT", -@@ -159,8 +159,8 @@ - "Pitcairn, sommartid", "PDT"}; - String PKT[] = new String[] {"Pakistan, normaltid", "PKT", - "Pakistan, sommartid", "PKST"}; -- String PONT[] = new String[] {"Pohnpei Time", "PONT", -- "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"Pohnpei, normaltid", "PONT", -+ "Pohnpei, sommartid", "PONST"}; - String PST[] = new String[] {"Stilla havet, normaltid", "PST", - "Stilla havet, sommartid", "PDT"}; - String SAMOA[] = new String[] {"Samoa, normaltid", "SST", -@@ -173,8 +173,8 @@ - "Singapore, sommartid", "SGST"}; - String SLST[] = new String[] {"Greenwichtid", "GMT", - "Sierra Leone, sommartid", "SLST"}; -- String TASMANIA[] = new String[] {"Eastern, normaltid (Tasmanien)", "EST", -- "Eastern, sommartid (Tasmanien)", "EST"}; -+ String TASMANIA[] = new String[] {"\u00D6stlig standardtid (Tasmania)", "EST", -+ "\u00D6stlig sommartid (Tasmanien)", "EST"}; - String TMT[] = new String[] {"Turkmenistan, normaltid", "TMT", - "Turkmenistan, sommartid", "TMST"}; - String ULAT[]= new String[] {"Ulaanbaatar, normaltid", "ULAT", -@@ -183,8 +183,8 @@ - "Koordinerad universell tid", "UTC"}; - String UZT[] = new String[] {"Uzbekistan, normaltid", "UZT", - "Uzbekistan, sommartid", "UZST"}; -- String VICTORIA[] = new String[] {"\u00d6stlig normaltid (Victoria)", "EST", -- "\u00d6stlig sommartid (Victoria)", "EST"}; -+ String VICTORIA[] = new String[] {"\u00D6stlig standardtid (Victoria)", "EST", -+ "\u00D6stlig sommartid (Victoria)", "EST"}; - String VLAT[] = new String[] {"Vladivostok, normaltid", "VLAT", - "Vladivostok, sommartid", "VLAST"}; - String WART[] = new String[] {"V\u00e4stargentina, normaltid", "WART", -@@ -193,10 +193,10 @@ - "V\u00e4stafrikansk sommartid", "WAST"}; - String WET[] = new String[] {"V\u00e4steuropeisk tid", "WET", - "V\u00e4steuropeisk sommartid", "WEST"}; -- String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIT", -+ String WIT[] = new String[] {"V\u00e4stindonesisk tid", "WIB", - "V\u00e4stindonesisk sommartid", "WIST"}; -- String WST_AUS[] = new String[] {"V\u00e4stlig normaltid (Australien)", "WST", -- "V\u00e4stlig sommartid (Australien)", "WST"}; -+ String WST_AUS[] = new String[] {"Western Standard Time (Australien)", "WST", -+ "V\u00E4stlig sommartid (Australien)", "WST"}; - String WST_SAMOA[] = new String[] {"V\u00e4stsamoansk tid", "WST", - "V\u00e4stsamoansk sommartid", "WSDT"}; - String YAKT[] = new String[] {"Jakutsk, normaltid", "YAKT", -@@ -291,7 +291,7 @@ - {"Africa/Porto-Novo", WAT}, - {"Africa/Sao_Tome", GMT}, - {"Africa/Timbuktu", GMT}, -- {"Africa/Tripoli", CET}, -+ {"Africa/Tripoli", EET}, - {"Africa/Tunis", CET}, - {"Africa/Windhoek", WAT}, - {"America/Adak", HAST}, -@@ -308,7 +308,7 @@ - {"America/Argentina/Rio_Gallegos", AGT}, - {"America/Argentina/Salta", AGT}, - {"America/Argentina/San_Juan", AGT}, -- {"America/Argentina/San_Luis", WART}, -+ {"America/Argentina/San_Luis", AGT}, - {"America/Argentina/Tucuman", AGT}, - {"America/Argentina/Ushuaia", AGT}, - {"America/Aruba", AST}, -@@ -349,7 +349,7 @@ - {"America/Detroit", EST}, - {"America/Dominica", AST}, - {"America/Edmonton", MST}, -- {"America/Eirunepe", AMT}, -+ {"America/Eirunepe", ACT}, - {"America/El_Salvador", CST}, - {"America/Ensenada", PST}, - {"America/Fort_Wayne", EST}, -@@ -401,8 +401,8 @@ - {"America/Mendoza", AGT}, - {"America/Menominee", CST}, - {"America/Merida", CST}, -- {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", -- "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"Metlakatla, normaltid", "MeST", -+ "Metlakatla, sommartid", "MeDT"}}, - {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"Saint-Pierre-et-Miquelon, normaltid", "PMST", - "Saint-Pierre-et-Miquelon, sommartid", "PMDT"}}, -@@ -426,7 +426,7 @@ - "Surinam, sommartid", "SRST"}}, - {"America/Port-au-Prince", EST}, - {"America/Port_of_Spain", AST}, -- {"America/Porto_Acre", AMT}, -+ {"America/Porto_Acre", ACT}, - {"America/Porto_Velho", AMT}, - {"America/Puerto_Rico", AST}, - {"America/Rainy_River", CST}, -@@ -434,7 +434,7 @@ - {"America/Recife", BRT}, - {"America/Regina", CST}, - {"America/Resolute", CST}, -- {"America/Rio_Branco", AMT}, -+ {"America/Rio_Branco", ACT}, - {"America/Rosario", AGT}, - {"America/Santa_Isabel", PST}, - {"America/Santarem", BRT}, -@@ -466,8 +466,8 @@ - "Davis, sommartid", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville, normaltid", "DDUT", - "Dumont-d'Urville, sommartid", "DDUST"}}, -- {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", -- "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"Macquarie\u00F6n, normaltid", "MIST", -+ "Macquarie\u00F6n, sommartid", "MIST"}}, - {"Antarctica/Mawson", new String[] {"Mawson, normaltid", "MAWT", - "Mawson, sommartid", "MAWST"}}, - {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "Irkutsk, sommartid", "IRKST"}}, - {"Asia/Istanbul", EET}, - {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "EIT", -+ {"Asia/Jayapura", new String[] {"\u00d6stindonesisk tid", "WIT", - "\u00d6stindonesisk sommartid", "EIST"}}, - {"Asia/Kabul", new String[] {"Afghanistan, normaltid", "AFT", - "Afghanistan, sommartid", "AFST"}}, -@@ -537,7 +537,8 @@ - {"Asia/Kashgar", CTT}, - {"Asia/Kathmandu", NPT}, - {"Asia/Katmandu", NPT}, -- {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"Khandyga, normaltid", "YAKT", -+ "Khandyga, sommartid", "YAKST"}}, - {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"Krasnojarsk, normaltid", "KRAT", - "Krasnojarsk, sommartid", "KRAST"}}, -@@ -586,7 +587,8 @@ - {"Asia/Ulaanbaatar", ULAT}, - {"Asia/Ulan_Bator", ULAT}, - {"Asia/Urumqi", CTT}, -- {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"Ust-Nera, normaltid", "VLAT", -+ "Ust-Nera, sommartid", "VLAST"}}, - {"Asia/Vientiane", ICT}, - {"Asia/Vladivostok", VLAT}, - {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ - {"Australia/Canberra", EST_NSW}, - {"Australia/Currie", EST_NSW}, - {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"Central v\u00e4stlig normaltid (Australien)", "CWST", -- "Central v\u00e4stlig sommartid (Australien)", "CWST"}}, -+ {"Australia/Eucla", new String[] {"Central v\u00E4stlig normaltid (Australien)", "CWST", -+ "Central v\u00E4stlig sommartid (Australien)", "CWST"}}, - {"Australia/Hobart", TASMANIA}, - {"Australia/LHI", LORD_HOWE}, - {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ - {"Australia/Yancowinna", BROKEN_HILL}, - {"BET", BRT}, - {"BST", BDT}, -- {"Brazil/Acre", AMT}, -+ {"Brazil/Acre", ACT}, - {"Brazil/DeNoronha", NORONHA}, - {"Brazil/East", BRT}, - {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ - {"Jamaica", EST}, - {"Japan", JST}, - {"Kwajalein", MHT}, -- {"Libya", CET}, -+ {"Libya", EET}, - {"MET", new String[] {"Mellaneuropeisk tid", "MET", - "Mellaneuropeisk sommartid", "MEST"}}, - {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java 2014-04-20 12:39:21.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +@@ -94,6 +94,111 @@ + extern jfieldID iac_addressID; + extern jfieldID iac_familyID; + ++/** ++ * set_ methods return JNI_TRUE on success JNI_FALSE on error ++ * get_ methods that return +ve int return -1 on error ++ * get_ methods that return objects return NULL on error. ++ */ ++jobject getInet6Address_scopeifname(JNIEnv *env, jobject iaObj) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, NULL); ++ return (*env)->GetObjectField(env, holder, ia6_scopeifnameID); ++} ++ ++int setInet6Address_scopeifname(JNIEnv *env, jobject iaObj, jobject scopeifname) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, JNI_FALSE); ++ (*env)->SetObjectField(env, holder, ia6_scopeifnameID, scopeifname); ++ return JNI_TRUE; ++} ++ ++int getInet6Address_scopeifname_set(JNIEnv *env, jobject iaObj) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, -1); ++ return (*env)->GetBooleanField(env, holder, ia6_scopeifnamesetID); ++} ++ ++int setInet6Address_scopeifname_set(JNIEnv *env, jobject iaObj, int scopeifname_set) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, JNI_FALSE); ++ (*env)->SetBooleanField(env, holder, ia6_scopeifnamesetID, scopeifname_set); ++ return JNI_TRUE; ++} ++ ++int getInet6Address_scopeid_set(JNIEnv *env, jobject iaObj) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, -1); ++ return (*env)->GetBooleanField(env, holder, ia6_scopeidsetID); ++} ++ ++int getInet6Address_scopeid(JNIEnv *env, jobject iaObj) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, -1); ++ return (*env)->GetIntField(env, holder, ia6_scopeidID); ++} ++ ++int setInet6Address_scopeid(JNIEnv *env, jobject iaObj, int scopeid) { ++ jobject holder; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, JNI_FALSE); ++ (*env)->SetIntField(env, holder, ia6_scopeidID, scopeid); ++ if (scopeid > 0) { ++ (*env)->SetBooleanField(env, holder, ia6_scopeidsetID, JNI_TRUE); ++ } ++ return JNI_TRUE; ++} ++ ++ ++int getInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *dest) { ++ jobject holder, addr; ++ jbyteArray barr; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, JNI_FALSE); ++ addr = (*env)->GetObjectField(env, holder, ia6_ipaddressID); ++ CHECK_NULL_RETURN(addr, JNI_FALSE); ++ (*env)->GetByteArrayRegion(env, addr, 0, 16, (jbyte *)dest); ++ return JNI_TRUE; ++} ++ ++int setInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *address) { ++ jobject holder; ++ jbyteArray addr; ++ ++ initInetAddrs(env); ++ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); ++ CHECK_NULL_RETURN(holder, JNI_FALSE); ++ addr = (jbyteArray)(*env)->GetObjectField(env, holder, ia6_ipaddressID); ++ if (addr == NULL) { ++ addr = (*env)->NewByteArray(env, 16); ++ CHECK_NULL_RETURN(addr, JNI_FALSE); ++ (*env)->SetObjectField(env, holder, ia6_ipaddressID, addr); ++ } ++ (*env)->SetByteArrayRegion(env, addr, 0, 16, (jbyte *)address); ++ return JNI_TRUE; ++} ++ + void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) { + jobject holder; + initInetAddrs(env); +@@ -168,6 +273,7 @@ + } else { + static jclass inet6Cls = 0; + jint scope; ++ int ret; + if (inet6Cls == 0) { + jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); + CHECK_NULL_RETURN(c, NULL); +@@ -177,18 +283,11 @@ + } + iaObj = (*env)->NewObject(env, inet6Cls, ia6_ctrID); + CHECK_NULL_RETURN(iaObj, NULL); +- ipaddress = (*env)->NewByteArray(env, 16); +- CHECK_NULL_RETURN(ipaddress, NULL); +- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, +- (jbyte *)&(him6->sin6_addr)); +- +- (*env)->SetObjectField(env, iaObj, ia6_ipaddressID, ipaddress); +- ++ ret = setInet6Address_ipaddress(env, iaObj, (char *)&(him6->sin6_addr)); ++ CHECK_NULL_RETURN(ret, NULL); + setInetAddress_family(env, iaObj, IPv6); + scope = getScopeID(him); +- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); +- if (scope > 0) +- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); ++ setInet6Address_scopeid(env, iaObj, scope); + } + *port = ntohs(him6->sin6_port); + } else +@@ -248,9 +347,8 @@ + if (family == AF_INET) { + return JNI_FALSE; + } +- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); +- scope = (*env)->GetIntField(env, iaObj, ia6_scopeidID); +- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddrCur); ++ scope = getInet6Address_scopeid(env, iaObj); ++ getInet6Address_ipaddress(env, iaObj, (char *)caddrCur); + if (NET_IsEqual(caddrNew, caddrCur) && cmpScopeID(scope, him)) { + return JNI_TRUE; + } else { +--- ./jdk/src/share/native/java/net/net_util.h 2013-09-06 11:28:58.000000000 -0700 ++++ ./jdk/src/share/native/java/net/net_util.h 2013-12-01 11:14:28.000000000 -0800 +@@ -58,6 +58,22 @@ + extern jfieldID iac_hostNameID; + extern jfieldID ia_preferIPv6AddressID; + ++/** (Inet6Address accessors) ++ * set_ methods return JNI_TRUE on success JNI_FALSE on error ++ * get_ methods that return int/boolean, return -1 on error ++ * get_ methods that return objects return NULL on error. ++ */ ++extern jobject getInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj); ++extern int setInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj, jobject scopeifname); ++extern int getInet6Address_scopeifname_set(JNIEnv *env, jobject ia6Obj); ++extern int setInet6Address_scopeifname_set(JNIEnv *env, jobject ia6Obj, ++ int scopeifname_set); ++extern int getInet6Address_scopeid_set(JNIEnv *env, jobject ia6Obj); ++extern int getInet6Address_scopeid(JNIEnv *env, jobject ia6Obj); ++extern int setInet6Address_scopeid(JNIEnv *env, jobject ia6Obj, int scopeid); ++extern int getInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *dest); ++extern int setInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *address); ++ + extern void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address); + extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family); + extern void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject h); +@@ -93,6 +109,7 @@ + + /* Inet6Address fields */ + extern jclass ia6_class; ++extern jfieldID ia6_holder6ID; + extern jfieldID ia6_ipaddressID; + extern jfieldID ia6_scopeidID; + extern jfieldID ia6_cachedscopeidID; +--- ./jdk/src/share/native/sun/awt/giflib/dgif_lib.c 2013-09-06 11:28:59.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/giflib/dgif_lib.c 2014-04-19 01:27:15.000000000 -0700 +@@ -435,9 +435,7 @@ + Private->PixelCount = (long)GifFile->Image.Width * + (long)GifFile->Image.Height; + +- DGifSetupDecompress(GifFile); /* Reset decompress algorithm parameters. */ +- +- return GIF_OK; ++ return DGifSetupDecompress(GifFile); /* Reset decompress algorithm parameters. */ + } + + /****************************************************************************** +--- ./jdk/src/share/native/sun/awt/image/awt_parseImage.c 2013-09-06 11:28:59.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/image/awt_parseImage.c 2013-12-01 11:14:29.000000000 -0800 +@@ -808,363 +808,204 @@ + return 1; + } + +-/* +- * This routine will fill in a buffer of data for either 1 band or all +- * bands (if band == -1). +- */ + #define MAX_TO_GRAB (10240) + +-int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned char *bufferP) { +- int w = rasterP->width; +- int h = rasterP->height; +- int numBands = rasterP->numBands; ++typedef union { ++ void *pv; ++ unsigned char *pb; ++ unsigned short *ps; ++} PixelData_t; ++ ++ ++int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) { ++ const int w = rasterP->width; ++ const int h = rasterP->height; ++ const int numBands = rasterP->numBands; + int y; + int i; +- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); ++ int maxLines; + jobject jsm; +- int off; ++ int off = 0; + jarray jdata = NULL; + jobject jdatabuffer; + int *dataP; +- int maxBytes = w; ++ int maxSamples; ++ PixelData_t p; + +- jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); +- jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, +- g_RasterDataBufferID); +- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); +- if (JNU_IsNull(env, jdata)) { +- JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++ if (bufferP == NULL) { + return -1; + } + +- /* Here is the generic code */ +- if (band >= 0) { +- int dOff; +- if (band >= numBands) { +- (*env)->DeleteLocalRef(env, jdata); +- JNU_ThrowInternalError(env, "Band out of range."); +- return -1; +- } +- off = 0; +- for (y=0; y < h; ) { +- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; +- } +- dOff = band; +- for (i=0; i < maxBytes; i++, dOff += numBands) { +- bufferP[off++] = (unsigned char) dataP[dOff]; +- } ++ if (rasterP->dataType != BYTE_DATA_TYPE && ++ rasterP->dataType != SHORT_DATA_TYPE) ++ { ++ return -1; ++ } + +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); ++ p.pv = bufferP; + +- if (y+maxLines < h) { +- y += maxLines; +- } +- else { +- y++; +- maxBytes = w; +- } +- } ++ if (!SAFE_TO_MULT(w, numBands)) { ++ return -1; + } +- else { +- off = 0; +- maxBytes *= numBands; +- for (y=0; y < h; ) { +- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; +- } +- for (i=0; i < maxBytes; i++) { +- bufferP[off++] = (unsigned char) dataP[i]; +- } ++ maxSamples = w * numBands; + +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); +- +- if (y+maxLines < h) { +- y += maxLines; +- } +- else { +- y++; +- maxBytes = w*numBands; +- } +- } ++ maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples); ++ if (maxLines > h) { ++ maxLines = h; ++ } + ++ if (!SAFE_TO_MULT(maxSamples, maxLines)) { ++ return -1; + } +- (*env)->DeleteLocalRef(env, jdata); + +- return 0; +-} +-int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned char *bufferP) { +- int w = rasterP->width; +- int h = rasterP->height; +- int numBands = rasterP->numBands; +- int y; +- int i; +- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); +- jobject jsm; +- int off; +- jarray jdata = NULL; +- jobject jdatabuffer; +- int *dataP; +- int maxBytes = w; ++ maxSamples *= maxLines; + + jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); + jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, + g_RasterDataBufferID); +- /* Here is the generic code */ +- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); ++ ++ jdata = (*env)->NewIntArray(env, maxSamples); + if (JNU_IsNull(env, jdata)) { + JNU_ThrowOutOfMemoryError(env, "Out of Memory"); + return -1; + } +- if (band >= 0) { +- int dOff; +- if (band >= numBands) { ++ ++ for (y = 0; y < h; y += maxLines) { ++ if (y + maxLines > h) { ++ maxLines = h - y; ++ maxSamples = w * numBands * maxLines; ++ } ++ ++ (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, ++ 0, y, w, ++ maxLines, jdata, jdatabuffer); ++ ++ if ((*env)->ExceptionOccurred(env)) { + (*env)->DeleteLocalRef(env, jdata); +- JNU_ThrowInternalError(env, "Band out of range."); + return -1; + } +- off = 0; +- for (y=0; y < h; y+=maxLines) { +- if (y+maxLines > h) { +- maxBytes = w*numBands; +- maxLines = h - y; +- } +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; +- } +- dOff = band; +- for (i=0; i < maxBytes; i++, dOff += numBands) { +- dataP[dOff] = bufferP[off++]; +- } +- +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); + +- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); ++ dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++ NULL); ++ if (dataP == NULL) { ++ (*env)->DeleteLocalRef(env, jdata); ++ return -1; + } +- } +- else { +- off = 0; +- maxBytes *= numBands; +- for (y=0; y < h; y+=maxLines) { +- if (y+maxLines > h) { +- maxBytes = w*numBands; +- maxLines = h - y; +- } +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; ++ ++ switch (rasterP->dataType) { ++ case BYTE_DATA_TYPE: ++ for (i = 0; i < maxSamples; i ++) { ++ p.pb[off++] = (unsigned char) dataP[i]; + } +- for (i=0; i < maxBytes; i++) { +- dataP[i] = bufferP[off++]; ++ break; ++ case SHORT_DATA_TYPE: ++ for (i = 0; i < maxSamples; i ++) { ++ p.ps[off++] = (unsigned short) dataP[i]; + } +- +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); +- +- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); ++ break; + } + ++ (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++ JNI_ABORT); + } +- + (*env)->DeleteLocalRef(env, jdata); + +- return 0; ++ return 1; + } +-int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned short *bufferP) { +- int w = rasterP->width; +- int h = rasterP->height; +- int numBands = rasterP->numBands; ++ ++int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) { ++ const int w = rasterP->width; ++ const int h = rasterP->height; ++ const int numBands = rasterP->numBands; ++ + int y; + int i; +- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); ++ int maxLines; + jobject jsm; +- int off; ++ int off = 0; + jarray jdata = NULL; + jobject jdatabuffer; + int *dataP; +- int maxBytes = w*maxLines; ++ int maxSamples; ++ PixelData_t p; + +- jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); +- jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, +- g_RasterDataBufferID); +- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); +- if (JNU_IsNull(env, jdata)) { +- JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++ if (bufferP == NULL) { + return -1; + } +- /* Here is the generic code */ +- if (band >= 0) { +- int dOff; +- if (band >= numBands) { +- (*env)->DeleteLocalRef(env, jdata); +- JNU_ThrowInternalError(env, "Band out of range."); +- return -1; +- } +- off = 0; +- for (y=0; y < h; y += maxLines) { +- if (y+maxLines > h) { +- maxBytes = w*numBands; +- maxLines = h - y; +- } +- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; +- } + +- dOff = band; +- for (i=0; i < maxBytes; i++, dOff += numBands) { +- bufferP[off++] = (unsigned short) dataP[dOff]; +- } ++ if (rasterP->dataType != BYTE_DATA_TYPE && ++ rasterP->dataType != SHORT_DATA_TYPE) ++ { ++ return -1; ++ } + +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); +- } ++ p.pv = bufferP; ++ ++ if (!SAFE_TO_MULT(w, numBands)) { ++ return -1; + } +- else { +- off = 0; +- maxBytes *= numBands; +- for (y=0; y < h; y+=maxLines) { +- if (y+maxLines > h) { +- maxBytes = w*numBands; +- maxLines = h - y; +- } +- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; +- } +- for (i=0; i < maxBytes; i++) { +- bufferP[off++] = (unsigned short) dataP[i]; +- } ++ maxSamples = w * numBands; + +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); +- } ++ maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples); ++ if (maxLines > h) { ++ maxLines = h; ++ } + ++ if (!SAFE_TO_MULT(maxSamples, maxLines)) { ++ return -1; + } + +- (*env)->DeleteLocalRef(env, jdata); +- return 0; +-} +-int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned short *bufferP) { +- int w = rasterP->width; +- int h = rasterP->height; +- int numBands = rasterP->numBands; +- int y; +- int i; +- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); +- jobject jsm; +- int off; +- jarray jdata = NULL; +- jobject jdatabuffer; +- int *dataP; +- int maxBytes = w; ++ maxSamples *= maxLines; + + jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); + jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, + g_RasterDataBufferID); +- if (band >= numBands) { +- JNU_ThrowInternalError(env, "Band out of range."); +- return -1; +- } +- /* Here is the generic code */ +- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); ++ ++ jdata = (*env)->NewIntArray(env, maxSamples); + if (JNU_IsNull(env, jdata)) { + JNU_ThrowOutOfMemoryError(env, "Out of Memory"); + return -1; + } +- if (band >= 0) { +- int dOff; +- off = 0; +- for (y=0; y < h; y+=maxLines) { +- if (y+maxLines > h) { +- maxBytes = w*numBands; +- maxLines = h - y; +- } +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; +- } +- dOff = band; +- for (i=0; i < maxBytes; i++, dOff += numBands) { +- dataP[dOff] = bufferP[off++]; +- } +- +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); + +- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); ++ for (y = 0; y < h; y += maxLines) { ++ if (y + maxLines > h) { ++ maxLines = h - y; ++ maxSamples = w * numBands * maxLines; ++ } ++ dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, ++ NULL); ++ if (dataP == NULL) { ++ (*env)->DeleteLocalRef(env, jdata); ++ return -1; + } +- } +- else { +- off = 0; +- maxBytes *= numBands; +- for (y=0; y < h; y+=maxLines) { +- if (y+maxLines > h) { +- maxBytes = w*numBands; +- maxLines = h - y; +- } +- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, +- NULL); +- if (dataP == NULL) { +- (*env)->DeleteLocalRef(env, jdata); +- return -1; ++ ++ switch (rasterP->dataType) { ++ case BYTE_DATA_TYPE: ++ for (i = 0; i < maxSamples; i ++) { ++ dataP[i] = p.pb[off++]; + } +- for (i=0; i < maxBytes; i++) { +- dataP[i] = bufferP[off++]; ++ break; ++ case SHORT_DATA_TYPE: ++ for (i = 0; i < maxSamples; i ++) { ++ dataP[i] = p.ps[off++]; + } ++ break; ++ } + +- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, +- JNI_ABORT); ++ (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, ++ JNI_ABORT); + +- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, +- 0, y, w, +- maxLines, jdata, jdatabuffer); +- } ++ (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, ++ 0, y, w, ++ maxLines, jdata, jdatabuffer); + ++ if ((*env)->ExceptionOccurred(env)) { ++ (*env)->DeleteLocalRef(env, jdata); ++ return -1; ++ } + } + + (*env)->DeleteLocalRef(env, jdata); +- return 0; ++ ++ return 1; + } +--- ./jdk/src/share/native/sun/awt/image/awt_parseImage.h 2013-09-06 11:28:59.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/image/awt_parseImage.h 2013-12-01 11:14:29.000000000 -0800 +@@ -188,13 +188,8 @@ + + void awt_freeParsedImage(BufImageS_t *imageP, int freeImageP); + +-int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned char *bufferP); +-int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned char *bufferP); +-int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned short *bufferP); +-int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, +- unsigned short *bufferP); ++int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP); ++ ++int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP); + + #endif /* AWT_PARSE_IMAGE_H */ +--- ./jdk/src/share/native/sun/awt/image/gif/gifdecoder.c 2013-09-06 11:28:59.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/image/gif/gifdecoder.c 2014-04-19 01:27:15.000000000 -0700 +@@ -249,6 +249,7 @@ + /* fill the block */ + len = (*env)->CallIntMethod(env, this, readID, + blockh, remain, blockLength + 1); ++ if (len > blockLength + 1) len = blockLength + 1; + if ((*env)->ExceptionOccurred(env)) { + return 0; + } +--- ./jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-09-06 11:28:59.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2014-04-19 01:27:15.000000000 -0700 +@@ -930,14 +930,18 @@ + * Now fill a complete buffer, or as much of one as the stream + * will give us if we are near the end. + */ ++ RELEASE_ARRAYS(env, data, src->next_input_byte); ++ + GET_IO_REF(input); + +- RELEASE_ARRAYS(env, data, src->next_input_byte); + ret = (*env)->CallIntMethod(env, + input, + JPEGImageReader_readInputDataID, + sb->hstreamBuffer, 0, + sb->bufferLength); ++ if ((ret > 0) && ((unsigned int)ret > sb->bufferLength)) { ++ ret = sb->bufferLength; ++ } + if ((*env)->ExceptionOccurred(env) + || !GET_ARRAYS(env, data, &(src->next_input_byte))) { + cinfo->err->error_exit((j_common_ptr) cinfo); +@@ -1017,9 +1021,11 @@ + memcpy(sb->buf, src->next_input_byte, offset); + } + +- GET_IO_REF(input); + + RELEASE_ARRAYS(env, data, src->next_input_byte); ++ ++ GET_IO_REF(input); ++ + buflen = sb->bufferLength - offset; + if (buflen <= 0) { + if (!GET_ARRAYS(env, data, &(src->next_input_byte))) { +@@ -1032,6 +1038,7 @@ + JPEGImageReader_readInputDataID, + sb->hstreamBuffer, + offset, buflen); ++ if ((ret > 0) && ((unsigned int)ret > buflen)) ret = buflen; + if ((*env)->ExceptionOccurred(env) + || !GET_ARRAYS(env, data, &(src->next_input_byte))) { + cinfo->err->error_exit((j_common_ptr) cinfo); +@@ -1121,9 +1128,10 @@ + return; + } + ++ RELEASE_ARRAYS(env, data, src->next_input_byte); ++ + GET_IO_REF(input); + +- RELEASE_ARRAYS(env, data, src->next_input_byte); + ret = (*env)->CallLongMethod(env, + input, + JPEGImageReader_skipInputBytesID, +@@ -2306,10 +2314,10 @@ + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + jobject output = NULL; + +- GET_IO_REF(output); +- + RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte)); + ++ GET_IO_REF(output); ++ + (*env)->CallVoidMethod(env, + output, + JPEGImageWriter_writeOutputDataID, +@@ -2348,10 +2356,10 @@ + if (datacount != 0) { + jobject output = NULL; + +- GET_IO_REF(output); +- + RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte)); + ++ GET_IO_REF(output); ++ + (*env)->CallVoidMethod(env, + output, + JPEGImageWriter_writeOutputDataID, +@@ -2702,6 +2710,15 @@ + bandSize = (*env)->GetIntArrayElements(env, bandSizes, NULL); + + for (i = 0; i < numBands; i++) { ++ if (bandSize[i] <= 0 || bandSize[i] > JPEG_BAND_SIZE) { ++ (*env)->ReleaseIntArrayElements(env, bandSizes, ++ bandSize, JNI_ABORT); ++ JNU_ThrowByName(env, "javax/imageio/IIOException", "Invalid Image"); ++ return JNI_FALSE;; ++ } ++ } ++ ++ for (i = 0; i < numBands; i++) { + if (bandSize[i] != JPEG_BAND_SIZE) { + if (scale == NULL) { + scale = (UINT8**) calloc(numBands, sizeof(UINT8*)); +--- ./jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c 2013-09-06 11:28:59.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c 2014-04-19 01:27:15.000000000 -0700 +@@ -349,6 +349,12 @@ + + TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, + compptr->dc_tbl_no, compptr->ac_tbl_no); ++ ++ /* This CSi (cc) should differ from the previous CSi */ ++ for (ci = 0; ci < i; ci++) { ++ if (cinfo->cur_comp_info[ci] == compptr) ++ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); ++ } + } + + /* Collect the additional scan parameters Ss, Se, Ah/Al. */ +--- ./jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2014-04-19 01:27:15.000000000 -0700 +@@ -289,6 +289,7 @@ + buflen = (*env)->GetArrayLength(env, src->hInputBuffer); + ret = (*env)->CallIntMethod(env, src->hInputStream, InputStream_readID, + src->hInputBuffer, 0, buflen); ++ if (ret > buflen) ret = buflen; + if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) { + cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); + } +@@ -349,6 +350,7 @@ + } + ret = (*env)->CallIntMethod(env, src->hInputStream, InputStream_readID, + src->hInputBuffer, offset, buflen); ++ if ((ret > 0) && ((unsigned int)ret > buflen)) ret = buflen; + if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) { + cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); + } +@@ -424,6 +426,7 @@ + ret = (*env)->CallIntMethod(env, src->hInputStream, + InputStream_readID, + src->hInputBuffer, 0, buflen); ++ if (ret > buflen) ret = buflen; + if ((*env)->ExceptionOccurred(env)) { + cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); + } +--- ./jdk/src/share/native/sun/awt/libpng/pngrtran.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/libpng/pngrtran.c 2014-04-19 01:27:15.000000000 -0700 +@@ -1862,6 +1862,9 @@ + + info_ptr->bit_depth = 8; + info_ptr->num_trans = 0; ++ ++ if (png_ptr->palette == NULL) ++ png_error (png_ptr, "Palette is NULL in indexed image"); + } + else + { +--- ./jdk/src/share/native/sun/awt/libpng/pngset.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/libpng/pngset.c 2014-04-19 01:27:15.000000000 -0700 +@@ -512,6 +512,17 @@ + } + } + ++ if ((num_palette > 0 && palette == NULL) || ++ (num_palette == 0 ++# ifdef PNG_MNG_FEATURES_SUPPORTED ++ && (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 ++# endif ++ )) ++ { ++ png_error(png_ptr, "Invalid palette"); ++ return; ++ } ++ + /* It may not actually be necessary to set png_ptr->palette here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. +--- ./jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c 2014-04-19 01:27:15.000000000 -0700 +@@ -228,6 +228,49 @@ + } + } + ++/* ++ * We have to make sure that awt_setPixels can be safely applied to the given pair of ++ * raster and mlib image. ++ * ++ * In particular, make sure that ++ * - dimension is the same ++ * - number of channels in mlib image corresponds to the number of bands in the raster ++ * - sample size in image and raster are the same. ++ * ++ * Returns: ++ * -1 to indicate failure, ++ * 1 to indicate success ++ */ ++static int setPixelsFormMlibImage(JNIEnv *env, RasterS_t *rasterP, mlib_image* img) { ++ if (rasterP->width != img->width || rasterP->height != img->height) { ++ /* dimension does not match */ ++ return -1; ++ } ++ ++ if (rasterP->numBands != img->channels) { ++ /* number of bands does not match */ ++ return -1; ++ } ++ ++ switch (rasterP->dataType) { ++ case BYTE_DATA_TYPE: ++ if (img->type != MLIB_BYTE) { ++ return -1; ++ } ++ break; ++ case SHORT_DATA_TYPE: ++ if (img->type != MLIB_SHORT && img->type != MLIB_USHORT) { ++ return -1; ++ } ++ break; ++ default: ++ /* awt_setPixels does not support such rasters */ ++ return -1; ++ } ++ ++ return awt_setPixels(env, rasterP, mlib_ImageGetData(img)); ++} ++ + /*************************************************************************** + * External Functions * + ***************************************************************************/ +@@ -700,21 +743,8 @@ + + /* Means that we couldn't write directly into the destination buffer */ + if (ddata == NULL) { +- unsigned char *bdataP; +- unsigned short *sdataP; +- +- /* Punt for now */ +- switch (dstRasterP->dataType) { +- case BYTE_DATA_TYPE: +- bdataP = (unsigned char *) mlib_ImageGetData(dst); +- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; +- break; +- case SHORT_DATA_TYPE: +- sdataP = (unsigned short *) mlib_ImageGetData(dst); +- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; +- break; +- default: +- retStatus = 0; ++ if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { ++ retStatus = setPixelsFormMlibImage(env, dstRasterP, dst); + } + } + +@@ -1119,24 +1149,9 @@ + + /* Means that we couldn't write directly into the destination buffer */ + if (ddata == NULL) { +- unsigned char *bdataP; +- unsigned short *sdataP; +- + /* Need to store it back into the array */ + if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { +- /* Punt for now */ +- switch (dst->type) { +- case MLIB_BYTE: +- bdataP = (unsigned char *) mlib_ImageGetData(dst); +- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; +- break; +- case MLIB_SHORT: +- sdataP = (unsigned short *) mlib_ImageGetData(dst); +- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; +- break; +- default: +- retStatus = 0; +- } ++ retStatus = setPixelsFormMlibImage(env, dstRasterP, dst); + } + } + +@@ -1462,6 +1477,14 @@ + retStatus = 0; + } + ++ /* Release the LUT */ ++ for (i=0; i < lut_nbands; i++) { ++ (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, ++ (jbyte *) jtable[i].table, JNI_ABORT); ++ } ++ free ((void *) jtable); ++ free ((void *) tbl); ++ + /* + * Means that we couldn't write directly into + * the destination buffer +@@ -1475,13 +1498,6 @@ + } + } + +- /* Release the LUT */ +- for (i=0; i < lut_nbands; i++) { +- (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, +- (jbyte *) jtable[i].table, JNI_ABORT); +- } +- free ((void *) jtable); +- free ((void *) tbl); + + /* Release the pinned memory */ + freeArray(env, srcImageP, src, sdata, dstImageP, dst, ddata); +@@ -1699,34 +1715,22 @@ + retStatus = 0; + } + ++ /* Release the LUT */ ++ for (i=0; i < lut_nbands; i++) { ++ (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, ++ (jbyte *) jtable[i].table, JNI_ABORT); ++ } ++ + /* + * Means that we couldn't write directly into + * the destination buffer + */ + if (ddata == NULL) { +- unsigned char* bdataP; +- unsigned short* sdataP; +- +- switch (dstRasterP->dataType) { +- case BYTE_DATA_TYPE: +- bdataP = (unsigned char *) mlib_ImageGetData(dst); +- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; +- break; +- case SHORT_DATA_TYPE: +- sdataP = (unsigned short *) mlib_ImageGetData(dst); +- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; +- break; +- default: +- retStatus = 0; ++ if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { ++ retStatus = setPixelsFormMlibImage(env, dstRasterP, dst); + } + } + +- /* Release the LUT */ +- for (i=0; i < lut_nbands; i++) { +- (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, +- (jbyte *) jtable[i].table, JNI_ABORT); +- } +- + /* Release the pinned memory */ + freeDataArray(env, srcRasterP->jdata, src, sdata, + dstRasterP->jdata, dst, ddata); +@@ -2029,21 +2033,25 @@ + return 0; + } + ++#define NUM_LINES 10 ++ + static int + cvtCustomToDefault(JNIEnv *env, BufImageS_t *imageP, int component, + unsigned char *dataP) { +- ColorModelS_t *cmP = &imageP->cmodel; +- RasterS_t *rasterP = &imageP->raster; ++ const RasterS_t *rasterP = &imageP->raster; ++ const int w = rasterP->width; ++ const int h = rasterP->height; ++ + int y; +- jobject jpixels = NULL; ++ jintArray jpixels = NULL; + jint *pixels; + unsigned char *dP = dataP; +-#define NUM_LINES 10 +- int numLines = NUM_LINES; ++ int numLines = h > NUM_LINES ? NUM_LINES : h; ++ + /* it is safe to calculate the scan length, because width has been verified + * on creation of the mlib image + */ +- int scanLength = rasterP->width * 4; ++ const int scanLength = w * 4; + + int nbytes = 0; + if (!SAFE_TO_MULT(numLines, scanLength)) { +@@ -2052,42 +2060,70 @@ + + nbytes = numLines * scanLength; + +- for (y=0; y < rasterP->height; y+=numLines) { +- /* getData, one scanline at a time */ +- if (y+numLines > rasterP->height) { +- numLines = rasterP->height - y; ++ jpixels = (*env)->NewIntArray(env, nbytes); ++ if (JNU_IsNull(env, jpixels)) { ++ JNU_ThrowOutOfMemoryError(env, "Out of Memory"); ++ return -1; ++ } ++ ++ for (y = 0; y < h; y += numLines) { ++ if (y + numLines > h) { ++ numLines = h - y; + nbytes = numLines * scanLength; + } +- jpixels = (*env)->CallObjectMethod(env, imageP->jimage, +- g_BImgGetRGBMID, 0, y, +- rasterP->width, numLines, +- jpixels,0, rasterP->width); +- if (jpixels == NULL) { +- JNU_ThrowInternalError(env, "Can't retrieve pixels."); ++ ++ (*env)->CallObjectMethod(env, imageP->jimage, ++ g_BImgGetRGBMID, 0, y, ++ w, numLines, ++ jpixels, 0, w); ++ if ((*env)->ExceptionOccurred(env)) { ++ (*env)->DeleteLocalRef(env, jpixels); + return -1; + } + + pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); ++ if (pixels == NULL) { ++ (*env)->DeleteLocalRef(env, jpixels); ++ return -1; ++ } ++ + memcpy(dP, pixels, nbytes); + dP += nbytes; ++ + (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, + JNI_ABORT); + } ++ ++ /* Need to release the array */ ++ (*env)->DeleteLocalRef(env, jpixels); ++ + return 0; + } + + static int + cvtDefaultToCustom(JNIEnv *env, BufImageS_t *imageP, int component, + unsigned char *dataP) { +- ColorModelS_t *cmP = &imageP->cmodel; +- RasterS_t *rasterP = &imageP->raster; ++ const RasterS_t *rasterP = &imageP->raster; ++ const int w = rasterP->width; ++ const int h = rasterP->height; ++ + int y; ++ jintArray jpixels = NULL; + jint *pixels; + unsigned char *dP = dataP; +-#define NUM_LINES 10 +- int numLines = NUM_LINES; +- int nbytes = rasterP->width*4*NUM_LINES; +- jintArray jpixels; ++ int numLines = h > NUM_LINES ? NUM_LINES : h; ++ ++ /* it is safe to calculate the scan length, because width has been verified ++ * on creation of the mlib image ++ */ ++ const int scanLength = w * 4; ++ ++ int nbytes = 0; ++ if (!SAFE_TO_MULT(numLines, scanLength)) { ++ return -1; ++ } ++ ++ nbytes = numLines * scanLength; + + jpixels = (*env)->NewIntArray(env, nbytes); + if (JNU_IsNull(env, jpixels)) { +@@ -2095,14 +2131,15 @@ + return -1; + } + +- for (y=0; y < rasterP->height; y+=NUM_LINES) { +- if (y+numLines > rasterP->height) { +- numLines = rasterP->height - y; +- nbytes = rasterP->width*4*numLines; ++ for (y = 0; y < h; y += numLines) { ++ if (y + numLines > h) { ++ numLines = h - y; ++ nbytes = numLines * scanLength; + } ++ + pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); + if (pixels == NULL) { +- /* JNI error */ ++ (*env)->DeleteLocalRef(env, jpixels); + return -1; + } + +@@ -2111,12 +2148,11 @@ + + (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, 0); + +- /* setData, one scanline at a time */ +- /* Fix 4223648, 4184283 */ + (*env)->CallVoidMethod(env, imageP->jimage, g_BImgSetRGBMID, 0, y, +- rasterP->width, numLines, jpixels, 0, +- rasterP->width); ++ w, numLines, jpixels, ++ 0, w); + if ((*env)->ExceptionOccurred(env)) { ++ (*env)->DeleteLocalRef(env, jpixels); + return -1; + } + } +@@ -2298,7 +2334,6 @@ + mlib_image **mlibImagePP, void **dataPP, int isSrc) { + void *dataP; + unsigned char *cDataP; +- unsigned short *sdataP; + int dataType = BYTE_DATA_TYPE; + int width; + int height; +@@ -2484,8 +2519,7 @@ + return -1; + } + if (isSrc) { +- cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); +- if (awt_getPixelByte(env, -1, rasterP, cDataP) < 0) { ++ if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) { + (*sMlibSysFns.deleteImageFP)(*mlibImagePP); + return -1; + } +@@ -2499,8 +2533,7 @@ + return -1; + } + if (isSrc) { +- sdataP = (unsigned short *) mlib_ImageGetData(*mlibImagePP); +- if (awt_getPixelShort(env, -1, rasterP, sdataP) < 0) { ++ if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) { + (*sMlibSysFns.deleteImageFP)(*mlibImagePP); + return -1; + } +@@ -2550,60 +2583,6 @@ + } + } + +-static int +-storeDstArray(JNIEnv *env, BufImageS_t *srcP, BufImageS_t *dstP, +- mlibHintS_t *hintP, mlib_image *mlibImP, void *ddata) { +- RasterS_t *rasterP = &dstP->raster; +- +- /* Nothing to do since it is the same image type */ +- if (srcP->imageType == dstP->imageType +- && srcP->imageType != java_awt_image_BufferedImage_TYPE_CUSTOM +- && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_INDEXED +- && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_BINARY) { +- /* REMIND: Should check the ICM LUTS to see if it is the same */ +- return 0; +- } +- +- /* These types are compatible with TYPE_INT_RGB */ +- if (srcP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB +- && (dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB || +- dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE)){ +- return 0; +- } +- +- if (hintP->cvtSrcToDefault && +- (srcP->cmodel.isAlphaPre == dstP->cmodel.isAlphaPre)) { +- if (srcP->cmodel.isAlphaPre) { +- if (dstP->imageType == +- java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE) +- { +- return 0; +- } +- if (!srcP->cmodel.supportsAlpha && +- dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB){ +- return 0; +- } +- } +- else { +- /* REMIND: */ +- } +- } +- +- if (dstP->cmodel.cmType == DIRECT_CM_TYPE) { +- /* Just need to move bits */ +- if (mlibImP->type == MLIB_BYTE) { +- return awt_setPixelByte(env, -1, &dstP->raster, +- (unsigned char *) mlibImP->data); +- } +- else if (mlibImP->type == MLIB_SHORT) { +- return awt_setPixelByte(env, -1, &dstP->raster, +- (unsigned char *) mlibImP->data); +- } +- } +- +- return 0; +-} +- + #define ERR_BAD_IMAGE_LAYOUT (-2) + + #define CHECK_DST_ARRAY(start_offset, elements_per_scan, elements_per_pixel) \ +@@ -2709,8 +2688,7 @@ + } + } + else if (mlibImP->type == MLIB_SHORT) { +- return awt_setPixelShort(env, -1, rasterP, +- (unsigned short *) mlibImP->data); ++ return setPixelsFormMlibImage(env, rasterP, mlibImP); + } + } + else { +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2014-06-06 19:56:34.000000000 -0700 +@@ -86,7 +86,7 @@ + #endif /* MLIB_USE_FTOI_CLAMPING */ + + /***************************************************************/ +-#if defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) ++#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) + + /* NB: Explicit cast to DTYPE is necessary to avoid warning from Microsoft VC compiler. + And we need to explicitly define cast behavior if source exceeds destination range. +@@ -103,7 +103,7 @@ + dp[0 ] = (DTYPE) ((res0) & DTYPE_MASK); \ + dp[chan1] = (DTYPE) ((res1) & DTYPE_MASK) + +-#endif /* defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */ ++#endif /* (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -114,17 +114,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | ((mlib_s64)sp[0] & 0xffffffff) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | ((mlib_s64)sp[chan1] & 0xffffffff) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + #endif /* _NO_LONGLONG */ + +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2014-06-06 19:56:34.000000000 -0700 +@@ -126,7 +126,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -138,7 +138,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -149,17 +149,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2014-06-06 19:56:34.000000000 -0700 +@@ -94,7 +94,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -106,7 +106,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -117,17 +117,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2014-06-06 19:56:34.000000000 -0700 +@@ -126,7 +126,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -138,7 +138,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -149,17 +149,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2014-06-06 19:56:34.000000000 -0700 +@@ -95,7 +95,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -107,7 +107,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -118,17 +118,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2014-06-06 19:56:34.000000000 -0700 +@@ -126,7 +126,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -138,7 +138,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -149,17 +149,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2014-06-06 19:56:34.000000000 -0700 +@@ -94,7 +94,7 @@ + #define D2I(x) CLAMP_S32((x) SAT_OFF) + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define STORE2(res0, res1) \ + dp[0 ] = res1; \ +@@ -106,7 +106,7 @@ + dp[0 ] = res0; \ + dp[chan1] = res1 + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + #ifdef _NO_LONGLONG +@@ -117,17 +117,17 @@ + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + +-#else /* _LITTLE_ENDIAN */ ++#else + + #define LOAD_BUFF(buff) \ + *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #endif /* _NO_LONGLONG */ + + /***************************************************************/ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2014-06-06 19:56:34.000000000 -0700 +@@ -95,7 +95,7 @@ + dst = dp[0]; + if (ld_offset + size < 32) { + dmask = (mask0 << (32 - size)) >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 >> (ld_offset - ls_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -104,12 +104,12 @@ + #else + src = (src0 >> (ld_offset - ls_offset)); + dp[0] = (dst & (~dmask)) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = mask0 >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 >> (ld_offset - ls_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -118,7 +118,7 @@ + #else + src = (src0 >> (ld_offset - ls_offset)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = 32 - ld_offset; + dp++; + ls_offset += j; +@@ -131,7 +131,7 @@ + + if (ld_offset + size < 32) { + dmask = (mask0 << (32 - size)) >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << shift) | (src1 >> (32 - shift)); +@@ -141,12 +141,12 @@ + #else + src = (src0 << shift) | (src1 >> (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = mask0 >> ld_offset; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << shift) | (src1 >> (32 - shift)); +@@ -156,7 +156,7 @@ + #else + src = (src0 << shift) | (src1 >> (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = 32 - ld_offset; + dp++; + sp++; +@@ -164,19 +164,19 @@ + } + + if (j < size) src1 = sp[0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + for (; j <= size - 32; j += 32) { + src0 = src1; + src1 = sp[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); + dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24); + #else + dp[0] = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp++; + dp++; + } +@@ -187,7 +187,7 @@ + if (ls_offset + j > 32) src1 = sp[1]; + dst = dp[0]; + dmask = mask0 << (32 - j); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -196,7 +196,7 @@ + #else + src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + + #else /* _LONGLONG */ +@@ -315,7 +315,7 @@ + dst = dp[0]; + if (ld_offset >= size) { + dmask = (lmask0 << (32 - size)) >> (ld_offset - size); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 << (ls_offset - ld_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -324,12 +324,12 @@ + #else + src = (src0 << (ls_offset - ld_offset)); + dp[0] = (dst & (~dmask)) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = lmask0 << (32 - ld_offset); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src = (src0 << (ls_offset - ld_offset)); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -338,7 +338,7 @@ + #else + src = (src0 << (ls_offset - ld_offset)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = ld_offset; + dp--; + ls_offset -= j; +@@ -351,7 +351,7 @@ + + if (ld_offset >= size) { + dmask = (lmask0 << (32 - size)) >> (ld_offset - size); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> shift) | (src1 << (32 - shift)); +@@ -361,12 +361,12 @@ + #else + src = (src0 >> shift) | (src1 << (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + return; + } + + dmask = lmask0 << (32 - ld_offset); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> shift) | (src1 << (32 - shift)); +@@ -376,7 +376,7 @@ + #else + src = (src0 >> shift) | (src1 << (32 - shift)); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + j = ld_offset; + dp--; + sp--; +@@ -384,22 +384,22 @@ + } + + if (j < size) src1 = sp[0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #ifdef __SUNPRO_C + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (; j <= size - 32; j += 32) { + src0 = src1; + src1 = sp[-1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); + dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24); + #else + dp[0] = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp--; + dp--; + } +@@ -410,7 +410,7 @@ + if (ls_offset < j) src1 = sp[-1]; + dst = dp[0]; + dmask = lmask0 >> (32 - j); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); + src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); + dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); +@@ -419,7 +419,7 @@ + #else + src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); + dp[0] = (dst & ~dmask) | (src & dmask); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + + #else /* _LONGLONG */ +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2014-06-06 19:56:34.000000000 -0700 +@@ -168,7 +168,7 @@ + } + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + #define READ_U8_D64(table0, table1, table2, table3) \ + t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 << 3) & 0x7F8)); \ +@@ -184,7 +184,7 @@ + t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 5) & 0x7F8)); \ + t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 << 3) & 0x7F8)) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + void mlib_ImageLookUp_U8_D64(const mlib_u8 *src, +@@ -613,7 +613,7 @@ + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); +@@ -623,12 +623,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); +@@ -638,7 +638,7 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[4] = t0; + dp[5] = t1; +@@ -646,7 +646,7 @@ + dp[7] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); +@@ -656,12 +656,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); +@@ -671,7 +671,7 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; +@@ -719,7 +719,7 @@ + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -733,14 +733,14 @@ + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -754,7 +754,7 @@ + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[6] = t0; + dp[7] = t1; +@@ -764,7 +764,7 @@ + dp[11] = t5; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -778,14 +778,14 @@ + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -799,7 +799,7 @@ + t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[6] = t0; + dp[7] = t1; + dp[8] = t2; +@@ -852,7 +852,7 @@ + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -862,12 +862,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); +@@ -877,12 +877,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -892,12 +892,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); +@@ -907,7 +907,7 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[12] = t0; + dp[13] = t1; +@@ -915,7 +915,7 @@ + dp[15] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); +@@ -925,12 +925,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); +@@ -940,12 +940,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); +@@ -955,12 +955,12 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); +@@ -970,7 +970,7 @@ + t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); + t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); + t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[12] = t0; + dp[13] = t1; + dp[14] = t2; +--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2014-06-06 19:56:34.000000000 -0700 +@@ -88,7 +88,7 @@ + } d64_2_f32; + + /***************************************************************/ +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + static const mlib_u32 mlib_bit_mask[16] = { + 0x00000000u, 0xFF000000u, 0x00FF0000u, 0xFFFF0000u, +@@ -126,7 +126,7 @@ + 0x00000000u, 0x00FFFFFFu, 0xFF000000u, 0xFFFFFFFFu + }; + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src, +@@ -228,13 +228,13 @@ + #endif /* __SUNPRO_C */ + for (; i <= (size - 16); i += 16) { + s0 = *(mlib_u16*)sa; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *da++ = dd_array[s0 & 0xFF]; + *da++ = dd_array[s0 >> 8]; + #else + *da++ = dd_array[s0 >> 8]; + *da++ = dd_array[s0 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sa += 2; + } + +@@ -258,20 +258,20 @@ + val1 = p_dd[2*val0+1]; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); + #else + emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask); + + #else /* _NO_LONGLONG */ + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); + #else + mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + ((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask); + +@@ -323,13 +323,13 @@ + + val0 = table[0][0]; + val1 = table[0][1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + val0 = val0 | (table[1][0] << 8); + val1 = val1 | (table[1][1] << 8); + #else + val0 = (val0 << 8) | table[1][0]; + val1 = (val1 << 8) | table[1][1]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + val0 |= (val0 << 16); + val1 |= (val1 << 16); + +@@ -394,11 +394,11 @@ + dd1 = dd2; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); + #else + emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask); + + #else /* _NO_LONGLONG */ +@@ -412,11 +412,11 @@ + dd = ((mlib_u64*)dd_array)[s0 & 0xf]; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); + #else + emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask); + + #endif /* _NO_LONGLONG */ +@@ -462,7 +462,7 @@ + + buffs = buff + size; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + l0 = (table[0][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]); + h0 = (table[0][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]); + l1 = (l0 >> 8); l1 |= (l1 << 24); +@@ -476,7 +476,7 @@ + h1 = (h0 << 8); h1 |= (h1 >> 24); + l2 = (l1 << 8); l2 |= (l2 >> 24); + h2 = (h1 << 8); h2 |= (h2 >> 24); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /* calculate lookup table */ + #ifdef __SUNPRO_C +@@ -564,11 +564,11 @@ + dd = ((mlib_u32*)(d_array12 + (s0 & 0xF)))[1]; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); + #else + emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = (dd & emask) | (da[0] &~ emask); + } + +@@ -611,13 +611,13 @@ + + buffs = buff + size; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + l = (table[3][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]); + h = (table[3][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]); + #else + l = (table[0][0] << 24) | (table[1][0] << 16) | (table[2][0] << 8) | (table[3][0]); + h = (table[0][1] << 24) | (table[1][1] << 16) | (table[2][1] << 8) | (table[3][1]); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + ((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 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2014-06-06 19:56:34.000000000 -0700 +@@ -30,7 +30,7 @@ + typedef union { + mlib_d64 db; + struct { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + mlib_s32 int1, int0; + #else + mlib_s32 int0, int1; +--- ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2013-09-06 11:29:00.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2014-06-06 19:56:34.000000000 -0700 +@@ -275,11 +275,11 @@ + for (i = 0; j <= (b_size - 4); j += 4, i++) { + src0 = src1; + src1 = pws[i + 1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + pwd[i] = (src0 >> lshift) | (src1 << rshift); + #else + pwd[i] = (src0 << lshift) | (src1 >> rshift); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + + sa += i << 2; +@@ -381,11 +381,11 @@ + for (; j <= (src_width - 4); j += 4) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s32 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); + #else + *((mlib_s32 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -414,11 +414,11 @@ + for (; j <= (src_width - 8); j += 8) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); + #else + *((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -484,11 +484,11 @@ + for (; j <= (src_width - 2); j += 2) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s32 *) (pdst_row + j)) = (src0 >> 16) | (src1 << 16); + #else + *((mlib_s32 *) (pdst_row + j)) = (src0 << 16) | (src1 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -516,11 +516,11 @@ + for (; j <= (src_width - 4); j += 4) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); + #else + *((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -585,11 +585,11 @@ + for (; j <= (src_width - 2); j += 2) { + src0 = src1; + src1 = ps[1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *((mlib_s64 *) (pdst_row + j)) = (src0 >> 32) | (src1 << 32); + #else + *((mlib_s64 *) (pdst_row + j)) = (src0 << 32) | (src1 >> 32); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + ps++; + } + } +@@ -687,11 +687,11 @@ + #endif /* __SUNPRO_C */ + for (; n > SIZE; n -= SIZE) { + s1 = *tmp++; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *(TYPE *) dp = (s0 >> shl) | (s1 << shr); + #else + *(TYPE *) dp = (s0 << shl) | (s1 >> shr); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = s1; + dp += SIZE; + sp += SIZE; +--- ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2014-06-06 19:56:34.000000000 -0700 +@@ -120,7 +120,7 @@ + } \ + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + + /***************************************************************/ + #define READ_U8_U8_ALIGN(table0, table1, table2, table3) \ +@@ -163,7 +163,7 @@ + t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 14) & 0x3FC)); \ + t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 >> 22) & 0x3FC)) + +-#else /* _LITTLE_ENDIAN */ ++#else /* BYTE_ORDER == ... */ + + /***********/ + #define READ_U8_U8_ALIGN(table0, table1, table2, table3) \ +@@ -206,7 +206,7 @@ + t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 6) & 0x3FC)); \ + t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 << 2) & 0x3FC)) + +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + /***************************************************************/ + void mlib_c_ImageLookUp_U8_U8(const mlib_u8 *src, +@@ -297,11 +297,11 @@ + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab[s2 >> 8]; + #else + *dp++ = tab[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + for (; i < size; i++, dp++, sp++) +@@ -403,11 +403,11 @@ + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab0[s2 >> 8]; + #else + *dp++ = tab0[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + +@@ -544,11 +544,11 @@ + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab1[s2 >> 8]; + #else + *dp++ = tab1[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + +@@ -694,11 +694,11 @@ + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = tab0[s2 >> 8]; + #else + *dp++ = tab0[s2 & 0xFF]; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sp = (mlib_u8 *) sa; + i += 5; + +@@ -1852,21 +1852,21 @@ + s0 = tab0[0]; + s1 = tab1[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 8) + s0; + #else + s2 = (s0 << 8) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + tab[i - 1] = (mlib_u16) s2; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 8) + s0; + #else + s2 = (s0 << 8) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = (mlib_u16) s2; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -1897,11 +1897,11 @@ + for (i = 0; i < size - 3; i += 2, da++, sa += 2) { + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t1 << 16) + t0; + #else + t = (t0 << 16) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + da[0] = t; +@@ -1909,11 +1909,11 @@ + + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t1 << 16) + t0; + #else + t = (t0 << 16) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = t; + da++; + +@@ -1927,13 +1927,13 @@ + + if (off > 1) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[1] = (t0 >> 8); + dp[0] = t0; + #else + dp[0] = (t0 >> 8); + dp[1] = t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sa++; + size--; + dp += 2; +@@ -1941,11 +1941,11 @@ + + t0 = tab[sa[0]]; + sa++; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = t0; + #else + *dp++ = (t0 >> 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + da = (mlib_s32 *) dp; + +@@ -1959,11 +1959,11 @@ + for (i = 0; i < size - 4; i += 2, da++, sa += 2) { + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t0 >> 8) + (t1 << 8) + (t2 << 24); + #else + t = (t0 << 24) + (t1 << 8) + (t2 >> 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = t2; + s0 = sa[0]; + s1 = sa[1]; +@@ -1972,29 +1972,29 @@ + + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t = (t0 >> 8) + (t1 << 8) + (t2 << 24); + #else + t = (t0 << 24) + (t1 << 8) + (t2 >> 8); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = t; + da++; + dp = (mlib_u8 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[0] = (t2 >> 8); + #else + dp[0] = t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + if ((size & 1) == 0) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[2] = (t0 >> 8); + dp[1] = t0; + #else + dp[1] = (t0 >> 8); + dp[2] = t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2012,22 +2012,22 @@ + s1 = tab1[0]; + s2 = tab2[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s3 = (s2 << 24) + (s1 << 16) + (s0 << 8); + #else + s3 = (s0 << 16) + (s1 << 8) + s2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; + tab[i - 1] = s3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s3 = (s2 << 24) + (s1 << 16) + (s0 << 8); + #else + s3 = (s0 << 16) + (s1 << 8) + s2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = s3; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -2064,24 +2064,24 @@ + for (i = 0; i < size - 7; i += 4, da += 3, sa += 4) { + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t0 >> 8) + (t1 << 16); + res2 = (t1 >> 16); + #else + da[0] = (t0 << 8) + (t1 >> 16); + res2 = (t1 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += (t0 << 8); + res1 = (t0 >> 24) + t1; + #else + res2 += (t0 >> 8); + res1 = (t0 << 24) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[2]; + s1 = sa[3]; + da[1] = res2; +@@ -2090,24 +2090,24 @@ + + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t0 >> 8) + (t1 << 16); + res2 = (t1 >> 16); + #else + da[0] = (t0 << 8) + (t1 >> 16); + res2 = (t1 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab[s0]; + t1 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += (t0 << 8); + res1 = (t0 >> 24) + t1; + #else + res2 += (t0 >> 8); + res1 = (t0 << 24) + t1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[1] = res2; + da[2] = res1; + da += 3; +@@ -2143,11 +2143,11 @@ + s2 = tab2[0]; + s3 = tab3[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0; + #else + s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; +@@ -2155,11 +2155,11 @@ + tab[i - 1] = s4; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0; + #else + s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = s4; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -2225,13 +2225,13 @@ + for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) { + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> shift) + (t1 << shift1); + res2 = (t1 >> shift) + (t2 << shift1); + #else + res1 = (t0 << shift) + (t1 >> shift1); + res2 = (t1 << shift) + (t2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = t2; + s0 = sa[0]; + s1 = sa[1]; +@@ -2241,28 +2241,28 @@ + + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> shift) + (t1 << shift1); + res2 = (t1 >> shift) + (t2 << shift1); + #else + res1 = (t0 << shift) + (t1 >> shift1); + res2 = (t1 << shift) + (t2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = (da[2] >> shift1); + da[2] = (t2 >> shift) + (t0 << shift1); + #else + t0 = (da[2] << shift1); + da[2] = (t2 << shift) + (t0 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da += 2; + dp = (mlib_u8 *) da + (4 - off); + + if ((size & 1) == 0) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[3] = (mlib_u8) (t0 >> 24); + dp[2] = (mlib_u8) (t0 >> 16); + dp[1] = (mlib_u8) (t0 >> 8); +@@ -2272,7 +2272,7 @@ + dp[1] = (mlib_u8) (t0 >> 16); + dp[2] = (mlib_u8) (t0 >> 8); + dp[3] = (mlib_u8) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2348,13 +2348,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2363,13 +2363,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[2]; + s1 = sa[3]; + da[1] = res2; +@@ -2382,13 +2382,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2397,13 +2397,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[1] = res2; + da[2] = res1; + da += 3; +@@ -2455,11 +2455,11 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + da[0] = res; + } +@@ -2468,11 +2468,11 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; + + } +@@ -2496,11 +2496,11 @@ + t2 = tab2[s0]; + t3 = tab3[s0]; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + s0 = sa[0]; + sa++; +@@ -2513,13 +2513,13 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + res1 = res2; + s0 = sa[0]; + da[0] = res; +@@ -2529,21 +2529,21 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (da[1] >> shift1); + da[1] = (res2 >> shift) + (res1 << shift1); + #else + res1 = (da[1] << shift1); + da[1] = (res2 << shift) + (res1 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2617,13 +2617,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2632,13 +2632,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[2]; + s1 = sa[3]; + da[1] = res2; +@@ -2651,13 +2651,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res2 = (t5 << 8) + t4; + #else + da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res2 = (t4 << 24) + (t5 << 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + s1 = sa[1]; + t0 = tab0[s0]; +@@ -2666,13 +2666,13 @@ + t3 = tab0[s1]; + t4 = tab1[s1]; + t5 = tab2[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 += ((t1 << 24) + (t0 << 16)); + res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; + #else + res2 += ((t0 << 8) + t1); + res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[1] = res2; + da[2] = res1; + da += 3; +@@ -2724,11 +2724,11 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + da[0] = res; + } +@@ -2737,11 +2737,11 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; + + } +@@ -2765,11 +2765,11 @@ + t2 = tab2[s0]; + t3 = tab3[s0]; + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + #else + res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + s0 = sa[0]; + sa++; +@@ -2782,13 +2782,13 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + res1 = res2; + s0 = sa[0]; + da[0] = res; +@@ -2798,21 +2798,21 @@ + t1 = tab1[s0]; + t2 = tab2[s0]; + t3 = tab3[s0]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; + res = (res1 >> shift) + (res2 << shift1); + #else + res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; + res = (res1 << shift) + (res2 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (da[1] >> shift1); + da[1] = (res2 >> shift) + (res1 << shift1); + #else + res1 = (da[1] << shift1); + da[1] = (res2 << shift) + (res1 >> shift1); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2863,21 +2863,21 @@ + s0 = tab0[0]; + s1 = tab1[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 16) + s0; + #else + s2 = (s0 << 16) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + tab[i - 1] = s2; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s2 = (s1 << 16) + s0; + #else + s2 = (s0 << 16) + s1; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[255] = s2; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -2919,11 +2919,11 @@ + else { + + t0 = tab[*sa++]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = (mlib_u16) (t0); + #else + *dp++ = (mlib_u16) (t0 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da = (mlib_u32 *) dp; + s0 = sa[0]; + s1 = sa[1]; +@@ -2935,13 +2935,13 @@ + for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) { + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + (t2 << 16); + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + (t2 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = t2; + s0 = sa[0]; + s1 = sa[1]; +@@ -2951,32 +2951,32 @@ + + t1 = tab[s0]; + t2 = tab[s1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + (t2 << 16); + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + (t2 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; + da += 2; + dp = (mlib_u16 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[0] = (mlib_u16) (t2 >> 16); + #else + dp[0] = (mlib_u16) t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + if ((size & 1) == 0) { + t0 = tab[sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[2] = (mlib_u16) (t0 >> 16); + dp[1] = (mlib_u16) t0; + #else + dp[1] = (mlib_u16) (t0 >> 16); + dp[2] = (mlib_u16) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -2994,13 +2994,13 @@ + s1 = tab1[0]; + s2 = tab2[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s3 = (s0 << 16); + s4 = (s2 << 16) + s1; + #else + s3 = s0; + s4 = (s1 << 16) + s2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; +@@ -3008,13 +3008,13 @@ + tab[2 * i - 1] = s4; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s2 << 16) + s1; + tab[510] = s0 << 16; + #else + s4 = (s1 << 16) + s2; + tab[510] = s0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[511] = s4; + + for (j = 0; j < ysize; j++, dst += dlb, src += slb) { +@@ -3050,13 +3050,13 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + t2; + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0] << 3; + s1 = sa[1] << 3; + da[0] = res1; +@@ -3068,13 +3068,13 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t0 >> 16) + (t1 << 16); + res2 = (t1 >> 16) + t2; + #else + res1 = (t0 << 16) + (t1 >> 16); + res2 = (t1 << 16) + t2; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; + da[2] = t3; +@@ -3105,13 +3105,13 @@ + s2 = tab2[0]; + s3 = tab3[0]; + for (i = 1; i < 256; i++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s1 << 16) + s0; + s5 = (s3 << 16) + s2; + #else + s4 = (s0 << 16) + s1; + s5 = (s2 << 16) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = tab0[i]; + s1 = tab1[i]; + s2 = tab2[i]; +@@ -3120,13 +3120,13 @@ + tab[2 * i - 1] = s5; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + s4 = (s1 << 16) + s0; + s5 = (s3 << 16) + s2; + #else + s4 = (s0 << 16) + s1; + s5 = (s2 << 16) + s3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + tab[510] = s4; + tab[511] = s5; + +@@ -3181,18 +3181,18 @@ + + t4 = tab[2 * sa[0]]; + t5 = tab[2 * sa[0] + 1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *dp++ = (mlib_u16) (t4); + #else + *dp++ = (mlib_u16) (t4 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + sa++; + da = (mlib_u32 *) dp; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + *da++ = (t4 >> 16) + (t5 << 16); + #else + *da++ = (t4 << 16) + (t5 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0] << 3; + s1 = sa[1] << 3; + sa += 2; +@@ -3205,7 +3205,7 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t5 >> 16) + (t0 << 16); + res2 = (t0 >> 16) + (t1 << 16); + res3 = (t1 >> 16) + (t2 << 16); +@@ -3215,7 +3215,7 @@ + res2 = (t0 << 16) + (t1 >> 16); + res3 = (t1 << 16) + (t2 >> 16); + res4 = (t2 << 16) + (t3 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0] << 3; + s1 = sa[1] << 3; + da[0] = res1; +@@ -3229,7 +3229,7 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + res1 = (t5 >> 16) + (t0 << 16); + res2 = (t0 >> 16) + (t1 << 16); + res3 = (t1 >> 16) + (t2 << 16); +@@ -3239,36 +3239,36 @@ + res2 = (t0 << 16) + (t1 >> 16); + res3 = (t1 << 16) + (t2 >> 16); + res4 = (t2 << 16) + (t3 >> 16); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + da[0] = res1; + da[1] = res2; + da[2] = res3; + da[3] = res4; + da += 4; + dp = (mlib_u16 *) da; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[0] = (mlib_u16) (t3 >> 16); + #else + dp[0] = (mlib_u16) t3; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + + if ((size & 1) == 0) { + t0 = tab[2 * sa[0]]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[2] = (mlib_u16) (t0 >> 16); + dp[1] = (mlib_u16) t0; + #else + dp[1] = (mlib_u16) (t0 >> 16); + dp[2] = (mlib_u16) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + t0 = tab[2 * sa[0] + 1]; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + dp[4] = (mlib_u16) (t0 >> 16); + dp[3] = (mlib_u16) t0; + #else + dp[3] = (mlib_u16) (t0 >> 16); + dp[4] = (mlib_u16) t0; +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + } + } + } +@@ -3439,7 +3439,7 @@ + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); +@@ -3449,12 +3449,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); +@@ -3464,7 +3464,7 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[4] = t0; + dp[5] = t1; +@@ -3472,7 +3472,7 @@ + dp[7] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); +@@ -3482,12 +3482,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); +@@ -3497,7 +3497,7 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; +@@ -3545,7 +3545,7 @@ + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3559,14 +3559,14 @@ + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3580,7 +3580,7 @@ + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[6] = t0; + dp[7] = t1; +@@ -3590,7 +3590,7 @@ + dp[11] = t5; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3604,14 +3604,14 @@ + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; + dp[4] = t4; + dp[5] = t5; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3625,7 +3625,7 @@ + t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[6] = t0; + dp[7] = t1; + dp[8] = t2; +@@ -3678,7 +3678,7 @@ + #pragma pipeloop(0) + #endif /* __SUNPRO_C */ + for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3688,12 +3688,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); +@@ -3703,12 +3703,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3718,12 +3718,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); +@@ -3733,7 +3733,7 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + s0 = sa[0]; + dp[12] = t0; + dp[13] = t1; +@@ -3741,7 +3741,7 @@ + dp[15] = t3; + } + +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); +@@ -3751,12 +3751,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[0] = t0; + dp[1] = t1; + dp[2] = t2; + dp[3] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); +@@ -3766,12 +3766,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[4] = t0; + dp[5] = t1; + dp[6] = t2; + dp[7] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); +@@ -3781,12 +3781,12 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[8] = t0; + dp[9] = t1; + dp[10] = t2; + dp[11] = t3; +-#ifdef _LITTLE_ENDIAN ++#if (BYTE_ORDER == LITTLE_ENDIAN) + t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); +@@ -3796,7 +3796,7 @@ + t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); + t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); + t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC)); +-#endif /* _LITTLE_ENDIAN */ ++#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + dp[12] = t0; + dp[13] = t1; + dp[14] = t2; +--- ./jdk/src/share/native/sun/awt/medialib/mlib_image.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_image.h 2014-06-06 19:56:34.000000000 -0700 +@@ -27,9 +27,21 @@ + #ifndef MLIB_IMAGE_H + #define MLIB_IMAGE_H + +-#ifdef MACOSX ++#ifdef __OpenBSD__ ++#include ++#endif ++ ++#ifdef _ALLBSD_SOURCE + #include ++ ++/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */ ++#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \ ++ _BYTE_ORDER == _BIG_ENDIAN ++#undef _LITTLE_ENDIAN + #endif ++ ++#endif /* _ALLBSD_SOURCE */ ++ + #include + #include + #include +--- ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2014-06-06 19:56:34.000000000 -0700 +@@ -26,7 +26,7 @@ + + #include + #include +-#ifdef MACOSX ++#ifdef _ALLBSD_SOURCE + #include + #include + #endif +@@ -90,7 +90,10 @@ + * alignment. -- from stdlib.h of MS VC++5.0. + */ + return (void *) malloc(size); +-#elif defined(MACOSX) ++#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013) ++ void *ret; ++ return posix_memalign(&ret, 8, size) ? NULL : ret; ++#elif defined(_ALLBSD_SOURCE) + return valloc(size); + #else + return (void *) memalign(8, size); +--- ./jdk/src/share/native/sun/awt/medialib/mlib_types.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/medialib/mlib_types.h 2014-06-06 19:56:34.000000000 -0700 +@@ -59,7 +59,7 @@ + + #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__) + +-#if defined(MACOSX) ++#if defined(_ALLBSD_SOURCE) + #include /* for ptrdiff_t */ + #include /* for uintptr_t */ + #elif defined(__linux__) +--- ./jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c 2014-01-18 12:16:22.000000000 -0800 +@@ -111,8 +111,9 @@ + int + SplashIsStillLooping(Splash * splash) + { +- if (splash->currentFrame < 0) ++ if (splash->currentFrame < 0) { + return 0; ++ } + return splash->loopCount != 1 || + splash->currentFrame + 1 < splash->frameCount; + } +@@ -121,17 +122,22 @@ + SplashUpdateScreenData(Splash * splash) + { + ImageRect srcRect, dstRect; ++ if (splash->currentFrame < 0) { ++ return; ++ } + + initRect(&srcRect, 0, 0, splash->width, splash->height, 1, + splash->width * sizeof(rgbquad_t), + splash->frames[splash->currentFrame].bitmapBits, &splash->imageFormat); +- if (splash->screenData) ++ if (splash->screenData) { + free(splash->screenData); ++ } + splash->screenStride = splash->width * splash->screenFormat.depthBytes; +- if (splash->byteAlignment > 1) ++ if (splash->byteAlignment > 1) { + splash->screenStride = + (splash->screenStride + splash->byteAlignment - 1) & + ~(splash->byteAlignment - 1); ++ } + splash->screenData = malloc(splash->height * splash->screenStride); + initRect(&dstRect, 0, 0, splash->width, splash->height, 1, + splash->screenStride, splash->screenData, &splash->screenFormat); +@@ -146,16 +152,19 @@ + void + SplashNextFrame(Splash * splash) + { +- if (splash->currentFrame < 0) ++ if (splash->currentFrame < 0) { + return; ++ } + do { +- if (!SplashIsStillLooping(splash)) ++ if (!SplashIsStillLooping(splash)) { + return; ++ } + splash->time += splash->frames[splash->currentFrame].delay; + if (++splash->currentFrame >= splash->frameCount) { + splash->currentFrame = 0; +- if (splash->loopCount > 0) ++ if (splash->loopCount > 0) { + splash->loopCount--; ++ } + } + } while (splash->time + splash->frames[splash->currentFrame].delay - + SplashTime() <= 0); +@@ -183,8 +192,9 @@ + pSrc += pSrcRect->depthBytes; + ++i; + } +- if (i >= pSrcRect->numSamples) ++ if (i >= pSrcRect->numSamples) { + break; ++ } + i0 = i; + while (i < pSrcRect->numSamples && + getRGBA(pSrc, pSrcRect->format) >= ALPHA_THRESHOLD) { +--- ./jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -55,7 +55,7 @@ + (const AlternateSetTable *) ((char *) this + alternateSetTableOffset)); + TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]); + +- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { ++ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate), success)) { + glyphIterator->setCurrGlyphID(SWAPW(alternateSetTable->alternateArray[0])); + } + +--- ./jdk/src/share/native/sun/font/layout/AnchorTables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/AnchorTables.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -37,55 +37,54 @@ + + U_NAMESPACE_BEGIN + +-void AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, +- LEPoint &anchor) const ++void AnchorTable::getAnchor(const LETableReference &base, LEGlyphID glyphID, const LEFontInstance *fontInstance, ++ LEPoint &anchor, LEErrorCode &success) const + { + switch(SWAPW(anchorFormat)) { + case 1: + { +- const Format1AnchorTable *f1 = (const Format1AnchorTable *) this; +- +- f1->getAnchor(fontInstance, anchor); ++ LEReferenceTo f1(base, success); ++ f1->getAnchor(f1, fontInstance, anchor, success); + break; + } + + case 2: + { +- const Format2AnchorTable *f2 = (const Format2AnchorTable *) this; +- +- f2->getAnchor(glyphID, fontInstance, anchor); ++ LEReferenceTo f2(base, success); ++ f2->getAnchor(f2, glyphID, fontInstance, anchor, success); + break; + } + + case 3: + { +- const Format3AnchorTable *f3 = (const Format3AnchorTable *) this; +- +- f3->getAnchor(fontInstance, anchor); ++ LEReferenceTo f3(base, success); ++ f3->getAnchor(f3, fontInstance, anchor, success); + break; + } + + default: ++ { + // unknown format: just use x, y coordinate, like format 1... +- const Format1AnchorTable *f1 = (const Format1AnchorTable *) this; +- +- f1->getAnchor(fontInstance, anchor); ++ LEReferenceTo f1(base, success); ++ f1->getAnchor(f1, fontInstance, anchor, success); + break; + } + } ++} + +-void Format1AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const ++void Format1AnchorTable::getAnchor(const LEReferenceTo& base, const LEFontInstance *fontInstance, LEPoint &anchor, LEErrorCode &success) const + { + le_int16 x = SWAPW(xCoordinate); + le_int16 y = SWAPW(yCoordinate); + LEPoint pixels; + + fontInstance->transformFunits(x, y, pixels); +- + fontInstance->pixelsToUnits(pixels, anchor); + } + +-void Format2AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor) const ++void Format2AnchorTable::getAnchor(const LEReferenceTo& base, ++ LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor ++ , LEErrorCode &success) const + { + LEPoint point; + +@@ -100,7 +99,8 @@ + fontInstance->pixelsToUnits(point, anchor); + } + +-void Format3AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const ++void Format3AnchorTable::getAnchor(const LEReferenceTo &base, const LEFontInstance *fontInstance, ++ LEPoint &anchor, LEErrorCode &success) const + { + le_int16 x = SWAPW(xCoordinate); + le_int16 y = SWAPW(yCoordinate); +@@ -111,15 +111,15 @@ + fontInstance->transformFunits(x, y, pixels); + + if (dtxOffset != 0) { +- const DeviceTable *dtx = (const DeviceTable *) ((char *) this + dtxOffset); +- le_int16 adjx = dtx->getAdjustment((le_int16) fontInstance->getXPixelsPerEm()); ++ LEReferenceTo dt(base, success, dtxOffset); ++ le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success); + + pixels.fX += adjx; + } + + if (dtyOffset != 0) { +- const DeviceTable *dty = (const DeviceTable *) ((char *) this + dtyOffset); +- le_int16 adjy = dty->getAdjustment((le_int16) fontInstance->getYPixelsPerEm()); ++ LEReferenceTo dt(base, success, dtyOffset); ++ le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success); + + pixels.fY += adjy; + } +--- ./jdk/src/share/native/sun/font/layout/AnchorTables.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/AnchorTables.h 2014-01-18 12:16:22.000000000 -0800 +@@ -49,20 +49,23 @@ + le_int16 xCoordinate; + le_int16 yCoordinate; + +- void getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, +- LEPoint &anchor) const; ++ void getAnchor(const LETableReference &base, LEGlyphID glyphID, const LEFontInstance *fontInstance, ++ LEPoint &anchor, LEErrorCode &success) const; + }; + + struct Format1AnchorTable : AnchorTable + { +- void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const; ++ void getAnchor(const LEReferenceTo& base, ++ const LEFontInstance *fontInstance, LEPoint &anchor, LEErrorCode &success) const; + }; + + struct Format2AnchorTable : AnchorTable + { + le_uint16 anchorPoint; + +- void getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor) const; ++ void getAnchor(const LEReferenceTo& base, ++ LEGlyphID glyphID, const LEFontInstance *fontInstance, ++ LEPoint &anchor, LEErrorCode &success) const; + }; + + struct Format3AnchorTable : AnchorTable +@@ -70,7 +73,9 @@ + Offset xDeviceTableOffset; + Offset yDeviceTableOffset; + +- void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const; ++ void getAnchor(const LEReferenceTo& base, ++ const LEFontInstance *fontInstance, LEPoint &anchor, ++ LEErrorCode &success) const; + }; + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -51,7 +51,7 @@ + + U_NAMESPACE_BEGIN + +-le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const ++le_bool CharSubstitutionFilter::accept(LEGlyphID glyph, LEErrorCode &/*success*/) const + { + return fFontInstance->canDisplay((LEUnicode) glyph); + } +@@ -147,7 +147,9 @@ + GDEFMarkFilter filter(fGDEFTable, success); + adjustMarkGlyphs(glyphStorage, &filter, success); + } else { +- LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); ++ LEReferenceTo gdefTable(LETableReference::kStaticData, ++ CanonShaping::glyphDefinitionTable, ++ CanonShaping::glyphDefinitionTableLen); + GDEFMarkFilter filter(gdefTable, success); + + adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); +@@ -157,8 +159,8 @@ + UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) + : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success) + { +- fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable; +- fGDEFTable = (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; ++ fGSUBTable.setTo(LETableReference::kStaticData, (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable, CanonShaping::glyphSubstitutionTableLen); ++ fGDEFTable.setTo(LETableReference::kStaticData, (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + /* OpenTypeLayoutEngine will allocate a substitution filter */ + } + +--- ./jdk/src/share/native/sun/font/layout/ArabicShaping.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ArabicShaping.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -59,7 +59,8 @@ + ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c) + { + LEErrorCode success = LE_NO_ERROR; +- const LEReferenceTo joiningTypes((const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, ++ const LEReferenceTo joiningTypes(LETableReference::kStaticData, ++ (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, + ArabicShaping::shapingTypeTableLen); + le_int32 joiningType = joiningTypes->getGlyphClass(joiningTypes, c, success); + +--- ./jdk/src/share/native/sun/font/layout/CanonShaping.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/CanonShaping.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -60,7 +60,7 @@ + LEUnicode *outChars, LEGlyphStorage &glyphStorage) + { + LEErrorCode success = LE_NO_ERROR; +- LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); ++ LEReferenceTo gdefTable(LETableReference::kStaticData, CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + LEReferenceTo classTable = gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success); + le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount); + le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount); +--- ./jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h 2014-01-18 12:16:22.000000000 -0800 +@@ -43,6 +43,8 @@ + * This filter is used by character-based GSUB processors. It + * accepts only those characters which the given font can display. * - * This code is free software; you can redistribute it and/or modify it -@@ -45,8 +45,8 @@ - protected final Object[][] getContents() { - String ACT[] = new String[] {"Acre \u65f6\u95f4", "ACT", - "Acre \u590f\u4ee4\u65f6", "ACST"}; -- String ADELAIDE[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5357\u6fb3\u5927\u5229\u4e9a\uff09", "CST", -- "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5357\u6fb3\u5927\u5229\u4e9a\uff09", "CST"}; -+ String ADELAIDE[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST", -+ "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A)", "CST"}; - String AGT[] = new String[] {"\u963f\u6839\u5ef7\u65f6\u95f4", "ART", - "\u963f\u6839\u5ef7\u590f\u4ee4\u65f6", "ARST"}; - String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6807\u51c6\u65f6\u95f4", "AKST", -@@ -61,10 +61,10 @@ - "\u5927\u897f\u6d0b\u590f\u4ee4\u65f6", "ADT"}; - String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u65f6\u95f4", "BDT", - "\u5b5f\u52a0\u62c9\u590f\u4ee4\u65f6", "BDST"}; -- String BRISBANE[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6606\u58eb\u5170\uff09", "EST", -- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u6606\u58eb\u5170\uff09", "EST"}; -- String BROKEN_HILL[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5357\u6fb3\u5927\u5229\u4e9a/\u65b0\u5357\u5a01\u5c14\u65af\uff09", "CST", -- "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5357\u6fb3\u5927\u5229\u4e9a/\u65b0\u5357\u5a01\u5c14\u65af\uff09", "CST"}; -+ String BRISBANE[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u6606\u58EB\u5170)", "EST", -+ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u6606\u58EB\u5170)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST", -+ "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5357\u6FB3\u5927\u5229\u4E9A/\u65B0\u5357\u5A01\u5C14\u65AF)", "CST"}; - String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9a\u65f6\u95f4", "BRT", - "\u5df4\u897f\u5229\u4e9a\u590f\u4ee4\u65f6", "BRST"}; - String BTT[] = new String[] {"\u4e0d\u4e39\u65f6\u95f4", "BTT", -@@ -77,9 +77,9 @@ - "\u67e5\u8428\u59c6\u590f\u4ee4\u65f6", "CHADT"}; - String ChST[] = new String[] {"Chamorro \u6807\u51c6\u65f6\u95f4", "ChST", - "Chamorro \u590f\u4ee4\u65f6", "ChDT"}; -- String CHUT[] = new String[] {"Chuuk Time", "CHUT", -- "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "CIT", -+ String CHUT[] = new String[] {"\u4E18\u514B\u65F6\u95F4", "CHUT", -+ "\u4E18\u514B\u590F\u4EE4\u65F6", "CHUST"}; -+ String CIT[] = new String[] {"\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WITA", - "\u4e2d\u90e8\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "CIST"}; - String CLT[] = new String[] {"\u667a\u5229\u65f6\u95f4", "CLT", - "\u667a\u5229\u590f\u4ee4\u65f6", "CLST"}; -@@ -89,8 +89,8 @@ - "\u4e2d\u56fd\u590f\u4ee4\u65f6", "CDT"}; - String CUBA[] = new String[] {"\u53e4\u5df4\u6807\u51c6\u65f6\u95f4", "CST", - "\u53e4\u5df4\u590f\u4ee4\u65f6", "CDT"}; -- String DARWIN[] = new String[] {"\u4e2d\u592e\u6807\u51c6\u65f6\u95f4\uff08\u5317\u9886\u5730\uff09", "CST", -- "\u4e2d\u592e\u590f\u4ee4\u65f6\uff08\u5317\u9886\u5730\uff09", "CST"}; -+ String DARWIN[] = new String[] {"\u4E2D\u592E\u6807\u51C6\u65F6\u95F4 (\u5317\u9886\u5730)", "CST", -+ "\u4E2D\u592E\u590F\u4EE4\u65F6 (\u5317\u9886\u5730)", "CST"}; - String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", - "\u7231\u5c14\u5170\u590f\u4ee4\u65f6", "IST"}; - String EAT[] = new String[] {"\u4e1c\u975e\u65f6\u95f4", "EAT", -@@ -103,10 +103,10 @@ - "\u4e1c\u683c\u6797\u5c9b\u590f\u4ee4\u65f6", "EGST"}; - String EST[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4", "EST", - "\u4e1c\u90e8\u590f\u4ee4\u65f6", "EDT"}; -- String EST_NSW[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09", "EST", -- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u65b0\u5357\u5a01\u5c14\u65af\uff09", "EST"}; -- String FET[] = new String[] {"Further-eastern European Time", "FET", -- "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST", -+ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u65B0\u5357\u5A01\u5C14\u65AF)", "EST"}; -+ String FET[] = new String[] {"\u8FDC\u4E1C\u6B27\u65F6\u95F4", "FET", -+ "\u8FDC\u4E1C\u6B27\u590F\u4EE4\u65F6", "FEST"}; - String GHMT[] = new String[] {"\u52a0\u7eb3\u65f6\u95f4", "GMT", - "\u52a0\u7eb3\u590f\u4ee4\u65f6", "GHST"}; - String GAMBIER[] = new String[] {"\u5188\u6bd4\u4e9a\u65f6\u95f4", "GAMT", -@@ -159,8 +159,8 @@ - "\u76ae\u7279\u5eb7\u5c9b\u590f\u4ee4\u65f6", "PDT"}; - String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u65f6\u95f4", "PKT", - "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u65f6", "PKST"}; -- String PONT[] = new String[] {"Pohnpei Time", "PONT", -- "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"\u6CE2\u7EB3\u4F69\u65F6\u95F4", "PONT", -+ "\u6CE2\u7EB3\u4F69\u590F\u4EE4\u65F6", "PONST"}; - String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6807\u51c6\u65f6\u95f4", "PST", - "\u592a\u5e73\u6d0b\u590f\u4ee4\u65f6", "PDT"}; - String SAMOA[] = new String[] {"\u8428\u6469\u4e9a\u7fa4\u5c9b\u6807\u51c6\u65f6\u95f4", "SST", -@@ -173,8 +173,8 @@ - "\u65b0\u52a0\u5761\u590f\u4ee4\u65f6", "SGST"}; - String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u65f6\u95f4", "GMT", - "\u585e\u62c9\u5229\u6602\u590f\u4ee4\u65f6", "SLST"}; -- String TASMANIA[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u5854\u65af\u9a6c\u5c3c\u4e9a\uff09", "EST", -- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u5854\u65af\u9a6c\u5c3c\u4e9a\uff09", "EST"}; -+ String TASMANIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST", -+ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u5854\u65AF\u9A6C\u5C3C\u4E9A)", "EST"}; - String TMT[] = new String[] {"\u571f\u5e93\u66fc\u65f6\u95f4", "TMT", - "\u571f\u5e93\u66fc\u590f\u4ee4\u65f6", "TMST"}; - String ULAT[]= new String[] {"\u5e93\u4f26\u65f6\u95f4", "ULAT", -@@ -183,8 +183,8 @@ - "\u534f\u8c03\u4e16\u754c\u65f6\u95f4", "UTC"}; - String UZT[] = new String[] {"\u4e4c\u5179\u522b\u514b\u65af\u5766\u65f6\u95f4", "UZT", - "\u4e4c\u5179\u522b\u514b\u65af\u5766\u590f\u4ee4\u65f6", "UZST"}; -- String VICTORIA[] = new String[] {"\u4e1c\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u7ef4\u591a\u5229\u4e9a\uff09", "EST", -- "\u4e1c\u90e8\u590f\u4ee4\u65f6\uff08\u7ef4\u591a\u5229\u4e9a\uff09", "EST"}; -+ String VICTORIA[] = new String[] {"\u4E1C\u90E8\u6807\u51C6\u65F6\u95F4 (\u7EF4\u591A\u5229\u4E9A)", "EST", -+ "\u4E1C\u90E8\u590F\u4EE4\u65F6 (\u7EF4\u591A\u5229\u4E9A)", "EST"}; - String VLAT[] = new String[] {"\u6d77\u53c2\u5d34\u65f6\u95f4", "VLAT", - "\u6d77\u53c2\u5d34\u590f\u4ee4\u65f6", "VLAST"}; - String WART[] = new String[] {"\u897f\u963f\u6839\u5ef7\u65f6\u95f4", "WART", -@@ -193,10 +193,10 @@ - "\u897f\u975e\u590f\u4ee4\u65f6", "WAST"}; - String WET[] = new String[] {"\u897f\u6b27\u65f6\u95f4", "WET", - "\u897f\u6b27\u590f\u4ee4\u65f6", "WEST"}; -- String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT", -+ String WIT[] = new String[] {"\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIB", - "\u897f\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "WIST"}; -- String WST_AUS[] = new String[] {"\u897f\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "WST", -- "\u897f\u90e8\u590f\u4ee4\u65f6\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "WST"}; -+ String WST_AUS[] = new String[] {"\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "WST", -+ "\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "WST"}; - String WST_SAMOA[] = new String[] {"\u897f\u8428\u6469\u4e9a\u65f6\u95f4", "WST", - "\u897f\u8428\u6469\u4e9a\u590f\u4ee4\u65f6", "WSDT"}; - String YAKT[] = new String[] {"\u4e9a\u5e93\u6b21\u514b\u65f6\u95f4", "YAKT", -@@ -291,7 +291,7 @@ - {"Africa/Porto-Novo", WAT}, - {"Africa/Sao_Tome", GMT}, - {"Africa/Timbuktu", GMT}, -- {"Africa/Tripoli", CET}, -+ {"Africa/Tripoli", EET}, - {"Africa/Tunis", CET}, - {"Africa/Windhoek", WAT}, - {"America/Adak", HAST}, -@@ -308,7 +308,7 @@ - {"America/Argentina/Rio_Gallegos", AGT}, - {"America/Argentina/Salta", AGT}, - {"America/Argentina/San_Juan", AGT}, -- {"America/Argentina/San_Luis", WART}, -+ {"America/Argentina/San_Luis", AGT}, - {"America/Argentina/Tucuman", AGT}, - {"America/Argentina/Ushuaia", AGT}, - {"America/Aruba", AST}, -@@ -349,7 +349,7 @@ - {"America/Detroit", EST}, - {"America/Dominica", AST}, - {"America/Edmonton", MST}, -- {"America/Eirunepe", AMT}, -+ {"America/Eirunepe", ACT}, - {"America/El_Salvador", CST}, - {"America/Ensenada", PST}, - {"America/Fort_Wayne", EST}, -@@ -401,8 +401,8 @@ - {"America/Mendoza", AGT}, - {"America/Menominee", CST}, - {"America/Merida", CST}, -- {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", -- "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6807\u51C6\u65F6\u95F4", "MeST", -+ "\u6885\u7279\u62C9\u5361\u7279\u62C9\u590F\u4EE4\u65F6", "MeDT"}}, - {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u6807\u51c6\u65f6\u95f4", "PMST", - "\u76ae\u57c3\u5c14\u5c9b\u53ca\u5bc6\u514b\u9686\u5c9b\u590f\u4ee4\u65f6", "PMDT"}}, -@@ -426,7 +426,7 @@ - "\u82cf\u5229\u5357\u590f\u4ee4\u65f6", "SRST"}}, - {"America/Port-au-Prince", EST}, - {"America/Port_of_Spain", AST}, -- {"America/Porto_Acre", AMT}, -+ {"America/Porto_Acre", ACT}, - {"America/Porto_Velho", AMT}, - {"America/Puerto_Rico", AST}, - {"America/Rainy_River", CST}, -@@ -434,7 +434,7 @@ - {"America/Recife", BRT}, - {"America/Regina", CST}, - {"America/Resolute", CST}, -- {"America/Rio_Branco", AMT}, -+ {"America/Rio_Branco", ACT}, - {"America/Rosario", AGT}, - {"America/Santa_Isabel", PST}, - {"America/Santarem", BRT}, -@@ -466,8 +466,8 @@ - "\u6234\u7ef4\u65af\u590f\u4ee4\u65f6", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u65f6\u95f4", "DDUT", - "Dumont-d'Urville \u590f\u4ee4\u65f6", "DDUST"}}, -- {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", -- "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"\u9EA6\u5938\u91CC\u5C9B\u65F6\u95F4", "MIST", -+ "\u9EA6\u5938\u91CC\u5C9B\u590F\u4EE4\u65F6", "MIST"}}, - {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u65f6\u95f4", "MAWT", - "\u83ab\u68ee\u590f\u4ee4\u65f6", "MAWST"}}, - {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "\u4f0a\u5c14\u5e93\u6b21\u514b\u590f\u4ee4\u65f6", "IRKST"}}, - {"Asia/Istanbul", EET}, - {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "EIT", -+ {"Asia/Jayapura", new String[] {"\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u65f6\u95f4", "WIT", - "\u4e1c\u5370\u5ea6\u5c3c\u897f\u4e9a\u590f\u4ee4\u65f6", "EIST"}}, - {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u65f6\u95f4", "AFT", - "\u963f\u5bcc\u6c57\u590f\u4ee4\u65f6", "AFST"}}, -@@ -537,7 +537,8 @@ - {"Asia/Kashgar", CTT}, - {"Asia/Kathmandu", NPT}, - {"Asia/Katmandu", NPT}, -- {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"\u6C49\u5FB7\u52A0\u65F6\u95F4", "YAKT", -+ "\u6C49\u5FB7\u52A0\u590F\u4EE4\u65F6", "YAKST"}}, - {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u65f6\u95f4", "KRAT", - "\u514b\u62c9\u65af\u8bfa\u4e9a\u5c14\u65af\u514b\u590f\u4ee4\u65f6", "KRAST"}}, -@@ -586,7 +587,8 @@ - {"Asia/Ulaanbaatar", ULAT}, - {"Asia/Ulan_Bator", ULAT}, - {"Asia/Urumqi", CTT}, -- {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"\u4E4C\u65AF\u5B63\u6D85\u62C9\u65F6\u95F4", "VLAT", -+ "\u4E4C\u65AF\u5B63\u6D85\u62C9\u590F\u4EE4\u65F6", "VLAST"}}, - {"Asia/Vientiane", ICT}, - {"Asia/Vladivostok", VLAT}, - {"Asia/Yakutsk", YAKT}, -@@ -616,8 +618,8 @@ - {"Australia/Canberra", EST_NSW}, - {"Australia/Currie", EST_NSW}, - {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6807\u51c6\u65f6\u95f4\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "CWST", -- "\u4e2d\u897f\u90e8\u590f\u4ee4\u65f6\uff08\u6fb3\u5927\u5229\u4e9a\uff09", "CWST"}}, -+ {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6807\u51C6\u65F6\u95F4 (\u6FB3\u5927\u5229\u4E9A)", "CWST", -+ "\u4E2D\u897F\u90E8\u590F\u4EE4\u65F6 (\u6FB3\u5927\u5229\u4E9A)", "CWST"}}, - {"Australia/Hobart", TASMANIA}, - {"Australia/LHI", LORD_HOWE}, - {"Australia/Lindeman", BRISBANE}, -@@ -635,7 +637,7 @@ - {"Australia/Yancowinna", BROKEN_HILL}, - {"BET", BRT}, - {"BST", BDT}, -- {"Brazil/Acre", AMT}, -+ {"Brazil/Acre", ACT}, - {"Brazil/DeNoronha", NORONHA}, - {"Brazil/East", BRT}, - {"Brazil/West", AMT}, -@@ -753,7 +755,7 @@ - {"Jamaica", EST}, - {"Japan", JST}, - {"Kwajalein", MHT}, -- {"Libya", CET}, -+ {"Libya", EET}, - {"MET", new String[] {"\u4e2d\u6b27\u65f6\u95f4", "MET", - "\u4e2d\u6b27\u590f\u4ee4\u65f6", "MEST"}}, - {"Mexico/BajaNorte", PST}, ---- jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java 2013-09-06 11:28:53.000000000 -0700 -+++ jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java 2014-04-20 12:39:21.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * Note: Implementation is in ArabicLayoutEngine.cpp ++ * + * @internal + */ + class CharSubstitutionFilter : public UMemory, public LEGlyphFilter +@@ -97,7 +99,7 @@ + * + * @internal + */ +- le_bool accept(LEGlyphID glyph) const; ++ le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; + }; + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h 2014-01-18 12:16:22.000000000 -0800 +@@ -49,6 +49,7 @@ + le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; + le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const; + ++#if LE_ENABLE_RAW + le_int32 getGlyphClass(LEGlyphID glyphID) const { + LETableReference base((const le_uint8*)this); + LEErrorCode ignored = LE_NO_ERROR; +@@ -60,6 +61,7 @@ + LEErrorCode ignored = LE_NO_ERROR; + return hasGlyphClass(base,glyphClass,ignored); + } ++#endif + }; + + struct ClassDefFormat1Table : ClassDefinitionTable +--- ./jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -154,6 +154,7 @@ + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); + if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) { + LEReferenceToArrayOf valueArray(lookupTable8, success, &lookupTable8->valueArray[0], glyphCount); ++ if (LE_FAILURE(success)) { return newGlyph; } + newGlyph = SWAPW(valueArray(glyphCode - firstGlyph, success)); + } + } +--- ./jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -48,7 +48,7 @@ + */ + void ContextualSubstitutionBase::applySubstitutionLookups( + const LookupProcessor *lookupProcessor, +- const SubstitutionLookupRecord *substLookupRecordArray, ++ const LEReferenceToArrayOf& substLookupRecordArray, + le_uint16 substCount, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, +@@ -60,10 +60,11 @@ + } + + GlyphIterator tempIterator(*glyphIterator); ++ const SubstitutionLookupRecord *substLookupRecordArrayPtr = substLookupRecordArray.getAlias(); // OK to dereference, range checked against substCount below. + + for (le_int16 subst = 0; subst < substCount && LE_SUCCESS(success); subst += 1) { +- le_uint16 sequenceIndex = SWAPW(substLookupRecordArray[subst].sequenceIndex); +- le_uint16 lookupListIndex = SWAPW(substLookupRecordArray[subst].lookupListIndex); ++ le_uint16 sequenceIndex = SWAPW(substLookupRecordArrayPtr[subst].sequenceIndex); ++ le_uint16 lookupListIndex = SWAPW(substLookupRecordArrayPtr[subst].lookupListIndex); + + tempIterator.setCurrStreamPosition(position); + tempIterator.next(sequenceIndex); +@@ -72,7 +73,7 @@ + } + } + +-le_bool ContextualSubstitutionBase::matchGlyphIDs(const TTGlyphID *glyphArray, le_uint16 glyphCount, ++le_bool ContextualSubstitutionBase::matchGlyphIDs(const LEReferenceToArrayOf& glyphArray, le_uint16 glyphCount, + GlyphIterator *glyphIterator, le_bool backtrack) + { + le_int32 direction = 1; +@@ -101,11 +102,16 @@ + return TRUE; + } + +-le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArray, le_uint16 glyphCount, ++le_bool ContextualSubstitutionBase::matchGlyphClasses( ++ const LEReferenceToArrayOf &classArray, ++ le_uint16 glyphCount, + GlyphIterator *glyphIterator, +- const ClassDefinitionTable *classDefinitionTable, ++ const LEReferenceTo &classDefinitionTable, ++ LEErrorCode &success, + le_bool backtrack) + { ++ if (LE_FAILURE(success)) { return FALSE; } ++ + le_int32 direction = 1; + le_int32 match = 0; + +@@ -120,7 +126,7 @@ + } + + LEGlyphID glyph = glyphIterator->getCurrGlyphID(); +- le_int32 glyphClass = classDefinitionTable->getGlyphClass(glyph); ++ le_int32 glyphClass = classDefinitionTable->getGlyphClass(classDefinitionTable, glyph, success); + le_int32 matchClass = SWAPW(classArray[match]); + + if (glyphClass != matchClass) { +@@ -128,7 +134,7 @@ + // in the class array which aren't in the class definition + // table. If we're looking for such a class, pretend that + // we found it. +- if (classDefinitionTable->hasGlyphClass(matchClass)) { ++ if (classDefinitionTable->hasGlyphClass(classDefinitionTable, matchClass, success)) { + return FALSE; + } + } +@@ -140,8 +146,8 @@ + return TRUE; + } + +-le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTableOffsetArray, le_uint16 glyphCount, +- GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack) ++le_bool ContextualSubstitutionBase::matchGlyphCoverages(const LEReferenceToArrayOf &coverageTableOffsetArray, le_uint16 glyphCount, ++GlyphIterator *glyphIterator, const LETableReference &offsetBase, LEErrorCode &success, le_bool backtrack) + { + le_int32 direction = 1; + le_int32 glyph = 0; +@@ -153,13 +159,15 @@ + + while (glyphCount > 0) { + Offset coverageTableOffset = SWAPW(coverageTableOffsetArray[glyph]); +- const CoverageTable *coverageTable = (const CoverageTable *) (offsetBase + coverageTableOffset); ++ LEReferenceTo coverageTable(offsetBase, success, coverageTableOffset); + +- if (! glyphIterator->next()) { ++ if (LE_FAILURE(success) || ! glyphIterator->next()) { + return FALSE; + } + +- if (coverageTable->getGlyphCoverage((LEGlyphID) glyphIterator->getCurrGlyphID()) < 0) { ++ if (coverageTable->getGlyphCoverage(coverageTable, ++ (LEGlyphID) glyphIterator->getCurrGlyphID(), ++ success) < 0) { + return FALSE; + } + +@@ -170,7 +178,7 @@ + return TRUE; + } + +-le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ContextualSubstitutionSubtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const +@@ -186,20 +194,29 @@ + + case 1: + { +- const ContextualSubstitutionFormat1Subtable *subtable = (const ContextualSubstitutionFormat1Subtable *) this; +- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); ++ LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat1Subtable *) this); ++ if( LE_FAILURE(success) ) { ++ return 0; ++ } ++ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + } + + case 2: + { +- const ContextualSubstitutionFormat2Subtable *subtable = (const ContextualSubstitutionFormat2Subtable *) this; +- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); ++ LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat2Subtable *) this); ++ if( LE_FAILURE(success) ) { ++ return 0; ++ } ++ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + } + + case 3: + { +- const ContextualSubstitutionFormat3Subtable *subtable = (const ContextualSubstitutionFormat3Subtable *) this; +- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); ++ LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat3Subtable *) this); ++ if( LE_FAILURE(success) ) { ++ return 0; ++ } ++ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + } + + default: +@@ -207,7 +224,7 @@ + } + } + +-le_uint32 ContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ContextualSubstitutionFormat1Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const +@@ -227,22 +244,23 @@ + + if (coverageIndex < srSetCount) { + Offset subRuleSetTableOffset = SWAPW(subRuleSetTableOffsetArray[coverageIndex]); +- const SubRuleSetTable *subRuleSetTable = +- (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset); ++ LEReferenceTo ++ subRuleSetTable(base, success, (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset)); + le_uint16 subRuleCount = SWAPW(subRuleSetTable->subRuleCount); + le_int32 position = glyphIterator->getCurrStreamPosition(); + + for (le_uint16 subRule = 0; subRule < subRuleCount; subRule += 1) { + Offset subRuleTableOffset = + SWAPW(subRuleSetTable->subRuleTableOffsetArray[subRule]); +- const SubRuleTable *subRuleTable = +- (const SubRuleTable *) ((char *) subRuleSetTable + subRuleTableOffset); ++ LEReferenceTo ++ subRuleTable(subRuleSetTable, success, subRuleTableOffset); + le_uint16 matchCount = SWAPW(subRuleTable->glyphCount) - 1; + le_uint16 substCount = SWAPW(subRuleTable->substCount); +- +- if (matchGlyphIDs(subRuleTable->inputGlyphArray, matchCount, glyphIterator)) { +- const SubstitutionLookupRecord *substLookupRecordArray = +- (const SubstitutionLookupRecord *) &subRuleTable->inputGlyphArray[matchCount]; ++ LEReferenceToArrayOf inputGlyphArray(base, success, subRuleTable->inputGlyphArray, matchCount+2); ++ if (LE_FAILURE(success)) { return 0; } ++ if (matchGlyphIDs(inputGlyphArray, matchCount, glyphIterator)) { ++ LEReferenceToArrayOf ++ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &subRuleTable->inputGlyphArray[matchCount], substCount); + + applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); + +@@ -259,7 +277,8 @@ + return 0; + } + +-le_uint32 ContextualSubstitutionFormat2Subtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ContextualSubstitutionFormat2Subtable::process(const LETableReference &base, ++ const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const +@@ -275,29 +294,34 @@ + } + + if (coverageIndex >= 0) { +- const ClassDefinitionTable *classDefinitionTable = +- (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset)); ++ LEReferenceTo classDefinitionTable(base, success, ++ (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset))); + le_uint16 scSetCount = SWAPW(subClassSetCount); +- le_int32 setClass = classDefinitionTable->getGlyphClass(glyphIterator->getCurrGlyphID()); ++ le_int32 setClass = classDefinitionTable->getGlyphClass(classDefinitionTable, ++ glyphIterator->getCurrGlyphID(), ++ success); + + if (setClass < scSetCount && subClassSetTableOffsetArray[setClass] != 0) { + Offset subClassSetTableOffset = SWAPW(subClassSetTableOffsetArray[setClass]); +- const SubClassSetTable *subClassSetTable = +- (const SubClassSetTable *) ((char *) this + subClassSetTableOffset); ++ LEReferenceTo ++ subClassSetTable(base, success, (const SubClassSetTable *) ((char *) this + subClassSetTableOffset)); + le_uint16 subClassRuleCount = SWAPW(subClassSetTable->subClassRuleCount); + le_int32 position = glyphIterator->getCurrStreamPosition(); + + for (le_uint16 scRule = 0; scRule < subClassRuleCount; scRule += 1) { + Offset subClassRuleTableOffset = + SWAPW(subClassSetTable->subClassRuleTableOffsetArray[scRule]); +- const SubClassRuleTable *subClassRuleTable = +- (const SubClassRuleTable *) ((char *) subClassSetTable + subClassRuleTableOffset); ++ LEReferenceTo ++ subClassRuleTable(subClassSetTable, success, subClassRuleTableOffset); + le_uint16 matchCount = SWAPW(subClassRuleTable->glyphCount) - 1; + le_uint16 substCount = SWAPW(subClassRuleTable->substCount); + +- if (matchGlyphClasses(subClassRuleTable->classArray, matchCount, glyphIterator, classDefinitionTable)) { +- const SubstitutionLookupRecord *substLookupRecordArray = +- (const SubstitutionLookupRecord *) &subClassRuleTable->classArray[matchCount]; ++ LEReferenceToArrayOf classArray(base, success, subClassRuleTable->classArray, matchCount+1); ++ ++ if (LE_FAILURE(success)) { return 0; } ++ if (matchGlyphClasses(classArray, matchCount, glyphIterator, classDefinitionTable, success)) { ++ LEReferenceToArrayOf ++ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &subClassRuleTable->classArray[matchCount], substCount); + + applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); + +@@ -314,7 +338,8 @@ + return 0; + } + +-le_uint32 ContextualSubstitutionFormat3Subtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ContextualSubstitutionFormat3Subtable::process(const LETableReference &base, ++ const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success)const +@@ -333,9 +358,13 @@ + // that matched when we're done. + glyphIterator->prev(); + +- if (ContextualSubstitutionBase::matchGlyphCoverages(coverageTableOffsetArray, gCount, glyphIterator, (const char *) this)) { +- const SubstitutionLookupRecord *substLookupRecordArray = +- (const SubstitutionLookupRecord *) &coverageTableOffsetArray[gCount]; ++ LEReferenceToArrayOf covTableOffsetArray(base, success, coverageTableOffsetArray, gCount); ++ ++ if( LE_FAILURE(success) ) { return 0; } ++ ++ if (ContextualSubstitutionBase::matchGlyphCoverages(covTableOffsetArray, gCount, glyphIterator, base, success)) { ++ LEReferenceToArrayOf ++ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &coverageTableOffsetArray[gCount], subCount); + + ContextualSubstitutionBase::applySubstitutionLookups(lookupProcessor, substLookupRecordArray, subCount, glyphIterator, fontInstance, position, success); + +@@ -347,7 +376,8 @@ + return 0; + } + +-le_uint32 ChainingContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ChainingContextualSubstitutionSubtable::process(const LEReferenceTo &base, ++ const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const +@@ -363,20 +393,23 @@ + + case 1: + { +- const ChainingContextualSubstitutionFormat1Subtable *subtable = (const ChainingContextualSubstitutionFormat1Subtable *) this; +- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); ++ LEReferenceTo subtable(base, success, (ChainingContextualSubstitutionFormat1Subtable *) this); ++ if(LE_FAILURE(success)) return 0; ++ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + } + + case 2: + { +- const ChainingContextualSubstitutionFormat2Subtable *subtable = (const ChainingContextualSubstitutionFormat2Subtable *) this; +- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); ++ LEReferenceTo subtable(base, success, (const ChainingContextualSubstitutionFormat2Subtable *) this); ++ if( LE_FAILURE(success) ) { return 0; } ++ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + } + + case 3: + { +- const ChainingContextualSubstitutionFormat3Subtable *subtable = (const ChainingContextualSubstitutionFormat3Subtable *) this; +- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); ++ LEReferenceTo subtable(base, success, (const ChainingContextualSubstitutionFormat3Subtable *) this); ++ if( LE_FAILURE(success) ) { return 0; } ++ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + } + + default: +@@ -390,7 +423,7 @@ + // emptyFeatureList matches an le_uint32 or an le_uint16... + static const FeatureMask emptyFeatureList = 0x00000000UL; + +-le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const +@@ -410,8 +443,8 @@ + + if (coverageIndex < srSetCount) { + Offset chainSubRuleSetTableOffset = SWAPW(chainSubRuleSetTableOffsetArray[coverageIndex]); +- const ChainSubRuleSetTable *chainSubRuleSetTable = +- (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset); ++ LEReferenceTo ++ chainSubRuleSetTable(base, success, (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset)); + le_uint16 chainSubRuleCount = SWAPW(chainSubRuleSetTable->chainSubRuleCount); + le_int32 position = glyphIterator->getCurrStreamPosition(); + GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); +@@ -419,13 +452,19 @@ + for (le_uint16 subRule = 0; subRule < chainSubRuleCount; subRule += 1) { + Offset chainSubRuleTableOffset = + SWAPW(chainSubRuleSetTable->chainSubRuleTableOffsetArray[subRule]); +- const ChainSubRuleTable *chainSubRuleTable = +- (const ChainSubRuleTable *) ((char *) chainSubRuleSetTable + chainSubRuleTableOffset); ++ LEReferenceTo ++ chainSubRuleTable = LEReferenceTo(chainSubRuleSetTable, success, chainSubRuleTableOffset); ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 backtrackGlyphCount = SWAPW(chainSubRuleTable->backtrackGlyphCount); ++ LEReferenceToArrayOf backtrackGlyphArray(base, success, chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount); ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 inputGlyphCount = (le_uint16) SWAPW(chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount]) - 1; +- const TTGlyphID *inputGlyphArray = &chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount + 1]; ++ LEReferenceToArrayOf inputGlyphArray(base, success, &chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount + 1], inputGlyphCount+2); ++ ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 lookaheadGlyphCount = (le_uint16) SWAPW(inputGlyphArray[inputGlyphCount]); +- const TTGlyphID *lookaheadGlyphArray = &inputGlyphArray[inputGlyphCount + 1]; ++ LEReferenceToArrayOf lookaheadGlyphArray(base, success, inputGlyphArray.getAlias(inputGlyphCount + 1,success), lookaheadGlyphCount+2); ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 substCount = (le_uint16) SWAPW(lookaheadGlyphArray[lookaheadGlyphCount]); + + tempIterator.setCurrStreamPosition(position); +@@ -435,7 +474,8 @@ + } + + tempIterator.prev(); +- if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) { ++ ++ if (! matchGlyphIDs(backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) { + continue; + } + +@@ -446,8 +486,8 @@ + } + + if (matchGlyphIDs(inputGlyphArray, inputGlyphCount, glyphIterator)) { +- const SubstitutionLookupRecord *substLookupRecordArray = +- (const SubstitutionLookupRecord *) &lookaheadGlyphArray[lookaheadGlyphCount + 1]; ++ LEReferenceToArrayOf ++ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) lookaheadGlyphArray.getAlias(lookaheadGlyphCount + 1,success), substCount); + + applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); + +@@ -464,7 +504,7 @@ + return 0; + } + +-le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode& success) const +@@ -480,19 +520,21 @@ + } + + if (coverageIndex >= 0) { +- const ClassDefinitionTable *backtrackClassDefinitionTable = +- (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset)); +- const ClassDefinitionTable *inputClassDefinitionTable = +- (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset)); +- const ClassDefinitionTable *lookaheadClassDefinitionTable = +- (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset)); ++ LEReferenceTo ++ backtrackClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset))); ++ LEReferenceTo ++ inputClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset))); ++ LEReferenceTo ++ lookaheadClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset))); + le_uint16 scSetCount = SWAPW(chainSubClassSetCount); +- le_int32 setClass = inputClassDefinitionTable->getGlyphClass(glyphIterator->getCurrGlyphID()); ++ le_int32 setClass = inputClassDefinitionTable->getGlyphClass(inputClassDefinitionTable, ++ glyphIterator->getCurrGlyphID(), ++ success); + + if (setClass < scSetCount && chainSubClassSetTableOffsetArray[setClass] != 0) { + Offset chainSubClassSetTableOffset = SWAPW(chainSubClassSetTableOffsetArray[setClass]); +- const ChainSubClassSetTable *chainSubClassSetTable = +- (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset); ++ LEReferenceTo ++ chainSubClassSetTable(base, success, (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset)); + le_uint16 chainSubClassRuleCount = SWAPW(chainSubClassSetTable->chainSubClassRuleCount); + le_int32 position = glyphIterator->getCurrStreamPosition(); + GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); +@@ -500,13 +542,15 @@ + for (le_uint16 scRule = 0; scRule < chainSubClassRuleCount; scRule += 1) { + Offset chainSubClassRuleTableOffset = + SWAPW(chainSubClassSetTable->chainSubClassRuleTableOffsetArray[scRule]); +- const ChainSubClassRuleTable *chainSubClassRuleTable = +- (const ChainSubClassRuleTable *) ((char *) chainSubClassSetTable + chainSubClassRuleTableOffset); ++ LEReferenceTo ++ chainSubClassRuleTable(chainSubClassSetTable, success, chainSubClassRuleTableOffset); + le_uint16 backtrackGlyphCount = SWAPW(chainSubClassRuleTable->backtrackGlyphCount); + le_uint16 inputGlyphCount = SWAPW(chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount]) - 1; +- const le_uint16 *inputClassArray = &chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount + 1]; +- le_uint16 lookaheadGlyphCount = SWAPW(inputClassArray[inputGlyphCount]); +- const le_uint16 *lookaheadClassArray = &inputClassArray[inputGlyphCount + 1]; ++ LEReferenceToArrayOf inputClassArray(base, success, &chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount + 1],inputGlyphCount+2); // +2 for the lookaheadGlyphCount count ++ le_uint16 lookaheadGlyphCount = SWAPW(inputClassArray.getObject(inputGlyphCount, success)); ++ LEReferenceToArrayOf lookaheadClassArray(base, success, inputClassArray.getAlias(inputGlyphCount + 1,success), lookaheadGlyphCount+2); // +2 for the substCount ++ ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 substCount = SWAPW(lookaheadClassArray[lookaheadGlyphCount]); + + +@@ -517,21 +561,23 @@ + } + + tempIterator.prev(); +- if (! matchGlyphClasses(chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount, +- &tempIterator, backtrackClassDefinitionTable, TRUE)) { ++ LEReferenceToArrayOf backtrackClassArray(base, success, chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount); ++ if( LE_FAILURE(success) ) { return 0; } ++ if (! matchGlyphClasses(backtrackClassArray, backtrackGlyphCount, ++ &tempIterator, backtrackClassDefinitionTable, success, TRUE)) { + continue; + } + + tempIterator.setCurrStreamPosition(position); + tempIterator.next(inputGlyphCount); +- if (! matchGlyphClasses(lookaheadClassArray, lookaheadGlyphCount, &tempIterator, lookaheadClassDefinitionTable)) { ++ if (! matchGlyphClasses(lookaheadClassArray, lookaheadGlyphCount, &tempIterator, lookaheadClassDefinitionTable, success)) { + continue; + } + +- if (matchGlyphClasses(inputClassArray, inputGlyphCount, glyphIterator, inputClassDefinitionTable)) { +- const SubstitutionLookupRecord *substLookupRecordArray = +- (const SubstitutionLookupRecord *) &lookaheadClassArray[lookaheadGlyphCount + 1]; +- ++ if (matchGlyphClasses(inputClassArray, inputGlyphCount, glyphIterator, inputClassDefinitionTable, success)) { ++ LEReferenceToArrayOf ++ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) lookaheadClassArray.getAlias(lookaheadGlyphCount + 1, success), substCount); ++ if (LE_FAILURE(success)) { return 0; } + applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); + + return inputGlyphCount + 1; +@@ -547,7 +593,7 @@ + return 0; + } + +-le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupProcessor *lookupProcessor, ++le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, + LEErrorCode & success) const +@@ -558,9 +604,14 @@ + + le_uint16 backtrkGlyphCount = SWAPW(backtrackGlyphCount); + le_uint16 inputGlyphCount = (le_uint16) SWAPW(backtrackCoverageTableOffsetArray[backtrkGlyphCount]); +- const Offset *inputCoverageTableOffsetArray = &backtrackCoverageTableOffsetArray[backtrkGlyphCount + 1]; ++ LEReferenceToArrayOf inputCoverageTableOffsetArray(base, success, &backtrackCoverageTableOffsetArray[backtrkGlyphCount + 1], inputGlyphCount+2); // offset ++ if (LE_FAILURE(success)) { return 0; } + const le_uint16 lookaheadGlyphCount = (le_uint16) SWAPW(inputCoverageTableOffsetArray[inputGlyphCount]); +- const Offset *lookaheadCoverageTableOffsetArray = &inputCoverageTableOffsetArray[inputGlyphCount + 1]; ++ ++ if( LE_FAILURE(success) ) { return 0; } ++ LEReferenceToArrayOf lookaheadCoverageTableOffsetArray(base, success, inputCoverageTableOffsetArray.getAlias(inputGlyphCount + 1, success), lookaheadGlyphCount+2); ++ ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 substCount = (le_uint16) SWAPW(lookaheadCoverageTableOffsetArray[lookaheadGlyphCount]); + le_int32 position = glyphIterator->getCurrStreamPosition(); + GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); +@@ -571,14 +622,14 @@ + + tempIterator.prev(); + if (! ContextualSubstitutionBase::matchGlyphCoverages(backtrackCoverageTableOffsetArray, +- backtrkGlyphCount, &tempIterator, (const char *) this, TRUE)) { ++ backtrkGlyphCount, &tempIterator, base, success, TRUE)) { + return 0; + } + + tempIterator.setCurrStreamPosition(position); + tempIterator.next(inputGlyphCount - 1); + if (! ContextualSubstitutionBase::matchGlyphCoverages(lookaheadCoverageTableOffsetArray, +- lookaheadGlyphCount, &tempIterator, (const char *) this)) { ++ lookaheadGlyphCount, &tempIterator, base, success)) { + return 0; + } + +@@ -589,9 +640,10 @@ + glyphIterator->prev(); + + if (ContextualSubstitutionBase::matchGlyphCoverages(inputCoverageTableOffsetArray, +- inputGlyphCount, glyphIterator, (const char *) this)) { +- const SubstitutionLookupRecord *substLookupRecordArray = +- (const SubstitutionLookupRecord *) &lookaheadCoverageTableOffsetArray[lookaheadGlyphCount + 1]; ++ inputGlyphCount, glyphIterator, base, success)) { ++ LEReferenceToArrayOf ++ substLookupRecordArray(base, success, ++ (const SubstitutionLookupRecord *) lookaheadCoverageTableOffsetArray.getAlias(lookaheadGlyphCount + 1,success), substCount); + + ContextualSubstitutionBase::applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); + +--- ./jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h 2014-01-18 12:16:22.000000000 -0800 +@@ -56,20 +56,32 @@ + struct ContextualSubstitutionBase : GlyphSubstitutionSubtable + { + static le_bool matchGlyphIDs( +- const TTGlyphID *glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, ++ const LEReferenceToArrayOf &glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, + le_bool backtrack = FALSE); + + static le_bool matchGlyphClasses( +- const le_uint16 *classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, +- const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = FALSE); ++ const LEReferenceToArrayOf &classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, ++ const LEReferenceTo &classDefinitionTable, LEErrorCode &success, le_bool backtrack = FALSE); + + static le_bool matchGlyphCoverages( ++ const LEReferenceToArrayOf &coverageTableOffsetArray, le_uint16 glyphCount, ++ GlyphIterator *glyphIterator, const LETableReference& offsetBase, LEErrorCode &success, le_bool backtrack = FALSE); ++ ++ /** ++ * little shim to wrap the Offset array in range checking ++ * @private ++ */ ++ static le_bool matchGlyphCoverages( + const Offset *coverageTableOffsetArray, le_uint16 glyphCount, +- GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = FALSE); ++ GlyphIterator *glyphIterator, const LETableReference& offsetBase, LEErrorCode &success, le_bool backtrack = FALSE) { ++ LEReferenceToArrayOf ref(offsetBase, success, coverageTableOffsetArray, glyphCount); ++ if( LE_FAILURE(success) ) { return FALSE; } ++ return matchGlyphCoverages(ref, glyphCount, glyphIterator, offsetBase, success, backtrack); ++ } + + static void applySubstitutionLookups( + const LookupProcessor *lookupProcessor, +- const SubstitutionLookupRecord *substLookupRecordArray, ++ const LEReferenceToArrayOf& substLookupRecordArray, + le_uint16 substCount, + GlyphIterator *glyphIterator, + const LEFontInstance *fontInstance, +@@ -79,7 +91,8 @@ + + struct ContextualSubstitutionSubtable : ContextualSubstitutionBase + { +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, ++ GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + + struct ContextualSubstitutionFormat1Subtable : ContextualSubstitutionSubtable +@@ -87,7 +100,8 @@ + le_uint16 subRuleSetCount; + Offset subRuleSetTableOffsetArray[ANY_NUMBER]; + +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + LE_VAR_ARRAY(ContextualSubstitutionFormat1Subtable, subRuleSetTableOffsetArray) + +@@ -116,7 +130,7 @@ + le_uint16 subClassSetCount; + Offset subClassSetTableOffsetArray[ANY_NUMBER]; + +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + LE_VAR_ARRAY(ContextualSubstitutionFormat2Subtable, subClassSetTableOffsetArray) + +@@ -152,13 +166,15 @@ + Offset coverageTableOffsetArray[ANY_NUMBER]; + //SubstitutionLookupRecord substLookupRecord[ANY_NUMBER]; + +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + LE_VAR_ARRAY(ContextualSubstitutionFormat3Subtable, coverageTableOffsetArray) + + struct ChainingContextualSubstitutionSubtable : ContextualSubstitutionBase + { +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LEReferenceTo &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + + struct ChainingContextualSubstitutionFormat1Subtable : ChainingContextualSubstitutionSubtable +@@ -166,7 +182,8 @@ + le_uint16 chainSubRuleSetCount; + Offset chainSubRuleSetTableOffsetArray[ANY_NUMBER]; + +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + LE_VAR_ARRAY(ChainingContextualSubstitutionFormat1Subtable, chainSubRuleSetTableOffsetArray) + +@@ -201,7 +218,8 @@ + le_uint16 chainSubClassSetCount; + Offset chainSubClassSetTableOffsetArray[ANY_NUMBER]; + +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + LE_VAR_ARRAY(ChainingContextualSubstitutionFormat2Subtable, chainSubClassSetTableOffsetArray) + +@@ -243,7 +261,8 @@ + //le_uint16 substCount; + //SubstitutionLookupRecord substLookupRecord[ANY_NUMBER]; + +- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; ++ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, ++ GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + LE_VAR_ARRAY(ChainingContextualSubstitutionFormat3Subtable, backtrackCoverageTableOffsetArray) + +--- ./jdk/src/share/native/sun/font/layout/CoverageTables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/CoverageTables.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -37,8 +37,10 @@ + + U_NAMESPACE_BEGIN + +-le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const ++le_int32 CoverageTable::getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const + { ++ if(LE_FAILURE(success)) return -1; ++ + switch(SWAPW(coverageFormat)) + { + case 0: +@@ -46,16 +48,16 @@ + + case 1: + { +- const CoverageFormat1Table *f1Table = (const CoverageFormat1Table *) this; ++ LEReferenceTo f1Table(base, success); + +- return f1Table->getGlyphCoverage(glyphID); ++ return f1Table->getGlyphCoverage(f1Table, glyphID, success); + } + + case 2: + { +- const CoverageFormat2Table *f2Table = (const CoverageFormat2Table *) this; ++ LEReferenceTo f2Table(base, success); + +- return f2Table->getGlyphCoverage(glyphID); ++ return f2Table->getGlyphCoverage(f2Table, glyphID, success); + } + + default: +@@ -63,8 +65,10 @@ + } + } + +-le_int32 CoverageFormat1Table::getGlyphCoverage(LEGlyphID glyphID) const ++le_int32 CoverageFormat1Table::getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const + { ++ if(LE_FAILURE(success)) return -1; ++ + TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); + le_uint16 count = SWAPW(glyphCount); + le_uint8 bit = OpenTypeUtilities::highBit(count); +@@ -77,6 +81,10 @@ + return -1; + } + ++ LEReferenceToArrayOf(base, success, glyphArray, count); ++ if(LE_FAILURE(success)) return -1; // range checks array ++ ++ + if (SWAPW(glyphArray[extra]) <= ttGlyphID) { + index = extra; + } +@@ -96,14 +104,18 @@ + return -1; + } + +-le_int32 CoverageFormat2Table::getGlyphCoverage(LEGlyphID glyphID) const ++le_int32 CoverageFormat2Table::getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const + { ++ if(LE_FAILURE(success)) return -1; ++ + TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); + le_uint16 count = SWAPW(rangeCount); ++ ++ LEReferenceToArrayOf rangeRecordArrayRef(base, success, rangeRecordArray, count); + le_int32 rangeIndex = +- OpenTypeUtilities::getGlyphRangeIndex(ttGlyphID, rangeRecordArray, count); ++ OpenTypeUtilities::getGlyphRangeIndex(ttGlyphID, rangeRecordArrayRef, success); + +- if (rangeIndex < 0) { ++ if (rangeIndex < 0 || LE_FAILURE(success)) { // could fail if array out of bounds + return -1; + } + +--- ./jdk/src/share/native/sun/font/layout/CoverageTables.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/CoverageTables.h 2014-01-18 12:16:22.000000000 -0800 +@@ -46,7 +46,7 @@ + { + le_uint16 coverageFormat; + +- le_int32 getGlyphCoverage(LEGlyphID glyphID) const; ++ le_int32 getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; + }; + + struct CoverageFormat1Table : CoverageTable +@@ -54,7 +54,7 @@ + le_uint16 glyphCount; + TTGlyphID glyphArray[ANY_NUMBER]; + +- le_int32 getGlyphCoverage(LEGlyphID glyphID) const; ++ le_int32 getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; + }; + LE_VAR_ARRAY(CoverageFormat1Table, glyphArray) + +@@ -64,7 +64,7 @@ + le_uint16 rangeCount; + GlyphRangeRecord rangeRecordArray[ANY_NUMBER]; + +- le_int32 getGlyphCoverage(LEGlyphID glyphID) const; ++ le_int32 getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; + }; + LE_VAR_ARRAY(CoverageFormat2Table, rangeRecordArray) + +--- ./jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -51,23 +51,27 @@ + } + + LEPoint entryAnchor, exitAnchor; +- Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); // TODO ++ Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); + Offset exitOffset = SWAPW(entryExitRecords[coverageIndex].exitAnchor); + + if (entryOffset != 0) { +- const AnchorTable *entryAnchorTable = (const AnchorTable *) ((char *) this + entryOffset); ++ LEReferenceTo entryAnchorTable(base, success, entryOffset); + +- entryAnchorTable->getAnchor(glyphID, fontInstance, entryAnchor); ++ if( LE_SUCCESS(success) ) { ++ entryAnchorTable->getAnchor(entryAnchorTable, glyphID, fontInstance, entryAnchor, success); + glyphIterator->setCursiveEntryPoint(entryAnchor); ++ } + } else { + //glyphIterator->clearCursiveEntryPoint(); + } + + if (exitOffset != 0) { +- const AnchorTable *exitAnchorTable = (const AnchorTable *) ((char *) this + exitOffset); ++ LEReferenceTo exitAnchorTable(base, success, exitOffset); + +- exitAnchorTable->getAnchor(glyphID, fontInstance, exitAnchor); ++ if( LE_SUCCESS(success) ) { ++ exitAnchorTable->getAnchor(exitAnchorTable, glyphID, fontInstance, exitAnchor, success); + glyphIterator->setCursiveExitPoint(exitAnchor); ++ } + } else { + //glyphIterator->clearCursiveExitPoint(); + } +--- ./jdk/src/share/native/sun/font/layout/DeviceTables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/DeviceTables.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -43,7 +43,7 @@ + + #define FORMAT_COUNT LE_ARRAY_SIZE(fieldBits) + +-le_int16 DeviceTable::getAdjustment(le_uint16 ppem) const ++le_int16 DeviceTable::getAdjustment(const LEReferenceTo&base, le_uint16 ppem, LEErrorCode &success) const + { + le_uint16 start = SWAPW(startSize); + le_uint16 format = SWAPW(deltaFormat) - 1; +@@ -53,6 +53,13 @@ + le_uint16 sizeIndex = ppem - start; + le_uint16 bits = fieldBits[format]; + le_uint16 count = 16 / bits; ++ ++ LEReferenceToArrayOf deltaValuesRef(base, success, deltaValues, (sizeIndex / count)); ++ ++ if(LE_FAILURE(success)) { ++ return result; ++ } ++ + le_uint16 word = SWAPW(deltaValues[sizeIndex / count]); + le_uint16 fieldIndex = sizeIndex % count; + le_uint16 shift = 16 - (bits * (fieldIndex + 1)); +--- ./jdk/src/share/native/sun/font/layout/DeviceTables.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/DeviceTables.h 2014-01-18 12:16:22.000000000 -0800 +@@ -50,7 +50,7 @@ + le_uint16 deltaFormat; + le_uint16 deltaValues[ANY_NUMBER]; + +- le_int16 getAdjustment(le_uint16 ppem) const; ++ le_int16 getAdjustment(const LEReferenceTo &base, le_uint16 ppem, LEErrorCode &success) const; + + private: + static const le_uint16 fieldMasks[]; +--- ./jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -48,7 +48,6 @@ + const LookupProcessor *lookupProcessor, le_uint16 lookupType, + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const + { +- + if (LE_FAILURE(success)) { + return 0; + } +--- ./jdk/src/share/native/sun/font/layout/ExtensionSubtables.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ExtensionSubtables.h 2014-01-18 12:16:22.000000000 -0800 +@@ -52,8 +52,7 @@ + le_uint16 extensionLookupType; + le_uint32 extensionOffset; + +- le_uint32 process(const LEReferenceTo &extRef, +- const LookupProcessor *lookupProcessor, le_uint16 lookupType, ++ le_uint32 process(const LEReferenceTo &base, const LookupProcessor *lookupProcessor, le_uint16 lookupType, + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + }; + +--- ./jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -49,9 +49,9 @@ + // nothing to do? + } + +-le_bool GDEFMarkFilter::accept(LEGlyphID glyph) const ++le_bool GDEFMarkFilter::accept(LEGlyphID glyph, LEErrorCode &success) const + { +- le_int32 glyphClass = classDefTable->getGlyphClass(glyph); ++ le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); + + return glyphClass == gcdMarkGlyph; + } +--- ./jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h 2014-01-18 12:16:22.000000000 -0800 +@@ -55,7 +55,7 @@ + GDEFMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); + virtual ~GDEFMarkFilter(); + +- virtual le_bool accept(LEGlyphID glyph) const; ++ virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; + }; + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/GlyphIterator.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/GlyphIterator.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -41,14 +41,13 @@ + U_NAMESPACE_BEGIN + + GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, +- FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader) ++ FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader, LEErrorCode &success) + : direction(1), position(-1), nextLimit(-1), prevLimit(-1), + glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments), + srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), glyphGroup(0), + glyphClassDefinitionTable(), markAttachClassDefinitionTable() + + { +- LEErrorCode success = LE_NO_ERROR; // TODO + le_int32 glyphCount = glyphStorage.getGlyphCount(); + + if (theGlyphDefinitionTableHeader.isValid()) { +@@ -66,6 +65,7 @@ + nextLimit = -1; + prevLimit = glyphCount; + } ++ filterResetCache(); + } + + GlyphIterator::GlyphIterator(GlyphIterator &that) +@@ -84,6 +84,7 @@ + glyphGroup = that.glyphGroup; + glyphClassDefinitionTable = that.glyphClassDefinitionTable; + markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; ++ filterResetCache(); + } + + GlyphIterator::GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask) +@@ -102,6 +103,7 @@ + glyphGroup = 0; + glyphClassDefinitionTable = that.glyphClassDefinitionTable; + markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; ++ filterResetCache(); + } + + GlyphIterator::GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags) +@@ -120,6 +122,7 @@ + glyphGroup = that.glyphGroup; + glyphClassDefinitionTable = that.glyphClassDefinitionTable; + markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; ++ filterResetCache(); + } + + GlyphIterator::~GlyphIterator() +@@ -133,6 +136,7 @@ + featureMask = newFeatureMask; + glyphGroup = 0; + lookupFlags = newLookupFlags; ++ filterResetCache(); + } + + LEGlyphID *GlyphIterator::insertGlyphs(le_int32 count, LEErrorCode& success) +@@ -381,53 +385,68 @@ + glyphPositionAdjustments->setCursiveGlyph(position, baselineIsLogicalEnd()); + } + +-le_bool GlyphIterator::filterGlyph(le_uint32 index) const ++void GlyphIterator::filterResetCache(void) { ++ filterCacheValid = FALSE; ++ } ++ ++le_bool GlyphIterator::filterGlyph(le_uint32 index) + { +- LEErrorCode success = LE_NO_ERROR; + LEGlyphID glyphID = glyphStorage[index]; +- le_int32 glyphClass = gcdNoGlyphClass; + +- if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { +- return TRUE; +- } ++ if (!filterCacheValid || filterCache.id != glyphID) { ++ filterCache.id = glyphID; + ++ le_bool &filterResult = filterCache.result; // NB: Making this a reference to accept the updated value, in case ++ // we want more fancy cacheing in the future. ++ if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { ++ filterResult = TRUE; ++ } else { ++ LEErrorCode success = LE_NO_ERROR; ++ le_int32 glyphClass = gcdNoGlyphClass; + if (glyphClassDefinitionTable.isValid()) { + glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success); + } +- +- switch (glyphClass) +- { ++ switch (glyphClass) { + case gcdNoGlyphClass: +- return FALSE; ++ filterResult = FALSE; ++ break; + + case gcdSimpleGlyph: +- return (lookupFlags & lfIgnoreBaseGlyphs) != 0; ++ filterResult = (lookupFlags & lfIgnoreBaseGlyphs) != 0; ++ break; + + case gcdLigatureGlyph: +- return (lookupFlags & lfIgnoreLigatures) != 0; ++ filterResult = (lookupFlags & lfIgnoreLigatures) != 0; ++ break; + + case gcdMarkGlyph: +- { + if ((lookupFlags & lfIgnoreMarks) != 0) { +- return TRUE; +- } +- ++ filterResult = TRUE; ++ } else { + le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift; + + if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) { +- return markAttachClassDefinitionTable +- -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType; ++ filterResult = (markAttachClassDefinitionTable ++ -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType); ++ } else { ++ filterResult = FALSE; + } +- +- return FALSE; + } ++ break; + + case gcdComponentGlyph: +- return (lookupFlags & lfIgnoreBaseGlyphs) != 0; ++ filterResult = ((lookupFlags & lfIgnoreBaseGlyphs) != 0); ++ break; + + default: +- return FALSE; ++ filterResult = FALSE; ++ break; + } ++ } ++ filterCacheValid = TRUE; ++ } ++ ++ return filterCache.result; + } + + le_bool GlyphIterator::hasFeatureTag(le_bool matchGroup) const +--- ./jdk/src/share/native/sun/font/layout/GlyphIterator.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/GlyphIterator.h 2014-01-18 12:16:22.000000000 -0800 +@@ -49,7 +49,7 @@ + class GlyphIterator : public UMemory { + public: + GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, +- FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader); ++ FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader, LEErrorCode &success); + + GlyphIterator(GlyphIterator &that); + +@@ -98,7 +98,7 @@ + le_int32 applyInsertions(); + + private: +- le_bool filterGlyph(le_uint32 index) const; ++ le_bool filterGlyph(le_uint32 index); + le_bool hasFeatureTag(le_bool matchGroup) const; + le_bool nextInternal(le_uint32 delta = 1); + le_bool prevInternal(le_uint32 delta = 1); +@@ -121,6 +121,14 @@ + LEReferenceTo markAttachClassDefinitionTable; + + GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class ++ ++ struct { ++ LEGlyphID id; ++ le_bool result; ++ } filterCache; ++ le_bool filterCacheValid; ++ ++ void filterResetCache(void); + }; + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -95,6 +95,8 @@ + + le_uint32 delta = 0; + ++ //_LETRACE("attempting lookupType #%d", lookupType); ++ + switch(lookupType) + { + case 0: +@@ -152,21 +154,21 @@ + { + LEReferenceTo subtable(lookupSubtable, success); + +- delta = subtable->process(this, glyphIterator, fontInstance, success); ++ delta = subtable->process(subtable, this , glyphIterator, fontInstance, success); + break; + } + + case gpstChainedContext: + { +- LEReferenceTo subtable(lookupSubtable, success); ++ const LEReferenceTo subtable(lookupSubtable, success); + +- delta = subtable->process(this, glyphIterator, fontInstance, success); ++ delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); + break; + } + + case gpstExtension: + { +- LEReferenceTo subtable(lookupSubtable, success); ++ const LEReferenceTo subtable(lookupSubtable, success); + + delta = subtable->process(subtable, this, lookupType, glyphIterator, fontInstance, success); + break; +@@ -176,6 +178,12 @@ + break; + } + ++#if LE_TRACE ++ if(delta != 0) { ++ _LETRACE("GlyphPositioningLookupProcessor applied #%d -> delta %d @ %d", lookupType, delta, glyphIterator->getCurrStreamPosition()); ++ } ++#endif ++ + return delta; + } + +--- ./jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -123,7 +123,7 @@ + { + const LEReferenceTo subtable(lookupSubtable, success); + +- delta = subtable->process(this, glyphIterator, fontInstance, success); ++ delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); + break; + } + +@@ -131,7 +131,7 @@ + { + const LEReferenceTo subtable(lookupSubtable, success); + +- delta = subtable->process(this, glyphIterator, fontInstance, success); ++ delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); + break; + } + +--- ./jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -44,7 +44,7 @@ + #include "LEGlyphStorage.h" + + #include "IndicReordering.h" +-#include ++ + U_NAMESPACE_BEGIN + + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine) +@@ -90,6 +90,7 @@ + return 0; + } + ++ _LETRACE("IOTLE::gp, calling parent"); + le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max, rightToLeft, glyphStorage, success); + + if (LE_FAILURE(success)) { +@@ -97,10 +98,14 @@ + } + + if (fVersion2) { ++ _LETRACE("IOTLE::gp, v2 final,"); + IndicReordering::finalReordering(glyphStorage,retCount); ++ _LETRACE("IOTLE::gp, v2 pres"); + IndicReordering::applyPresentationForms(glyphStorage,retCount); ++ _LETRACE("IOTLE::gp, parent gsub"); + OpenTypeLayoutEngine::glyphSubstitution(count,max, rightToLeft, glyphStorage, success); + } else { ++ _LETRACE("IOTLE::gp, adjust mpres"); + IndicReordering::adjustMPres(fMPreFixups, glyphStorage, success); + } + return retCount; +@@ -116,6 +121,8 @@ + return 0; + } + ++ _LETRACE("IOTLE: charProc"); ++ + if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) { + success = LE_ILLEGAL_ARGUMENT_ERROR; + return 0; +@@ -143,8 +150,10 @@ + + le_int32 outCharCount; + if (fVersion2) { ++ _LETRACE("v2process"); + outCharCount = IndicReordering::v2process(&chars[offset], count, fScriptCode, outChars, glyphStorage); + } else { ++ _LETRACE("reorder"); + outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups, success); + } + +--- ./jdk/src/share/native/sun/font/layout/KernTable.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/KernTable.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -39,7 +39,7 @@ + + #include + +-#define DEBUG 0 ++#define DEBUG_KERN_TABLE 0 + + U_NAMESPACE_BEGIN + +@@ -99,14 +99,14 @@ + : pairsSwapped(NULL), fTable(base) + { + if(LE_FAILURE(success) || (fTable.isEmpty())) { +-#if DEBUG ++#if DEBUG_KERN_TABLE + fprintf(stderr, "no kern data\n"); + #endif + return; + } + LEReferenceTo header(fTable, success); + +-#if DEBUG ++#if DEBUG_KERN_TABLE + // dump first 32 bytes of header + for (int i = 0; i < 64; ++i) { + fprintf(stderr, "%0.2x ", ((const char*)header.getAlias())[i]&0xff); +@@ -171,13 +171,13 @@ + fprintf(stderr, " searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift); + fprintf(stderr, "[[ ignored font table entries: range %d selector %d shift %d ]]\n", SWAPW(table->searchRange), SWAPW(table->entrySelector), SWAPW(table->rangeShift)); + #endif +-#if DEBUG ++#if DEBUG_KERN_TABLE + fprintf(stderr, "coverage: %0.4x nPairs: %d pairs 0x%x\n", coverage, nPairs, pairsSwapped); + fprintf(stderr, + " searchRange(pairs): %d entrySelector: %d rangeShift(pairs): %d\n", + searchRange, entrySelector, rangeShift); + +- { ++ if (LE_SUCCESS(success)) { + // dump part of the pair list + char ids[256]; + for (int i = 256; --i >= 0;) { +@@ -242,7 +242,7 @@ + p = tp; + } + +-#if DEBUG ++#if DEBUG_KERN_TABLE + fprintf(stderr, "binary search for %0.8x\n", key); + #endif + +@@ -251,13 +251,13 @@ + probe >>= 1; + tp = (const PairInfo*)(p + (probe/KERN_PAIRINFO_SIZE)); + le_uint32 tkey = tp->key; +-#if DEBUG ++#if DEBUG_KERN_TABLE + fprintf(stdout, " %.3d (%0.8x)\n", (tp - pairsSwapped), tkey); + #endif + if (tkey <= key) { + if (tkey == key) { + le_int16 value = SWAPW(tp->value); +-#if DEBUG ++#if DEBUG_KERN_TABLE + fprintf(stdout, "binary found kerning pair %x:%x at %d, value: 0x%x (%g)\n", + storage[i-1], storage[i], i, value & 0xffff, font->xUnitsToPoints(value)); + fflush(stdout); +--- ./jdk/src/share/native/sun/font/layout/LEFontInstance.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LEFontInstance.h 2014-01-18 12:16:22.000000000 -0800 +@@ -181,6 +181,10 @@ + * + * Subclasses which represent composite fonts should always return NULL. + * ++ * Note that implementing this function does not allow for range checking. ++ * Subclasses that desire the safety of range checking must implement the ++ * variation which has a length parameter. ++ * + * @param tableTag - the four byte table tag. (e.g. 'cmap') + * + * @return the address of the table in memory, or NULL +@@ -200,6 +204,8 @@ + * Subclasses which represent composite fonts should always return NULL. + * + * This version sets a length, for range checking. ++ * Note that range checking can only be accomplished if this function is ++ * implemented in subclasses. + * + * @param tableTag - the four byte table tag. (e.g. 'cmap') + * @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown. +@@ -572,5 +578,3 @@ + + U_NAMESPACE_END + #endif +- +- +--- ./jdk/src/share/native/sun/font/layout/LEGlyphFilter.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LEGlyphFilter.h 2014-01-18 12:16:22.000000000 -0800 +@@ -62,7 +62,7 @@ + * + * @internal + */ +- virtual le_bool accept(LEGlyphID glyph) const = 0; ++ virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const = 0; + }; + #endif /* U_HIDE_INTERNAL_API */ + +--- ./jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -458,7 +458,7 @@ + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + return; + } +- ++ _LETRACE("set%-4d\t(%.2f, %.2f)", glyphIndex, x, y); + fPositions[glyphIndex * 2] = x; + fPositions[glyphIndex * 2 + 1] = y; + } +@@ -694,4 +694,3 @@ + } + + U_NAMESPACE_END +- +--- ./jdk/src/share/native/sun/font/layout/LEGlyphStorage.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LEGlyphStorage.h 2014-01-18 12:16:22.000000000 -0800 +@@ -568,4 +568,3 @@ + + U_NAMESPACE_END + #endif +- +--- ./jdk/src/share/native/sun/font/layout/LEScripts.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LEScripts.h 2014-01-18 12:16:22.000000000 -0800 +@@ -30,7 +30,7 @@ + * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS + * YOU REALLY KNOW WHAT YOU'RE DOING. + * +- * Generated on: 10/26/2010 02:53:33 PM PDT ++ * Generated on: 11/01/2011 04:08:09 PM PDT + */ + + #ifndef __LESCRIPTS_H +@@ -262,7 +262,16 @@ + khojScriptCode = 157, + tirhScriptCode = 158, + +- scriptCodeCount = 159 ++/** ++ * @stable ICU 52 ++ */ ++ aghbScriptCode = 159, ++ mahjScriptCode = 160, ++ ++/** ++ * @stable ICU 2.2 ++ */ ++ scriptCodeCount + }; + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/LEStandalone.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LEStandalone.h 2014-01-18 12:16:22.000000000 -0800 +@@ -132,6 +132,9 @@ + #define uprv_memcpy memcpy + #define uprv_realloc realloc + ++#define U_EXPORT2 ++#define U_CAPI extern "C" ++ + #if !defined(U_IS_BIG_ENDIAN) + #ifdef _LITTLE_ENDIAN + #define U_IS_BIG_ENDIAN 0 +--- ./jdk/src/share/native/sun/font/layout/LETableReference.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LETableReference.h 2014-01-18 12:16:22.000000000 -0800 +@@ -38,34 +38,47 @@ + #include "LETypes.h" + #include "LEFontInstance.h" + ++/** ++ * \def LE_ENABLE_RAW ++ * If this is 1, enables old non-safe raw access ++ */ ++#ifndef LE_ENABLE_RAW ++#define LE_ENABLE_RAW 0 ++#endif + +-#define kQuestionmarkTableTag 0x3F3F3F3FUL +-#define kTildeTableTag 0x7e7e7e7eUL ++#define kQuestionmarkTableTag 0x3F3F3F3FUL /* ???? */ ++#define kStaticTableTag 0x30303030UL /* 0000 */ ++#define kTildeTableTag 0x7e7e7e7eUL /* ~~~~ */ + #ifdef __cplusplus + + // internal - interface for range checking + U_NAMESPACE_BEGIN + + #if LE_ASSERT_BAD_FONT ++ ++#ifndef LE_TRACE_TR ++#define LE_TRACE_TR 0 ++#endif ++ + class LETableReference; // fwd + /** + * defined in OpenTypeUtilities.cpp + * @internal + */ +-extern void _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); ++U_CAPI void U_EXPORT2 _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); + + #define LE_DEBUG_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); + #define LE_DEBUG_TR3(x,y,z) _debug_LETableReference(__FILE__, __LINE__, x, this, (const void*)y, (size_t)z); +-#if 0 +-#define LE_TRACE_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); ++#if LE_TRACE_TR ++#define _TRTRACE(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); + #else +-#define LE_TRACE_TR(x) ++#define _TRTRACE(x) + #endif + + #else + #define LE_DEBUG_TR(x) + #define LE_DEBUG_TR3(x,y,z) +-#define LE_TRACE_TR(x) ++#define _TRTRACE(x) + #endif + + /** +@@ -73,6 +86,13 @@ + */ + class LETableReference { + public: ++ ++ /** ++ * Dummy enum asserting that a value is actually static data ++ * and does not need to be range checked ++ */ ++ enum EStaticData { kStaticData = 0 }; ++ + /** + * @internal + * Construct from a specific tag +@@ -80,28 +100,42 @@ + LETableReference(const LEFontInstance* font, LETag tableTag, LEErrorCode &success) : + fFont(font), fTag(tableTag), fParent(NULL), fStart(NULL),fLength(LE_UINTPTR_MAX) { + loadTable(success); +- LE_TRACE_TR("INFO: new table load") ++ _TRTRACE("INFO: new table load") + } + + LETableReference(const LETableReference &parent, LEErrorCode &success) : fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), fStart(parent.fStart), fLength(parent.fLength) { + if(LE_FAILURE(success)) { + clear(); + } +- LE_TRACE_TR("INFO: new clone") ++ _TRTRACE("INFO: new clone") + } + ++#if LE_ENABLE_RAW ++ /** ++ * Construct without a parent LETR. ++ */ + LETableReference(const le_uint8* data, size_t length = LE_UINTPTR_MAX) : + fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { +- LE_TRACE_TR("INFO: new raw") ++ _TRTRACE("INFO: new raw") + } ++#endif ++ ++ /** ++ * Construct without a parent LETR. ++ */ ++ LETableReference(EStaticData /* NOTUSED */, const le_uint8* data, size_t length) : ++ fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { ++ _TRTRACE("INFO: new EStaticData") ++ } ++ + LETableReference() : + fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(NULL), fLength(0) { +- LE_TRACE_TR("INFO: new empty") ++ _TRTRACE("INFO: new empty") + } + + ~LETableReference() { +- fTag=kTildeTableTag; +- LE_TRACE_TR("INFO: new dtor") ++ fTag= (LETag)kTildeTableTag; ++ _TRTRACE("INFO: new dtor") + } + + /** +@@ -127,7 +161,7 @@ + fLength = (fParent->fLength) - offset; // decrement length as base address is incremented + } + if(fLength != LE_UINTPTR_MAX) { // if we have bounds: +- if(offset+fLength > fParent->fLength) { ++ if((offset+fLength < offset) || (offset+fLength > fParent->fLength)) { + LE_DEBUG_TR3("offset+fLength out of range: (%p) +%d", NULL, offset+fLength); + err = LE_INDEX_OUT_OF_BOUNDS_ERROR; // exceeded + clear(); +@@ -137,11 +171,13 @@ + } else { + clear(); + } +- LE_TRACE_TR("INFO: new subset") ++ _TRTRACE("INFO: new subset") + } + + const void* getAlias() const { return (const void*)fStart; } +- const void* getAliasTODO() const { LE_DEBUG_TR("getAliasTODO()"); return (const void*)fStart; } ++#ifndef LE_ENABLE_RAW ++ const void* getAliasRAW() const { LE_DEBUG_TR("getAliasRAW()"); return (const void*)fStart; } ++#endif + le_bool isEmpty() const { return fStart==NULL || fLength==0; } + le_bool isValid() const { return !isEmpty(); } + le_bool hasBounds() const { return fLength!=LE_UINTPTR_MAX; } +@@ -234,7 +270,18 @@ + + void setRaw(const void *data, size_t length = LE_UINTPTR_MAX) { + fFont = NULL; +- fTag = kQuestionmarkTableTag; ++ fTag = (LETag)kQuestionmarkTableTag; ++ fParent = NULL; ++ fStart = (const le_uint8*)data; ++ fLength = length; ++ } ++ ++ /** ++ * set this object pointing to static data ++ */ ++ void setTo(EStaticData /*notused*/, const void *data, size_t length) { ++ fFont = NULL; ++ fTag = (LETag)kStaticTableTag; + fParent = NULL; + fStart = (const le_uint8*)data; + fLength = length; +@@ -277,6 +324,90 @@ + * Open a new entry based on an existing table + */ + ++template ++class LEReferenceTo : public LETableReference { ++public: ++ /** ++ * open a sub reference. ++ * @param parent parent reference ++ * @param success error status ++ * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds. ++ */ ++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) ++ : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++ /** ++ * ptr plus offset ++ */ ++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) ++ : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) ++ : LETableReference(parent, offset, LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success) ++ : LETableReference(parent, 0, LE_UINTPTR_MAX, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++ inline LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) ++ : LETableReference(font, tableTag, success) { ++ verifyLength(0, LETableVarSizer::getSize(), success); ++ if(LE_FAILURE(success)) clear(); ++ } ++#if LE_ENABLE_RAW ++ inline LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} ++ inline LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} ++#endif ++ inline LEReferenceTo(EStaticData staticData, const le_uint8 *data, size_t length) : LETableReference(staticData, data, length) {} ++ inline LEReferenceTo(EStaticData staticData, const T *data, size_t length) : LETableReference(staticData, (const le_uint8*)data, length) {} ++ ++ inline LEReferenceTo() : LETableReference() {} ++ ++#if LE_ENABLE_RAW ++ inline LEReferenceTo& operator=(const T* other) { ++ setRaw(other); ++ return *this; ++ } ++#endif ++ ++ LEReferenceTo& setTo(LETableReference::EStaticData staticData, const T* other, size_t length) { ++ LETableReference::setTo(staticData, other, length); ++ return *this; ++ } ++ ++ LEReferenceTo &reparent(const LETableReference &base) { ++ fParent = &base; ++ return *this; ++ } ++ ++ /** ++ * roll forward by one size. ++ * same as addOffset(LETableVarSizer::getSize(),success) ++ */ ++ void addObject(LEErrorCode &success) { ++ addOffset(LETableVarSizer::getSize(), success); ++ } ++ void addObject(size_t count, LEErrorCode &success) { ++ addOffset(LETableVarSizer::getSize()*count, success); ++ } ++ ++ const T *operator->() const { return getAlias(); } ++ const T *operator*() const { return getAlias(); } ++ const T *getAlias() const { return (const T*)fStart; } ++#if LE_ENABLE_RAW ++ const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; } ++#endif ++ ++}; ++ ++ + /** + * \def LE_UNBOUNDED_ARRAY + * define an array with no *known* bound. Will trim to available size. +@@ -289,12 +420,12 @@ + public: + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count) + : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) { +- LE_TRACE_TR("INFO: new RTAO by offset") ++ _TRTRACE("INFO: new RTAO by offset") + if(LE_SUCCESS(success)) { +- if(count == LE_UNBOUNDED_ARRAY) { // not a known length +- count = getLength()/LETableVarSizer::getSize(); // fit to max size ++ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length ++ fCount = getLength()/LETableVarSizer::getSize(); // fit to max size + } +- LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); ++ LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); + } + if(LE_FAILURE(success)) { + fCount=0; +@@ -304,23 +435,23 @@ + + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count) + : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) { +-LE_TRACE_TR("INFO: new RTAO") ++_TRTRACE("INFO: new RTAO") + if(LE_SUCCESS(success)) { +- if(count == LE_UNBOUNDED_ARRAY) { // not a known length +- count = getLength()/LETableVarSizer::getSize(); // fit to max size ++ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length ++ fCount = getLength()/LETableVarSizer::getSize(); // fit to max size + } +- LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); ++ LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); + } + if(LE_FAILURE(success)) clear(); + } + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count) + : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) { +-LE_TRACE_TR("INFO: new RTAO") ++_TRTRACE("INFO: new RTAO") + if(LE_SUCCESS(success)) { +- if(count == LE_UNBOUNDED_ARRAY) { // not a known length +- count = getLength()/LETableVarSizer::getSize(); // fit to max size ++ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length ++ fCount = getLength()/LETableVarSizer::getSize(); // fit to max size + } +- LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); ++ LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); + } + if(LE_FAILURE(success)) clear(); + } +@@ -329,18 +460,40 @@ + + le_uint32 getCount() const { return fCount; } + +- using LETableReference::getAlias; ++ const T *getAlias() const { return (const T*)fStart; } + + const T *getAlias(le_uint32 i, LEErrorCode &success) const { + return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success))); + } + +- const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } ++#ifndef LE_ENABLE_RAW ++ const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; } ++#endif + + const T& getObject(le_uint32 i, LEErrorCode &success) const { + return *getAlias(i,success); + } + ++ /** ++ * by-value array accessor for integral types. ++ */ ++ const T operator[](le_uint32 i) const { ++ LEErrorCode success = LE_NO_ERROR; ++ const T *ret = getAlias(i, success); ++ if(LE_FAILURE(success) || ret==NULL) { ++#if LE_ASSERT_BAD_FONT ++ LE_DEBUG_TR3("Range error, out of bounds? (%p) #%d", NULL, i); ++#endif ++ return T(0); // will not work for all types. ++ } ++ return *ret; ++ } ++ ++ const LEReferenceTo getReference(le_uint32 i, LEErrorCode &success) const { ++ if(LE_FAILURE(success)) return LEReferenceTo(); ++ return LEReferenceTo(*this, success, getAlias(i,success)); ++ } ++ + const T& operator()(le_uint32 i, LEErrorCode &success) const { + return *getAlias(i,success); + } +@@ -349,6 +502,7 @@ + if(LE_SUCCESS(success)&&i::getSize()*i; + } else { ++ LE_DEBUG_TR3("getOffsetFor failed (%p) index=%d",NULL, i); + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + } + return 0; +@@ -360,7 +514,7 @@ + } + + LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) { +- LE_TRACE_TR("INFO: null RTAO") ++ _TRTRACE("INFO: null RTAO") + } + + private: +@@ -368,73 +522,11 @@ + }; + + +-template +-class LEReferenceTo : public LETableReference { +-public: +- /** +- * open a sub reference. +- * @param parent parent reference +- * @param success error status +- * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds. +- */ +- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) +- : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) { +- verifyLength(0, LETableVarSizer::getSize(), success); +- if(LE_FAILURE(success)) clear(); +- } +- /** +- * ptr plus offset +- */ +- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) +- : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) { +- verifyLength(0, LETableVarSizer::getSize(), success); +- if(LE_FAILURE(success)) clear(); +- } +- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) +- : LETableReference(parent, offset, LE_UINTPTR_MAX, success) { +- verifyLength(0, LETableVarSizer::getSize(), success); +- if(LE_FAILURE(success)) clear(); +- } +- LEReferenceTo(const LETableReference &parent, LEErrorCode &success) +- : LETableReference(parent, 0, LE_UINTPTR_MAX, success) { +- verifyLength(0, LETableVarSizer::getSize(), success); +- if(LE_FAILURE(success)) clear(); +- } +- LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) +- : LETableReference(font, tableTag, success) { +- verifyLength(0, LETableVarSizer::getSize(), success); +- if(LE_FAILURE(success)) clear(); +- } +- LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} +- LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} +- LEReferenceTo() : LETableReference(NULL) {} +- +- LEReferenceTo& operator=(const T* other) { +- setRaw(other); +- return *this; +- } +- +- LEReferenceTo &reparent(const LETableReference &base) { +- fParent = &base; +- return *this; +- } + +- /** +- * roll forward by one size. +- * same as addOffset(LETableVarSizer::getSize(),success) +- */ +- void addObject(LEErrorCode &success) { +- addOffset(LETableVarSizer::getSize(), success); +- } +- void addObject(size_t count, LEErrorCode &success) { +- addOffset(LETableVarSizer::getSize()*count, success); +- } +- +- const T *operator->() const { return getAlias(); } +- const T *getAlias() const { return (const T*)fStart; } +- const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } +-}; + ++#ifdef _TRTRACE ++#undef _TRTRACE ++#endif + + U_NAMESPACE_END + +--- ./jdk/src/share/native/sun/font/layout/LETypes.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LETypes.h 2014-01-18 12:16:22.000000000 -0800 +@@ -337,6 +337,20 @@ + typedef struct LEPoint LEPoint; + #endif + ++/** ++ * \def LE_TRACE ++ * @internal ++ */ ++#ifndef LE_TRACE ++# define LE_TRACE 0 ++#endif ++ ++#if LE_TRACE ++# include ++# define _LETRACE printf("\n%s:%d: LE: ", __FILE__, __LINE__),printf ++#else ++# define _LETRACE 0&& ++#endif + + #ifndef U_HIDE_INTERNAL_API + +@@ -701,6 +715,12 @@ + LE_FEATURE_ENUM_MAX = LE_CHAR_FILTER_FEATURE_ENUM + }; + ++ ++/** ++ * Flags for typographic features. ++ * @internal ++ * @{ ++ */ + #define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM) + #define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM) + #define LE_NoCanon_FEATURE_FLAG (1 << LE_NoCanon_FEATURE_ENUM) +@@ -727,6 +747,9 @@ + #define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM) + + #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM) ++/** ++ * @} ++ */ + + #define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG) /**< default features */ + +@@ -768,7 +791,7 @@ * - * This code is free software; you can redistribute it and/or modify it -@@ -45,8 +45,8 @@ - protected final Object[][] getContents() { - String ACT[] = new String[] {"Acre \u6642\u9593", "ACT", - "Acre \u590f\u4ee4\u6642\u9593", "ACST"}; -- String ADELAIDE[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340)", "CST", -- "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340)", "CST"}; -+ String ADELAIDE[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u90E8)", "CST", -+ "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340)", "CST"}; - String AGT[] = new String[] {"\u963f\u6839\u5ef7\u6642\u9593", "ART", - "\u963f\u6839\u5ef7\u590f\u4ee4\u6642\u9593", "ARST"}; - String AKST[] = new String[] {"\u963f\u62c9\u65af\u52a0\u6a19\u6e96\u6642\u9593", "AKST", -@@ -61,10 +61,10 @@ - "\u5927\u897f\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ADT"}; - String BDT[] = new String[] {"\u5b5f\u52a0\u62c9\u6642\u9593", "BDT", - "\u5b5f\u52a0\u62c9\u590f\u4ee4\u6642\u9593", "BDST"}; -- String BRISBANE[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u6606\u58eb\u862d)", "EST", -- "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u6606\u58eb\u862d)", "EST"}; -- String BROKEN_HILL[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340/\u65b0\u5357\u5a01\u723e\u65af)", "CST", -- "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e\u5357\u5340/\u65b0\u5357\u5a01\u723e\u65af)", "CST"}; -+ String BRISBANE[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u6606\u58EB\u862D)", "EST", -+ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u6606\u58EB\u862D)", "EST"}; -+ String BROKEN_HILL[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST", -+ "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E\u5357\u5340/\u65B0\u5357\u5A01\u723E\u65AF)", "CST"}; - String BRT[] = new String[] {"\u5df4\u897f\u5229\u4e9e\u6642\u9593", "BRT", - "\u5df4\u897f\u5229\u4e9e\u590f\u4ee4\u6642\u9593", "BRST"}; - String BTT[] = new String[] {"\u4e0d\u4e39\u6642\u9593", "BTT", -@@ -77,9 +77,9 @@ - "\u67e5\u5766\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CHADT"}; - String ChST[] = new String[] {"\u67e5\u83ab\u6d1b\u6a19\u6e96\u6642\u9593", "ChST", - "\u67e5\u83ab\u6d1b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "ChDT"}; -- String CHUT[] = new String[] {"Chuuk Time", "CHUT", -- "Chuuk Summer Time", "CHUST"}; -- String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "CIT", -+ String CHUT[] = new String[] {"\u695A\u514B\u6642\u9593", "CHUT", -+ "\u695A\u514B\u590F\u4EE4\u6642\u9593", "CHUST"}; -+ String CIT[] = new String[] {"\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WITA", - "\u4e2d\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u4ee4\u6642\u9593", "CIST"}; - String CLT[] = new String[] {"\u667a\u5229\u6642\u9593", "CLT", - "\u667a\u5229\u590f\u4ee4\u6642\u9593", "CLST"}; -@@ -89,8 +89,8 @@ - "\u4e2d\u570b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; - String CUBA[] = new String[] {"\u53e4\u5df4\u6a19\u6e96\u6642\u9593", "CST", - "\u53e4\u5df4\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "CDT"}; -- String DARWIN[] = new String[] {"\u4e2d\u90e8\u6a19\u6e96\u6642\u9593 (\u5317\u90e8\u5404\u5730\u5340)", "CST", -- "\u4e2d\u90e8\u590f\u4ee4\u6642\u9593 (\u5317\u90e8\u5404\u5730\u5340)", "CST"}; -+ String DARWIN[] = new String[] {"\u4E2D\u90E8\u6A19\u6E96\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST", -+ "\u4E2D\u90E8\u590F\u4EE4\u6642\u9593 (\u5317\u90E8\u5404\u5730\u5340)", "CST"}; - String DUBLIN[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", - "\u611b\u723e\u862d\u590f\u4ee4\u6642\u9593", "IST"}; - String EAT[] = new String[] {"\u6771\u975e\u6642\u9593", "EAT", -@@ -103,10 +103,10 @@ - "\u6771\u683c\u6797\u5cf6\u590f\u4ee4\u6642\u9593", "EGST"}; - String EST[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593", "EST", - "\u6771\u65b9\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "EDT"}; -- String EST_NSW[] = new String[] {"\u6771\u65b9\u6a19\u6e96\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)", "EST", -- "\u6771\u65b9\u590f\u4ee4\u6642\u9593 (\u65b0\u5357\u5a01\u723e\u65af)", "EST"}; -- String FET[] = new String[] {"Further-eastern European Time", "FET", -- "Further-eastern European Summer Time", "FEST"}; -+ String EST_NSW[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST", -+ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u65B0\u5357\u5A01\u723E\u65AF)", "EST"}; -+ String FET[] = new String[] {"\u6771\u6B50\u5167\u9678\u6642\u9593", "FET", -+ "\u6771\u6B50\u5167\u9678\u590F\u4EE4\u6642\u9593", "FEST"}; - String GHMT[] = new String[] {"\u8fe6\u7d0d\u5e73\u5747\u6642\u9593", "GMT", - "\u8fe6\u7d0d\u590f\u4ee4\u6642\u9593", "GHST"}; - String GAMBIER[] = new String[] {"\u7518\u6bd4\u723e\u6642\u9593", "GAMT", -@@ -159,8 +159,8 @@ - "\u76ae\u7279\u5eb7\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"}; - String PKT[] = new String[] {"\u5df4\u57fa\u65af\u5766\u6642\u9593", "PKT", - "\u5df4\u57fa\u65af\u5766\u590f\u4ee4\u6642\u9593", "PKST"}; -- String PONT[] = new String[] {"Pohnpei Time", "PONT", -- "Pohnpei Summer Time", "PONST"}; -+ String PONT[] = new String[] {"\u6CE2\u7D0D\u4F69\u6642\u9593", "PONT", -+ "\u6CE2\u7D0D\u4F69\u590F\u4EE4\u6642\u9593", "PONST"}; - String PST[] = new String[] {"\u592a\u5e73\u6d0b\u6a19\u6e96\u6642\u9593", "PST", - "\u592a\u5e73\u6d0b\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PDT"}; - String SAMOA[] = new String[] {"\u85a9\u6469\u4e9e\u6a19\u6e96\u6642\u9593", "SST", -@@ -173,8 +173,8 @@ - "\u65b0\u52a0\u5761\u590f\u4ee4\u6642\u9593", "SGST"}; - String SLST[] = new String[] {"\u683c\u6797\u5a01\u6cbb\u5e73\u5747\u6642\u9593", "GMT", - "\u7345\u5b50\u5c71\u590f\u4ee4\u6642\u9593", "SLST"}; -- String TASMANIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u5854\u65af\u6885\u5c3c\u4e9e\u5cf6)", "EST", -- "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u5854\u65af\u6885\u5c3c\u4e9e\u5cf6)", "EST"}; -+ String TASMANIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST", -+ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u5854\u65AF\u6885\u5C3C\u4E9E\u5CF6)", "EST"}; - String TMT[] = new String[] {"\u571f\u5eab\u66fc\u6642\u9593", "TMT", - "\u571f\u5eab\u66fc\u590f\u4ee4\u6642\u9593", "TMST"}; - String ULAT[]= new String[] {"\u5eab\u502b\u6642\u9593", "ULAT", -@@ -183,8 +183,8 @@ - "\u5354\u8abf\u4e16\u754c\u6642\u9593", "UTC"}; - String UZT[] = new String[] {"\u70cf\u8332\u5225\u514b\u65af\u5766\u6642\u9593", "UZT", - "\u70cf\u8332\u5225\u514b\u65af\u5766\u590f\u4ee4\u6642\u9593", "UZST"}; -- String VICTORIA[] = new String[] {"\u6771\u90e8\u6a19\u6e96\u6642\u9593 (\u7dad\u591a\u5229\u4e9e\u90a6)", "EST", -- "\u6771\u90e8\u590f\u4ee4\u6642\u9593 (\u7dad\u591a\u5229\u4e9e\u90a6)", "EST"}; -+ String VICTORIA[] = new String[] {"\u6771\u90E8\u6A19\u6E96\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST", -+ "\u6771\u90E8\u590F\u4EE4\u6642\u9593 (\u7DAD\u591A\u5229\u4E9E\u90A6)", "EST"}; - String VLAT[] = new String[] {"\u6d77\u53c3\u5d34\u6642\u9593", "VLAT", - "\u6d77\u53c3\u5d34\u590f\u4ee4\u6642\u9593", "VLAST"}; - String WART[] = new String[] {"\u897f\u963f\u6839\u5ef7\u6642\u9593", "WART", -@@ -193,10 +193,10 @@ - "\u897f\u975e\u590f\u4ee4\u6642\u9593", "WAST"}; - String WET[] = new String[] {"\u897f\u6b50\u6642\u9593", "WET", - "\u897f\u6b50\u590f\u4ee4\u6642\u9593", "WEST"}; -- String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIT", -+ String WIT[] = new String[] {"\u897f\u5370\u5c3c\u6642\u9593", "WIB", - "\u897f\u5370\u5c3c\u590f\u4ee4\u6642\u9593", "WIST"}; -- String WST_AUS[] = new String[] {"\u897f\u65b9\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "WST", -- "\u897f\u65b9\u590f\u4ee4\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "WST"}; -+ String WST_AUS[] = new String[] {"\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST", -+ "\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "WST"}; - String WST_SAMOA[] = new String[] {"\u897f\u85a9\u6469\u4e9e\u6642\u9593", "WST", - "\u897f\u85a9\u6469\u4e9e\u590f\u4ee4\u6642\u9593", "WSDT"}; - String YAKT[] = new String[] {"\u4e9e\u5eab\u6b21\u514b\u6642\u9593", "YAKT", -@@ -291,7 +291,7 @@ - {"Africa/Porto-Novo", WAT}, - {"Africa/Sao_Tome", GMT}, - {"Africa/Timbuktu", GMT}, -- {"Africa/Tripoli", CET}, -+ {"Africa/Tripoli", EET}, - {"Africa/Tunis", CET}, - {"Africa/Windhoek", WAT}, - {"America/Adak", HAST}, -@@ -308,7 +308,7 @@ - {"America/Argentina/Rio_Gallegos", AGT}, - {"America/Argentina/Salta", AGT}, - {"America/Argentina/San_Juan", AGT}, -- {"America/Argentina/San_Luis", WART}, -+ {"America/Argentina/San_Luis", AGT}, - {"America/Argentina/Tucuman", AGT}, - {"America/Argentina/Ushuaia", AGT}, - {"America/Aruba", AST}, -@@ -349,7 +349,7 @@ - {"America/Detroit", EST}, - {"America/Dominica", AST}, - {"America/Edmonton", MST}, -- {"America/Eirunepe", AMT}, -+ {"America/Eirunepe", ACT}, - {"America/El_Salvador", CST}, - {"America/Ensenada", PST}, - {"America/Fort_Wayne", EST}, -@@ -401,8 +401,8 @@ - {"America/Mendoza", AGT}, - {"America/Menominee", CST}, - {"America/Merida", CST}, -- {"America/Metlakatla", new String[] {"Metlakatla Standard Time", "MeST", -- "Metlakatla Daylight Time", "MeDT"}}, -+ {"America/Metlakatla", new String[] {"\u6885\u7279\u62C9\u5361\u7279\u62C9\u6A19\u6E96\u6642\u9593", "MeST", -+ "\u6885\u7279\u62C9\u5361\u7279\u62C9\u65E5\u5149\u7BC0\u7D04\u6642\u9593", "MeDT"}}, - {"America/Mexico_City", CST}, - {"America/Miquelon", new String[] {"\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u6a19\u6e96\u6642\u9593", "PMST", - "\u76ae\u57c3\u723e\u5cf6\u53ca\u5bc6\u514b\u9686\u5cf6\u65e5\u5149\u7bc0\u7d04\u6642\u9593", "PMDT"}}, -@@ -426,7 +426,7 @@ - "\u8607\u5229\u5357\u590f\u4ee4\u6642\u9593", "SRST"}}, - {"America/Port-au-Prince", EST}, - {"America/Port_of_Spain", AST}, -- {"America/Porto_Acre", AMT}, -+ {"America/Porto_Acre", ACT}, - {"America/Porto_Velho", AMT}, - {"America/Puerto_Rico", AST}, - {"America/Rainy_River", CST}, -@@ -434,7 +434,7 @@ - {"America/Recife", BRT}, - {"America/Regina", CST}, - {"America/Resolute", CST}, -- {"America/Rio_Branco", AMT}, -+ {"America/Rio_Branco", ACT}, - {"America/Rosario", AGT}, - {"America/Santa_Isabel", PST}, - {"America/Santarem", BRT}, -@@ -466,8 +466,8 @@ - "\u81fa\u7dad\u65af\u590f\u4ee4\u6642\u9593", "DAVST"}}, - {"Antarctica/DumontDUrville", new String[] {"Dumont-d'Urville \u6642\u9593", "DDUT", - "Dumont-d'Urville \u590f\u4ee4\u6642\u9593", "DDUST"}}, -- {"Antarctica/Macquarie", new String[] {"Macquarie Island Time", "MIST", -- "Macquarie Island Summer Time", "MIST"}}, -+ {"Antarctica/Macquarie", new String[] {"\u9EA5\u5938\u5229\u5CF6\u6642\u9593", "MIST", -+ "\u9EA5\u5938\u5229\u5CF6\u590F\u4EE4\u6642\u9593", "MIST"}}, - {"Antarctica/Mawson", new String[] {"\u83ab\u68ee\u6642\u9593", "MAWT", - "\u83ab\u68ee\u590f\u4ee4\u6642\u9593", "MAWST"}}, - {"Antarctica/McMurdo", NZST}, -@@ -527,7 +527,7 @@ - "Irkutsk \u590f\u4ee4\u6642\u9593", "IRKST"}}, - {"Asia/Istanbul", EET}, - {"Asia/Jakarta", WIT}, -- {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "EIT", -+ {"Asia/Jayapura", new String[] {"\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u6642\u9593", "WIT", - "\u6771\u5370\u5ea6\u5c3c\u897f\u4e9e\u590f\u65e5\u6642\u9593", "EIST"}}, - {"Asia/Kabul", new String[] {"\u963f\u5bcc\u6c57\u6642\u9593", "AFT", - "\u963f\u5bcc\u6c57\u590f\u4ee4\u6642\u9593", "AFST"}}, -@@ -537,7 +537,8 @@ - {"Asia/Kashgar", CTT}, - {"Asia/Kathmandu", NPT}, - {"Asia/Katmandu", NPT}, -- {"Asia/Khandyga", YAKT}, -+ {"Asia/Khandyga", new String[] {"\u6F22\u5730\u52A0 (Khandyga) \u6642\u9593", "YAKT", -+ "\u6F22\u5730\u52A0 (Khandyga) \u590F\u4EE4\u6642\u9593", "YAKST"}}, - {"Asia/Kolkata", IST}, - {"Asia/Krasnoyarsk", new String[] {"\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u6642\u9593", "KRAT", - "\u514b\u62c9\u65af\u8afe\u4e9e\u723e\u65af\u514b\u590f\u4ee4\u6642\u9593", "KRAST"}}, -@@ -587,7 +588,8 @@ - {"Asia/Ulaanbaatar", ULAT}, - {"Asia/Ulan_Bator", ULAT}, - {"Asia/Urumqi", CTT}, -- {"Asia/Ust-Nera", VLAT}, -+ {"Asia/Ust-Nera", new String[] {"\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u6642\u9593", "VLAT", -+ "\u70CF\u65AF\u5167\u62C9 (Ust-Nera) \u590F\u4EE4\u6642\u9593", "VLAST"}}, - {"Asia/Vientiane", ICT}, - {"Asia/Vladivostok", VLAT}, - {"Asia/Yakutsk", YAKT}, -@@ -617,8 +619,8 @@ - {"Australia/Canberra", EST_NSW}, - {"Australia/Currie", EST_NSW}, - {"Australia/Darwin", DARWIN}, -- {"Australia/Eucla", new String[] {"\u4e2d\u897f\u90e8\u6a19\u6e96\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "CWST", -- "\u4e2d\u897f\u90e8\u65e5\u5149\u7bc0\u7d04\u6642\u9593 (\u6fb3\u5927\u5229\u4e9e)", "CWST"}}, -+ {"Australia/Eucla", new String[] {"\u4E2D\u897F\u90E8\u6A19\u6E96\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST", -+ "\u4E2D\u897F\u90E8\u590F\u4EE4\u6642\u9593 (\u6FB3\u5927\u5229\u4E9E)", "CWST"}}, - {"Australia/Hobart", TASMANIA}, - {"Australia/LHI", LORD_HOWE}, - {"Australia/Lindeman", BRISBANE}, -@@ -636,7 +638,7 @@ - {"Australia/Yancowinna", BROKEN_HILL}, - {"BET", BRT}, - {"BST", BDT}, -- {"Brazil/Acre", AMT}, -+ {"Brazil/Acre", ACT}, - {"Brazil/DeNoronha", NORONHA}, - {"Brazil/East", BRT}, - {"Brazil/West", AMT}, -@@ -754,7 +756,7 @@ - {"Jamaica", EST}, - {"Japan", JST}, - {"Kwajalein", MHT}, -- {"Libya", CET}, -+ {"Libya", EET}, - {"MET", new String[] {"\u4e2d\u6b50\u6642\u9593", "MET", - "\u4e2d\u6b50\u590f\u4ee4\u6642\u9593", "MEST"}}, - {"Mexico/BajaNorte", PST}, ---- jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2013-09-06 11:28:55.000000000 -0700 -+++ jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2014-04-20 12:39:18.000000000 -0700 -@@ -38,6 +38,7 @@ - # gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] - # gnumake JDK= OSNAME=linux [OPT=true] - # gnumake JDK= OSNAME=win32 [OPT=true] -+# gnumake JDK= OSNAME=bsd [OPT=true] - # - ######################################################################## + * @stable ICU 2.4 + */ +-#ifndef LE_FAILURE ++#ifndef LE_SUCCESS + #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code)) + #endif + +@@ -781,4 +804,4 @@ + #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) + #endif + +-#endif /* __LETYPES_H */ ++#endif +--- ./jdk/src/share/native/sun/font/layout/LayoutEngine.cpp 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LayoutEngine.cpp 2014-01-18 12:16:22.000000000 -0800 +@@ -156,7 +156,7 @@ + CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); + virtual ~CanonMarkFilter(); + +- virtual le_bool accept(LEGlyphID glyph) const; ++ virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; + }; + + CanonMarkFilter::CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success) +@@ -169,9 +169,8 @@ + // nothing to do? + } + +-le_bool CanonMarkFilter::accept(LEGlyphID glyph) const ++le_bool CanonMarkFilter::accept(LEGlyphID glyph, LEErrorCode &success) const + { +- LEErrorCode success = LE_NO_ERROR; + le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); + if(LE_FAILURE(success)) return false; + return glyphClass != 0; +@@ -263,7 +262,9 @@ + return count; + } + +- LEReferenceTo canonGSUBTable((GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable); ++ LEReferenceTo canonGSUBTable(LETableReference::kStaticData, ++ (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable, ++ CanonShaping::glyphSubstitutionTableLen); + LETag scriptTag = OpenTypeLayoutEngine::getScriptTag(fScriptCode); + LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode); + le_int32 i, dir = 1, out = 0, outCharCount = count; +@@ -323,7 +324,8 @@ + LE_DELETE_ARRAY(reordered); + } + +- outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, (const GlyphDefinitionTableHeader*)NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); ++ const LEReferenceTo noGDEF; // empty gdef header ++ outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, noGDEF, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); + + if (LE_FAILURE(success)) { + delete substitutionFilter; +@@ -403,10 +405,13 @@ + LEPoint advance; + + glyphStorage.setPosition(i, x, y, success); ++ _LETRACE("g#%-4d (%.2f, %.2f)", i, x, y); + + fFontInstance->getGlyphAdvance(glyphStorage[i], advance); + x += advance.fX; + y += advance.fY; ++ ++ + } + + glyphStorage.setPosition(glyphCount, x, y, success); +@@ -424,7 +429,7 @@ + return; + } + +- LEReferenceTo gdefTable((GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, ++ LEReferenceTo gdefTable(LETableReference::kStaticData, (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, + CanonShaping::glyphDefinitionTableLen); + CanonMarkFilter filter(gdefTable, success); + +@@ -464,9 +469,10 @@ + glyphStorage.getGlyphPosition(p + 1, next, ignore, success); + + xAdvance = next - prev; ++ _LETRACE("p#%d (%.2f,%.2f)", p, xAdvance, 0); + glyphStorage.adjustPosition(p, xAdjust, 0, success); + +- if (markFilter->accept(glyphStorage[p])) { ++ if (markFilter->accept(glyphStorage[p], success)) { + xAdjust -= xAdvance; + } + +@@ -506,9 +512,13 @@ + glyphStorage.getGlyphPosition(p + 1, next, ignore, success); + + xAdvance = next - prev; ++ ++ _LETRACE("p#%d (%.2f,%.2f)", p, xAdvance, 0); ++ ++ + glyphStorage.adjustPosition(p, xAdjust, 0, success); + +- if (markFilter->accept(chars[c])) { ++ if (markFilter->accept(chars[c], success)) { + xAdjust -= xAdvance; + } + +@@ -662,8 +672,10 @@ + break; + } + } else { +- MorphTableHeader2 *morxTable = (MorphTableHeader2 *)fontInstance->getFontTable(morxTableTag); +- if (morxTable != NULL && SWAPL(morxTable->version)==0x00020000) { ++ LEReferenceTo morxTable(fontInstance, morxTableTag, success); ++ if (LE_SUCCESS(success) && ++ morxTable.isValid() && ++ SWAPL(morxTable->version)==0x00020000) { + result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success); + } else { + LEReferenceTo mortTable(fontInstance, mortTableTag, success); +@@ -687,7 +699,6 @@ + } + + case arabScriptCode: +- //case hebrScriptCode: + result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); + break; + +--- ./jdk/src/share/native/sun/font/layout/LayoutEngine.h 2013-09-06 11:29:01.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LayoutEngine.h 2014-01-18 12:16:23.000000000 -0800 +@@ -156,8 +156,8 @@ + * @param fontInstance - the font for the text + * @param scriptCode - the script for the text + * @param languageCode - the language for the text +- * @param typoFlags - the typographic control flags for the text. Set bit 1 if kerning +- * is desired, set bit 2 if ligature formation is desired. Others are reserved. ++ * @param typoFlags - the typographic control flags for the text (a bitfield). Use kTypoFlagKern ++ * if kerning is desired, kTypoFlagLiga if ligature formation is desired. Others are reserved. + * @param success - set to an error code if the operation fails + * + * @see LEFontInstance +--- ./jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -95,7 +95,7 @@ + + if (actionOffset != 0) { + LEReferenceTo ap(stHeader, success, ligActionOffset); // byte offset +- ap.addObject(ligActionIndex - 1, success); // index offset ( one before the actual start, because we will pre-increment) ++ ap.addObject(ligActionIndex, success); + LEReferenceToArrayOf ligatureTable(stHeader, success, ligatureOffset, LE_UNBOUNDED_ARRAY); + LigatureActionEntry action; + le_int32 offset, i = 0; +@@ -111,7 +111,6 @@ + do { + le_uint32 componentGlyph = componentStack[m--]; // pop off + +- ap.addObject(success); + action = SWAPL(*ap.getAlias()); + + if (m < 0) { +@@ -145,7 +144,8 @@ + LE_DEBUG_BAD_FONT("m<0") + } + #endif +- } while (!(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items ++ ap.addObject(success); ++ } while (LE_SUCCESS(success) && !(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items + + while (mm >= 0) { + if (++m >= nComponents) { +--- ./jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -49,14 +49,20 @@ + return 0; + } + +- if (coverageIndex >= 0) { ++ LEReferenceToArrayOf ligSetTableOffsetArrayRef(base, success, ligSetTableOffsetArray, SWAPW(ligSetCount)); ++ ++ if (coverageIndex >= 0 && LE_SUCCESS(success) && (le_uint32)coverageIndex < ligSetTableOffsetArrayRef.getCount()) { + Offset ligSetTableOffset = SWAPW(ligSetTableOffsetArray[coverageIndex]); +- const LigatureSetTable *ligSetTable = (const LigatureSetTable *) ((char *) this + ligSetTableOffset); ++ LEReferenceTo ligSetTable(base, success, ligSetTableOffset); ++ ++ if( LE_FAILURE(success) ) { return 0; } + le_uint16 ligCount = SWAPW(ligSetTable->ligatureCount); + +- for (le_uint16 lig = 0; lig < ligCount; lig += 1) { ++ LEReferenceTo ligatureTableOffsetArray(base, success, ligSetTable->ligatureTableOffsetArray, ligCount); ++ for (le_uint16 lig = 0; LE_SUCCESS(success) && lig < ligCount; lig += 1) { + Offset ligTableOffset = SWAPW(ligSetTable->ligatureTableOffsetArray[lig]); +- const LigatureTable *ligTable = (const LigatureTable *) ((char *)ligSetTable + ligTableOffset); ++ LEReferenceTo ligTable(ligSetTable, success, ligTableOffset); ++ if(LE_FAILURE(success)) { return 0; } + le_uint16 compCount = SWAPW(ligTable->compCount) - 1; + le_int32 startPosition = glyphIterator->getCurrStreamPosition(); + TTGlyphID ligGlyph = SWAPW(ligTable->ligGlyph); +@@ -72,7 +78,7 @@ + } + } + +- if (comp == compCount && (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, ligGlyph)))) { ++ if (comp == compCount && (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, ligGlyph), success))) { + GlyphIterator tempIterator(*glyphIterator); + TTGlyphID deletedGlyph = tempIterator.ignoresMarks()? 0xFFFE : 0xFFFF; + +--- ./jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -60,8 +60,10 @@ + LEReferenceTo lookupSubtable = lookupTable->getLookupSubtable(lookupTable, subtable, success); + + delta = applySubtable(lookupSubtable, lookupType, glyphIterator, fontInstance, success); +- +- if (delta > 0 || LE_FAILURE(success)) { ++ if (delta > 0 && LE_FAILURE(success)) { ++#if LE_TRACE ++ _LETRACE("Posn #%d, type %X, applied subtable #%d/%d - %s\n", startPosition, lookupType, subtable, subtableCount, u_errorName((UErrorCode)success)); ++#endif + return 1; + } + +@@ -86,7 +88,7 @@ + } + + GlyphIterator glyphIterator(glyphStorage, glyphPositionAdjustments, +- rightToLeft, 0, 0, glyphDefinitionTableHeader); ++ rightToLeft, 0, 0, glyphDefinitionTableHeader, success); + le_int32 newGlyphCount = glyphCount; + + for (le_uint16 order = 0; order < lookupOrderCount && LE_SUCCESS(success); order += 1) { +@@ -94,6 +96,7 @@ + FeatureMask selectMask = lookupSelectArray[lookup]; + + if (selectMask != 0) { ++ _LETRACE("Processing order#%d/%d", order, lookupOrderCount); + const LEReferenceTo lookupTable = lookupListTable->getLookupTable(lookupListTable, lookup, success); + if (!lookupTable.isValid() ||LE_FAILURE(success) ) { + continue; +@@ -103,8 +106,11 @@ + glyphIterator.reset(lookupFlags, selectMask); + + while (glyphIterator.findFeatureTag()) { +- applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); // TODO ++ applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); + if (LE_FAILURE(success)) { ++#if LE_TRACE ++ _LETRACE("Failure for lookup 0x%x - %s\n", lookup, u_errorName((UErrorCode)success)); ++#endif + return 0; + } + } +@@ -138,7 +144,7 @@ + le_int32 LookupProcessor::selectLookups(const LEReferenceTo &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success) + { + le_uint16 lookupCount = featureTable.isValid()? SWAPW(featureTable->lookupCount) : 0; +- le_int32 store = order; ++ le_uint32 store = (le_uint32)order; + + LEReferenceToArrayOf lookupListIndexArray(featureTable, success, featureTable->lookupListIndexArray, lookupCount); + +@@ -147,6 +153,9 @@ + if (lookupListIndex >= lookupSelectCount) { + continue; + } ++ if (store >= lookupOrderCount) { ++ continue; ++ } + + lookupSelectArray[lookupListIndex] |= featureMask; + lookupOrderArray[store++] = lookupListIndex; +@@ -246,7 +255,7 @@ + + if (requiredFeatureIndex != 0xFFFF) { + requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success); +- featureReferences += SWAPW(featureTable->lookupCount); ++ featureReferences += SWAPW(requiredFeatureTable->lookupCount); + } + + lookupOrderArray = LE_NEW_ARRAY(le_uint16, featureReferences); +@@ -254,6 +263,7 @@ + success = LE_MEMORY_ALLOCATION_ERROR; + return; + } ++ lookupOrderCount = featureReferences; + + for (le_int32 f = 0; f < featureMapCount; f += 1) { + FeatureMap fm = featureMap[f]; +@@ -272,6 +282,7 @@ + + for (le_uint16 feature = 0; feature < featureCount; feature += 1) { + LEReferenceToArrayOf featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount); ++ if (LE_FAILURE(success)) { continue; } + le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature,success)); + + // don't add the required feature to the list more than once... +--- ./jdk/src/share/native/sun/font/layout/Lookups.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/Lookups.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -65,7 +65,7 @@ + + if(LE_FAILURE(success)) return 0; + +- return coverageTable->getGlyphCoverage(glyphID); ++ return coverageTable->getGlyphCoverage(coverageTable, glyphID, success); + } + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/MarkArrays.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/MarkArrays.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -38,20 +38,28 @@ + + U_NAMESPACE_BEGIN + +-le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, +- LEPoint &anchor) const ++le_int32 MarkArray::getMarkClass(const LETableReference &base, LEGlyphID glyphID, ++ le_int32 coverageIndex, const LEFontInstance *fontInstance, ++ LEPoint &anchor, LEErrorCode &success) const + { + le_int32 markClass = -1; + +- if (coverageIndex >= 0) { ++ if ( coverageIndex >= 0 && LE_SUCCESS(success) ) { + le_uint16 mCount = SWAPW(markCount); +- + if (coverageIndex < mCount) { ++ LEReferenceToArrayOf markRecordArrayRef(base, success, markRecordArray, mCount); ++ if(LE_FAILURE(success)) { ++ return markClass; ++ } + const MarkRecord *markRecord = &markRecordArray[coverageIndex]; + Offset anchorTableOffset = SWAPW(markRecord->markAnchorTableOffset); +- const AnchorTable *anchorTable = (AnchorTable *) ((char *) this + anchorTableOffset); ++ LEReferenceTo anchorTable(base, success, anchorTableOffset); ++ ++ if(LE_FAILURE(success)) { ++ return markClass; ++ } + +- anchorTable->getAnchor(glyphID, fontInstance, anchor); ++ anchorTable->getAnchor(anchorTable, glyphID, fontInstance, anchor, success); + markClass = SWAPW(markRecord->markClass); + } + +--- ./jdk/src/share/native/sun/font/layout/MarkArrays.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/MarkArrays.h 2014-01-18 12:16:23.000000000 -0800 +@@ -54,8 +54,9 @@ + le_uint16 markCount; + MarkRecord markRecordArray[ANY_NUMBER]; + +- le_int32 getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, +- LEPoint &anchor) const; ++ le_int32 getMarkClass(const LETableReference &base, LEGlyphID glyphID, ++ le_int32 coverageIndex, const LEFontInstance *fontInstance, ++ LEPoint &anchor, LEErrorCode &success) const; + }; + LE_VAR_ARRAY(MarkArray, markRecordArray) + +--- ./jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -66,11 +66,12 @@ + } + + LEPoint markAnchor; +- const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); +- le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); ++ LEReferenceTo markArray(base, success, (const MarkArray *) ((char *) this + SWAPW(markArrayOffset))); ++ if(LE_FAILURE(success)) return 0; ++ le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); + le_uint16 mcCount = SWAPW(classCount); + +- if (markClass < 0 || markClass >= mcCount) { ++ if (markClass < 0 || markClass >= mcCount || LE_FAILURE(success)) { + // markGlyph isn't in the mark array or its + // mark class is too big. The table is mal-formed! + return 0; +@@ -80,7 +81,8 @@ + GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/)); + LEGlyphID baseGlyph = findBaseGlyph(&baseIterator); + le_int32 baseCoverage = getBaseCoverage(base, (LEGlyphID) baseGlyph, success); +- const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset)); ++ LEReferenceTo baseArray(base, success, (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset))); ++ if(LE_FAILURE(success)) return 0; + le_uint16 baseCount = SWAPW(baseArray->baseRecordCount); + + if (baseCoverage < 0 || baseCoverage >= baseCount) { +@@ -89,19 +91,23 @@ + // table is mal-formed... + return 0; + } ++ LEReferenceTo baseRecord(base, success, &baseArray->baseRecordArray[baseCoverage * mcCount]); ++ if( LE_FAILURE(success) ) { return 0; } ++ LEReferenceToArrayOf baseAnchorTableOffsetArray(base, success, &(baseRecord->baseAnchorTableOffsetArray[0]), markClass+1); + +- const BaseRecord *baseRecord = &baseArray->baseRecordArray[baseCoverage * mcCount]; ++ if( LE_FAILURE(success) ) { return 0; } + Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]); +- const AnchorTable *anchorTable = (const AnchorTable *) ((char *) baseArray + anchorTableOffset); +- LEPoint baseAnchor, markAdvance, pixels; +- +- if (anchorTableOffset == 0) { ++ if (anchorTableOffset <= 0) { + // this means the table is mal-formed... + glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); + return 0; + } + +- anchorTable->getAnchor(baseGlyph, fontInstance, baseAnchor); ++ LEReferenceTo anchorTable(baseArray, success, anchorTableOffset); ++ LEPoint baseAnchor, markAdvance, pixels; ++ ++ ++ anchorTable->getAnchor(anchorTable, baseGlyph, fontInstance, baseAnchor, success); + + fontInstance->getGlyphAdvance(markGlyph, pixels); + fontInstance->pixelsToUnits(pixels, markAdvance); +@@ -109,6 +115,8 @@ + float anchorDiffX = baseAnchor.fX - markAnchor.fX; + float anchorDiffY = baseAnchor.fY - markAnchor.fY; + ++ _LETRACE("Offset: (%.2f, %.2f) glyph 0x%X", anchorDiffX, anchorDiffY, markGlyph); ++ + glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); + + if (glyphIterator->isRightToLeft()) { +@@ -132,7 +140,6 @@ + gi.next(); + } + // end of JK patch +- + fontInstance->pixelsToUnits(pixels, baseAdvance); + + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); +--- ./jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -65,8 +65,11 @@ + } + + LEPoint markAnchor; +- const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); +- le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); ++ LEReferenceTo markArray(base, success, SWAPW(markArrayOffset)); ++ if( LE_FAILURE(success) ) { ++ return 0; ++ } ++ le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); + le_uint16 mcCount = SWAPW(classCount); + + if (markClass < 0 || markClass >= mcCount) { +@@ -79,7 +82,7 @@ + GlyphIterator ligatureIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreBaseGlyphs*/)); + LEGlyphID ligatureGlyph = findLigatureGlyph(&ligatureIterator); + le_int32 ligatureCoverage = getBaseCoverage(base, (LEGlyphID) ligatureGlyph, success); +- const LigatureArray *ligatureArray = (const LigatureArray *) ((char *) this + SWAPW(baseArrayOffset)); ++ LEReferenceTo ligatureArray(base, success, SWAPW(baseArrayOffset)); + le_uint16 ligatureCount = SWAPW(ligatureArray->ligatureCount); + + if (ligatureCoverage < 0 || ligatureCoverage >= ligatureCount) { +@@ -91,7 +94,7 @@ + + le_int32 markPosition = glyphIterator->getCurrStreamPosition(); + Offset ligatureAttachOffset = SWAPW(ligatureArray->ligatureAttachTableOffsetArray[ligatureCoverage]); +- const LigatureAttachTable *ligatureAttachTable = (const LigatureAttachTable *) ((char *) ligatureArray + ligatureAttachOffset); ++ LEReferenceTo ligatureAttachTable(ligatureArray, success, ligatureAttachOffset); + le_int32 componentCount = SWAPW(ligatureAttachTable->componentCount); + le_int32 component = ligatureIterator.getMarkComponent(markPosition); + +@@ -100,12 +103,14 @@ + component = componentCount - 1; + } + +- const ComponentRecord *componentRecord = &ligatureAttachTable->componentRecordArray[component * mcCount]; ++ LEReferenceTo componentRecord(base, success, &ligatureAttachTable->componentRecordArray[component * mcCount]); ++ LEReferenceToArrayOf ligatureAnchorTableOffsetArray(base, success, &(componentRecord->ligatureAnchorTableOffsetArray[0]), markClass+1); ++ if( LE_FAILURE(success) ) { return 0; } + Offset anchorTableOffset = SWAPW(componentRecord->ligatureAnchorTableOffsetArray[markClass]); +- const AnchorTable *anchorTable = (const AnchorTable *) ((char *) ligatureAttachTable + anchorTableOffset); ++ LEReferenceTo anchorTable(ligatureAttachTable, success, anchorTableOffset); + LEPoint ligatureAnchor, markAdvance, pixels; + +- anchorTable->getAnchor(ligatureGlyph, fontInstance, ligatureAnchor); ++ anchorTable->getAnchor(anchorTable, ligatureGlyph, fontInstance, ligatureAnchor, success); + + fontInstance->getGlyphAdvance(markGlyph, pixels); + fontInstance->pixelsToUnits(pixels, markAdvance); +--- ./jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -66,8 +66,11 @@ + } + + LEPoint markAnchor; +- const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); +- le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); ++ LEReferenceTo markArray(base, success, SWAPW(markArrayOffset)); ++ if(LE_FAILURE(success)) { ++ return 0; ++ } ++ le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); + le_uint16 mcCount = SWAPW(classCount); + + if (markClass < 0 || markClass >= mcCount) { +@@ -79,7 +82,8 @@ + GlyphIterator mark2Iterator(*glyphIterator); + LEGlyphID mark2Glyph = findMark2Glyph(&mark2Iterator); + le_int32 mark2Coverage = getBaseCoverage(base, (LEGlyphID) mark2Glyph, success); +- const Mark2Array *mark2Array = (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset)); ++ LEReferenceTo mark2Array(base, success, (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset))); ++ if(LE_FAILURE(success)) return 0; + le_uint16 mark2Count = SWAPW(mark2Array->mark2RecordCount); + + if (mark2Coverage < 0 || mark2Coverage >= mark2Count) { +@@ -89,9 +93,11 @@ + return 0; + } + +- const Mark2Record *mark2Record = &mark2Array->mark2RecordArray[mark2Coverage * mcCount]; ++ LEReferenceTo mark2Record(base, success, &mark2Array->mark2RecordArray[mark2Coverage * mcCount]); ++ if(LE_FAILURE(success)) return 0; + Offset anchorTableOffset = SWAPW(mark2Record->mark2AnchorTableOffsetArray[markClass]); +- const AnchorTable *anchorTable = (const AnchorTable *) ((char *) mark2Array + anchorTableOffset); ++ LEReferenceTo anchorTable(mark2Array, success, anchorTableOffset); ++ if(LE_FAILURE(success)) return 0; + LEPoint mark2Anchor, markAdvance, pixels; + + if (anchorTableOffset == 0) { +@@ -99,7 +105,7 @@ + return 0; + } + +- anchorTable->getAnchor(mark2Glyph, fontInstance, mark2Anchor); ++ anchorTable->getAnchor(anchorTable, mark2Glyph, fontInstance, mark2Anchor, success); + + fontInstance->getGlyphAdvance(markGlyph, pixels); + fontInstance->pixelsToUnits(pixels, markAdvance); +@@ -107,6 +113,8 @@ + float anchorDiffX = mark2Anchor.fX - markAnchor.fX; + float anchorDiffY = mark2Anchor.fY - markAnchor.fY; + ++ _LETRACE("Offset: (%.2f, %.2f) glyph 0x%X mark2 0x%X", anchorDiffX, anchorDiffY, markGlyph, mark2Glyph); ++ + glyphIterator->setCurrGlyphBaseOffset(mark2Iterator.getCurrStreamPosition()); + + if (glyphIterator->isRightToLeft()) { +--- ./jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -54,9 +54,10 @@ + // FIXME: is this always the right thing to do? + // FIXME: should this only be done for a non-zero + // glyphCount? +- if (filter != NULL && filter->accept(glyph)) { ++ if (filter != NULL && filter->accept(glyph, success)) { + return 0; + } ++ if(LE_FAILURE(success)) return 0; + + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); + le_uint16 seqCount = SWAPW(sequenceCount); +@@ -67,7 +68,7 @@ + + if (coverageIndex >= 0 && coverageIndex < seqCount) { + Offset sequenceTableOffset = SWAPW(sequenceTableOffsetArray[coverageIndex]); +- const SequenceTable *sequenceTable = (const SequenceTable *) ((char *) this + sequenceTableOffset); ++ LEReferenceTo sequenceTable(base, success, sequenceTableOffset); + le_uint16 glyphCount = SWAPW(sequenceTable->glyphCount); + + if (glyphCount == 0) { +@@ -76,7 +77,7 @@ + } else if (glyphCount == 1) { + TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[0]); + +- if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute))) { ++ if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { + return 0; + } + +@@ -89,7 +90,7 @@ + for (le_int32 i = 0; i < glyphCount; i += 1) { + TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[i]); + +- if (! filter->accept(substitute)) { ++ if (! filter->accept(substitute, success)) { + return 0; + } + } +--- ./jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp 2014-01-18 12:16:23.000000000 -0800 +@@ -470,6 +470,7 @@ + void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, + LEGlyphStorage &glyphStorage, LEErrorCode &success) + { ++ _LETRACE("OTLE::adjustGPOS"); + if (LE_FAILURE(success)) { + return; + } +@@ -510,14 +511,17 @@ + if (!fGPOSTable.isEmpty()) { + if (fScriptTagV2 != nullScriptTag && + fGPOSTable->coversScriptAndLanguage(fGPOSTable, fScriptTagV2,fLangSysTag,success)) { ++ _LETRACE("OTLE::process [0]"); + fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag, + fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); + + } else { ++ _LETRACE("OTLE::process [1]"); + fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, + fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); + } + } else if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ ++ _LETRACE("OTLE::kerning"); + LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success); + KernTable kt(kernTable, success); + kt.process(glyphStorage, success); +@@ -546,6 +550,7 @@ + + xPlacement = fFontInstance->xUnitsToPoints(xPlacement); + yPlacement = fFontInstance->yUnitsToPoints(yPlacement); ++ _LETRACE("OTLE GPOS: #%d, (%.2f,%.2f)", i, xPlacement, yPlacement); + glyphStorage.adjustPosition(i, xAdjust + xPlacement, -(yAdjust + yPlacement), success); + + xAdjust += fFontInstance->xUnitsToPoints(xAdvance); +--- ./jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -80,6 +80,7 @@ + Offset OpenTypeUtilities::getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success) + { + if(LE_FAILURE(success)) return 0; ++ const TagAndOffsetRecord *r0 = (const TagAndOffsetRecord*)records.getAlias(); + + le_uint32 recordCount = records.getCount(); + le_uint8 bit = highBit(recordCount); +@@ -89,17 +90,17 @@ + le_int32 index = 0; + + { +- const ATag &aTag = records.getAlias(extra,success)->tag; ++ const ATag &aTag = (r0+extra)->tag; + if (SWAPT(aTag) <= tag) { + index = extra; + } + } + +- while (probe > (1 << 0) && LE_SUCCESS(success)) { ++ while (probe > (1 << 0)) { + probe >>= 1; + + { +- const ATag &aTag = records.getAlias(index+probe,success)->tag; ++ const ATag &aTag = (r0+index+probe)->tag; + if (SWAPT(aTag) <= tag) { + index += probe; + } +@@ -107,9 +108,9 @@ + } + + { +- const ATag &aTag = records.getAlias(index,success)->tag; ++ const ATag &aTag = (r0+index)->tag; + if (SWAPT(aTag) == tag) { +- return SWAPW(records.getAlias(index,success)->offset); ++ return SWAPW((r0+index)->offset); + } + } + +--- ./jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h 2014-01-18 12:16:24.000000000 -0800 +@@ -46,15 +46,14 @@ + public: + static le_int8 highBit(le_int32 value); + static Offset getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success); +- /** +- * @deprecated TODO remove +- */ ++#if LE_ENABLE_RAW + static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount) { + LEErrorCode success = LE_NO_ERROR; + LETableReference recordRef0((const le_uint8*)records); + LEReferenceToArrayOf recordRef(recordRef0, success, (size_t)0, recordCount); + return getGlyphRangeIndex(glyphID, recordRef, success); + } ++#endif + static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf &records, LEErrorCode &success); + static le_int32 search(le_uint16 value, const le_uint16 array[], le_int32 count); + static le_int32 search(le_uint32 value, const le_uint32 array[], le_int32 count); +--- ./jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -76,19 +76,17 @@ + { + LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); + le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); +- +- if (LE_FAILURE(success)) { +- return 0; +- } + GlyphIterator tempIterator(*glyphIterator); + +- if (coverageIndex >= 0 && glyphIterator->next()) { ++ LEReferenceToArrayOf pairSetTableOffsetArrayRef(base, success, pairSetTableOffsetArray, SWAPW(pairSetCount)); ++ ++ if (LE_SUCCESS(success) && coverageIndex >= 0 && glyphIterator->next() && (le_uint32)coverageIndex < pairSetTableOffsetArrayRef.getCount()) { + Offset pairSetTableOffset = SWAPW(pairSetTableOffsetArray[coverageIndex]); +- LEReferenceTo pairSetTable(base, success, ((char *) this + pairSetTableOffset)); +- if (LE_FAILURE(success)) { +- return 0; +- } ++ LEReferenceTo pairSetTable(base, success, pairSetTableOffset); ++ if( LE_FAILURE(success) ) return 0; + le_uint16 pairValueCount = SWAPW(pairSetTable->pairValueCount); ++ LEReferenceTo pairValueRecordArray(pairSetTable, success, pairSetTable->pairValueRecordArray); ++ if( LE_FAILURE(success) ) return 0; + le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); + le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); + le_int16 recordSize = sizeof(PairValueRecord) - sizeof(ValueRecord) + valueRecord1Size + valueRecord2Size; +@@ -96,21 +94,22 @@ + LEReferenceTo pairValueRecord; + + if (pairValueCount != 0) { +- pairValueRecord = findPairValueRecord(base, (TTGlyphID) LE_GET_GLYPH(secondGlyph), pairSetTable->pairValueRecordArray, pairValueCount, recordSize, success); ++ pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph), pairValueRecordArray, pairValueCount, recordSize, success); + } + +- if (pairValueRecord.isEmpty()) { ++ if (pairValueRecord.isEmpty() || LE_FAILURE(success)) { + return 0; + } + + if (valueFormat1 != 0) { +- pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); ++ pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), base, tempIterator, fontInstance, success); + } + + if (valueFormat2 != 0) { +- const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size); +- +- valueRecord2->adjustPosition(SWAPW(valueFormat2), (char *) this, *glyphIterator, fontInstance); ++ LEReferenceTo valueRecord2(base, success, ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size)); ++ if(LE_SUCCESS(success)) { ++ valueRecord2->adjustPosition(SWAPW(valueFormat2), base, *glyphIterator, fontInstance, success); ++ } + } + + // back up glyphIterator so second glyph can be +@@ -135,26 +134,28 @@ + + if (coverageIndex >= 0 && glyphIterator->next()) { + LEGlyphID secondGlyph = glyphIterator->getCurrGlyphID(); +- const ClassDefinitionTable *classDef1 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef1Offset)); +- const ClassDefinitionTable *classDef2 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef2Offset)); +- le_int32 class1 = classDef1->getGlyphClass(firstGlyph); +- le_int32 class2 = classDef2->getGlyphClass(secondGlyph); ++ const LEReferenceTo classDef1(base, success, SWAPW(classDef1Offset)); ++ const LEReferenceTo classDef2(base, success, SWAPW(classDef2Offset)); ++ le_int32 class1 = classDef1->getGlyphClass(classDef1, firstGlyph, success); ++ le_int32 class2 = classDef2->getGlyphClass(classDef2, secondGlyph, success); + le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); + le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); + le_int16 class2RecordSize = valueRecord1Size + valueRecord2Size; + le_int16 class1RecordSize = class2RecordSize * SWAPW(class2Count); +- const Class1Record *class1Record = (const Class1Record *) ((char *) class1RecordArray + (class1RecordSize * class1)); +- const Class2Record *class2Record = (const Class2Record *) ((char *) class1Record->class2RecordArray + (class2RecordSize * class2)); +- ++ const LEReferenceTo class1Record(base, success, (const Class1Record *) ((char *) class1RecordArray + (class1RecordSize * class1))); ++ const LEReferenceTo class2Record(base, success, (const Class2Record *) ((char *) class1Record->class2RecordArray + (class2RecordSize * class2))); + ++ if( LE_SUCCESS(success) ) { + if (valueFormat1 != 0) { +- class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); ++ class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), base, tempIterator, fontInstance, success); + } +- + if (valueFormat2 != 0) { +- const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &class2Record->valueRecord1 + valueRecord1Size); +- +- valueRecord2->adjustPosition(SWAPW(valueFormat2), (const char *) this, *glyphIterator, fontInstance); ++ const LEReferenceTo valueRecord2(base, success, ((char *) &class2Record->valueRecord1) + valueRecord1Size); ++ LEReferenceTo thisRef(base, success, this); ++ if(LE_SUCCESS(success)) { ++ valueRecord2->adjustPosition(SWAPW(valueFormat2), thisRef, *glyphIterator, fontInstance, success); ++ } ++ } + } + + // back up glyphIterator so second glyph can be +@@ -166,23 +167,24 @@ + return 0; + } + +-LEReferenceTo PairPositioningFormat1Subtable::findPairValueRecord(const LETableReference &base, TTGlyphID glyphID, const PairValueRecord *records, le_uint16 recordCount, le_uint16 recordSize, LEErrorCode &success) const ++LEReferenceTo ++PairPositioningFormat1Subtable::findPairValueRecord(TTGlyphID glyphID, LEReferenceTo& records, ++ le_uint16 recordCount, ++ le_uint16 recordSize, LEErrorCode &success) const + { + #if 1 + // The OpenType spec. says that the ValueRecord table is + // sorted by secondGlyph. Unfortunately, there are fonts + // around that have an unsorted ValueRecord table. +- LEReferenceTo record(base, success, records); +- record.verifyLength(0, recordSize, success); ++ LEReferenceTo record(records); + + for(le_int32 r = 0; r < recordCount; r += 1) { +- if (LE_FAILURE(success)) return (const PairValueRecord*)NULL; ++ if(LE_FAILURE(success)) return LEReferenceTo(); + if (SWAPW(record->secondGlyph) == glyphID) { + return record; + } + +- record = LEReferenceTo(base, success, ((const char*)record.getAlias())+ recordSize); +- record.verifyLength(0, recordSize, success); ++ record.addOffset(recordSize, success); + } + #else + #error dead code - not updated. +@@ -211,7 +213,7 @@ + } + #endif + +- return (const PairValueRecord*)NULL; ++ return LEReferenceTo(); + } + + U_NAMESPACE_END +--- ./jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h 2014-01-18 12:16:24.000000000 -0800 +@@ -77,9 +77,8 @@ + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; + + private: +- LEReferenceTo findPairValueRecord(const LETableReference &base, TTGlyphID glyphID, const PairValueRecord *records, ++ LEReferenceTo findPairValueRecord(TTGlyphID glyphID, LEReferenceTo &records, + le_uint16 recordCount, le_uint16 recordSize, LEErrorCode &success) const; +- + }; + LE_VAR_ARRAY(PairPositioningFormat1Subtable, pairSetTableOffsetArray) + +--- ./jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -106,7 +106,8 @@ + } + } else { + LEReferenceToArrayOf scriptRecordArrayRef(base, success, &scriptRecordArray[0], count); +- scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); // TODO ++ ++ scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); + } + + if (scriptTableOffset != 0) { +--- ./jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -126,13 +126,13 @@ + linaScriptTag, /* 'lina' (LINA) */ + mandScriptTag, /* 'mand' (MANDAIC) */ + mayaScriptTag, /* 'maya' (MAYA) */ +- meroScriptTag, /* 'mero' (MERO) */ ++ meroScriptTag, /* 'mero' (MEROITIC_HIEROGLYPHS) */ + nkooScriptTag, /* 'nko ' (NKO) */ + orkhScriptTag, /* 'orkh' (OLD_TURKIC) */ + permScriptTag, /* 'perm' (PERM) */ + phagScriptTag, /* 'phag' (PHAGS_PA) */ + phnxScriptTag, /* 'phnx' (PHOENICIAN) */ +- plrdScriptTag, /* 'plrd' (PLRD) */ ++ plrdScriptTag, /* 'plrd' (MIAO/POLLARD) */ + roroScriptTag, /* 'roro' (RORO) */ + saraScriptTag, /* 'sara' (SARA) */ + syreScriptTag, /* 'syre' (SYRE) */ +@@ -158,7 +158,7 @@ + mteiScriptTag, /* 'mtei' (MEETEI_MAYEK) */ + armiScriptTag, /* 'armi' (IMPERIAL_ARAMAIC) */ + avstScriptTag, /* 'avst' (AVESTAN) */ +- cakmScriptTag, /* 'cakm' (CAKM) */ ++ cakmScriptTag, /* 'cakm' (CHAKMA) */ + koreScriptTag, /* 'kore' (KORE) */ + kthiScriptTag, /* 'kthi' (KAITHI) */ + maniScriptTag, /* 'mani' (MANI) */ +@@ -181,7 +181,7 @@ + kpelScriptTag, /* 'kpel' (KPEL) */ + lomaScriptTag, /* 'loma' (LOMA) */ + mendScriptTag, /* 'mend' (MEND) */ +- mercScriptTag, /* 'merc' (MERC) */ ++ mercScriptTag, /* 'merc' (MEROITIC_CURSIVE) */ + narbScriptTag, /* 'narb' (NARB) */ + nbatScriptTag, /* 'nbat' (NBAT) */ + palmScriptTag, /* 'palm' (PALM) */ +--- ./jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h 2014-01-18 12:16:24.000000000 -0800 +@@ -140,13 +140,13 @@ + const LETag linaScriptTag = 0x6C696E61; /* 'lina' (LINA) */ + const LETag mandScriptTag = 0x6D616E64; /* 'mand' (MANDAIC) */ + const LETag mayaScriptTag = 0x6D617961; /* 'maya' (MAYA) */ +-const LETag meroScriptTag = 0x6D65726F; /* 'mero' (MERO) */ ++const LETag meroScriptTag = 0x6D65726F; /* 'mero' (MEROITIC_HIEROGLYPHS) */ + const LETag nkooScriptTag = 0x6E6B6F20; /* 'nko ' (NKO) */ + const LETag orkhScriptTag = 0x6F726B68; /* 'orkh' (OLD_TURKIC) */ + const LETag permScriptTag = 0x7065726D; /* 'perm' (PERM) */ + const LETag phagScriptTag = 0x70686167; /* 'phag' (PHAGS_PA) */ + const LETag phnxScriptTag = 0x70686E78; /* 'phnx' (PHOENICIAN) */ +-const LETag plrdScriptTag = 0x706C7264; /* 'plrd' (PLRD) */ ++const LETag plrdScriptTag = 0x706C7264; /* 'plrd' (MIAO) */ + const LETag roroScriptTag = 0x726F726F; /* 'roro' (RORO) */ + const LETag saraScriptTag = 0x73617261; /* 'sara' (SARA) */ + const LETag syreScriptTag = 0x73797265; /* 'syre' (SYRE) */ +@@ -172,7 +172,7 @@ + const LETag mteiScriptTag = 0x6D746569; /* 'mtei' (MEETEI_MAYEK) */ + const LETag armiScriptTag = 0x61726D69; /* 'armi' (IMPERIAL_ARAMAIC) */ + const LETag avstScriptTag = 0x61767374; /* 'avst' (AVESTAN) */ +-const LETag cakmScriptTag = 0x63616B6D; /* 'cakm' (CAKM) */ ++const LETag cakmScriptTag = 0x63616B6D; /* 'cakm' (CHAKMA) */ + const LETag koreScriptTag = 0x6B6F7265; /* 'kore' (KORE) */ + const LETag kthiScriptTag = 0x6B746869; /* 'kthi' (KAITHI) */ + const LETag maniScriptTag = 0x6D616E69; /* 'mani' (MANI) */ +@@ -195,7 +195,7 @@ + const LETag kpelScriptTag = 0x6B70656C; /* 'kpel' (KPEL) */ + const LETag lomaScriptTag = 0x6C6F6D61; /* 'loma' (LOMA) */ + const LETag mendScriptTag = 0x6D656E64; /* 'mend' (MEND) */ +-const LETag mercScriptTag = 0x6D657263; /* 'merc' (MERC) */ ++const LETag mercScriptTag = 0x6D657263; /* 'merc' (MEROITIC_CURSIVE) */ + const LETag narbScriptTag = 0x6E617262; /* 'narb' (NARB) */ + const LETag nbatScriptTag = 0x6E626174; /* 'nbat' (NBAT) */ + const LETag palmScriptTag = 0x70616C6D; /* 'palm' (PALM) */ +--- ./jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -73,6 +73,7 @@ + + if (offset != 0) { + LEReferenceToArrayOf glyphArray(subtableHeader, success, offset, LE_UNBOUNDED_ARRAY); ++ if (LE_FAILURE(success)) { continue; } + TTGlyphID newGlyph = SWAPW(glyphArray(LE_GET_GLYPH(thisGlyph) - firstGlyph, success)); + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } +--- ./jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -65,16 +65,17 @@ + + for (glyph = 0; glyph < glyphCount; glyph += 1) { + LEGlyphID thisGlyph = glyphStorage[glyph]; ++ // lookupSegment already range checked by lookupSegment() function. + const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success); + +- if (lookupSegment != NULL) { ++ if (lookupSegment != NULL&& LE_SUCCESS(success)) { + TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph); ++ TTGlyphID lastGlyph = SWAPW(lookupSegment->lastGlyph); + le_int16 offset = SWAPW(lookupSegment->value); +- +- if (offset != 0) { +- TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader.getAliasTODO() + offset); +- TTGlyphID newGlyph = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]); +- ++ TTGlyphID thisGlyphId= LE_GET_GLYPH(thisGlyph); ++ LEReferenceToArrayOf glyphArray(subtableHeader, success, offset, lastGlyph - firstGlyph + 1); ++ if (offset != 0 && thisGlyphId <= lastGlyph && thisGlyphId >= firstGlyph && LE_SUCCESS(success) ) { ++ TTGlyphID newGlyph = SWAPW(glyphArray[thisGlyphId]); + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } + } +--- ./jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -75,7 +75,7 @@ + } + + if (coverageIndex >= 0) { +- valueRecord.adjustPosition(SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); ++ valueRecord.adjustPosition(SWAPW(valueFormat), base, *glyphIterator, fontInstance, success); + + return 1; + } +@@ -92,7 +92,7 @@ + } + + if (coverageIndex >= 0) { +- valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); ++ valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), base, *glyphIterator, fontInstance, success); + + return 1; + } +--- ./jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -76,7 +76,7 @@ + if (coverageIndex >= 0) { + TTGlyphID substitute = ((TTGlyphID) LE_GET_GLYPH(glyph)) + SWAPW(deltaGlyphID); + +- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) { ++ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { + glyphIterator->setCurrGlyphID(substitute); + } + +@@ -97,7 +97,7 @@ + if (coverageIndex >= 0) { + TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]); + +- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) { ++ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { + glyphIterator->setCurrGlyphID(substitute); + } + +--- ./jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -97,6 +97,7 @@ + + LEReferenceToArrayOf stateArray(stHeader, success, currentState, LE_UNBOUNDED_ARRAY); + EntryTableIndex entryTableIndex = stateArray.getObject((le_uint8)classCode, success); ++ if (LE_FAILURE(success)) { break; } + LE_STATE_PATIENCE_CURR(le_int32, currGlyph); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + LE_STATE_PATIENCE_INCR(currGlyph); +--- ./jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp 2013-12-01 11:14:30.000000000 -0800 +@@ -104,6 +104,10 @@ + + int putGV(JNIEnv* env, jint gmask, jint baseIndex, jobject gvdata, const LayoutEngine* engine, int glyphCount) { + int count = env->GetIntField(gvdata, gvdCountFID); ++ if (count < 0) { ++ JNU_ThrowInternalError(env, "count negative"); ++ return 0; ++ } + + jarray glyphArray = (jarray)env->GetObjectField(gvdata, gvdGlyphsFID); + if (IS_NULL(glyphArray)) { +--- ./jdk/src/share/native/sun/font/layout/TibetanReordering.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/TibetanReordering.h 2014-01-18 12:16:24.000000000 -0800 +@@ -39,7 +39,7 @@ + */ + + #ifndef __TIBETANREORDERING_H +-#define __TIBETANORDERING_H ++#define __TIBETANREORDERING_H + + /** + * \file +--- ./jdk/src/share/native/sun/font/layout/ValueRecords.cpp 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ValueRecords.cpp 2014-01-18 12:16:24.000000000 -0800 +@@ -59,8 +59,8 @@ + return SWAPW(value); + } + +-void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, +- const LEFontInstance *fontInstance) const ++void ValueRecord::adjustPosition(ValueFormat valueFormat, const LETableReference& base, GlyphIterator &glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode &success) const + { + float xPlacementAdjustment = 0; + float yPlacementAdjustment = 0; +@@ -118,8 +118,8 @@ + Offset dtOffset = getFieldValue(valueFormat, vrfXPlaDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 xAdj = dt->getAdjustment(xppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); + + xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj); + } +@@ -129,8 +129,8 @@ + Offset dtOffset = getFieldValue(valueFormat, vrfYPlaDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 yAdj = dt->getAdjustment(yppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); + + yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj); + } +@@ -140,8 +140,8 @@ + Offset dtOffset = getFieldValue(valueFormat, vrfXAdvDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 xAdj = dt->getAdjustment(xppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); + + xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj); + } +@@ -151,8 +151,8 @@ + Offset dtOffset = getFieldValue(valueFormat, vrfYAdvDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 yAdj = dt->getAdjustment(yppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); + + yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); + } +@@ -163,8 +163,8 @@ + xPlacementAdjustment, yPlacementAdjustment, xAdvanceAdjustment, yAdvanceAdjustment); + } + +-void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, +- const LEFontInstance *fontInstance) const ++void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const LETableReference& base, GlyphIterator &glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode &success) const + { + float xPlacementAdjustment = 0; + float yPlacementAdjustment = 0; +@@ -222,8 +222,8 @@ + Offset dtOffset = getFieldValue(index, valueFormat, vrfXPlaDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 xAdj = dt->getAdjustment(xppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); + + xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj); + } +@@ -233,8 +233,8 @@ + Offset dtOffset = getFieldValue(index, valueFormat, vrfYPlaDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 yAdj = dt->getAdjustment(yppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); + + yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj); + } +@@ -244,8 +244,8 @@ + Offset dtOffset = getFieldValue(index, valueFormat, vrfXAdvDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 xAdj = dt->getAdjustment(xppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); + + xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj); + } +@@ -255,8 +255,8 @@ + Offset dtOffset = getFieldValue(index, valueFormat, vrfYAdvDevice); + + if (dtOffset != 0) { +- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); +- le_int16 yAdj = dt->getAdjustment(yppem); ++ LEReferenceTo dt(base, success, dtOffset); ++ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); + + yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); + } +--- ./jdk/src/share/native/sun/font/layout/ValueRecords.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/font/layout/ValueRecords.h 2014-01-18 12:16:24.000000000 -0800 +@@ -53,10 +53,10 @@ + + le_int16 getFieldValue(ValueFormat valueFormat, ValueRecordField field) const; + le_int16 getFieldValue(le_int16 index, ValueFormat valueFormat, ValueRecordField field) const; +- void adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, +- const LEFontInstance *fontInstance) const; +- void adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, +- const LEFontInstance *fontInstance) const; ++ void adjustPosition(ValueFormat valueFormat, const LETableReference &base, GlyphIterator &glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode &success) const; ++ void adjustPosition(le_int16 index, ValueFormat valueFormat, const LETableReference &base, GlyphIterator &glyphIterator, ++ const LEFontInstance *fontInstance, LEErrorCode &success) const; + + static le_int16 getSize(ValueFormat valueFormat); + +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2014-04-19 01:27:12.000000000 -0700 +@@ -81,7 +81,7 @@ + cmsUInt32Number surround; + cmsFloat64Number n, Nbb, Ncb, z, FL, D; + +- cmsContext ContextID; ++ cmsContext ContextID; + + } cmsCIECAM02; + +@@ -467,6 +467,7 @@ + CAM02COLOR clr; + cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel; + ++ memset(&clr, 0, sizeof(clr)); + _cmsAssert(lpMod != NULL); + _cmsAssert(pIn != NULL); + _cmsAssert(pOut != NULL); +@@ -491,6 +492,7 @@ + CAM02COLOR clr; + cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel; + ++ memset(&clr, 0, sizeof(clr)); + _cmsAssert(lpMod != NULL); + _cmsAssert(pIn != NULL); + _cmsAssert(pOut != NULL); +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2014-04-19 01:27:12.000000000 -0700 +@@ -59,8 +59,8 @@ + // IT8.7 / CGATS.17-200x handling ----------------------------------------------------------------------------- + + +-#define MAXID 128 // Max lenght of identifier +-#define MAXSTR 1024 // Max lenght of string ++#define MAXID 128 // Max length of identifier ++#define MAXSTR 1024 // Max length of string + #define MAXTABLES 255 // Max Number of tables in a single stream + #define MAXINCLUDE 20 // Max number of nested includes + +@@ -383,28 +383,28 @@ + //Forward declaration of some internal functions + static void* AllocChunk(cmsIT8* it8, cmsUInt32Number size); + +-// Checks if c is a separator ++// Checks whatever c is a separator + static + cmsBool isseparator(int c) + { +- return (c == ' ') || (c == '\t') || (c == '\r'); ++ return (c == ' ') || (c == '\t') ; + } + +-// Checks whatever if c is a valid identifier char ++// Checks whatever c is a valid identifier char + static + cmsBool ismiddle(int c) + { + return (!isseparator(c) && (c != '#') && (c !='\"') && (c != '\'') && (c > 32) && (c < 127)); + } + +-// Checks whatsever if c is a valid identifier middle char. ++// Checks whatsever c is a valid identifier middle char. + static + cmsBool isidchar(int c) + { + return isalnum(c) || ismiddle(c); + } + +-// Checks whatsever if c is a valid identifier first char. ++// Checks whatsever c is a valid identifier first char. + static + cmsBool isfirstidchar(int c) + { +@@ -436,7 +436,6 @@ + } + + +- + // Makes a file path based on a given reference path + // NOTE: this function doesn't check if the path exists or even if it's legal + static +@@ -634,6 +633,9 @@ + cmsFloat64Number dnum = 0.0; + int sign = 1; + ++ // keep safe ++ if (Buffer == NULL) return 0.0; ++ + if (*Buffer == '-' || *Buffer == '+') { + + sign = (*Buffer == '-') ? -1 : 1; +@@ -867,6 +869,14 @@ + + + // Next line ++ case '\r': ++ NextCh(it8); ++ if (it8 ->ch == '\n') ++ NextCh(it8); ++ it8->sy = SEOLN; ++ it8->lineno++; ++ break; ++ + case '\n': + NextCh(it8); + it8->sy = SEOLN; +@@ -876,7 +886,7 @@ + // Comment + case '#': + NextCh(it8); +- while (it8->ch && it8->ch != '\n') ++ while (it8->ch && it8->ch != '\n' && it8->ch != '\r') + NextCh(it8); + + it8->sy = SCOMMENT; +@@ -994,6 +1004,9 @@ + { + switch (it8->sy) { + ++ case SEOLN: // Empty value ++ Buffer[0]=0; ++ break; + case SIDENT: strncpy(Buffer, it8->id, max); + Buffer[max-1]=0; + break; +@@ -1143,9 +1156,9 @@ + if (*Key != '#') { // Comments are ignored + + if (cmsstrcasecmp(Key, p->Keyword) == 0) +- break; +- } ++ break; + } ++ } + + if (p == NULL) + return FALSE; +@@ -1155,11 +1168,13 @@ + + for (; p != NULL; p = p->NextSubkey) { + ++ if (p ->Subkey == NULL) continue; ++ + if (LastPtr) *LastPtr = p; + + if (cmsstrcasecmp(Subkey, p->Subkey) == 0) +- return TRUE; +- } ++ return TRUE; ++ } + + return FALSE; + } +@@ -1282,7 +1297,7 @@ + + it8 ->nTable = nTable; + +- return nTable; ++ return (cmsInt32Number) nTable; + } + + +@@ -1387,7 +1402,7 @@ + cmsIT8* it8 = (cmsIT8*) hIT8; + char Buffer[1024]; + +- sprintf(Buffer, "%d", Val); ++ sprintf(Buffer, "%u", Val); + + return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_HEXADECIMAL) != NULL; + } +@@ -1424,6 +1439,8 @@ + { + const char *v = cmsIT8GetProperty(hIT8, cProp); + ++ if (v == NULL) return 0.0; ++ + return ParseFloatNumber(v); + } + +@@ -1456,7 +1473,7 @@ + t -> nSamples = 10; + } + +- t -> DataFormat = (char**) AllocChunk (it8, (t->nSamples + 1) * sizeof(char *)); ++ t -> DataFormat = (char**) AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * sizeof(char *)); + if (t->DataFormat == NULL) { + + SynError(it8, "AllocateDataFormat: Unable to allocate dataFormat array"); +@@ -1512,7 +1529,7 @@ + t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); + t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); + +- t-> Data = (char**)AllocChunk (it8, (t->nSamples + 1) * (t->nPatches + 1) *sizeof (char*)); ++ t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*)); + if (t->Data == NULL) { + + SynError(it8, "AllocateDataSet: Unable to allocate data array"); +@@ -1571,7 +1588,7 @@ + if (str == NULL) + str = " "; + +- // Lenghth to write ++ // Length to write + len = (cmsUInt32Number) strlen(str); + f ->Used += len; + +@@ -2095,7 +2112,7 @@ + NextCh(it8); + + // If a newline is found, then this is a type string +- if (it8 ->ch == '\n') { ++ if (it8 ->ch == '\n' || it8->ch == '\r') { + + cmsIT8SetSheetType(it8, it8 ->id); + InSymbol(it8); +@@ -2210,7 +2227,7 @@ + char Buffer[256]; + + char *Type = p ->Value; +- int nTable = k; ++ int nTable = (int) k; + + snprintf(Buffer, 255, "%s %d %s", Label, nTable, Type ); + +@@ -2564,6 +2581,8 @@ + + Buffer = cmsIT8GetDataRowCol(hIT8, row, col); + ++ if (Buffer == NULL) return 0.0; ++ + return ParseFloatNumber(Buffer); + } + +@@ -2776,7 +2795,7 @@ + if (Formatter == NULL) + strcpy(it8->DoubleFormatter, DEFAULT_DBL_FORMAT); + else +- strcpy(it8->DoubleFormatter, Formatter); ++ strncpy(it8->DoubleFormatter, Formatter, sizeof(it8->DoubleFormatter)); + + it8 ->DoubleFormatter[sizeof(it8 ->DoubleFormatter)-1] = 0; + } +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2014-04-19 01:27:12.000000000 -0700 +@@ -270,7 +270,7 @@ + // m2 holds CHAD from output white to D50 times abs. col. scaling + + // Observer is not adapted, undo the chromatic adaptation +- _cmsMAT3per(m, &m3, ChromaticAdaptationMatrixOut); ++ _cmsMAT3per(m, &m2, ChromaticAdaptationMatrixOut); + + m3 = *ChromaticAdaptationMatrixIn; + if (!_cmsMAT3inverse(&m3, &m4)) return FALSE; +@@ -411,57 +411,61 @@ + // Handle PCS mismatches. A specialized stage is added to the LUT in such case + switch (InPCS) { + +- case cmsSigXYZData: // Input profile operates in XYZ ++ case cmsSigXYZData: // Input profile operates in XYZ + +- switch (OutPCS) { ++ switch (OutPCS) { + +- case cmsSigXYZData: // XYZ -> XYZ +- if (!IsEmptyLayer(m, off)) +- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); +- break; +- +- case cmsSigLabData: // XYZ -> Lab +- if (!IsEmptyLayer(m, off)) +- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); +- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID)); +- break; +- +- default: +- return FALSE; // Colorspace mismatch +- } +- break; ++ case cmsSigXYZData: // XYZ -> XYZ ++ if (!IsEmptyLayer(m, off) && ++ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl))) ++ return FALSE; ++ break; + ++ case cmsSigLabData: // XYZ -> Lab ++ if (!IsEmptyLayer(m, off) && ++ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl))) ++ return FALSE; ++ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID))) ++ return FALSE; ++ break; + +- case cmsSigLabData: // Input profile operates in Lab ++ default: ++ return FALSE; // Colorspace mismatch ++ } ++ break; + +- switch (OutPCS) { ++ case cmsSigLabData: // Input profile operates in Lab + +- case cmsSigXYZData: // Lab -> XYZ ++ switch (OutPCS) { + +- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)); +- if (!IsEmptyLayer(m, off)) +- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); +- break; ++ case cmsSigXYZData: // Lab -> XYZ + +- case cmsSigLabData: // Lab -> Lab ++ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID))) ++ return FALSE; ++ if (!IsEmptyLayer(m, off) && ++ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl))) ++ return FALSE; ++ break; + +- if (!IsEmptyLayer(m, off)) { +- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)); +- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); +- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID)); +- } +- break; ++ case cmsSigLabData: // Lab -> Lab + +- default: +- return FALSE; // Mismatch ++ if (!IsEmptyLayer(m, off)) { ++ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)) || ++ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)) || ++ !cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID))) ++ return FALSE; + } + break; + +- +- // On colorspaces other than PCS, check for same space + default: +- if (InPCS != OutPCS) return FALSE; +- break; ++ return FALSE; // Mismatch ++ } ++ break; ++ ++ // On colorspaces other than PCS, check for same space ++ default: ++ if (InPCS != OutPCS) return FALSE; ++ break; + } + + return TRUE; +@@ -497,7 +501,8 @@ + cmsFloat64Number AdaptationStates[], + cmsUInt32Number dwFlags) + { +- cmsPipeline* Lut, *Result; ++ cmsPipeline* Lut = NULL; ++ cmsPipeline* Result; + cmsHPROFILE hProfile; + cmsMAT3 m; + cmsVEC3 off; +@@ -593,8 +598,11 @@ + } + + // Concatenate to the output LUT +- cmsPipelineCat(Result, Lut); ++ if (!cmsPipelineCat(Result, Lut)) ++ goto Error; ++ + cmsPipelineFree(Lut); ++ Lut = NULL; + + // Update current space + CurrentColorSpace = ColorSpaceOut; +@@ -604,6 +612,7 @@ + + Error: + ++ if (Lut != NULL) cmsPipelineFree(Lut); + if (Result != NULL) cmsPipelineFree(Result); + return NULL; + +@@ -742,7 +751,8 @@ + if (CLUT == NULL) goto Error; + + // This is the one and only MPE in this LUT +- cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT); ++ if (!cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT)) ++ goto Error; + + // Sample it. We cannot afford pre/post linearization this time. + if (!cmsStageSampleCLut16bit(CLUT, BlackPreservingGrayOnlySampler, (void*) &bp, 0)) +@@ -959,7 +969,8 @@ + CLUT = cmsStageAllocCLut16bit(ContextID, nGridPoints, 4, 4, NULL); + if (CLUT == NULL) goto Cleanup; + +- cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT); ++ if (!cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT)) ++ goto Cleanup; + + cmsStageSampleCLut16bit(CLUT, BlackPreservingSampler, (void*) &bp, 0); + +@@ -1057,7 +1068,7 @@ + } + + // The plug-in registration. User can add new intents or override default routines +-cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext id, cmsPluginBase* Data) + { + cmsPluginRenderingIntent* Plugin = (cmsPluginRenderingIntent*) Data; + cmsIntentsList* fl; +@@ -1072,7 +1083,7 @@ + fl = SearchIntent(Plugin ->Intent); + + if (fl == NULL) { +- fl = (cmsIntentsList*) _cmsPluginMalloc(sizeof(cmsIntentsList)); ++ fl = (cmsIntentsList*) _cmsPluginMalloc(id, sizeof(cmsIntentsList)); + if (fl == NULL) return FALSE; + } + +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2014-04-19 01:27:12.000000000 -0700 +@@ -302,8 +302,6 @@ + return NULL; + } + +- +- + chunk ->BlockSize = Initial; + chunk ->Used = 0; + chunk ->next = NULL; +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2014-04-19 01:27:12.000000000 -0700 +@@ -30,7 +30,7 @@ + //--------------------------------------------------------------------------------- + // + // Little Color Management System +-// Copyright (c) 1998-2012 Marti Maria Saguer ++// Copyright (c) 1998-2013 Marti Maria Saguer + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -99,7 +99,7 @@ + static _cmsParametricCurvesCollection* ParametricCurves = &DefaultCurves; + + // As a way to install new parametric curves +-cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext id, cmsPluginBase* Data) + { + cmsPluginParametricCurves* Plugin = (cmsPluginParametricCurves*) Data; + _cmsParametricCurvesCollection* fl; +@@ -110,7 +110,7 @@ + return TRUE; + } + +- fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(sizeof(_cmsParametricCurvesCollection)); ++ fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(id, sizeof(_cmsParametricCurvesCollection)); + if (fl == NULL) return FALSE; + + // Copy the parameters +@@ -258,7 +258,8 @@ + } + + p ->InterpParams = _cmsComputeInterpParams(ContextID, p ->nEntries, 1, 1, p->Table16, CMS_LERP_FLAGS_16BITS); +- return p; ++ if (p->InterpParams != NULL) ++ return p; + + Error: + if (p -> Segments) _cmsFree(ContextID, p ->Segments); +@@ -423,7 +424,7 @@ + if (e > 0) + Val = pow(e, Params[0]) + Params[5]; + else +- Val = 0; ++ Val = Params[5]; + } + else + Val = R*Params[3] + Params[6]; +@@ -458,7 +459,7 @@ + e = Params[1]*R + Params[2]; + + if (e < 0) +- Val = 0; ++ Val = Params[3]; + else + Val = pow(e, Params[0]) + Params[3]; + break; +@@ -478,7 +479,7 @@ + + e = Params[2] * pow(R, Params[0]) + Params[3]; + if (e <= 0) +- Val = 0; ++ Val = Params[4]; + else + Val = Params[1]*log10(e) + Params[4]; + break; +@@ -544,7 +545,7 @@ + // Type == 0 means segment is sampled + if (g ->Segments[i].Type == 0) { + +- cmsFloat32Number R1 = (cmsFloat32Number) (R - g ->Segments[i].x0); ++ cmsFloat32Number R1 = (cmsFloat32Number) (R - g ->Segments[i].x0) / (g ->Segments[i].x1 - g ->Segments[i].x0); + cmsFloat32Number Out; + + // Setup the table (TODO: clean that) +@@ -629,20 +630,21 @@ + // Use a segmented curve to store the floating point table + cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[]) + { +- cmsCurveSegment Seg[2]; ++ cmsCurveSegment Seg[3]; + +- // Initialize segmented curve part up to 0 +- Seg[0].x0 = -1; ++ // A segmented tone curve should have function segments in the first and last positions ++ // Initialize segmented curve part up to 0 to constant value = samples[0] ++ Seg[0].x0 = MINUS_INF; + Seg[0].x1 = 0; + Seg[0].Type = 6; + + Seg[0].Params[0] = 1; + Seg[0].Params[1] = 0; + Seg[0].Params[2] = 0; +- Seg[0].Params[3] = 0; ++ Seg[0].Params[3] = values[0]; + Seg[0].Params[4] = 0; + +- // From zero to any ++ // From zero to 1 + Seg[1].x0 = 0; + Seg[1].x1 = 1.0; + Seg[1].Type = 0; +@@ -650,7 +652,19 @@ + Seg[1].nGridPoints = nEntries; + Seg[1].SampledPoints = (cmsFloat32Number*) values; + +- return cmsBuildSegmentedToneCurve(ContextID, 2, Seg); ++ // Final segment is constant = lastsample ++ Seg[2].x0 = 1.0; ++ Seg[2].x1 = PLUS_INF; ++ Seg[2].Type = 6; ++ ++ Seg[2].Params[0] = 1; ++ Seg[2].Params[1] = 0; ++ Seg[2].Params[2] = 0; ++ Seg[2].Params[3] = values[nEntries-1]; ++ Seg[2].Params[4] = 0; ++ ++ ++ return cmsBuildSegmentedToneCurve(ContextID, 3, Seg); + } + + // Parametric curves +@@ -993,7 +1007,7 @@ + + if (Tab == NULL) return FALSE; + +- if (cmsIsToneCurveLinear(Tab)) return FALSE; // Nothing to do ++ if (cmsIsToneCurveLinear(Tab)) return TRUE; // Nothing to do + + nItems = Tab -> nEntries; + +@@ -1020,11 +1034,20 @@ + + if (z[i] == 0.) Zeros++; + if (z[i] >= 65535.) Poles++; +- if (z[i] < z[i-1]) return FALSE; // Non-Monotonic ++ if (z[i] < z[i-1]) { ++ cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Non-Monotonic."); ++ return FALSE; ++ } + } + +- if (Zeros > (nItems / 3)) return FALSE; // Degenerated, mostly zeros +- if (Poles > (nItems / 3)) return FALSE; // Degenerated, mostly poles ++ if (Zeros > (nItems / 3)) { ++ cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly zeros."); ++ return FALSE; ++ } ++ if (Poles > (nItems / 3)) { ++ cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly poles."); ++ return FALSE; ++ } + + // Seems ok + for (i=0; i < nItems; i++) { +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2014-04-19 01:27:12.000000000 -0700 +@@ -249,13 +249,10 @@ + cmsFloat64Number dE1, dE2, ErrorRatio; + + // Assume in-gamut by default. +- dE1 = 0.; +- dE2 = 0; + ErrorRatio = 1.0; + + // Convert input to Lab +- if (t -> hInput != NULL) +- cmsDoTransform(t -> hInput, In, &LabIn1, 1); ++ cmsDoTransform(t -> hInput, In, &LabIn1, 1); + + // converts from PCS to colorant. This always + // does return in-gamut values, +@@ -267,7 +264,7 @@ + memmove(&LabIn2, &LabOut1, sizeof(cmsCIELab)); + + // Try again, but this time taking Check as input +- cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1); ++ cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1); + cmsDoTransform(t -> hReverse, Proof2, &LabOut2, 1); + + // Take difference of direct value +@@ -374,7 +371,7 @@ + ProfileList[nGamutPCSposition] = hLab; + BPCList[nGamutPCSposition] = 0; + AdaptationList[nGamutPCSposition] = 1.0; +- Intents[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC; ++ IntentList[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC; + + + ColorSpace = cmsGetColorSpace(hGamut); +@@ -385,45 +382,48 @@ + + // 16 bits to Lab double + Chain.hInput = cmsCreateExtendedTransform(ContextID, +- nGamutPCSposition + 1, +- ProfileList, +- BPCList, +- Intents, +- AdaptationList, +- NULL, 0, +- dwFormat, TYPE_Lab_DBL, +- cmsFLAGS_NOCACHE); ++ nGamutPCSposition + 1, ++ ProfileList, ++ BPCList, ++ IntentList, ++ AdaptationList, ++ NULL, 0, ++ dwFormat, TYPE_Lab_DBL, ++ cmsFLAGS_NOCACHE); + + + // Does create the forward step. Lab double to device + dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2)); + Chain.hForward = cmsCreateTransformTHR(ContextID, +- hLab, TYPE_Lab_DBL, +- hGamut, dwFormat, +- INTENT_RELATIVE_COLORIMETRIC, +- cmsFLAGS_NOCACHE); ++ hLab, TYPE_Lab_DBL, ++ hGamut, dwFormat, ++ INTENT_RELATIVE_COLORIMETRIC, ++ cmsFLAGS_NOCACHE); + + // Does create the backwards step + Chain.hReverse = cmsCreateTransformTHR(ContextID, hGamut, dwFormat, +- hLab, TYPE_Lab_DBL, +- INTENT_RELATIVE_COLORIMETRIC, +- cmsFLAGS_NOCACHE); ++ hLab, TYPE_Lab_DBL, ++ INTENT_RELATIVE_COLORIMETRIC, ++ cmsFLAGS_NOCACHE); + + + // All ok? +- if (Chain.hForward && Chain.hReverse) { ++ if (Chain.hInput && Chain.hForward && Chain.hReverse) { + + // Go on, try to compute gamut LUT from PCS. This consist on a single channel containing + // dE when doing a transform back and forth on the colorimetric intent. + + Gamut = cmsPipelineAlloc(ContextID, 3, 1); +- + if (Gamut != NULL) { + +- CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL); +- cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT); +- +- cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0); ++ CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL); ++ if (!cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT)) { ++ cmsPipelineFree(Gamut); ++ Gamut = NULL; ++ } ++ else { ++ cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0); ++ } + } + } + else +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2014-04-19 01:27:12.000000000 -0700 +@@ -83,7 +83,6 @@ + + + // Set the interpolation method +- + cmsBool _cmsSetInterpolationRoutine(cmsInterpParams* p) + { + // Invoke factory, possibly in the Plug-in +@@ -215,6 +214,11 @@ + Output[0] = LinearInterp(rest, y0, y1); + } + ++// To prevent out of bounds indexing ++cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v) ++{ ++ return v < 0.0f ? 0.0f : (v > 1.0f ? 1.0f : v); ++} + + // Floating-point version of 1D interpolation + static +@@ -227,13 +231,15 @@ + int cell0, cell1; + const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table; + ++ val2 = fclamp(Value[0]); ++ + // if last value... +- if (Value[0] == 1.0) { ++ if (val2 == 1.0) { + Output[0] = LutTable[p -> Domain[0]]; + return; + } + +- val2 = p -> Domain[0] * Value[0]; ++ val2 *= p -> Domain[0]; + + cell0 = (int) floor(val2); + cell1 = (int) ceil(val2); +@@ -292,13 +298,15 @@ + cmsUInt32Number OutChan; + const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table; + ++ val2 = fclamp(Value[0]); ++ + // if last value... +- if (Value[0] == 1.0) { ++ if (val2 == 1.0) { + Output[0] = LutTable[p -> Domain[0]]; + return; + } + +- val2 = p -> Domain[0] * Value[0]; ++ val2 *= p -> Domain[0]; + + cell0 = (int) floor(val2); + cell1 = (int) ceil(val2); +@@ -339,8 +347,8 @@ + dxy; + + TotalOut = p -> nOutputs; +- px = Input[0] * p->Domain[0]; +- py = Input[1] * p->Domain[1]; ++ px = fclamp(Input[0]) * p->Domain[0]; ++ py = fclamp(Input[1]) * p->Domain[1]; + + x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0; + y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0; +@@ -454,20 +462,9 @@ + TotalOut = p -> nOutputs; + + // We need some clipping here +- px = Input[0]; +- py = Input[1]; +- pz = Input[2]; +- +- if (px < 0) px = 0; +- if (px > 1) px = 1; +- if (py < 0) py = 0; +- if (py > 1) py = 1; +- if (pz < 0) pz = 0; +- if (pz > 1) pz = 1; +- +- px *= p->Domain[0]; +- py *= p->Domain[1]; +- pz *= p->Domain[2]; ++ px = fclamp(Input[0]) * p->Domain[0]; ++ py = fclamp(Input[1]) * p->Domain[1]; ++ pz = fclamp(Input[2]) * p->Domain[2]; + + x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0; + y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0; +@@ -609,20 +606,9 @@ + TotalOut = p -> nOutputs; + + // We need some clipping here +- px = Input[0]; +- py = Input[1]; +- pz = Input[2]; +- +- if (px < 0) px = 0; +- if (px > 1) px = 1; +- if (py < 0) py = 0; +- if (py > 1) py = 1; +- if (pz < 0) pz = 0; +- if (pz > 1) pz = 1; +- +- px *= p->Domain[0]; +- py *= p->Domain[1]; +- pz *= p->Domain[2]; ++ px = fclamp(Input[0]) * p->Domain[0]; ++ py = fclamp(Input[1]) * p->Domain[1]; ++ pz = fclamp(Input[2]) * p->Domain[2]; + + x0 = (int) _cmsQuickFloor(px); rx = (px - (cmsFloat32Number) x0); + y0 = (int) _cmsQuickFloor(py); ry = (py - (cmsFloat32Number) y0); +@@ -844,7 +830,7 @@ + register cmsUInt16Number Output[], + register const cmsInterpParams* p16) + { +- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table; ++ const cmsUInt16Number* LutTable; + cmsS15Fixed16Number fk; + cmsS15Fixed16Number k0, rk; + int K0, K1; +@@ -1039,8 +1025,7 @@ + cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; + cmsInterpParams p1; + +- +- pk = Input[0] * p->Domain[0]; ++ pk = fclamp(Input[0]) * p->Domain[0]; + k0 = _cmsQuickFloor(pk); + rest = pk - (cmsFloat32Number) k0; + +@@ -1127,7 +1112,7 @@ + cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; + cmsInterpParams p1; + +- pk = Input[0] * p->Domain[0]; ++ pk = fclamp(Input[0]) * p->Domain[0]; + k0 = _cmsQuickFloor(pk); + rest = pk - (cmsFloat32Number) k0; + +@@ -1214,7 +1199,7 @@ + cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; + cmsInterpParams p1; + +- pk = Input[0] * p->Domain[0]; ++ pk = fclamp(Input[0]) * p->Domain[0]; + k0 = _cmsQuickFloor(pk); + rest = pk - (cmsFloat32Number) k0; + +@@ -1299,7 +1284,7 @@ + cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; + cmsInterpParams p1; + +- pk = Input[0] * p->Domain[0]; ++ pk = fclamp(Input[0]) * p->Domain[0]; + k0 = _cmsQuickFloor(pk); + rest = pk - (cmsFloat32Number) k0; + +@@ -1384,7 +1369,7 @@ + cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; + cmsInterpParams p1; + +- pk = Input[0] * p->Domain[0]; ++ pk = fclamp(Input[0]) * p->Domain[0]; + k0 = _cmsQuickFloor(pk); + rest = pk - (cmsFloat32Number) k0; + +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2014-04-19 01:27:12.000000000 -0700 +@@ -154,7 +154,6 @@ + return iohandler; + + Error: +- if (fm) _cmsFree(ContextID, fm); + if (iohandler) _cmsFree(ContextID, iohandler); + return NULL; + +@@ -223,12 +222,17 @@ + + // Writes data to memory, also keeps used space for further reference. + static +-cmsBool MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number size, const void *Ptr) ++cmsBool MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number size, const void *Ptr) + { + FILEMEM* ResData = (FILEMEM*) iohandler ->stream; + + if (ResData == NULL) return FALSE; // Housekeeping + ++ // Check for available space. Clip. ++ if (iohandler ->UsedSpace + size > ResData->Size) { ++ size = ResData ->Size - iohandler ->UsedSpace; ++ } ++ + if (size == 0) return TRUE; // Write zero bytes is ok, but does nothing + + memmove(ResData ->Block + ResData ->Pointer, Ptr, size); +@@ -389,13 +393,15 @@ + return TRUE; + } + +-// Create a iohandler for disk based files. if FileName is NULL, then 'stream' member is also set +-// to NULL and no real writting is performed. This only happens in writting access mode ++// Create a iohandler for disk based files. + cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromFile(cmsContext ContextID, const char* FileName, const char* AccessMode) + { + cmsIOHANDLER* iohandler = NULL; + FILE* fm = NULL; + ++ _cmsAssert(FileName != NULL); ++ _cmsAssert(AccessMode != NULL); ++ + iohandler = (cmsIOHANDLER*) _cmsMallocZero(ContextID, sizeof(cmsIOHANDLER)); + if (iohandler == NULL) return NULL; + +@@ -432,11 +438,8 @@ + iohandler ->UsedSpace = 0; + + // Keep track of the original file +- if (FileName != NULL) { +- +- strncpy(iohandler -> PhysicalFile, FileName, sizeof(iohandler -> PhysicalFile)-1); +- iohandler -> PhysicalFile[sizeof(iohandler -> PhysicalFile)-1] = 0; +- } ++ strncpy(iohandler -> PhysicalFile, FileName, sizeof(iohandler -> PhysicalFile)-1); ++ iohandler -> PhysicalFile[sizeof(iohandler -> PhysicalFile)-1] = 0; + + iohandler ->Read = FileRead; + iohandler ->Seek = FileSeek; +@@ -616,6 +619,31 @@ + return _cmsSearchTag(Icc, sig, FALSE) >= 0; + } + ++/* ++ * Enforces that the profile version is per. spec. ++ * Operates on the big endian bytes from the profile. ++ * Called before converting to platform endianness. ++ * Byte 0 is BCD major version, so max 9. ++ * Byte 1 is 2 BCD digits, one per nibble. ++ * Reserved bytes 2 & 3 must be 0. ++ */ ++static cmsUInt32Number _validatedVersion(cmsUInt32Number DWord) ++{ ++ cmsUInt8Number* pByte = (cmsUInt8Number*)&DWord; ++ cmsUInt8Number temp1; ++ cmsUInt8Number temp2; ++ ++ if (*pByte > 0x09) *pByte = (cmsUInt8Number)9; ++ temp1 = *(pByte+1) & 0xf0; ++ temp2 = *(pByte+1) & 0x0f; ++ if (temp1 > 0x90) temp1 = 0x90; ++ if (temp2 > 9) temp2 = 0x09; ++ *(pByte+1) = (cmsUInt8Number)(temp1 | temp2); ++ *(pByte+2) = (cmsUInt8Number)0; ++ *(pByte+3) = (cmsUInt8Number)0; ++ ++ return DWord; ++} + + // Read profile header and validate it + cmsBool _cmsReadHeader(_cmsICCPROFILE* Icc) +@@ -643,12 +671,15 @@ + Icc -> DeviceClass = (cmsProfileClassSignature) _cmsAdjustEndianess32(Header.deviceClass); + Icc -> ColorSpace = (cmsColorSpaceSignature) _cmsAdjustEndianess32(Header.colorSpace); + Icc -> PCS = (cmsColorSpaceSignature) _cmsAdjustEndianess32(Header.pcs); ++ + Icc -> RenderingIntent = _cmsAdjustEndianess32(Header.renderingIntent); + Icc -> flags = _cmsAdjustEndianess32(Header.flags); + Icc -> manufacturer = _cmsAdjustEndianess32(Header.manufacturer); + Icc -> model = _cmsAdjustEndianess32(Header.model); ++ Icc -> creator = _cmsAdjustEndianess32(Header.creator); ++ + _cmsAdjustEndianess64(&Icc -> attributes, &Header.attributes); +- Icc -> Version = _cmsAdjustEndianess32(Header.version); ++ Icc -> Version = _cmsAdjustEndianess32(_validatedVersion(Header.version)); + + // Get size as reported in header + HeaderSize = _cmsAdjustEndianess32(Header.size); +@@ -815,28 +846,33 @@ + cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile) + { + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; +- return (cmsUInt32Number) Icc ->manufacturer; ++ return Icc ->manufacturer; + } + + void CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer) + { + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; +- Icc -> manufacturer = (cmsUInt32Number) manufacturer; ++ Icc -> manufacturer = manufacturer; ++} ++ ++cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile) ++{ ++ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; ++ return Icc ->creator; + } + + cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile) + { + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; +- return (cmsUInt32Number) Icc ->model; ++ return Icc ->model; + } + + void CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model) + { + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; +- Icc -> model = (cmsUInt32Number) model; ++ Icc -> model = model; + } + +- + void CMSEXPORT cmsGetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number* Flags) + { + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; +@@ -1073,7 +1109,33 @@ + return cmsOpenProfileFromMemTHR(NULL, MemPtr, dwSize); + } + ++static ++cmsBool SanityCheck(_cmsICCPROFILE* profile) ++{ ++ cmsIOHANDLER* io; ++ ++ if (!profile) { ++ return FALSE; ++ } ++ ++ io = profile->IOhandler; ++ if (!io) { ++ return FALSE; ++ } ++ ++ if (!io->Seek || ++ !(io->Seek==NULLSeek || io->Seek==MemorySeek || io->Seek==FileSeek)) ++ { ++ return FALSE; ++ } ++ if (!io->Read || ++ !(io->Read==NULLRead || io->Read==MemoryRead || io->Read==FileRead)) ++ { ++ return FALSE; ++ } + ++ return TRUE; ++} + + // Dump tag contents. If the profile is being modified, untouched tags are copied from FileOrig + static +@@ -1085,12 +1147,13 @@ + cmsIOHANDLER* io = Icc ->IOhandler; + cmsTagDescriptor* TagDescriptor; + cmsTagTypeSignature TypeBase; ++ cmsTagTypeSignature Type; + cmsTagTypeHandler* TypeHandler; +- ++ cmsFloat64Number Version = cmsGetProfileVersion((cmsHPROFILE) Icc); ++ cmsTagTypeHandler LocalTypeHandler; + + for (i=0; i < Icc -> TagCount; i++) { + +- + if (Icc ->TagNames[i] == 0) continue; + + // Linked tags are not written +@@ -1104,7 +1167,7 @@ + + // Reach here if we are copying a tag from a disk-based ICC profile which has not been modified by user. + // In this case a blind copy of the block data is performed +- if (FileOrig != NULL && Icc -> TagOffsets[i]) { ++ if (SanityCheck(FileOrig) && Icc -> TagOffsets[i]) { + + cmsUInt32Number TagSize = FileOrig -> TagSizes[i]; + cmsUInt32Number TagOffset = FileOrig -> TagOffsets[i]; +@@ -1142,7 +1205,16 @@ + TagDescriptor = _cmsGetTagDescriptor(Icc -> TagNames[i]); + if (TagDescriptor == NULL) continue; // Unsupported, ignore it + +- TypeHandler = Icc ->TagTypeHandlers[i]; ++ if (TagDescriptor ->DecideType != NULL) { ++ ++ Type = TagDescriptor ->DecideType(Version, Data); ++ } ++ else { ++ ++ Type = TagDescriptor ->SupportedTypes[0]; ++ } ++ ++ TypeHandler = _cmsGetTagTypeHandler(Type); + + if (TypeHandler == NULL) { + cmsSignalError(Icc ->ContextID, cmsERROR_INTERNAL, "(Internal) no handler for tag %x", Icc -> TagNames[i]); +@@ -1153,9 +1225,10 @@ + if (!_cmsWriteTypeBase(io, TypeBase)) + return FALSE; + +- TypeHandler ->ContextID = Icc ->ContextID; +- TypeHandler ->ICCVersion = Icc ->Version; +- if (!TypeHandler ->WritePtr(TypeHandler, io, Data, TagDescriptor ->ElemCount)) { ++ LocalTypeHandler = *TypeHandler; ++ LocalTypeHandler.ContextID = Icc ->ContextID; ++ LocalTypeHandler.ICCVersion = Icc ->Version; ++ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, io, Data, TagDescriptor ->ElemCount)) { + + char String[5]; + +@@ -1293,7 +1366,7 @@ + if (MemPtr == NULL) { + + *BytesNeeded = cmsSaveProfileToIOhandler(hProfile, NULL); +- return TRUE; ++ return (*BytesNeeded == 0 ? FALSE : TRUE); + } + + // That is a real write operation +@@ -1331,10 +1404,11 @@ + cmsTagTypeHandler* TypeHandler = Icc ->TagTypeHandlers[i]; + + if (TypeHandler != NULL) { ++ cmsTagTypeHandler LocalTypeHandler = *TypeHandler; + +- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameters +- TypeHandler ->ICCVersion = Icc ->Version; +- TypeHandler ->FreePtr(TypeHandler, Icc -> TagPtrs[i]); ++ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameters ++ LocalTypeHandler.ICCVersion = Icc ->Version; ++ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]); + } + else + _cmsFree(Icc ->ContextID, Icc ->TagPtrs[i]); +@@ -1378,6 +1452,7 @@ + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; + cmsIOHANDLER* io = Icc ->IOhandler; + cmsTagTypeHandler* TypeHandler; ++ cmsTagTypeHandler LocalTypeHandler; + cmsTagDescriptor* TagDescriptor; + cmsTagTypeSignature BaseType; + cmsUInt32Number Offset, TagSize; +@@ -1401,7 +1476,7 @@ + + // Seek to its location + if (!io -> Seek(io, Offset)) +- return NULL; ++ return NULL; -@@ -120,6 +121,29 @@ - LINK_SHARED=link -dll -out:$@ - endif + // Search for support on this tag + TagDescriptor = _cmsGetTagDescriptor(sig); +@@ -1418,14 +1493,15 @@ + // Get type handler + TypeHandler = _cmsGetTagTypeHandler(BaseType); + if (TypeHandler == NULL) return NULL; ++ LocalTypeHandler = *TypeHandler; -+# BSD GNU C Compiler -+ifeq ($(OSNAME), bsd) -+ # GNU Compiler options needed to build it -+ COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer -+ # Options that help find errors -+ COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses -+ ifeq ($(OPT), true) -+ CFLAGS=-O2 $(COMMON_FLAGS) -+ else -+ CFLAGS=-g $(COMMON_FLAGS) -+ endif -+ # Object files needed to create library -+ OBJECTS=$(SOURCES:%.c=%.o) -+ # Library name and options needed to build it -+ # XXX: Needs to be fixed for MacOS X -+ LIBRARY=lib$(LIBNAME).so -+ LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text -+ # Libraries we are dependent on -+ LIBRARIES=-lc -+ # Building a shared library -+ LINK_SHARED=$(LINK.c) -shared -o $@ -+endif -+ - # Common -I options - CFLAGS += -I. - CFLAGS += -I../agent_util ---- jdk/src/share/demo/jvmti/hprof/hprof_class.c 2013-09-06 11:28:55.000000000 -0700 -+++ jdk/src/share/demo/jvmti/hprof/hprof_class.c 2014-04-20 12:39:17.000000000 -0700 -@@ -527,7 +527,12 @@ - jmethodID method; - info = get_info(index); -- HPROF_ASSERT(mnum < info->method_count); -+ if (mnum >= info->method_count) { -+ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); -+ (*env)->ThrowNew(env, newExcCls, "Illegal mnum"); -+ -+ return NULL; -+ } - method = info->method[mnum].method_id; - if ( method == NULL ) { - char * name; -@@ -535,7 +540,12 @@ - jclass clazz; + // Read the tag + Icc -> TagTypeHandlers[n] = TypeHandler; - name = (char *)string_get(info->method[mnum].name_index); -- HPROF_ASSERT(name!=NULL); -+ if (name==NULL) { -+ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); -+ (*env)->ThrowNew(env, newExcCls, "Name not found"); -+ -+ return NULL; -+ } - sig = (char *)string_get(info->method[mnum].sig_index); - HPROF_ASSERT(sig!=NULL); - clazz = class_get_class(env, index); ---- jdk/src/share/demo/jvmti/hprof/hprof_event.c 2013-09-06 11:28:55.000000000 -0700 -+++ jdk/src/share/demo/jvmti/hprof/hprof_event.c 2014-04-20 12:39:17.000000000 -0700 -@@ -195,7 +195,12 @@ +- TypeHandler ->ContextID = Icc ->ContextID; +- TypeHandler ->ICCVersion = Icc ->Version; +- Icc -> TagPtrs[n] = TypeHandler ->ReadPtr(TypeHandler, io, &ElemCount, TagSize); ++ LocalTypeHandler.ContextID = Icc ->ContextID; ++ LocalTypeHandler.ICCVersion = Icc ->Version; ++ Icc -> TagPtrs[n] = LocalTypeHandler.ReadPtr(&LocalTypeHandler, io, &ElemCount, TagSize); - HPROF_ASSERT(env!=NULL); - HPROF_ASSERT(thread!=NULL); -- HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum); -+ if (cnum == 0 || cnum == gdata->tracker_cnum) { -+ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); -+ (*env)->ThrowNew(env, newExcCls, "Illegal cnum."); -+ -+ return; -+ } + // The tag type is supported, but something wrong happend and we cannot read the tag. + // let know the user about this (although it is just a warning) +@@ -1446,7 +1522,7 @@ - /* Prevent recursion into any BCI function for this thread (pstatus). */ - if ( tls_get_tracker_status(env, thread, JNI_FALSE, -@@ -204,8 +209,10 @@ + _cmsTagSignature2String(String, sig); + cmsSignalError(Icc ->ContextID, cmsERROR_CORRUPTION_DETECTED, "'%s' Inconsistent number of items: expected %d, got %d", +- String, TagDescriptor ->ElemCount, ElemCount); ++ String, TagDescriptor ->ElemCount, ElemCount); + } - (*pstatus) = 1; - method = class_get_methodID(env, cnum, mnum); -- HPROF_ASSERT(method!=NULL); -- tls_push_method(tls_index, method); -+ if (method != NULL) { -+ tls_push_method(tls_index, method); -+ } -+ - (*pstatus) = 0; + +@@ -1478,6 +1554,7 @@ + { + _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; + cmsTagTypeHandler* TypeHandler = NULL; ++ cmsTagTypeHandler LocalTypeHandler; + cmsTagDescriptor* TagDescriptor = NULL; + cmsTagTypeSignature Type; + int i; +@@ -1508,9 +1585,10 @@ + + if (TypeHandler != NULL) { + +- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameter +- TypeHandler ->ICCVersion = Icc ->Version; +- TypeHandler->FreePtr(TypeHandler, Icc -> TagPtrs[i]); ++ LocalTypeHandler = *TypeHandler; ++ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameter ++ LocalTypeHandler.ICCVersion = Icc ->Version; ++ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]); + } + } + } +@@ -1549,7 +1627,7 @@ + // Let the tag descriptor to decide the type base on depending on + // the data. This is useful for example on parametric curves, where + // curves specified by a table cannot be saved as parametric and needs +- // to be revented to single v2-curves, even on v4 profiles. ++ // to be casted to single v2-curves, even on v4 profiles. + + Type = TagDescriptor ->DecideType(Version, data); } - } -@@ -248,7 +255,13 @@ +@@ -1587,9 +1665,10 @@ + Icc ->TagSizes[i] = 0; + Icc ->TagOffsets[i] = 0; - HPROF_ASSERT(env!=NULL); - HPROF_ASSERT(thread!=NULL); -- HPROF_ASSERT(cnum!=0 && cnum!=gdata->tracker_cnum); -+ -+ if (cnum == 0 || cnum == gdata->tracker_cnum) { -+ jclass newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); -+ (*env)->ThrowNew(env, newExcCls, "Illegal cnum."); +- TypeHandler ->ContextID = Icc ->ContextID; +- TypeHandler ->ICCVersion = Icc ->Version; +- Icc ->TagPtrs[i] = TypeHandler ->DupPtr(TypeHandler, data, TagDescriptor ->ElemCount); ++ LocalTypeHandler = *TypeHandler; ++ LocalTypeHandler.ContextID = Icc ->ContextID; ++ LocalTypeHandler.ICCVersion = Icc ->Version; ++ Icc ->TagPtrs[i] = LocalTypeHandler.DupPtr(&LocalTypeHandler, data, TagDescriptor ->ElemCount); + + if (Icc ->TagPtrs[i] == NULL) { + +@@ -1616,6 +1695,7 @@ + int i; + cmsIOHANDLER* MemIO; + cmsTagTypeHandler* TypeHandler = NULL; ++ cmsTagTypeHandler LocalTypeHandler; + cmsTagDescriptor* TagDescriptor = NULL; + cmsUInt32Number rc; + cmsUInt32Number Offset, TagSize; +@@ -1631,15 +1711,16 @@ + Offset = Icc ->TagOffsets[i]; + TagSize = Icc ->TagSizes[i]; + +- + // read the data directly, don't keep copy + if (data != NULL) { + + if (BufferSize < TagSize) +- TagSize = BufferSize; ++ TagSize = BufferSize; + + if (!Icc ->IOhandler ->Seek(Icc ->IOhandler, Offset)) return 0; + if (!Icc ->IOhandler ->Read(Icc ->IOhandler, data, 1, TagSize)) return 0; + -+ return; -+ } ++ return TagSize; + } - /* Prevent recursion into any BCI function for this thread (pstatus). */ - if ( tls_get_tracker_status(env, thread, JNI_FALSE, -@@ -257,8 +270,10 @@ + return Icc ->TagSizes[i]; +@@ -1653,9 +1734,11 @@ - (*pstatus) = 1; - method = class_get_methodID(env, cnum, mnum); -- HPROF_ASSERT(method!=NULL); -- tls_pop_method(tls_index, thread, method); -+ if (method != NULL) { -+ tls_pop_method(tls_index, thread, method); -+ } + TagSize = Icc ->TagSizes[i]; + if (BufferSize < TagSize) +- TagSize = BufferSize; ++ TagSize = BufferSize; + + memmove(data, Icc ->TagPtrs[i], TagSize); + - (*pstatus) = 0; ++ return TagSize; + } + + return Icc ->TagSizes[i]; +@@ -1671,7 +1754,7 @@ + if (data == NULL) { + MemIO = cmsOpenIOhandlerFromNULL(cmsGetProfileContextID(hProfile)); + } else{ +- MemIO = cmsOpenIOhandlerFromMem(cmsGetProfileContextID(hProfile), data, BufferSize, "w"); ++ MemIO = cmsOpenIOhandlerFromMem(cmsGetProfileContextID(hProfile), data, BufferSize, "w"); } - } ---- jdk/src/share/lib/security/java.policy 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/lib/security/java.policy 2014-04-20 12:39:18.000000000 -0700 -@@ -2,48 +2,51 @@ - // Standard extensions get all permissions by default + if (MemIO == NULL) return 0; - grant codeBase "file:${{java.ext.dirs}}/*" { -- permission java.security.AllPermission; -+ permission java.security.AllPermission; - }; +@@ -1679,20 +1762,22 @@ + TypeHandler = Icc ->TagTypeHandlers[i]; + TagDescriptor = _cmsGetTagDescriptor(sig); + if (TagDescriptor == NULL) { +- cmsCloseIOhandler(MemIO); +- return 0; ++ cmsCloseIOhandler(MemIO); ++ return 0; + } - // default permissions granted to all domains ++ // FIXME: No handling for TypeHandler == NULL here? + // Serialize +- TypeHandler ->ContextID = Icc ->ContextID; +- TypeHandler ->ICCVersion = Icc ->Version; ++ LocalTypeHandler = *TypeHandler; ++ LocalTypeHandler.ContextID = Icc ->ContextID; ++ LocalTypeHandler.ICCVersion = Icc ->Version; --grant { -- // Allows any thread to stop itself using the java.lang.Thread.stop() -- // method that takes no argument. -- // Note that this permission is granted by default only to remain -- // backwards compatible. -- // It is strongly recommended that you either remove this permission -- // from this policy file or further restrict it to code sources -- // that you specify, because Thread.stop() is potentially unsafe. -- // See the API specification of java.lang.Thread.stop() for more -+grant { -+ // Allows any thread to stop itself using the java.lang.Thread.stop() -+ // method that takes no argument. -+ // Note that this permission is granted by default only to remain -+ // backwards compatible. -+ // It is strongly recommended that you either remove this permission -+ // from this policy file or further restrict it to code sources -+ // that you specify, because Thread.stop() is potentially unsafe. -+ // See the API specification of java.lang.Thread.stop() for more - // information. -- permission java.lang.RuntimePermission "stopThread"; -+ permission java.lang.RuntimePermission "stopThread"; + if (!_cmsWriteTypeBase(MemIO, TypeHandler ->Signature)) { + cmsCloseIOhandler(MemIO); + return 0; + } -- // allows anyone to listen on un-privileged ports -- permission java.net.SocketPermission "localhost:1024-", "listen"; -+ // allows anyone to listen on dynamic ports -+ permission java.net.SocketPermission "localhost:0", "listen"; +- if (!TypeHandler ->WritePtr(TypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) { ++ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) { + cmsCloseIOhandler(MemIO); + return 0; + } +@@ -1730,7 +1815,7 @@ + // Using this function you can collapse several tag entries to the same block in the profile + cmsBool CMSEXPORT cmsLinkTag(cmsHPROFILE hProfile, cmsTagSignature sig, cmsTagSignature dest) + { +- _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; ++ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; + int i; -- // "standard" properies that can be read by anyone -+ // permission for standard RMI registry port -+ permission java.net.SocketPermission "localhost:1099", "listen"; + if (!_cmsNewTag(Icc, sig, &i)) return FALSE; +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2014-04-19 01:27:12.000000000 -0700 +@@ -129,7 +129,6 @@ + Tag = (cmsMAT3*) cmsReadTag(hProfile, cmsSigChromaticAdaptationTag); -- permission java.util.PropertyPermission "java.version", "read"; -- permission java.util.PropertyPermission "java.vendor", "read"; -- permission java.util.PropertyPermission "java.vendor.url", "read"; -- permission java.util.PropertyPermission "java.class.version", "read"; -- permission java.util.PropertyPermission "os.name", "read"; -- permission java.util.PropertyPermission "os.version", "read"; -- permission java.util.PropertyPermission "os.arch", "read"; -- permission java.util.PropertyPermission "file.separator", "read"; -- permission java.util.PropertyPermission "path.separator", "read"; -- permission java.util.PropertyPermission "line.separator", "read"; -- -- permission java.util.PropertyPermission "java.specification.version", "read"; -- permission java.util.PropertyPermission "java.specification.vendor", "read"; -- permission java.util.PropertyPermission "java.specification.name", "read"; + if (Tag != NULL) { - -- permission java.util.PropertyPermission "java.vm.specification.version", "read"; -- permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; -- permission java.util.PropertyPermission "java.vm.specification.name", "read"; -- permission java.util.PropertyPermission "java.vm.version", "read"; -- permission java.util.PropertyPermission "java.vm.vendor", "read"; -- permission java.util.PropertyPermission "java.vm.name", "read"; -+ // "standard" properies that can be read by anyone -+ -+ permission java.util.PropertyPermission "java.version", "read"; -+ permission java.util.PropertyPermission "java.vendor", "read"; -+ permission java.util.PropertyPermission "java.vendor.url", "read"; -+ permission java.util.PropertyPermission "java.class.version", "read"; -+ permission java.util.PropertyPermission "os.name", "read"; -+ permission java.util.PropertyPermission "os.version", "read"; -+ permission java.util.PropertyPermission "os.arch", "read"; -+ permission java.util.PropertyPermission "file.separator", "read"; -+ permission java.util.PropertyPermission "path.separator", "read"; -+ permission java.util.PropertyPermission "line.separator", "read"; -+ -+ permission java.util.PropertyPermission "java.specification.version", "read"; -+ permission java.util.PropertyPermission "java.specification.vendor", "read"; -+ permission java.util.PropertyPermission "java.specification.name", "read"; -+ -+ permission java.util.PropertyPermission "java.vm.specification.version", "read"; -+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; -+ permission java.util.PropertyPermission "java.vm.specification.name", "read"; -+ permission java.util.PropertyPermission "java.vm.version", "read"; -+ permission java.util.PropertyPermission "java.vm.vendor", "read"; -+ permission java.util.PropertyPermission "java.vm.name", "read"; - }; + *Dest = *Tag; + return TRUE; + } +@@ -193,7 +192,8 @@ + if (GrayTRC == NULL) return NULL; ---- jdk/src/share/lib/security/java.security-linux 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/lib/security/java.security-linux 2014-04-20 12:39:18.000000000 -0700 -@@ -128,7 +128,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -165,7 +168,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -423,4 +429,3 @@ - # - # Example: - # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 -- ---- jdk/src/share/lib/security/java.security-macosx 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/lib/security/java.security-macosx 2014-04-20 12:39:18.000000000 -0700 -@@ -129,7 +129,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -168,7 +171,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -428,4 +434,3 @@ - # - # Example: - # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 -- ---- jdk/src/share/lib/security/java.security-solaris 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/lib/security/java.security-solaris 2014-04-20 12:39:18.000000000 -0700 -@@ -130,7 +130,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -168,7 +171,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -427,4 +433,3 @@ - # - # Example: - # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 --i ---- jdk/src/share/lib/security/java.security-windows 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/lib/security/java.security-windows 2014-04-20 12:39:18.000000000 -0700 -@@ -129,7 +129,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -168,7 +171,10 @@ - com.sun.imageio.,\ - com.sun.istack.internal.,\ - com.sun.jmx.,\ -+ com.sun.naming.internal.,\ - com.sun.proxy.,\ -+ com.sun.corba.se.,\ -+ com.sun.script.,\ - com.sun.org.apache.bcel.internal.,\ - com.sun.org.apache.regexp.internal.,\ - com.sun.org.apache.xerces.internal.,\ -@@ -428,4 +434,3 @@ - # - # Example: - # jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048 -- ---- jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -4780,39 +4780,7 @@ - } else if (log_file[0] != '\0' && (errstrm = fopen(log_file,"a+")) != NULL) { - return; - } else { -- char log_file_name[PATH_MAX+100]; -- char tmpdir[PATH_MAX]; --#ifdef WIN32 -- int n = GetTempPath(PATH_MAX,tmpdir); //API returns with trailing '\' -- if (n < 1 || n > PATH_MAX) { -- sprintf(tmpdir,"C:\\"); -- } -- sprintf(log_file_name, "%sunpack.log", tmpdir); --#else -- sprintf(tmpdir,"/tmp"); -- sprintf(log_file_name, "/tmp/unpack.log"); --#endif -- if ((errstrm = fopen(log_file_name, "a+")) != NULL) { -- log_file = errstrm_name = saveStr(log_file_name); -- return ; -- } -- -- char *tname = tempnam(tmpdir,"#upkg"); -- if (tname == NULL) return; -- sprintf(log_file_name, "%s", tname); -- ::free(tname); -- if ((errstrm = fopen(log_file_name, "a+")) != NULL) { -- log_file = errstrm_name = saveStr(log_file_name); -- return ; -- } --#ifndef WIN32 -- sprintf(log_file_name, "/dev/null"); -- // On windows most likely it will fail. -- if ( (errstrm = fopen(log_file_name, "a+")) != NULL) { -- log_file = errstrm_name = saveStr(log_file_name); -- return ; -- } --#endif -+ fprintf(stderr, "Can not open log file %s\n", log_file); - // Last resort - // (Do not use stdout, since it might be jarout->jarfp.) - errstrm = stderr; ---- jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2013-09-06 11:28:57.000000000 -0700 -+++ jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -340,6 +340,10 @@ - struct tm sbuf; - (void)memset((void*)&sbuf,0, sizeof(sbuf)); - struct tm* s = gmtime_r(&t, &sbuf); -+ if (s == NULL) { -+ fprintf(u->errstrm, "Error: gmtime failure, invalid input archive\n"); -+ exit(2); -+ } - modtime_cache = modtime; - dostime_cache = dostime(s->tm_year + 1900, s->tm_mon + 1, s->tm_mday, - s->tm_hour, s->tm_min, s->tm_sec); -@@ -384,7 +388,7 @@ - } + Lut = cmsPipelineAlloc(ContextID, 1, 3); +- if (Lut == NULL) return NULL; ++ if (Lut == NULL) ++ goto Error; - deflated.empty(); -- zs.next_out = (uchar*) deflated.grow(len + (len/2)); -+ zs.next_out = (uchar*) deflated.grow(add_size(len, (len/2))); - zs.avail_out = (int)deflated.size(); + if (cmsGetPCS(hProfile) == cmsSigLabData) { - zs.next_in = (uchar*)head.ptr; ---- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2013-09-06 11:28:58.000000000 -0700 -+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2014-04-20 12:39:16.000000000 -0700 -@@ -64,7 +64,7 @@ +@@ -204,28 +204,35 @@ + EmptyTab = cmsBuildTabulatedToneCurve16(ContextID, 2, Zero); - // following is needed for _LP64 --#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX)) -+#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX)) - #include - #endif +- if (EmptyTab == NULL) { +- +- cmsPipelineFree(Lut); +- return NULL; +- } ++ if (EmptyTab == NULL) ++ goto Error; ---- jdk/src/share/native/java/lang/Class.c 2013-09-06 11:28:58.000000000 -0700 -+++ jdk/src/share/native/java/lang/Class.c 2014-04-20 12:39:16.000000000 -0700 -@@ -70,7 +70,7 @@ - {"getProtectionDomain0", "()" PD, (void *)&JVM_GetProtectionDomain}, - {"setProtectionDomain0", "(" PD ")V", (void *)&JVM_SetProtectionDomain}, - {"getDeclaredClasses0", "()[" CLS, (void *)&JVM_GetDeclaredClasses}, -- {"getDeclaringClass", "()" CLS, (void *)&JVM_GetDeclaringClass}, -+ {"getDeclaringClass0", "()" CLS, (void *)&JVM_GetDeclaringClass}, - {"getGenericSignature", "()" STR, (void *)&JVM_GetClassSignature}, - {"getRawAnnotations", "()" BA, (void *)&JVM_GetClassAnnotations}, - {"getConstantPool", "()" CPL, (void *)&JVM_GetClassConstantPool}, ---- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2013-09-06 11:28:58.000000000 -0700 -+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2014-04-20 12:39:16.000000000 -0700 -@@ -24,6 +24,9 @@ - * questions. - */ + LabCurves[0] = GrayTRC; + LabCurves[1] = EmptyTab; + LabCurves[2] = EmptyTab; -+#ifdef __OpenBSD__ -+#include -+#endif - #ifdef _ALLBSD_SOURCE - #include - #elif __linux__ -@@ -32,6 +35,12 @@ - #endif - #include "jfdlibm.h" +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, OneToThreeInputMatrix, NULL)); +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, LabCurves)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, OneToThreeInputMatrix, NULL)) || ++ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, LabCurves))) { ++ cmsFreeToneCurve(EmptyTab); ++ goto Error; ++ } -+/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */ -+#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \ -+ _BYTE_ORDER == _BIG_ENDIAN -+#undef _LITTLE_ENDIAN -+#endif -+ - #ifdef __NEWVALID /* special setup for Sun test regime */ - #if defined(i386) || defined(i486) || \ - defined(intel) || defined(x86) || defined(arm) || \ ---- jdk/src/share/native/java/net/Inet6Address.c 2013-09-06 11:28:58.000000000 -0700 -+++ jdk/src/share/native/java/net/Inet6Address.c 2014-04-20 12:39:16.000000000 -0700 -@@ -33,6 +33,8 @@ - */ + cmsFreeToneCurve(EmptyTab); - jclass ia6_class; -+jfieldID ia6_holder6ID; + } + else { +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &GrayTRC)); +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, GrayInputMatrix, NULL)); + - jfieldID ia6_ipaddressID; - jfieldID ia6_scopeidID; - jfieldID ia6_cachedscopeidID; -@@ -48,21 +50,26 @@ - */ - JNIEXPORT void JNICALL - Java_java_net_Inet6Address_init(JNIEnv *env, jclass cls) { -+ jclass ia6h_class; - jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); - CHECK_NULL(c); - ia6_class = (*env)->NewGlobalRef(env, c); - CHECK_NULL(ia6_class); -- ia6_ipaddressID = (*env)->GetFieldID(env, ia6_class, "ipaddress", "[B"); -+ ia6h_class = (*env)->FindClass(env, "java/net/Inet6Address$Inet6AddressHolder"); -+ CHECK_NULL(ia6h_class); -+ ia6_holder6ID = (*env)->GetFieldID(env, ia6_class, "holder6", "Ljava/net/Inet6Address$Inet6AddressHolder;"); -+ CHECK_NULL(ia6_holder6ID); -+ ia6_ipaddressID = (*env)->GetFieldID(env, ia6h_class, "ipaddress", "[B"); - CHECK_NULL(ia6_ipaddressID); -- ia6_scopeidID = (*env)->GetFieldID(env, ia6_class, "scope_id", "I"); -+ ia6_scopeidID = (*env)->GetFieldID(env, ia6h_class, "scope_id", "I"); - CHECK_NULL(ia6_scopeidID); - ia6_cachedscopeidID = (*env)->GetFieldID(env, ia6_class, "cached_scope_id", "I"); - CHECK_NULL(ia6_cachedscopeidID); -- ia6_scopeidsetID = (*env)->GetFieldID(env, ia6_class, "scope_id_set", "Z"); -+ ia6_scopeidsetID = (*env)->GetFieldID(env, ia6h_class, "scope_id_set", "Z"); - CHECK_NULL(ia6_scopeidID); -- ia6_scopeifnameID = (*env)->GetFieldID(env, ia6_class, "scope_ifname", "Ljava/net/NetworkInterface;"); -+ ia6_scopeifnameID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname", "Ljava/net/NetworkInterface;"); - CHECK_NULL(ia6_scopeifnameID); -- ia6_scopeifnamesetID = (*env)->GetFieldID(env, ia6_class, "scope_ifname_set", "Z"); -+ ia6_scopeifnamesetID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname_set", "Z"); - CHECK_NULL(ia6_scopeifnamesetID); - ia6_ctrID = (*env)->GetMethodID(env, ia6_class, "", "()V"); - CHECK_NULL(ia6_ctrID); ---- jdk/src/share/native/java/net/net_util.c 2013-09-06 11:28:58.000000000 -0700 -+++ jdk/src/share/native/java/net/net_util.c 2014-04-20 12:39:16.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -94,6 +94,111 @@ - extern jfieldID iac_addressID; - extern jfieldID iac_familyID; ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &GrayTRC)) || ++ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, GrayInputMatrix, NULL))) ++ goto Error; + } -+/** -+ * set_ methods return JNI_TRUE on success JNI_FALSE on error -+ * get_ methods that return +ve int return -1 on error -+ * get_ methods that return objects return NULL on error. -+ */ -+jobject getInet6Address_scopeifname(JNIEnv *env, jobject iaObj) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, NULL); -+ return (*env)->GetObjectField(env, holder, ia6_scopeifnameID); -+} -+ -+int setInet6Address_scopeifname(JNIEnv *env, jobject iaObj, jobject scopeifname) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, JNI_FALSE); -+ (*env)->SetObjectField(env, holder, ia6_scopeifnameID, scopeifname); -+ return JNI_TRUE; -+} -+ -+int getInet6Address_scopeifname_set(JNIEnv *env, jobject iaObj) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, -1); -+ return (*env)->GetBooleanField(env, holder, ia6_scopeifnamesetID); -+} -+ -+int setInet6Address_scopeifname_set(JNIEnv *env, jobject iaObj, int scopeifname_set) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, JNI_FALSE); -+ (*env)->SetBooleanField(env, holder, ia6_scopeifnamesetID, scopeifname_set); -+ return JNI_TRUE; -+} -+ -+int getInet6Address_scopeid_set(JNIEnv *env, jobject iaObj) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, -1); -+ return (*env)->GetBooleanField(env, holder, ia6_scopeidsetID); -+} -+ -+int getInet6Address_scopeid(JNIEnv *env, jobject iaObj) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, -1); -+ return (*env)->GetIntField(env, holder, ia6_scopeidID); -+} -+ -+int setInet6Address_scopeid(JNIEnv *env, jobject iaObj, int scopeid) { -+ jobject holder; -+ -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, JNI_FALSE); -+ (*env)->SetIntField(env, holder, ia6_scopeidID, scopeid); -+ if (scopeid > 0) { -+ (*env)->SetBooleanField(env, holder, ia6_scopeidsetID, JNI_TRUE); -+ } -+ return JNI_TRUE; -+} -+ + return Lut; + -+int getInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *dest) { -+ jobject holder, addr; -+ jbyteArray barr; ++Error: ++ cmsFreeToneCurve(GrayTRC); ++ cmsPipelineFree(Lut); ++ return NULL; + } + + // RGB Matrix shaper +@@ -259,49 +266,31 @@ + Lut = cmsPipelineAlloc(ContextID, 3, 3); + if (Lut != NULL) { + +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, Shapes)); +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Mat, NULL)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, Shapes)) || ++ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Mat, NULL))) ++ goto Error; + + // Note that it is certainly possible a single profile would have a LUT based + // tag for output working in lab and a matrix-shaper for the fallback cases. + // This is not allowed by the spec, but this code is tolerant to those cases + if (cmsGetPCS(hProfile) == cmsSigLabData) { + +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocXYZ2Lab(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocXYZ2Lab(ContextID))) ++ goto Error; + } + + } + + return Lut; + -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, JNI_FALSE); -+ addr = (*env)->GetObjectField(env, holder, ia6_ipaddressID); -+ CHECK_NULL_RETURN(addr, JNI_FALSE); -+ (*env)->GetByteArrayRegion(env, addr, 0, 16, (jbyte *)dest); -+ return JNI_TRUE; -+} ++Error: ++ cmsPipelineFree(Lut); ++ return NULL; + } + + + + // Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded +-/*static +-cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) +-{ +- cmsContext ContextID = cmsGetProfileContextID(hProfile); +- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat)); +- cmsColorSpaceSignature spc = cmsGetColorSpace(hProfile); +- +- if (Lut == NULL) return NULL; +- +- // If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding, +- // and since the formatter has already accomodated to 0..1.0, we should undo this change +- if ( spc == cmsSigLabData) +- { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); +- } +- else +- if (spc == cmsSigXYZData) +- { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); +- } +- +- return Lut; +-} +-*/ + static + cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) + { +@@ -316,23 +305,31 @@ + // these need to be normalized into the appropriate ranges (Lab = 100,0,0, XYZ=1.0,1.0,1.0) + if ( spc == cmsSigLabData) + { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID))) ++ goto Error; + } + else if (spc == cmsSigXYZData) + { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID))) ++ goto Error; + } + + if ( PCS == cmsSigLabData) + { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID))) ++ goto Error; + } + else if( PCS == cmsSigXYZData) + { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID))) ++ goto Error; + } + + return Lut; + -+int setInet6Address_ipaddress(JNIEnv *env, jobject iaObj, char *address) { -+ jobject holder; -+ jbyteArray addr; ++Error: ++ cmsPipelineFree(Lut); ++ return NULL; + } + + +@@ -359,8 +356,11 @@ + return NULL; + } + +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, TRUE)); +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, TRUE)) || ++ !cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) { ++ cmsPipelineFree(Lut); ++ return NULL; ++ } + return Lut; + } + +@@ -395,12 +395,18 @@ + return Lut; + + // If the input is Lab, add also a conversion at the begin +- if (cmsGetColorSpace(hProfile) == cmsSigLabData) +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); ++ if (cmsGetColorSpace(hProfile) == cmsSigLabData && ++ !cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) ++ goto Error; + + // Add a matrix for conversion V2 to V4 Lab PCS +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) ++ goto Error; + -+ initInetAddrs(env); -+ holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); -+ CHECK_NULL_RETURN(holder, JNI_FALSE); -+ addr = (jbyteArray)(*env)->GetObjectField(env, holder, ia6_ipaddressID); -+ if (addr == NULL) { -+ addr = (*env)->NewByteArray(env, 16); -+ CHECK_NULL_RETURN(addr, JNI_FALSE); -+ (*env)->SetObjectField(env, holder, ia6_ipaddressID, addr); -+ } -+ (*env)->SetByteArrayRegion(env, addr, 0, 16, (jbyte *)address); -+ return JNI_TRUE; + return Lut; ++Error: ++ cmsPipelineFree(Lut); ++ return NULL; + } + + // Lut was not found, try to create a matrix-shaper +@@ -445,19 +451,25 @@ + + if (cmsGetPCS(hProfile) == cmsSigLabData) { + +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL))) ++ goto Error; + } + else { +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickYMatrix, NULL)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickYMatrix, NULL))) ++ goto Error; + } + +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &RevGrayTRC)); +- cmsFreeToneCurve(RevGrayTRC); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &RevGrayTRC))) ++ goto Error; + ++ cmsFreeToneCurve(RevGrayTRC); + return Lut; +-} +- + ++Error: ++ cmsFreeToneCurve(RevGrayTRC); ++ cmsPipelineFree(Lut); ++ return NULL; +} -+ - void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) { - jobject holder; - initInetAddrs(env); -@@ -168,6 +273,7 @@ - } else { - static jclass inet6Cls = 0; - jint scope; -+ int ret; - if (inet6Cls == 0) { - jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); - CHECK_NULL_RETURN(c, NULL); -@@ -177,18 +283,11 @@ - } - iaObj = (*env)->NewObject(env, inet6Cls, ia6_ctrID); - CHECK_NULL_RETURN(iaObj, NULL); -- ipaddress = (*env)->NewByteArray(env, 16); -- CHECK_NULL_RETURN(ipaddress, NULL); -- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, -- (jbyte *)&(him6->sin6_addr)); + + + static +@@ -506,15 +518,21 @@ + // This is not allowed by the spec, but this code is tolerant to those cases + if (cmsGetPCS(hProfile) == cmsSigLabData) { + +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLab2XYZ(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLab2XYZ(ContextID))) ++ goto Error; + } + +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Inv, NULL)); +- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, InvShapes)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Inv, NULL)) || ++ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, InvShapes))) ++ goto Error; + } + + cmsFreeToneCurveTriple(InvShapes); + return Lut; ++Error: ++ cmsFreeToneCurveTriple(InvShapes); ++ cmsPipelineFree(Lut); ++ return NULL; + } + + +@@ -540,30 +558,6 @@ + + + // Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded +-/*static +-cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) +-{ +- cmsContext ContextID = cmsGetProfileContextID(hProfile); +- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat)); +- cmsColorSpaceSignature PCS = cmsGetPCS(hProfile); - -- (*env)->SetObjectField(env, iaObj, ia6_ipaddressID, ipaddress); +- if (Lut == NULL) return NULL; - -+ ret = setInet6Address_ipaddress(env, iaObj, (char *)&(him6->sin6_addr)); -+ CHECK_NULL_RETURN(ret, NULL); - setInetAddress_family(env, iaObj, IPv6); - scope = getScopeID(him); -- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); -- if (scope > 0) -- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); -+ setInet6Address_scopeid(env, iaObj, scope); +- // If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding, +- // and since the formatter has already accomodated to 0..1.0, we should undo this change +- if ( PCS == cmsSigLabData) +- { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); +- } +- else +- if (PCS == cmsSigXYZData) +- { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); +- } +- +- return Lut; +-}*/ +- + static + cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) + { +@@ -578,25 +572,33 @@ + // and since the formatter has already accomodated to 0..1.0, we should undo this change + if ( PCS == cmsSigLabData) + { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID))) ++ goto Error; + } + else + if (PCS == cmsSigXYZData) + { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID))) ++ goto Error; } - *port = ntohs(him6->sin6_port); - } else -@@ -248,9 +347,8 @@ - if (family == AF_INET) { - return JNI_FALSE; - } -- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); -- scope = (*env)->GetIntField(env, iaObj, ia6_scopeidID); -- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddrCur); -+ scope = getInet6Address_scopeid(env, iaObj); -+ getInet6Address_ipaddress(env, iaObj, (char *)caddrCur); - if (NET_IsEqual(caddrNew, caddrCur) && cmpScopeID(scope, him)) { - return JNI_TRUE; - } else { ---- jdk/src/share/native/java/net/net_util.h 2013-09-06 11:28:58.000000000 -0700 -+++ jdk/src/share/native/java/net/net_util.h 2014-04-20 12:39:16.000000000 -0700 -@@ -58,6 +58,22 @@ - extern jfieldID iac_hostNameID; - extern jfieldID ia_preferIPv6AddressID; -+/** (Inet6Address accessors) -+ * set_ methods return JNI_TRUE on success JNI_FALSE on error -+ * get_ methods that return int/boolean, return -1 on error -+ * get_ methods that return objects return NULL on error. -+ */ -+extern jobject getInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj); -+extern int setInet6Address_scopeifname(JNIEnv *env, jobject ia6Obj, jobject scopeifname); -+extern int getInet6Address_scopeifname_set(JNIEnv *env, jobject ia6Obj); -+extern int setInet6Address_scopeifname_set(JNIEnv *env, jobject ia6Obj, -+ int scopeifname_set); -+extern int getInet6Address_scopeid_set(JNIEnv *env, jobject ia6Obj); -+extern int getInet6Address_scopeid(JNIEnv *env, jobject ia6Obj); -+extern int setInet6Address_scopeid(JNIEnv *env, jobject ia6Obj, int scopeid); -+extern int getInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *dest); -+extern int setInet6Address_ipaddress(JNIEnv *env, jobject ia6Obj, char *address); + // the output can be Lab or XYZ, in which case normalisation is needed on the end of the pipeline + if ( dataSpace == cmsSigLabData) + { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID))) ++ goto Error; + } +- else if ( dataSpace == cmsSigXYZData) ++ else if (dataSpace == cmsSigXYZData) + { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID))) ++ goto Error; + } + + return Lut; + - extern void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address); - extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family); - extern void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject h); -@@ -93,6 +109,7 @@ ++Error: ++ cmsPipelineFree(Lut); ++ return NULL; + } - /* Inet6Address fields */ - extern jclass ia6_class; -+extern jfieldID ia6_holder6ID; - extern jfieldID ia6_ipaddressID; - extern jfieldID ia6_scopeidID; - extern jfieldID ia6_cachedscopeidID; ---- jdk/src/share/native/sun/awt/giflib/dgif_lib.c 2013-09-06 11:28:59.000000000 -0700 -+++ jdk/src/share/native/sun/awt/giflib/dgif_lib.c 2014-04-20 12:39:16.000000000 -0700 -@@ -435,9 +435,7 @@ - Private->PixelCount = (long)GifFile->Image.Width * - (long)GifFile->Image.Height; + // Create an output MPE LUT from agiven profile. Version mismatches are handled here +@@ -636,30 +638,35 @@ + // Now it is time for a controversial stuff. I found that for 3D LUTS using + // Lab used as indexer space, trilinear interpolation should be used + if (cmsGetPCS(hProfile) == cmsSigLabData) +- ChangeInterpolationToTrilinear(Lut); ++ ChangeInterpolationToTrilinear(Lut); -- DGifSetupDecompress(GifFile); /* Reset decompress algorithm parameters. */ -- -- return GIF_OK; -+ return DGifSetupDecompress(GifFile); /* Reset decompress algorithm parameters. */ - } + // We need to adjust data only for Lab and Lut16 type + if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData) + return Lut; - /****************************************************************************** ---- jdk/src/share/native/sun/awt/image/awt_parseImage.c 2013-09-06 11:28:59.000000000 -0700 -+++ jdk/src/share/native/sun/awt/image/awt_parseImage.c 2014-04-20 12:39:16.000000000 -0700 -@@ -808,363 +808,204 @@ - return 1; + // Add a matrix for conversion V4 to V2 Lab PCS +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) ++ goto Error; + + // If the output is Lab, add also a conversion at the end + if (cmsGetColorSpace(hProfile) == cmsSigLabData) +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) ++ goto Error; + + return Lut; ++Error: ++ cmsPipelineFree(Lut); ++ return NULL; + } + + // Lut not found, try to create a matrix-shaper + + // Check if this is a grayscale profile. +- if (cmsGetColorSpace(hProfile) == cmsSigGrayData) { ++ if (cmsGetColorSpace(hProfile) == cmsSigGrayData) { + +- // if so, build appropiate conversion tables. +- // The tables are the PCS iluminant, scaled across GrayTRC +- return BuildGrayOutputPipeline(hProfile); ++ // if so, build appropiate conversion tables. ++ // The tables are the PCS iluminant, scaled across GrayTRC ++ return BuildGrayOutputPipeline(hProfile); + } + + // Not gray, create a normal matrix-shaper, which only operates in XYZ space +@@ -681,25 +688,32 @@ + + if (spc == cmsSigLabData) + { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID))) ++ goto Error; + } + else + if (spc == cmsSigXYZData) + { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID))) ++ goto Error; + } + + if (PCS == cmsSigLabData) + { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID))) ++ goto Error; + } + else + if (PCS == cmsSigXYZData) + { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID))) ++ goto Error; + } + +- return Lut; ++ return Lut; ++Error: ++ cmsPipelineFree(Lut); ++ return NULL; } --/* -- * This routine will fill in a buffer of data for either 1 band or all -- * bands (if band == -1). -- */ - #define MAX_TO_GRAB (10240) + // This one includes abstract profiles as well. Matrix-shaper cannot be obtained on that device class. The +@@ -721,15 +735,21 @@ + if (nc == NULL) return NULL; --int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned char *bufferP) { -- int w = rasterP->width; -- int h = rasterP->height; -- int numBands = rasterP->numBands; -+typedef union { -+ void *pv; -+ unsigned char *pb; -+ unsigned short *ps; -+} PixelData_t; -+ + Lut = cmsPipelineAlloc(ContextID, 0, 0); +- if (Lut == NULL) { +- cmsFreeNamedColorList(nc); +- return NULL; +- } ++ if (Lut == NULL) ++ goto Error; + -+int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) { -+ const int w = rasterP->width; -+ const int h = rasterP->height; -+ const int numBands = rasterP->numBands; - int y; - int i; -- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); -+ int maxLines; - jobject jsm; -- int off; -+ int off = 0; - jarray jdata = NULL; - jobject jdatabuffer; - int *dataP; -- int maxBytes = w; -+ int maxSamples; -+ PixelData_t p; ++ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, FALSE))) ++ goto Error; -- jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); -- jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, -- g_RasterDataBufferID); -- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); -- if (JNU_IsNull(env, jdata)) { -- JNU_ThrowOutOfMemoryError(env, "Out of Memory"); -+ if (bufferP == NULL) { - return -1; +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, FALSE)); + if (cmsGetColorSpace(hProfile) == cmsSigLabData) +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); ++ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) ++ goto Error; ++ + return Lut; ++Error: ++ cmsPipelineFree(Lut); ++ cmsFreeNamedColorList(nc); ++ return NULL; } -- /* Here is the generic code */ -- if (band >= 0) { -- int dOff; -- if (band >= numBands) { -- (*env)->DeleteLocalRef(env, jdata); -- JNU_ThrowInternalError(env, "Band out of range."); -- return -1; -- } -- off = 0; -- for (y=0; y < h; ) { -- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -- } -- dOff = band; -- for (i=0; i < maxBytes; i++, dOff += numBands) { -- bufferP[off++] = (unsigned char) dataP[dOff]; -- } -+ if (rasterP->dataType != BYTE_DATA_TYPE && -+ rasterP->dataType != SHORT_DATA_TYPE) -+ { -+ return -1; -+ } + if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence +@@ -760,10 +780,10 @@ + Lut = cmsPipelineDup(Lut); + if (Lut == NULL) return NULL; -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); -+ p.pv = bufferP; +- // Now it is time for a controversial stuff. I found that for 3D LUTS using +- // Lab used as indexer space, trilinear interpolation should be used ++ // Now it is time for a controversial stuff. I found that for 3D LUTS using ++ // Lab used as indexer space, trilinear interpolation should be used + if (cmsGetColorSpace(hProfile) == cmsSigLabData) +- ChangeInterpolationToTrilinear(Lut); ++ ChangeInterpolationToTrilinear(Lut); -- if (y+maxLines < h) { -- y += maxLines; -- } -- else { -- y++; -- maxBytes = w; -- } -- } -+ if (!SAFE_TO_MULT(w, numBands)) { -+ return -1; + // After reading it, we have info about the original type + OriginalType = _cmsGetTagTrueType(hProfile, tag16); +@@ -774,16 +794,20 @@ + // Here it is possible to get Lab on both sides + + if (cmsGetPCS(hProfile) == cmsSigLabData) { +- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); ++ if(!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) ++ goto Error2; } -- else { -- off = 0; -- maxBytes *= numBands; -- for (y=0; y < h; ) { -- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -- } -- for (i=0; i < maxBytes; i++) { -- bufferP[off++] = (unsigned char) dataP[i]; -- } -+ maxSamples = w * numBands; -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); + if (cmsGetColorSpace(hProfile) == cmsSigLabData) { +- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); ++ if(!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) ++ goto Error2; + } + + return Lut; + - -- if (y+maxLines < h) { -- y += maxLines; -- } -- else { -- y++; -- maxBytes = w*numBands; -- } -- } -+ maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples); -+ if (maxLines > h) { -+ maxLines = h; -+ } ++Error2: ++ cmsPipelineFree(Lut); ++ return NULL; + } -+ if (!SAFE_TO_MULT(maxSamples, maxLines)) { -+ return -1; + // --------------------------------------------------------------------------------------------------------------- +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c 2014-04-19 01:27:12.000000000 -0700 +@@ -264,10 +264,10 @@ + if (NewElem ->TheCurves != NULL) { + for (i=0; i < NewElem ->nCurves; i++) { + if (NewElem ->TheCurves[i]) +- cmsFreeToneCurve(Data ->TheCurves[i]); ++ cmsFreeToneCurve(NewElem ->TheCurves[i]); + } } -- (*env)->DeleteLocalRef(env, jdata); +- _cmsFree(mpe ->ContextID, Data ->TheCurves); ++ _cmsFree(mpe ->ContextID, NewElem ->TheCurves); + _cmsFree(mpe ->ContextID, NewElem); + return NULL; + } +@@ -392,6 +392,8 @@ + void MatrixElemTypeFree(cmsStage* mpe) + { + _cmsStageMatrixData* Data = (_cmsStageMatrixData*) mpe ->Data; ++ if (Data == NULL) ++ return; + if (Data ->Double) + _cmsFree(mpe ->ContextID, Data ->Double); -- return 0; --} --int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned char *bufferP) { -- int w = rasterP->width; -- int h = rasterP->height; -- int numBands = rasterP->numBands; -- int y; -- int i; -- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); -- jobject jsm; -- int off; -- jarray jdata = NULL; -- jobject jdatabuffer; -- int *dataP; -- int maxBytes = w; -+ maxSamples *= maxLines; +@@ -526,10 +528,15 @@ - jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); - jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, - g_RasterDataBufferID); -- /* Here is the generic code */ -- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); -+ -+ jdata = (*env)->NewIntArray(env, maxSamples); - if (JNU_IsNull(env, jdata)) { - JNU_ThrowOutOfMemoryError(env, "Out of Memory"); - return -1; - } -- if (band >= 0) { -- int dOff; -- if (band >= numBands) { -+ -+ for (y = 0; y < h; y += maxLines) { -+ if (y + maxLines > h) { -+ maxLines = h - y; -+ maxSamples = w * numBands * maxLines; + if (Data ->Tab.T) { + +- if (Data ->HasFloatValues) ++ if (Data ->HasFloatValues) { + NewElem ->Tab.TFloat = (cmsFloat32Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.TFloat, Data ->nEntries * sizeof (cmsFloat32Number)); +- else ++ if (NewElem ->Tab.TFloat == NULL) ++ goto Error; ++ } else { + NewElem ->Tab.T = (cmsUInt16Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.T, Data ->nEntries * sizeof (cmsUInt16Number)); ++ if (NewElem ->Tab.TFloat == NULL) ++ goto Error; + } -+ -+ (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, -+ 0, y, w, -+ maxLines, jdata, jdatabuffer); -+ -+ if ((*env)->ExceptionOccurred(env)) { - (*env)->DeleteLocalRef(env, jdata); -- JNU_ThrowInternalError(env, "Band out of range."); - return -1; - } -- off = 0; -- for (y=0; y < h; y+=maxLines) { -- if (y+maxLines > h) { -- maxBytes = w*numBands; -- maxLines = h - y; -- } -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -- } -- dOff = band; -- for (i=0; i < maxBytes; i++, dOff += numBands) { -- dataP[dOff] = bufferP[off++]; -- } -- -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); + } -- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -+ dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -+ NULL); -+ if (dataP == NULL) { -+ (*env)->DeleteLocalRef(env, jdata); -+ return -1; - } -- } -- else { -- off = 0; -- maxBytes *= numBands; -- for (y=0; y < h; y+=maxLines) { -- if (y+maxLines > h) { -- maxBytes = w*numBands; -- maxLines = h - y; -- } -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -+ -+ switch (rasterP->dataType) { -+ case BYTE_DATA_TYPE: -+ for (i = 0; i < maxSamples; i ++) { -+ p.pb[off++] = (unsigned char) dataP[i]; - } -- for (i=0; i < maxBytes; i++) { -- dataP[i] = bufferP[off++]; -+ break; -+ case SHORT_DATA_TYPE: -+ for (i = 0; i < maxSamples; i ++) { -+ p.ps[off++] = (unsigned short) dataP[i]; - } + NewElem ->Params = _cmsComputeInterpParamsEx(mpe ->ContextID, +@@ -538,8 +545,14 @@ + Data ->Params ->nOutputs, + NewElem ->Tab.T, + Data ->Params ->dwFlags); - -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); +- return (void*) NewElem; ++ if (NewElem->Params != NULL) ++ return (void*) NewElem; ++ Error: ++ if (NewElem->Tab.T) ++ // This works for both types ++ _cmsFree(mpe ->ContextID, NewElem -> Tab.T); ++ _cmsFree(mpe ->ContextID, NewElem); ++ return NULL; + } + + +@@ -636,7 +649,6 @@ + for (i=0; i < MAX_INPUT_DIMENSIONS; i++) + Dimensions[i] = nGridPoints; + - -- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -+ break; + return cmsStageAllocCLut16bitGranular(ContextID, Dimensions, inputChan, outputChan, Table); + } + +@@ -706,15 +718,12 @@ } + } -+ (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -+ JNI_ABORT); +- + NewElem ->Params = _cmsComputeInterpParamsEx(ContextID, clutPoints, inputChan, outputChan, NewElem ->Tab.TFloat, CMS_LERP_FLAGS_FLOAT); + if (NewElem ->Params == NULL) { + cmsStageFree(NewMPE); + return NULL; } + - - (*env)->DeleteLocalRef(env, jdata); +- + return NewMPE; + } + +@@ -772,7 +781,7 @@ + int i, t, nTotalPoints, index, rest; + int nInputs, nOutputs; + cmsUInt32Number* nSamples; +- cmsUInt16Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS]; ++ cmsUInt16Number In[MAX_INPUT_DIMENSIONS+1], Out[MAX_STAGE_CHANNELS]; + _cmsStageCLutData* clut; + + if (mpe == NULL) return FALSE; +@@ -785,7 +794,9 @@ + nInputs = clut->Params ->nInputs; + nOutputs = clut->Params ->nOutputs; + +- if (nInputs >= cmsMAXCHANNELS) return FALSE; ++ if (nInputs <= 0) return FALSE; ++ if (nOutputs <= 0) return FALSE; ++ if (nInputs > MAX_INPUT_DIMENSIONS) return FALSE; + if (nOutputs >= MAX_STAGE_CHANNELS) return FALSE; + + nTotalPoints = CubeSize(nSamples, nInputs); +@@ -832,14 +843,16 @@ + int i, t, nTotalPoints, index, rest; + int nInputs, nOutputs; + cmsUInt32Number* nSamples; +- cmsFloat32Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS]; ++ cmsFloat32Number In[MAX_INPUT_DIMENSIONS+1], Out[MAX_STAGE_CHANNELS]; + _cmsStageCLutData* clut = (_cmsStageCLutData*) mpe->Data; + + nSamples = clut->Params ->nSamples; + nInputs = clut->Params ->nInputs; + nOutputs = clut->Params ->nOutputs; + +- if (nInputs >= cmsMAXCHANNELS) return FALSE; ++ if (nInputs <= 0) return FALSE; ++ if (nOutputs <= 0) return FALSE; ++ if (nInputs > MAX_INPUT_DIMENSIONS) return FALSE; + if (nOutputs >= MAX_STAGE_CHANNELS) return FALSE; + + nTotalPoints = CubeSize(nSamples, nInputs); +@@ -1021,7 +1034,7 @@ + mpe = cmsStageAllocToneCurves(ContextID, 3, LabTable); + cmsFreeToneCurveTriple(LabTable); -- return 0; -+ return 1; +- if (mpe == NULL) return mpe; ++ if (mpe == NULL) return NULL; + mpe ->Implements = cmsSigLabV2toV4; + return mpe; } --int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned short *bufferP) { -- int w = rasterP->width; -- int h = rasterP->height; -- int numBands = rasterP->numBands; +@@ -1247,12 +1260,22 @@ + NULL); + if (NewMPE == NULL) return NULL; + +- NewMPE ->Implements = mpe ->Implements; ++ NewMPE ->Implements = mpe ->Implements; + -+int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP) { -+ const int w = rasterP->width; -+ const int h = rasterP->height; -+ const int numBands = rasterP->numBands; ++ if (mpe ->DupElemPtr) { + - int y; - int i; -- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); -+ int maxLines; - jobject jsm; -- int off; -+ int off = 0; - jarray jdata = NULL; - jobject jdatabuffer; - int *dataP; -- int maxBytes = w*maxLines; -+ int maxSamples; -+ PixelData_t p; - -- jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); -- jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, -- g_RasterDataBufferID); -- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); -- if (JNU_IsNull(env, jdata)) { -- JNU_ThrowOutOfMemoryError(env, "Out of Memory"); -+ if (bufferP == NULL) { - return -1; - } -- /* Here is the generic code */ -- if (band >= 0) { -- int dOff; -- if (band >= numBands) { -- (*env)->DeleteLocalRef(env, jdata); -- JNU_ThrowInternalError(env, "Band out of range."); -- return -1; -- } -- off = 0; -- for (y=0; y < h; y += maxLines) { -- if (y+maxLines > h) { -- maxBytes = w*numBands; -- maxLines = h - y; -- } -- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -- } ++ NewMPE ->Data = mpe ->DupElemPtr(mpe); ++ ++ if (NewMPE->Data == NULL) { ++ ++ cmsStageFree(NewMPE); ++ return NULL; ++ } ++ ++ } else { -- dOff = band; -- for (i=0; i < maxBytes; i++, dOff += numBands) { -- bufferP[off++] = (unsigned short) dataP[dOff]; -- } -+ if (rasterP->dataType != BYTE_DATA_TYPE && -+ rasterP->dataType != SHORT_DATA_TYPE) -+ { -+ return -1; +- if (mpe ->DupElemPtr) +- NewMPE ->Data = mpe ->DupElemPtr(mpe); +- else + NewMPE ->Data = NULL; + } -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); -- } -+ p.pv = bufferP; -+ -+ if (!SAFE_TO_MULT(w, numBands)) { -+ return -1; - } -- else { -- off = 0; -- maxBytes *= numBands; -- for (y=0; y < h; y+=maxLines) { -- if (y+maxLines > h) { -- maxBytes = w*numBands; -- maxLines = h - y; -- } -- (*env)->CallObjectMethod(env, jsm, g_SMGetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -- } -- for (i=0; i < maxBytes; i++) { -- bufferP[off++] = (unsigned short) dataP[i]; -- } -+ maxSamples = w * numBands; + return NewMPE; + } +@@ -1465,12 +1488,12 @@ + } -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); -- } -+ maxLines = maxSamples > MAX_TO_GRAB ? 1 : (MAX_TO_GRAB / maxSamples); -+ if (maxLines > h) { -+ maxLines = h; -+ } -+ if (!SAFE_TO_MULT(maxSamples, maxLines)) { -+ return -1; +-void CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe) ++int CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe) + { + cmsStage* Anterior = NULL, *pt; + +- _cmsAssert(lut != NULL); +- _cmsAssert(mpe != NULL); ++ if (lut == NULL || mpe == NULL) ++ return FALSE; + + switch (loc) { + +@@ -1494,9 +1517,11 @@ + } + break; + default:; ++ return FALSE; } -- (*env)->DeleteLocalRef(env, jdata); -- return 0; --} --int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned short *bufferP) { -- int w = rasterP->width; -- int h = rasterP->height; -- int numBands = rasterP->numBands; -- int y; -- int i; -- int maxLines = (h < MAX_TO_GRAB/w ? h : MAX_TO_GRAB/w); -- jobject jsm; -- int off; -- jarray jdata = NULL; -- jobject jdatabuffer; -- int *dataP; -- int maxBytes = w; -+ maxSamples *= maxLines; + BlessLUT(lut); ++ return TRUE; + } - jsm = (*env)->GetObjectField(env, rasterP->jraster, g_RasterSampleModelID); - jdatabuffer = (*env)->GetObjectField(env, rasterP->jraster, - g_RasterDataBufferID); -- if (band >= numBands) { -- JNU_ThrowInternalError(env, "Band out of range."); -- return -1; -- } -- /* Here is the generic code */ -- jdata = (*env)->NewIntArray(env, maxBytes*rasterP->numBands*maxLines); -+ -+ jdata = (*env)->NewIntArray(env, maxSamples); - if (JNU_IsNull(env, jdata)) { - JNU_ThrowOutOfMemoryError(env, "Out of Memory"); - return -1; + // Unlink an element and return the pointer to it +@@ -1558,7 +1583,7 @@ + // Concatenate two LUT into a new single one + cmsBool CMSEXPORT cmsPipelineCat(cmsPipeline* l1, const cmsPipeline* l2) + { +- cmsStage* mpe, *NewMPE; ++ cmsStage* mpe; + + // If both LUTS does not have elements, we need to inherit + // the number of channels +@@ -1573,17 +1598,12 @@ + mpe = mpe ->Next) { + + // We have to dup each element +- NewMPE = cmsStageDup(mpe); +- +- if (NewMPE == NULL) { +- return FALSE; +- } +- +- cmsPipelineInsertStage(l1, cmsAT_END, NewMPE); ++ if (!cmsPipelineInsertStage(l1, cmsAT_END, cmsStageDup(mpe))) ++ return FALSE; } -- if (band >= 0) { -- int dOff; -- off = 0; -- for (y=0; y < h; y+=maxLines) { -- if (y+maxLines > h) { -- maxBytes = w*numBands; -- maxLines = h - y; -- } -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -- } -- dOff = band; -- for (i=0; i < maxBytes; i++, dOff += numBands) { -- dataP[dOff] = bufferP[off++]; -- } + +- BlessLUT(l1); +- return TRUE; ++ BlessLUT(l1); ++ return TRUE; + } + + +@@ -1713,16 +1733,11 @@ + cmsFloat32Number fx[4], x[4], xd[4], fxd[4]; + cmsVEC3 tmp, tmp2; + cmsMAT3 Jacobian; +- cmsFloat64Number LastResult[4]; - -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); -- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -+ for (y = 0; y < h; y += maxLines) { -+ if (y + maxLines > h) { -+ maxLines = h - y; -+ maxSamples = w * numBands * maxLines; -+ } -+ dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -+ NULL); -+ if (dataP == NULL) { -+ (*env)->DeleteLocalRef(env, jdata); -+ return -1; - } -- } -- else { -- off = 0; -- maxBytes *= numBands; -- for (y=0; y < h; y+=maxLines) { -- if (y+maxLines > h) { -- maxBytes = w*numBands; -- maxLines = h - y; -- } -- dataP = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, -- NULL); -- if (dataP == NULL) { -- (*env)->DeleteLocalRef(env, jdata); -- return -1; -+ -+ switch (rasterP->dataType) { -+ case BYTE_DATA_TYPE: -+ for (i = 0; i < maxSamples; i ++) { -+ dataP[i] = p.pb[off++]; - } -- for (i=0; i < maxBytes; i++) { -- dataP[i] = bufferP[off++]; -+ break; -+ case SHORT_DATA_TYPE: -+ for (i = 0; i < maxSamples; i ++) { -+ dataP[i] = p.ps[off++]; - } -+ break; -+ } + // Only 3->3 and 4->3 are supported + if (lut ->InputChannels != 3 && lut ->InputChannels != 4) return FALSE; + if (lut ->OutputChannels != 3) return FALSE; -- (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -- JNI_ABORT); -+ (*env)->ReleasePrimitiveArrayCritical(env, jdata, dataP, -+ JNI_ABORT); +- // Mark result of -1 +- LastResult[0] = LastResult[1] = LastResult[2] = -1.0f; +- + // Take the hint as starting point if specified + if (Hint == NULL) { -- (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, -- 0, y, w, -- maxLines, jdata, jdatabuffer); -- } -+ (*env)->CallVoidMethod(env, jsm, g_SMSetPixelsMID, -+ 0, y, w, -+ maxLines, jdata, jdatabuffer); +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsmd5.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsmd5.c 2014-04-19 01:27:12.000000000 -0700 +@@ -338,7 +338,7 @@ + Error: -+ if ((*env)->ExceptionOccurred(env)) { -+ (*env)->DeleteLocalRef(env, jdata); -+ return -1; -+ } - } + // Free resources as something went wrong +- if (MD5 != NULL) _cmsFree(ContextID, MD5); ++ // "MD5" cannot be other than NULL here, so no need to free it + if (Mem != NULL) _cmsFree(ContextID, Mem); + memmove(Icc, &Keep, sizeof(_cmsICCPROFILE)); + return FALSE; +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsnamed.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsnamed.c 2014-04-19 01:27:12.000000000 -0700 +@@ -359,9 +359,9 @@ + if (Best == -1) + Best = 0; - (*env)->DeleteLocalRef(env, jdata); -- return 0; -+ -+ return 1; +- v = mlu ->Entries + Best; ++ v = mlu ->Entries + Best; + +- if (UsedLanguageCode != NULL) *UsedLanguageCode = v ->Language; ++ if (UsedLanguageCode != NULL) *UsedLanguageCode = v ->Language; + if (UsedCountryCode != NULL) *UsedCountryCode = v ->Country; + + if (len != NULL) *len = v ->Len; +@@ -475,6 +475,35 @@ } ---- jdk/src/share/native/sun/awt/image/awt_parseImage.h 2013-09-06 11:28:59.000000000 -0700 -+++ jdk/src/share/native/sun/awt/image/awt_parseImage.h 2014-04-20 12:39:16.000000000 -0700 -@@ -188,13 +188,8 @@ - void awt_freeParsedImage(BufImageS_t *imageP, int freeImageP); --int awt_getPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned char *bufferP); --int awt_setPixelByte(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned char *bufferP); --int awt_getPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned short *bufferP); --int awt_setPixelShort(JNIEnv *env, int band, RasterS_t *rasterP, -- unsigned short *bufferP); -+int awt_getPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP); + -+int awt_setPixels(JNIEnv *env, RasterS_t *rasterP, void *bufferP); - - #endif /* AWT_PARSE_IMAGE_H */ ---- jdk/src/share/native/sun/awt/image/gif/gifdecoder.c 2013-09-06 11:28:59.000000000 -0700 -+++ jdk/src/share/native/sun/awt/image/gif/gifdecoder.c 2014-04-20 12:39:16.000000000 -0700 -@@ -249,6 +249,7 @@ - /* fill the block */ - len = (*env)->CallIntMethod(env, this, readID, - blockh, remain, blockLength + 1); -+ if (len > blockLength + 1) len = blockLength + 1; - if ((*env)->ExceptionOccurred(env)) { - return 0; - } ---- jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-09-06 11:28:59.000000000 -0700 -+++ jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2014-04-20 12:39:16.000000000 -0700 -@@ -930,14 +930,18 @@ - * Now fill a complete buffer, or as much of one as the stream - * will give us if we are near the end. - */ -+ RELEASE_ARRAYS(env, data, src->next_input_byte); ++// Get the number of translations in the MLU object ++cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu) ++{ ++ if (mlu == NULL) return 0; ++ return mlu->UsedEntries; ++} + - GET_IO_REF(input); ++// Get the language and country codes for a specific MLU index ++cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu, ++ cmsUInt32Number idx, ++ char LanguageCode[3], ++ char CountryCode[3]) ++{ ++ _cmsMLUentry *entry; ++ ++ if (mlu == NULL) return FALSE; ++ ++ if (idx >= (cmsUInt32Number) mlu->UsedEntries) return FALSE; ++ ++ entry = &mlu->Entries[idx]; ++ ++ *(cmsUInt16Number *)LanguageCode = _cmsAdjustEndianess16(entry->Language); ++ *(cmsUInt16Number *)CountryCode = _cmsAdjustEndianess16(entry->Country); ++ ++ return TRUE; ++} ++ ++ + // Named color lists -------------------------------------------------------------------------------------------- + + // Grow the list to keep at least NumElements +@@ -517,9 +546,9 @@ + while (v -> Allocated < n) + GrowNamedColorList(v); + +- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix) - 1); +- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix) - 1); +- v->Prefix[sizeof(v ->Prefix) - 1] = v->Suffix[sizeof(v ->Suffix) - 1] = 0; ++ strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix)-1); ++ strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix)-1); ++ v->Prefix[32] = v->Suffix[32] = 0; + + v -> ColorantCount = ColorantCount; + +@@ -529,8 +558,9 @@ + // Free a list + void CMSEXPORT cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v) + { ++ if (v == NULL) return; + if (v ->List) _cmsFree(v ->ContextID, v ->List); +- if (v) _cmsFree(v ->ContextID, v); ++ _cmsFree(v ->ContextID, v); + } + + cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v) +@@ -576,11 +606,8 @@ + + if (Name != NULL) { + +- strncpy(NamedColorList ->List[NamedColorList ->nColors].Name, Name, +- sizeof(NamedColorList ->List[NamedColorList ->nColors].Name) - 1); +- +- NamedColorList ->List[NamedColorList ->nColors]. +- Name[sizeof(NamedColorList ->List[NamedColorList ->nColors].Name) - 1] = 0; ++ strncpy(NamedColorList ->List[NamedColorList ->nColors].Name, Name, cmsMAX_PATH-1); ++ NamedColorList ->List[NamedColorList ->nColors].Name[cmsMAX_PATH-1] = 0; -- RELEASE_ARRAYS(env, data, src->next_input_byte); - ret = (*env)->CallIntMethod(env, - input, - JPEGImageReader_readInputDataID, - sb->hstreamBuffer, 0, - sb->bufferLength); -+ if ((ret > 0) && ((unsigned int)ret > sb->bufferLength)) { -+ ret = sb->bufferLength; -+ } - if ((*env)->ExceptionOccurred(env) - || !GET_ARRAYS(env, data, &(src->next_input_byte))) { - cinfo->err->error_exit((j_common_ptr) cinfo); -@@ -1017,9 +1021,11 @@ - memcpy(sb->buf, src->next_input_byte, offset); } + else +@@ -891,7 +918,6 @@ + { + _cmsDICT* old_dict = (_cmsDICT*) hDict; + cmsHANDLE hNew; +- _cmsDICT* new_dict; + cmsDICTentry *entry; -- GET_IO_REF(input); + _cmsAssert(old_dict != NULL); +@@ -899,8 +925,6 @@ + hNew = cmsDictAlloc(old_dict ->ContextID); + if (hNew == NULL) return NULL; - RELEASE_ARRAYS(env, data, src->next_input_byte); -+ -+ GET_IO_REF(input); +- new_dict = (_cmsDICT*) hNew; +- + // Walk the list freeing all nodes + entry = old_dict ->head; + while (entry != NULL) { +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c 2014-04-19 01:27:12.000000000 -0700 +@@ -27,6 +27,7 @@ + // However, the following notice accompanied the original version of this + // file: + // + - buflen = sb->bufferLength - offset; - if (buflen <= 0) { - if (!GET_ARRAYS(env, data, &(src->next_input_byte))) { -@@ -1032,6 +1038,7 @@ - JPEGImageReader_readInputDataID, - sb->hstreamBuffer, - offset, buflen); -+ if ((ret > 0) && ((unsigned int)ret > buflen)) ret = buflen; - if ((*env)->ExceptionOccurred(env) - || !GET_ARRAYS(env, data, &(src->next_input_byte))) { - cinfo->err->error_exit((j_common_ptr) cinfo); -@@ -1121,9 +1128,10 @@ - return; + //--------------------------------------------------------------------------------- + // + // Little Color Management System +@@ -81,10 +82,6 @@ + int nInputs; + int nOutputs; + +- // Since there is no limitation of the output number of channels, this buffer holding the connexion CLUT-shaper +- // has to be dynamically allocated. This is not the case of first step shaper-CLUT, which is limited to max inputs +- cmsUInt16Number* StageDEF; +- + _cmsInterpFn16 EvalCurveIn16[MAX_INPUT_DIMENSIONS]; // The maximum number of input channels is known in advance + cmsInterpParams* ParamsCurveIn16[MAX_INPUT_DIMENSIONS]; + +@@ -202,8 +199,6 @@ + { + cmsBool AnyOpt = FALSE, Opt; + +- AnyOpt = FALSE; +- + do { + + Opt = FALSE; +@@ -253,6 +248,7 @@ + { + Prelin16Data* p16 = (Prelin16Data*) D; + cmsUInt16Number StageABC[MAX_INPUT_DIMENSIONS]; ++ cmsUInt16Number StageDEF[cmsMAXCHANNELS]; + int i; + + for (i=0; i < p16 ->nInputs; i++) { +@@ -260,11 +256,11 @@ + p16 ->EvalCurveIn16[i](&Input[i], &StageABC[i], p16 ->ParamsCurveIn16[i]); + } + +- p16 ->EvalCLUT(StageABC, p16 ->StageDEF, p16 ->CLUTparams); ++ p16 ->EvalCLUT(StageABC, StageDEF, p16 ->CLUTparams); + + for (i=0; i < p16 ->nOutputs; i++) { + +- p16 ->EvalCurveOut16[i](&p16->StageDEF[i], &Output[i], p16 ->ParamsCurveOut16[i]); ++ p16 ->EvalCurveOut16[i](&StageDEF[i], &Output[i], p16 ->ParamsCurveOut16[i]); } + } -+ RELEASE_ARRAYS(env, data, src->next_input_byte); -+ - GET_IO_REF(input); +@@ -274,7 +270,6 @@ + { + Prelin16Data* p16 = (Prelin16Data*) ptr; -- RELEASE_ARRAYS(env, data, src->next_input_byte); - ret = (*env)->CallLongMethod(env, - input, - JPEGImageReader_skipInputBytesID, -@@ -2306,10 +2314,10 @@ - JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); - jobject output = NULL; +- _cmsFree(ContextID, p16 ->StageDEF); + _cmsFree(ContextID, p16 ->EvalCurveOut16); + _cmsFree(ContextID, p16 ->ParamsCurveOut16); -- GET_IO_REF(output); -- - RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte)); +@@ -289,7 +284,6 @@ -+ GET_IO_REF(output); -+ - (*env)->CallVoidMethod(env, - output, - JPEGImageWriter_writeOutputDataID, -@@ -2348,10 +2356,10 @@ - if (datacount != 0) { - jobject output = NULL; + if (Duped == NULL) return NULL; -- GET_IO_REF(output); -- - RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte)); +- Duped ->StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number)); + Duped ->EvalCurveOut16 = _cmsDupMem(ContextID, p16 ->EvalCurveOut16, p16 ->nOutputs * sizeof(_cmsInterpFn16)); + Duped ->ParamsCurveOut16 = _cmsDupMem(ContextID, p16 ->ParamsCurveOut16, p16 ->nOutputs * sizeof(cmsInterpParams* )); -+ GET_IO_REF(output); -+ - (*env)->CallVoidMethod(env, - output, - JPEGImageWriter_writeOutputDataID, -@@ -2702,6 +2710,15 @@ - bandSize = (*env)->GetIntArrayElements(env, bandSizes, NULL); +@@ -328,7 +322,6 @@ + p16 ->EvalCLUT = ColorMap ->Interpolation.Lerp16; - for (i = 0; i < numBands; i++) { -+ if (bandSize[i] <= 0 || bandSize[i] > JPEG_BAND_SIZE) { -+ (*env)->ReleaseIntArrayElements(env, bandSizes, -+ bandSize, JNI_ABORT); -+ JNU_ThrowByName(env, "javax/imageio/IIOException", "Invalid Image"); -+ return JNI_FALSE;; -+ } -+ } -+ -+ for (i = 0; i < numBands; i++) { - if (bandSize[i] != JPEG_BAND_SIZE) { - if (scale == NULL) { - scale = (UINT8**) calloc(numBands, sizeof(UINT8*)); ---- jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c 2013-09-06 11:28:59.000000000 -0700 -+++ jdk/src/share/native/sun/awt/image/jpeg/jdmarker.c 2014-04-20 12:39:16.000000000 -0700 -@@ -349,6 +349,12 @@ - TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, - compptr->dc_tbl_no, compptr->ac_tbl_no); -+ -+ /* This CSi (cc) should differ from the previous CSi */ -+ for (ci = 0; ci < i; ci++) { -+ if (cinfo->cur_comp_info[ci] == compptr) -+ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); -+ } - } +- p16 -> StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number)); + p16 -> EvalCurveOut16 = (_cmsInterpFn16*) _cmsCalloc(ContextID, nOutputs, sizeof(_cmsInterpFn16)); + p16 -> ParamsCurveOut16 = (cmsInterpParams**) _cmsCalloc(ContextID, nOutputs, sizeof(cmsInterpParams* )); - /* Collect the additional scan parameters Ss, Se, Ah/Al. */ ---- jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2014-04-20 12:39:16.000000000 -0700 -@@ -289,6 +289,7 @@ - buflen = (*env)->GetArrayLength(env, src->hInputBuffer); - ret = (*env)->CallIntMethod(env, src->hInputStream, InputStream_readID, - src->hInputBuffer, 0, buflen); -+ if (ret > buflen) ret = buflen; - if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) { - cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); - } -@@ -349,6 +350,7 @@ - } - ret = (*env)->CallIntMethod(env, src->hInputStream, InputStream_readID, - src->hInputBuffer, offset, buflen); -+ if ((ret > 0) && ((unsigned int)ret > buflen)) ret = buflen; - if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) { - cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); +@@ -413,7 +406,7 @@ + int i, index; + + if (CLUT -> Type != cmsSigCLutElemType) { +- cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut MPE"); ++ cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut stage"); + return FALSE; } -@@ -424,6 +426,7 @@ - ret = (*env)->CallIntMethod(env, src->hInputStream, - InputStream_readID, - src->hInputBuffer, 0, buflen); -+ if (ret > buflen) ret = buflen; - if ((*env)->ExceptionOccurred(env)) { - cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); + +@@ -548,6 +541,10 @@ + for (i=0; i < nOuts; i++) { + + cmsToneCurve* InversePostLin = cmsReverseToneCurve(Curves[i]); ++ if (InversePostLin == NULL) { ++ WhiteOut[i] = 0; ++ continue; ++ } + WhiteOut[i] = cmsEvalToneCurve16(InversePostLin, WhitePointOut[i]); + cmsFreeToneCurve(InversePostLin); } ---- jdk/src/share/native/sun/awt/libpng/pngrtran.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/libpng/pngrtran.c 2014-04-20 12:39:16.000000000 -0700 -@@ -1862,6 +1862,9 @@ +@@ -575,8 +572,8 @@ + static + cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags) + { +- cmsPipeline* Src; +- cmsPipeline* Dest; ++ cmsPipeline* Src = NULL; ++ cmsPipeline* Dest = NULL; + cmsStage* mpe; + cmsStage* CLUT; + cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL; +@@ -589,7 +586,6 @@ + cmsToneCurve** DataSetOut; + Prelin16Data* p16; - info_ptr->bit_depth = 8; - info_ptr->num_trans = 0; -+ -+ if (png_ptr->palette == NULL) -+ png_error (png_ptr, "Palette is NULL in indexed image"); - } - else - { ---- jdk/src/share/native/sun/awt/libpng/pngset.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/libpng/pngset.c 2014-04-20 12:39:16.000000000 -0700 -@@ -512,6 +512,17 @@ - } - } +- + // This is a loosy optimization! does not apply in floating-point cases + if (_cmsFormatterIsFloat(*InputFormat) || _cmsFormatterIsFloat(*OutputFormat)) return FALSE; -+ if ((num_palette > 0 && palette == NULL) || -+ (num_palette == 0 -+# ifdef PNG_MNG_FEATURES_SUPPORTED -+ && (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 -+# endif -+ )) -+ { -+ png_error(png_ptr, "Invalid palette"); -+ return; -+ } -+ - /* It may not actually be necessary to set png_ptr->palette here; - * we do it for backward compatibility with the way the png_handle_tRNS - * function used to do the allocation. ---- jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c 2014-04-20 12:39:16.000000000 -0700 -@@ -228,6 +228,49 @@ - } - } +@@ -603,10 +599,10 @@ -+/* -+ * We have to make sure that awt_setPixels can be safely applied to the given pair of -+ * raster and mlib image. -+ * -+ * In particular, make sure that -+ * - dimension is the same -+ * - number of channels in mlib image corresponds to the number of bands in the raster -+ * - sample size in image and raster are the same. -+ * -+ * Returns: -+ * -1 to indicate failure, -+ * 1 to indicate success -+ */ -+static int setPixelsFormMlibImage(JNIEnv *env, RasterS_t *rasterP, mlib_image* img) { -+ if (rasterP->width != img->width || rasterP->height != img->height) { -+ /* dimension does not match */ -+ return -1; -+ } -+ -+ if (rasterP->numBands != img->channels) { -+ /* number of bands does not match */ -+ return -1; -+ } -+ -+ switch (rasterP->dataType) { -+ case BYTE_DATA_TYPE: -+ if (img->type != MLIB_BYTE) { -+ return -1; -+ } -+ break; -+ case SHORT_DATA_TYPE: -+ if (img->type != MLIB_SHORT && img->type != MLIB_USHORT) { -+ return -1; -+ } -+ break; -+ default: -+ /* awt_setPixels does not support such rasters */ -+ return -1; -+ } -+ -+ return awt_setPixels(env, rasterP, mlib_ImageGetData(img)); -+} -+ - /*************************************************************************** - * External Functions * - ***************************************************************************/ -@@ -700,21 +743,8 @@ + Src = *Lut; - /* Means that we couldn't write directly into the destination buffer */ - if (ddata == NULL) { -- unsigned char *bdataP; -- unsigned short *sdataP; -- -- /* Punt for now */ -- switch (dstRasterP->dataType) { -- case BYTE_DATA_TYPE: -- bdataP = (unsigned char *) mlib_ImageGetData(dst); -- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; -- break; -- case SHORT_DATA_TYPE: -- sdataP = (unsigned short *) mlib_ImageGetData(dst); -- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; -- break; -- default: -- retStatus = 0; -+ if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { -+ retStatus = setPixelsFormMlibImage(env, dstRasterP, dst); - } +- // Named color pipelines cannot be optimized either +- for (mpe = cmsPipelineGetPtrToFirstStage(Src); +- mpe != NULL; +- mpe = cmsStageNext(mpe)) { ++ // Named color pipelines cannot be optimized either ++ for (mpe = cmsPipelineGetPtrToFirstStage(Src); ++ mpe != NULL; ++ mpe = cmsStageNext(mpe)) { + if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE; } -@@ -1119,24 +1149,9 @@ +@@ -628,7 +624,8 @@ - /* Means that we couldn't write directly into the destination buffer */ - if (ddata == NULL) { -- unsigned char *bdataP; -- unsigned short *sdataP; -- - /* Need to store it back into the array */ - if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { -- /* Punt for now */ -- switch (dst->type) { -- case MLIB_BYTE: -- bdataP = (unsigned char *) mlib_ImageGetData(dst); -- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; -- break; -- case MLIB_SHORT: -- sdataP = (unsigned short *) mlib_ImageGetData(dst); -- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; -- break; -- default: -- retStatus = 0; -- } -+ retStatus = setPixelsFormMlibImage(env, dstRasterP, dst); - } - } + // All seems ok, proceed. + NewPreLin = cmsStageDup(PreLin); +- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, NewPreLin); ++ if(!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, NewPreLin)) ++ goto Error; -@@ -1462,6 +1477,14 @@ - retStatus = 0; - } + // Remove prelinearization. Since we have duplicated the curve + // in destination LUT, the sampling shoud be applied after this stage. +@@ -642,7 +639,9 @@ + if (CLUT == NULL) return FALSE; -+ /* Release the LUT */ -+ for (i=0; i < lut_nbands; i++) { -+ (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, -+ (jbyte *) jtable[i].table, JNI_ABORT); + // Add the CLUT to the destination LUT +- cmsPipelineInsertStage(Dest, cmsAT_END, CLUT); ++ if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) { ++ goto Error; + } -+ free ((void *) jtable); -+ free ((void *) tbl); -+ - /* - * Means that we couldn't write directly into - * the destination buffer -@@ -1475,13 +1498,6 @@ - } - } -- /* Release the LUT */ -- for (i=0; i < lut_nbands; i++) { -- (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, -- (jbyte *) jtable[i].table, JNI_ABORT); -- } -- free ((void *) jtable); -- free ((void *) tbl); + // Postlinearization tables are kept unless indicated by flags + if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) { +@@ -658,7 +657,8 @@ - /* Release the pinned memory */ - freeArray(env, srcImageP, src, sdata, dstImageP, dst, ddata); -@@ -1699,34 +1715,22 @@ - retStatus = 0; - } + // All seems ok, proceed. + NewPostLin = cmsStageDup(PostLin); +- cmsPipelineInsertStage(Dest, cmsAT_END, NewPostLin); ++ if (!cmsPipelineInsertStage(Dest, cmsAT_END, NewPostLin)) ++ goto Error; -+ /* Release the LUT */ -+ for (i=0; i < lut_nbands; i++) { -+ (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, -+ (jbyte *) jtable[i].table, JNI_ABORT); -+ } -+ - /* - * Means that we couldn't write directly into - * the destination buffer - */ - if (ddata == NULL) { -- unsigned char* bdataP; -- unsigned short* sdataP; + // In destination LUT, the sampling shoud be applied after this stage. + cmsPipelineUnlinkStage(Src, cmsAT_END, &KeepPostLin); +@@ -669,10 +669,18 @@ + // Now its time to do the sampling. We have to ignore pre/post linearization + // The source LUT whithout pre/post curves is passed as parameter. + if (!cmsStageSampleCLut16bit(CLUT, XFormSampler16, (void*) Src, 0)) { - -- switch (dstRasterP->dataType) { -- case BYTE_DATA_TYPE: -- bdataP = (unsigned char *) mlib_ImageGetData(dst); -- retStatus = (awt_setPixelByte(env, -1, dstRasterP, bdataP) >= 0) ; -- break; -- case SHORT_DATA_TYPE: -- sdataP = (unsigned short *) mlib_ImageGetData(dst); -- retStatus = (awt_setPixelShort(env, -1, dstRasterP, sdataP) >= 0) ; -- break; -- default: -- retStatus = 0; -+ if (storeRasterArray(env, srcRasterP, dstRasterP, dst) < 0) { -+ retStatus = setPixelsFormMlibImage(env, dstRasterP, dst); - } ++Error: + // Ops, something went wrong, Restore stages +- if (KeepPreLin != NULL) cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin); +- if (KeepPostLin != NULL) cmsPipelineInsertStage(Src, cmsAT_END, KeepPostLin); ++ if (KeepPreLin != NULL) { ++ if (!cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin)) { ++ _cmsAssert(0); // This never happens ++ } ++ } ++ if (KeepPostLin != NULL) { ++ if (!cmsPipelineInsertStage(Src, cmsAT_END, KeepPostLin)) { ++ _cmsAssert(0); // This never happens ++ } ++ } + cmsPipelineFree(Dest); + return FALSE; } +@@ -699,12 +707,11 @@ + else { -- /* Release the LUT */ -- for (i=0; i < lut_nbands; i++) { -- (*env)->ReleasePrimitiveArrayCritical(env, jtable[i].jArray, -- (jbyte *) jtable[i].table, JNI_ABORT); -- } + p16 = PrelinOpt16alloc(Dest ->ContextID, +- DataCLUT ->Params, +- Dest ->InputChannels, +- DataSetIn, +- Dest ->OutputChannels, +- DataSetOut); - - /* Release the pinned memory */ - freeDataArray(env, srcRasterP->jdata, src, sdata, - dstRasterP->jdata, dst, ddata); -@@ -2029,21 +2033,25 @@ - return 0; - } - -+#define NUM_LINES 10 -+ - static int - cvtCustomToDefault(JNIEnv *env, BufImageS_t *imageP, int component, - unsigned char *dataP) { -- ColorModelS_t *cmP = &imageP->cmodel; -- RasterS_t *rasterP = &imageP->raster; -+ const RasterS_t *rasterP = &imageP->raster; -+ const int w = rasterP->width; -+ const int h = rasterP->height; -+ - int y; -- jobject jpixels = NULL; -+ jintArray jpixels = NULL; - jint *pixels; - unsigned char *dP = dataP; --#define NUM_LINES 10 -- int numLines = NUM_LINES; -+ int numLines = h > NUM_LINES ? NUM_LINES : h; -+ - /* it is safe to calculate the scan length, because width has been verified - * on creation of the mlib image - */ -- int scanLength = rasterP->width * 4; -+ const int scanLength = w * 4; - - int nbytes = 0; - if (!SAFE_TO_MULT(numLines, scanLength)) { -@@ -2052,42 +2060,70 @@ ++ DataCLUT ->Params, ++ Dest ->InputChannels, ++ DataSetIn, ++ Dest ->OutputChannels, ++ DataSetOut); - nbytes = numLines * scanLength; + _cmsPipelineSetOptimizationParameters(Dest, PrelinEval16, (void*) p16, PrelinOpt16free, Prelin16dup); + } +@@ -1058,7 +1065,8 @@ + LutPlusCurves = cmsPipelineDup(OriginalLut); + if (LutPlusCurves == NULL) goto Error; -- for (y=0; y < rasterP->height; y+=numLines) { -- /* getData, one scanline at a time */ -- if (y+numLines > rasterP->height) { -- numLines = rasterP->height - y; -+ jpixels = (*env)->NewIntArray(env, nbytes); -+ if (JNU_IsNull(env, jpixels)) { -+ JNU_ThrowOutOfMemoryError(env, "Out of Memory"); -+ return -1; -+ } -+ -+ for (y = 0; y < h; y += numLines) { -+ if (y + numLines > h) { -+ numLines = h - y; - nbytes = numLines * scanLength; - } -- jpixels = (*env)->CallObjectMethod(env, imageP->jimage, -- g_BImgGetRGBMID, 0, y, -- rasterP->width, numLines, -- jpixels,0, rasterP->width); -- if (jpixels == NULL) { -- JNU_ThrowInternalError(env, "Can't retrieve pixels."); -+ -+ (*env)->CallObjectMethod(env, imageP->jimage, -+ g_BImgGetRGBMID, 0, y, -+ w, numLines, -+ jpixels, 0, w); -+ if ((*env)->ExceptionOccurred(env)) { -+ (*env)->DeleteLocalRef(env, jpixels); - return -1; - } +- cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, TransReverse)); ++ if (!cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, TransReverse))) ++ goto Error; - pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); -+ if (pixels == NULL) { -+ (*env)->DeleteLocalRef(env, jpixels); -+ return -1; -+ } -+ - memcpy(dP, pixels, nbytes); - dP += nbytes; -+ - (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, - JNI_ABORT); - } -+ -+ /* Need to release the array */ -+ (*env)->DeleteLocalRef(env, jpixels); -+ - return 0; - } + // Create the result LUT + OptimizedLUT = cmsPipelineAlloc(OriginalLut ->ContextID, OriginalLut ->InputChannels, OriginalLut ->OutputChannels); +@@ -1067,13 +1075,15 @@ + OptimizedPrelinMpe = cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, Trans); - static int - cvtDefaultToCustom(JNIEnv *env, BufImageS_t *imageP, int component, - unsigned char *dataP) { -- ColorModelS_t *cmP = &imageP->cmodel; -- RasterS_t *rasterP = &imageP->raster; -+ const RasterS_t *rasterP = &imageP->raster; -+ const int w = rasterP->width; -+ const int h = rasterP->height; -+ - int y; -+ jintArray jpixels = NULL; - jint *pixels; - unsigned char *dP = dataP; --#define NUM_LINES 10 -- int numLines = NUM_LINES; -- int nbytes = rasterP->width*4*NUM_LINES; -- jintArray jpixels; -+ int numLines = h > NUM_LINES ? NUM_LINES : h; -+ -+ /* it is safe to calculate the scan length, because width has been verified -+ * on creation of the mlib image -+ */ -+ const int scanLength = w * 4; -+ -+ int nbytes = 0; -+ if (!SAFE_TO_MULT(numLines, scanLength)) { -+ return -1; -+ } -+ -+ nbytes = numLines * scanLength; + // Create and insert the curves at the beginning +- cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe); ++ if (!cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe)) ++ goto Error; - jpixels = (*env)->NewIntArray(env, nbytes); - if (JNU_IsNull(env, jpixels)) { -@@ -2095,14 +2131,15 @@ - return -1; - } + // Allocate the CLUT for result + OptimizedCLUTmpe = cmsStageAllocCLut16bit(OriginalLut ->ContextID, nGridPoints, OriginalLut ->InputChannels, OriginalLut ->OutputChannels, NULL); -- for (y=0; y < rasterP->height; y+=NUM_LINES) { -- if (y+numLines > rasterP->height) { -- numLines = rasterP->height - y; -- nbytes = rasterP->width*4*numLines; -+ for (y = 0; y < h; y += numLines) { -+ if (y + numLines > h) { -+ numLines = h - y; -+ nbytes = numLines * scanLength; - } + // Add the CLUT to the destination LUT +- cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe); ++ if (!cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe)) ++ goto Error; + + // Resample the LUT + if (!cmsStageSampleCLut16bit(OptimizedCLUTmpe, XFormSampler16, (void*) LutPlusCurves, 0)) goto Error; +@@ -1201,13 +1211,14 @@ + for (i=0; i < nCurves; i++) { + + c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number)); + - pixels = (*env)->GetPrimitiveArrayCritical(env, jpixels, NULL); - if (pixels == NULL) { -- /* JNI error */ -+ (*env)->DeleteLocalRef(env, jpixels); - return -1; + if (c16->Curves[i] == NULL) { ++ + for (j=0; j < i; j++) { + _cmsFree(ContextID, c16->Curves[j]); + } + _cmsFree(ContextID, c16->Curves); + _cmsFree(ContextID, c16); +- + return NULL; } -@@ -2111,12 +2148,11 @@ +@@ -1336,7 +1347,8 @@ + // Maybe the curves are linear at the end + if (!AllCurvesAreLinear(ObtainedCurves)) { - (*env)->ReleasePrimitiveArrayCritical(env, jpixels, pixels, 0); +- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, ObtainedCurves); ++ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, ObtainedCurves)) ++ goto Error; -- /* setData, one scanline at a time */ -- /* Fix 4223648, 4184283 */ - (*env)->CallVoidMethod(env, imageP->jimage, g_BImgSetRGBMID, 0, y, -- rasterP->width, numLines, jpixels, 0, -- rasterP->width); -+ w, numLines, jpixels, -+ 0, w); - if ((*env)->ExceptionOccurred(env)) { -+ (*env)->DeleteLocalRef(env, jpixels); - return -1; - } - } -@@ -2298,7 +2334,6 @@ - mlib_image **mlibImagePP, void **dataPP, int isSrc) { - void *dataP; - unsigned char *cDataP; -- unsigned short *sdataP; - int dataType = BYTE_DATA_TYPE; - int width; - int height; -@@ -2484,8 +2519,7 @@ - return -1; - } - if (isSrc) { -- cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); -- if (awt_getPixelByte(env, -1, rasterP, cDataP) < 0) { -+ if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) { - (*sMlibSysFns.deleteImageFP)(*mlibImagePP); - return -1; - } -@@ -2499,8 +2533,7 @@ - return -1; + // If the curves are to be applied in 8 bits, we can save memory + if (_cmsFormatterIs8bit(*InputFormat)) { +@@ -1344,6 +1356,7 @@ + _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) ObtainedCurves ->Data; + Curves16Data* c16 = CurvesAlloc(Dest ->ContextID, Data ->nCurves, 256, Data ->TheCurves); + ++ if (c16 == NULL) goto Error; + *dwFlags |= cmsFLAGS_NOCACHE; + _cmsPipelineSetOptimizationParameters(Dest, FastEvaluateCurves8, c16, CurvesFree, CurvesDup); + +@@ -1353,6 +1366,7 @@ + _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) cmsStageData(ObtainedCurves); + Curves16Data* c16 = CurvesAlloc(Dest ->ContextID, Data ->nCurves, 65536, Data ->TheCurves); + ++ if (c16 == NULL) goto Error; + *dwFlags |= cmsFLAGS_NOCACHE; + _cmsPipelineSetOptimizationParameters(Dest, FastEvaluateCurves16, c16, CurvesFree, CurvesDup); } - if (isSrc) { -- sdataP = (unsigned short *) mlib_ImageGetData(*mlibImagePP); -- if (awt_getPixelShort(env, -1, rasterP, sdataP) < 0) { -+ if (awt_getPixels(env, rasterP, mlib_ImageGetData(*mlibImagePP)) < 0) { - (*sMlibSysFns.deleteImageFP)(*mlibImagePP); - return -1; - } -@@ -2550,60 +2583,6 @@ - } +@@ -1362,7 +1376,8 @@ + // LUT optimizes to nothing. Set the identity LUT + cmsStageFree(ObtainedCurves); + +- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageAllocIdentity(Dest ->ContextID, Src ->InputChannels)); ++ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageAllocIdentity(Dest ->ContextID, Src ->InputChannels))) ++ goto Error; + + *dwFlags |= cmsFLAGS_NOCACHE; + _cmsPipelineSetOptimizationParameters(Dest, FastIdentity16, (void*) Dest, NULL, NULL); +@@ -1592,10 +1607,14 @@ + if (!Dest) return FALSE; + + // Assamble the new LUT +- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1)); ++ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1))) ++ goto Error; ++ + if (!IdentityMat) +- cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageAllocMatrix(Dest ->ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset)); +- cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2)); ++ if (!cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageAllocMatrix(Dest ->ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset))) ++ goto Error; ++ if (!cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2))) ++ goto Error; + + // If identity on matrix, we can further optimize the curves, so call the join curves routine + if (IdentityMat) { +@@ -1617,6 +1636,10 @@ + cmsPipelineFree(Src); + *Lut = Dest; + return TRUE; ++Error: ++ // Leave Src unchanged ++ cmsPipelineFree(Dest); ++ return FALSE; } --static int --storeDstArray(JNIEnv *env, BufImageS_t *srcP, BufImageS_t *dstP, -- mlibHintS_t *hintP, mlib_image *mlibImP, void *ddata) { -- RasterS_t *rasterP = &dstP->raster; -- -- /* Nothing to do since it is the same image type */ -- if (srcP->imageType == dstP->imageType -- && srcP->imageType != java_awt_image_BufferedImage_TYPE_CUSTOM -- && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_INDEXED -- && srcP->imageType != java_awt_image_BufferedImage_TYPE_BYTE_BINARY) { -- /* REMIND: Should check the ICM LUTS to see if it is the same */ -- return 0; -- } -- -- /* These types are compatible with TYPE_INT_RGB */ -- if (srcP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB -- && (dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB || -- dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE)){ -- return 0; -- } -- -- if (hintP->cvtSrcToDefault && -- (srcP->cmodel.isAlphaPre == dstP->cmodel.isAlphaPre)) { -- if (srcP->cmodel.isAlphaPre) { -- if (dstP->imageType == -- java_awt_image_BufferedImage_TYPE_INT_ARGB_PRE) -- { -- return 0; -- } -- if (!srcP->cmodel.supportsAlpha && -- dstP->imageType == java_awt_image_BufferedImage_TYPE_INT_RGB){ -- return 0; -- } -- } -- else { -- /* REMIND: */ -- } -- } -- -- if (dstP->cmodel.cmType == DIRECT_CM_TYPE) { -- /* Just need to move bits */ -- if (mlibImP->type == MLIB_BYTE) { -- return awt_setPixelByte(env, -1, &dstP->raster, -- (unsigned char *) mlibImP->data); -- } -- else if (mlibImP->type == MLIB_SHORT) { -- return awt_setPixelByte(env, -1, &dstP->raster, -- (unsigned char *) mlibImP->data); -- } -- } -- -- return 0; --} -- - #define ERR_BAD_IMAGE_LAYOUT (-2) - #define CHECK_DST_ARRAY(start_offset, elements_per_scan, elements_per_pixel) \ -@@ -2709,8 +2688,7 @@ - } - } - else if (mlibImP->type == MLIB_SHORT) { -- return awt_setPixelShort(env, -1, rasterP, -- (unsigned short *) mlibImP->data); -+ return setPixelsFormMlibImage(env, rasterP, mlibImP); - } - } - else { ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2014-04-20 12:39:16.000000000 -0700 -@@ -86,7 +86,7 @@ - #endif /* MLIB_USE_FTOI_CLAMPING */ +@@ -1646,7 +1669,7 @@ + static _cmsOptimizationCollection* OptimizationCollection = DefaultOptimization; - /***************************************************************/ --#if defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) -+#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) + // Register new ways to optimize +-cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterOptimizationPlugin(cmsContext id, cmsPluginBase* Data) + { + cmsPluginOptimization* Plugin = (cmsPluginOptimization*) Data; + _cmsOptimizationCollection* fl; +@@ -1660,7 +1683,7 @@ + // Optimizer callback is required + if (Plugin ->OptimizePtr == NULL) return FALSE; - /* NB: Explicit cast to DTYPE is necessary to avoid warning from Microsoft VC compiler. - And we need to explicitly define cast behavior if source exceeds destination range. -@@ -103,7 +103,7 @@ - dp[0 ] = (DTYPE) ((res0) & DTYPE_MASK); \ - dp[chan1] = (DTYPE) ((res1) & DTYPE_MASK) +- fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(sizeof(_cmsOptimizationCollection)); ++ fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(id, sizeof(_cmsOptimizationCollection)); + if (fl == NULL) return FALSE; --#endif /* defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */ -+#endif /* (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */ + // Copy the parameters +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmspack.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmspack.c 2014-04-19 01:27:12.000000000 -0700 +@@ -317,6 +317,23 @@ + } - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -114,17 +114,17 @@ + static ++cmsUInt8Number* Unroll3BytesSkip1SwapSwapFirst(register _cmsTRANSFORM* info, ++ register cmsUInt16Number wIn[], ++ register cmsUInt8Number* accum, ++ register cmsUInt32Number Stride) ++{ ++ wIn[2] = FROM_8_TO_16(*accum); accum++; // B ++ wIn[1] = FROM_8_TO_16(*accum); accum++; // G ++ wIn[0] = FROM_8_TO_16(*accum); accum++; // R ++ accum++; // A ++ ++ return accum; ++ ++ cmsUNUSED_PARAMETER(info); ++ cmsUNUSED_PARAMETER(Stride); ++} ++ ++static + cmsUInt8Number* Unroll3BytesSkip1SwapFirst(register _cmsTRANSFORM* info, + register cmsUInt16Number wIn[], + register cmsUInt8Number* accum, +@@ -2901,6 +2918,9 @@ + { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1), ANYSPACE, Unroll3BytesSkip1Swap}, + { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|SWAPFIRST_SH(1), ANYSPACE, Unroll3BytesSkip1SwapFirst}, - #else /* _NO_LONGLONG */ ++ { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1), ++ ANYSPACE, Unroll3BytesSkip1SwapSwapFirst}, ++ + { CHANNELS_SH(4)|BYTES_SH(1), ANYSPACE, Unroll4Bytes}, + { CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1), ANYSPACE, Unroll4BytesReverse}, + { CHANNELS_SH(4)|BYTES_SH(1)|SWAPFIRST_SH(1), ANYSPACE, Unroll4BytesSwapFirst}, +@@ -3166,7 +3186,7 @@ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | ((mlib_s64)sp[0] & 0xffffffff) + // Formatters management +-cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterFormattersPlugin(cmsContext id, cmsPluginBase* Data) + { + cmsPluginFormatters* Plugin = (cmsPluginFormatters*) Data; + cmsFormattersFactoryList* fl ; +@@ -3178,7 +3198,7 @@ + return TRUE; + } --#else /* _LITTLE_ENDIAN */ -+#else +- fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(sizeof(cmsFormattersFactoryList)); ++ fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(id, sizeof(cmsFormattersFactoryList)); + if (fl == NULL) return FALSE; - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | ((mlib_s64)sp[chan1] & 0xffffffff) + fl ->Factory = Plugin ->FormattersFactory; +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmspcs.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmspcs.c 2014-04-19 01:27:12.000000000 -0700 +@@ -898,9 +898,11 @@ + { + switch (ColorSpace) { --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ ++ case cmsSigMCH1Data: + case cmsSig1colorData: + case cmsSigGrayData: return 1; - #endif /* _NO_LONGLONG */ ++ case cmsSigMCH2Data: + case cmsSig2colorData: return 2; ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2014-04-20 12:39:16.000000000 -0700 -@@ -126,7 +126,7 @@ - #define D2I(x) CLAMP_S32((x) SAT_OFF) + case cmsSigXYZData: +@@ -912,10 +914,12 @@ + case cmsSigHsvData: + case cmsSigHlsData: + case cmsSigCmyData: ++ case cmsSigMCH3Data: + case cmsSig3colorData: return 3; - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + case cmsSigLuvKData: + case cmsSigCmykData: ++ case cmsSigMCH4Data: + case cmsSig4colorData: return 4; - #define STORE2(res0, res1) \ - dp[0 ] = res1; \ -@@ -138,7 +138,7 @@ - dp[0 ] = res0; \ - dp[chan1] = res1 + case cmsSigMCH5Data: +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsplugin.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsplugin.c 2014-04-19 01:27:12.000000000 -0700 +@@ -125,10 +125,14 @@ + pOut[0] = pIn[7]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + #else +- + _cmsAssert(Result != NULL); - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -149,17 +149,17 @@ ++# ifdef CMS_DONT_USE_INT64 ++ (*Result)[0] = QWord[0]; ++ (*Result)[1] = QWord[1]; ++# else + *Result = *QWord; ++# endif + #endif + } - #else /* _NO_LONGLONG */ +@@ -543,10 +547,10 @@ + static _cmsSubAllocator* PluginPool = NULL; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + // Specialized malloc for plug-ins, that is freed upon exit. +-void* _cmsPluginMalloc(cmsUInt32Number size) ++void* _cmsPluginMalloc(cmsContext id, cmsUInt32Number size) + { + if (PluginPool == NULL) +- PluginPool = _cmsCreateSubAlloc(0, 4*1024); ++ PluginPool = _cmsCreateSubAlloc(id, 4*1024); - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + return _cmsSubAlloc(PluginPool, size); + } +@@ -555,6 +559,11 @@ + // Main plug-in dispatcher + cmsBool CMSEXPORT cmsPlugin(void* Plug_in) + { ++ return cmsPluginTHR(NULL, Plug_in); ++} ++ ++cmsBool CMSEXPORT cmsPluginTHR(cmsContext id, void* Plug_in) ++{ + cmsPluginBase* Plugin; --#else /* _LITTLE_ENDIAN */ -+#else + for (Plugin = (cmsPluginBase*) Plug_in; +@@ -583,35 +592,35 @@ + break; - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) + case cmsPluginTagTypeSig: +- if (!_cmsRegisterTagTypePlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterTagTypePlugin(id, Plugin)) return FALSE; + break; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #endif /* _NO_LONGLONG */ + case cmsPluginTagSig: +- if (!_cmsRegisterTagPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterTagPlugin(id, Plugin)) return FALSE; + break; - /***************************************************************/ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2014-04-20 12:39:16.000000000 -0700 -@@ -94,7 +94,7 @@ - #define D2I(x) CLAMP_S32((x) SAT_OFF) + case cmsPluginFormattersSig: +- if (!_cmsRegisterFormattersPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterFormattersPlugin(id, Plugin)) return FALSE; + break; - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + case cmsPluginRenderingIntentSig: +- if (!_cmsRegisterRenderingIntentPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterRenderingIntentPlugin(id, Plugin)) return FALSE; + break; - #define STORE2(res0, res1) \ - dp[0 ] = res1; \ -@@ -106,7 +106,7 @@ - dp[0 ] = res0; \ - dp[chan1] = res1 + case cmsPluginParametricCurveSig: +- if (!_cmsRegisterParametricCurvesPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterParametricCurvesPlugin(id, Plugin)) return FALSE; + break; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + case cmsPluginMultiProcessElementSig: +- if (!_cmsRegisterMultiProcessElementPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterMultiProcessElementPlugin(id, Plugin)) return FALSE; + break; - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -117,17 +117,17 @@ + case cmsPluginOptimizationSig: +- if (!_cmsRegisterOptimizationPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterOptimizationPlugin(id, Plugin)) return FALSE; + break; - #else /* _NO_LONGLONG */ + case cmsPluginTransformSig: +- if (!_cmsRegisterTransformPlugin(Plugin)) return FALSE; ++ if (!_cmsRegisterTransformPlugin(id, Plugin)) return FALSE; + break; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + default: +@@ -630,14 +639,14 @@ + { + _cmsRegisterMemHandlerPlugin(NULL); + _cmsRegisterInterpPlugin(NULL); +- _cmsRegisterTagTypePlugin(NULL); +- _cmsRegisterTagPlugin(NULL); +- _cmsRegisterFormattersPlugin(NULL); +- _cmsRegisterRenderingIntentPlugin(NULL); +- _cmsRegisterParametricCurvesPlugin(NULL); +- _cmsRegisterMultiProcessElementPlugin(NULL); +- _cmsRegisterOptimizationPlugin(NULL); +- _cmsRegisterTransformPlugin(NULL); ++ _cmsRegisterTagTypePlugin(NULL, NULL); ++ _cmsRegisterTagPlugin(NULL, NULL); ++ _cmsRegisterFormattersPlugin(NULL, NULL); ++ _cmsRegisterRenderingIntentPlugin(NULL, NULL); ++ _cmsRegisterParametricCurvesPlugin(NULL, NULL); ++ _cmsRegisterMultiProcessElementPlugin(NULL, NULL); ++ _cmsRegisterOptimizationPlugin(NULL, NULL); ++ _cmsRegisterTransformPlugin(NULL, NULL); - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + if (PluginPool != NULL) + _cmsSubAllocDestroy(PluginPool); +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsps2.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsps2.c 2014-04-19 01:27:12.000000000 -0700 +@@ -806,7 +806,6 @@ --#else /* _LITTLE_ENDIAN */ -+#else + mpe = Pipeline ->Elements; - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) +- + switch (cmsStageInputChannels(mpe)) { + case 3: --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #endif /* _NO_LONGLONG */ +@@ -838,8 +837,6 @@ + mpe = mpe ->Next; + } - /***************************************************************/ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2014-04-20 12:39:16.000000000 -0700 -@@ -126,7 +126,7 @@ - #define D2I(x) CLAMP_S32((x) SAT_OFF) +- +- + if (cmsStageType(mpe) == cmsSigCLutElemType) { - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + _cmsIOPrintf(m, "/Table "); +@@ -854,7 +851,6 @@ + _cmsIOPrintf(m, " >>\n"); + _cmsIOPrintf(m, "]\n"); - #define STORE2(res0, res1) \ - dp[0 ] = res1; \ -@@ -138,7 +138,7 @@ - dp[0 ] = res0; \ - dp[chan1] = res1 +- + return 1; + } --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +@@ -950,6 +946,7 @@ + + rc = EmitCIEBasedDEF(m, DeviceLink, Intent, &BlackPointAdaptedToD50); + cmsPipelineFree(DeviceLink); ++ if (rc == 0) return 0; + } + break; + +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmssamp.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmssamp.c 2014-04-19 01:27:12.000000000 -0700 +@@ -56,6 +56,8 @@ + #include "lcms2_internal.h" + + ++#define cmsmin(a, b) (((a) < (b)) ? (a) : (b)) ++#define cmsmax(a, b) (((a) > (b)) ? (a) : (b)) - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -149,17 +149,17 @@ + // This file contains routines for resampling and LUT optimization, black point detection + // and black preservation. +@@ -67,13 +69,13 @@ + static + cmsHTRANSFORM CreateRoundtripXForm(cmsHPROFILE hProfile, cmsUInt32Number nIntent) + { +- cmsHPROFILE hLab = cmsCreateLab4Profile(NULL); ++ cmsContext ContextID = cmsGetProfileContextID(hProfile); ++ cmsHPROFILE hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); + cmsHTRANSFORM xform; + cmsBool BPC[4] = { FALSE, FALSE, FALSE, FALSE }; + cmsFloat64Number States[4] = { 1.0, 1.0, 1.0, 1.0 }; + cmsHPROFILE hProfiles[4]; + cmsUInt32Number Intents[4]; +- cmsContext ContextID = cmsGetProfileContextID(hProfile); - #else /* _NO_LONGLONG */ + hProfiles[0] = hLab; hProfiles[1] = hProfile; hProfiles[2] = hProfile; hProfiles[3] = hLab; + Intents[0] = INTENT_RELATIVE_COLORIMETRIC; Intents[1] = nIntent; Intents[2] = INTENT_RELATIVE_COLORIMETRIC; Intents[3] = INTENT_RELATIVE_COLORIMETRIC; +@@ -141,8 +143,8 @@ + cmsCloseProfile(hLab); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + if (xform == NULL) { +- // Something went wrong. Get rid of open resources and return zero as black - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) ++ // Something went wrong. Get rid of open resources and return zero as black + BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; + return FALSE; + } +@@ -173,7 +175,6 @@ + // Lab (0, 0, 0) -> [Perceptual] Profile -> CMYK -> [Rel. colorimetric] Profile -> Lab + static + cmsBool BlackPointUsingPerceptualBlack(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile) +- + { + cmsHTRANSFORM hRoundTrip; + cmsCIELab LabIn, LabOut; +@@ -218,17 +219,27 @@ + // involves to turn BP to neutral and to use only L component. + cmsBool CMSEXPORT cmsDetectBlackPoint(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags) + { ++ cmsProfileClassSignature devClass; --#else /* _LITTLE_ENDIAN */ -+#else +- // Zero for black point +- if (cmsGetDeviceClass(hProfile) == cmsSigLinkClass) { ++ // Make sure the device class is adequate ++ devClass = cmsGetDeviceClass(hProfile); ++ if (devClass == cmsSigLinkClass || ++ devClass == cmsSigAbstractClass || ++ devClass == cmsSigNamedColorClass) { ++ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; ++ return FALSE; ++ } - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) +- BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; +- return FALSE; ++ // Make sure intent is adequate ++ if (Intent != INTENT_PERCEPTUAL && ++ Intent != INTENT_RELATIVE_COLORIMETRIC && ++ Intent != INTENT_SATURATION) { ++ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; ++ return FALSE; + } --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #endif /* _NO_LONGLONG */ + // v4 + perceptual & saturation intents does have its own black point, and it is + // well specified enough to use it. Black point tag is deprecated in V4. +- + if ((cmsGetEncodedICCversion(hProfile) >= 0x4000000) && + (Intent == INTENT_PERCEPTUAL || Intent == INTENT_SATURATION)) { - /***************************************************************/ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2014-04-20 12:39:16.000000000 -0700 -@@ -95,7 +95,7 @@ - #define D2I(x) CLAMP_S32((x) SAT_OFF) +@@ -303,7 +314,7 @@ + { + double sum_x = 0, sum_x2 = 0, sum_x3 = 0, sum_x4 = 0; + double sum_y = 0, sum_yx = 0, sum_yx2 = 0; +- double disc; ++ double d, a, b, c; + int i; + cmsMAT3 m; + cmsVEC3 v, res; +@@ -333,14 +344,32 @@ - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + if (!_cmsMAT3solve(&res, &m, &v)) return 0; - #define STORE2(res0, res1) \ - dp[0 ] = res1; \ -@@ -107,7 +107,7 @@ - dp[0 ] = res0; \ - dp[chan1] = res1 +- // y = t x2 + u x + c +- // x = ( - u + Sqrt( u^2 - 4 t c ) ) / ( 2 t ) +- disc = res.n[1]*res.n[1] - 4.0 * res.n[0] * res.n[2]; +- if (disc < 0) return -1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +- return ( -1.0 * res.n[1] + sqrt( disc )) / (2.0 * res.n[0]); ++ a = res.n[2]; ++ b = res.n[1]; ++ c = res.n[0]; ++ ++ if (fabs(a) < 1.0E-10) { ++ ++ return cmsmin(0, cmsmax(50, -c/b )); ++ } ++ else { ++ ++ d = b*b - 4.0 * a * c; ++ if (d <= 0) { ++ return 0; ++ } ++ else { ++ ++ double rt = (-b + sqrt(d)) / (2.0 * a); ++ ++ return cmsmax(0, cmsmin(50, rt)); ++ } ++ } ++ + } - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -118,17 +118,17 @@ ++/* + static + cmsBool IsMonotonic(int n, const cmsFloat64Number Table[]) + { +@@ -361,6 +390,7 @@ - #else /* _NO_LONGLONG */ + return TRUE; + } ++*/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + // Calculates the black point of a destination profile. + // This algorithm comes from the Adobe paper disclosing its black point compensation method. +@@ -369,21 +399,30 @@ + cmsColorSpaceSignature ColorSpace; + cmsHTRANSFORM hRoundTrip = NULL; + cmsCIELab InitialLab, destLab, Lab; +- ++ cmsFloat64Number inRamp[256], outRamp[256]; + cmsFloat64Number MinL, MaxL; +- cmsBool NearlyStraightMidRange = FALSE; +- cmsFloat64Number L; +- cmsFloat64Number x[101], y[101]; +- cmsFloat64Number lo, hi, NonMonoMin; +- int n, l, i, NonMonoIndx; +- ++ cmsBool NearlyStraightMidrange = TRUE; ++ cmsFloat64Number yRamp[256]; ++ cmsFloat64Number x[256], y[256]; ++ cmsFloat64Number lo, hi; ++ int n, l; ++ cmsProfileClassSignature devClass; ++ ++ // Make sure the device class is adequate ++ devClass = cmsGetDeviceClass(hProfile); ++ if (devClass == cmsSigLinkClass || ++ devClass == cmsSigAbstractClass || ++ devClass == cmsSigNamedColorClass) { ++ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; ++ return FALSE; ++ } - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + // Make sure intent is adequate + if (Intent != INTENT_PERCEPTUAL && + Intent != INTENT_RELATIVE_COLORIMETRIC && + Intent != INTENT_SATURATION) { +- BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; +- return FALSE; ++ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; ++ return FALSE; + } --#else /* _LITTLE_ENDIAN */ -+#else - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) +@@ -415,10 +454,8 @@ + return cmsDetectBlackPoint(BlackPoint, hProfile, Intent, dwFlags); + } --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #endif /* _NO_LONGLONG */ +- // It is one of the valid cases!, presto chargo hocus pocus, go for the Adobe magic ++ // It is one of the valid cases!, use Adobe algorithm - /***************************************************************/ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2014-04-20 12:39:16.000000000 -0700 -@@ -126,7 +126,7 @@ - #define D2I(x) CLAMP_S32((x) SAT_OFF) +- // Step 1 +- // ====== - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) + // Set a first guess, that should work on good profiles. + if (Intent == INTENT_RELATIVE_COLORIMETRIC) { +@@ -449,71 +486,68 @@ + hRoundTrip = CreateRoundtripXForm(hProfile, Intent); + if (hRoundTrip == NULL) return FALSE; - #define STORE2(res0, res1) \ - dp[0 ] = res1; \ -@@ -138,7 +138,7 @@ - dp[0 ] = res0; \ - dp[chan1] = res1 +- // Calculate Min L* +- Lab = InitialLab; +- Lab.L = 0; +- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); +- MinL = destLab.L; +- +- // Calculate Max L* +- Lab = InitialLab; +- Lab.L = 100; +- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); +- MaxL = destLab.L; ++ // Compute ramps --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +- // Step 3 +- // ====== ++ for (l=0; l < 256; l++) { - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -149,17 +149,17 @@ +- // check if quadratic estimation needs to be done. +- if (Intent == INTENT_RELATIVE_COLORIMETRIC) { ++ Lab.L = (cmsFloat64Number) (l * 100.0) / 255.0; ++ Lab.a = cmsmin(50, cmsmax(-50, InitialLab.a)); ++ Lab.b = cmsmin(50, cmsmax(-50, InitialLab.b)); - #else /* _NO_LONGLONG */ +- // Conceptually, this code tests how close the source l and converted L are to one another in the mid-range +- // of the values. If the converted ramp of L values is close enough to a straight line y=x, then InitialLab +- // is good enough to be the DestinationBlackPoint, +- NearlyStraightMidRange = TRUE; ++ cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); ++ ++ inRamp[l] = Lab.L; ++ outRamp[l] = destLab.L; ++ } ++ ++ // Make monotonic ++ for (l = 254; l > 0; --l) { ++ outRamp[l] = cmsmin(outRamp[l], outRamp[l+1]); ++ } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) +- for (l=0; l <= 100; l++) { ++ // Check ++ if (! (outRamp[0] < outRamp[255])) { - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) +- Lab.L = l; +- Lab.a = InitialLab.a; +- Lab.b = InitialLab.b; ++ cmsDeleteTransform(hRoundTrip); ++ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; ++ return FALSE; ++ } --#else /* _LITTLE_ENDIAN */ -+#else +- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) +- L = destLab.L; ++ // Test for mid range straight (only on relative colorimetric) --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #endif /* _NO_LONGLONG */ +- // Check the mid range in 20% after MinL +- if (L > (MinL + 0.2 * (MaxL - MinL))) { ++ NearlyStraightMidrange = TRUE; ++ MinL = outRamp[0]; MaxL = outRamp[255]; ++ if (Intent == INTENT_RELATIVE_COLORIMETRIC) { - /***************************************************************/ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2014-04-20 12:39:16.000000000 -0700 -@@ -94,7 +94,7 @@ - #define D2I(x) CLAMP_S32((x) SAT_OFF) +- // Is close enough? +- if (fabs(L - l) > 4.0) { ++ for (l=0; l < 256; l++) { - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) +- // Too far away, profile is buggy! +- NearlyStraightMidRange = FALSE; +- break; +- } +- } ++ if (! ((inRamp[l] <= MinL + 0.2 * (MaxL - MinL) ) || ++ (fabs(inRamp[l] - outRamp[l]) < 4.0 ))) ++ NearlyStraightMidrange = FALSE; + } +- } +- else { +- // Check is always performed for perceptual and saturation intents +- NearlyStraightMidRange = FALSE; +- } - #define STORE2(res0, res1) \ - dp[0 ] = res1; \ -@@ -106,7 +106,7 @@ - dp[0 ] = res0; \ - dp[chan1] = res1 ++ // If the mid range is straight (as determined above) then the ++ // DestinationBlackPoint shall be the same as initialLab. ++ // Otherwise, the DestinationBlackPoint shall be determined ++ // using curve fitting. --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +- // If no furter checking is needed, we are done +- if (NearlyStraightMidRange) { ++ if (NearlyStraightMidrange) { - /***************************************************************/ - #ifdef _NO_LONGLONG -@@ -117,17 +117,17 @@ +- cmsLab2XYZ(NULL, BlackPoint, &InitialLab); +- cmsDeleteTransform(hRoundTrip); +- return TRUE; ++ cmsLab2XYZ(NULL, BlackPoint, &InitialLab); ++ cmsDeleteTransform(hRoundTrip); ++ return TRUE; ++ } + } - #else /* _NO_LONGLONG */ +- // The round-trip curve normally looks like a nearly constant section at the black point, ++ ++ // curve fitting: The round-trip curve normally looks like a nearly constant section at the black point, + // with a corner and a nearly straight line to the white point. --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) +- // STEP 4 +- // ======= ++ for (l=0; l < 256; l++) { ++ ++ yRamp[l] = (outRamp[l] - MinL) / (MaxL - MinL); ++ } - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0]) + // find the black point using the least squares error quadratic curve fitting --#else /* _LITTLE_ENDIAN */ -+#else +@@ -528,62 +562,32 @@ + hi = 0.25; + } - #define LOAD_BUFF(buff) \ - *(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1]) +- // Capture points for the fitting. ++ // Capture shadow points for the fitting. + n = 0; +- for (l=0; l <= 100; l++) { +- +- cmsFloat64Number ff; +- +- Lab.L = (cmsFloat64Number) l; +- Lab.a = InitialLab.a; +- Lab.b = InitialLab.b; ++ for (l=0; l < 256; l++) { --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #endif /* _NO_LONGLONG */ +- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); +- +- ff = (destLab.L - MinL)/(MaxL - MinL); ++ cmsFloat64Number ff = yRamp[l]; - /***************************************************************/ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2014-04-20 12:39:16.000000000 -0700 -@@ -95,7 +95,7 @@ - dst = dp[0]; - if (ld_offset + size < 32) { - dmask = (mask0 << (32 - size)) >> ld_offset; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src = (src0 >> (ld_offset - ls_offset)); - dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); -@@ -104,12 +104,12 @@ - #else - src = (src0 >> (ld_offset - ls_offset)); - dp[0] = (dst & (~dmask)) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - return; + if (ff >= lo && ff < hi) { +- +- x[n] = Lab.L; +- y[n] = ff; ++ x[n] = inRamp[l]; ++ y[n] = yRamp[l]; + n++; + } +- } - dmask = mask0 >> ld_offset; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src = (src0 >> (ld_offset - ls_offset)); - dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); -@@ -118,7 +118,7 @@ - #else - src = (src0 >> (ld_offset - ls_offset)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - j = 32 - ld_offset; - dp++; - ls_offset += j; -@@ -131,7 +131,7 @@ +- // This part is not on the Adobe paper, but I found is necessary for getting any result. +- +- if (IsMonotonic(n, y)) { +- +- // Monotonic means lower point is stil valid +- cmsLab2XYZ(NULL, BlackPoint, &InitialLab); +- cmsDeleteTransform(hRoundTrip); +- return TRUE; +- } - if (ld_offset + size < 32) { - dmask = (mask0 << (32 - size)) >> ld_offset; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 << shift) | (src1 >> (32 - shift)); -@@ -141,12 +141,12 @@ - #else - src = (src0 << shift) | (src1 >> (32 - shift)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - return; +- // No suitable points, regret and use safer algorithm +- if (n == 0) { ++ // No suitable points ++ if (n < 3 ) { + cmsDeleteTransform(hRoundTrip); +- return cmsDetectBlackPoint(BlackPoint, hProfile, Intent, dwFlags); +- } +- +- +- NonMonoMin = 100; +- NonMonoIndx = 0; +- for (i=0; i < n; i++) { +- +- if (y[i] < NonMonoMin) { +- NonMonoIndx = i; +- NonMonoMin = y[i]; +- } ++ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; ++ return FALSE; } - dmask = mask0 >> ld_offset; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 << shift) | (src1 >> (32 - shift)); -@@ -156,7 +156,7 @@ - #else - src = (src0 << shift) | (src1 >> (32 - shift)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - j = 32 - ld_offset; - dp++; - sp++; -@@ -164,19 +164,19 @@ - } +- Lab.L = x[NonMonoIndx]; - if (j < size) src1 = sp[0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - for (; j <= size - 32; j += 32) { - src0 = src1; - src1 = sp[1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); - dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24); - #else - dp[0] = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sp++; - dp++; - } -@@ -187,7 +187,7 @@ - if (ls_offset + j > 32) src1 = sp[1]; - dst = dp[0]; - dmask = mask0 << (32 - j); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); - dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); -@@ -196,7 +196,7 @@ - #else - src = (src0 << ls_offset) | (src1 >> (32 - ls_offset)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } + // fit and get the vertex of quadratic curve + Lab.L = RootOfLeastSquaresFitQuadraticCurve(n, x, y); - #else /* _LONGLONG */ -@@ -315,7 +315,7 @@ - dst = dp[0]; - if (ld_offset >= size) { - dmask = (lmask0 << (32 - size)) >> (ld_offset - size); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src = (src0 << (ls_offset - ld_offset)); - dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); -@@ -324,12 +324,12 @@ - #else - src = (src0 << (ls_offset - ld_offset)); - dp[0] = (dst & (~dmask)) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - return; +- if (Lab.L < 0.0 || Lab.L > 50.0) { // clip to zero L* if the vertex is negative ++ if (Lab.L < 0.0) { // clip to zero L* if the vertex is negative + Lab.L = 0; } - dmask = lmask0 << (32 - ld_offset); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src = (src0 << (ls_offset - ld_offset)); - dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); -@@ -338,7 +338,7 @@ - #else - src = (src0 << (ls_offset - ld_offset)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - j = ld_offset; - dp--; - ls_offset -= j; -@@ -351,7 +351,7 @@ +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c 2014-04-19 01:27:12.000000000 -0700 +@@ -91,7 +91,7 @@ - if (ld_offset >= size) { - dmask = (lmask0 << (32 - size)) >> (ld_offset - size); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 >> shift) | (src1 << (32 - shift)); -@@ -361,12 +361,12 @@ - #else - src = (src0 >> shift) | (src1 << (32 - shift)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - return; + // Register a new type handler. This routine is shared between normal types and MPE + static +-cmsBool RegisterTypesPlugin(cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount) ++cmsBool RegisterTypesPlugin(cmsContext id, cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount) + { + cmsPluginTagType* Plugin = (cmsPluginTagType*) Data; + _cmsTagTypeLinkedList *pt, *Anterior = NULL; +@@ -118,7 +118,7 @@ } - dmask = lmask0 << (32 - ld_offset); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24); - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 >> shift) | (src1 << (32 - shift)); -@@ -376,7 +376,7 @@ - #else - src = (src0 >> shift) | (src1 << (32 - shift)); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - j = ld_offset; - dp--; - sp--; -@@ -384,22 +384,22 @@ - } + // Registering happens in plug-in memory pool +- pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagTypeLinkedList)); ++ pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagTypeLinkedList)); + if (pt == NULL) return FALSE; - if (j < size) src1 = sp[0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - #ifdef __SUNPRO_C - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (; j <= size - 32; j += 32) { - src0 = src1; - src1 = sp[-1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); - dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24); - #else - dp[0] = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sp--; - dp--; - } -@@ -410,7 +410,7 @@ - if (ls_offset < j) src1 = sp[-1]; - dst = dp[0]; - dmask = lmask0 >> (32 - j); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24); - src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); - dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24); -@@ -419,7 +419,7 @@ - #else - src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset); - dp[0] = (dst & ~dmask) | (src & dmask); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } + pt ->Handler = Plugin ->Handler; +@@ -208,10 +208,10 @@ + cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL; - #else /* _LONGLONG */ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2014-04-20 12:39:16.000000000 -0700 -@@ -168,7 +168,7 @@ + // Let's take the offsets to each element +- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); ++ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); + if (ElementOffsets == NULL) goto Error; + +- ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); ++ ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); + if (ElementSizes == NULL) goto Error; + + for (i=0; i < Count; i++) { +@@ -257,10 +257,10 @@ + cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL; + + // Create table +- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); ++ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); + if (ElementOffsets == NULL) goto Error; + +- ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); ++ ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); + if (ElementSizes == NULL) goto Error; + + // Keep starting position of curve offsets +@@ -456,6 +456,7 @@ + void* Type_Chromaticity_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n) + { + return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsCIExyYTRIPLE)); ++ + cmsUNUSED_PARAMETER(n); } - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) +@@ -1106,8 +1107,6 @@ + { + cmsUInt32Number Count; + cmsToneCurve* NewGamma; +- cmsUInt16Number Linear[2] = { 0, 0xffff }; +- - #define READ_U8_D64(table0, table1, table2, table3) \ - t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 << 3) & 0x7F8)); \ -@@ -184,7 +184,7 @@ - t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 5) & 0x7F8)); \ - t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 << 3) & 0x7F8)) + *nItems = 0; + if (!_cmsReadUInt32Number(io, &Count)) return NULL; +@@ -1115,11 +1114,14 @@ + switch (Count) { --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + case 0: // Linear. ++ { ++ cmsFloat64Number SingleGamma = 1.0; - /***************************************************************/ - void mlib_ImageLookUp_U8_D64(const mlib_u8 *src, -@@ -613,7 +613,7 @@ - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); -@@ -623,12 +623,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); -@@ -638,7 +638,7 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - dp[4] = t0; - dp[5] = t1; -@@ -646,7 +646,7 @@ - dp[7] = t3; - } +- NewGamma = cmsBuildTabulatedToneCurve16(self ->ContextID, 2, Linear); +- if (!NewGamma) return NULL; +- *nItems = 1; +- return NewGamma; ++ NewGamma = cmsBuildParametricToneCurve(self ->ContextID, 1, &SingleGamma); ++ if (!NewGamma) return NULL; ++ *nItems = 1; ++ return NewGamma; ++ } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); -@@ -656,12 +656,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); -@@ -671,7 +671,7 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[4] = t0; - dp[5] = t1; - dp[6] = t2; -@@ -719,7 +719,7 @@ - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -733,14 +733,14 @@ - t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; - dp[4] = t4; - dp[5] = t5; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -754,7 +754,7 @@ - t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - dp[6] = t0; - dp[7] = t1; -@@ -764,7 +764,7 @@ - dp[11] = t5; - } + case 1: // Specified as the exponent of gamma function + { +@@ -1210,6 +1212,7 @@ + if (ICCVersion < 4.0) return cmsSigCurveType; + if (Curve ->nSegments != 1) return cmsSigCurveType; // Only 1-segment curves can be saved as parametric + if (Curve ->Segments[0].Type < 0) return cmsSigCurveType; // Only non-inverted curves ++ if (Curve ->Segments[0].Type > 5) return cmsSigCurveType; // Only ICC parametric curves --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -778,14 +778,14 @@ - t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; - dp[4] = t4; - dp[5] = t5; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -799,7 +799,7 @@ - t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[6] = t0; - dp[7] = t1; - dp[8] = t2; -@@ -852,7 +852,7 @@ - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -862,12 +862,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); -@@ -877,12 +877,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[4] = t0; - dp[5] = t1; - dp[6] = t2; - dp[7] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -892,12 +892,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[8] = t0; - dp[9] = t1; - dp[10] = t2; - dp[11] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); -@@ -907,7 +907,7 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - dp[12] = t0; - dp[13] = t1; -@@ -915,7 +915,7 @@ - dp[15] = t3; - } + return cmsSigParametricCurveType; + } +@@ -1386,6 +1389,9 @@ + { + cmsICCMeasurementConditions mc; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -925,12 +925,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); -@@ -940,12 +940,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[4] = t0; - dp[5] = t1; - dp[6] = t2; - dp[7] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -955,12 +955,12 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[8] = t0; - dp[9] = t1; - dp[10] = t2; - dp[11] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); -@@ -970,7 +970,7 @@ - t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); - t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); - t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[12] = t0; - dp[13] = t1; - dp[14] = t2; ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2014-04-20 12:39:16.000000000 -0700 -@@ -88,7 +88,7 @@ - } d64_2_f32; ++ ++ memset(&mc, 0, sizeof(mc)); ++ + if (!_cmsReadUInt32Number(io, &mc.Observer)) return NULL; + if (!_cmsReadXYZNumber(io, &mc.Backing)) return NULL; + if (!_cmsReadUInt32Number(io, &mc.Geometry)) return NULL; +@@ -1640,7 +1646,6 @@ + static + cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels) + { +- cmsStage* mpe; + cmsUInt8Number* Temp = NULL; + int i, j; + cmsToneCurve* Tables[cmsMAXCHANNELS]; +@@ -1669,11 +1674,8 @@ + _cmsFree(ContextID, Temp); + Temp = NULL; + +- +- mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables); +- if (mpe == NULL) goto Error; +- +- cmsPipelineInsertStage(lut, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables))) ++ goto Error; + + for (i=0; i < nChannels; i++) + cmsFreeToneCurve(Tables[i]); +@@ -1701,21 +1703,30 @@ + + if (Tables) { + +- if (Tables ->TheCurves[i]->nEntries != 256) { +- cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization"); +- return FALSE; +- } +- +- } +- +- for (j=0; j < 256; j++) { ++ // Usual case of identity curves ++ if ((Tables ->TheCurves[i]->nEntries == 2) && ++ (Tables->TheCurves[i]->Table16[0] == 0) && ++ (Tables->TheCurves[i]->Table16[1] == 65535)) { + +- if (Tables != NULL) +- val = (cmsUInt8Number) FROM_16_TO_8(Tables->TheCurves[i]->Table16[j]); ++ for (j=0; j < 256; j++) { ++ if (!_cmsWriteUInt8Number(io, (cmsUInt8Number) j)) return FALSE; ++ } ++ } + else +- val = (cmsUInt8Number) j; ++ if (Tables ->TheCurves[i]->nEntries != 256) { ++ cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization"); ++ return FALSE; ++ } ++ else ++ for (j=0; j < 256; j++) { ++ ++ if (Tables != NULL) ++ val = (cmsUInt8Number) FROM_16_TO_8(Tables->TheCurves[i]->Table16[j]); ++ else ++ val = (cmsUInt8Number) j; - /***************************************************************/ --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) +- if (!_cmsWriteUInt8Number(io, val)) return FALSE; ++ if (!_cmsWriteUInt8Number(io, val)) return FALSE; ++ } + } + } + return TRUE; +@@ -1724,7 +1735,7 @@ - static const mlib_u32 mlib_bit_mask[16] = { - 0x00000000u, 0xFF000000u, 0x00FF0000u, 0xFFFF0000u, -@@ -126,7 +126,7 @@ - 0x00000000u, 0x00FFFFFFu, 0xFF000000u, 0xFFFFFFFFu - }; + // Check overflow + static +-size_t uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b) ++cmsUInt32Number uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b) + { + cmsUInt32Number rv = 1, rc; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +@@ -1736,13 +1747,13 @@ + rv *= a; + + // Check for overflow +- if (rv > UINT_MAX / a) return (size_t) -1; ++ if (rv > UINT_MAX / a) return (cmsUInt32Number) -1; - /***************************************************************/ - mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src, -@@ -228,13 +228,13 @@ - #endif /* __SUNPRO_C */ - for (; i <= (size - 16); i += 16) { - s0 = *(mlib_u16*)sa; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *da++ = dd_array[s0 & 0xFF]; - *da++ = dd_array[s0 >> 8]; - #else - *da++ = dd_array[s0 >> 8]; - *da++ = dd_array[s0 & 0xFF]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sa += 2; } -@@ -258,20 +258,20 @@ - val1 = p_dd[2*val0+1]; - } + rc = rv * n; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); - #else - emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask); +- if (rv != rc / n) return (size_t) -1; ++ if (rv != rc / n) return (cmsUInt32Number) -1; + return rc; + } - #else /* _NO_LONGLONG */ +@@ -1757,7 +1768,6 @@ + cmsUInt8Number InputChannels, OutputChannels, CLUTpoints; + cmsUInt8Number* Temp = NULL; + cmsPipeline* NewLUT = NULL; +- cmsStage *mpemat, *mpeclut; + cmsUInt32Number nTabSize, i; + cmsFloat64Number Matrix[3*3]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); - #else - mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +@@ -1796,9 +1806,8 @@ + // Only operates if not identity... + if ((InputChannels == 3) && !_cmsMAT3isIdentity((cmsMAT3*) Matrix)) { - ((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask); +- mpemat = cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL); +- if (mpemat == NULL) goto Error; +- cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, mpemat); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL))) ++ goto Error; + } -@@ -323,13 +323,13 @@ + // Get input tables +@@ -1806,13 +1815,10 @@ - val0 = table[0][0]; - val1 = table[0][1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - val0 = val0 | (table[1][0] << 8); - val1 = val1 | (table[1][1] << 8); - #else - val0 = (val0 << 8) | table[1][0]; - val1 = (val1 << 8) | table[1][1]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - val0 |= (val0 << 16); - val1 |= (val1 << 16); + // Get 3D CLUT. Check the overflow.... + nTabSize = uipow(OutputChannels, CLUTpoints, InputChannels); +- if (nTabSize == (size_t) -1) goto Error; ++ if (nTabSize == (cmsUInt32Number) -1) goto Error; + if (nTabSize > 0) { -@@ -394,11 +394,11 @@ - dd1 = dd2; - } + cmsUInt16Number *PtrW, *T; +- cmsUInt32Number Tsize; +- +- Tsize = (cmsUInt32Number) nTabSize * sizeof(cmsUInt16Number); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); - #else - emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask); + PtrW = T = (cmsUInt16Number*) _cmsCalloc(self ->ContextID, nTabSize, sizeof(cmsUInt16Number)); + if (T == NULL) goto Error; +@@ -1829,10 +1835,8 @@ + _cmsFree(self ->ContextID, Temp); + Temp = NULL; - #else /* _NO_LONGLONG */ -@@ -412,11 +412,11 @@ - dd = ((mlib_u64*)dd_array)[s0 & 0xf]; - } +- +- mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T); +- if (mpeclut == NULL) goto Error; +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) ++ goto Error; + _cmsFree(self ->ContextID, T); + } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8); - #else - emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask); +@@ -1934,7 +1938,7 @@ + if (!Write8bitTables(self ->ContextID, io, NewLUT ->InputChannels, PreMPE)) return FALSE; - #endif /* _NO_LONGLONG */ -@@ -462,7 +462,7 @@ + nTabSize = uipow(NewLUT->OutputChannels, clutPoints, NewLUT ->InputChannels); +- if (nTabSize == (size_t) -1) return FALSE; ++ if (nTabSize == (cmsUInt32Number) -1) return FALSE; + if (nTabSize > 0) { - buffs = buff + size; + // The 3D CLUT. +@@ -1983,7 +1987,6 @@ + static + cmsBool Read16bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels, int nEntries) + { +- cmsStage* mpe; + int i; + cmsToneCurve* Tables[cmsMAXCHANNELS]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - l0 = (table[0][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]); - h0 = (table[0][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]); - l1 = (l0 >> 8); l1 |= (l1 << 24); -@@ -476,7 +476,7 @@ - h1 = (h0 << 8); h1 |= (h1 >> 24); - l2 = (l1 << 8); l2 |= (l2 >> 24); - h2 = (h1 << 8); h2 |= (h2 >> 24); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +@@ -2007,10 +2010,8 @@ - /* calculate lookup table */ - #ifdef __SUNPRO_C -@@ -564,11 +564,11 @@ - dd = ((mlib_u32*)(d_array12 + (s0 & 0xF)))[1]; - } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8); - #else - emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = (dd & emask) | (da[0] &~ emask); - } + // Add the table (which may certainly be an identity, but this is up to the optimizer, not the reading code) +- mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables); +- if (mpe == NULL) goto Error; +- +- cmsPipelineInsertStage(lut, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables))) ++ goto Error; -@@ -611,13 +611,13 @@ + for (i=0; i < nChannels; i++) + cmsFreeToneCurve(Tables[i]); +@@ -2031,7 +2032,9 @@ + int j; + cmsUInt32Number i; + cmsUInt16Number val; +- int nEntries = 256; ++ int nEntries; ++ ++ _cmsAssert(Tables != NULL); - buffs = buff + size; + nEntries = Tables->TheCurves[0]->nEntries; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - l = (table[3][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]); - h = (table[3][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]); - #else - l = (table[0][0] << 24) | (table[1][0] << 16) | (table[2][0] << 8) | (table[3][0]); - h = (table[0][1] << 24) | (table[1][1] << 16) | (table[2][1] << 8) | (table[3][1]); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +@@ -2039,11 +2042,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 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2014-04-20 12:39:16.000000000 -0700 -@@ -30,7 +30,7 @@ - typedef union { - mlib_d64 db; - struct { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - mlib_s32 int1, int0; - #else - mlib_s32 int0, int1; ---- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2013-09-06 11:29:00.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2014-04-20 12:39:16.000000000 -0700 -@@ -275,11 +275,11 @@ - for (i = 0; j <= (b_size - 4); j += 4, i++) { - src0 = src1; - src1 = pws[i + 1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - pwd[i] = (src0 >> lshift) | (src1 << rshift); - #else - pwd[i] = (src0 << lshift) | (src1 >> rshift); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } + for (j=0; j < nEntries; j++) { - sa += i << 2; -@@ -381,11 +381,11 @@ - for (; j <= (src_width - 4); j += 4) { - src0 = src1; - src1 = ps[1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *((mlib_s32 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); - #else - *((mlib_s32 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ps++; - } - } -@@ -414,11 +414,11 @@ - for (; j <= (src_width - 8); j += 8) { - src0 = src1; - src1 = ps[1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); - #else - *((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ps++; - } - } -@@ -484,11 +484,11 @@ - for (; j <= (src_width - 2); j += 2) { - src0 = src1; - src1 = ps[1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *((mlib_s32 *) (pdst_row + j)) = (src0 >> 16) | (src1 << 16); - #else - *((mlib_s32 *) (pdst_row + j)) = (src0 << 16) | (src1 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ps++; +- if (Tables != NULL) +- val = Tables->TheCurves[i]->Table16[j]; +- else +- val = _cmsQuantizeVal(j, nEntries); +- ++ val = Tables->TheCurves[i]->Table16[j]; + if (!_cmsWriteUInt16Number(io, val)) return FALSE; } - } -@@ -516,11 +516,11 @@ - for (; j <= (src_width - 4); j += 4) { - src0 = src1; - src1 = ps[1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr); - #else - *((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ps++; + } +@@ -2057,7 +2056,6 @@ + { + cmsUInt8Number InputChannels, OutputChannels, CLUTpoints; + cmsPipeline* NewLUT = NULL; +- cmsStage *mpemat, *mpeclut; + cmsUInt32Number nTabSize; + cmsFloat64Number Matrix[3*3]; + cmsUInt16Number InputEntries, OutputEntries; +@@ -2094,9 +2092,8 @@ + // Only operates on 3 channels + if ((InputChannels == 3) && !_cmsMAT3isIdentity((cmsMAT3*) Matrix)) { + +- mpemat = cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL); +- if (mpemat == NULL) goto Error; +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpemat); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL))) ++ goto Error; + } + + if (!_cmsReadUInt16Number(io, &InputEntries)) goto Error; +@@ -2110,7 +2107,7 @@ + + // Get 3D CLUT + nTabSize = uipow(OutputChannels, CLUTpoints, InputChannels); +- if (nTabSize == (size_t) -1) goto Error; ++ if (nTabSize == (cmsUInt32Number) -1) goto Error; + if (nTabSize > 0) { + + cmsUInt16Number *T; +@@ -2123,13 +2120,10 @@ + goto Error; } - } -@@ -585,11 +585,11 @@ - for (; j <= (src_width - 2); j += 2) { - src0 = src1; - src1 = ps[1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *((mlib_s64 *) (pdst_row + j)) = (src0 >> 32) | (src1 << 32); - #else - *((mlib_s64 *) (pdst_row + j)) = (src0 << 32) | (src1 >> 32); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - ps++; + +- mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T); +- if (mpeclut == NULL) { +- _cmsFree(self ->ContextID, T); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) { ++ _cmsFree(self ->ContextID, T); + goto Error; } - } -@@ -687,11 +687,11 @@ - #endif /* __SUNPRO_C */ - for (; n > SIZE; n -= SIZE) { - s1 = *tmp++; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *(TYPE *) dp = (s0 >> shl) | (s1 << shr); - #else - *(TYPE *) dp = (s0 << shl) | (s1 >> shr); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = s1; - dp += SIZE; - sp += SIZE; ---- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2014-04-20 12:39:16.000000000 -0700 -@@ -120,7 +120,7 @@ - } \ - } +- +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut); + _cmsFree(self ->ContextID, T); + } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) +@@ -2159,7 +2153,7 @@ + _cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL; + _cmsStageMatrixData* MatMPE = NULL; + _cmsStageCLutData* clut = NULL; +- int InputChannels, OutputChannels, clutPoints; ++ int i, InputChannels, OutputChannels, clutPoints; - /***************************************************************/ - #define READ_U8_U8_ALIGN(table0, table1, table2, table3) \ -@@ -163,7 +163,7 @@ - t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 14) & 0x3FC)); \ - t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 >> 22) & 0x3FC)) + // Disassemble the LUT into components. + mpe = NewLUT -> Elements; +@@ -2234,13 +2228,13 @@ + if (PreMPE != NULL) { + if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) PreMPE ->TheCurves[0]->nEntries)) return FALSE; + } else { +- if (!_cmsWriteUInt16Number(io, 0)) return FALSE; ++ if (!_cmsWriteUInt16Number(io, 2)) return FALSE; + } --#else /* _LITTLE_ENDIAN */ -+#else /* BYTE_ORDER == ... */ + if (PostMPE != NULL) { + if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) PostMPE ->TheCurves[0]->nEntries)) return FALSE; + } else { +- if (!_cmsWriteUInt16Number(io, 0)) return FALSE; ++ if (!_cmsWriteUInt16Number(io, 2)) return FALSE; - /***********/ - #define READ_U8_U8_ALIGN(table0, table1, table2, table3) \ -@@ -206,7 +206,7 @@ - t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 6) & 0x3FC)); \ - t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 << 2) & 0x3FC)) + } --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +@@ -2249,9 +2243,16 @@ + if (PreMPE != NULL) { + if (!Write16bitTables(self ->ContextID, io, PreMPE)) return FALSE; + } ++ else { ++ for (i=0; i < InputChannels; i++) { ++ ++ if (!_cmsWriteUInt16Number(io, 0)) return FALSE; ++ if (!_cmsWriteUInt16Number(io, 0xffff)) return FALSE; ++ } ++ } - /***************************************************************/ - void mlib_c_ImageLookUp_U8_U8(const mlib_u8 *src, -@@ -297,11 +297,11 @@ - da[0] = t; - da++; - dp = (mlib_u8 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = tab[s2 >> 8]; - #else - *dp++ = tab[s2 & 0xFF]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sp = (mlib_u8 *) sa; - i += 5; - for (; i < size; i++, dp++, sp++) -@@ -403,11 +403,11 @@ - da[0] = t; - da++; - dp = (mlib_u8 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = tab0[s2 >> 8]; - #else - *dp++ = tab0[s2 & 0xFF]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sp = (mlib_u8 *) sa; - i += 5; + nTabSize = uipow(OutputChannels, clutPoints, InputChannels); +- if (nTabSize == (size_t) -1) return FALSE; ++ if (nTabSize == (cmsUInt32Number) -1) return FALSE; + if (nTabSize > 0) { + // The 3D CLUT. + if (clut != NULL) { +@@ -2263,7 +2264,13 @@ + if (PostMPE != NULL) { + if (!Write16bitTables(self ->ContextID, io, PostMPE)) return FALSE; + } ++ else { ++ for (i=0; i < OutputChannels; i++) { -@@ -544,11 +544,11 @@ - da[0] = t; - da++; - dp = (mlib_u8 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = tab1[s2 >> 8]; - #else - *dp++ = tab1[s2 & 0xFF]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sp = (mlib_u8 *) sa; - i += 5; ++ if (!_cmsWriteUInt16Number(io, 0)) return FALSE; ++ if (!_cmsWriteUInt16Number(io, 0xffff)) return FALSE; ++ } ++ } + + return TRUE; + +@@ -2479,7 +2486,6 @@ + cmsUInt32Number offsetM; // Offset to first "M" curve + cmsUInt32Number offsetC; // Offset to CLUT + cmsUInt32Number offsetA; // Offset to first "A" curve +- cmsStage* mpe; + cmsPipeline* NewLUT = NULL; + + +@@ -2501,37 +2507,35 @@ + if (NewLUT == NULL) return NULL; -@@ -694,11 +694,11 @@ - da[0] = t; - da++; - dp = (mlib_u8 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = tab0[s2 >> 8]; - #else - *dp++ = tab0[s2 & 0xFF]; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sp = (mlib_u8 *) sa; - i += 5; + if (offsetA!= 0) { +- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetA, inputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetA, inputChan))) ++ goto Error; + } -@@ -1852,21 +1852,21 @@ - s0 = tab0[0]; - s1 = tab1[0]; - for (i = 1; i < 256; i++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s2 = (s1 << 8) + s0; - #else - s2 = (s0 << 8) + s1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = tab0[i]; - s1 = tab1[i]; - tab[i - 1] = (mlib_u16) s2; + if (offsetC != 0) { +- mpe = ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan))) ++ goto Error; } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s2 = (s1 << 8) + s0; - #else - s2 = (s0 << 8) + s1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - tab[255] = (mlib_u16) s2; + if (offsetM != 0) { +- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetM, outputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetM, outputChan))) ++ goto Error; + } - for (j = 0; j < ysize; j++, dst += dlb, src += slb) { -@@ -1897,11 +1897,11 @@ - for (i = 0; i < size - 3; i += 2, da++, sa += 2) { - t0 = tab[s0]; - t1 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t = (t1 << 16) + t0; - #else - t = (t0 << 16) + t1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - da[0] = t; -@@ -1909,11 +1909,11 @@ + if (offsetMat != 0) { +- mpe = ReadMatrix(self, io, BaseOffset + offsetMat); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadMatrix(self, io, BaseOffset + offsetMat))) ++ goto Error; + } - t0 = tab[s0]; - t1 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t = (t1 << 16) + t0; - #else - t = (t0 << 16) + t1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = t; - da++; + if (offsetB != 0) { +- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetB, outputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetB, outputChan))) ++ goto Error; + } -@@ -1927,13 +1927,13 @@ + *nItems = 1; + return NewLUT; ++Error: ++ cmsPipelineFree(NewLUT); ++ return NULL; - if (off > 1) { - t0 = tab[sa[0]]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[1] = (t0 >> 8); - dp[0] = t0; - #else - dp[0] = (t0 >> 8); - dp[1] = t0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sa++; - size--; - dp += 2; -@@ -1941,11 +1941,11 @@ + cmsUNUSED_PARAMETER(SizeOfTag); + } +@@ -2798,7 +2802,6 @@ + cmsUInt32Number offsetM; // Offset to first "M" curve + cmsUInt32Number offsetC; // Offset to CLUT + cmsUInt32Number offsetA; // Offset to first "A" curve +- cmsStage* mpe; + cmsPipeline* NewLUT = NULL; - t0 = tab[sa[0]]; - sa++; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = t0; - #else - *dp++ = (t0 >> 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da = (mlib_s32 *) dp; +@@ -2821,37 +2824,35 @@ + if (NewLUT == NULL) return NULL; -@@ -1959,11 +1959,11 @@ - for (i = 0; i < size - 4; i += 2, da++, sa += 2) { - t1 = tab[s0]; - t2 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t = (t0 >> 8) + (t1 << 8) + (t2 << 24); - #else - t = (t0 << 24) + (t1 << 8) + (t2 >> 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - t0 = t2; - s0 = sa[0]; - s1 = sa[1]; -@@ -1972,29 +1972,29 @@ + if (offsetB != 0) { +- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetB, inputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetB, inputChan))) ++ goto Error; + } - t1 = tab[s0]; - t2 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t = (t0 >> 8) + (t1 << 8) + (t2 << 24); - #else - t = (t0 << 24) + (t1 << 8) + (t2 >> 8); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = t; - da++; - dp = (mlib_u8 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[0] = (t2 >> 8); - #else - dp[0] = t2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + if (offsetMat != 0) { +- mpe = ReadMatrix(self, io, BaseOffset + offsetMat); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadMatrix(self, io, BaseOffset + offsetMat))) ++ goto Error; + } - if ((size & 1) == 0) { - t0 = tab[sa[0]]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[2] = (t0 >> 8); - dp[1] = t0; - #else - dp[1] = (t0 >> 8); - dp[2] = t0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } - } + if (offsetM != 0) { +- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetM, inputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetM, inputChan))) ++ goto Error; } -@@ -2012,22 +2012,22 @@ - s1 = tab1[0]; - s2 = tab2[0]; - for (i = 1; i < 256; i++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s3 = (s2 << 24) + (s1 << 16) + (s0 << 8); - #else - s3 = (s0 << 16) + (s1 << 8) + s2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = tab0[i]; - s1 = tab1[i]; - s2 = tab2[i]; - tab[i - 1] = s3; + + if (offsetC != 0) { +- mpe = ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan))) ++ goto Error; } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s3 = (s2 << 24) + (s1 << 16) + (s0 << 8); - #else - s3 = (s0 << 16) + (s1 << 8) + s2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - tab[255] = s3; + if (offsetA!= 0) { +- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetA, outputChan); +- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetA, outputChan))) ++ goto Error; + } - for (j = 0; j < ysize; j++, dst += dlb, src += slb) { -@@ -2064,24 +2064,24 @@ - for (i = 0; i < size - 7; i += 4, da += 3, sa += 4) { - t0 = tab[s0]; - t1 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - da[0] = (t0 >> 8) + (t1 << 16); - res2 = (t1 >> 16); - #else - da[0] = (t0 << 8) + (t1 >> 16); - res2 = (t1 << 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - t0 = tab[s0]; - t1 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 += (t0 << 8); - res1 = (t0 >> 24) + t1; - #else - res2 += (t0 >> 8); - res1 = (t0 << 24) + t1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[2]; - s1 = sa[3]; - da[1] = res2; -@@ -2090,24 +2090,24 @@ + *nItems = 1; + return NewLUT; ++Error: ++ cmsPipelineFree(NewLUT); ++ return NULL; - t0 = tab[s0]; - t1 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - da[0] = (t0 >> 8) + (t1 << 16); - res2 = (t1 >> 16); - #else - da[0] = (t0 << 8) + (t1 >> 16); - res2 = (t1 << 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - t0 = tab[s0]; - t1 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 += (t0 << 8); - res1 = (t0 >> 24) + t1; - #else - res2 += (t0 >> 8); - res1 = (t0 << 24) + t1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[1] = res2; - da[2] = res1; - da += 3; -@@ -2143,11 +2143,11 @@ - s2 = tab2[0]; - s3 = tab3[0]; - for (i = 1; i < 256; i++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0; - #else - s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = tab0[i]; - s1 = tab1[i]; - s2 = tab2[i]; -@@ -2155,11 +2155,11 @@ - tab[i - 1] = s4; - } + cmsUNUSED_PARAMETER(SizeOfTag); + } +@@ -3287,7 +3288,7 @@ + SizeOfTag -= sizeof(cmsUInt32Number); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0; - #else - s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - tab[255] = s4; + if (!_cmsReadUInt64Number(io, &sec ->attributes)) goto Error; +- if (SizeOfTag < sizeof(cmsUInt32Number)) goto Error; ++ if (SizeOfTag < sizeof(cmsUInt64Number)) goto Error; + SizeOfTag -= sizeof(cmsUInt64Number); - for (j = 0; j < ysize; j++, dst += dlb, src += slb) { -@@ -2225,13 +2225,13 @@ - for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) { - t1 = tab[s0]; - t2 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t0 >> shift) + (t1 << shift1); - res2 = (t1 >> shift) + (t2 << shift1); - #else - res1 = (t0 << shift) + (t1 >> shift1); - res2 = (t1 << shift) + (t2 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - t0 = t2; - s0 = sa[0]; - s1 = sa[1]; -@@ -2241,28 +2241,28 @@ + if (!_cmsReadUInt32Number(io, (cmsUInt32Number *)&sec ->technology)) goto Error; +@@ -4292,6 +4293,9 @@ + if (!_cmsReadUInt16Number(io, &InputChans)) return NULL; + if (!_cmsReadUInt16Number(io, &OutputChans)) return NULL; - t1 = tab[s0]; - t2 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t0 >> shift) + (t1 << shift1); - res2 = (t1 >> shift) + (t2 << shift1); - #else - res1 = (t0 << shift) + (t1 >> shift1); - res2 = (t1 << shift) + (t2 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res1; - da[1] = res2; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = (da[2] >> shift1); - da[2] = (t2 >> shift) + (t0 << shift1); - #else - t0 = (da[2] << shift1); - da[2] = (t2 << shift) + (t0 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da += 2; - dp = (mlib_u8 *) da + (4 - off); ++ if (InputChans == 0) goto Error; ++ if (OutputChans == 0) goto Error; ++ + if (io ->Read(io, Dimensions8, sizeof(cmsUInt8Number), 16) != 16) + goto Error; - if ((size & 1) == 0) { - t0 = tab[sa[0]]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[3] = (mlib_u8) (t0 >> 24); - dp[2] = (mlib_u8) (t0 >> 16); - dp[1] = (mlib_u8) (t0 >> 8); -@@ -2272,7 +2272,7 @@ - dp[1] = (mlib_u8) (t0 >> 16); - dp[2] = (mlib_u8) (t0 >> 8); - dp[3] = (mlib_u8) t0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } - } - } -@@ -2348,13 +2348,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res2 = (t5 << 8) + t4; - #else - da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res2 = (t4 << 24) + (t5 << 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - t0 = tab0[s0]; -@@ -2363,13 +2363,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 += ((t1 << 24) + (t0 << 16)); - res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; - #else - res2 += ((t0 << 8) + t1); - res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[2]; - s1 = sa[3]; - da[1] = res2; -@@ -2382,13 +2382,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res2 = (t5 << 8) + t4; - #else - da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res2 = (t4 << 24) + (t5 << 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - t0 = tab0[s0]; -@@ -2397,13 +2397,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 += ((t1 << 24) + (t0 << 16)); - res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; - #else - res2 += ((t0 << 8) + t1); - res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[1] = res2; - da[2] = res1; - da += 3; -@@ -2455,11 +2455,11 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - #else - res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - da[0] = res; - } -@@ -2468,11 +2468,11 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - #else - res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res; +@@ -4381,7 +4385,6 @@ + { + cmsStageSignature ElementSig; + cmsTagTypeHandler* TypeHandler; +- cmsStage *mpe = NULL; + cmsUInt32Number nItems; + cmsPipeline *NewLUT = (cmsPipeline *) Cargo; + +@@ -4409,11 +4412,8 @@ + if (TypeHandler ->ReadPtr != NULL) { + + // This is a real element which should be read and processed +- mpe = (cmsStage*) TypeHandler ->ReadPtr(self, io, &nItems, SizeOfTag); +- if (mpe == NULL) return FALSE; +- +- // All seems ok, insert element +- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); ++ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, (cmsStage*) TypeHandler ->ReadPtr(self, io, &nItems, SizeOfTag))) ++ return FALSE; + } - } -@@ -2496,11 +2496,11 @@ - t2 = tab2[s0]; - t3 = tab3[s0]; + return TRUE; +@@ -4479,10 +4479,10 @@ + outputChan = cmsPipelineOutputChannels(Lut); + ElemCount = cmsPipelineStageCount(Lut); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - #else - res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number *)); ++ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number)); + if (ElementOffsets == NULL) goto Error; - s0 = sa[0]; - sa++; -@@ -2513,13 +2513,13 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res = (res1 >> shift) + (res2 << shift1); - #else - res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res = (res1 << shift) + (res2 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - res1 = res2; - s0 = sa[0]; - da[0] = res; -@@ -2529,21 +2529,21 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res = (res1 >> shift) + (res2 << shift1); - #else - res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res = (res1 << shift) + (res2 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (da[1] >> shift1); - da[1] = (res2 >> shift) + (res1 << shift1); - #else - res1 = (da[1] << shift1); - da[1] = (res2 << shift) + (res1 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } - } - } -@@ -2617,13 +2617,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res2 = (t5 << 8) + t4; - #else - da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res2 = (t4 << 24) + (t5 << 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - t0 = tab0[s0]; -@@ -2632,13 +2632,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 += ((t1 << 24) + (t0 << 16)); - res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; - #else - res2 += ((t0 << 8) + t1); - res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[2]; - s1 = sa[3]; - da[1] = res2; -@@ -2651,13 +2651,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res2 = (t5 << 8) + t4; - #else - da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res2 = (t4 << 24) + (t5 << 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - s1 = sa[1]; - t0 = tab0[s0]; -@@ -2666,13 +2666,13 @@ - t3 = tab0[s1]; - t4 = tab1[s1]; - t5 = tab2[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 += ((t1 << 24) + (t0 << 16)); - res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2; - #else - res2 += ((t0 << 8) + t1); - res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[1] = res2; - da[2] = res1; - da += 3; -@@ -2724,11 +2724,11 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - #else - res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - da[0] = res; +- ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number *)); ++ ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number)); + if (ElementSizes == NULL) goto Error; + + // Write the head +@@ -4825,10 +4825,10 @@ + static + cmsBool AllocElem(cmsContext ContextID, _cmsDICelem* e, cmsUInt32Number Count) + { +- e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *)); ++ e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number)); + if (e->Offsets == NULL) return FALSE; + +- e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *)); ++ e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number)); + if (e->Sizes == NULL) { + + _cmsFree(ContextID, e -> Offsets); +@@ -4844,7 +4844,7 @@ + void FreeElem(_cmsDICelem* e) + { + if (e ->Offsets != NULL) _cmsFree(e -> ContextID, e -> Offsets); +- if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e ->Sizes); ++ if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e -> Sizes); + e->Offsets = e ->Sizes = NULL; + } + +@@ -5084,7 +5084,7 @@ + if (!_cmsReadUInt32Number(io, &Count)) return NULL; + SizeOfTag -= sizeof(cmsUInt32Number); + +- // Get rec lenghth ++ // Get rec length + if (!_cmsReadUInt32Number(io, &Length)) return NULL; + SizeOfTag -= sizeof(cmsUInt32Number); + +@@ -5118,14 +5118,22 @@ + if (!ReadOneMLUC(self, io, &a.DisplayValue, i, &DisplayValueMLU)) goto Error; } -@@ -2737,11 +2737,11 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - #else - res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res; - } -@@ -2765,11 +2765,11 @@ - t2 = tab2[s0]; - t3 = tab3[s0]; ++ if (NameWCS == NULL || ValueWCS == NULL) { ++ ++ cmsSignalError(self->ContextID, cmsERROR_CORRUPTION_DETECTED, "Bad dictionary Name/Value"); ++ rc = FALSE; ++ } ++ else { ++ + rc = cmsDictAddEntry(hDict, NameWCS, ValueWCS, DisplayNameMLU, DisplayValueMLU); ++ } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - #else - res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + if (NameWCS != NULL) _cmsFree(self ->ContextID, NameWCS); + if (ValueWCS != NULL) _cmsFree(self ->ContextID, ValueWCS); + if (DisplayNameMLU != NULL) cmsMLUfree(DisplayNameMLU); + if (DisplayValueMLU != NULL) cmsMLUfree(DisplayValueMLU); - s0 = sa[0]; - sa++; -@@ -2782,13 +2782,13 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res = (res1 >> shift) + (res2 << shift1); - #else - res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res = (res1 << shift) + (res2 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - res1 = res2; - s0 = sa[0]; - da[0] = res; -@@ -2798,21 +2798,21 @@ - t1 = tab1[s0]; - t2 = tab2[s0]; - t3 = tab3[s0]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0; - res = (res1 >> shift) + (res2 << shift1); - #else - res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3; - res = (res1 << shift) + (res2 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (da[1] >> shift1); - da[1] = (res2 >> shift) + (res1 << shift1); - #else - res1 = (da[1] << shift1); - da[1] = (res2 << shift) + (res1 >> shift1); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } - } - } -@@ -2863,21 +2863,21 @@ - s0 = tab0[0]; - s1 = tab1[0]; - for (i = 1; i < 256; i++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s2 = (s1 << 16) + s0; - #else - s2 = (s0 << 16) + s1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = tab0[i]; - s1 = tab1[i]; - tab[i - 1] = s2; +- if (!rc) return FALSE; ++ if (!rc) goto Error; } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s2 = (s1 << 16) + s0; - #else - s2 = (s0 << 16) + s1; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - tab[255] = s2; + FreeArray(&a); +@@ -5277,14 +5285,14 @@ + #define DEFAULT_TAG_TYPE_COUNT (sizeof(SupportedTagTypes) / sizeof(_cmsTagTypeLinkedList)) - for (j = 0; j < ysize; j++, dst += dlb, src += slb) { -@@ -2919,11 +2919,11 @@ - else { + // Both kind of plug-ins share same structure +-cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterTagTypePlugin(cmsContext id, cmsPluginBase* Data) + { +- return RegisterTypesPlugin(Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT); ++ return RegisterTypesPlugin(id, Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT); + } - t0 = tab[*sa++]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = (mlib_u16) (t0); - #else - *dp++ = (mlib_u16) (t0 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da = (mlib_u32 *) dp; - s0 = sa[0]; - s1 = sa[1]; -@@ -2935,13 +2935,13 @@ - for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) { - t1 = tab[s0]; - t2 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t0 >> 16) + (t1 << 16); - res2 = (t1 >> 16) + (t2 << 16); - #else - res1 = (t0 << 16) + (t1 >> 16); - res2 = (t1 << 16) + (t2 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - t0 = t2; - s0 = sa[0]; - s1 = sa[1]; -@@ -2951,32 +2951,32 @@ +-cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext id, cmsPluginBase* Data) + { +- return RegisterTypesPlugin(Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT); ++ return RegisterTypesPlugin(id, Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT); + } - t1 = tab[s0]; - t2 = tab[s1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t0 >> 16) + (t1 << 16); - res2 = (t1 >> 16) + (t2 << 16); - #else - res1 = (t0 << 16) + (t1 >> 16); - res2 = (t1 << 16) + (t2 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res1; - da[1] = res2; - da += 2; - dp = (mlib_u16 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[0] = (mlib_u16) (t2 >> 16); - #else - dp[0] = (mlib_u16) t2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - if ((size & 1) == 0) { - t0 = tab[sa[0]]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[2] = (mlib_u16) (t0 >> 16); - dp[1] = (mlib_u16) t0; - #else - dp[1] = (mlib_u16) (t0 >> 16); - dp[2] = (mlib_u16) t0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } - } +@@ -5391,7 +5399,9 @@ + { cmsSigScreeningTag, { 1, 1, { cmsSigScreeningType}, NULL }, &SupportedTags[59]}, + { cmsSigVcgtTag, { 1, 1, { cmsSigVcgtType}, NULL }, &SupportedTags[60]}, + { cmsSigMetaTag, { 1, 1, { cmsSigDictType}, NULL }, &SupportedTags[61]}, +- { cmsSigProfileSequenceIdTag, { 1, 1, { cmsSigProfileSequenceIdType}, NULL}, NULL} ++ { cmsSigProfileSequenceIdTag, { 1, 1, { cmsSigProfileSequenceIdType}, NULL }, &SupportedTags[62]}, ++ { cmsSigProfileDescriptionMLTag,{ 1, 1, { cmsSigMultiLocalizedUnicodeType}, NULL}, NULL} ++ + + }; + +@@ -5406,7 +5416,7 @@ + + #define DEFAULT_TAG_COUNT (sizeof(SupportedTags) / sizeof(_cmsTagLinkedList)) + +-cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterTagPlugin(cmsContext id, cmsPluginBase* Data) + { + cmsPluginTag* Plugin = (cmsPluginTag*) Data; + _cmsTagLinkedList *pt, *Anterior; +@@ -5430,7 +5440,7 @@ + pt = pt ->Next; } -@@ -2994,13 +2994,13 @@ - s1 = tab1[0]; - s2 = tab2[0]; - for (i = 1; i < 256; i++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s3 = (s0 << 16); - s4 = (s2 << 16) + s1; - #else - s3 = s0; - s4 = (s1 << 16) + s2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = tab0[i]; - s1 = tab1[i]; - s2 = tab2[i]; -@@ -3008,13 +3008,13 @@ - tab[2 * i - 1] = s4; + +- pt = (_cmsTagLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagLinkedList)); ++ pt = (_cmsTagLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagLinkedList)); + if (pt == NULL) return FALSE; + + pt ->Signature = Plugin ->Signature; +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsvirt.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsvirt.c 2014-04-19 01:27:12.000000000 -0700 +@@ -208,9 +208,26 @@ + + if (TransferFunction) { + ++ // Tries to minimize space. Thanks to Richard Hughes for this nice idea + if (!cmsWriteTag(hICC, cmsSigRedTRCTag, (void*) TransferFunction[0])) goto Error; +- if (!cmsWriteTag(hICC, cmsSigGreenTRCTag, (void*) TransferFunction[1])) goto Error; +- if (!cmsWriteTag(hICC, cmsSigBlueTRCTag, (void*) TransferFunction[2])) goto Error; ++ ++ if (TransferFunction[1] == TransferFunction[0]) { ++ ++ if (!cmsLinkTag (hICC, cmsSigGreenTRCTag, cmsSigRedTRCTag)) goto Error; ++ ++ } else { ++ ++ if (!cmsWriteTag(hICC, cmsSigGreenTRCTag, (void*) TransferFunction[1])) goto Error; ++ } ++ ++ if (TransferFunction[2] == TransferFunction[0]) { ++ ++ if (!cmsLinkTag (hICC, cmsSigBlueTRCTag, cmsSigRedTRCTag)) goto Error; ++ ++ } else { ++ ++ if (!cmsWriteTag(hICC, cmsSigBlueTRCTag, (void*) TransferFunction[2])) goto Error; ++ } } --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s4 = (s2 << 16) + s1; - tab[510] = s0 << 16; - #else - s4 = (s1 << 16) + s2; - tab[510] = s0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - tab[511] = s4; + if (Primaries) { +@@ -303,7 +320,6 @@ + { + cmsHPROFILE hICC; + cmsPipeline* Pipeline; +- cmsStage* Lin; + int nChannels; + + hICC = cmsCreateProfilePlaceholder(ContextID); +@@ -327,10 +343,8 @@ + + + // Copy tables to Pipeline +- Lin = cmsStageAllocToneCurves(ContextID, nChannels, TransferFunctions); +- if (Lin == NULL) goto Error; +- +- cmsPipelineInsertStage(Pipeline, cmsAT_BEGIN, Lin); ++ if (!cmsPipelineInsertStage(Pipeline, cmsAT_BEGIN, cmsStageAllocToneCurves(ContextID, nChannels, TransferFunctions))) ++ goto Error; + + // Create tags + if (!SetTextTags(hICC, L"Linearization built-in")) goto Error; +@@ -344,6 +358,7 @@ + return hICC; + + Error: ++ cmsPipelineFree(Pipeline); + if (hICC) + cmsCloseProfile(hICC); + +@@ -451,9 +466,10 @@ + + if (!cmsStageSampleCLut16bit(CLUT, InkLimitingSampler, (void*) &Limit, 0)) goto Error; + +- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, nChannels)); +- cmsPipelineInsertStage(LUT, cmsAT_END, CLUT); +- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, nChannels)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, nChannels)) || ++ !cmsPipelineInsertStage(LUT, cmsAT_END, CLUT) || ++ !cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, nChannels))) ++ goto Error; + + // Create tags + if (!SetTextTags(hICC, L"ink-limiting built-in")) goto Error; +@@ -504,7 +520,8 @@ + LUT = cmsPipelineAlloc(ContextID, 3, 3); + if (LUT == NULL) goto Error; + +- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCLut(ContextID, 3)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCLut(ContextID, 3))) ++ goto Error; + + if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error; + cmsPipelineFree(LUT); +@@ -550,7 +567,8 @@ + LUT = cmsPipelineAlloc(ContextID, 3, 3); + if (LUT == NULL) goto Error; + +- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3))) ++ goto Error; + + if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error; + cmsPipelineFree(LUT); +@@ -595,7 +613,8 @@ + LUT = cmsPipelineAlloc(ContextID, 3, 3); + if (LUT == NULL) goto Error; - for (j = 0; j < ysize; j++, dst += dlb, src += slb) { -@@ -3050,13 +3050,13 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t0 >> 16) + (t1 << 16); - res2 = (t1 >> 16) + t2; - #else - res1 = (t0 << 16) + (t1 >> 16); - res2 = (t1 << 16) + t2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0] << 3; - s1 = sa[1] << 3; - da[0] = res1; -@@ -3068,13 +3068,13 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t0 >> 16) + (t1 << 16); - res2 = (t1 >> 16) + t2; - #else - res1 = (t0 << 16) + (t1 >> 16); - res2 = (t1 << 16) + t2; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res1; - da[1] = res2; - da[2] = t3; -@@ -3105,13 +3105,13 @@ - s2 = tab2[0]; - s3 = tab3[0]; - for (i = 1; i < 256; i++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s4 = (s1 << 16) + s0; - s5 = (s3 << 16) + s2; - #else - s4 = (s0 << 16) + s1; - s5 = (s2 << 16) + s3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = tab0[i]; - s1 = tab1[i]; - s2 = tab2[i]; -@@ -3120,13 +3120,13 @@ - tab[2 * i - 1] = s5; - } +- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3))) ++ goto Error; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - s4 = (s1 << 16) + s0; - s5 = (s3 << 16) + s2; - #else - s4 = (s0 << 16) + s1; - s5 = (s2 << 16) + s3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - tab[510] = s4; - tab[511] = s5; + if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error; + cmsPipelineFree(LUT); +@@ -734,81 +753,83 @@ + // contrast, Saturation and white point displacement -@@ -3181,18 +3181,18 @@ + cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID, +- int nLUTPoints, +- cmsFloat64Number Bright, +- cmsFloat64Number Contrast, +- cmsFloat64Number Hue, +- cmsFloat64Number Saturation, +- int TempSrc, +- int TempDest) +-{ +- cmsHPROFILE hICC; +- cmsPipeline* Pipeline; +- BCHSWADJUSTS bchsw; +- cmsCIExyY WhitePnt; +- cmsStage* CLUT; +- cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS]; +- int i; +- +- +- bchsw.Brightness = Bright; +- bchsw.Contrast = Contrast; +- bchsw.Hue = Hue; +- bchsw.Saturation = Saturation; +- +- cmsWhitePointFromTemp(&WhitePnt, TempSrc ); +- cmsxyY2XYZ(&bchsw.WPsrc, &WhitePnt); +- +- cmsWhitePointFromTemp(&WhitePnt, TempDest); +- cmsxyY2XYZ(&bchsw.WPdest, &WhitePnt); +- +- hICC = cmsCreateProfilePlaceholder(ContextID); +- if (!hICC) // can't allocate +- return NULL; +- +- +- cmsSetDeviceClass(hICC, cmsSigAbstractClass); +- cmsSetColorSpace(hICC, cmsSigLabData); +- cmsSetPCS(hICC, cmsSigLabData); +- +- cmsSetHeaderRenderingIntent(hICC, INTENT_PERCEPTUAL); +- +- +- // Creates a Pipeline with 3D grid only +- Pipeline = cmsPipelineAlloc(ContextID, 3, 3); +- if (Pipeline == NULL) { +- cmsCloseProfile(hICC); +- return NULL; +- } ++ int nLUTPoints, ++ cmsFloat64Number Bright, ++ cmsFloat64Number Contrast, ++ cmsFloat64Number Hue, ++ cmsFloat64Number Saturation, ++ int TempSrc, ++ int TempDest) ++{ ++ cmsHPROFILE hICC; ++ cmsPipeline* Pipeline; ++ BCHSWADJUSTS bchsw; ++ cmsCIExyY WhitePnt; ++ cmsStage* CLUT; ++ cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS]; ++ int i; - t4 = tab[2 * sa[0]]; - t5 = tab[2 * sa[0] + 1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *dp++ = (mlib_u16) (t4); - #else - *dp++ = (mlib_u16) (t4 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - sa++; - da = (mlib_u32 *) dp; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - *da++ = (t4 >> 16) + (t5 << 16); - #else - *da++ = (t4 << 16) + (t5 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0] << 3; - s1 = sa[1] << 3; - sa += 2; -@@ -3205,7 +3205,7 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t5 >> 16) + (t0 << 16); - res2 = (t0 >> 16) + (t1 << 16); - res3 = (t1 >> 16) + (t2 << 16); -@@ -3215,7 +3215,7 @@ - res2 = (t0 << 16) + (t1 >> 16); - res3 = (t1 << 16) + (t2 >> 16); - res4 = (t2 << 16) + (t3 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0] << 3; - s1 = sa[1] << 3; - da[0] = res1; -@@ -3229,7 +3229,7 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - res1 = (t5 >> 16) + (t0 << 16); - res2 = (t0 >> 16) + (t1 << 16); - res3 = (t1 >> 16) + (t2 << 16); -@@ -3239,36 +3239,36 @@ - res2 = (t0 << 16) + (t1 >> 16); - res3 = (t1 << 16) + (t2 >> 16); - res4 = (t2 << 16) + (t3 >> 16); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - da[0] = res1; - da[1] = res2; - da[2] = res3; - da[3] = res4; - da += 4; - dp = (mlib_u16 *) da; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[0] = (mlib_u16) (t3 >> 16); - #else - dp[0] = (mlib_u16) t3; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ +- for (i=0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = nLUTPoints; +- CLUT = cmsStageAllocCLut16bitGranular(ContextID, Dimensions, 3, 3, NULL); +- if (CLUT == NULL) return NULL; ++ bchsw.Brightness = Bright; ++ bchsw.Contrast = Contrast; ++ bchsw.Hue = Hue; ++ bchsw.Saturation = Saturation; - if ((size & 1) == 0) { - t0 = tab[2 * sa[0]]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[2] = (mlib_u16) (t0 >> 16); - dp[1] = (mlib_u16) t0; - #else - dp[1] = (mlib_u16) (t0 >> 16); - dp[2] = (mlib_u16) t0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - t0 = tab[2 * sa[0] + 1]; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - dp[4] = (mlib_u16) (t0 >> 16); - dp[3] = (mlib_u16) t0; - #else - dp[3] = (mlib_u16) (t0 >> 16); - dp[4] = (mlib_u16) t0; --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - } - } - } -@@ -3439,7 +3439,7 @@ - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); -@@ -3449,12 +3449,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); -@@ -3464,7 +3464,7 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - dp[4] = t0; - dp[5] = t1; -@@ -3472,7 +3472,7 @@ - dp[7] = t3; - } ++ cmsWhitePointFromTemp(&WhitePnt, TempSrc ); ++ cmsxyY2XYZ(&bchsw.WPsrc, &WhitePnt); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); -@@ -3482,12 +3482,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); -@@ -3497,7 +3497,7 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[4] = t0; - dp[5] = t1; - dp[6] = t2; -@@ -3545,7 +3545,7 @@ - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); -@@ -3559,14 +3559,14 @@ - t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; - dp[4] = t4; - dp[5] = t5; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); -@@ -3580,7 +3580,7 @@ - t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - dp[6] = t0; - dp[7] = t1; -@@ -3590,7 +3590,7 @@ - dp[11] = t5; - } +- if (!cmsStageSampleCLut16bit(CLUT, bchswSampler, (void*) &bchsw, 0)) { ++ cmsWhitePointFromTemp(&WhitePnt, TempDest); ++ cmsxyY2XYZ(&bchsw.WPdest, &WhitePnt); --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); -@@ -3604,14 +3604,14 @@ - t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; - dp[4] = t4; - dp[5] = t5; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); -@@ -3625,7 +3625,7 @@ - t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[6] = t0; - dp[7] = t1; - dp[8] = t2; -@@ -3678,7 +3678,7 @@ - #pragma pipeloop(0) - #endif /* __SUNPRO_C */ - for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); -@@ -3688,12 +3688,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); -@@ -3703,12 +3703,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[4] = t0; - dp[5] = t1; - dp[6] = t2; - dp[7] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); -@@ -3718,12 +3718,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[8] = t0; - dp[9] = t1; - dp[10] = t2; - dp[11] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); -@@ -3733,7 +3733,7 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - s0 = sa[0]; - dp[12] = t0; - dp[13] = t1; -@@ -3741,7 +3741,7 @@ - dp[15] = t3; - } +- // Shouldn't reach here +- cmsPipelineFree(Pipeline); +- cmsCloseProfile(hICC); +- return NULL; +- } ++ hICC = cmsCreateProfilePlaceholder(ContextID); ++ if (!hICC) // can't allocate ++ return NULL; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); -@@ -3751,12 +3751,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[0] = t0; - dp[1] = t1; - dp[2] = t2; - dp[3] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); -@@ -3766,12 +3766,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[4] = t0; - dp[5] = t1; - dp[6] = t2; - dp[7] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC)); -@@ -3781,12 +3781,12 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[8] = t0; - dp[9] = t1; - dp[10] = t2; - dp[11] = t3; --#ifdef _LITTLE_ENDIAN -+#if (BYTE_ORDER == LITTLE_ENDIAN) - t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC)); - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC)); -@@ -3796,7 +3796,7 @@ - t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC)); - t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC)); - t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC)); --#endif /* _LITTLE_ENDIAN */ -+#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - dp[12] = t0; - dp[13] = t1; - dp[14] = t2; ---- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2014-04-20 12:39:16.000000000 -0700 -@@ -27,9 +27,21 @@ - #ifndef MLIB_IMAGE_H - #define MLIB_IMAGE_H +- cmsPipelineInsertStage(Pipeline, cmsAT_END, CLUT); + +- // Create tags ++ cmsSetDeviceClass(hICC, cmsSigAbstractClass); ++ cmsSetColorSpace(hICC, cmsSigLabData); ++ cmsSetPCS(hICC, cmsSigLabData); --#ifdef MACOSX -+#ifdef __OpenBSD__ -+#include -+#endif +- if (!SetTextTags(hICC, L"BCHS built-in")) return NULL; ++ cmsSetHeaderRenderingIntent(hICC, INTENT_PERCEPTUAL); + +- cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void*) cmsD50_XYZ()); ++ // Creates a Pipeline with 3D grid only ++ Pipeline = cmsPipelineAlloc(ContextID, 3, 3); ++ if (Pipeline == NULL) { ++ cmsCloseProfile(hICC); ++ return NULL; ++ } + -+#ifdef _ALLBSD_SOURCE - #include ++ for (i=0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = nLUTPoints; ++ CLUT = cmsStageAllocCLut16bitGranular(ContextID, Dimensions, 3, 3, NULL); ++ if (CLUT == NULL) return NULL; + -+/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */ -+#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \ -+ _BYTE_ORDER == _BIG_ENDIAN -+#undef _LITTLE_ENDIAN - #endif + -+#endif /* _ALLBSD_SOURCE */ ++ if (!cmsStageSampleCLut16bit(CLUT, bchswSampler, (void*) &bchsw, 0)) { + - #include - #include - #include ---- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2014-04-20 12:39:16.000000000 -0700 -@@ -26,7 +26,7 @@ ++ // Shouldn't reach here ++ goto Error; ++ } ++ ++ if (!cmsPipelineInsertStage(Pipeline, cmsAT_END, CLUT)) { ++ goto Error; ++ } ++ ++ // Create tags ++ if (!SetTextTags(hICC, L"BCHS built-in")) return NULL; ++ ++ cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void*) cmsD50_XYZ()); - #include - #include --#ifdef MACOSX -+#ifdef _ALLBSD_SOURCE - #include - #include - #endif -@@ -90,7 +90,10 @@ - * alignment. -- from stdlib.h of MS VC++5.0. - */ - return (void *) malloc(size); --#elif defined(MACOSX) -+#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013) -+ void *ret; -+ return posix_memalign(&ret, 8, size) ? NULL : ret; -+#elif defined(_ALLBSD_SOURCE) - return valloc(size); - #else - return (void *) memalign(8, size); ---- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2014-04-20 12:39:16.000000000 -0700 -@@ -59,7 +59,7 @@ +- cmsWriteTag(hICC, cmsSigAToB0Tag, (void*) Pipeline); ++ cmsWriteTag(hICC, cmsSigAToB0Tag, (void*) Pipeline); - #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__) +- // Pipeline is already on virtual profile +- cmsPipelineFree(Pipeline); ++ // Pipeline is already on virtual profile ++ cmsPipelineFree(Pipeline); --#if defined(MACOSX) -+#if defined(_ALLBSD_SOURCE) - #include /* for ptrdiff_t */ - #include /* for uintptr_t */ - #elif defined(__linux__) ---- jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/awt/splashscreen/splashscreen_impl.c 2014-04-20 12:39:16.000000000 -0700 -@@ -111,8 +111,9 @@ - int - SplashIsStillLooping(Splash * splash) +- // Ok, done +- return hICC; ++ // Ok, done ++ return hICC; ++ ++Error: ++ cmsPipelineFree(Pipeline); ++ cmsCloseProfile(hICC); ++ return NULL; + } + + +@@ -856,7 +877,8 @@ + PostLin = cmsStageAllocToneCurves(ContextID, 1, &EmptyTab); + cmsFreeToneCurve(EmptyTab); + +- cmsPipelineInsertStage(LUT, cmsAT_END, PostLin); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_END, PostLin)) ++ goto Error; + + if (!cmsWriteTag(hProfile, cmsSigBToA0Tag, (void*) LUT)) goto Error; + if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, cmsD50_XYZ())) goto Error; +@@ -999,6 +1021,7 @@ + + { FALSE, 0, cmsSigLut16Type, 4, { cmsSigMatrixElemType, cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType}}, + { FALSE, 0, cmsSigLut16Type, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType}}, ++ { FALSE, 0, cmsSigLut16Type, 2, { cmsSigCurveSetElemType, cmsSigCLutElemType}}, + { TRUE , 0, cmsSigLutAtoBType, 1, { cmsSigCurveSetElemType }}, + { TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 3, { cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType } }, + { TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType } }, +@@ -1059,6 +1082,7 @@ + cmsContext ContextID = cmsGetTransformContextID(hTransform); + const cmsAllowedLUT* AllowedLUT; + cmsTagSignature DestinationTag; ++ cmsProfileClassSignature deviceClass; + + _cmsAssert(hTransform != NULL); + +@@ -1080,13 +1104,15 @@ + // Time to fix the Lab2/Lab4 issue. + if ((xform ->EntryColorSpace == cmsSigLabData) && (Version < 4.0)) { + +- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID))) ++ goto Error; + } + + // On the output side too + if ((xform ->ExitColorSpace) == cmsSigLabData && (Version < 4.0)) { + +- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID))) ++ goto Error; + } + + +@@ -1108,8 +1134,9 @@ + FrmIn = COLORSPACE_SH(ColorSpaceBitsIn) | CHANNELS_SH(ChansIn)|BYTES_SH(2); + FrmOut = COLORSPACE_SH(ColorSpaceBitsOut) | CHANNELS_SH(ChansOut)|BYTES_SH(2); + ++ deviceClass = cmsGetDeviceClass(hProfile); + +- if (cmsGetDeviceClass(hProfile) == cmsSigOutputClass) ++ if (deviceClass == cmsSigOutputClass) + DestinationTag = cmsSigBToA0Tag; + else + DestinationTag = cmsSigAToB0Tag; +@@ -1136,10 +1163,12 @@ + + // Put identity curves if needed + if (cmsPipelineGetPtrToFirstStage(LUT) ->Type != cmsSigCurveSetElemType) +- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn))) ++ goto Error; + + if (cmsPipelineGetPtrToLastStage(LUT) ->Type != cmsSigCurveSetElemType) +- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut)); ++ if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut))) ++ goto Error; + + AllowedLUT = FindCombination(LUT, Version >= 4.0, DestinationTag); + } +@@ -1168,10 +1197,22 @@ + if (!cmsWriteTag(hProfile, cmsSigColorantTableOutTag, xform->OutputColorant)) goto Error; + } + +- if (xform ->Sequence != NULL) { ++ if ((deviceClass == cmsSigLinkClass) && (xform ->Sequence != NULL)) { + if (!_cmsWriteProfileSequence(hProfile, xform ->Sequence)) goto Error; + } + ++ // Set the white point ++ if (deviceClass == cmsSigInputClass) { ++ if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->EntryWhitePoint)) goto Error; ++ } ++ else { ++ if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->ExitWhitePoint)) goto Error; ++ } ++ ++ ++ // Per 7.2.15 in spec 4.3 ++ cmsSetHeaderRenderingIntent(hProfile, xform ->RenderingIntent); ++ + cmsPipelineFree(LUT); + return hProfile; + +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmswtpnt.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmswtpnt.c 2014-04-19 01:27:12.000000000 -0700 +@@ -30,7 +30,7 @@ + //--------------------------------------------------------------------------------- + // + // Little Color Management System +-// Copyright (c) 1998-2010 Marti Maria Saguer ++// Copyright (c) 1998-2012 Marti Maria Saguer + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -76,48 +76,48 @@ + // Obtains WhitePoint from Temperature + cmsBool CMSEXPORT cmsWhitePointFromTemp(cmsCIExyY* WhitePoint, cmsFloat64Number TempK) { -- if (splash->currentFrame < 0) -+ if (splash->currentFrame < 0) { - return 0; +- cmsFloat64Number x, y; +- cmsFloat64Number T, T2, T3; +- // cmsFloat64Number M1, M2; ++ cmsFloat64Number x, y; ++ cmsFloat64Number T, T2, T3; ++ // cmsFloat64Number M1, M2; + +- _cmsAssert(WhitePoint != NULL); +- +- T = TempK; +- T2 = T*T; // Square +- T3 = T2*T; // Cube +- +- // For correlated color temperature (T) between 4000K and 7000K: ++ _cmsAssert(WhitePoint != NULL); + +- if (T >= 4000. && T <= 7000.) +- { +- x = -4.6070*(1E9/T3) + 2.9678*(1E6/T2) + 0.09911*(1E3/T) + 0.244063; +- } +- else +- // or for correlated color temperature (T) between 7000K and 25000K: ++ T = TempK; ++ T2 = T*T; // Square ++ T3 = T2*T; // Cube ++ ++ // For correlated color temperature (T) between 4000K and 7000K: ++ ++ if (T >= 4000. && T <= 7000.) ++ { ++ x = -4.6070*(1E9/T3) + 2.9678*(1E6/T2) + 0.09911*(1E3/T) + 0.244063; + } - return splash->loopCount != 1 || - splash->currentFrame + 1 < splash->frameCount; ++ else ++ // or for correlated color temperature (T) between 7000K and 25000K: + +- if (T > 7000.0 && T <= 25000.0) +- { +- x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T) + 0.237040; +- } +- else { +- cmsSignalError(0, cmsERROR_RANGE, "cmsWhitePointFromTemp: invalid temp"); +- return FALSE; +- } ++ if (T > 7000.0 && T <= 25000.0) ++ { ++ x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T) + 0.237040; ++ } ++ else { ++ cmsSignalError(0, cmsERROR_RANGE, "cmsWhitePointFromTemp: invalid temp"); ++ return FALSE; ++ } + +- // Obtain y(x) ++ // Obtain y(x) + +- y = -3.000*(x*x) + 2.870*x - 0.275; ++ y = -3.000*(x*x) + 2.870*x - 0.275; + +- // wave factors (not used, but here for futures extensions) ++ // wave factors (not used, but here for futures extensions) + +- // M1 = (-1.3515 - 1.7703*x + 5.9114 *y)/(0.0241 + 0.2562*x - 0.7341*y); +- // M2 = (0.0300 - 31.4424*x + 30.0717*y)/(0.0241 + 0.2562*x - 0.7341*y); ++ // M1 = (-1.3515 - 1.7703*x + 5.9114 *y)/(0.0241 + 0.2562*x - 0.7341*y); ++ // M2 = (0.0300 - 31.4424*x + 30.0717*y)/(0.0241 + 0.2562*x - 0.7341*y); + +- WhitePoint -> x = x; +- WhitePoint -> y = y; +- WhitePoint -> Y = 1.0; ++ WhitePoint -> x = x; ++ WhitePoint -> y = y; ++ WhitePoint -> Y = 1.0; + +- return TRUE; ++ return TRUE; } -@@ -121,17 +122,22 @@ - SplashUpdateScreenData(Splash * splash) + + +@@ -266,7 +266,7 @@ + {{ 0.8951, 0.2664, -0.1614 }}, + {{ -0.7502, 1.7135, 0.0367 }}, + {{ 0.0389, -0.0685, 1.0296 }} +- }}; ++ }}; + + if (ConeMatrix == NULL) + ConeMatrix = &LamRigg; +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c 2014-04-19 01:27:12.000000000 -0700 +@@ -396,7 +396,7 @@ + static _cmsTransformCollection* TransformCollection = NULL; + + // Register new ways to transform +-cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Data) ++cmsBool _cmsRegisterTransformPlugin(cmsContext id, cmsPluginBase* Data) { - ImageRect srcRect, dstRect; -+ if (splash->currentFrame < 0) { -+ return; -+ } + cmsPluginTransform* Plugin = (cmsPluginTransform*) Data; + _cmsTransformCollection* fl; +@@ -412,7 +412,7 @@ + if (Plugin ->Factory == NULL) return FALSE; - initRect(&srcRect, 0, 0, splash->width, splash->height, 1, - splash->width * sizeof(rgbquad_t), - splash->frames[splash->currentFrame].bitmapBits, &splash->imageFormat); -- if (splash->screenData) -+ if (splash->screenData) { - free(splash->screenData); + +- fl = (_cmsTransformCollection*) _cmsPluginMalloc(sizeof(_cmsTransformCollection)); ++ fl = (_cmsTransformCollection*) _cmsPluginMalloc(id, sizeof(_cmsTransformCollection)); + if (fl == NULL) return FALSE; + + // Copy the parameters +@@ -651,6 +651,22 @@ + + // ---------------------------------------------------------------------------------------------------------------- + ++static ++void SetWhitePoint(cmsCIEXYZ* wtPt, const cmsCIEXYZ* src) ++{ ++ if (src == NULL) { ++ wtPt ->X = cmsD50X; ++ wtPt ->Y = cmsD50Y; ++ wtPt ->Z = cmsD50Z; + } - splash->screenStride = splash->width * splash->screenFormat.depthBytes; -- if (splash->byteAlignment > 1) -+ if (splash->byteAlignment > 1) { - splash->screenStride = - (splash->screenStride + splash->byteAlignment - 1) & - ~(splash->byteAlignment - 1); ++ else { ++ wtPt ->X = src->X; ++ wtPt ->Y = src->Y; ++ wtPt ->Z = src->Z; + } - splash->screenData = malloc(splash->height * splash->screenStride); - initRect(&dstRect, 0, 0, splash->width, splash->height, 1, - splash->screenStride, splash->screenData, &splash->screenFormat); -@@ -146,16 +152,19 @@ - void - SplashNextFrame(Splash * splash) ++ ++} ++ + // New to lcms 2.0 -- have all parameters available. + cmsHTRANSFORM CMSEXPORT cmsCreateExtendedTransform(cmsContext ContextID, + cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[], +@@ -664,7 +680,6 @@ + cmsUInt32Number dwFlags) { -- if (splash->currentFrame < 0) -+ if (splash->currentFrame < 0) { - return; -+ } - do { -- if (!SplashIsStillLooping(splash)) -+ if (!SplashIsStillLooping(splash)) { - return; -+ } - splash->time += splash->frames[splash->currentFrame].delay; - if (++splash->currentFrame >= splash->frameCount) { - splash->currentFrame = 0; -- if (splash->loopCount > 0) -+ if (splash->loopCount > 0) { - splash->loopCount--; -+ } - } - } while (splash->time + splash->frames[splash->currentFrame].delay - - SplashTime() <= 0); -@@ -183,8 +192,9 @@ - pSrc += pSrcRect->depthBytes; - ++i; - } -- if (i >= pSrcRect->numSamples) -+ if (i >= pSrcRect->numSamples) { - break; -+ } - i0 = i; - while (i < pSrcRect->numSamples && - getRGBA(pSrc, pSrcRect->format) >= ALPHA_THRESHOLD) { ---- jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -55,7 +55,7 @@ - (const AlternateSetTable *) ((char *) this + alternateSetTableOffset)); - TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]); + _cmsTRANSFORM* xform; +- cmsBool FloatTransform; + cmsColorSpaceSignature EntryColorSpace; + cmsColorSpaceSignature ExitColorSpace; + cmsPipeline* Lut; +@@ -681,9 +696,7 @@ + if (hGamutProfile == NULL) dwFlags &= ~cmsFLAGS_GAMUTCHECK; + } + +- // On floating point transforms, inhibit optimizations +- FloatTransform = (_cmsFormatterIsFloat(InputFormat) && _cmsFormatterIsFloat(OutputFormat)); +- ++ // On floating point transforms, inhibit cache + if (_cmsFormatterIsFloat(InputFormat) || _cmsFormatterIsFloat(OutputFormat)) + dwFlags |= cmsFLAGS_NOCACHE; + +@@ -730,6 +743,10 @@ + xform ->ExitColorSpace = ExitColorSpace; + xform ->RenderingIntent = Intents[nProfiles-1]; + ++ // Take white points ++ SetWhitePoint(&xform->EntryWhitePoint, (cmsCIEXYZ*) cmsReadTag(hProfiles[0], cmsSigMediaWhitePointTag)); ++ SetWhitePoint(&xform->ExitWhitePoint, (cmsCIEXYZ*) cmsReadTag(hProfiles[nProfiles-1], cmsSigMediaWhitePointTag)); ++ + + // Create a gamut check LUT if requested + if (hGamutProfile != NULL && (dwFlags & cmsFLAGS_GAMUTCHECK)) +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/lcms2.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/lcms2.h 2014-04-19 01:27:12.000000000 -0700 +@@ -30,7 +30,7 @@ + //--------------------------------------------------------------------------------- + // + // Little Color Management System +-// Copyright (c) 1998-2011 Marti Maria Saguer ++// Copyright (c) 1998-2013 Marti Maria Saguer + // + // Permission is hereby granted, free of charge, to any person obtaining + // a copy of this software and associated documentation files (the "Software"), +@@ -52,7 +52,7 @@ + // + //--------------------------------------------------------------------------------- + // +-// Version 2.4 ++// Version 2.5 + // + + #ifndef _lcms2_H +@@ -101,7 +101,7 @@ + #endif + + // Version/release +-#define LCMS_VERSION 2040 ++#define LCMS_VERSION 2050 + + // I will give the chance of redefining basic types for compilers that are not fully C99 compliant + #ifndef CMS_BASIC_TYPES_ALREADY_DEFINED +@@ -367,6 +367,7 @@ + cmsSigPreview1Tag = 0x70726531, // 'pre1' + cmsSigPreview2Tag = 0x70726532, // 'pre2' + cmsSigProfileDescriptionTag = 0x64657363, // 'desc' ++ cmsSigProfileDescriptionMLTag = 0x6473636d, // 'dscm' + cmsSigProfileSequenceDescTag = 0x70736571, // 'pseq' + cmsSigProfileSequenceIdTag = 0x70736964, // 'psid' + cmsSigPs2CRD0Tag = 0x70736430, // 'psd0' +@@ -1014,6 +1015,7 @@ + // Plug-In registering --------------------------------------------------------------------------------------------------- + + CMSAPI cmsBool CMSEXPORT cmsPlugin(void* Plugin); ++CMSAPI cmsBool CMSEXPORT cmsPluginTHR(cmsContext ContextID, void* Plugin); + CMSAPI void CMSEXPORT cmsUnregisterPlugins(void); + + // Error logging ---------------------------------------------------------------------------------------------------------- +@@ -1190,7 +1192,7 @@ + // Where to place/locate the stages in the pipeline chain + typedef enum { cmsAT_BEGIN, cmsAT_END } cmsStageLoc; + +-CMSAPI void CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe); ++CMSAPI int CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe); + CMSAPI void CMSEXPORT cmsPipelineUnlinkStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage** mpe); + + // This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements +@@ -1274,6 +1276,13 @@ + const char LanguageCode[3], const char CountryCode[3], + char ObtainedLanguage[3], char ObtainedCountry[3]); + ++CMSAPI cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu); ++ ++CMSAPI cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu, ++ cmsUInt32Number idx, ++ char LanguageCode[3], ++ char CountryCode[3]); ++ + // Undercolorremoval & black generation ------------------------------------------------------------------------------------- + + typedef struct { +@@ -1424,6 +1433,7 @@ + CMSAPI void CMSEXPORT cmsSetHeaderFlags(cmsHPROFILE hProfile, cmsUInt32Number Flags); + CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile); + CMSAPI void CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer); ++CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile); + CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile); + CMSAPI void CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model); + CMSAPI void CMSEXPORT cmsSetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number Flags); +--- ./jdk/src/share/native/sun/java2d/cmm/lcms/lcms2_internal.h 2013-09-06 11:29:02.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/lcms2_internal.h 2014-04-19 01:27:12.000000000 -0700 +@@ -27,7 +27,7 @@ + // However, the following notice accompanied the original version of this + // file: + // +-//--------------------------------------------------------------------------------- ++ + // + // Little Color Management System + // Copyright (c) 1998-2011 Marti Maria Saguer +@@ -196,7 +196,7 @@ + // Plug-In registering --------------------------------------------------------------- + + // Specialized function for plug-in memory management. No pairing free() since whole pool is freed at once. +-void* _cmsPluginMalloc(cmsUInt32Number size); ++void* _cmsPluginMalloc(cmsContext ContextID, cmsUInt32Number size); + + // Memory management + cmsBool _cmsRegisterMemHandlerPlugin(cmsPluginBase* Plugin); +@@ -205,28 +205,28 @@ + cmsBool _cmsRegisterInterpPlugin(cmsPluginBase* Plugin); + + // Parametric curves +-cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Plugin); + + // Formatters management +-cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterFormattersPlugin(cmsContext ContextID, cmsPluginBase* Plugin); -- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { -+ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate), success)) { - glyphIterator->setCurrGlyphID(SWAPW(alternateSetTable->alternateArray[0])); - } + // Tag type management +-cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterTagTypePlugin(cmsContext ContextID, cmsPluginBase* Plugin); ---- jdk/src/share/native/sun/font/layout/AnchorTables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/AnchorTables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -37,55 +37,54 @@ + // Tag management +-cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterTagPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - U_NAMESPACE_BEGIN + // Intent management +-cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext ContextID, cmsPluginBase* Plugin); --void AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, -- LEPoint &anchor) const -+void AnchorTable::getAnchor(const LETableReference &base, LEGlyphID glyphID, const LEFontInstance *fontInstance, -+ LEPoint &anchor, LEErrorCode &success) const - { - switch(SWAPW(anchorFormat)) { - case 1: - { -- const Format1AnchorTable *f1 = (const Format1AnchorTable *) this; + // Multi Process elements +-cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext ContextID, cmsPluginBase* Plugin); + + // Optimization +-cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterOptimizationPlugin(cmsContext ContextID, cmsPluginBase* Plugin); + + // Transform +-cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Plugin); ++cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Plugin); + + // --------------------------------------------------------------------------------------------------------- + +@@ -263,7 +263,7 @@ + cmsUInt16Number Country; + + cmsUInt32Number StrW; // Offset to current unicode string +- cmsUInt32Number Len; // Lenght in bytes ++ cmsUInt32Number Len; // Length in bytes + + } _cmsMLUentry; + +@@ -330,9 +330,11 @@ + cmsColorSpaceSignature ColorSpace; + cmsColorSpaceSignature PCS; + cmsUInt32Number RenderingIntent; ++ + cmsUInt32Number flags; + cmsUInt32Number manufacturer, model; + cmsUInt64Number attributes; ++ cmsUInt32Number creator; + + cmsProfileID ProfileID; + +@@ -585,6 +587,10 @@ + cmsColorSpaceSignature EntryColorSpace; + cmsColorSpaceSignature ExitColorSpace; + ++ // White points (informative only) ++ cmsCIEXYZ EntryWhitePoint; ++ cmsCIEXYZ ExitWhitePoint; ++ + // Profiles used to create the transform + cmsSEQ* Sequence; + +--- ./jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2013-09-06 11:29:03.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2014-01-18 12:16:24.000000000 -0800 +@@ -661,7 +661,12 @@ + (sy2-sy1) != (jint)(dy2-dy1) || + oglc->extraAlpha != 1.0f; + break; - -- f1->getAnchor(fontInstance, anchor); -+ LEReferenceTo f1(base, success); -+ f1->getAnchor(f1, fontInstance, anchor, success); - break; ++#ifdef MACOSX ++ case OGLC_VENDOR_ATI: ++ // see 8024461 ++ viaTexture = JNI_TRUE; ++ break; ++#endif + default: + // just use the glDrawPixels() codepath + viaTexture = JNI_FALSE; +--- ./jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2013-09-06 11:29:03.000000000 -0700 ++++ ./jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2014-06-06 19:56:34.000000000 -0700 +@@ -26,7 +26,7 @@ + #ifndef OGLFuncs_h_Included + #define OGLFuncs_h_Included + +-#ifdef MACOSX ++#ifdef _ALLBSD_SOURCE + #include + #endif + #include "jni.h" +--- ./jdk/src/share/native/sun/management/Flag.c 2013-09-06 11:29:03.000000000 -0700 ++++ ./jdk/src/share/native/sun/management/Flag.c 2014-04-19 01:27:12.000000000 -0700 +@@ -95,12 +95,12 @@ + return 0; } - case 2: - { -- const Format2AnchorTable *f2 = (const Format2AnchorTable *) this; -- -- f2->getAnchor(glyphID, fontInstance, anchor); -+ LEReferenceTo f2(base, success); -+ f2->getAnchor(f2, glyphID, fontInstance, anchor, success); - break; +- if (count == 0) { ++ if (count <= 0) { + JNU_ThrowIllegalArgumentException(env, 0); + return 0; } - case 3: - { -- const Format3AnchorTable *f3 = (const Format3AnchorTable *) this; -- -- f3->getAnchor(fontInstance, anchor); -+ LEReferenceTo f3(base, success); -+ f3->getAnchor(f3, fontInstance, anchor, success); - break; +- gsize = count * sizeof(jmmVMGlobal); ++ gsize = (size_t)count * sizeof(jmmVMGlobal); + globals = (jmmVMGlobal*) malloc(gsize); + if (globals == NULL) { + JNU_ThrowOutOfMemoryError(env, 0); +--- ./jdk/src/share/native/sun/management/GcInfoBuilder.c 2013-09-06 11:29:03.000000000 -0700 ++++ ./jdk/src/share/native/sun/management/GcInfoBuilder.c 2014-06-06 19:56:34.000000000 -0700 +@@ -59,12 +59,12 @@ + return; } - default: -+ { - // unknown format: just use x, y coordinate, like format 1... -- const Format1AnchorTable *f1 = (const Format1AnchorTable *) this; -- -- f1->getAnchor(fontInstance, anchor); -+ LEReferenceTo f1(base, success); -+ f1->getAnchor(f1, fontInstance, anchor, success); - break; +- if (num_attributes == 0) { ++ if (num_attributes <= 0) { + JNU_ThrowIllegalArgumentException(env, "Invalid num_attributes"); + return; } - } -+} --void Format1AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const -+void Format1AnchorTable::getAnchor(const LEReferenceTo& base, const LEFontInstance *fontInstance, LEPoint &anchor, LEErrorCode &success) const - { - le_int16 x = SWAPW(xCoordinate); - le_int16 y = SWAPW(yCoordinate); - LEPoint pixels; +- ext_att_info = (jmmExtAttributeInfo*) malloc(num_attributes * ++ ext_att_info = (jmmExtAttributeInfo*) malloc((size_t)num_attributes * + sizeof(jmmExtAttributeInfo)); + if (ext_att_info == NULL) { + JNU_ThrowOutOfMemoryError(env, 0); +@@ -78,7 +78,7 @@ + return; + } - fontInstance->transformFunits(x, y, pixels); -- - fontInstance->pixelsToUnits(pixels, anchor); - } +- nativeTypes = (jchar*) malloc(num_attributes * sizeof(jchar)); ++ nativeTypes = (jchar*) malloc((size_t)num_attributes * sizeof(jchar)); + if (nativeTypes == NULL) { + free(ext_att_info); + JNU_ThrowOutOfMemoryError(env, 0); +@@ -188,11 +188,16 @@ + return 0; + } --void Format2AnchorTable::getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor) const -+void Format2AnchorTable::getAnchor(const LEReferenceTo& base, -+ LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor -+ , LEErrorCode &success) const ++ if (ext_att_count <= 0) { ++ JNU_ThrowIllegalArgumentException(env, "Invalid ext_att_count"); ++ return 0; ++ } ++ + gc_stat.usage_before_gc = usageBeforeGC; + gc_stat.usage_after_gc = usageAfterGC; + gc_stat.gc_ext_attribute_values_size = ext_att_count; + if (ext_att_count > 0) { +- gc_stat.gc_ext_attribute_values = (jvalue*) malloc(ext_att_count * ++ gc_stat.gc_ext_attribute_values = (jvalue*) malloc((size_t)ext_att_count * + sizeof(jvalue)); + if (gc_stat.gc_ext_attribute_values == NULL) { + JNU_ThrowOutOfMemoryError(env, 0); +@@ -212,7 +217,7 @@ + } + + // convert the ext_att_types to native types +- nativeTypes = (jchar*) malloc(ext_att_count * sizeof(jchar)); ++ nativeTypes = (jchar*) malloc((size_t)ext_att_count * sizeof(jchar)); + if (nativeTypes == NULL) { + if (gc_stat.gc_ext_attribute_values != NULL) { + free(gc_stat.gc_ext_attribute_values); +--- ./jdk/src/share/native/sun/management/HotSpotDiagnostic.c 2013-09-06 11:29:03.000000000 -0700 ++++ ./jdk/src/share/native/sun/management/HotSpotDiagnostic.c 2013-12-01 11:14:31.000000000 -0800 +@@ -29,7 +29,7 @@ + #include "sun_management_HotSpotDiagnostic.h" + + JNIEXPORT void JNICALL +-Java_sun_management_HotSpotDiagnostic_dumpHeap ++Java_sun_management_HotSpotDiagnostic_dumpHeap0 + (JNIEnv *env, jobject dummy, jstring outputfile, jboolean live) { - LEPoint point; + jmm_interface->DumpHeap0(env, outputfile, live); +--- ./jdk/src/share/native/sun/security/krb5/nativeccache.c 2013-09-06 11:29:04.000000000 -0700 ++++ ./jdk/src/share/native/sun/security/krb5/nativeccache.c 2014-06-06 19:56:32.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011,2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -264,13 +264,22 @@ -@@ -100,7 +99,8 @@ - fontInstance->pixelsToUnits(point, anchor); } --void Format3AnchorTable::getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const -+void Format3AnchorTable::getAnchor(const LEReferenceTo &base, const LEFontInstance *fontInstance, -+ LEPoint &anchor, LEErrorCode &success) const ++int isIn(krb5_enctype e, int n, jint* etypes) ++{ ++ int i; ++ for (i=0; itransformFunits(x, y, pixels); - - if (dtxOffset != 0) { -- const DeviceTable *dtx = (const DeviceTable *) ((char *) this + dtxOffset); -- le_int16 adjx = dtx->getAdjustment((le_int16) fontInstance->getXPixelsPerEm()); -+ LEReferenceTo dt(base, success, dtxOffset); -+ le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success); + jobject krbCreds = NULL; + krb5_error_code err = 0; +@@ -279,6 +288,8 @@ + krb5_creds creds; + krb5_flags flags = 0; + krb5_context kcontext = NULL; ++ int netypes; ++ jint *etypes = NULL; + + /* Initialize the Kerberos 5 context */ + err = krb5_init_context (&kcontext); +@@ -295,6 +306,9 @@ + err = krb5_cc_start_seq_get (kcontext, ccache, &cursor); + } + ++ netypes = (*env)->GetArrayLength(env, jetypes); ++ etypes = (jint *) (*env)->GetIntArrayElements(env, jetypes, NULL); ++ + if (!err) { + while ((err = krb5_cc_next_cred (kcontext, ccache, &cursor, &creds)) == 0) { + char *serverName = NULL; +@@ -305,7 +319,8 @@ + } - pixels.fX += adjx; + if (!err) { +- if (strncmp (serverName, "krbtgt", strlen("krbtgt")) == 0) { ++ if (strncmp (serverName, "krbtgt", sizeof("krbtgt")-1) == 0 && ++ isIn(creds.keyblock.enctype, netypes, etypes)) { + jobject ticket, clientPrincipal, targetPrincipal, encryptionKey; + jobject ticketFlags, startTime, endTime; + jobject authTime, renewTillTime, hostAddresses; +@@ -321,7 +336,7 @@ + targetPrincipal = BuildClientPrincipal(env, kcontext, creds.server); + if (targetPrincipal == NULL) goto cleanup; + +- // Build a com.ibm.security.krb5.Ticket ++ // Build a sun/security/krb5/internal/Ticket + ticket = BuildTicket(env, &creds.ticket); + if (ticket == NULL) goto cleanup; + +@@ -353,7 +368,7 @@ + krbcredsConstructor = (*env)->GetMethodID(env, krbcredsClass, "", + "(Lsun/security/krb5/internal/Ticket;Lsun/security/krb5/PrincipalName;Lsun/security/krb5/PrincipalName;Lsun/security/krb5/EncryptionKey;Lsun/security/krb5/internal/TicketFlags;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/HostAddresses;)V"); + if (krbcredsConstructor == 0) { +- printf("Couldn't find com.ibm.security.krb5.Credentials constructor\n"); ++ printf("Couldn't find sun.security.krb5.internal.Ticket constructor\n"); + break; + } + } +@@ -409,6 +424,10 @@ + printiferr (err, "while finishing ticket retrieval"); } - if (dtyOffset != 0) { -- const DeviceTable *dty = (const DeviceTable *) ((char *) this + dtyOffset); -- le_int16 adjy = dty->getAdjustment((le_int16) fontInstance->getYPixelsPerEm()); -+ LEReferenceTo dt(base, success, dtyOffset); -+ le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success); ++ if (etypes != NULL) { ++ (*env)->ReleaseIntArrayElements(env, jetypes, etypes, 0); ++ } ++ + krb5_free_context (kcontext); + return krbCreds; + } +--- ./jdk/src/solaris/back/linker_md.c 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/back/linker_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -55,29 +55,27 @@ + #endif - pixels.fY += adjy; - } ---- jdk/src/share/native/sun/font/layout/AnchorTables.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/AnchorTables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -49,20 +49,23 @@ - le_int16 xCoordinate; - le_int16 yCoordinate; + static void dll_build_name(char* buffer, size_t buflen, +- const char* pname, const char* fname) { +- // Based on os_solaris.cpp ++ const char* paths, const char* fname) { ++ char *path, *paths_copy, *next_token; + +- char *path_sep = PATH_SEPARATOR; +- char *pathname = (char *)pname; +- while (strlen(pathname) > 0) { +- char *p = strchr(pathname, *path_sep); +- if (p == NULL) { +- p = pathname + strlen(pathname); +- } +- /* check for NULL path */ +- if (p == pathname) { +- continue; +- } +- (void)snprintf(buffer, buflen, "%.*s/lib%s." LIB_SUFFIX, (p - pathname), +- pathname, fname); ++ paths_copy = strdup(paths); ++ if (paths_copy == NULL) { ++ return; ++ } ++ ++ next_token = NULL; ++ path = strtok_r(paths_copy, PATH_SEPARATOR, &next_token); -- void getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, -- LEPoint &anchor) const; -+ void getAnchor(const LETableReference &base, LEGlyphID glyphID, const LEFontInstance *fontInstance, -+ LEPoint &anchor, LEErrorCode &success) const; - }; ++ while (path != NULL) { ++ snprintf(buffer, buflen, "%s/lib%s." LIB_SUFFIX, path, fname); + if (access(buffer, F_OK) == 0) { + break; + } +- pathname = p + 1; + *buffer = '\0'; ++ path = strtok_r(NULL, PATH_SEPARATOR, &next_token); + } ++ ++ free(paths_copy); + } - struct Format1AnchorTable : AnchorTable + /* +@@ -98,7 +96,7 @@ + * appropriate pre and extensions to a filename and the path + */ + void +-dbgsysBuildLibName(char *holder, int holderlen, char *pname, char *fname) ++dbgsysBuildLibName(char *holder, int holderlen, const char *pname, const char *fname) { -- void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const; -+ void getAnchor(const LEReferenceTo& base, -+ const LEFontInstance *fontInstance, LEPoint &anchor, LEErrorCode &success) const; - }; + const int pnamelen = pname ? strlen(pname) : 0; - struct Format2AnchorTable : AnchorTable - { - le_uint16 anchorPoint; +--- ./jdk/src/solaris/back/util_md.h 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/back/util_md.h 2014-06-06 19:56:34.000000000 -0700 +@@ -51,7 +51,7 @@ -- void getAnchor(LEGlyphID glyphID, const LEFontInstance *fontInstance, LEPoint &anchor) const; -+ void getAnchor(const LEReferenceTo& base, -+ LEGlyphID glyphID, const LEFontInstance *fontInstance, -+ LEPoint &anchor, LEErrorCode &success) const; - }; + /* On little endian machines, convert java big endian numbers. */ - struct Format3AnchorTable : AnchorTable -@@ -70,7 +73,9 @@ - Offset xDeviceTableOffset; - Offset yDeviceTableOffset; +-#if defined(_LITTLE_ENDIAN) ++#if (BYTE_ORDER == LITTLE_ENDIAN) -- void getAnchor(const LEFontInstance *fontInstance, LEPoint &anchor) const; -+ void getAnchor(const LEReferenceTo& base, -+ const LEFontInstance *fontInstance, LEPoint &anchor, -+ LEErrorCode &success) const; - }; + #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 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/bin/ergo.c 2014-06-06 19:56:34.000000000 -0700 +@@ -100,6 +100,27 @@ + /* Compute physical memory by asking the OS */ + uint64_t + physical_memory(void) { ++#if !defined(MACOSX) && defined(_ALLBSD_SOURCE) ++ uint64_t result; ++#ifdef HW_PHYSMEM64 ++ int64_t physmem; ++ int name[2] = { CTL_HW, HW_PHYSMEM64 }; ++#else ++ unsigned long physmem; ++ int name[2] = { CTL_HW, HW_PHYSMEM }; ++#endif ++ size_t physmem_len = sizeof(physmem); ++# define UINT64_FORMAT "%" PRIu64 ++ ++ if (sysctl(name, 2, &physmem, &physmem_len, NULL, 0) == -1) ++ physmem = 256 * MB; ++ ++ result = (uint64_t)physmem; ++ ++ JLI_TraceLauncher("physical memory: " UINT64_FORMAT " (%.3fGB)\n", ++ result, result / (double) GB); ++ return result; ++#else /* !_ALLBSD_SOURCE */ + const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES); + const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE); + const uint64_t result = pages * page_size; +@@ -110,4 +131,5 @@ + " physical memory: " UINT64_FORMAT " (%.3fGB)\n", + pages, page_size, result, result / (double) GB); + return result; ++#endif + } +--- ./jdk/src/solaris/bin/ergo.h 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/bin/ergo.h 2014-06-06 19:56:34.000000000 -0700 +@@ -33,6 +33,10 @@ + #include + #include + #include ++#ifdef _ALLBSD_SOURCE ++#include ++#include ++#endif - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -51,7 +51,7 @@ + #include "java.h" - U_NAMESPACE_BEGIN +--- ./jdk/src/solaris/bin/ergo_i586.c 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/bin/ergo_i586.c 2014-06-06 19:56:34.000000000 -0700 +@@ -106,7 +106,7 @@ --le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const -+le_bool CharSubstitutionFilter::accept(LEGlyphID glyph, LEErrorCode &/*success*/) const - { - return fFontInstance->canDisplay((LEUnicode) glyph); + #endif /* __solaris__ */ + +-#ifdef __linux__ ++#if !defined(MACOSX) && (defined(__linux__) || defined(_ALLBSD_SOURCE)) + + /* + * A utility method for asking the CPU about itself. +@@ -171,6 +171,12 @@ + #endif /* _LP64 */ } -@@ -147,7 +147,9 @@ - GDEFMarkFilter filter(fGDEFTable, success); - adjustMarkGlyphs(glyphStorage, &filter, success); - } else { -- LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); -+ LEReferenceTo gdefTable(LETableReference::kStaticData, -+ CanonShaping::glyphDefinitionTable, -+ CanonShaping::glyphDefinitionTableLen); - GDEFMarkFilter filter(gdefTable, success); - adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); -@@ -157,8 +159,8 @@ - UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) - : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success) - { -- fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable; -- fGDEFTable = (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; -+ fGSUBTable.setTo(LETableReference::kStaticData, (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable, CanonShaping::glyphSubstitutionTableLen); -+ fGDEFTable.setTo(LETableReference::kStaticData, (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); - /* OpenTypeLayoutEngine will allocate a substitution filter */ ++#ifdef __linux__ ++#define OSNAMEPREFIX "linux_" ++#else ++#define OSNAMEPREFIX "bsd_" ++#endif ++ + /* The definition of a server-class machine for linux-i586 */ + jboolean + ServerClassMachineImpl(void) { +@@ -193,11 +199,11 @@ + result = JNI_TRUE; + } + } +- JLI_TraceLauncher("linux_" LIBARCHNAME "_ServerClassMachine: %s\n", ++ JLI_TraceLauncher(OSNAMEPREFIX LIBARCHNAME "_ServerClassMachine: %s\n", + (result == JNI_TRUE ? "true" : "false")); + return result; } +-#endif /* __linux__ */ ++#endif /* !MACOSX && (__linux__ || _ALLBSD_SOURCE) */ ---- jdk/src/share/native/sun/font/layout/ArabicShaping.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ArabicShaping.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -59,7 +59,8 @@ - ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c) - { - LEErrorCode success = LE_NO_ERROR; -- const LEReferenceTo joiningTypes((const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, -+ const LEReferenceTo joiningTypes(LETableReference::kStaticData, -+ (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, - ArabicShaping::shapingTypeTableLen); - le_int32 joiningType = joiningTypes->getGlyphClass(joiningTypes, c, success); + /* + * Routines shared by solaris-i586 and linux-i586. +@@ -308,6 +314,15 @@ + /* Compute the number of physical processors, not logical processors */ + static unsigned long + physical_processors(void) { ++#if !defined(MACOSX) && defined(_ALLBSD_SOURCE) ++ unsigned long result; ++ int name[2] = { CTL_HW, HW_NCPU }; ++ size_t rlen = sizeof(result); ++ ++ if (sysctl(name, 2, &result, &rlen, NULL, 0) == -1) ++ result = 1; ++ return result; ++#else + const long sys_processors = sysconf(_SC_NPROCESSORS_CONF); + unsigned long result = sys_processors; + +@@ -320,4 +335,5 @@ + } + JLI_TraceLauncher("physical processors: %lu\n", result); + return result; ++#endif + } +--- ./jdk/src/solaris/bin/java_md_solinux.c 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/bin/java_md_solinux.c 2014-06-06 21:15:42.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -899,8 +899,9 @@ + * onwards the filename returned in DL_info structure from dladdr is + * an absolute pathname so technically realpath isn't required. + * On Linux we read the executable name from /proc/self/exe. +- * As a fallback, and for platforms other than Solaris and Linux, +- * we use FindExecName to compute the executable name. ++ * On *BSD we read the executable name from /proc/curproc/file. ++ * As a fallback, and for platforms other than Solaris, Linux, and ++ * *BSD, we use FindExecName to compute the executable name. + */ + const char* + SetExecname(char **argv) +@@ -927,9 +928,13 @@ + } + } + } +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(_ALLBSD_SOURCE) + { ++#if defined(_ALLBSD_SOURCE) ++ const char* self = "/proc/curproc/file"; ++#else + const char* self = "/proc/self/exe"; ++#endif + char buf[PATH_MAX+1]; + int len = readlink(self, buf, PATH_MAX); + if (len >= 0) { +@@ -937,7 +942,7 @@ + exec_path = JLI_StringDup(buf); + } + } +-#else /* !__solaris__ && !__linux__ */ ++#else /* !__solaris__ && !__linux__ && !_ALLBSD_SOURCE */ + { + /* Not implemented */ + } +@@ -950,15 +955,46 @@ + return exec_path; + } + ++#if !defined(MACOSX) && defined(_ALLBSD_SOURCE) ++/* ++ * BSD's implementation of CounterGet() ++ */ ++int64_t ++CounterGet() ++{ ++ struct timeval tv; ++ gettimeofday(&tv, NULL); ++ return (tv.tv_sec * 1000) + tv.tv_usec; ++} ++#endif ++ + /* --- Splash Screen shared library support --- */ + static const char* SPLASHSCREEN_SO = JNI_LIB_NAME("splashscreen"); + static void* hSplashLib = NULL; + + void* SplashProcAddress(const char* name) { + if (!hSplashLib) { +- const char * splashLibPath; +- splashLibPath = SPLASHSCREEN_SO; +- hSplashLib = dlopen(splashLibPath, RTLD_LAZY | RTLD_GLOBAL); ++ int ret; ++ char jrePath[MAXPATHLEN]; ++ char splashPath[MAXPATHLEN]; ++ ++ if (!GetJREPath(jrePath, sizeof(jrePath), GetArch(), JNI_FALSE)) { ++ JLI_ReportErrorMessage(JRE_ERROR1); ++ return NULL; ++ } ++ ret = JLI_Snprintf(splashPath, sizeof(splashPath), "%s/lib/%s/%s", ++ jrePath, GetArch(), SPLASHSCREEN_SO); ++ ++ if (ret >= (int) sizeof(splashPath)) { ++ JLI_ReportErrorMessage(JRE_ERROR11); ++ return NULL; ++ } ++ if (ret < 0) { ++ JLI_ReportErrorMessage(JRE_ERROR13); ++ return NULL; ++ } ++ hSplashLib = dlopen(splashPath, RTLD_LAZY | RTLD_GLOBAL); ++ JLI_TraceLauncher("Info: loaded %s\n", splashPath); + } + if (hSplashLib) { + void* sym = dlsym(hSplashLib, name); +--- ./jdk/src/solaris/bin/java_md_solinux.h 2013-09-06 11:29:05.000000000 -0700 ++++ ./jdk/src/solaris/bin/java_md_solinux.h 2014-06-06 19:56:34.000000000 -0700 +@@ -33,6 +33,10 @@ + #include + #define CounterGet() (gethrtime()/1000) + #define Counter2Micros(counts) (counts) ++#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE) ++/* CounterGet() is implemented in java_md_solinux.c */ ++int64_t CounterGet(void); ++#define Counter2Micros(counts) (counts) + #else /* ! HAVE_GETHRTIME */ + #define CounterGet() (0) + #define Counter2Micros(counts) (1) +@@ -48,6 +52,9 @@ + #ifdef __linux__ + static const char *system_dir = "/usr/java"; + static const char *user_dir = "/java"; ++#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE) ++static const char *system_dir = PACKAGE_PATH "/openjdk7"; ++static const char *user_dir = "/java"; + #else /* Solaris */ + static const char *system_dir = "/usr/jdk"; + static const char *user_dir = "/jdk"; +--- ./jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd 2014-06-06 19:56:34.000000000 -0700 +@@ -63,11 +63,66 @@ + private /* final */ InputStream stdout; + private /* final */ InputStream stderr; ---- jdk/src/share/native/sun/font/layout/CanonShaping.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/CanonShaping.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -60,7 +60,7 @@ - LEUnicode *outChars, LEGlyphStorage &glyphStorage) - { - LEErrorCode success = LE_NO_ERROR; -- LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); -+ LEReferenceTo gdefTable(LETableReference::kStaticData, CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); - LEReferenceTo classTable = gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success); - le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount); - le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount); ---- jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/CharSubstitutionFilter.h 2014-04-20 12:39:16.000000000 -0700 -@@ -43,6 +43,8 @@ - * This filter is used by character-based GSUB processors. It - * accepts only those characters which the given font can display. - * -+ * Note: Implementation is in ArabicLayoutEngine.cpp -+ * - * @internal - */ - class CharSubstitutionFilter : public UMemory, public LEGlyphFilter -@@ -97,7 +99,7 @@ ++ private static enum LaunchMechanism { ++ FORK(1), ++ POSIX_SPAWN(2); ++ ++ private int value; ++ LaunchMechanism(int x) {value = x;} ++ }; ++ ++ /* On BSD, the default is to spawn */ ++ private static final LaunchMechanism launchMechanism; ++ private static byte[] helperpath; ++ ++ private static byte[] toCString(String s) { ++ if (s == null) ++ return null; ++ byte[] bytes = s.getBytes(); ++ byte[] result = new byte[bytes.length + 1]; ++ System.arraycopy(bytes, 0, ++ result, 0, ++ bytes.length); ++ result[result.length-1] = (byte)0; ++ return result; ++ } ++ ++ static { ++ launchMechanism = AccessController.doPrivileged( ++ new PrivilegedAction() ++ { ++ public LaunchMechanism run() { ++ String javahome = System.getProperty("java.home"); ++ ++ String osname = System.getProperty("os.name"); ++ if (osname.endsWith("BSD")) { ++ String osArch = System.getProperty("os.arch"); ++ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); ++ } else { ++ helperpath = toCString(javahome + "/lib/jspawnhelper"); ++ } ++ ++ String s = System.getProperty( ++ "jdk.lang.Process.launchMechanism", "posix_spawn"); ++ ++ try { ++ return LaunchMechanism.valueOf(s.toUpperCase()); ++ } catch (IllegalArgumentException e) { ++ throw new Error(s + " is not a supported " + ++ "process launch mechanism on this platform."); ++ } ++ } ++ }); ++ } ++ + /* this is for the reaping thread */ + private native int waitForProcessExit(int pid); + + /** +- * Create a process using fork(2) and exec(2). ++ * Create a process. Depending on the mode flag, this is done by ++ * one of the following mechanisms. ++ * - fork(2) and exec(2) ++ * - posix_spawn(2) * - * @internal + * @param fds an array of three file descriptors. + * Indexes 0, 1, and 2 correspond to standard input, +@@ -80,7 +135,8 @@ + * output. + * @return the pid of the subprocess */ -- le_bool accept(LEGlyphID glyph) const; -+ le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; - }; - - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -49,6 +49,7 @@ - le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; - le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const; - -+#if LE_ENABLE_RAW - le_int32 getGlyphClass(LEGlyphID glyphID) const { - LETableReference base((const le_uint8*)this); - LEErrorCode ignored = LE_NO_ERROR; -@@ -60,6 +61,7 @@ - LEErrorCode ignored = LE_NO_ERROR; - return hasGlyphClass(base,glyphClass,ignored); - } -+#endif - }; +- private native int forkAndExec(byte[] prog, ++ private native int forkAndExec(int mode, byte[] helperpath, ++ byte[] prog, + byte[] argBlock, int argc, + byte[] envBlock, int envc, + byte[] dir, +@@ -132,7 +188,9 @@ + final boolean redirectErrorStream) + throws IOException { - struct ClassDefFormat1Table : ClassDefinitionTable ---- jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -154,6 +154,7 @@ - TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); - if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) { - LEReferenceToArrayOf valueArray(lookupTable8, success, &lookupTable8->valueArray[0], glyphCount); -+ if (LE_FAILURE(success)) { return newGlyph; } - newGlyph = SWAPW(valueArray(glyphCode - firstGlyph, success)); - } - } ---- jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -48,7 +48,7 @@ - */ - void ContextualSubstitutionBase::applySubstitutionLookups( - const LookupProcessor *lookupProcessor, -- const SubstitutionLookupRecord *substLookupRecordArray, -+ const LEReferenceToArrayOf& substLookupRecordArray, - le_uint16 substCount, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, -@@ -60,10 +60,11 @@ +- pid = forkAndExec(prog, ++ pid = forkAndExec(launchMechanism.value, ++ helperpath, ++ prog, + argBlock, argc, + envBlock, envc, + dir, +@@ -236,11 +294,10 @@ + try { stderr.close(); } catch (IOException ignored) {} } - GlyphIterator tempIterator(*glyphIterator); -+ const SubstitutionLookupRecord *substLookupRecordArrayPtr = substLookupRecordArray.getAlias(); // OK to dereference, range checked against substCount below. - - for (le_int16 subst = 0; subst < substCount && LE_SUCCESS(success); subst += 1) { -- le_uint16 sequenceIndex = SWAPW(substLookupRecordArray[subst].sequenceIndex); -- le_uint16 lookupListIndex = SWAPW(substLookupRecordArray[subst].lookupListIndex); -+ le_uint16 sequenceIndex = SWAPW(substLookupRecordArrayPtr[subst].sequenceIndex); -+ le_uint16 lookupListIndex = SWAPW(substLookupRecordArrayPtr[subst].lookupListIndex); +- /* This routine initializes JNI field offsets for the class */ +- private static native void initIDs(); ++ private static native void init(); - tempIterator.setCurrStreamPosition(position); - tempIterator.next(sequenceIndex); -@@ -72,7 +73,7 @@ + static { +- initIDs(); ++ init(); } - } - --le_bool ContextualSubstitutionBase::matchGlyphIDs(const TTGlyphID *glyphArray, le_uint16 glyphCount, -+le_bool ContextualSubstitutionBase::matchGlyphIDs(const LEReferenceToArrayOf& glyphArray, le_uint16 glyphCount, - GlyphIterator *glyphIterator, le_bool backtrack) - { - le_int32 direction = 1; -@@ -101,11 +102,16 @@ - return TRUE; - } --le_bool ContextualSubstitutionBase::matchGlyphClasses(const le_uint16 *classArray, le_uint16 glyphCount, -+le_bool ContextualSubstitutionBase::matchGlyphClasses( -+ const LEReferenceToArrayOf &classArray, -+ le_uint16 glyphCount, - GlyphIterator *glyphIterator, -- const ClassDefinitionTable *classDefinitionTable, -+ const LEReferenceTo &classDefinitionTable, -+ LEErrorCode &success, - le_bool backtrack) - { -+ if (LE_FAILURE(success)) { return FALSE; } + /** +@@ -253,40 +310,54 @@ + * able to read any buffered data lingering in the OS pipe buffer. + */ + static class ProcessPipeInputStream extends BufferedInputStream { ++ private final Object closeLock = new Object(); + - le_int32 direction = 1; - le_int32 match = 0; - -@@ -120,7 +126,7 @@ + ProcessPipeInputStream(int fd) { + super(new FileInputStream(newFileDescriptor(fd))); } - LEGlyphID glyph = glyphIterator->getCurrGlyphID(); -- le_int32 glyphClass = classDefinitionTable->getGlyphClass(glyph); -+ le_int32 glyphClass = classDefinitionTable->getGlyphClass(classDefinitionTable, glyph, success); - le_int32 matchClass = SWAPW(classArray[match]); - - if (glyphClass != matchClass) { -@@ -128,7 +134,7 @@ - // in the class array which aren't in the class definition - // table. If we're looking for such a class, pretend that - // we found it. -- if (classDefinitionTable->hasGlyphClass(matchClass)) { -+ if (classDefinitionTable->hasGlyphClass(classDefinitionTable, matchClass, success)) { - return FALSE; +- private static byte[] drainInputStream(InputStream in) ++ private InputStream drainInputStream(InputStream in) + throws IOException { +- if (in == null) return null; + int n = 0; + int j; + byte[] a = null; +- while ((j = in.available()) > 0) { ++ synchronized (closeLock) { ++ if (buf == null) // asynchronous close()? ++ return null; // discard ++ j = in.available(); ++ } ++ while (j > 0) { + a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j); +- n += in.read(a, n, j); ++ synchronized (closeLock) { ++ if (buf == null) // asynchronous close()? ++ return null; // discard ++ n += in.read(a, n, j); ++ j = in.available(); ++ } } - } -@@ -140,8 +146,8 @@ - return TRUE; - } - --le_bool ContextualSubstitutionBase::matchGlyphCoverages(const Offset *coverageTableOffsetArray, le_uint16 glyphCount, -- GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack) -+le_bool ContextualSubstitutionBase::matchGlyphCoverages(const LEReferenceToArrayOf &coverageTableOffsetArray, le_uint16 glyphCount, -+GlyphIterator *glyphIterator, const LETableReference &offsetBase, LEErrorCode &success, le_bool backtrack) - { - le_int32 direction = 1; - le_int32 glyph = 0; -@@ -153,13 +159,15 @@ - - while (glyphCount > 0) { - Offset coverageTableOffset = SWAPW(coverageTableOffsetArray[glyph]); -- const CoverageTable *coverageTable = (const CoverageTable *) (offsetBase + coverageTableOffset); -+ LEReferenceTo coverageTable(offsetBase, success, coverageTableOffset); - -- if (! glyphIterator->next()) { -+ if (LE_FAILURE(success) || ! glyphIterator->next()) { - return FALSE; +- return (a == null || n == a.length) ? a : Arrays.copyOf(a, n); ++ return (a == null) ? ++ ProcessBuilder.NullInputStream.INSTANCE : ++ new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n)); } -- if (coverageTable->getGlyphCoverage((LEGlyphID) glyphIterator->getCurrGlyphID()) < 0) { -+ if (coverageTable->getGlyphCoverage(coverageTable, -+ (LEGlyphID) glyphIterator->getCurrGlyphID(), -+ success) < 0) { - return FALSE; + /** Called by the process reaper thread when the process exits. */ + synchronized void processExited() { +- // Most BufferedInputStream methods are synchronized, but close() +- // is not, and so we have to handle concurrent racing close(). + try { + InputStream in = this.in; + if (in != null) { +- byte[] stragglers = drainInputStream(in); ++ InputStream stragglers = drainInputStream(in); + in.close(); +- this.in = (stragglers == null) ? +- ProcessBuilder.NullInputStream.INSTANCE : +- new ByteArrayInputStream(stragglers); +- if (buf == null) // asynchronous close()? +- this.in = null; ++ this.in = stragglers; + } +- } catch (IOException ignored) { +- // probably an asynchronous close(). ++ } catch (IOException ignored) { } ++ } ++ ++ @Override ++ public void close() throws IOException { ++ // BufferedInputStream#close() is not synchronized unlike most other methods. ++ // Synchronizing helps avoid racing with drainInputStream(). ++ synchronized (closeLock) { ++ super.close(); + } } + } +--- ./jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2014-06-06 19:56:33.000000000 -0700 +@@ -63,11 +63,61 @@ + private /* final */ InputStream stdout; + private /* final */ InputStream stderr; -@@ -170,7 +178,7 @@ - return TRUE; - } ++ private static enum LaunchMechanism { ++ FORK(1), ++ VFORK(3); ++ ++ private int value; ++ LaunchMechanism(int x) {value = x;} ++ }; ++ ++ /* default is VFORK on Linux */ ++ private static final LaunchMechanism launchMechanism; ++ private static byte[] helperpath; ++ ++ private static byte[] toCString(String s) { ++ if (s == null) ++ return null; ++ byte[] bytes = s.getBytes(); ++ byte[] result = new byte[bytes.length + 1]; ++ System.arraycopy(bytes, 0, ++ result, 0, ++ bytes.length); ++ result[result.length-1] = (byte)0; ++ return result; ++ } ++ ++ static { ++ launchMechanism = AccessController.doPrivileged( ++ new PrivilegedAction() ++ { ++ public LaunchMechanism run() { ++ String javahome = System.getProperty("java.home"); ++ String osArch = System.getProperty("os.arch"); ++ ++ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); ++ String s = System.getProperty( ++ "jdk.lang.Process.launchMechanism", "vfork"); ++ ++ try { ++ return LaunchMechanism.valueOf(s.toUpperCase()); ++ } catch (IllegalArgumentException e) { ++ throw new Error(s + " is not a supported " + ++ "process launch mechanism on this platform."); ++ } ++ } ++ }); ++ } ++ + /* this is for the reaping thread */ + private native int waitForProcessExit(int pid); --le_uint32 ContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ContextualSubstitutionSubtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const -@@ -186,20 +194,29 @@ + /** +- * Create a process using fork(2) and exec(2). ++ * Create a process. Depending on the mode flag, this is done by ++ * one of the following mechanisms. ++ * - fork(2) and exec(2) ++ * - clone(2) and exec(2) ++ * - vfork(2) and exec(2) + * + * @param fds an array of three file descriptors. + * Indexes 0, 1, and 2 correspond to standard input, +@@ -80,7 +130,8 @@ + * output. + * @return the pid of the subprocess + */ +- private native int forkAndExec(byte[] prog, ++ private native int forkAndExec(int mode, byte[] helperpath, ++ byte[] prog, + byte[] argBlock, int argc, + byte[] envBlock, int envc, + byte[] dir, +@@ -132,7 +183,9 @@ + final boolean redirectErrorStream) + throws IOException { - case 1: - { -- const ContextualSubstitutionFormat1Subtable *subtable = (const ContextualSubstitutionFormat1Subtable *) this; -- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); -+ LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat1Subtable *) this); -+ if( LE_FAILURE(success) ) { -+ return 0; -+ } -+ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); +- pid = forkAndExec(prog, ++ pid = forkAndExec(launchMechanism.value, ++ helperpath, ++ prog, + argBlock, argc, + envBlock, envc, + dir, +@@ -236,11 +289,10 @@ + try { stderr.close(); } catch (IOException ignored) {} } - case 2: - { -- const ContextualSubstitutionFormat2Subtable *subtable = (const ContextualSubstitutionFormat2Subtable *) this; -- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); -+ LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat2Subtable *) this); -+ if( LE_FAILURE(success) ) { -+ return 0; -+ } -+ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); - } +- /* This routine initializes JNI field offsets for the class */ +- private static native void initIDs(); ++ private static native void init(); - case 3: - { -- const ContextualSubstitutionFormat3Subtable *subtable = (const ContextualSubstitutionFormat3Subtable *) this; -- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); -+ LEReferenceTo subtable(base, success, (const ContextualSubstitutionFormat3Subtable *) this); -+ if( LE_FAILURE(success) ) { -+ return 0; -+ } -+ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + static { +- initIDs(); ++ init(); } - default: -@@ -207,7 +224,7 @@ - } - } + /** +@@ -253,40 +305,54 @@ + * able to read any buffered data lingering in the OS pipe buffer. + */ + static class ProcessPipeInputStream extends BufferedInputStream { ++ private final Object closeLock = new Object(); ++ + ProcessPipeInputStream(int fd) { + super(new FileInputStream(newFileDescriptor(fd))); + } --le_uint32 ContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ContextualSubstitutionFormat1Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const -@@ -227,22 +244,23 @@ +- private static byte[] drainInputStream(InputStream in) ++ private InputStream drainInputStream(InputStream in) + throws IOException { +- if (in == null) return null; + int n = 0; + int j; + byte[] a = null; +- while ((j = in.available()) > 0) { ++ synchronized (closeLock) { ++ if (buf == null) // asynchronous close()? ++ return null; // discard ++ j = in.available(); ++ } ++ while (j > 0) { + a = (a == null) ? new byte[j] : Arrays.copyOf(a, n + j); +- n += in.read(a, n, j); ++ synchronized (closeLock) { ++ if (buf == null) // asynchronous close()? ++ return null; // discard ++ n += in.read(a, n, j); ++ j = in.available(); ++ } + } +- return (a == null || n == a.length) ? a : Arrays.copyOf(a, n); ++ return (a == null) ? ++ ProcessBuilder.NullInputStream.INSTANCE : ++ new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n)); + } - if (coverageIndex < srSetCount) { - Offset subRuleSetTableOffset = SWAPW(subRuleSetTableOffsetArray[coverageIndex]); -- const SubRuleSetTable *subRuleSetTable = -- (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset); -+ LEReferenceTo -+ subRuleSetTable(base, success, (const SubRuleSetTable *) ((char *) this + subRuleSetTableOffset)); - le_uint16 subRuleCount = SWAPW(subRuleSetTable->subRuleCount); - le_int32 position = glyphIterator->getCurrStreamPosition(); + /** Called by the process reaper thread when the process exits. */ + synchronized void processExited() { +- // Most BufferedInputStream methods are synchronized, but close() +- // is not, and so we have to handle concurrent racing close(). + try { + InputStream in = this.in; + if (in != null) { +- byte[] stragglers = drainInputStream(in); ++ InputStream stragglers = drainInputStream(in); + in.close(); +- this.in = (stragglers == null) ? +- ProcessBuilder.NullInputStream.INSTANCE : +- new ByteArrayInputStream(stragglers); +- if (buf == null) // asynchronous close()? +- this.in = null; ++ this.in = stragglers; + } +- } catch (IOException ignored) { +- // probably an asynchronous close(). ++ } catch (IOException ignored) { } ++ } ++ ++ @Override ++ public void close() throws IOException { ++ // BufferedInputStream#close() is not synchronized unlike most other methods. ++ // Synchronizing helps avoid racing with drainInputStream(). ++ synchronized (closeLock) { ++ super.close(); + } + } + } +--- ./jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris 2014-04-19 01:27:13.000000000 -0700 +@@ -26,6 +26,8 @@ + package java.lang; - for (le_uint16 subRule = 0; subRule < subRuleCount; subRule += 1) { - Offset subRuleTableOffset = - SWAPW(subRuleSetTable->subRuleTableOffsetArray[subRule]); -- const SubRuleTable *subRuleTable = -- (const SubRuleTable *) ((char *) subRuleSetTable + subRuleTableOffset); -+ LEReferenceTo -+ subRuleTable(subRuleSetTable, success, subRuleTableOffset); - le_uint16 matchCount = SWAPW(subRuleTable->glyphCount) - 1; - le_uint16 substCount = SWAPW(subRuleTable->substCount); -- -- if (matchGlyphIDs(subRuleTable->inputGlyphArray, matchCount, glyphIterator)) { -- const SubstitutionLookupRecord *substLookupRecordArray = -- (const SubstitutionLookupRecord *) &subRuleTable->inputGlyphArray[matchCount]; -+ LEReferenceToArrayOf inputGlyphArray(base, success, subRuleTable->inputGlyphArray, matchCount+2); -+ if (LE_FAILURE(success)) { return 0; } -+ if (matchGlyphIDs(inputGlyphArray, matchCount, glyphIterator)) { -+ LEReferenceToArrayOf -+ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &subRuleTable->inputGlyphArray[matchCount], substCount); + import java.io.*; ++import java.security.AccessController; ++import java.security.PrivilegedAction; - applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); + /* java.lang.Process subclass in the UNIX environment. + * +@@ -45,11 +47,65 @@ + private DeferredCloseInputStream stdout_inner_stream; + private InputStream stderr_stream; -@@ -259,7 +277,8 @@ - return 0; - } ++ private static enum LaunchMechanism { ++ FORK(1), ++ POSIX_SPAWN(2); ++ ++ private int value; ++ LaunchMechanism(int x) {value = x;} ++ }; ++ ++ /* On Solaris, the default is to spawn */ ++ private static final LaunchMechanism launchMechanism; ++ private static byte[] helperpath; ++ ++ private static byte[] toCString(String s) { ++ if (s == null) ++ return null; ++ byte[] bytes = s.getBytes(); ++ byte[] result = new byte[bytes.length + 1]; ++ System.arraycopy(bytes, 0, ++ result, 0, ++ bytes.length); ++ result[result.length-1] = (byte)0; ++ return result; ++ } ++ ++ static { ++ launchMechanism = AccessController.doPrivileged( ++ new PrivilegedAction() ++ { ++ public LaunchMechanism run() { ++ String javahome = System.getProperty("java.home"); ++ String osArch = System.getProperty("os.arch"); ++ if (osArch.equals("x86")) { ++ osArch = "i386"; ++ } else if (osArch.equals("x86_64")) { ++ osArch = "amd64"; ++ } ++ ++ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); ++ String s = System.getProperty( ++ "jdk.lang.Process.launchMechanism", "fork"); ++ ++ try { ++ return LaunchMechanism.valueOf(s.toUpperCase()); ++ } catch (IllegalArgumentException e) { ++ throw new Error(s + " is not a supported " + ++ "process launch mechanism on this platform."); ++ } ++ } ++ }); ++ } ++ + /* this is for the reaping thread */ + private native int waitForProcessExit(int pid); + + /** +- * Create a process using fork(2) and exec(2). ++ * Create a process. Depending on the mode flag, this is done by ++ * one of the following mechanisms. ++ * - fork(2) and exec(2) ++ * - posix_spawn(2) + * + * @param std_fds array of file descriptors. Indexes 0, 1, and + * 2 correspond to standard input, standard output and +@@ -61,7 +117,8 @@ + * if and only if it is not -1 on output. + * @return the pid of the subprocess + */ +- private native int forkAndExec(byte[] prog, ++ private native int forkAndExec(int mode, byte[] helperpath, ++ byte[] prog, + byte[] argBlock, int argc, + byte[] envBlock, int envc, + byte[] dir, +@@ -76,7 +133,9 @@ + final int[] std_fds, + final boolean redirectErrorStream) + throws IOException { +- pid = forkAndExec(prog, ++ pid = forkAndExec(launchMechanism.value, ++ helperpath, ++ prog, + argBlock, argc, + envBlock, envc, + dir, +@@ -294,10 +353,9 @@ --le_uint32 ContextualSubstitutionFormat2Subtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ContextualSubstitutionFormat2Subtable::process(const LETableReference &base, -+ const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const -@@ -275,29 +294,34 @@ } - if (coverageIndex >= 0) { -- const ClassDefinitionTable *classDefinitionTable = -- (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset)); -+ LEReferenceTo classDefinitionTable(base, success, -+ (const ClassDefinitionTable *) ((char *) this + SWAPW(classDefTableOffset))); - le_uint16 scSetCount = SWAPW(subClassSetCount); -- le_int32 setClass = classDefinitionTable->getGlyphClass(glyphIterator->getCurrGlyphID()); -+ le_int32 setClass = classDefinitionTable->getGlyphClass(classDefinitionTable, -+ glyphIterator->getCurrGlyphID(), -+ success); +- /* This routine initializes JNI field offsets for the class */ +- private static native void initIDs(); ++ private static native void init(); - if (setClass < scSetCount && subClassSetTableOffsetArray[setClass] != 0) { - Offset subClassSetTableOffset = SWAPW(subClassSetTableOffsetArray[setClass]); -- const SubClassSetTable *subClassSetTable = -- (const SubClassSetTable *) ((char *) this + subClassSetTableOffset); -+ LEReferenceTo -+ subClassSetTable(base, success, (const SubClassSetTable *) ((char *) this + subClassSetTableOffset)); - le_uint16 subClassRuleCount = SWAPW(subClassSetTable->subClassRuleCount); - le_int32 position = glyphIterator->getCurrStreamPosition(); + static { +- initIDs(); ++ init(); + } + } +--- ./jdk/src/solaris/classes/sun/awt/X11/MotifDnDConstants.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/MotifDnDConstants.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 +190,7 @@ + try { + Native.putLong(data, motifWindow); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), + defaultRootWindow, + XA_MOTIF_DRAG_WINDOW.getAtom(), +@@ -198,10 +198,10 @@ + XConstants.PropModeReplace, + data, 1); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write motif drag window handle."); + } - for (le_uint16 scRule = 0; scRule < subClassRuleCount; scRule += 1) { - Offset subClassRuleTableOffset = - SWAPW(subClassSetTable->subClassRuleTableOffsetArray[scRule]); -- const SubClassRuleTable *subClassRuleTable = -- (const SubClassRuleTable *) ((char *) subClassSetTable + subClassRuleTableOffset); -+ LEReferenceTo -+ subClassRuleTable(subClassSetTable, success, subClassRuleTableOffset); - le_uint16 matchCount = SWAPW(subClassRuleTable->glyphCount) - 1; - le_uint16 substCount = SWAPW(subClassRuleTable->substCount); +@@ -394,7 +394,7 @@ + } + } -- if (matchGlyphClasses(subClassRuleTable->classArray, matchCount, glyphIterator, classDefinitionTable)) { -- const SubstitutionLookupRecord *substLookupRecordArray = -- (const SubstitutionLookupRecord *) &subClassRuleTable->classArray[matchCount]; -+ LEReferenceToArrayOf classArray(base, success, subClassRuleTable->classArray, matchCount+1); -+ -+ if (LE_FAILURE(success)) { return 0; } -+ if (matchGlyphClasses(classArray, matchCount, glyphIterator, classDefinitionTable, success)) { -+ LEReferenceToArrayOf -+ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &subClassRuleTable->classArray[matchCount], substCount); +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), + motifWindow, + XA_MOTIF_DRAG_TARGETS.getAtom(), +@@ -402,15 +402,15 @@ + XConstants.PropModeReplace, + data, tableSize); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + + // Create a new motif window and retry. + motifWindow = createMotifWindow(); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), + motifWindow, + XA_MOTIF_DRAG_TARGETS.getAtom(), +@@ -418,10 +418,10 @@ + XConstants.PropModeReplace, + data, tableSize); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write motif drag targets property."); + } + } +@@ -534,16 +534,16 @@ + // CARD32 icc_handle + unsafe.putInt(structData + 4, (int)XA_MOTIF_ATOM_0.getAtom()); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window, + XA_MOTIF_ATOM_0.getAtom(), + XA_MOTIF_DRAG_INITIATOR_INFO.getAtom(), + 8, XConstants.PropModeReplace, + structData, MOTIF_INITIATOR_INFO_SIZE); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write drag initiator info"); + } + } finally { +@@ -567,16 +567,16 @@ + unsafe.putShort(data + 10, (short)0); /* pad */ + unsafe.putInt(data + 12, dataSize); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window, + XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), + XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), + 8, XConstants.PropModeReplace, + data, dataSize); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write Motif receiver info property"); + } + } finally { +--- ./jdk/src/solaris/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -162,16 +162,16 @@ + unsafe.putInt(data + 12, dataSize); + } - applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder, + MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), + MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), + 8, XConstants.PropModeReplace, + data, dataSize); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write Motif receiver info property"); + } + } finally { +@@ -236,16 +236,16 @@ + + unsafe.putInt(data + 4, tproxy); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder, + MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), + MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(), + 8, XConstants.PropModeReplace, + data, dataSize); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write Motif receiver info property"); + } + } +@@ -412,15 +412,15 @@ + */ + XWindowAttributes wattr = new XWindowAttributes(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + source_win, wattr.pData); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (status == 0 || +- (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success)) { ++ if ((status == 0) || ++ ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success))) { + throw new XException("XGetWindowAttributes failed"); + } -@@ -314,7 +338,8 @@ - return 0; - } +@@ -429,15 +429,15 @@ + wattr.dispose(); + } --le_uint32 ContextualSubstitutionFormat3Subtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ContextualSubstitutionFormat3Subtable::process(const LETableReference &base, -+ const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success)const -@@ -333,9 +358,13 @@ - // that matched when we're done. - glyphIterator->prev(); +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), source_win, + source_win_mask | + XConstants.StructureNotifyMask); -- if (ContextualSubstitutionBase::matchGlyphCoverages(coverageTableOffsetArray, gCount, glyphIterator, (const char *) this)) { -- const SubstitutionLookupRecord *substLookupRecordArray = -- (const SubstitutionLookupRecord *) &coverageTableOffsetArray[gCount]; -+ LEReferenceToArrayOf covTableOffsetArray(base, success, coverageTableOffsetArray, gCount); -+ -+ if( LE_FAILURE(success) ) { return 0; } -+ -+ if (ContextualSubstitutionBase::matchGlyphCoverages(covTableOffsetArray, gCount, glyphIterator, base, success)) { -+ LEReferenceToArrayOf -+ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) &coverageTableOffsetArray[gCount], subCount); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); - ContextualSubstitutionBase::applySubstitutionLookups(lookupProcessor, substLookupRecordArray, subCount, glyphIterator, fontInstance, position, success); +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("XSelectInput failed"); + } -@@ -347,7 +376,8 @@ - return 0; - } +@@ -1024,10 +1024,10 @@ + if (sourceWindow != 0) { + XToolkit.awtLock(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), sourceWindow, + sourceWindowMask); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + } finally { + XToolkit.awtUnlock(); + } +--- ./jdk/src/solaris/classes/sun/awt/X11/WindowPropertyGetter.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/WindowPropertyGetter.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -99,7 +99,7 @@ + } --le_uint32 ChainingContextualSubstitutionSubtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ChainingContextualSubstitutionSubtable::process(const LEReferenceTo &base, -+ const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const -@@ -363,20 +393,23 @@ + if (errorHandler != null) { +- XToolkit.WITH_XERROR_HANDLER(errorHandler); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(errorHandler); + } + Native.putLong(data, 0); + int status = XlibWrapper.XGetWindowProperty(XToolkit.getDisplay(), window, property.getAtom(), +@@ -112,7 +112,7 @@ + } - case 1: - { -- const ChainingContextualSubstitutionFormat1Subtable *subtable = (const ChainingContextualSubstitutionFormat1Subtable *) this; -- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); -+ LEReferenceTo subtable(base, success, (ChainingContextualSubstitutionFormat1Subtable *) this); -+ if(LE_FAILURE(success)) return 0; -+ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); - } + if (errorHandler != null) { +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + } + return status; + } finally { +--- ./jdk/src/solaris/classes/sun/awt/X11/XClipboard.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XClipboard.java 2014-04-19 01:27:13.000000000 -0700 +@@ -84,7 +84,7 @@ - case 2: - { -- const ChainingContextualSubstitutionFormat2Subtable *subtable = (const ChainingContextualSubstitutionFormat2Subtable *) this; -- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); -+ LEReferenceTo subtable(base, success, (const ChainingContextualSubstitutionFormat2Subtable *) this); -+ if( LE_FAILURE(success) ) { return 0; } -+ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); - } + protected synchronized void setContentsNative(Transferable contents) { + SortedMap formatMap = DataTransferer.getInstance().getFormatsForTransferable +- (contents, DataTransferer.adaptFlavorMap(flavorMap)); ++ (contents, DataTransferer.adaptFlavorMap(getDefaultFlavorTable())); + long[] formats = DataTransferer.keysToLongArray(formatMap); - case 3: - { -- const ChainingContextualSubstitutionFormat3Subtable *subtable = (const ChainingContextualSubstitutionFormat3Subtable *) this; -- return subtable->process(lookupProcessor, glyphIterator, fontInstance, success); -+ LEReferenceTo subtable(base, success, (const ChainingContextualSubstitutionFormat3Subtable *) this); -+ if( LE_FAILURE(success) ) { return 0; } -+ return subtable->process(subtable, lookupProcessor, glyphIterator, fontInstance, success); + if (!selection.setOwner(contents, formatMap, formats, +@@ -123,7 +123,7 @@ + private void checkChangeHere(Transferable contents) { + if (areFlavorListenersRegistered()) { + checkChange(DataTransferer.getInstance(). +- getFormatsForTransferableAsArray(contents, flavorMap)); ++ getFormatsForTransferableAsArray(contents, getDefaultFlavorTable())); + } } - default: -@@ -390,7 +423,7 @@ - // emptyFeatureList matches an le_uint32 or an le_uint16... - static const FeatureMask emptyFeatureList = 0x00000000UL; +--- ./jdk/src/solaris/classes/sun/awt/X11/XConstants.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XConstants.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +--- ./jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XDnDDragSourceProtocol.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -96,14 +96,14 @@ + action_count++; + } --le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const -@@ -410,8 +443,8 @@ +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndActionList.setAtomData(window, + XAtom.XA_ATOM, + data, action_count); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + cleanup(); + throw new XException("Cannot write XdndActionList property"); + } +@@ -117,14 +117,14 @@ + try { + Native.put(data, formats); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndTypeList.setAtomData(window, + XAtom.XA_ATOM, + data, formats.length); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + cleanup(); + throw new XException("Cannot write XdndActionList property"); + } +--- ./jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XDnDDropTargetProtocol.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -88,12 +88,12 @@ + try { + Native.putLong(data, 0, XDnDConstants.XDND_PROTOCOL_VERSION); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndAware.setAtomData(window, XAtom.XA_ATOM, data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndAware property"); + } + } finally { +@@ -205,54 +205,50 @@ + + /* The proxy window must have the XdndAware set, as XDnD protocol + prescribes to check the proxy window for XdndAware. */ +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndAware.setAtomData(newProxy, XAtom.XA_ATOM, + data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != +- XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndAware property"); + } - if (coverageIndex < srSetCount) { - Offset chainSubRuleSetTableOffset = SWAPW(chainSubRuleSetTableOffsetArray[coverageIndex]); -- const ChainSubRuleSetTable *chainSubRuleSetTable = -- (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset); -+ LEReferenceTo -+ chainSubRuleSetTable(base, success, (const ChainSubRuleSetTable *) ((char *) this + chainSubRuleSetTableOffset)); - le_uint16 chainSubRuleCount = SWAPW(chainSubRuleSetTable->chainSubRuleCount); - le_int32 position = glyphIterator->getCurrStreamPosition(); - GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); -@@ -419,13 +452,19 @@ - for (le_uint16 subRule = 0; subRule < chainSubRuleCount; subRule += 1) { - Offset chainSubRuleTableOffset = - SWAPW(chainSubRuleSetTable->chainSubRuleTableOffsetArray[subRule]); -- const ChainSubRuleTable *chainSubRuleTable = -- (const ChainSubRuleTable *) ((char *) chainSubRuleSetTable + chainSubRuleTableOffset); -+ LEReferenceTo -+ chainSubRuleTable = LEReferenceTo(chainSubRuleSetTable, success, chainSubRuleTableOffset); -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 backtrackGlyphCount = SWAPW(chainSubRuleTable->backtrackGlyphCount); -+ LEReferenceToArrayOf backtrackGlyphArray(base, success, chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount); -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 inputGlyphCount = (le_uint16) SWAPW(chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount]) - 1; -- const TTGlyphID *inputGlyphArray = &chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount + 1]; -+ LEReferenceToArrayOf inputGlyphArray(base, success, &chainSubRuleTable->backtrackGlyphArray[backtrackGlyphCount + 1], inputGlyphCount+2); -+ -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 lookaheadGlyphCount = (le_uint16) SWAPW(inputGlyphArray[inputGlyphCount]); -- const TTGlyphID *lookaheadGlyphArray = &inputGlyphArray[inputGlyphCount + 1]; -+ LEReferenceToArrayOf lookaheadGlyphArray(base, success, inputGlyphArray.getAlias(inputGlyphCount + 1,success), lookaheadGlyphCount+2); -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 substCount = (le_uint16) SWAPW(lookaheadGlyphArray[lookaheadGlyphCount]); + Native.putLong(data, 0, newProxy); + + /* The proxy window must have the XdndProxy set to point to itself.*/ +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndProxy.setAtomData(newProxy, XAtom.XA_WINDOW, + data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != +- XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndProxy property"); + } - tempIterator.setCurrStreamPosition(position); -@@ -435,7 +474,8 @@ - } + Native.putLong(data, 0, XDnDConstants.XDND_PROTOCOL_VERSION); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndAware.setAtomData(embedder, XAtom.XA_ATOM, + data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != +- XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndAware property"); + } - tempIterator.prev(); -- if (! matchGlyphIDs(chainSubRuleTable->backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) { -+ -+ if (! matchGlyphIDs(backtrackGlyphArray, backtrackGlyphCount, &tempIterator, TRUE)) { - continue; + Native.putLong(data, 0, newProxy); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndProxy.setAtomData(embedder, XAtom.XA_WINDOW, + data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != +- XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndProxy property"); + } + } finally { +@@ -278,27 +274,25 @@ + try { + Native.putLong(data, 0, entry.getVersion()); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndAware.setAtomData(embedder, XAtom.XA_ATOM, + data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != +- XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndAware property"); } -@@ -446,8 +486,8 @@ + Native.putLong(data, 0, (int)entry.getProxy()); + +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndProxy.setAtomData(embedder, XAtom.XA_WINDOW, + data, 1); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != +- XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("Cannot write XdndProxy property"); } + } finally { +@@ -541,15 +535,15 @@ + */ + XWindowAttributes wattr = new XWindowAttributes(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + source_win, wattr.pData); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (status == 0 || +- (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success)) { ++ if ((status == 0) || ++ ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success))) { + throw new XException("XGetWindowAttributes failed"); + } - if (matchGlyphIDs(inputGlyphArray, inputGlyphCount, glyphIterator)) { -- const SubstitutionLookupRecord *substLookupRecordArray = -- (const SubstitutionLookupRecord *) &lookaheadGlyphArray[lookaheadGlyphCount + 1]; -+ LEReferenceToArrayOf -+ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) lookaheadGlyphArray.getAlias(lookaheadGlyphCount + 1,success), substCount); - - applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); - -@@ -464,7 +504,7 @@ - return 0; - } - --le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode& success) const -@@ -480,19 +520,21 @@ - } - - if (coverageIndex >= 0) { -- const ClassDefinitionTable *backtrackClassDefinitionTable = -- (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset)); -- const ClassDefinitionTable *inputClassDefinitionTable = -- (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset)); -- const ClassDefinitionTable *lookaheadClassDefinitionTable = -- (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset)); -+ LEReferenceTo -+ backtrackClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(backtrackClassDefTableOffset))); -+ LEReferenceTo -+ inputClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(inputClassDefTableOffset))); -+ LEReferenceTo -+ lookaheadClassDefinitionTable(base, success, (const ClassDefinitionTable *) ((char *) this + SWAPW(lookaheadClassDefTableOffset))); - le_uint16 scSetCount = SWAPW(chainSubClassSetCount); -- le_int32 setClass = inputClassDefinitionTable->getGlyphClass(glyphIterator->getCurrGlyphID()); -+ le_int32 setClass = inputClassDefinitionTable->getGlyphClass(inputClassDefinitionTable, -+ glyphIterator->getCurrGlyphID(), -+ success); - - if (setClass < scSetCount && chainSubClassSetTableOffsetArray[setClass] != 0) { - Offset chainSubClassSetTableOffset = SWAPW(chainSubClassSetTableOffsetArray[setClass]); -- const ChainSubClassSetTable *chainSubClassSetTable = -- (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset); -+ LEReferenceTo -+ chainSubClassSetTable(base, success, (const ChainSubClassSetTable *) ((char *) this + chainSubClassSetTableOffset)); - le_uint16 chainSubClassRuleCount = SWAPW(chainSubClassSetTable->chainSubClassRuleCount); - le_int32 position = glyphIterator->getCurrStreamPosition(); - GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); -@@ -500,13 +542,15 @@ - for (le_uint16 scRule = 0; scRule < chainSubClassRuleCount; scRule += 1) { - Offset chainSubClassRuleTableOffset = - SWAPW(chainSubClassSetTable->chainSubClassRuleTableOffsetArray[scRule]); -- const ChainSubClassRuleTable *chainSubClassRuleTable = -- (const ChainSubClassRuleTable *) ((char *) chainSubClassSetTable + chainSubClassRuleTableOffset); -+ LEReferenceTo -+ chainSubClassRuleTable(chainSubClassSetTable, success, chainSubClassRuleTableOffset); - le_uint16 backtrackGlyphCount = SWAPW(chainSubClassRuleTable->backtrackGlyphCount); - le_uint16 inputGlyphCount = SWAPW(chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount]) - 1; -- const le_uint16 *inputClassArray = &chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount + 1]; -- le_uint16 lookaheadGlyphCount = SWAPW(inputClassArray[inputGlyphCount]); -- const le_uint16 *lookaheadClassArray = &inputClassArray[inputGlyphCount + 1]; -+ LEReferenceToArrayOf inputClassArray(base, success, &chainSubClassRuleTable->backtrackClassArray[backtrackGlyphCount + 1],inputGlyphCount+2); // +2 for the lookaheadGlyphCount count -+ le_uint16 lookaheadGlyphCount = SWAPW(inputClassArray.getObject(inputGlyphCount, success)); -+ LEReferenceToArrayOf lookaheadClassArray(base, success, inputClassArray.getAlias(inputGlyphCount + 1,success), lookaheadGlyphCount+2); // +2 for the substCount -+ -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 substCount = SWAPW(lookaheadClassArray[lookaheadGlyphCount]); +@@ -558,15 +552,15 @@ + wattr.dispose(); + } +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), source_win, + source_win_mask | + XConstants.StructureNotifyMask); -@@ -517,21 +561,23 @@ - } +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); - tempIterator.prev(); -- if (! matchGlyphClasses(chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount, -- &tempIterator, backtrackClassDefinitionTable, TRUE)) { -+ LEReferenceToArrayOf backtrackClassArray(base, success, chainSubClassRuleTable->backtrackClassArray, backtrackGlyphCount); -+ if( LE_FAILURE(success) ) { return 0; } -+ if (! matchGlyphClasses(backtrackClassArray, backtrackGlyphCount, -+ &tempIterator, backtrackClassDefinitionTable, success, TRUE)) { - continue; - } +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("XSelectInput failed"); + } - tempIterator.setCurrStreamPosition(position); - tempIterator.next(inputGlyphCount); -- if (! matchGlyphClasses(lookaheadClassArray, lookaheadGlyphCount, &tempIterator, lookaheadClassDefinitionTable)) { -+ if (! matchGlyphClasses(lookaheadClassArray, lookaheadGlyphCount, &tempIterator, lookaheadClassDefinitionTable, success)) { - continue; - } +@@ -963,10 +957,10 @@ + if (sourceWindow != 0) { + XToolkit.awtLock(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), sourceWindow, + sourceWindowMask); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + } finally { + XToolkit.awtUnlock(); + } +@@ -1111,15 +1105,15 @@ + + XToolkit.awtLock(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XDnDConstants.XA_XdndTypeList.setAtomData(xclient.get_window(), + XAtom.XA_ATOM, + wpg.getData(), + wpg.getNumberOfItems()); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + if (logger.isLoggable(PlatformLogger.WARNING)) { + logger.warning("Cannot set XdndTypeList on the proxy window"); + } +--- ./jdk/src/solaris/classes/sun/awt/X11/XDragSourceProtocol.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XDragSourceProtocol.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -181,15 +181,15 @@ + long time) { + XWindowAttributes wattr = new XWindowAttributes(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + targetWindow, wattr.pData); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (status == 0 || +- (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success)) { ++ if ((status == 0) || ++ ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success))) { + throw new XException("XGetWindowAttributes failed"); + } -- if (matchGlyphClasses(inputClassArray, inputGlyphCount, glyphIterator, inputClassDefinitionTable)) { -- const SubstitutionLookupRecord *substLookupRecordArray = -- (const SubstitutionLookupRecord *) &lookaheadClassArray[lookaheadGlyphCount + 1]; -- -+ if (matchGlyphClasses(inputClassArray, inputGlyphCount, glyphIterator, inputClassDefinitionTable, success)) { -+ LEReferenceToArrayOf -+ substLookupRecordArray(base, success, (const SubstitutionLookupRecord *) lookaheadClassArray.getAlias(lookaheadGlyphCount + 1, success), substCount); -+ if (LE_FAILURE(success)) { return 0; } - applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); +@@ -198,15 +198,15 @@ + wattr.dispose(); + } - return inputGlyphCount + 1; -@@ -547,7 +593,7 @@ - return 0; - } +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), targetWindow, + targetWindowMask | + XConstants.StructureNotifyMask); --le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LookupProcessor *lookupProcessor, -+le_uint32 ChainingContextualSubstitutionFormat3Subtable::process(const LETableReference &base, const LookupProcessor *lookupProcessor, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, - LEErrorCode & success) const -@@ -558,9 +604,14 @@ +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); - le_uint16 backtrkGlyphCount = SWAPW(backtrackGlyphCount); - le_uint16 inputGlyphCount = (le_uint16) SWAPW(backtrackCoverageTableOffsetArray[backtrkGlyphCount]); -- const Offset *inputCoverageTableOffsetArray = &backtrackCoverageTableOffsetArray[backtrkGlyphCount + 1]; -+ LEReferenceToArrayOf inputCoverageTableOffsetArray(base, success, &backtrackCoverageTableOffsetArray[backtrkGlyphCount + 1], inputGlyphCount+2); // offset -+ if (LE_FAILURE(success)) { return 0; } - const le_uint16 lookaheadGlyphCount = (le_uint16) SWAPW(inputCoverageTableOffsetArray[inputGlyphCount]); -- const Offset *lookaheadCoverageTableOffsetArray = &inputCoverageTableOffsetArray[inputGlyphCount + 1]; -+ -+ if( LE_FAILURE(success) ) { return 0; } -+ LEReferenceToArrayOf lookaheadCoverageTableOffsetArray(base, success, inputCoverageTableOffsetArray.getAlias(inputGlyphCount + 1, success), lookaheadGlyphCount+2); -+ -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 substCount = (le_uint16) SWAPW(lookaheadCoverageTableOffsetArray[lookaheadGlyphCount]); - le_int32 position = glyphIterator->getCurrStreamPosition(); - GlyphIterator tempIterator(*glyphIterator, emptyFeatureList); -@@ -571,14 +622,14 @@ +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("XSelectInput failed"); + } - tempIterator.prev(); - if (! ContextualSubstitutionBase::matchGlyphCoverages(backtrackCoverageTableOffsetArray, -- backtrkGlyphCount, &tempIterator, (const char *) this, TRUE)) { -+ backtrkGlyphCount, &tempIterator, base, success, TRUE)) { - return 0; +@@ -214,10 +214,10 @@ } - tempIterator.setCurrStreamPosition(position); - tempIterator.next(inputGlyphCount - 1); - if (! ContextualSubstitutionBase::matchGlyphCoverages(lookaheadCoverageTableOffsetArray, -- lookaheadGlyphCount, &tempIterator, (const char *) this)) { -+ lookaheadGlyphCount, &tempIterator, base, success)) { - return 0; + protected final void finalizeDrop() { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), targetWindow, + targetWindowMask); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); } -@@ -589,9 +640,10 @@ - glyphIterator->prev(); + public abstract boolean processProxyModeEvent(XClientMessageEvent xclient, +--- ./jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XDropTargetRegistry.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -168,14 +168,14 @@ + if (dest_x >= 0 && dest_y >= 0) { + XWindowAttributes wattr = new XWindowAttributes(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + window, wattr.pData); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (status == 0 || +- (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success)) { ++ if ((status == 0) || ++ ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success))) { + continue; + } - if (ContextualSubstitutionBase::matchGlyphCoverages(inputCoverageTableOffsetArray, -- inputGlyphCount, glyphIterator, (const char *) this)) { -- const SubstitutionLookupRecord *substLookupRecordArray = -- (const SubstitutionLookupRecord *) &lookaheadCoverageTableOffsetArray[lookaheadGlyphCount + 1]; -+ inputGlyphCount, glyphIterator, base, success)) { -+ LEReferenceToArrayOf -+ substLookupRecordArray(base, success, -+ (const SubstitutionLookupRecord *) lookaheadCoverageTableOffsetArray.getAlias(lookaheadGlyphCount + 1,success), substCount); +@@ -222,14 +222,14 @@ + long event_mask = 0; + XWindowAttributes wattr = new XWindowAttributes(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + embedder, wattr.pData); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (status == 0 || +- (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success)) { ++ if ((status == 0) || ++ ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success))) { + throw new XException("XGetWindowAttributes failed"); + } - ContextualSubstitutionBase::applySubstitutionLookups(lookupProcessor, substLookupRecordArray, substCount, glyphIterator, fontInstance, position, success); +@@ -240,13 +240,13 @@ + } ---- jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -56,20 +56,32 @@ - struct ContextualSubstitutionBase : GlyphSubstitutionSubtable - { - static le_bool matchGlyphIDs( -- const TTGlyphID *glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, -+ const LEReferenceToArrayOf &glyphArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, - le_bool backtrack = FALSE); + if ((event_mask & XConstants.PropertyChangeMask) == 0) { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), embedder, + event_mask | XConstants.PropertyChangeMask); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("XSelectInput failed"); + } + } +@@ -394,13 +394,13 @@ + + /* Restore the original event mask for the embedder. */ + if ((event_mask & XConstants.PropertyChangeMask) == 0) { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + XlibWrapper.XSelectInput(XToolkit.getDisplay(), embedder, + event_mask); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + throw new XException("XSelectInput failed"); + } + } +--- ./jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XEmbedCanvasPeer.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -295,15 +295,15 @@ + try { + XWindowAttributes wattr = new XWindowAttributes(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + xembed.handle, wattr.pData); + +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (status == 0 || +- (XToolkit.saved_error != null && +- XToolkit.saved_error.get_error_code() != XConstants.Success)) { ++ if ((status == 0) || ++ ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success))) { + return null; + } - static le_bool matchGlyphClasses( -- const le_uint16 *classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, -- const ClassDefinitionTable *classDefinitionTable, le_bool backtrack = FALSE); -+ const LEReferenceToArrayOf &classArray, le_uint16 glyphCount, GlyphIterator *glyphIterator, -+ const LEReferenceTo &classDefinitionTable, LEErrorCode &success, le_bool backtrack = FALSE); +--- ./jdk/src/solaris/classes/sun/awt/X11/XErrorHandler.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XErrorHandler.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -38,7 +38,7 @@ + public static class XBaseErrorHandler extends XErrorHandler { + @Override + public int handleError(long display, XErrorEvent err) { +- return XToolkit.SAVED_ERROR_HANDLER(display, err); ++ return XErrorHandlerUtil.SAVED_XERROR_HANDLER(display, err); + } + } - static le_bool matchGlyphCoverages( -+ const LEReferenceToArrayOf &coverageTableOffsetArray, le_uint16 glyphCount, -+ GlyphIterator *glyphIterator, const LETableReference& offsetBase, LEErrorCode &success, le_bool backtrack = FALSE); +--- ./jdk/src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,168 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.security.AccessController; ++import sun.awt.SunToolkit; ++import sun.security.action.GetBooleanAction; ++import sun.util.logging.PlatformLogger; ++ ++/** ++ * This class contains code of the global toolkit error handler, exposes static ++ * methods which allow to set and unset synthetic error handlers. ++ */ ++public final class XErrorHandlerUtil { ++ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XErrorHandlerUtil"); ++ ++ /** ++ * The connection to X11 window server. ++ */ ++ private static long display; ++ ++ /** ++ * Error handler at the moment of {@code XErrorHandlerUtil} initialization. ++ */ ++ private static long saved_error_handler; ++ ++ /** ++ * XErrorEvent being handled. ++ */ ++ static volatile XErrorEvent saved_error; + + /** -+ * little shim to wrap the Offset array in range checking -+ * @private ++ * Current error handler or null if no error handler is set. + */ -+ static le_bool matchGlyphCoverages( - const Offset *coverageTableOffsetArray, le_uint16 glyphCount, -- GlyphIterator *glyphIterator, const char *offsetBase, le_bool backtrack = FALSE); -+ GlyphIterator *glyphIterator, const LETableReference& offsetBase, LEErrorCode &success, le_bool backtrack = FALSE) { -+ LEReferenceToArrayOf ref(offsetBase, success, coverageTableOffsetArray, glyphCount); -+ if( LE_FAILURE(success) ) { return FALSE; } -+ return matchGlyphCoverages(ref, glyphCount, glyphIterator, offsetBase, success, backtrack); ++ private static XErrorHandler current_error_handler; ++ ++ /** ++ * Value of sun.awt.noisyerrorhandler system property. ++ */ ++ private static boolean noisyAwtHandler = AccessController.doPrivileged( ++ new GetBooleanAction("sun.awt.noisyerrorhandler")); ++ ++ /** ++ * The flag indicating that {@code init} was called already. ++ */ ++ private static boolean initPassed; ++ ++ /** ++ * Guarantees that no instance of this class can be created. ++ */ ++ private XErrorHandlerUtil() {} ++ ++ /** ++ * Sets the toolkit global error handler, stores the connection to X11 server, ++ * which will be used during an error handling process. This method is called ++ * once from {@code awt_init_Display} function defined in {@code awt_GraphicsEnv.c} ++ * file immediately after the connection to X11 window server is opened. ++ * @param display the connection to X11 server which should be stored ++ */ ++ private static void init(long display) { ++ SunToolkit.awtLock(); ++ try { ++ if (!initPassed) { ++ XErrorHandlerUtil.display = display; ++ saved_error_handler = XlibWrapper.SetToolkitErrorHandler(); ++ initPassed = true; ++ } ++ } finally { ++ SunToolkit.awtUnlock(); ++ } + } ++ ++ /** ++ * Sets a synthetic error handler. Must be called with the acquired AWT lock. ++ * @param handler the synthetic error handler to set ++ */ ++ public static void WITH_XERROR_HANDLER(XErrorHandler handler) { ++ saved_error = null; ++ current_error_handler = handler; ++ } ++ ++ /** ++ * Unsets a current synthetic error handler. Must be called with the acquired AWT lock. ++ */ ++ public static void RESTORE_XERROR_HANDLER() { ++ RESTORE_XERROR_HANDLER(true); ++ } ++ ++ private static void RESTORE_XERROR_HANDLER(boolean doXSync) { ++ if (doXSync) { ++ // Wait until all requests are processed by the X server ++ // and only then uninstall the error handler. ++ XSync(); ++ } ++ current_error_handler = null; ++ } ++ ++ /** ++ * Should be called under LOCK. ++ */ ++ public static int SAVED_XERROR_HANDLER(long display, XErrorEvent error) { ++ if (saved_error_handler != 0) { ++ // Default XErrorHandler may just terminate the process. Don't call it. ++ // return XlibWrapper.CallErrorHandler(saved_error_handler, display, error.pData); ++ } ++ if (log.isLoggable(PlatformLogger.FINE)) { ++ log.fine("Unhandled XErrorEvent: " + ++ "id=" + error.get_resourceid() + ", " + ++ "serial=" + error.get_serial() + ", " + ++ "ec=" + error.get_error_code() + ", " + ++ "rc=" + error.get_request_code() + ", " + ++ "mc=" + error.get_minor_code()); ++ } ++ return 0; ++ } ++ ++ /** ++ * Called from the native code when an error occurs. ++ */ ++ private static int globalErrorHandler(long display, long event_ptr) { ++ if (noisyAwtHandler) { ++ XlibWrapper.PrintXErrorEvent(display, event_ptr); ++ } ++ XErrorEvent event = new XErrorEvent(event_ptr); ++ saved_error = event; ++ try { ++ if (current_error_handler != null) { ++ return current_error_handler.handleError(display, event); ++ } else { ++ return SAVED_XERROR_HANDLER(display, event); ++ } ++ } catch (Throwable z) { ++ log.fine("Error in GlobalErrorHandler", z); ++ } ++ return 0; ++ } ++ ++ private static void XSync() { ++ SunToolkit.awtLock(); ++ try { ++ XlibWrapper.XSync(display, 0); ++ } finally { ++ SunToolkit.awtUnlock(); ++ } ++ } ++} +--- ./jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,9 +26,11 @@ - static void applySubstitutionLookups( - const LookupProcessor *lookupProcessor, -- const SubstitutionLookupRecord *substLookupRecordArray, -+ const LEReferenceToArrayOf& substLookupRecordArray, - le_uint16 substCount, - GlyphIterator *glyphIterator, - const LEFontInstance *fontInstance, -@@ -79,7 +91,8 @@ - - struct ContextualSubstitutionSubtable : ContextualSubstitutionBase - { -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, -+ GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - - struct ContextualSubstitutionFormat1Subtable : ContextualSubstitutionSubtable -@@ -87,7 +100,8 @@ - le_uint16 subRuleSetCount; - Offset subRuleSetTableOffsetArray[ANY_NUMBER]; - -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - LE_VAR_ARRAY(ContextualSubstitutionFormat1Subtable, subRuleSetTableOffsetArray) - -@@ -116,7 +130,7 @@ - le_uint16 subClassSetCount; - Offset subClassSetTableOffsetArray[ANY_NUMBER]; + import java.awt.Component; + import java.awt.Window; +-import sun.util.logging.PlatformLogger; ++ ++import sun.awt.AWTAccessor; + import sun.awt.CausedFocusEvent; + import sun.awt.KeyboardFocusManagerPeerImpl; ++import sun.util.logging.PlatformLogger; + + public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl { + private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer"); +@@ -68,13 +70,13 @@ + + synchronized(this) { + if (currentFocusedWindow != null) { +- from = (XWindowPeer)currentFocusedWindow.getPeer(); ++ from = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow); + } -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - LE_VAR_ARRAY(ContextualSubstitutionFormat2Subtable, subClassSetTableOffsetArray) + currentFocusedWindow = win; -@@ -152,13 +166,15 @@ - Offset coverageTableOffsetArray[ANY_NUMBER]; - //SubstitutionLookupRecord substLookupRecord[ANY_NUMBER]; + if (currentFocusedWindow != null) { +- to = (XWindowPeer)currentFocusedWindow.getPeer(); ++ to = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow); + } + } -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - LE_VAR_ARRAY(ContextualSubstitutionFormat3Subtable, coverageTableOffsetArray) +--- ./jdk/src/solaris/classes/sun/awt/X11/XQueryTree.java 2013-09-06 11:29:06.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XQueryTree.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -61,7 +61,7 @@ + } + __executed = true; + if (errorHandler != null) { +- XToolkit.WITH_XERROR_HANDLER(errorHandler); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(errorHandler); + } + Native.putLong(children_ptr, 0); + int status = +@@ -72,7 +72,7 @@ + children_ptr, + nchildren_ptr ); + if (errorHandler != null) { +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + } + return status; + } finally { +--- ./jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2014-06-06 19:56:33.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -49,6 +49,7 @@ + import sun.awt.*; + import sun.font.FontConfigManager; + import sun.misc.PerformanceLogger; ++import sun.misc.ThreadGroupUtils; + import sun.print.PrintJob2D; + import sun.security.action.GetPropertyAction; + import sun.security.action.GetBooleanAction; +@@ -127,7 +128,6 @@ + initIDs(); + setBackingStoreType(); + } +- noisyAwtHandler = AccessController.doPrivileged(new GetBooleanAction("sun.awt.noisyerrorhandler")); + } - struct ChainingContextualSubstitutionSubtable : ContextualSubstitutionBase - { -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LEReferenceTo &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; + /* +@@ -136,78 +136,6 @@ + */ + static native long getTrayIconDisplayTimeout(); - struct ChainingContextualSubstitutionFormat1Subtable : ChainingContextualSubstitutionSubtable -@@ -166,7 +182,8 @@ - le_uint16 chainSubRuleSetCount; - Offset chainSubRuleSetTableOffsetArray[ANY_NUMBER]; +- //---- ERROR HANDLER CODE ----// +- +- /* +- * Error handler at the moment of XToolkit initialization +- */ +- private static long saved_error_handler; +- +- /* +- * XErrorEvent being handled +- */ +- static volatile XErrorEvent saved_error; +- +- /* +- * Current error handler or null if no error handler is set +- */ +- private static XErrorHandler current_error_handler; +- +- /* +- * Value of sun.awt.noisyerrorhandler system property +- */ +- private static boolean noisyAwtHandler; +- +- public static void WITH_XERROR_HANDLER(XErrorHandler handler) { +- saved_error = null; +- current_error_handler = handler; +- } +- +- public static void RESTORE_XERROR_HANDLER() { +- // wait until all requests are processed by the X server +- // and only then uninstall the error handler +- XSync(); +- current_error_handler = null; +- } +- +- // Should be called under LOCK +- public static int SAVED_ERROR_HANDLER(long display, XErrorEvent error) { +- if (saved_error_handler != 0) { +- // Default XErrorHandler may just terminate the process. Don't call it. +- // return XlibWrapper.CallErrorHandler(saved_error_handler, display, error.pData); +- } +- if (log.isLoggable(PlatformLogger.FINE)) { +- log.fine("Unhandled XErrorEvent: " + +- "id=" + error.get_resourceid() + ", " + +- "serial=" + error.get_serial() + ", " + +- "ec=" + error.get_error_code() + ", " + +- "rc=" + error.get_request_code() + ", " + +- "mc=" + error.get_minor_code()); +- } +- return 0; +- } +- +- // Called from the native code when an error occurs +- private static int globalErrorHandler(long display, long event_ptr) { +- if (noisyAwtHandler) { +- XlibWrapper.PrintXErrorEvent(display, event_ptr); +- } +- XErrorEvent event = new XErrorEvent(event_ptr); +- saved_error = event; +- try { +- if (current_error_handler != null) { +- return current_error_handler.handleError(display, event); +- } else { +- return SAVED_ERROR_HANDLER(display, event); +- } +- } catch (Throwable z) { +- log.fine("Error in GlobalErrorHandler", z); +- } +- return 0; +- } +- +- //---- END OF ERROR HANDLER CODE ----// +- + private native static void initIDs(); + native static void waitForEvents(long nextTaskTime); + static Thread toolkitThread; +@@ -304,20 +232,12 @@ + areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); + //set system property if not yet assigned + System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); +- +- saved_error_handler = XlibWrapper.SetToolkitErrorHandler(); + } finally { + awtUnlock(); + } + PrivilegedAction a = new PrivilegedAction() { + public Void run() { +- ThreadGroup mainTG = Thread.currentThread().getThreadGroup(); +- ThreadGroup parentTG = mainTG.getParent(); +- while (parentTG != null) { +- mainTG = parentTG; +- parentTG = mainTG.getParent(); +- } +- Thread shutdownThread = new Thread(mainTG, "XToolkt-Shutdown-Thread") { ++ Thread shutdownThread = new Thread(ThreadGroupUtils.getRootThreadGroup(), "XToolkt-Shutdown-Thread") { + public void run() { + XSystemTrayPeer peer = XSystemTrayPeer.getPeerInstance(); + if (peer != null) { +@@ -379,22 +299,16 @@ + init(); + XWM.init(); + SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); +- +- PrivilegedAction action = new PrivilegedAction() { ++ toolkitThread = AccessController.doPrivileged(new PrivilegedAction() { ++ @Override + public Thread run() { +- ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); +- ThreadGroup parentTG = currentTG.getParent(); +- while (parentTG != null) { +- currentTG = parentTG; +- parentTG = currentTG.getParent(); +- } +- Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT"); ++ Thread thread = new Thread(ThreadGroupUtils.getRootThreadGroup(), XToolkit.this, "AWT-XAWT"); ++ thread.setContextClassLoader(null); + thread.setPriority(Thread.NORM_PRIORITY + 1); + thread.setDaemon(true); + return thread; + } +- }; +- toolkitThread = AccessController.doPrivileged(action); ++ }); + toolkitThread.start(); + } + } +--- ./jdk/src/solaris/classes/sun/awt/X11/XTranslateCoordinates.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XTranslateCoordinates.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + } + __executed = true; + if (errorHandler != null) { +- XToolkit.WITH_XERROR_HANDLER(errorHandler); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(errorHandler); + } + int status = + XlibWrapper.XTranslateCoordinates(XToolkit.getDisplay(), +@@ -80,7 +80,7 @@ + dest_y_ptr, + child_ptr ); + if (errorHandler != null) { +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + } + return status; + } finally { +--- ./jdk/src/solaris/classes/sun/awt/X11/XWM.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XWM.java 2014-06-06 19:56:29.000000000 -0700 +@@ -283,12 +283,12 @@ + winmgr_running = false; + substruct.set_event_mask(XConstants.SubstructureRedirectMask); + +- XToolkit.WITH_XERROR_HANDLER(detectWMHandler); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(detectWMHandler); + XlibWrapper.XChangeWindowAttributes(XToolkit.getDisplay(), + XToolkit.getDefaultRootWindow(), + XConstants.CWEventMask, + substruct.pData); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - LE_VAR_ARRAY(ChainingContextualSubstitutionFormat1Subtable, chainSubRuleSetTableOffsetArray) + /* + * If no WM is running then our selection for SubstructureRedirect +@@ -617,15 +617,16 @@ -@@ -201,7 +218,8 @@ - le_uint16 chainSubClassSetCount; - Offset chainSubClassSetTableOffsetArray[ANY_NUMBER]; + XToolkit.awtLock(); + try { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance()); + XlibWrapper.XChangePropertyS(XToolkit.getDisplay(), XToolkit.getDefaultRootWindow(), + XA_ICEWM_WINOPTHINT.getAtom(), + XA_ICEWM_WINOPTHINT.getAtom(), + 8, XConstants.PropModeReplace, + new String(opt)); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + +- if (XToolkit.saved_error != null && XToolkit.saved_error.get_error_code() != XConstants.Success) { ++ if ((XErrorHandlerUtil.saved_error != null) && ++ (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { + log.finer("Erorr getting XA_ICEWM_WINOPTHINT property"); + return false; + } +--- ./jdk/src/solaris/classes/sun/awt/X11/XlibUtil.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/XlibUtil.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -151,8 +151,8 @@ + { + int status = xtc.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + if ((status != 0) && +- ((XToolkit.saved_error == null) || +- (XToolkit.saved_error.get_error_code() == XConstants.Success))) ++ ((XErrorHandlerUtil.saved_error == null) || ++ (XErrorHandlerUtil.saved_error.get_error_code() == XConstants.Success))) + { + translated = new Point(xtc.get_dest_x(), xtc.get_dest_y()); + } +@@ -345,13 +345,13 @@ + XWindowAttributes wattr = new XWindowAttributes(); + try + { +- XToolkit.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); ++ XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.IgnoreBadWindowHandler.getInstance()); + int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), + window, wattr.pData); +- XToolkit.RESTORE_XERROR_HANDLER(); ++ XErrorHandlerUtil.RESTORE_XERROR_HANDLER(); + if ((status != 0) && +- ((XToolkit.saved_error == null) || +- (XToolkit.saved_error.get_error_code() == XConstants.Success))) ++ ((XErrorHandlerUtil.saved_error == null) || ++ (XErrorHandlerUtil.saved_error.get_error_code() == XConstants.Success))) + { + return wattr.get_map_state(); + } +--- ./jdk/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -992,7 +992,7 @@ + pw.println("\t\t\t}"); + pw.println("\t\t\t__executed = true;"); + pw.println("\t\t\tif (errorHandler != null) {"); +- pw.println("\t\t\t XToolkit.WITH_XERROR_HANDLER(errorHandler);"); ++ pw.println("\t\t\t XErrorHandlerUtil.WITH_XERROR_HANDLER(errorHandler);"); + pw.println("\t\t\t}"); + iter = ft.getArguments().iterator(); + while (iter.hasNext()) { +@@ -1021,7 +1021,7 @@ + } + pw.println("\t\t\t);"); + pw.println("\t\t\tif (errorHandler != null) {"); +- pw.println("\t\t\t XToolkit.RESTORE_XERROR_HANDLER();"); ++ pw.println("\t\t\t XErrorHandlerUtil.RESTORE_XERROR_HANDLER();"); + pw.println("\t\t\t}"); + if (!ft.isVoid()) { + pw.println("\t\t\treturn status;"); +--- ./jdk/src/solaris/classes/sun/awt/X11FontManager.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11FontManager.java 2014-06-06 19:56:34.000000000 -0700 +@@ -213,7 +213,7 @@ + if (fontID != null) { + fileName = (String)fontNameMap.get(fontID); + /* On Linux check for the Lucida Oblique fonts */ +- if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) { ++ if (fileName == null && (FontUtilities.isLinux || FontUtilities.isBSD) && !isOpenJDK()) { + if (oblmap == null) { + initObliqueLucidaFontMap(); + } +@@ -712,7 +712,7 @@ + if (fontConfigDirs == null) { + return; + } +- if (FontUtilities.isLinux) { ++ if (FontUtilities.isLinux || FontUtilities.isBSD) { + fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts"); + } + fontdirs = (String[])fontConfigDirs.toArray(new String[0]); +@@ -740,7 +740,7 @@ + */ + FontConfiguration mFontConfig = new MFontConfiguration(this); + if (FontUtilities.isOpenSolaris || +- (FontUtilities.isLinux && ++ ((FontUtilities.isLinux || FontUtilities.isBSD) && + (!mFontConfig.foundOsSpecificFile() || + !mFontConfig.fontFilesArePresent()) || + (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) { +--- ./jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2013-09-06 11:29:07.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2014-04-19 01:27:13.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -41,6 +41,7 @@ + import sun.java2d.opengl.GLXGraphicsConfig; + import sun.java2d.xr.XRGraphicsConfig; + import sun.java2d.loops.SurfaceType; ++import sun.misc.ThreadGroupUtils; -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - LE_VAR_ARRAY(ChainingContextualSubstitutionFormat2Subtable, chainSubClassSetTableOffsetArray) + /** + * This is an implementation of a GraphicsDevice object for a single +@@ -424,23 +425,20 @@ + // hook will have no effect) + shutdownHookRegistered = true; + PrivilegedAction a = new PrivilegedAction() { ++ @Override + public Void run() { +- ThreadGroup mainTG = Thread.currentThread().getThreadGroup(); +- ThreadGroup parentTG = mainTG.getParent(); +- while (parentTG != null) { +- mainTG = parentTG; +- parentTG = mainTG.getParent(); +- } ++ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); + Runnable r = new Runnable() { +- public void run() { +- Window old = getFullScreenWindow(); +- if (old != null) { +- exitFullScreenExclusive(old); +- setDisplayMode(origDisplayMode); +- } ++ @Override ++ public void run() { ++ Window old = getFullScreenWindow(); ++ if (old != null) { ++ exitFullScreenExclusive(old); ++ setDisplayMode(origDisplayMode); + } +- }; +- Thread t = new Thread(mainTG, r,"Display-Change-Shutdown-Thread-"+screen); ++ } ++ }; ++ Thread t = new Thread(rootTG, r, "Display-Change-Shutdown-Thread-" + screen); + t.setContextClassLoader(null); + Runtime.getRuntime().addShutdownHook(t); + return null; +--- ./jdk/src/solaris/classes/sun/net/PortConfig.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/solaris/classes/sun/net/PortConfig.java 2014-06-06 19:56:34.000000000 -0700 +@@ -0,0 +1,89 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.net; ++ ++import java.security.AccessController; ++ ++/** ++ * Determines the ephemeral port range in use on this system. ++ * If this cannot be determined, then the default settings ++ * of the OS are returned. ++ */ ++ ++public final class PortConfig { ++ ++ private static int defaultUpper, defaultLower; ++ private final static int upper, lower; ++ ++ private PortConfig() {} ++ ++ static { ++ AccessController.doPrivileged( ++ new java.security.PrivilegedAction() { ++ public Void run() { ++ System.loadLibrary("net"); ++ String os = System.getProperty("os.name"); ++ if (os.startsWith("Linux")) { ++ defaultLower = 32768; ++ defaultUpper = 61000; ++ } else if (os.startsWith("SunOS")) { ++ defaultLower = 32768; ++ defaultUpper = 65535; ++ } else if (os.contains("OS X") || os.endsWith("BSD")) { ++ defaultLower = 49152; ++ defaultUpper = 65535; ++ } else { ++ throw new InternalError( ++ "sun.net.PortConfig: unknown OS"); ++ } ++ return null; ++ } ++ }); ++ ++ int v = getLower0(); ++ if (v == -1) { ++ v = defaultLower; ++ } ++ lower = v; ++ ++ v = getUpper0(); ++ if (v == -1) { ++ v = defaultUpper; ++ } ++ upper = v; ++ } ++ ++ static native int getLower0(); ++ static native int getUpper0(); ++ ++ public static int getLower() { ++ return lower; ++ } ++ ++ public static int getUpper() { ++ return upper; ++ } ++} +--- ./jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java 2014-06-06 19:56:34.000000000 -0700 +@@ -50,7 +50,7 @@ + return new SolarisAsynchronousChannelProvider(); + if (osname.equals("Linux")) + return new LinuxAsynchronousChannelProvider(); +- if (osname.contains("OS X")) ++ if (osname.contains("OS X") || osname.endsWith("BSD")) + return new BsdAsynchronousChannelProvider(); + throw new InternalError("platform not recognized"); + } +--- ./jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2013-12-01 11:14:32.000000000 -0800 +@@ -26,9 +26,11 @@ + package sun.nio.ch; -@@ -243,7 +261,8 @@ - //le_uint16 substCount; - //SubstitutionLookupRecord substLookupRecord[ANY_NUMBER]; + import java.io.IOException; ++import java.security.AccessController; + import java.util.BitSet; + import java.util.Map; + import java.util.HashMap; ++import sun.security.action.GetIntegerAction; -- le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; -+ le_uint32 process(const LETableReference &base, const LookupProcessor *lookupProcessor, -+ GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; - LE_VAR_ARRAY(ChainingContextualSubstitutionFormat3Subtable, backtrackCoverageTableOffsetArray) ---- jdk/src/share/native/sun/font/layout/CoverageTables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/CoverageTables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -37,8 +37,10 @@ + /** +@@ -78,10 +80,11 @@ + static final int NUM_POLLFDS = Math.min(OPEN_MAX-1, 8192); - U_NAMESPACE_BEGIN + // Initial size of arrays for fd registration changes +- private final int INITIAL_PENDING_UPDATE_SIZE = 64; ++ private static final int INITIAL_PENDING_UPDATE_SIZE = 64; --le_int32 CoverageTable::getGlyphCoverage(LEGlyphID glyphID) const -+le_int32 CoverageTable::getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const - { -+ if(LE_FAILURE(success)) return -1; -+ - switch(SWAPW(coverageFormat)) - { - case 0: -@@ -46,16 +48,16 @@ + // maximum size of updatesLow +- private final int MAX_UPDATE_ARRAY_SIZE = Math.min(OPEN_MAX, 64*1024); ++ private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged( ++ new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024))); - case 1: - { -- const CoverageFormat1Table *f1Table = (const CoverageFormat1Table *) this; -+ LEReferenceTo f1Table(base, success); + // The pollfd array for results from devpoll driver + private final AllocatedNativeObject pollArray; +--- ./jdk/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java 2013-12-01 11:14:32.000000000 -0800 +@@ -26,9 +26,11 @@ + package sun.nio.ch; -- return f1Table->getGlyphCoverage(glyphID); -+ return f1Table->getGlyphCoverage(f1Table, glyphID, success); - } + import java.io.IOException; ++import java.security.AccessController; + import java.util.BitSet; + import java.util.HashMap; + import java.util.Map; ++import sun.security.action.GetIntegerAction; - case 2: - { -- const CoverageFormat2Table *f2Table = (const CoverageFormat2Table *) this; -+ LEReferenceTo f2Table(base, success); + /** + * Manipulates a native array of epoll_event structs on Linux: +@@ -78,8 +80,8 @@ + private static final int INITIAL_PENDING_UPDATE_SIZE = 64; -- return f2Table->getGlyphCoverage(glyphID); -+ return f2Table->getGlyphCoverage(f2Table, glyphID, success); - } + // maximum size of updatesLow +- private static final int MAX_UPDATE_ARRAY_SIZE = Math.min(OPEN_MAX, 64*1024); +- ++ private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged( ++ new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024))); - default: -@@ -63,8 +65,10 @@ + // The fd of the epoll driver + private final int epfd; +@@ -164,6 +166,16 @@ } - } --le_int32 CoverageFormat1Table::getGlyphCoverage(LEGlyphID glyphID) const -+le_int32 CoverageFormat1Table::getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const - { -+ if(LE_FAILURE(success)) return -1; + /** ++ * Returns {@code true} if updates for the given key (file ++ * descriptor) are killed. ++ */ ++ private boolean isEventsHighKilled(Integer key) { ++ assert key >= MAX_UPDATE_ARRAY_SIZE; ++ Byte value = eventsHigh.get(key); ++ return (value != null && value == KILLED); ++ } + - TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); - le_uint16 count = SWAPW(glyphCount); - le_uint8 bit = OpenTypeUtilities::highBit(count); -@@ -77,6 +81,10 @@ - return -1; ++ /** + * Sets the pending update events for the given file descriptor. This + * method has no effect if the update events is already set to KILLED, + * unless {@code force} is {@code true}. +@@ -175,7 +187,7 @@ + } + } else { + Integer key = Integer.valueOf(fd); +- if ((eventsHigh.get(key) != KILLED) || force) { ++ if (!isEventsHighKilled(key) || force) { + eventsHigh.put(key, Byte.valueOf(events)); + } } +--- ./jdk/src/solaris/classes/sun/nio/ch/EventPortWrapper.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/nio/ch/EventPortWrapper.java 2013-12-01 11:14:32.000000000 -0800 +@@ -25,9 +25,14 @@ -+ LEReferenceToArrayOf(base, success, glyphArray, count); -+ if(LE_FAILURE(success)) return -1; // range checks array -+ -+ - if (SWAPW(glyphArray[extra]) <= ttGlyphID) { - index = extra; - } -@@ -96,14 +104,18 @@ - return -1; - } + package sun.nio.ch; --le_int32 CoverageFormat2Table::getGlyphCoverage(LEGlyphID glyphID) const -+le_int32 CoverageFormat2Table::getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const - { -+ if(LE_FAILURE(success)) return -1; -+ - TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); - le_uint16 count = SWAPW(rangeCount); +-import sun.misc.Unsafe; + import java.io.IOException; +-import java.util.*; ++import java.security.AccessController; ++import java.util.BitSet; ++import java.util.HashMap; ++import java.util.Map; + -+ LEReferenceToArrayOf rangeRecordArrayRef(base, success, rangeRecordArray, count); - le_int32 rangeIndex = -- OpenTypeUtilities::getGlyphRangeIndex(ttGlyphID, rangeRecordArray, count); -+ OpenTypeUtilities::getGlyphRangeIndex(ttGlyphID, rangeRecordArrayRef, success); ++import sun.misc.Unsafe; ++import sun.security.action.GetIntegerAction; + import static sun.nio.ch.SolarisEventPort.*; -- if (rangeIndex < 0) { -+ if (rangeIndex < 0 || LE_FAILURE(success)) { // could fail if array out of bounds - return -1; + /** +@@ -49,7 +54,8 @@ + private final int INITIAL_PENDING_UPDATE_SIZE = 256; + + // maximum size of updateArray +- private final int MAX_UPDATE_ARRAY_SIZE = Math.min(OPEN_MAX, 64*1024); ++ private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged( ++ new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024))); + + // special update status to indicate that it should be ignored + private static final byte IGNORE = -1; +--- ./jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java 2014-01-18 12:16:27.000000000 -0800 +@@ -180,6 +180,10 @@ + SctpNet.throwAlreadyBoundException(); + InetSocketAddress isa = (local == null) ? + new InetSocketAddress(0) : Net.checkAddress(local); ++ SecurityManager sm = System.getSecurityManager(); ++ if (sm != null) { ++ sm.checkListen(isa.getPort()); ++ } + Net.bind(fd, isa.getAddress(), isa.getPort()); + InetSocketAddress boundIsa = Net.localAddress(fd); + port = boundIsa.getPort(); +--- ./jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2014-06-06 19:56:34.000000000 -0700 +@@ -70,6 +70,8 @@ + return createProvider("sun.nio.fs.LinuxFileSystemProvider"); + if (osname.equals("Darwin") || osname.contains("OS X")) + return createProvider("sun.nio.fs.MacOSXFileSystemProvider"); ++ if (osname.endsWith("BSD")) ++ return createProvider("sun.nio.fs.BsdFileSystemProvider"); + throw new AssertionError("Platform not recognized"); } + } +--- ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2013-09-06 11:29:08.000000000 -0700 ++++ ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2014-06-06 19:56:34.000000000 -0700 +@@ -129,6 +129,7 @@ ---- jdk/src/share/native/sun/font/layout/CoverageTables.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/CoverageTables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -46,7 +46,7 @@ - { - le_uint16 coverageFormat; + static boolean isBSD() { + return (osname.equals("Linux") || ++ osname.endsWith("BSD") || + osname.contains("OS X")); + } -- le_int32 getGlyphCoverage(LEGlyphID glyphID) const; -+ le_int32 getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; - }; +--- ./jdk/src/solaris/demo/jni/Poller/Poller.c 2013-09-06 11:29:09.000000000 -0700 ++++ ./jdk/src/solaris/demo/jni/Poller/Poller.c 2014-04-19 01:27:14.000000000 -0700 +@@ -318,7 +318,7 @@ - struct CoverageFormat1Table : CoverageTable -@@ -54,7 +54,7 @@ - le_uint16 glyphCount; - TTGlyphID glyphArray[ANY_NUMBER]; + ioevent_t *ioeh; -- le_int32 getGlyphCoverage(LEGlyphID glyphID) const; -+ le_int32 getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; - }; - LE_VAR_ARRAY(CoverageFormat1Table, glyphArray) +- if (handle < 0 || handle > MAX_HANDLES) ++ if (handle < 0 || handle >= MAX_HANDLES) + { + STATE_EXCEPTION("DestroyPoller - handle out of range"); + return; +@@ -366,7 +366,7 @@ + int retval; + ioevent_t *ioeh; -@@ -64,7 +64,7 @@ - le_uint16 rangeCount; - GlyphRangeRecord rangeRecordArray[ANY_NUMBER]; +- if (handle < 0 || handle > MAX_HANDLES) ++ if (handle < 0 || handle >= MAX_HANDLES) + return STATE_EXCEPTION("AddFd - handle out of range"); -- le_int32 getGlyphCoverage(LEGlyphID glyphID) const; -+ le_int32 getGlyphCoverage(LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; - }; - LE_VAR_ARRAY(CoverageFormat2Table, rangeRecordArray) + ioeh = &IOE_handles[handle]; +@@ -459,7 +459,7 @@ + return fd; + } ---- jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -51,23 +51,27 @@ - } +- /* ++/* + * Class: Poller + * Method: nativeRemoveFd + * Signature: (II)I +@@ -469,7 +469,7 @@ + { + ioevent_t *ioeh; - LEPoint entryAnchor, exitAnchor; -- Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); // TODO -+ Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); - Offset exitOffset = SWAPW(entryExitRecords[coverageIndex].exitAnchor); +- if (handle < 0 || handle > MAX_HANDLES) ++ if (handle < 0 || handle >= MAX_HANDLES) + return STATE_EXCEPTION("RemoveFd - handle out of range"); - if (entryOffset != 0) { -- const AnchorTable *entryAnchorTable = (const AnchorTable *) ((char *) this + entryOffset); -+ LEReferenceTo entryAnchorTable(base, success, entryOffset); + ioeh = &IOE_handles[handle]; +@@ -576,7 +576,7 @@ + int i; + ioevent_t *ioeh; -- entryAnchorTable->getAnchor(glyphID, fontInstance, entryAnchor); -+ if( LE_SUCCESS(success) ) { -+ entryAnchorTable->getAnchor(entryAnchorTable, glyphID, fontInstance, entryAnchor, success); - glyphIterator->setCursiveEntryPoint(entryAnchor); -+ } - } else { - //glyphIterator->clearCursiveEntryPoint(); - } +- if (handle < 0 || handle > MAX_HANDLES) ++ if (handle < 0 || handle >= MAX_HANDLES) + return STATE_EXCEPTION("IsMember - handle out of range"); - if (exitOffset != 0) { -- const AnchorTable *exitAnchorTable = (const AnchorTable *) ((char *) this + exitOffset); -+ LEReferenceTo exitAnchorTable(base, success, exitOffset); + ioeh = &IOE_handles[handle]; +@@ -629,7 +629,7 @@ + ioevent_t *ioeh; + jboolean isCopy1,isCopy2; -- exitAnchorTable->getAnchor(glyphID, fontInstance, exitAnchor); -+ if( LE_SUCCESS(success) ) { -+ exitAnchorTable->getAnchor(exitAnchorTable, glyphID, fontInstance, exitAnchor, success); - glyphIterator->setCursiveExitPoint(exitAnchor); -+ } - } else { - //glyphIterator->clearCursiveExitPoint(); - } ---- jdk/src/share/native/sun/font/layout/DeviceTables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/DeviceTables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -43,7 +43,7 @@ +- if (handle < 0 || handle > MAX_HANDLES) ++ if (handle < 0 || handle >= MAX_HANDLES) + return STATE_EXCEPTION("nativeWait - handle out of range"); - #define FORMAT_COUNT LE_ARRAY_SIZE(fieldBits) + ioeh = &IOE_handles[handle]; +--- ./jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2013-09-06 11:29:09.000000000 -0700 ++++ ./jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -376,33 +376,32 @@ + } --le_int16 DeviceTable::getAdjustment(le_uint16 ppem) const -+le_int16 DeviceTable::getAdjustment(const LEReferenceTo&base, le_uint16 ppem, LEErrorCode &success) const - { - le_uint16 start = SWAPW(startSize); - le_uint16 format = SWAPW(deltaFormat) - 1; -@@ -53,6 +53,13 @@ - le_uint16 sizeIndex = ppem - start; - le_uint16 bits = fieldBits[format]; - le_uint16 count = 16 / bits; -+ -+ LEReferenceToArrayOf deltaValuesRef(base, success, deltaValues, (sizeIndex / count)); + static void dll_build_name(char* buffer, size_t buflen, +- const char* pname, const char* fname) { +- // Loosely based on os_solaris.cpp ++ const char* paths, const char* fname) { ++ char *path, *paths_copy, *next_token; + +- char *pathname = (char *)pname; +- while (strlen(pathname) > 0) { +- char *p = strchr(pathname, ':'); +- if (p == NULL) { +- p = pathname + strlen(pathname); +- } +- /* check for NULL path */ +- if (p == pathname) { +- continue; +- } +- (void)snprintf(buffer, buflen, "%.*s/lib%s" JNI_LIB_SUFFIX, +- (p - pathname), pathname, fname); ++ paths_copy = strdup(paths); ++ if (paths_copy == NULL) { ++ return; ++ } + -+ if(LE_FAILURE(success)) { -+ return result; ++ next_token = NULL; ++ path = strtok_r(paths_copy, ":", &next_token); + +- if (access(buffer, F_OK) == 0) { ++ while (path != NULL) { ++ snprintf(buffer, buflen, "%s/lib%s" JNI_LIB_SUFFIX, path, fname); ++ if (access(buffer, F_OK) == 0) { + break; +- } +- pathname = p + 1; +- *buffer = '\0'; +- } + } ++ *buffer = '\0'; ++ path = strtok_r(NULL, ":", &next_token); ++ } + - le_uint16 word = SWAPW(deltaValues[sizeIndex / count]); - le_uint16 fieldIndex = sizeIndex % count; - le_uint16 shift = 16 - (bits * (fieldIndex + 1)); ---- jdk/src/share/native/sun/font/layout/DeviceTables.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/DeviceTables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -50,7 +50,7 @@ - le_uint16 deltaFormat; - le_uint16 deltaValues[ANY_NUMBER]; - -- le_int16 getAdjustment(le_uint16 ppem) const; -+ le_int16 getAdjustment(const LEReferenceTo &base, le_uint16 ppem, LEErrorCode &success) const; ++ free(paths_copy); + } - private: - static const le_uint16 fieldMasks[]; ---- jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -48,7 +48,6 @@ - const LookupProcessor *lookupProcessor, le_uint16 lookupType, - GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const + /* Create the actual fill filename for a dynamic library. */ + void +-md_build_library_name(char *holder, int holderlen, char *pname, char *fname) ++md_build_library_name(char *holder, int holderlen, const char *pname, const char *fname) { -- - if (LE_FAILURE(success)) { - return 0; - } ---- jdk/src/share/native/sun/font/layout/ExtensionSubtables.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ExtensionSubtables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -52,8 +52,7 @@ - le_uint16 extensionLookupType; - le_uint32 extensionOffset; + int pnamelen; -- le_uint32 process(const LEReferenceTo &extRef, -- const LookupProcessor *lookupProcessor, le_uint16 lookupType, -+ le_uint32 process(const LEReferenceTo &base, const LookupProcessor *lookupProcessor, le_uint16 lookupType, - GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; - }; +--- ./jdk/src/solaris/javavm/export/jvm_md.h 2013-09-06 11:29:09.000000000 -0700 ++++ ./jdk/src/solaris/javavm/export/jvm_md.h 2014-06-06 19:56:34.000000000 -0700 +@@ -75,7 +75,11 @@ + #define JVM_O_O_APPEND O_APPEND + #define JVM_O_EXCL O_EXCL + #define JVM_O_CREAT O_CREAT ++#if !defined(__APPLE__) && defined(_ALLBSD_SOURCE) ++#define JVM_O_DELETE 0x10000000 ++#else + #define JVM_O_DELETE 0x10000 ++#endif ---- jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -49,9 +49,9 @@ - // nothing to do? + /* Signals */ + +--- ./jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2013-09-06 11:29:09.000000000 -0700 ++++ ./jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -168,6 +168,9 @@ + /* + * XXXBSD: there's no way available to get swap info in + * FreeBSD. Usage of libkvm is not an option here ++ * ++ * XXX: Investigate how swapinfo(8) does this. ++ * Total swap is in vm.swap_total + */ + // throw_internal_error(env, "Unimplemented in FreeBSD"); + return (0); +@@ -242,6 +245,8 @@ + #else /* _ALLBSD_SOURCE */ + /* + * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. ++ * ++ * XXX: Determine how linprocfs gets this. + */ + // throw_internal_error(env, "Unimplemented in FreeBSD"); + return (64 * MB); +@@ -323,6 +328,8 @@ + #elif defined(_ALLBSD_SOURCE) + /* + * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. ++ * ++ * XXX: Investigate how top(8) gets this on FreeBSD. + */ + // throw_internal_error(env, "Unimplemented in FreeBSD"); + return (128 * MB); +@@ -342,7 +349,11 @@ + size_t rlen; + + mib[0] = CTL_HW; ++#ifdef __APPLE__ + mib[1] = HW_MEMSIZE; ++#else ++ mib[1] = HW_PHYSMEM; ++#endif + rlen = sizeof(result); + if (sysctl(mib, 2, &result, &rlen, NULL, 0) != 0) { + throw_internal_error(env, "sysctl failed"); +@@ -408,6 +419,8 @@ + #elif defined(_ALLBSD_SOURCE) + /* + * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. ++ * ++ * XXX: Investigate getting this on FreeBSD. Look at lsof. + */ + // throw_internal_error(env, "Unimplemented in FreeBSD"); + return (100); +--- ./jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c 2014-04-19 01:27:14.000000000 -0700 +@@ -76,7 +76,7 @@ + adPath[*count].st_ino = statBuf.st_ino; + adPath[*count].st_dev = statBuf.st_dev; + strncpy(adPath[*count].path, path, MAX_NAME_LENGTH); +- adPath[*count].path[MAX_NAME_LENGTH] = 0; ++ adPath[*count].path[MAX_NAME_LENGTH - 1] = 0; + (*count)++; + TRACE1("Added audio device %s\n", path); + } +--- ./jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -151,7 +151,6 @@ + return rv; } --le_bool GDEFMarkFilter::accept(LEGlyphID glyph) const -+le_bool GDEFMarkFilter::accept(LEGlyphID glyph, LEErrorCode &success) const +- + JNIEXPORT jboolean JNICALL + Java_java_io_UnixFileSystem_setPermission(JNIEnv *env, jobject this, + jobject file, +--- ./jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -31,21 +31,24 @@ + #ifdef __APPLE__ + #include + #define environ (*_NSGetEnviron()) ++#else ++/* This is one of the rare times it's more portable to declare an ++ * external symbol explicitly, rather than via a system header. ++ * The declaration is standardized as part of UNIX98, but there is ++ * no standard (not even de-facto) header file where the ++ * declaration is to be found. See: ++ * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html ++ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html ++ * ++ * "All identifiers in this volume of IEEE Std 1003.1-2001, except ++ * environ, are defined in at least one of the headers" (!) ++ */ ++extern char **environ; + #endif + + JNIEXPORT jobjectArray JNICALL + Java_java_lang_ProcessEnvironment_environ(JNIEnv *env, jclass ign) { -- le_int32 glyphClass = classDefTable->getGlyphClass(glyph); -+ le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); +- /* This is one of the rare times it's more portable to declare an +- * external symbol explicitly, rather than via a system header. +- * The declaration is standardized as part of UNIX98, but there is +- * no standard (not even de-facto) header file where the +- * declaration is to be found. See: +- * http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html */ +-#ifndef __APPLE__ +- extern char ** environ; /* environ[i] looks like: VAR=VALUE\0 */ +-#endif +- + jsize count = 0; + jsize i, j; + jobjectArray result; +@@ -53,7 +56,7 @@ - return glyphClass == gcdMarkGlyph; - } ---- jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h 2014-04-20 12:39:16.000000000 -0700 -@@ -55,7 +55,7 @@ - GDEFMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); - virtual ~GDEFMarkFilter(); + for (i = 0; environ[i]; i++) { + /* Ignore corrupted environment variables */ +- if (strchr(environ[i], '=') != NULL) ++ if (strchr(environ[i], '=') != NULL && *environ[i] != '=') + count++; + } -- virtual le_bool accept(LEGlyphID glyph) const; -+ virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; - }; +@@ -63,7 +66,7 @@ + for (i = 0, j = 0; environ[i]; i++) { + const char * varEnd = strchr(environ[i], '='); + /* Ignore corrupted environment variables */ +- if (varEnd != NULL) { ++ if (varEnd != NULL && varEnd != environ[i]) { + jbyteArray var, val; + const char * valBeg = varEnd + 1; + jsize varLength = varEnd - environ[i]; +--- ./jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -47,19 +47,15 @@ + #endif + #include + #include +-#include +-#include +-#include +-#include +-#include +- +-#ifdef __APPLE__ +-#include +-#define environ (*_NSGetEnviron()) ++ ++#if defined(__solaris__) || defined(_ALLBSD_SOURCE) ++#include + #endif + ++#include "childproc.h" ++ + /* +- * There are 3 possible strategies we might use to "fork": ++ * There are 4 possible strategies we might use to "fork": + * + * - fork(2). Very portable and reliable but subject to + * failure due to overcommit (see the documentation on +@@ -94,80 +90,20 @@ + * http://sources.redhat.com/bugzilla/show_bug.cgi?id=10311 + * but the glibc maintainers closed it as WONTFIX. + * +- * Based on the above analysis, we are currently using vfork() on +- * Linux and fork() on other Unix systems, but the code to use clone() +- * remains. +- */ +- +-#define START_CHILD_USE_CLONE 0 /* clone() currently disabled; see above. */ +- +-#ifndef START_CHILD_USE_CLONE +- #ifdef __linux__ +- #define START_CHILD_USE_CLONE 1 +- #else +- #define START_CHILD_USE_CLONE 0 +- #endif +-#endif +- +-/* By default, use vfork() on Linux. */ +-#ifndef START_CHILD_USE_VFORK +- #ifdef __linux__ +- #define START_CHILD_USE_VFORK 1 +- #else +- #define START_CHILD_USE_VFORK 0 +- #endif +-#endif +- +-#if START_CHILD_USE_CLONE +-#include +-#define START_CHILD_SYSTEM_CALL "clone" +-#elif START_CHILD_USE_VFORK +-#define START_CHILD_SYSTEM_CALL "vfork" +-#else +-#define START_CHILD_SYSTEM_CALL "fork" +-#endif +- +-#ifndef STDIN_FILENO +-#define STDIN_FILENO 0 +-#endif +- +-#ifndef STDOUT_FILENO +-#define STDOUT_FILENO 1 +-#endif +- +-#ifndef STDERR_FILENO +-#define STDERR_FILENO 2 +-#endif +- +-#ifndef SA_NOCLDSTOP +-#define SA_NOCLDSTOP 0 +-#endif +- +-#ifndef SA_RESTART +-#define SA_RESTART 0 +-#endif +- +-#define FAIL_FILENO (STDERR_FILENO + 1) +- +-/* TODO: Refactor. */ +-#define RESTARTABLE(_cmd, _result) do { \ +- do { \ +- _result = _cmd; \ +- } while((_result == -1) && (errno == EINTR)); \ +-} while(0) +- +-/* This is one of the rare times it's more portable to declare an +- * external symbol explicitly, rather than via a system header. +- * The declaration is standardized as part of UNIX98, but there is +- * no standard (not even de-facto) header file where the +- * declaration is to be found. See: +- * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html +- * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html ++ * - posix_spawn(). While posix_spawn() is a fairly elaborate and ++ * complicated system call, it can't quite do everything that the old ++ * fork()/exec() combination can do, so the only feasible way to do ++ * this, is to use posix_spawn to launch a new helper executable ++ * "jprochelper", which in turn execs the target (after cleaning ++ * up file-descriptors etc.) The end result is the same as before, ++ * a child process linked to the parent in the same way, but it ++ * avoids the problem of duplicating the parent (VM) process ++ * address space temporarily, before launching the target command. + * +- * "All identifiers in this volume of IEEE Std 1003.1-2001, except +- * environ, are defined in at least one of the headers" (!) ++ * Based on the above analysis, we are currently using vfork() on ++ * Linux, posix_spawn() on Mac and fork() on Solaris, but the code to ++ * use clone() and fork() remains. + */ +-extern char **environ; - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/GlyphIterator.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/GlyphIterator.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -41,14 +41,13 @@ - U_NAMESPACE_BEGIN - GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, -- FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader) -+ FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader, LEErrorCode &success) - : direction(1), position(-1), nextLimit(-1), prevLimit(-1), - glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments), - srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), glyphGroup(0), - glyphClassDefinitionTable(), markAttachClassDefinitionTable() + static void +@@ -245,53 +181,35 @@ + } + static const char * const * +-splitPath(JNIEnv *env, const char *path) ++effectivePathv(JNIEnv *env) { -- LEErrorCode success = LE_NO_ERROR; // TODO - le_int32 glyphCount = glyphStorage.getGlyphCount(); - - if (theGlyphDefinitionTableHeader.isValid()) { -@@ -66,6 +65,7 @@ - nextLimit = -1; - prevLimit = glyphCount; +- const char *p, *q; +- char **pathv; ++ char *p; + int i; ++ const char *path = effectivePath(); + int count = countOccurrences(path, ':') + 1; +- +- pathv = NEW(char*, count+1); +- pathv[count] = NULL; +- for (p = path, i = 0; i < count; i++, p = q + 1) { +- for (q = p; (*q != ':') && (*q != '\0'); q++) +- ; +- if (q == p) /* empty PATH component => "." */ +- pathv[i] = "./"; +- else { +- int addSlash = ((*(q - 1)) != '/'); +- pathv[i] = NEW(char, q - p + addSlash + 1); +- memcpy(pathv[i], p, q - p); +- if (addSlash) +- pathv[i][q - p] = '/'; +- pathv[i][q - p + addSlash] = '\0'; +- } ++ size_t pathvsize = sizeof(const char *) * (count+1); ++ size_t pathsize = strlen(path) + 1; ++ const char **pathv = (const char **) xmalloc(env, pathvsize + pathsize); ++ ++ if (pathv == NULL) ++ return NULL; ++ p = (char *) pathv + pathvsize; ++ memcpy(p, path, pathsize); ++ /* split PATH by replacing ':' with NULs; empty components => "." */ ++ for (i = 0; i < count; i++) { ++ char *q = p + strcspn(p, ":"); ++ pathv[i] = (p == q) ? "." : p; ++ *q = '\0'; ++ p = q + 1; } -+ filterResetCache(); +- return (const char * const *) pathv; ++ pathv[count] = NULL; ++ return pathv; } - GlyphIterator::GlyphIterator(GlyphIterator &that) -@@ -84,6 +84,7 @@ - glyphGroup = that.glyphGroup; - glyphClassDefinitionTable = that.glyphClassDefinitionTable; - markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; -+ filterResetCache(); +-/** +- * Cached value of JVM's effective PATH. +- * (We don't support putenv("PATH=...") in native code) +- */ +-static const char *parentPath; +- +-/** +- * Split, canonicalized version of parentPath +- */ +-static const char * const *parentPathv; +- +-static jfieldID field_exitcode; +- + JNIEXPORT void JNICALL +-Java_java_lang_UNIXProcess_initIDs(JNIEnv *env, jclass clazz) ++Java_java_lang_UNIXProcess_init(JNIEnv *env, jclass clazz) + { +- field_exitcode = (*env)->GetFieldID(env, clazz, "exitcode", "I"); +- +- parentPath = effectivePath(); +- parentPathv = splitPath(env, parentPath); +- ++ parentPathv = effectivePathv(env); + setSIGCHLDHandler(env); } - GlyphIterator::GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask) -@@ -102,6 +103,7 @@ - glyphGroup = 0; - glyphClassDefinitionTable = that.glyphClassDefinitionTable; - markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; -+ filterResetCache(); +@@ -358,96 +276,6 @@ + } } - GlyphIterator::GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags) -@@ -120,6 +122,7 @@ - glyphGroup = that.glyphGroup; - glyphClassDefinitionTable = that.glyphClassDefinitionTable; - markAttachClassDefinitionTable = that.markAttachClassDefinitionTable; -+ filterResetCache(); +-static ssize_t +-restartableWrite(int fd, const void *buf, size_t count) +-{ +- ssize_t result; +- RESTARTABLE(write(fd, buf, count), result); +- return result; +-} +- +-static int +-restartableDup2(int fd_from, int fd_to) +-{ +- int err; +- RESTARTABLE(dup2(fd_from, fd_to), err); +- return err; +-} +- +-static int +-restartableClose(int fd) +-{ +- int err; +- RESTARTABLE(close(fd), err); +- return err; +-} +- +-static int +-closeSafely(int fd) +-{ +- return (fd == -1) ? 0 : restartableClose(fd); +-} +- +-static int +-isAsciiDigit(char c) +-{ +- return c >= '0' && c <= '9'; +-} +- +-#ifdef _ALLBSD_SOURCE +-#define FD_DIR "/dev/fd" +-#define dirent64 dirent +-#define readdir64 readdir +-#else +-#define FD_DIR "/proc/self/fd" +-#endif +- +-static int +-closeDescriptors(void) +-{ +- DIR *dp; +- struct dirent64 *dirp; +- int from_fd = FAIL_FILENO + 1; +- +- /* We're trying to close all file descriptors, but opendir() might +- * itself be implemented using a file descriptor, and we certainly +- * don't want to close that while it's in use. We assume that if +- * opendir() is implemented using a file descriptor, then it uses +- * the lowest numbered file descriptor, just like open(). So we +- * close a couple explicitly. */ +- +- restartableClose(from_fd); /* for possible use by opendir() */ +- restartableClose(from_fd + 1); /* another one for good luck */ +- +- if ((dp = opendir(FD_DIR)) == NULL) +- return 0; +- +- /* We use readdir64 instead of readdir to work around Solaris bug +- * 6395699: /proc/self/fd fails to report file descriptors >= 1024 on Solaris 9 +- */ +- while ((dirp = readdir64(dp)) != NULL) { +- int fd; +- if (isAsciiDigit(dirp->d_name[0]) && +- (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) +- restartableClose(fd); +- } +- +- closedir(dp); +- +- return 1; +-} +- +-static int +-moveDescriptor(int fd_from, int fd_to) +-{ +- if (fd_from != fd_to) { +- if ((restartableDup2(fd_from, fd_to) == -1) || +- (restartableClose(fd_from) == -1)) +- return -1; +- } +- return 0; +-} +- + static const char * + getBytes(JNIEnv *env, jbyteArray arr) + { +@@ -463,19 +291,6 @@ } - GlyphIterator::~GlyphIterator() -@@ -133,6 +136,7 @@ - featureMask = newFeatureMask; - glyphGroup = 0; - lookupFlags = newLookupFlags; -+ filterResetCache(); + static void +-initVectorFromBlock(const char**vector, const char* block, int count) +-{ +- int i; +- const char *p; +- for (i = 0, p = block; i < count; i++) { +- /* Invariant: p always points to the start of a C string. */ +- vector[i] = p; +- while (*(p++)); +- } +- vector[count] = NULL; +-} +- +-static void + throwIOException(JNIEnv *env, int errnum, const char *defaultDetail) + { + static const char * const format = "error=%d, %s"; +@@ -490,6 +305,9 @@ + } + /* ASCII Decimal representation uses 2.4 times as many bits as binary. */ + errmsg = NEW(char, strlen(format) + strlen(detail) + 3 * sizeof(errnum)); ++ if (errmsg == NULL) ++ return; ++ + sprintf(errmsg, format, errnum, detail); + s = JNU_NewStringPlatform(env, errmsg); + if (s != NULL) { +@@ -515,278 +333,74 @@ } + #endif /* DEBUG_PROCESS */ - LEGlyphID *GlyphIterator::insertGlyphs(le_int32 count, LEErrorCode& success) -@@ -381,53 +385,68 @@ - glyphPositionAdjustments->setCursiveGlyph(position, baselineIsLogicalEnd()); +-/** +- * Exec FILE as a traditional Bourne shell script (i.e. one without #!). +- * If we could do it over again, we would probably not support such an ancient +- * misfeature, but compatibility wins over sanity. The original support for +- * this was imported accidentally from execvp(). +- */ + static void +-execve_as_traditional_shell_script(const char *file, +- const char *argv[], +- const char *const envp[]) +-{ +- /* Use the extra word of space provided for us in argv by caller. */ +- const char *argv0 = argv[0]; +- const char *const *end = argv; +- while (*end != NULL) +- ++end; +- memmove(argv+2, argv+1, (end-argv) * sizeof (*end)); +- argv[0] = "/bin/sh"; +- argv[1] = file; +- execve(argv[0], (char **) argv, (char **) envp); +- /* Can't even exec /bin/sh? Big trouble, but let's soldier on... */ +- memmove(argv+1, argv+2, (end-argv) * sizeof (*end)); +- argv[0] = argv0; +-} +- +-/** +- * Like execve(2), except that in case of ENOEXEC, FILE is assumed to +- * be a shell script and the system default shell is invoked to run it. +- */ +-static void +-execve_with_shell_fallback(const char *file, +- const char *argv[], +- const char *const envp[]) +-{ +-#if START_CHILD_USE_CLONE || START_CHILD_USE_VFORK +- /* shared address space; be very careful. */ +- execve(file, (char **) argv, (char **) envp); +- if (errno == ENOEXEC) +- execve_as_traditional_shell_script(file, argv, envp); +-#else +- /* unshared address space; we can mutate environ. */ +- environ = (char **) envp; +- execvp(file, (char **) argv); +-#endif ++copyPipe(int from[2], int to[2]) ++{ ++ to[0] = from[0]; ++ to[1] = from[1]; } --le_bool GlyphIterator::filterGlyph(le_uint32 index) const -+void GlyphIterator::filterResetCache(void) { -+ filterCacheValid = FALSE; -+ } -+ -+le_bool GlyphIterator::filterGlyph(le_uint32 index) - { -- LEErrorCode success = LE_NO_ERROR; - LEGlyphID glyphID = glyphStorage[index]; -- le_int32 glyphClass = gcdNoGlyphClass; +-/** +- * 'execvpe' should have been included in the Unix standards, +- * and is a GNU extension in glibc 2.10. ++/* arg is an array of pointers to 0 terminated strings. array is terminated ++ * by a null element. + * +- * JDK_execvpe is identical to execvp, except that the child environment is +- * specified via the 3rd argument instead of being inherited from environ. +- */ +-static void +-JDK_execvpe(const char *file, +- const char *argv[], +- const char *const envp[]) +-{ +- if (envp == NULL || (char **) envp == environ) { +- execvp(file, (char **) argv); ++ * *nelems and *nbytes receive the number of elements of array (incl 0) ++ * and total number of bytes (incl. 0) ++ * Note. An empty array will have one null element ++ * But if arg is null, then *nelems set to 0, and *nbytes to 0 ++ */ ++static void arraysize(const char * const *arg, int *nelems, int *nbytes) ++{ ++ int i, bytes, count; ++ const char * const *a = arg; ++ char *p; ++ int *q; ++ if (arg == 0) { ++ *nelems = 0; ++ *nbytes = 0; + return; + } +- +- if (*file == '\0') { +- errno = ENOENT; +- return; +- } +- +- if (strchr(file, '/') != NULL) { +- execve_with_shell_fallback(file, argv, envp); +- } else { +- /* We must search PATH (parent's, not child's) */ +- char expanded_file[PATH_MAX]; +- int filelen = strlen(file); +- int sticky_errno = 0; +- const char * const * dirs; +- for (dirs = parentPathv; *dirs; dirs++) { +- const char * dir = *dirs; +- int dirlen = strlen(dir); +- if (filelen + dirlen + 1 >= PATH_MAX) { +- errno = ENAMETOOLONG; +- continue; +- } +- memcpy(expanded_file, dir, dirlen); +- memcpy(expanded_file + dirlen, file, filelen); +- expanded_file[dirlen + filelen] = '\0'; +- execve_with_shell_fallback(expanded_file, argv, envp); +- /* There are 3 responses to various classes of errno: +- * return immediately, continue (especially for ENOENT), +- * or continue with "sticky" errno. +- * +- * From exec(3): +- * +- * If permission is denied for a file (the attempted +- * execve returned EACCES), these functions will continue +- * searching the rest of the search path. If no other +- * file is found, however, they will return with the +- * global variable errno set to EACCES. +- */ +- switch (errno) { +- case EACCES: +- sticky_errno = errno; +- /* FALLTHRU */ +- case ENOENT: +- case ENOTDIR: +-#ifdef ELOOP +- case ELOOP: +-#endif +-#ifdef ESTALE +- case ESTALE: +-#endif +-#ifdef ENODEV +- case ENODEV: +-#endif +-#ifdef ETIMEDOUT +- case ETIMEDOUT: +-#endif +- break; /* Try other directories in PATH */ +- default: +- return; +- } +- } +- if (sticky_errno != 0) +- errno = sticky_errno; ++ /* count the array elements and number of bytes */ ++ for (count=0, bytes=0; *a != 0; count++, a++) { ++ bytes += strlen(*a)+1; + } ++ *nbytes = bytes; ++ *nelems = count+1; + } -- if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { -- return TRUE; +-/* +- * Reads nbyte bytes from file descriptor fd into buf, +- * The read operation is retried in case of EINTR or partial reads. +- * +- * Returns number of bytes read (normally nbyte, but may be less in +- * case of EOF). In case of read errors, returns -1 and sets errno. ++/* copy the strings from arg[] into buf, starting at given offset ++ * return new offset to next free byte + */ +-static ssize_t +-readFully(int fd, void *buf, size_t nbyte) +-{ +- ssize_t remaining = nbyte; +- for (;;) { +- ssize_t n = read(fd, buf, remaining); +- if (n == 0) { +- return nbyte - remaining; +- } else if (n > 0) { +- remaining -= n; +- if (remaining <= 0) +- return nbyte; +- /* We were interrupted in the middle of reading the bytes. +- * Unlikely, but possible. */ +- buf = (void *) (((char *)buf) + n); +- } else if (errno == EINTR) { +- /* Strange signals like SIGJVM1 are possible at any time. +- * See http://www.dreamsongs.com/WorseIsBetter.html */ +- } else { +- return -1; +- } - } -+ if (!filterCacheValid || filterCache.id != glyphID) { -+ filterCache.id = glyphID; +-} +- +-typedef struct _ChildStuff +-{ +- int in[2]; +- int out[2]; +- int err[2]; +- int fail[2]; +- int fds[3]; +- const char **argv; +- const char **envv; +- const char *pdir; +- jboolean redirectErrorStream; +-#if START_CHILD_USE_CLONE +- void *clone_stack; +-#endif +-} ChildStuff; ++static int copystrings(char *buf, int offset, const char * const *arg) { ++ char *p; ++ const char * const *a; ++ int count=0; -+ le_bool &filterResult = filterCache.result; // NB: Making this a reference to accept the updated value, in case -+ // we want more fancy cacheing in the future. -+ if (LE_GET_GLYPH(glyphID) >= 0xFFFE) { -+ filterResult = TRUE; -+ } else { -+ LEErrorCode success = LE_NO_ERROR; -+ le_int32 glyphClass = gcdNoGlyphClass; - if (glyphClassDefinitionTable.isValid()) { - glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success); - } +-static void +-copyPipe(int from[2], int to[2]) +-{ +- to[0] = from[0]; +- to[1] = from[1]; +-} +- +-/** +- * Child process after a successful fork() or clone(). +- * This function must not return, and must be prepared for either all +- * of its address space to be shared with its parent, or to be a copy. +- * It must not modify global variables such as "environ". +- */ +-static int +-childProcess(void *arg) +-{ +- const ChildStuff* p = (const ChildStuff*) arg; +- +- /* Close the parent sides of the pipes. +- Closing pipe fds here is redundant, since closeDescriptors() +- would do it anyways, but a little paranoia is a good thing. */ +- if ((closeSafely(p->in[1]) == -1) || +- (closeSafely(p->out[0]) == -1) || +- (closeSafely(p->err[0]) == -1) || +- (closeSafely(p->fail[0]) == -1)) +- goto WhyCantJohnnyExec; +- +- /* Give the child sides of the pipes the right fileno's. */ +- /* Note: it is possible for in[0] == 0 */ +- if ((moveDescriptor(p->in[0] != -1 ? p->in[0] : p->fds[0], +- STDIN_FILENO) == -1) || +- (moveDescriptor(p->out[1]!= -1 ? p->out[1] : p->fds[1], +- STDOUT_FILENO) == -1)) +- goto WhyCantJohnnyExec; +- +- if (p->redirectErrorStream) { +- if ((closeSafely(p->err[1]) == -1) || +- (restartableDup2(STDOUT_FILENO, STDERR_FILENO) == -1)) +- goto WhyCantJohnnyExec; +- } else { +- if (moveDescriptor(p->err[1] != -1 ? p->err[1] : p->fds[2], +- STDERR_FILENO) == -1) +- goto WhyCantJohnnyExec; +- } +- +- if (moveDescriptor(p->fail[1], FAIL_FILENO) == -1) +- goto WhyCantJohnnyExec; +- +- /* close everything */ +- if (closeDescriptors() == 0) { /* failed, close the old way */ +- int max_fd = (int)sysconf(_SC_OPEN_MAX); +- int fd; +- for (fd = FAIL_FILENO + 1; fd < max_fd; fd++) +- if (restartableClose(fd) == -1 && errno != EBADF) +- goto WhyCantJohnnyExec; +- } - -- switch (glyphClass) -- { -+ switch (glyphClass) { - case gcdNoGlyphClass: -- return FALSE; -+ filterResult = FALSE; -+ break; - - case gcdSimpleGlyph: -- return (lookupFlags & lfIgnoreBaseGlyphs) != 0; -+ filterResult = (lookupFlags & lfIgnoreBaseGlyphs) != 0; -+ break; - - case gcdLigatureGlyph: -- return (lookupFlags & lfIgnoreLigatures) != 0; -+ filterResult = (lookupFlags & lfIgnoreLigatures) != 0; -+ break; - - case gcdMarkGlyph: -- { - if ((lookupFlags & lfIgnoreMarks) != 0) { -- return TRUE; -- } +- /* change to the new working directory */ +- if (p->pdir != NULL && chdir(p->pdir) < 0) +- goto WhyCantJohnnyExec; - -+ filterResult = TRUE; -+ } else { - le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift; - - if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) { -- return markAttachClassDefinitionTable -- -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType; -+ filterResult = (markAttachClassDefinitionTable -+ -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType); -+ } else { -+ filterResult = FALSE; - } +- if (fcntl(FAIL_FILENO, F_SETFD, FD_CLOEXEC) == -1) +- goto WhyCantJohnnyExec; - -- return FALSE; - } -+ break; - - case gcdComponentGlyph: -- return (lookupFlags & lfIgnoreBaseGlyphs) != 0; -+ filterResult = ((lookupFlags & lfIgnoreBaseGlyphs) != 0); -+ break; - - default: -- return FALSE; -+ filterResult = FALSE; -+ break; - } -+ } -+ filterCacheValid = TRUE; -+ } -+ -+ return filterCache.result; +- JDK_execvpe(p->argv[0], p->argv, p->envv); +- +- WhyCantJohnnyExec: +- /* We used to go to an awful lot of trouble to predict whether the +- * child would fail, but there is no reliable way to predict the +- * success of an operation without *trying* it, and there's no way +- * to try a chdir or exec in the parent. Instead, all we need is a +- * way to communicate any failure back to the parent. Easy; we just +- * send the errno back to the parent over a pipe in case of failure. +- * The tricky thing is, how do we communicate the *success* of exec? +- * We use FD_CLOEXEC together with the fact that a read() on a pipe +- * yields EOF when the write ends (we have two of them!) are closed. +- */ +- { +- int errnum = errno; +- restartableWrite(FAIL_FILENO, &errnum, sizeof(errnum)); +- } +- restartableClose(FAIL_FILENO); +- _exit(-1); +- return 0; /* Suppress warning "no return value from function" */ ++ if (arg == 0) { ++ return offset; ++ } ++ for (p=buf+offset, a=arg; *a != 0; a++) { ++ int len = strlen(*a) +1; ++ memcpy(p, *a, len); ++ p += len; ++ count += len; ++ } ++ return offset+count; } - le_bool GlyphIterator::hasFeatureTag(le_bool matchGroup) const ---- jdk/src/share/native/sun/font/layout/GlyphIterator.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/GlyphIterator.h 2014-04-20 12:39:16.000000000 -0700 -@@ -49,7 +49,7 @@ - class GlyphIterator : public UMemory { - public: - GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, -- FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader); -+ FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader, LEErrorCode &success); - - GlyphIterator(GlyphIterator &that); - -@@ -98,7 +98,7 @@ - le_int32 applyInsertions(); - - private: -- le_bool filterGlyph(le_uint32 index) const; -+ le_bool filterGlyph(le_uint32 index); - le_bool hasFeatureTag(le_bool matchGroup) const; - le_bool nextInternal(le_uint32 delta = 1); - le_bool prevInternal(le_uint32 delta = 1); -@@ -121,6 +121,14 @@ - LEReferenceTo markAttachClassDefinitionTable; - - GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class + /** +- * Start a child process running function childProcess. +- * This function only returns in the parent. + * We are unusually paranoid; use of clone/vfork is + * especially likely to tickle gcc/glibc bugs. + */ + #ifdef __attribute_noinline__ /* See: sys/cdefs.h */ + __attribute_noinline__ + #endif + -+ struct { -+ LEGlyphID id; -+ le_bool result; -+ } filterCache; -+ le_bool filterCacheValid; ++#define START_CHILD_USE_CLONE 0 /* clone() currently disabled; see above. */ + -+ void filterResetCache(void); - }; - - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -95,6 +95,8 @@ - - le_uint32 delta = 0; - -+ //_LETRACE("attempting lookupType #%d", lookupType); ++#ifdef START_CHILD_USE_CLONE + static pid_t +-startChild(ChildStuff *c) { +-#if START_CHILD_USE_CLONE ++cloneChild(ChildStuff *c) { ++#ifdef __linux__ + #define START_CHILD_CLONE_STACK_SIZE (64 * 1024) + /* + * See clone(2). +@@ -800,33 +414,161 @@ + c->clone_stack + START_CHILD_CLONE_STACK_SIZE, + CLONE_VFORK | CLONE_VM | SIGCHLD, c); + #else +- #if START_CHILD_USE_VFORK ++/* not available on Solaris / Mac */ ++ assert(0); ++ return -1; ++#endif ++} ++#endif + - switch(lookupType) - { - case 0: -@@ -152,21 +154,21 @@ - { - LEReferenceTo subtable(lookupSubtable, success); - -- delta = subtable->process(this, glyphIterator, fontInstance, success); -+ delta = subtable->process(subtable, this , glyphIterator, fontInstance, success); - break; - } - - case gpstChainedContext: - { -- LEReferenceTo subtable(lookupSubtable, success); -+ const LEReferenceTo subtable(lookupSubtable, success); - -- delta = subtable->process(this, glyphIterator, fontInstance, success); -+ delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); - break; - } - - case gpstExtension: - { -- LEReferenceTo subtable(lookupSubtable, success); -+ const LEReferenceTo subtable(lookupSubtable, success); - - delta = subtable->process(subtable, this, lookupType, glyphIterator, fontInstance, success); - break; -@@ -176,6 +178,12 @@ - break; - } - -+#if LE_TRACE -+ if(delta != 0) { -+ _LETRACE("GlyphPositioningLookupProcessor applied #%d -> delta %d @ %d", lookupType, delta, glyphIterator->getCurrStreamPosition()); ++static pid_t ++vforkChild(ChildStuff *c) { ++ volatile pid_t resultPid; ++ + /* + * We separate the call to vfork into a separate function to make + * very sure to keep stack of child from corrupting stack of parent, + * as suggested by the scary gcc warning: + * warning: variable 'foo' might be clobbered by 'longjmp' or 'vfork' + */ +- volatile pid_t resultPid = vfork(); +- #else ++ resultPid = vfork(); ++ ++ if (resultPid == 0) { ++ childProcess(c); + } -+#endif ++ assert(resultPid != 0); /* childProcess never returns */ ++ return resultPid; ++} + - return delta; - } - ---- jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -123,7 +123,7 @@ - { - const LEReferenceTo subtable(lookupSubtable, success); - -- delta = subtable->process(this, glyphIterator, fontInstance, success); -+ delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); - break; - } - -@@ -131,7 +131,7 @@ - { - const LEReferenceTo subtable(lookupSubtable, success); - -- delta = subtable->process(this, glyphIterator, fontInstance, success); -+ delta = subtable->process(subtable, this, glyphIterator, fontInstance, success); - break; - } - ---- jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -44,7 +44,7 @@ - #include "LEGlyphStorage.h" - - #include "IndicReordering.h" --#include ++static pid_t ++forkChild(ChildStuff *c) { ++ pid_t resultPid; + - U_NAMESPACE_BEGIN - - UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine) -@@ -90,6 +90,7 @@ - return 0; - } - -+ _LETRACE("IOTLE::gp, calling parent"); - le_int32 retCount = OpenTypeLayoutEngine::glyphProcessing(chars, offset, count, max, rightToLeft, glyphStorage, success); - - if (LE_FAILURE(success)) { -@@ -97,10 +98,14 @@ - } - - if (fVersion2) { -+ _LETRACE("IOTLE::gp, v2 final,"); - IndicReordering::finalReordering(glyphStorage,retCount); -+ _LETRACE("IOTLE::gp, v2 pres"); - IndicReordering::applyPresentationForms(glyphStorage,retCount); -+ _LETRACE("IOTLE::gp, parent gsub"); - OpenTypeLayoutEngine::glyphSubstitution(count,max, rightToLeft, glyphStorage, success); - } else { -+ _LETRACE("IOTLE::gp, adjust mpres"); - IndicReordering::adjustMPres(fMPreFixups, glyphStorage, success); - } - return retCount; -@@ -116,6 +121,8 @@ - return 0; - } - -+ _LETRACE("IOTLE: charProc"); + /* + * From Solaris fork(2): In Solaris 10, a call to fork() is + * identical to a call to fork1(); only the calling thread is + * replicated in the child process. This is the POSIX-specified + * behavior for fork(). + */ +- pid_t resultPid = fork(); +- #endif +- if (resultPid == 0) ++ resultPid = fork(); + - if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) { - success = LE_ILLEGAL_ARGUMENT_ERROR; - return 0; -@@ -143,8 +150,10 @@ - - le_int32 outCharCount; - if (fVersion2) { -+ _LETRACE("v2process"); - outCharCount = IndicReordering::v2process(&chars[offset], count, fScriptCode, outChars, glyphStorage); - } else { -+ _LETRACE("reorder"); - outCharCount = IndicReordering::reorder(&chars[offset], count, fScriptCode, outChars, glyphStorage, &fMPreFixups, success); - } - ---- jdk/src/share/native/sun/font/layout/KernTable.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/KernTable.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -39,7 +39,7 @@ - - #include - --#define DEBUG 0 -+#define DEBUG_KERN_TABLE 0 - - U_NAMESPACE_BEGIN ++ if (resultPid == 0) { + childProcess(c); ++ } + assert(resultPid != 0); /* childProcess never returns */ + return resultPid; +-#endif /* ! START_CHILD_USE_CLONE */ ++} ++ ++#if defined(__solaris__) || defined(_ALLBSD_SOURCE) ++static pid_t ++spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) { ++ pid_t resultPid; ++ jboolean isCopy; ++ int i, offset, rval, bufsize, magic; ++ char *buf, buf1[16]; ++ char *hlpargs[2]; ++ SpawnInfo sp; ++ ++ /* need to tell helper which fd is for receiving the childstuff ++ * and which fd to send response back on ++ */ ++ snprintf(buf1, sizeof(buf1), "%d:%d", c->childenv[0], c->fail[1]); ++ /* put the fd string as argument to the helper cmd */ ++ hlpargs[0] = buf1; ++ hlpargs[1] = 0; ++ ++ /* Following items are sent down the pipe to the helper ++ * after it is spawned. ++ * All strings are null terminated. All arrays of strings ++ * have an empty string for termination. ++ * - the ChildStuff struct ++ * - the SpawnInfo struct ++ * - the argv strings array ++ * - the envv strings array ++ * - the home directory string ++ * - the parentPath string ++ * - the parentPathv array ++ */ ++ /* First calculate the sizes */ ++ arraysize(c->argv, &sp.nargv, &sp.argvBytes); ++ bufsize = sp.argvBytes; ++ arraysize(c->envv, &sp.nenvv, &sp.envvBytes); ++ bufsize += sp.envvBytes; ++ sp.dirlen = c->pdir == 0 ? 0 : strlen(c->pdir)+1; ++ bufsize += sp.dirlen; ++ arraysize(parentPathv, &sp.nparentPathv, &sp.parentPathvBytes); ++ bufsize += sp.parentPathvBytes; ++ /* We need to clear FD_CLOEXEC if set in the fds[]. ++ * Files are created FD_CLOEXEC in Java. ++ * Otherwise, they will be closed when the target gets exec'd */ ++ for (i=0; i<3; i++) { ++ if (c->fds[i] != -1) { ++ int flags = fcntl(c->fds[i], F_GETFD); ++ if (flags & FD_CLOEXEC) { ++ fcntl(c->fds[i], F_SETFD, flags & (~1)); ++ } ++ } ++ } ++ ++ rval = posix_spawn(&resultPid, helperpath, 0, 0, (char * const *) hlpargs, environ); ++ ++ if (rval != 0) { ++ return -1; ++ } ++ ++ /* now the lengths are known, copy the data */ ++ buf = NEW(char, bufsize); ++ if (buf == 0) { ++ return -1; ++ } ++ offset = copystrings(buf, 0, &c->argv[0]); ++ offset = copystrings(buf, offset, &c->envv[0]); ++ memcpy(buf+offset, c->pdir, sp.dirlen); ++ offset += sp.dirlen; ++ offset = copystrings(buf, offset, parentPathv); ++ assert(offset == bufsize); ++ ++ magic = magicNumber(); ++ ++ /* write the two structs and the data buffer */ ++ write(c->childenv[1], (char *)&magic, sizeof(magic)); // magic number first ++ write(c->childenv[1], (char *)c, sizeof(*c)); ++ write(c->childenv[1], (char *)&sp, sizeof(sp)); ++ write(c->childenv[1], buf, bufsize); ++ free(buf); ++ ++ /* In this mode an external main() in invoked which calls back into ++ * childProcess() in this file, rather than directly ++ * via the statement below */ ++ return resultPid; ++} ++#endif ++ ++/* ++ * Start a child process running function childProcess. ++ * This function only returns in the parent. ++ */ ++static pid_t ++startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) { ++ switch (c->mode) { ++ case MODE_VFORK: ++ return vforkChild(c); ++ case MODE_FORK: ++ return forkChild(c); ++#if defined(__solaris__) || defined(_ALLBSD_SOURCE) ++ case MODE_POSIX_SPAWN: ++ return spawnChild(env, process, c, helperpath); ++#endif ++ default: ++ return -1; ++ } + } -@@ -99,14 +99,14 @@ - : pairsSwapped(NULL), fTable(base) + JNIEXPORT jint JNICALL + Java_java_lang_UNIXProcess_forkAndExec(JNIEnv *env, + jobject process, ++ jint mode, ++ jbyteArray helperpath, + jbyteArray prog, + jbyteArray argBlock, jint argc, + jbyteArray envBlock, jint envc, +@@ -836,32 +578,35 @@ { - if(LE_FAILURE(success) || (fTable.isEmpty())) { --#if DEBUG -+#if DEBUG_KERN_TABLE - fprintf(stderr, "no kern data\n"); - #endif - return; - } - LEReferenceTo header(fTable, success); - --#if DEBUG -+#if DEBUG_KERN_TABLE - // dump first 32 bytes of header - for (int i = 0; i < 64; ++i) { - fprintf(stderr, "%0.2x ", ((const char*)header.getAlias())[i]&0xff); -@@ -171,13 +171,13 @@ - fprintf(stderr, " searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift); - fprintf(stderr, "[[ ignored font table entries: range %d selector %d shift %d ]]\n", SWAPW(table->searchRange), SWAPW(table->entrySelector), SWAPW(table->rangeShift)); - #endif --#if DEBUG -+#if DEBUG_KERN_TABLE - fprintf(stderr, "coverage: %0.4x nPairs: %d pairs 0x%x\n", coverage, nPairs, pairsSwapped); - fprintf(stderr, - " searchRange(pairs): %d entrySelector: %d rangeShift(pairs): %d\n", - searchRange, entrySelector, rangeShift); - -- { -+ if (LE_SUCCESS(success)) { - // dump part of the pair list - char ids[256]; - for (int i = 256; --i >= 0;) { -@@ -242,7 +242,7 @@ - p = tp; - } - --#if DEBUG -+#if DEBUG_KERN_TABLE - fprintf(stderr, "binary search for %0.8x\n", key); - #endif - -@@ -251,13 +251,13 @@ - probe >>= 1; - tp = (const PairInfo*)(p + (probe/KERN_PAIRINFO_SIZE)); - le_uint32 tkey = tp->key; --#if DEBUG -+#if DEBUG_KERN_TABLE - fprintf(stdout, " %.3d (%0.8x)\n", (tp - pairsSwapped), tkey); - #endif - if (tkey <= key) { - if (tkey == key) { - le_int16 value = SWAPW(tp->value); --#if DEBUG -+#if DEBUG_KERN_TABLE - fprintf(stdout, "binary found kerning pair %x:%x at %d, value: 0x%x (%g)\n", - storage[i-1], storage[i], i, value & 0xffff, font->xUnitsToPoints(value)); - fflush(stdout); ---- jdk/src/share/native/sun/font/layout/LEFontInstance.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LEFontInstance.h 2014-04-20 12:39:16.000000000 -0700 -@@ -181,6 +181,10 @@ - * - * Subclasses which represent composite fonts should always return NULL. - * -+ * Note that implementing this function does not allow for range checking. -+ * Subclasses that desire the safety of range checking must implement the -+ * variation which has a length parameter. -+ * - * @param tableTag - the four byte table tag. (e.g. 'cmap') - * - * @return the address of the table in memory, or NULL -@@ -200,6 +204,8 @@ - * Subclasses which represent composite fonts should always return NULL. - * - * This version sets a length, for range checking. -+ * Note that range checking can only be accomplished if this function is -+ * implemented in subclasses. - * - * @param tableTag - the four byte table tag. (e.g. 'cmap') - * @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown. -@@ -572,5 +578,3 @@ + int errnum; + int resultPid = -1; +- int in[2], out[2], err[2], fail[2]; ++ int in[2], out[2], err[2], fail[2], childenv[2]; + jint *fds = NULL; ++ const char *phelperpath = NULL; + const char *pprog = NULL; + const char *pargBlock = NULL; + const char *penvBlock = NULL; + ChildStuff *c; - U_NAMESPACE_END - #endif -- -- ---- jdk/src/share/native/sun/font/layout/LEGlyphFilter.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LEGlyphFilter.h 2014-04-20 12:39:16.000000000 -0700 -@@ -62,7 +62,7 @@ - * - * @internal + in[0] = in[1] = out[0] = out[1] = err[0] = err[1] = fail[0] = fail[1] = -1; ++ childenv[0] = childenv[1] = -1; + + if ((c = NEW(ChildStuff, 1)) == NULL) return -1; + c->argv = NULL; + c->envv = NULL; + c->pdir = NULL; +-#if START_CHILD_USE_CLONE + c->clone_stack = NULL; +-#endif + + /* Convert prog + argBlock into a char ** argv. + * Add one word room for expansion of argv for use by + * execve_as_traditional_shell_script. ++ * This word is also used when using spawn mode */ -- virtual le_bool accept(LEGlyphID glyph) const = 0; -+ virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const = 0; - }; - #endif /* U_HIDE_INTERNAL_API */ + assert(prog != NULL && argBlock != NULL); ++ if ((phelperpath = getBytes(env, helperpath)) == NULL) goto Catch; + if ((pprog = getBytes(env, prog)) == NULL) goto Catch; + if ((pargBlock = getBytes(env, argBlock)) == NULL) goto Catch; + if ((c->argv = NEW(const char *, argc + 3)) == NULL) goto Catch; + c->argv[0] = pprog; ++ c->argc = argc + 2; + initVectorFromBlock(c->argv+1, pargBlock, argc); ---- jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LEGlyphStorage.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -458,7 +458,7 @@ - success = LE_INDEX_OUT_OF_BOUNDS_ERROR; - return; + if (envBlock != NULL) { +@@ -882,6 +627,7 @@ + if ((fds[0] == -1 && pipe(in) < 0) || + (fds[1] == -1 && pipe(out) < 0) || + (fds[2] == -1 && pipe(err) < 0) || ++ (pipe(childenv) < 0) || + (pipe(fail) < 0)) { + throwIOException(env, errno, "Bad file descriptor"); + goto Catch; +@@ -894,18 +640,29 @@ + copyPipe(out, c->out); + copyPipe(err, c->err); + copyPipe(fail, c->fail); ++ copyPipe(childenv, c->childenv); + + c->redirectErrorStream = redirectErrorStream; ++ c->mode = mode; + +- resultPid = startChild(c); ++ resultPid = startChild(env, process, c, phelperpath); + assert(resultPid != 0); + + if (resultPid < 0) { +- throwIOException(env, errno, START_CHILD_SYSTEM_CALL " failed"); ++ switch (c->mode) { ++ case MODE_VFORK: ++ throwIOException(env, errno, "vfork failed"); ++ break; ++ case MODE_FORK: ++ throwIOException(env, errno, "fork failed"); ++ break; ++ case MODE_POSIX_SPAWN: ++ throwIOException(env, errno, "spawn failed"); ++ break; ++ } + goto Catch; } - -+ _LETRACE("set%-4d\t(%.2f, %.2f)", glyphIndex, x, y); - fPositions[glyphIndex * 2] = x; - fPositions[glyphIndex * 2 + 1] = y; - } -@@ -694,4 +694,3 @@ - } +- restartableClose(fail[1]); fail[1] = -1; /* See: WhyCantJohnnyExec */ ++ close(fail[1]); fail[1] = -1; /* See: WhyCantJohnnyExec (childproc.c) */ - U_NAMESPACE_END -- ---- jdk/src/share/native/sun/font/layout/LEGlyphStorage.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LEGlyphStorage.h 2014-04-20 12:39:16.000000000 -0700 -@@ -568,4 +568,3 @@ + switch (readFully(fail[0], &errnum, sizeof(errnum))) { + case 0: break; /* Exec succeeded */ +@@ -923,18 +680,18 @@ + fds[2] = (err[0] != -1) ? err[0] : -1; - U_NAMESPACE_END - #endif -- ---- jdk/src/share/native/sun/font/layout/LEScripts.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LEScripts.h 2014-04-20 12:39:16.000000000 -0700 -@@ -30,7 +30,7 @@ - * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS - * YOU REALLY KNOW WHAT YOU'RE DOING. - * -- * Generated on: 10/26/2010 02:53:33 PM PDT -+ * Generated on: 11/01/2011 04:08:09 PM PDT - */ + Finally: +-#if START_CHILD_USE_CLONE + free(c->clone_stack); +-#endif - #ifndef __LESCRIPTS_H -@@ -262,7 +262,16 @@ - khojScriptCode = 157, - tirhScriptCode = 158, + /* Always clean up the child's side of the pipes */ + closeSafely(in [0]); + closeSafely(out[1]); + closeSafely(err[1]); -- scriptCodeCount = 159 +- /* Always clean up fail descriptors */ ++ /* Always clean up fail and childEnv descriptors */ + closeSafely(fail[0]); + closeSafely(fail[1]); ++ closeSafely(childenv[0]); ++ closeSafely(childenv[1]); + + releaseBytes(env, prog, pprog); + releaseBytes(env, argBlock, pargBlock); +@@ -952,9 +709,9 @@ + + Catch: + /* Clean up the parent's side of the pipes in case of failure only */ +- closeSafely(in [1]); +- closeSafely(out[0]); +- closeSafely(err[0]); ++ closeSafely(in [1]); in[1] = -1; ++ closeSafely(out[0]); out[0] = -1; ++ closeSafely(err[0]); err[0] = -1; + goto Finally; + } + +--- ./jdk/src/solaris/native/java/lang/childproc.c 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/solaris/native/java/lang/childproc.c 2014-06-06 19:56:34.000000000 -0700 +@@ -0,0 +1,387 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "childproc.h" ++ ++ ++ssize_t ++restartableWrite(int fd, const void *buf, size_t count) ++{ ++ ssize_t result; ++ RESTARTABLE(write(fd, buf, count), result); ++ return result; ++} ++ ++int ++restartableDup2(int fd_from, int fd_to) ++{ ++ int err; ++ RESTARTABLE(dup2(fd_from, fd_to), err); ++ return err; ++} ++ ++int ++closeSafely(int fd) ++{ ++ return (fd == -1) ? 0 : close(fd); ++} ++ ++int ++isAsciiDigit(char c) ++{ ++ return c >= '0' && c <= '9'; ++} ++ ++#if defined(__OpenBSD__) ++int ++closeDescriptors(void) ++{ ++ int err; ++ RESTARTABLE(closefrom(FAIL_FILENO + 1), err); ++ return err; ++} ++#else ++ ++#ifdef _ALLBSD_SOURCE ++#define FD_DIR "/dev/fd" ++#define dirent64 dirent ++#define readdir64 readdir ++#else ++#define FD_DIR "/proc/self/fd" ++#endif ++ ++int ++closeDescriptors(void) ++{ ++ DIR *dp; ++ struct dirent64 *dirp; ++ int from_fd = FAIL_FILENO + 1; ++ ++ /* We're trying to close all file descriptors, but opendir() might ++ * itself be implemented using a file descriptor, and we certainly ++ * don't want to close that while it's in use. We assume that if ++ * opendir() is implemented using a file descriptor, then it uses ++ * the lowest numbered file descriptor, just like open(). So we ++ * close a couple explicitly. */ ++ ++ close(from_fd); /* for possible use by opendir() */ ++ close(from_fd + 1); /* another one for good luck */ ++ ++ if ((dp = opendir(FD_DIR)) == NULL) ++ return 0; ++ ++ /* We use readdir64 instead of readdir to work around Solaris bug ++ * 6395699: /proc/self/fd fails to report file descriptors >= 1024 on Solaris 9 ++ */ ++ while ((dirp = readdir64(dp)) != NULL) { ++ int fd; ++ if (isAsciiDigit(dirp->d_name[0]) && ++ (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) ++ close(fd); ++ } ++ ++ closedir(dp); ++ ++ return 1; ++} ++#endif ++ ++int ++moveDescriptor(int fd_from, int fd_to) ++{ ++ if (fd_from != fd_to) { ++ if ((restartableDup2(fd_from, fd_to) == -1) || ++ (close(fd_from) == -1)) ++ return -1; ++ } ++ return 0; ++} ++ ++int ++magicNumber() { ++ return 43110; ++} ++ ++/* ++ * Reads nbyte bytes from file descriptor fd into buf, ++ * The read operation is retried in case of EINTR or partial reads. ++ * ++ * Returns number of bytes read (normally nbyte, but may be less in ++ * case of EOF). In case of read errors, returns -1 and sets errno. ++ */ ++ssize_t ++readFully(int fd, void *buf, size_t nbyte) ++{ ++ ssize_t remaining = nbyte; ++ for (;;) { ++ ssize_t n = read(fd, buf, remaining); ++ if (n == 0) { ++ return nbyte - remaining; ++ } else if (n > 0) { ++ remaining -= n; ++ if (remaining <= 0) ++ return nbyte; ++ /* We were interrupted in the middle of reading the bytes. ++ * Unlikely, but possible. */ ++ buf = (void *) (((char *)buf) + n); ++ } else if (errno == EINTR) { ++ /* Strange signals like SIGJVM1 are possible at any time. ++ * See http://www.dreamsongs.com/WorseIsBetter.html */ ++ } else { ++ return -1; ++ } ++ } ++} ++ ++void ++initVectorFromBlock(const char**vector, const char* block, int count) ++{ ++ int i; ++ const char *p; ++ for (i = 0, p = block; i < count; i++) { ++ /* Invariant: p always points to the start of a C string. */ ++ vector[i] = p; ++ while (*(p++)); ++ } ++ vector[count] = NULL; ++} ++ +/** -+ * @stable ICU 52 ++ * Exec FILE as a traditional Bourne shell script (i.e. one without #!). ++ * If we could do it over again, we would probably not support such an ancient ++ * misfeature, but compatibility wins over sanity. The original support for ++ * this was imported accidentally from execvp(). + */ -+ aghbScriptCode = 159, -+ mahjScriptCode = 160, ++void ++execve_as_traditional_shell_script(const char *file, ++ const char *argv[], ++ const char *const envp[]) ++{ ++ /* Use the extra word of space provided for us in argv by caller. */ ++ const char *argv0 = argv[0]; ++ const char *const *end = argv; ++ while (*end != NULL) ++ ++end; ++ memmove(argv+2, argv+1, (end-argv) * sizeof(*end)); ++ argv[0] = "/bin/sh"; ++ argv[1] = file; ++ execve(argv[0], (char **) argv, (char **) envp); ++ /* Can't even exec /bin/sh? Big trouble, but let's soldier on... */ ++ memmove(argv+1, argv+2, (end-argv) * sizeof(*end)); ++ argv[0] = argv0; ++} + +/** -+ * @stable ICU 2.2 ++ * Like execve(2), except that in case of ENOEXEC, FILE is assumed to ++ * be a shell script and the system default shell is invoked to run it. + */ -+ scriptCodeCount - }; - - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/LEStandalone.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LEStandalone.h 2014-04-20 12:39:16.000000000 -0700 -@@ -132,6 +132,9 @@ - #define uprv_memcpy memcpy - #define uprv_realloc realloc - -+#define U_EXPORT2 -+#define U_CAPI extern "C" ++void ++execve_with_shell_fallback(int mode, const char *file, ++ const char *argv[], ++ const char *const envp[]) ++{ ++ if (mode == MODE_CLONE || mode == MODE_VFORK) { ++ /* shared address space; be very careful. */ ++ execve(file, (char **) argv, (char **) envp); ++ if (errno == ENOEXEC) ++ execve_as_traditional_shell_script(file, argv, envp); ++ } else { ++ /* unshared address space; we can mutate environ. */ ++ environ = (char **) envp; ++ execvp(file, (char **) argv); ++ } ++} + - #if !defined(U_IS_BIG_ENDIAN) - #ifdef _LITTLE_ENDIAN - #define U_IS_BIG_ENDIAN 0 ---- jdk/src/share/native/sun/font/layout/LETableReference.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LETableReference.h 2014-04-20 12:39:16.000000000 -0700 -@@ -38,34 +38,47 @@ - #include "LETypes.h" - #include "LEFontInstance.h" - +/** -+ * \def LE_ENABLE_RAW -+ * If this is 1, enables old non-safe raw access ++ * 'execvpe' should have been included in the Unix standards, ++ * and is a GNU extension in glibc 2.10. ++ * ++ * JDK_execvpe is identical to execvp, except that the child environment is ++ * specified via the 3rd argument instead of being inherited from environ. + */ -+#ifndef LE_ENABLE_RAW -+#define LE_ENABLE_RAW 0 -+#endif - --#define kQuestionmarkTableTag 0x3F3F3F3FUL --#define kTildeTableTag 0x7e7e7e7eUL -+#define kQuestionmarkTableTag 0x3F3F3F3FUL /* ???? */ -+#define kStaticTableTag 0x30303030UL /* 0000 */ -+#define kTildeTableTag 0x7e7e7e7eUL /* ~~~~ */ - #ifdef __cplusplus - - // internal - interface for range checking - U_NAMESPACE_BEGIN - - #if LE_ASSERT_BAD_FONT ++void ++JDK_execvpe(int mode, const char *file, ++ const char *argv[], ++ const char *const envp[]) ++{ ++ if (envp == NULL || (char **) envp == environ) { ++ execvp(file, (char **) argv); ++ return; ++ } + -+#ifndef LE_TRACE_TR -+#define LE_TRACE_TR 0 ++ if (*file == '\0') { ++ errno = ENOENT; ++ return; ++ } ++ ++ if (strchr(file, '/') != NULL) { ++ execve_with_shell_fallback(mode, file, argv, envp); ++ } else { ++ /* We must search PATH (parent's, not child's) */ ++ char expanded_file[PATH_MAX]; ++ int filelen = strlen(file); ++ int sticky_errno = 0; ++ const char * const * dirs; ++ for (dirs = parentPathv; *dirs; dirs++) { ++ const char * dir = *dirs; ++ int dirlen = strlen(dir); ++ if (filelen + dirlen + 2 >= PATH_MAX) { ++ errno = ENAMETOOLONG; ++ continue; ++ } ++ memcpy(expanded_file, dir, dirlen); ++ if (expanded_file[dirlen - 1] != '/') ++ expanded_file[dirlen++] = '/'; ++ memcpy(expanded_file + dirlen, file, filelen); ++ expanded_file[dirlen + filelen] = '\0'; ++ execve_with_shell_fallback(mode, expanded_file, argv, envp); ++ /* There are 3 responses to various classes of errno: ++ * return immediately, continue (especially for ENOENT), ++ * or continue with "sticky" errno. ++ * ++ * From exec(3): ++ * ++ * If permission is denied for a file (the attempted ++ * execve returned EACCES), these functions will continue ++ * searching the rest of the search path. If no other ++ * file is found, however, they will return with the ++ * global variable errno set to EACCES. ++ */ ++ switch (errno) { ++ case EACCES: ++ sticky_errno = errno; ++ /* FALLTHRU */ ++ case ENOENT: ++ case ENOTDIR: ++#ifdef ELOOP ++ case ELOOP: ++#endif ++#ifdef ESTALE ++ case ESTALE: +#endif ++#ifdef ENODEV ++ case ENODEV: ++#endif ++#ifdef ETIMEDOUT ++ case ETIMEDOUT: ++#endif ++ break; /* Try other directories in PATH */ ++ default: ++ return; ++ } ++ } ++ if (sticky_errno != 0) ++ errno = sticky_errno; ++ } ++} + - class LETableReference; // fwd - /** - * defined in OpenTypeUtilities.cpp - * @internal - */ --extern void _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); -+U_CAPI void U_EXPORT2 _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); - - #define LE_DEBUG_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); - #define LE_DEBUG_TR3(x,y,z) _debug_LETableReference(__FILE__, __LINE__, x, this, (const void*)y, (size_t)z); --#if 0 --#define LE_TRACE_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); -+#if LE_TRACE_TR -+#define _TRTRACE(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); - #else --#define LE_TRACE_TR(x) -+#define _TRTRACE(x) - #endif - - #else - #define LE_DEBUG_TR(x) - #define LE_DEBUG_TR3(x,y,z) --#define LE_TRACE_TR(x) -+#define _TRTRACE(x) - #endif - - /** -@@ -73,6 +86,13 @@ - */ - class LETableReference { - public: ++/** ++ * Child process after a successful fork() or clone(). ++ * This function must not return, and must be prepared for either all ++ * of its address space to be shared with its parent, or to be a copy. ++ * It must not modify global variables such as "environ". ++ */ ++int ++childProcess(void *arg) ++{ ++ const ChildStuff* p = (const ChildStuff*) arg; + -+ /** -+ * Dummy enum asserting that a value is actually static data -+ * and does not need to be range checked -+ */ -+ enum EStaticData { kStaticData = 0 }; ++ /* Close the parent sides of the pipes. ++ Closing pipe fds here is redundant, since closeDescriptors() ++ would do it anyways, but a little paranoia is a good thing. */ ++ if ((closeSafely(p->in[1]) == -1) || ++ (closeSafely(p->out[0]) == -1) || ++ (closeSafely(p->err[0]) == -1) || ++ (closeSafely(p->childenv[0]) == -1) || ++ (closeSafely(p->childenv[1]) == -1) || ++ (closeSafely(p->fail[0]) == -1)) ++ goto WhyCantJohnnyExec; + - /** - * @internal - * Construct from a specific tag -@@ -80,28 +100,42 @@ - LETableReference(const LEFontInstance* font, LETag tableTag, LEErrorCode &success) : - fFont(font), fTag(tableTag), fParent(NULL), fStart(NULL),fLength(LE_UINTPTR_MAX) { - loadTable(success); -- LE_TRACE_TR("INFO: new table load") -+ _TRTRACE("INFO: new table load") - } - - LETableReference(const LETableReference &parent, LEErrorCode &success) : fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), fStart(parent.fStart), fLength(parent.fLength) { - if(LE_FAILURE(success)) { - clear(); - } -- LE_TRACE_TR("INFO: new clone") -+ _TRTRACE("INFO: new clone") - } - -+#if LE_ENABLE_RAW -+ /** -+ * Construct without a parent LETR. -+ */ - LETableReference(const le_uint8* data, size_t length = LE_UINTPTR_MAX) : - fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { -- LE_TRACE_TR("INFO: new raw") -+ _TRTRACE("INFO: new raw") - } -+#endif ++ /* Give the child sides of the pipes the right fileno's. */ ++ /* Note: it is possible for in[0] == 0 */ ++ if ((moveDescriptor(p->in[0] != -1 ? p->in[0] : p->fds[0], ++ STDIN_FILENO) == -1) || ++ (moveDescriptor(p->out[1]!= -1 ? p->out[1] : p->fds[1], ++ STDOUT_FILENO) == -1)) ++ goto WhyCantJohnnyExec; + -+ /** -+ * Construct without a parent LETR. -+ */ -+ LETableReference(EStaticData /* NOTUSED */, const le_uint8* data, size_t length) : -+ fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { -+ _TRTRACE("INFO: new EStaticData") -+ } ++ if (p->redirectErrorStream) { ++ if ((closeSafely(p->err[1]) == -1) || ++ (restartableDup2(STDOUT_FILENO, STDERR_FILENO) == -1)) ++ goto WhyCantJohnnyExec; ++ } else { ++ if (moveDescriptor(p->err[1] != -1 ? p->err[1] : p->fds[2], ++ STDERR_FILENO) == -1) ++ goto WhyCantJohnnyExec; ++ } + - LETableReference() : - fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(NULL), fLength(0) { -- LE_TRACE_TR("INFO: new empty") -+ _TRTRACE("INFO: new empty") - } - - ~LETableReference() { -- fTag=kTildeTableTag; -- LE_TRACE_TR("INFO: new dtor") -+ fTag= (LETag)kTildeTableTag; -+ _TRTRACE("INFO: new dtor") - } - - /** -@@ -127,7 +161,7 @@ - fLength = (fParent->fLength) - offset; // decrement length as base address is incremented - } - if(fLength != LE_UINTPTR_MAX) { // if we have bounds: -- if(offset+fLength > fParent->fLength) { -+ if((offset+fLength < offset) || (offset+fLength > fParent->fLength)) { - LE_DEBUG_TR3("offset+fLength out of range: (%p) +%d", NULL, offset+fLength); - err = LE_INDEX_OUT_OF_BOUNDS_ERROR; // exceeded - clear(); -@@ -137,11 +171,13 @@ - } else { - clear(); - } -- LE_TRACE_TR("INFO: new subset") -+ _TRTRACE("INFO: new subset") - } - - const void* getAlias() const { return (const void*)fStart; } -- const void* getAliasTODO() const { LE_DEBUG_TR("getAliasTODO()"); return (const void*)fStart; } -+#ifndef LE_ENABLE_RAW -+ const void* getAliasRAW() const { LE_DEBUG_TR("getAliasRAW()"); return (const void*)fStart; } -+#endif - le_bool isEmpty() const { return fStart==NULL || fLength==0; } - le_bool isValid() const { return !isEmpty(); } - le_bool hasBounds() const { return fLength!=LE_UINTPTR_MAX; } -@@ -234,7 +270,18 @@ - - void setRaw(const void *data, size_t length = LE_UINTPTR_MAX) { - fFont = NULL; -- fTag = kQuestionmarkTableTag; -+ fTag = (LETag)kQuestionmarkTableTag; -+ fParent = NULL; -+ fStart = (const le_uint8*)data; -+ fLength = length; -+ } ++ if (moveDescriptor(p->fail[1], FAIL_FILENO) == -1) ++ goto WhyCantJohnnyExec; + -+ /** -+ * set this object pointing to static data -+ */ -+ void setTo(EStaticData /*notused*/, const void *data, size_t length) { -+ fFont = NULL; -+ fTag = (LETag)kStaticTableTag; - fParent = NULL; - fStart = (const le_uint8*)data; - fLength = length; -@@ -277,6 +324,90 @@ - * Open a new entry based on an existing table - */ - -+template -+class LEReferenceTo : public LETableReference { -+public: -+ /** -+ * open a sub reference. -+ * @param parent parent reference -+ * @param success error status -+ * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds. -+ */ -+ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) -+ : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) { -+ verifyLength(0, LETableVarSizer::getSize(), success); -+ if(LE_FAILURE(success)) clear(); -+ } -+ /** -+ * ptr plus offset -+ */ -+ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) -+ : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) { -+ verifyLength(0, LETableVarSizer::getSize(), success); -+ if(LE_FAILURE(success)) clear(); -+ } -+ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) -+ : LETableReference(parent, offset, LE_UINTPTR_MAX, success) { -+ verifyLength(0, LETableVarSizer::getSize(), success); -+ if(LE_FAILURE(success)) clear(); -+ } -+ inline LEReferenceTo(const LETableReference &parent, LEErrorCode &success) -+ : LETableReference(parent, 0, LE_UINTPTR_MAX, success) { -+ verifyLength(0, LETableVarSizer::getSize(), success); -+ if(LE_FAILURE(success)) clear(); -+ } -+ inline LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) -+ : LETableReference(font, tableTag, success) { -+ verifyLength(0, LETableVarSizer::getSize(), success); -+ if(LE_FAILURE(success)) clear(); -+ } -+#if LE_ENABLE_RAW -+ inline LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} -+ inline LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} -+#endif -+ inline LEReferenceTo(EStaticData staticData, const le_uint8 *data, size_t length) : LETableReference(staticData, data, length) {} -+ inline LEReferenceTo(EStaticData staticData, const T *data, size_t length) : LETableReference(staticData, (const le_uint8*)data, length) {} ++ /* close everything */ ++ if (closeDescriptors() == 0) { /* failed, close the old way */ ++ int max_fd = (int)sysconf(_SC_OPEN_MAX); ++ int fd; ++ for (fd = FAIL_FILENO + 1; fd < max_fd; fd++) ++ if (close(fd) == -1 && errno != EBADF) ++ goto WhyCantJohnnyExec; ++ } + -+ inline LEReferenceTo() : LETableReference() {} ++ /* change to the new working directory */ ++ if (p->pdir != NULL && chdir(p->pdir) < 0) ++ goto WhyCantJohnnyExec; + -+#if LE_ENABLE_RAW -+ inline LEReferenceTo& operator=(const T* other) { -+ setRaw(other); -+ return *this; -+ } -+#endif ++ if (fcntl(FAIL_FILENO, F_SETFD, FD_CLOEXEC) == -1) ++ goto WhyCantJohnnyExec; + -+ LEReferenceTo& setTo(LETableReference::EStaticData staticData, const T* other, size_t length) { -+ LETableReference::setTo(staticData, other, length); -+ return *this; -+ } ++ JDK_execvpe(p->mode, p->argv[0], p->argv, p->envv); + -+ LEReferenceTo &reparent(const LETableReference &base) { -+ fParent = &base; -+ return *this; -+ } ++ WhyCantJohnnyExec: ++ /* We used to go to an awful lot of trouble to predict whether the ++ * child would fail, but there is no reliable way to predict the ++ * success of an operation without *trying* it, and there's no way ++ * to try a chdir or exec in the parent. Instead, all we need is a ++ * way to communicate any failure back to the parent. Easy; we just ++ * send the errno back to the parent over a pipe in case of failure. ++ * The tricky thing is, how do we communicate the *success* of exec? ++ * We use FD_CLOEXEC together with the fact that a read() on a pipe ++ * yields EOF when the write ends (we have two of them!) are closed. ++ */ ++ { ++ int errnum = errno; ++ restartableWrite(FAIL_FILENO, &errnum, sizeof(errnum)); ++ } ++ close(FAIL_FILENO); ++ _exit(-1); ++ return 0; /* Suppress warning "no return value from function" */ ++} +--- ./jdk/src/solaris/native/java/lang/childproc.h 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/solaris/native/java/lang/childproc.h 2014-04-20 10:19:59.000000000 -0700 +@@ -0,0 +1,145 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ /** -+ * roll forward by one size. -+ * same as addOffset(LETableVarSizer::getSize(),success) -+ */ -+ void addObject(LEErrorCode &success) { -+ addOffset(LETableVarSizer::getSize(), success); -+ } -+ void addObject(size_t count, LEErrorCode &success) { -+ addOffset(LETableVarSizer::getSize()*count, success); -+ } ++#ifndef CHILDPROC_MD_H ++#define CHILDPROC_MD_H + -+ const T *operator->() const { return getAlias(); } -+ const T *operator*() const { return getAlias(); } -+ const T *getAlias() const { return (const T*)fStart; } -+#if LE_ENABLE_RAW -+ const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; } ++#include ++ ++#ifdef __APPLE__ ++#include ++#define environ (*_NSGetEnviron()) ++#else ++/* This is one of the rare times it's more portable to declare an ++ * external symbol explicitly, rather than via a system header. ++ * The declaration is standardized as part of UNIX98, but there is ++ * no standard (not even de-facto) header file where the ++ * declaration is to be found. See: ++ * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html ++ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html ++ * ++ * "All identifiers in this volume of IEEE Std 1003.1-2001, except ++ * environ, are defined in at least one of the headers" (!) ++ */ ++extern char **environ; +#endif + -+}; ++#ifdef __linux__ ++#include ++#endif + ++#ifndef STDIN_FILENO ++#define STDIN_FILENO 0 ++#endif + - /** - * \def LE_UNBOUNDED_ARRAY - * define an array with no *known* bound. Will trim to available size. -@@ -289,12 +420,12 @@ - public: - LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count) - : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) { -- LE_TRACE_TR("INFO: new RTAO by offset") -+ _TRTRACE("INFO: new RTAO by offset") - if(LE_SUCCESS(success)) { -- if(count == LE_UNBOUNDED_ARRAY) { // not a known length -- count = getLength()/LETableVarSizer::getSize(); // fit to max size -+ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length -+ fCount = getLength()/LETableVarSizer::getSize(); // fit to max size - } -- LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); -+ LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); - } - if(LE_FAILURE(success)) { - fCount=0; -@@ -304,23 +435,23 @@ - - LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count) - : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) { --LE_TRACE_TR("INFO: new RTAO") -+_TRTRACE("INFO: new RTAO") - if(LE_SUCCESS(success)) { -- if(count == LE_UNBOUNDED_ARRAY) { // not a known length -- count = getLength()/LETableVarSizer::getSize(); // fit to max size -+ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length -+ fCount = getLength()/LETableVarSizer::getSize(); // fit to max size - } -- LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); -+ LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); - } - if(LE_FAILURE(success)) clear(); - } - LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count) - : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) { --LE_TRACE_TR("INFO: new RTAO") -+_TRTRACE("INFO: new RTAO") - if(LE_SUCCESS(success)) { -- if(count == LE_UNBOUNDED_ARRAY) { // not a known length -- count = getLength()/LETableVarSizer::getSize(); // fit to max size -+ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length -+ fCount = getLength()/LETableVarSizer::getSize(); // fit to max size - } -- LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); -+ LETableReference::verifyLength(0, LETableVarSizer::getSize()*fCount, success); - } - if(LE_FAILURE(success)) clear(); - } -@@ -329,18 +460,40 @@ - - le_uint32 getCount() const { return fCount; } - -- using LETableReference::getAlias; -+ const T *getAlias() const { return (const T*)fStart; } - - const T *getAlias(le_uint32 i, LEErrorCode &success) const { - return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success))); - } - -- const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } -+#ifndef LE_ENABLE_RAW -+ const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; } ++#ifndef STDOUT_FILENO ++#define STDOUT_FILENO 1 +#endif - - const T& getObject(le_uint32 i, LEErrorCode &success) const { - return *getAlias(i,success); - } - -+ /** -+ * by-value array accessor for integral types. -+ */ -+ const T operator[](le_uint32 i) const { -+ LEErrorCode success = LE_NO_ERROR; -+ const T *ret = getAlias(i, success); -+ if(LE_FAILURE(success) || ret==NULL) { -+#if LE_ASSERT_BAD_FONT -+ LE_DEBUG_TR3("Range error, out of bounds? (%p) #%d", NULL, i); ++ ++#ifndef STDERR_FILENO ++#define STDERR_FILENO 2 +#endif -+ return T(0); // will not work for all types. -+ } -+ return *ret; -+ } + -+ const LEReferenceTo getReference(le_uint32 i, LEErrorCode &success) const { -+ if(LE_FAILURE(success)) return LEReferenceTo(); -+ return LEReferenceTo(*this, success, getAlias(i,success)); -+ } ++#ifndef SA_NOCLDSTOP ++#define SA_NOCLDSTOP 0 ++#endif + - const T& operator()(le_uint32 i, LEErrorCode &success) const { - return *getAlias(i,success); - } -@@ -349,6 +502,7 @@ - if(LE_SUCCESS(success)&&i::getSize()*i; - } else { -+ LE_DEBUG_TR3("getOffsetFor failed (%p) index=%d",NULL, i); - success = LE_INDEX_OUT_OF_BOUNDS_ERROR; - } - return 0; -@@ -360,7 +514,7 @@ - } - - LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) { -- LE_TRACE_TR("INFO: null RTAO") -+ _TRTRACE("INFO: null RTAO") - } - - private: -@@ -368,73 +522,11 @@ - }; - - --template --class LEReferenceTo : public LETableReference { --public: -- /** -- * open a sub reference. -- * @param parent parent reference -- * @param success error status -- * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds. -- */ -- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) -- : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) { -- verifyLength(0, LETableVarSizer::getSize(), success); -- if(LE_FAILURE(success)) clear(); -- } -- /** -- * ptr plus offset -- */ -- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) -- : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) { -- verifyLength(0, LETableVarSizer::getSize(), success); -- if(LE_FAILURE(success)) clear(); -- } -- LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) -- : LETableReference(parent, offset, LE_UINTPTR_MAX, success) { -- verifyLength(0, LETableVarSizer::getSize(), success); -- if(LE_FAILURE(success)) clear(); -- } -- LEReferenceTo(const LETableReference &parent, LEErrorCode &success) -- : LETableReference(parent, 0, LE_UINTPTR_MAX, success) { -- verifyLength(0, LETableVarSizer::getSize(), success); -- if(LE_FAILURE(success)) clear(); -- } -- LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) -- : LETableReference(font, tableTag, success) { -- verifyLength(0, LETableVarSizer::getSize(), success); -- if(LE_FAILURE(success)) clear(); -- } -- LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} -- LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} -- LEReferenceTo() : LETableReference(NULL) {} -- -- LEReferenceTo& operator=(const T* other) { -- setRaw(other); -- return *this; -- } -- -- LEReferenceTo &reparent(const LETableReference &base) { -- fParent = &base; -- return *this; -- } - -- /** -- * roll forward by one size. -- * same as addOffset(LETableVarSizer::getSize(),success) -- */ -- void addObject(LEErrorCode &success) { -- addOffset(LETableVarSizer::getSize(), success); -- } -- void addObject(size_t count, LEErrorCode &success) { -- addOffset(LETableVarSizer::getSize()*count, success); -- } -- -- const T *operator->() const { return getAlias(); } -- const T *getAlias() const { return (const T*)fStart; } -- const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } --}; - -+#ifdef _TRTRACE -+#undef _TRTRACE ++#ifndef SA_RESTART ++#define SA_RESTART 0 +#endif - - U_NAMESPACE_END - ---- jdk/src/share/native/sun/font/layout/LETypes.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LETypes.h 2014-04-20 12:39:16.000000000 -0700 -@@ -337,6 +337,20 @@ - typedef struct LEPoint LEPoint; - #endif - ++ ++#define FAIL_FILENO (STDERR_FILENO + 1) ++ ++/* TODO: Refactor. */ ++#define RESTARTABLE(_cmd, _result) do { \ ++ do { \ ++ _result = _cmd; \ ++ } while((_result == -1) && (errno == EINTR)); \ ++} while(0) ++ ++/* These numbers must be the same as the Enum in UNIXProcess.java ++ * Must be a better way of doing this. ++ */ ++#define MODE_FORK 1 ++#define MODE_POSIX_SPAWN 2 ++#define MODE_VFORK 3 ++#define MODE_CLONE 4 ++ ++typedef struct _ChildStuff ++{ ++ int in[2]; ++ int out[2]; ++ int err[2]; ++ int fail[2]; ++ int childenv[2]; ++ int fds[3]; ++ int mode; ++ const char **argv; ++ int argc; ++ const char **envv; ++ const char *pdir; ++ int redirectErrorStream; ++ void *clone_stack; ++} ChildStuff; ++ ++/* following used in addition when mode is SPAWN */ ++typedef struct _SpawnInfo { ++ int nargv; /* number of argv array elements */ ++ int argvBytes; /* total number of bytes in argv array */ ++ int nenvv; /* number of envv array elements */ ++ int envvBytes; /* total number of bytes in envv array */ ++ int dirlen; /* length of home directory string */ ++ int nparentPathv; /* number of elements in parentPathv array */ ++ int parentPathvBytes; /* total number of bytes in parentPathv array */ ++} SpawnInfo; ++ +/** -+ * \def LE_TRACE -+ * @internal ++ * The cached and split version of the JDK's effective PATH. ++ * (We don't support putenv("PATH=...") in native code) + */ -+#ifndef LE_TRACE -+# define LE_TRACE 0 -+#endif ++const char * const *parentPathv; ++ ++ssize_t restartableWrite(int fd, const void *buf, size_t count); ++int restartableDup2(int fd_from, int fd_to); ++int closeSafely(int fd); ++int isAsciiDigit(char c); ++int closeDescriptors(void); ++int moveDescriptor(int fd_from, int fd_to); ++ ++int magicNumber(); ++ssize_t readFully(int fd, void *buf, size_t nbyte); ++void initVectorFromBlock(const char**vector, const char* block, int count); ++void execve_as_traditional_shell_script(const char *file, ++ const char *argv[], ++ const char *const envp[]); ++void execve_with_shell_fallback(int mode, const char *file, ++ const char *argv[], ++ const char *const envp[]); ++void JDK_execvpe(int mode, const char *file, ++ const char *argv[], ++ const char *const envp[]); ++int childProcess(void *arg); + -+#if LE_TRACE -+# include -+# define _LETRACE printf("\n%s:%d: LE: ", __FILE__, __LINE__),printf -+#else -+# define _LETRACE 0&& +#endif +--- ./jdk/src/solaris/native/java/lang/java_props_macosx.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/lang/java_props_macosx.c 2014-06-06 19:56:29.000000000 -0700 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "java_props_macosx.h" + +@@ -262,9 +263,20 @@ + return c_exception; + } - #ifndef U_HIDE_INTERNAL_API - -@@ -701,6 +715,12 @@ - LE_FEATURE_ENUM_MAX = LE_CHAR_FILTER_FEATURE_ENUM - }; - -+ -+/** -+ * Flags for typographic features. -+ * @internal -+ * @{ ++/* ++ * Method for fetching the user.home path and storing it in the property list. ++ * For signed .apps running in the Mac App Sandbox, user.home is set to the ++ * app's sandbox container. + */ - #define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM) - #define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM) - #define LE_NoCanon_FEATURE_FLAG (1 << LE_NoCanon_FEATURE_ENUM) -@@ -727,6 +747,9 @@ - #define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM) ++void setUserHome(java_props_t *sprops) { ++ if (sprops == NULL) { return; } ++ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ++ sprops->user_home = createUTF8CString((CFStringRef)NSHomeDirectory()); ++ [pool drain]; ++} - #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM) -+/** -+ * @} -+ */ + /* +- * Method for fetching proxy info and storing it in the propery list. ++ * Method for fetching proxy info and storing it in the property list. + */ + void setProxyProperties(java_props_t *sProps) { + if (sProps == NULL) return; +--- ./jdk/src/solaris/native/java/lang/java_props_macosx.h 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/lang/java_props_macosx.h 2014-06-06 19:56:29.000000000 -0700 +@@ -27,6 +27,7 @@ - #define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG) /**< default features */ + char *setupMacOSXLocale(int cat); + void setOSNameAndVersion(java_props_t *sprops); ++void setUserHome(java_props_t *sprops); + void setProxyProperties(java_props_t *sProps); -@@ -768,7 +791,7 @@ - * - * @stable ICU 2.4 - */ --#ifndef LE_FAILURE -+#ifndef LE_SUCCESS - #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code)) + enum PreferredToolkit_enum { +--- ./jdk/src/solaris/native/java/lang/java_props_md.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/lang/java_props_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -151,7 +151,7 @@ + lc = setlocale(cat, NULL); #endif -@@ -781,4 +804,4 @@ - #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(__OpenBSD__) + if (lc == NULL) { + return 0; + } +@@ -324,6 +324,25 @@ + *std_encoding = "Big5-HKSCS-2001"; + } #endif - --#endif /* __LETYPES_H */ ++#ifdef MACOSX ++ /* ++ * For the case on MacOS X where encoding is set to US-ASCII, but we ++ * don't have any encoding hints from LANG/LC_ALL/LC_CTYPE, use UTF-8 ++ * instead. ++ * ++ * The contents of ASCII files will still be read and displayed ++ * correctly, but so will files containing UTF-8 characters beyond the ++ * standard ASCII range. ++ * ++ * Specifically, this allows apps launched by double-clicking a .jar ++ * file to correctly read UTF-8 files using the default encoding (see ++ * 8011194). ++ */ ++ if (strcmp(p,"US-ASCII") == 0 && getenv("LANG") == NULL && ++ getenv("LC_ALL") == NULL && getenv("LC_CTYPE") == NULL) { ++ *std_encoding = "UTF-8"; ++ } +#endif ---- jdk/src/share/native/sun/font/layout/LayoutEngine.cpp 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LayoutEngine.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -156,7 +156,7 @@ - CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); - virtual ~CanonMarkFilter(); - -- virtual le_bool accept(LEGlyphID glyph) const; -+ virtual le_bool accept(LEGlyphID glyph, LEErrorCode &success) const; - }; - - CanonMarkFilter::CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success) -@@ -169,9 +169,8 @@ - // nothing to do? - } - --le_bool CanonMarkFilter::accept(LEGlyphID glyph) const -+le_bool CanonMarkFilter::accept(LEGlyphID glyph, LEErrorCode &success) const - { -- LEErrorCode success = LE_NO_ERROR; - le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); - if(LE_FAILURE(success)) return false; - return glyphClass != 0; -@@ -263,7 +262,9 @@ - return count; } -- LEReferenceTo canonGSUBTable((GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable); -+ LEReferenceTo canonGSUBTable(LETableReference::kStaticData, -+ (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable, -+ CanonShaping::glyphSubstitutionTableLen); - LETag scriptTag = OpenTypeLayoutEngine::getScriptTag(fScriptCode); - LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode); - le_int32 i, dir = 1, out = 0, outCharCount = count; -@@ -323,7 +324,8 @@ - LE_DELETE_ARRAY(reordered); - } - -- outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, (const GlyphDefinitionTableHeader*)NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); -+ const LEReferenceTo noGDEF; // empty gdef header -+ outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, noGDEF, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); - - if (LE_FAILURE(success)) { - delete substitutionFilter; -@@ -403,10 +405,13 @@ - LEPoint advance; - - glyphStorage.setPosition(i, x, y, success); -+ _LETRACE("g#%-4d (%.2f, %.2f)", i, x, y); + return 1; +@@ -484,12 +503,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"; +@@ -527,7 +553,14 @@ + { + struct passwd *pwent = getpwuid(getuid()); + sprops.user_name = pwent ? strdup(pwent->pw_name) : "?"; +- sprops.user_home = pwent ? strdup(pwent->pw_dir) : "?"; ++#ifdef MACOSX ++ setUserHome(&sprops); ++#else ++ sprops.user_home = pwent ? strdup(pwent->pw_dir) : NULL; ++#endif ++ if (sprops.user_home == NULL) { ++ sprops.user_home = "?"; ++ } + } - fFontInstance->getGlyphAdvance(glyphStorage[i], advance); - x += advance.fX; - y += advance.fY; + /* User TIMEZONE */ +--- ./jdk/src/solaris/native/java/lang/jspawnhelper.c 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/solaris/native/java/lang/jspawnhelper.c 2014-04-19 01:27:14.000000000 -0700 +@@ -0,0 +1,149 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + ++#include ++#include ++#include ++#include ++#include ++#include ++#include + - } - - glyphStorage.setPosition(glyphCount, x, y, success); -@@ -424,7 +429,7 @@ - return; - } - -- LEReferenceTo gdefTable((GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, -+ LEReferenceTo gdefTable(LETableReference::kStaticData, (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, - CanonShaping::glyphDefinitionTableLen); - CanonMarkFilter filter(gdefTable, success); - -@@ -464,9 +469,10 @@ - glyphStorage.getGlyphPosition(p + 1, next, ignore, success); - - xAdvance = next - prev; -+ _LETRACE("p#%d (%.2f,%.2f)", p, xAdvance, 0); - glyphStorage.adjustPosition(p, xAdjust, 0, success); - -- if (markFilter->accept(glyphStorage[p])) { -+ if (markFilter->accept(glyphStorage[p], success)) { - xAdjust -= xAdvance; - } - -@@ -506,9 +512,13 @@ - glyphStorage.getGlyphPosition(p + 1, next, ignore, success); - - xAdvance = next - prev; ++#include "childproc.h" + -+ _LETRACE("p#%d (%.2f,%.2f)", p, xAdvance, 0); ++extern int errno; ++ ++#define ALLOC(X,Y) { \ ++ void *mptr; \ ++ mptr = malloc (Y); \ ++ if (mptr == 0) { \ ++ error (fdout, ERR_MALLOC); \ ++ } \ ++ X = mptr; \ ++} + ++#define ERR_MALLOC 1 ++#define ERR_PIPE 2 ++#define ERR_ARGS 3 + - glyphStorage.adjustPosition(p, xAdjust, 0, success); - -- if (markFilter->accept(chars[c])) { -+ if (markFilter->accept(chars[c], success)) { - xAdjust -= xAdvance; - } - -@@ -662,8 +672,10 @@ - break; - } - } else { -- MorphTableHeader2 *morxTable = (MorphTableHeader2 *)fontInstance->getFontTable(morxTableTag); -- if (morxTable != NULL && SWAPL(morxTable->version)==0x00020000) { -+ LEReferenceTo morxTable(fontInstance, morxTableTag, success); -+ if (LE_SUCCESS(success) && -+ morxTable.isValid() && -+ SWAPL(morxTable->version)==0x00020000) { - result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success); - } else { - LEReferenceTo mortTable(fontInstance, mortTableTag, success); -@@ -687,7 +699,6 @@ - } - - case arabScriptCode: -- //case hebrScriptCode: - result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); - break; ++void error (int fd, int err) { ++ write (fd, &err, sizeof(err)); ++ exit (1); ++} ++ ++void shutItDown() { ++ fprintf(stdout, "This command is not for general use and should "); ++ fprintf(stdout, "only be run as the result of a call to\n"); ++ fprintf(stdout, "ProcessBuilder.start() or Runtime.exec() in a java "); ++ fprintf(stdout, "application\n"); ++ _exit(1); ++} ++ ++/* ++ * read the following off the pipefd ++ * - the ChildStuff struct ++ * - the SpawnInfo struct ++ * - the data strings for fields in ChildStuff ++ */ ++void initChildStuff (int fdin, int fdout, ChildStuff *c) { ++ int n; ++ int argvBytes, nargv, envvBytes, nenvv; ++ int dirlen; ++ char *buf; ++ SpawnInfo sp; ++ int bufsize, offset=0; ++ int magic; ++ int res; ++ ++ res = readFully (fdin, &magic, sizeof(magic)); ++ if (res != 4 || magic != magicNumber()) { ++ error (fdout, ERR_PIPE); ++ } ++ ++ if (readFully (fdin, c, sizeof(*c)) == -1) { ++ error (fdout, ERR_PIPE); ++ } ++ ++ if (readFully (fdin, &sp, sizeof(sp)) == -1) { ++ error (fdout, ERR_PIPE); ++ } ++ ++ bufsize = sp.argvBytes + sp.envvBytes + ++ sp.dirlen + sp.parentPathvBytes; ++ ++ ALLOC(buf, bufsize); ++ ++ if (readFully (fdin, buf, bufsize) == -1) { ++ error (fdout, ERR_PIPE); ++ } ++ ++ /* Initialize argv[] */ ++ ALLOC(c->argv, sizeof(char *) * sp.nargv); ++ initVectorFromBlock (c->argv, buf+offset, sp.nargv-1); ++ offset += sp.argvBytes; ++ ++ /* Initialize envv[] */ ++ if (sp.nenvv == 0) { ++ c->envv = 0; ++ } else { ++ ALLOC(c->envv, sizeof(char *) * sp.nenvv); ++ initVectorFromBlock (c->envv, buf+offset, sp.nenvv-1); ++ offset += sp.envvBytes; ++ } ++ ++ /* Initialize pdir */ ++ if (sp.dirlen == 0) { ++ c->pdir = 0; ++ } else { ++ c->pdir = buf+offset; ++ offset += sp.dirlen; ++ } ++ ++ /* Initialize parentPathv[] */ ++ ALLOC(parentPathv, sizeof (char *) * sp.nparentPathv) ++ initVectorFromBlock ((const char**)parentPathv, buf+offset, sp.nparentPathv-1); ++ offset += sp.parentPathvBytes; ++} ++ ++int main(int argc, char *argv[]) { ++ ChildStuff c; ++ int t; ++ struct stat buf; ++ /* argv[0] contains the fd number to read all the child info */ ++ int r, fdin, fdout; ++ ++ r = sscanf (argv[argc-1], "%d:%d", &fdin, &fdout); ++ if (r == 2 && fcntl(fdin, F_GETFD) != -1) { ++ fstat(fdin, &buf); ++ if (!S_ISFIFO(buf.st_mode)) ++ shutItDown(); ++ } else { ++ shutItDown(); ++ } ++ initChildStuff (fdin, fdout, &c); ++ ++ childProcess (&c); ++ return 0; /* NOT REACHED */ ++} +--- ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2014-06-06 19:56:34.000000000 -0700 +@@ -122,7 +122,6 @@ + static jclass ni_ia6cls; + static jmethodID ni_ia4ctrID; + static jmethodID ni_ia6ctrID; +-static jfieldID ni_ia6ipaddressID; + static int initialized = 0; ---- jdk/src/share/native/sun/font/layout/LayoutEngine.h 2013-09-06 11:29:01.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LayoutEngine.h 2014-04-20 12:39:16.000000000 -0700 -@@ -156,8 +156,8 @@ - * @param fontInstance - the font for the text - * @param scriptCode - the script for the text - * @param languageCode - the language for the text -- * @param typoFlags - the typographic control flags for the text. Set bit 1 if kerning -- * is desired, set bit 2 if ligature formation is desired. Others are reserved. -+ * @param typoFlags - the typographic control flags for the text (a bitfield). Use kTypoFlagKern -+ * if kerning is desired, kTypoFlagLiga if ligature formation is desired. Others are reserved. - * @param success - set to an error code if the operation fails - * - * @see LEFontInstance ---- jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -95,7 +95,7 @@ + /* +@@ -158,7 +157,6 @@ + ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); + ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); + ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); +- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); + initialized = 1; + } - if (actionOffset != 0) { - LEReferenceTo ap(stHeader, success, ligActionOffset); // byte offset -- ap.addObject(ligActionIndex - 1, success); // index offset ( one before the actual start, because we will pre-increment) -+ ap.addObject(ligActionIndex, success); - LEReferenceToArrayOf ligatureTable(stHeader, success, ligatureOffset, LE_UNBOUNDED_ARRAY); - LigatureActionEntry action; - le_int32 offset, i = 0; -@@ -111,7 +111,6 @@ - do { - le_uint32 componentGlyph = componentStack[m--]; // pop off +@@ -306,6 +304,7 @@ + } -- ap.addObject(success); - action = SWAPL(*ap.getAlias()); + while (iterator != NULL) { ++ int ret1; + if (iterator->ai_family == AF_INET) { + jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); + if (IS_NULL(iaObj)) { +@@ -318,20 +317,17 @@ + inetIndex++; + } else if (iterator->ai_family == AF_INET6) { + jint scope = 0; +- jbyteArray ipaddress; - if (m < 0) { -@@ -145,7 +144,8 @@ - LE_DEBUG_BAD_FONT("m<0") - } + jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); + if (IS_NULL(iaObj)) { + ret = NULL; + goto cleanupAndReturn; + } +- ipaddress = (*env)->NewByteArray(env, 16); +- if (IS_NULL(ipaddress)) { +- ret = NULL; +- goto cleanupAndReturn; ++ ret1 = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); ++ if (!ret1) { ++ ret = NULL; ++ goto cleanupAndReturn; + } +- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, +- (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); + #ifdef __linux__ + if (!kernelIsV22()) { + scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; +@@ -340,10 +336,8 @@ + scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; #endif -- } while (!(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items -+ ap.addObject(success); -+ } while (LE_SUCCESS(success) && !(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items + if (scope != 0) { /* zero is default value, no need to set */ +- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); +- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); ++ setInet6Address_scopeid(env, iaObj, scope); + } +- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); + setInetAddress_hostName(env, iaObj, host); + (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); + inet6Index++; +--- ./jdk/src/solaris/native/java/net/NetworkInterface.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/NetworkInterface.c 2014-06-06 19:56:35.000000000 -0700 +@@ -60,14 +60,19 @@ + #include + #include + #include +-#if defined(__APPLE__) ++#if defined(__FreeBSD__) || defined(__APPLE__) + #include + #include ++#elif defined(__OpenBSD__) ++#include ++#include ++#elif defined(__NetBSD__) ++#include ++#endif + #include + #include + #include + #endif +-#endif + + #include "jvm.h" + #include "jni_util.h" +@@ -118,7 +123,6 @@ + static jmethodID ni_ia4ctrID; + static jmethodID ni_ia6ctrID; + static jmethodID ni_ibctrID; +-static jfieldID ni_ia6ipaddressID; + static jfieldID ni_ibaddressID; + static jfieldID ni_ib4broadcastID; + static jfieldID ni_ib4maskID; +@@ -193,7 +197,6 @@ + ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); + ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); + ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "", "()V"); +- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); + ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;"); + ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;"); + ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S"); +@@ -332,11 +335,9 @@ + #ifdef AF_INET6 + if (family == AF_INET6) { + jbyte *bytes = (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr); +- jbyteArray ipaddress = (*env)->GetObjectField(env, iaObj, ni_ia6ipaddressID); + jbyte caddr[16]; + int i; +- +- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); ++ getInet6Address_ipaddress(env, iaObj, (char *)caddr); + i = 0; + while (i < 16) { + if (caddr[i] != bytes[i]) { +@@ -563,11 +564,9 @@ - while (mm >= 0) { - if (++m >= nComponents) { ---- jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -49,14 +49,20 @@ - return 0; + if ((sock = openSocketWithFallback(env, name_utf)) < 0) { + (*env)->ReleaseStringUTFChars(env, name, name_utf); +- return -1; ++ return -1; } -- if (coverageIndex >= 0) { -+ LEReferenceToArrayOf ligSetTableOffsetArrayRef(base, success, ligSetTableOffsetArray, SWAPW(ligSetCount)); -+ -+ if (coverageIndex >= 0 && LE_SUCCESS(success) && (le_uint32)coverageIndex < ligSetTableOffsetArrayRef.getCount()) { - Offset ligSetTableOffset = SWAPW(ligSetTableOffsetArray[coverageIndex]); -- const LigatureSetTable *ligSetTable = (const LigatureSetTable *) ((char *) this + ligSetTableOffset); -+ LEReferenceTo ligSetTable(base, success, ligSetTableOffset); -+ -+ if( LE_FAILURE(success) ) { return 0; } - le_uint16 ligCount = SWAPW(ligSetTable->ligatureCount); +- name_utf = (*env)->GetStringUTFChars(env, name, &isCopy); +- + ret = getFlags(sock, name_utf, &flags); -- for (le_uint16 lig = 0; lig < ligCount; lig += 1) { -+ LEReferenceTo ligatureTableOffsetArray(base, success, ligSetTable->ligatureTableOffsetArray, ligCount); -+ for (le_uint16 lig = 0; LE_SUCCESS(success) && lig < ligCount; lig += 1) { - Offset ligTableOffset = SWAPW(ligSetTable->ligatureTableOffsetArray[lig]); -- const LigatureTable *ligTable = (const LigatureTable *) ((char *)ligSetTable + ligTableOffset); -+ LEReferenceTo ligTable(ligSetTable, success, ligTableOffset); -+ if(LE_FAILURE(success)) { return 0; } - le_uint16 compCount = SWAPW(ligTable->compCount) - 1; - le_int32 startPosition = glyphIterator->getCurrStreamPosition(); - TTGlyphID ligGlyph = SWAPW(ligTable->ligGlyph); -@@ -72,7 +78,7 @@ + close(sock); +@@ -670,21 +669,17 @@ + int scope=0; + iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); + if (iaObj) { +- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); +- if (ipaddress == NULL) { ++ int ret = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); ++ if (ret == JNI_FALSE) { + return NULL; } - } +- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, +- (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); -- if (comp == compCount && (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, ligGlyph)))) { -+ if (comp == compCount && (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, ligGlyph), success))) { - GlyphIterator tempIterator(*glyphIterator); - TTGlyphID deletedGlyph = tempIterator.ignoresMarks()? 0xFFFE : 0xFFFF; + scope = ((struct sockaddr_in6*)addrP->addr)->sin6_scope_id; ---- jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/LookupProcessor.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -60,8 +60,10 @@ - LEReferenceTo lookupSubtable = lookupTable->getLookupSubtable(lookupTable, subtable, success); + if (scope != 0) { /* zero is default value, no need to set */ +- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); +- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); +- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); ++ setInet6Address_scopeid(env, iaObj, scope); ++ setInet6Address_scopeifname(env, iaObj, netifObj); + } +- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); + } + ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); + if (ibObj) { +@@ -1293,11 +1288,15 @@ + return -1; + } - delta = applySubtable(lookupSubtable, lookupType, glyphIterator, fontInstance, success); -- -- if (delta > 0 || LE_FAILURE(success)) { -+ if (delta > 0 && LE_FAILURE(success)) { -+#if LE_TRACE -+ _LETRACE("Posn #%d, type %X, applied subtable #%d/%d - %s\n", startPosition, lookupType, subtable, subtableCount, u_errorName((UErrorCode)success)); ++#ifdef __FreeBSD__ ++ *flags = ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16)); ++#else + if (sizeof(if2.ifr_flags) == sizeof(short)) { + *flags = (if2.ifr_flags & 0xffff); + } else { + *flags = if2.ifr_flags; + } +#endif - return 1; - } + return 0; + } -@@ -86,7 +88,7 @@ - } +@@ -1989,11 +1988,15 @@ + return -1; + } - GlyphIterator glyphIterator(glyphStorage, glyphPositionAdjustments, -- rightToLeft, 0, 0, glyphDefinitionTableHeader); -+ rightToLeft, 0, 0, glyphDefinitionTableHeader, success); - le_int32 newGlyphCount = glyphCount; ++#ifdef __FreeBSD__ ++ *flags = ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16)); ++#else + if (sizeof(if2.ifr_flags) == sizeof(short)) { + *flags = (if2.ifr_flags & 0xffff); + } else { + *flags = if2.ifr_flags; + } ++#endif + return 0; + } - for (le_uint16 order = 0; order < lookupOrderCount && LE_SUCCESS(success); order += 1) { -@@ -94,6 +96,7 @@ - FeatureMask selectMask = lookupSelectArray[lookup]; +--- ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2014-06-06 19:56:35.000000000 -0700 +@@ -23,12 +23,12 @@ + * questions. + */ - if (selectMask != 0) { -+ _LETRACE("Processing order#%d/%d", order, lookupOrderCount); - const LEReferenceTo lookupTable = lookupListTable->getLookupTable(lookupListTable, lookup, success); - if (!lookupTable.isValid() ||LE_FAILURE(success) ) { - continue; -@@ -103,8 +106,11 @@ - glyphIterator.reset(lookupFlags, selectMask); ++#include ++#include + #include + #include + #include + #include +-#include +-#include - while (glyphIterator.findFeatureTag()) { -- applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); // TODO -+ applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); - if (LE_FAILURE(success)) { -+#if LE_TRACE -+ _LETRACE("Failure for lookup 0x%x - %s\n", lookup, u_errorName((UErrorCode)success)); + #ifdef __solaris__ + #include +@@ -357,13 +357,21 @@ + #ifdef AF_INET6 + if (ipv6_available()) { + struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr; ++#ifdef __FreeBSD__ ++ him6->sin6_family = AF_INET6; ++#else + him6->sin6_family = AF_UNSPEC; +#endif - return 0; - } + len = sizeof(struct sockaddr_in6); + } else + #endif + { + struct sockaddr_in *him4 = (struct sockaddr_in*)&addr; ++#ifdef __FreeBSD__ ++ him4->sin_family = AF_INET; ++#else + him4->sin_family = AF_UNSPEC; ++#endif + len = sizeof(struct sockaddr_in); + } + JVM_Connect(fd, (struct sockaddr *)&addr, len); +@@ -574,6 +582,8 @@ + } else if (ret == JVM_IO_ERR) { + if (errno == EBADF) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); ++ } else if (errno == ENOMEM) { ++ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); + } else { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "Peek failed"); } -@@ -138,7 +144,7 @@ - le_int32 LookupProcessor::selectLookups(const LEReferenceTo &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success) - { - le_uint16 lookupCount = featureTable.isValid()? SWAPW(featureTable->lookupCount) : 0; -- le_int32 store = order; -+ le_uint32 store = (le_uint32)order; - - LEReferenceToArrayOf lookupListIndexArray(featureTable, success, featureTable->lookupListIndexArray, lookupCount); +@@ -674,15 +684,18 @@ + "Receive timed out"); + return -1; + } else if (ret == JVM_IO_ERR) { ++ if (errno == ENOMEM) { ++ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); + #ifdef __linux__ +- if (errno == EBADF) { ++ } else if (errno == EBADF) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); + } else { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "Receive failed"); +- } + #else +- JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); ++ } else { ++ JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); + #endif ++ } + return -1; + } else if (ret == JVM_IO_INTR) { + JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", +@@ -910,15 +923,18 @@ + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", + "Receive timed out"); + } else if (ret == JVM_IO_ERR) { ++ if (errno == ENOMEM) { ++ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); + #ifdef __linux__ +- if (errno == EBADF) { ++ } else if (errno == EBADF) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); + } else { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "Receive failed"); +- } + #else +- JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); ++ } else { ++ JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); + #endif ++ } + } else if (ret == JVM_IO_INTR) { + JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", + "operation interrupted"); +@@ -2359,8 +2375,7 @@ + caddr[14] = ((address >> 8) & 0xff); + caddr[15] = (address & 0xff); + } else { +- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); +- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); ++ getInet6Address_ipaddress(env, iaObj, caddr); + } -@@ -147,6 +153,9 @@ - if (lookupListIndex >= lookupSelectCount) { - continue; - } -+ if (store >= lookupOrderCount) { -+ continue; -+ } + memcpy((void *)&(mname6.ipv6mr_multiaddr), caddr, sizeof(struct in6_addr)); +--- ./jdk/src/solaris/native/java/net/PlainSocketImpl.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/PlainSocketImpl.c 2014-06-06 19:56:35.000000000 -0700 +@@ -708,7 +708,6 @@ + } else { + ret = NET_Timeout(fd, timeout); + } +- + if (ret == 0) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", + "Accept timed out"); +@@ -716,6 +715,8 @@ + } else if (ret == JVM_IO_ERR) { + if (errno == EBADF) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); ++ } else if (errno == ENOMEM) { ++ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); + } else { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "Accept failed"); + } +--- ./jdk/src/solaris/native/java/net/SocketInputStream.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/SocketInputStream.c 2014-06-06 19:56:29.000000000 -0700 +@@ -108,6 +108,8 @@ + } else if (nread == JVM_IO_ERR) { + if (errno == EBADF) { + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); ++ } else if (errno == ENOMEM) { ++ JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed"); + } else { + NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", + "select/poll failed"); +--- ./jdk/src/solaris/native/java/net/bsd_close.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/bsd_close.c 2014-06-06 19:56:35.000000000 -0700 +@@ -25,6 +25,7 @@ - lookupSelectArray[lookupListIndex] |= featureMask; - lookupOrderArray[store++] = lookupListIndex; -@@ -246,7 +255,7 @@ + #include + #include ++#include + #include + #include + #include +@@ -35,7 +36,6 @@ + #include + #include + #include +- + #include - if (requiredFeatureIndex != 0xFFFF) { - requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success); -- featureReferences += SWAPW(featureTable->lookupCount); -+ featureReferences += SWAPW(requiredFeatureTable->lookupCount); - } + /* +@@ -345,8 +345,82 @@ + * signal other than our wakeup signal. + */ + int NET_Timeout(int s, long timeout) { ++/* ++ * On MacOS X, poll(2) is not working correctly, so a select(2) based ++ * implementation is preferred. See ++ * ++ * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7131399 ++ * ++ * However, on FreeBSD, the select(2) based implementation can cause ++ * crashes under load and poll(2) is preferred. See ++ * ++ * http://docs.freebsd.org/cgi/getmsg.cgi?fetch=215525+0+current/freebsd-java ++ * ++ * Other *BSD will use poll(2) for now, but please adjust as appropriate. ++ */ ++#ifndef __APPLE__ ++ long prevtime = 0, newtime; ++ struct timeval t; ++ fdEntry_t *fdEntry = getFdEntry(s); ++ ++ /* ++ * Check that fd hasn't been closed. ++ */ ++ if (fdEntry == NULL) { ++ errno = EBADF; ++ return -1; ++ } ++ ++ /* ++ * Pick up current time as may need to adjust timeout ++ */ ++ if (timeout > 0) { ++ gettimeofday(&t, NULL); ++ prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; ++ } ++ ++ for(;;) { ++ struct pollfd pfd; ++ int rv; ++ threadEntry_t self; ++ ++ /* ++ * Poll the fd. If interrupted by our wakeup signal ++ * errno will be set to EBADF. ++ */ ++ pfd.fd = s; ++ pfd.events = POLLIN | POLLERR; ++ ++ startOp(fdEntry, &self); ++ rv = poll(&pfd, 1, timeout); ++ endOp(fdEntry, &self); ++ ++ /* ++ * If interrupted then adjust timeout. If timeout ++ * has expired return 0 (indicating timeout expired). ++ */ ++ if (rv < 0 && errno == EINTR) { ++ if (timeout > 0) { ++ gettimeofday(&t, NULL); ++ newtime = t.tv_sec * 1000 + t.tv_usec / 1000; ++ timeout -= newtime - prevtime; ++ if (timeout <= 0) { ++ return 0; ++ } ++ prevtime = newtime; ++ } ++ } else { ++ return rv; ++ } ++ ++ } ++#else + long prevtime = 0, newtime; + struct timeval t, *tp = &t; ++ fd_set fds; ++ fd_set* fdsp = NULL; ++ int allocated = 0; ++ threadEntry_t self; + fdEntry_t *fdEntry = getFdEntry(s); - lookupOrderArray = LE_NEW_ARRAY(le_uint16, featureReferences); -@@ -254,6 +263,7 @@ - success = LE_MEMORY_ALLOCATION_ERROR; - return; + /* +@@ -376,20 +450,29 @@ + t.tv_usec = 0; } -+ lookupOrderCount = featureReferences; - - for (le_int32 f = 0; f < featureMapCount; f += 1) { - FeatureMap fm = featureMap[f]; -@@ -272,6 +282,7 @@ - - for (le_uint16 feature = 0; feature < featureCount; feature += 1) { - LEReferenceToArrayOf featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount); -+ if (LE_FAILURE(success)) { continue; } - le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature,success)); - - // don't add the required feature to the list more than once... ---- jdk/src/share/native/sun/font/layout/Lookups.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/Lookups.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -65,7 +65,7 @@ - - if(LE_FAILURE(success)) return 0; -- return coverageTable->getGlyphCoverage(glyphID); -+ return coverageTable->getGlyphCoverage(coverageTable, glyphID, success); - } - - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/MarkArrays.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/MarkArrays.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -38,20 +38,28 @@ - - U_NAMESPACE_BEGIN - --le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, -- LEPoint &anchor) const -+le_int32 MarkArray::getMarkClass(const LETableReference &base, LEGlyphID glyphID, -+ le_int32 coverageIndex, const LEFontInstance *fontInstance, -+ LEPoint &anchor, LEErrorCode &success) const - { - le_int32 markClass = -1; - -- if (coverageIndex >= 0) { -+ if ( coverageIndex >= 0 && LE_SUCCESS(success) ) { - le_uint16 mCount = SWAPW(markCount); -- - if (coverageIndex < mCount) { -+ LEReferenceToArrayOf markRecordArrayRef(base, success, markRecordArray, mCount); -+ if(LE_FAILURE(success)) { -+ return markClass; -+ } - const MarkRecord *markRecord = &markRecordArray[coverageIndex]; - Offset anchorTableOffset = SWAPW(markRecord->markAnchorTableOffset); -- const AnchorTable *anchorTable = (AnchorTable *) ((char *) this + anchorTableOffset); -+ LEReferenceTo anchorTable(base, success, anchorTableOffset); ++ if (s < FD_SETSIZE) { ++ fdsp = &fds; ++ FD_ZERO(fdsp); ++ } else { ++ int length = (howmany(s+1, NFDBITS)) * sizeof(int); ++ fdsp = (fd_set *) calloc(1, length); ++ if (fdsp == NULL) { ++ return -1; // errno will be set to ENOMEM ++ } ++ allocated = 1; ++ } ++ FD_SET(s, fdsp); + -+ if(LE_FAILURE(success)) { -+ return markClass; -+ } + for(;;) { +- fd_set rfds; + int rv; +- threadEntry_t self; -- anchorTable->getAnchor(glyphID, fontInstance, anchor); -+ anchorTable->getAnchor(anchorTable, glyphID, fontInstance, anchor, success); - markClass = SWAPW(markRecord->markClass); - } + /* + * call select on the fd. If interrupted by our wakeup signal + * errno will be set to EBADF. + */ +- FD_ZERO(&rfds); +- FD_SET(s, &rfds); ---- jdk/src/share/native/sun/font/layout/MarkArrays.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/MarkArrays.h 2014-04-20 12:39:16.000000000 -0700 -@@ -54,8 +54,9 @@ - le_uint16 markCount; - MarkRecord markRecordArray[ANY_NUMBER]; + startOp(fdEntry, &self); +- rv = select(s+1, &rfds, 0, 0, tp); ++ rv = select(s+1, fdsp, 0, 0, tp); + endOp(fdEntry, &self); -- le_int32 getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, -- LEPoint &anchor) const; -+ le_int32 getMarkClass(const LETableReference &base, LEGlyphID glyphID, -+ le_int32 coverageIndex, const LEFontInstance *fontInstance, -+ LEPoint &anchor, LEErrorCode &success) const; - }; - LE_VAR_ARRAY(MarkArray, markRecordArray) + /* +@@ -403,6 +486,8 @@ + newtime = now.tv_sec * 1000 + now.tv_usec / 1000; + timeout -= newtime - prevtime; + if (timeout <= 0) { ++ if (allocated != 0) ++ free(fdsp); + return 0; + } + prevtime = newtime; +@@ -410,8 +495,11 @@ + t.tv_usec = (timeout % 1000) * 1000; + } + } else { ++ if (allocated != 0) ++ free(fdsp); + return rv; + } ---- jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -66,11 +66,12 @@ } ++#endif + } +--- ./jdk/src/solaris/native/java/net/linux_close.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/linux_close.c 2014-06-06 19:56:30.000000000 -0700 +@@ -34,7 +34,6 @@ + #include + #include + #include +- + #include - LEPoint markAnchor; -- const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); -- le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); -+ LEReferenceTo markArray(base, success, (const MarkArray *) ((char *) this + SWAPW(markArrayOffset))); -+ if(LE_FAILURE(success)) return 0; -+ le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); - le_uint16 mcCount = SWAPW(classCount); + /* +@@ -192,17 +191,6 @@ -- if (markClass < 0 || markClass >= mcCount) { -+ if (markClass < 0 || markClass >= mcCount || LE_FAILURE(success)) { - // markGlyph isn't in the mark array or its - // mark class is too big. The table is mal-formed! - return 0; -@@ -80,7 +81,8 @@ - GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/)); - LEGlyphID baseGlyph = findBaseGlyph(&baseIterator); - le_int32 baseCoverage = getBaseCoverage(base, (LEGlyphID) baseGlyph, success); -- const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset)); -+ LEReferenceTo baseArray(base, success, (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset))); -+ if(LE_FAILURE(success)) return 0; - le_uint16 baseCount = SWAPW(baseArray->baseRecordCount); + { + /* +- * Send a wakeup signal to all threads blocked on this +- * file descriptor. +- */ +- threadEntry_t *curr = fdEntry->threads; +- while (curr != NULL) { +- curr->intr = 1; +- pthread_kill( curr->thr, sigWakeup ); +- curr = curr->next; +- } +- +- /* + * And close/dup the file descriptor + * (restart if interrupted by signal) + */ +@@ -214,6 +202,16 @@ + } + } while (rv == -1 && errno == EINTR); - if (baseCoverage < 0 || baseCoverage >= baseCount) { -@@ -89,19 +91,23 @@ - // table is mal-formed... - return 0; ++ /* ++ * Send a wakeup signal to all threads blocked on this ++ * file descriptor. ++ */ ++ threadEntry_t *curr = fdEntry->threads; ++ while (curr != NULL) { ++ curr->intr = 1; ++ pthread_kill( curr->thr, sigWakeup ); ++ curr = curr->next; ++ } } -+ LEReferenceTo baseRecord(base, success, &baseArray->baseRecordArray[baseCoverage * mcCount]); -+ if( LE_FAILURE(success) ) { return 0; } -+ LEReferenceToArrayOf baseAnchorTableOffsetArray(base, success, &(baseRecord->baseAnchorTableOffsetArray[0]), markClass+1); -- const BaseRecord *baseRecord = &baseArray->baseRecordArray[baseCoverage * mcCount]; -+ if( LE_FAILURE(success) ) { return 0; } - Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]); -- const AnchorTable *anchorTable = (const AnchorTable *) ((char *) baseArray + anchorTableOffset); -- LEPoint baseAnchor, markAdvance, pixels; -- -- if (anchorTableOffset == 0) { -+ if (anchorTableOffset <= 0) { - // this means the table is mal-formed... - glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); - return 0; - } + /* +--- ./jdk/src/solaris/native/java/net/net_util_md.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/net_util_md.c 2014-06-06 19:56:35.000000000 -0700 +@@ -45,6 +45,10 @@ + #endif + #endif -- anchorTable->getAnchor(baseGlyph, fontInstance, baseAnchor); -+ LEReferenceTo anchorTable(baseArray, success, anchorTableOffset); -+ LEPoint baseAnchor, markAdvance, pixels; -+ ++#ifdef __OpenBSD__ ++#include ++#endif + -+ anchorTable->getAnchor(anchorTable, baseGlyph, fontInstance, baseAnchor, success); + #ifdef __solaris__ + #include + #include +@@ -114,9 +118,9 @@ + static jfieldID ni_defaultIndexID; + if (ni_class == NULL) { + jclass c = (*env)->FindClass(env, "java/net/NetworkInterface"); +- CHECK_NULL(c); ++ CHECK_NULL_RETURN(c, 0); + c = (*env)->NewGlobalRef(env, c); +- CHECK_NULL(c); ++ CHECK_NULL_RETURN(c, 0); + ni_defaultIndexID = (*env)->GetStaticFieldID( + env, c, "defaultIndex", "I"); + ni_class = c; +@@ -138,8 +142,7 @@ + * of the parameter is assumed to be an 'int'. If the parameter + * cannot be obtained return -1 + */ +-static int +-getParam(char *driver, char *param) ++int net_getParam(char *driver, char *param) + { + struct strioctl stri; + char buf [64]; +@@ -166,7 +169,7 @@ - fontInstance->getGlyphAdvance(markGlyph, pixels); - fontInstance->pixelsToUnits(pixels, markAdvance); -@@ -109,6 +115,8 @@ - float anchorDiffX = baseAnchor.fX - markAnchor.fX; - float anchorDiffY = baseAnchor.fY - markAnchor.fY; + /* + * Iterative way to find the max value that SO_SNDBUF or SO_RCVBUF +- * for Solaris versions that do not support the ioctl() in getParam(). ++ * for Solaris versions that do not support the ioctl() in net_getParam(). + * Ugly, but only called once (for each sotype). + * + * As an optimisation, we make a guess using the default values for Solaris +@@ -823,7 +826,6 @@ + /* needs work. 1. family 2. clean up him6 etc deallocate memory */ + if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) { + struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)him; +- jbyteArray ipaddress; + jbyte caddr[16]; + jint address; -+ _LETRACE("Offset: (%.2f, %.2f) glyph 0x%X", anchorDiffX, anchorDiffY, markGlyph); -+ - glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); +@@ -844,8 +846,7 @@ + caddr[15] = (address & 0xff); + } + } else { +- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); +- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); ++ getInet6Address_ipaddress(env, iaObj, (char *)caddr); + } + memset((char *)him6, 0, sizeof(struct sockaddr_in6)); + him6->sin6_port = htons(port); +@@ -882,7 +883,7 @@ + */ + if (!cached_scope_id) { + if (ia6_scopeidID) { +- scope_id = (int)(*env)->GetIntField(env,iaObj,ia6_scopeidID); ++ scope_id = getInet6Address_scopeid(env, iaObj); + } + if (scope_id != 0) { + /* check user-specified value for loopback case +@@ -928,7 +929,7 @@ - if (glyphIterator->isRightToLeft()) { -@@ -132,7 +140,6 @@ - gi.next(); + if (family != IPv4) { + if (ia6_scopeidID) { +- him6->sin6_scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_scopeidID); ++ him6->sin6_scope_id = getInet6Address_scopeid(env, iaObj); + } + } + #endif +@@ -1409,7 +1410,7 @@ + * If that fails, we use the search algorithm in findMaxBuf() + */ + if (!init_tcp_max_buf && sotype == SOCK_STREAM) { +- tcp_max_buf = getParam("/dev/tcp", "tcp_max_buf"); ++ tcp_max_buf = net_getParam("/dev/tcp", "tcp_max_buf"); + if (tcp_max_buf == -1) { + tcp_max_buf = findMaxBuf(fd, opt, SOCK_STREAM); + if (tcp_max_buf == -1) { +@@ -1418,7 +1419,7 @@ + } + init_tcp_max_buf = 1; + } else if (!init_udp_max_buf && sotype == SOCK_DGRAM) { +- udp_max_buf = getParam("/dev/udp", "udp_max_buf"); ++ udp_max_buf = net_getParam("/dev/udp", "udp_max_buf"); + if (udp_max_buf == -1) { + udp_max_buf = findMaxBuf(fd, opt, SOCK_DGRAM); + if (udp_max_buf == -1) { +@@ -1515,7 +1516,22 @@ } - // end of JK patch -- - fontInstance->pixelsToUnits(pixels, baseAdvance); - - glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); ---- jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -65,8 +65,11 @@ } - LEPoint markAnchor; -- const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); -- le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); -+ LEReferenceTo markArray(base, success, SWAPW(markArrayOffset)); -+ if( LE_FAILURE(success) ) { -+ return 0; +-#endif ++#ifndef __APPLE__ ++ /* ++ * Don't allow SO_LINGER value to be too big. ++ * Current max value (240) is empiric value based on tcp_timer.h's ++ * constant TCP_LINGERTIME, which was doubled. ++ * ++ * XXXBSD: maybe we should step it down to 120 ? ++ */ ++ if (level == SOL_SOCKET && opt == SO_LINGER) { ++ ling = (struct linger *)arg; ++ if (ling->l_linger > 240 || ling->l_linger < 0) { ++ ling->l_linger = 240; ++ } + } -+ le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); - le_uint16 mcCount = SWAPW(classCount); - - if (markClass < 0 || markClass >= mcCount) { -@@ -79,7 +82,7 @@ - GlyphIterator ligatureIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreBaseGlyphs*/)); - LEGlyphID ligatureGlyph = findLigatureGlyph(&ligatureIterator); - le_int32 ligatureCoverage = getBaseCoverage(base, (LEGlyphID) ligatureGlyph, success); -- const LigatureArray *ligatureArray = (const LigatureArray *) ((char *) this + SWAPW(baseArrayOffset)); -+ LEReferenceTo ligatureArray(base, success, SWAPW(baseArrayOffset)); - le_uint16 ligatureCount = SWAPW(ligatureArray->ligatureCount); ++#endif __APPLE__ ++#endif _ALLBSD_SOURCE - if (ligatureCoverage < 0 || ligatureCoverage >= ligatureCount) { -@@ -91,7 +94,7 @@ + return setsockopt(fd, level, opt, arg, len); + } +--- ./jdk/src/solaris/native/java/net/net_util_md.h 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/net/net_util_md.h 2014-06-06 19:56:34.000000000 -0700 +@@ -37,7 +37,7 @@ + #endif - le_int32 markPosition = glyphIterator->getCurrStreamPosition(); - Offset ligatureAttachOffset = SWAPW(ligatureArray->ligatureAttachTableOffsetArray[ligatureCoverage]); -- const LigatureAttachTable *ligatureAttachTable = (const LigatureAttachTable *) ((char *) ligatureArray + ligatureAttachOffset); -+ LEReferenceTo ligatureAttachTable(ligatureArray, success, ligatureAttachOffset); - le_int32 componentCount = SWAPW(ligatureAttachTable->componentCount); - le_int32 component = ligatureIterator.getMarkComponent(markPosition); -@@ -100,12 +103,14 @@ - component = componentCount - 1; - } +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(MACOSX) + extern int NET_Timeout(int s, long timeout); + extern int NET_Read(int s, void* buf, size_t len); + extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, +@@ -81,6 +81,9 @@ + int getDefaultIPv6Interface(struct in6_addr *target_addr); + #endif -- const ComponentRecord *componentRecord = &ligatureAttachTable->componentRecordArray[component * mcCount]; -+ LEReferenceTo componentRecord(base, success, &ligatureAttachTable->componentRecordArray[component * mcCount]); -+ LEReferenceToArrayOf ligatureAnchorTableOffsetArray(base, success, &(componentRecord->ligatureAnchorTableOffsetArray[0]), markClass+1); -+ if( LE_FAILURE(success) ) { return 0; } - Offset anchorTableOffset = SWAPW(componentRecord->ligatureAnchorTableOffsetArray[markClass]); -- const AnchorTable *anchorTable = (const AnchorTable *) ((char *) ligatureAttachTable + anchorTableOffset); -+ LEReferenceTo anchorTable(ligatureAttachTable, success, anchorTableOffset); - LEPoint ligatureAnchor, markAdvance, pixels; ++#ifdef __solaris__ ++extern int net_getParam(char *driver, char *param); ++#endif -- anchorTable->getAnchor(ligatureGlyph, fontInstance, ligatureAnchor); -+ anchorTable->getAnchor(anchorTable, ligatureGlyph, fontInstance, ligatureAnchor, success); + /* needed from libsocket on Solaris 8 */ - fontInstance->getGlyphAdvance(markGlyph, pixels); - fontInstance->pixelsToUnits(pixels, markAdvance); ---- jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -66,8 +66,11 @@ +--- ./jdk/src/solaris/native/java/util/TimeZone_md.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/java/util/TimeZone_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -123,7 +123,7 @@ + return NULL; } - LEPoint markAnchor; -- const MarkArray *markArray = (const MarkArray *) ((char *) this + SWAPW(markArrayOffset)); -- le_int32 markClass = markArray->getMarkClass(markGlyph, markCoverage, fontInstance, markAnchor); -+ LEReferenceTo markArray(base, success, SWAPW(markArrayOffset)); -+ if(LE_FAILURE(success)) { -+ return 0; -+ } -+ le_int32 markClass = markArray->getMarkClass(markArray, markGlyph, markCoverage, fontInstance, markAnchor, success); - le_uint16 mcCount = SWAPW(classCount); +-#if defined(__linux__) || defined(MACOSX) || (defined(__solaris__) \ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || (defined(__solaris__) \ + && (defined(_POSIX_PTHREAD_SEMANTICS) || defined(_LP64))) + while (readdir_r(dirp, entry, &dp) == 0 && dp != NULL) { + #else +@@ -212,7 +212,7 @@ + return tz; + } - if (markClass < 0 || markClass >= mcCount) { -@@ -79,7 +82,8 @@ - GlyphIterator mark2Iterator(*glyphIterator); - LEGlyphID mark2Glyph = findMark2Glyph(&mark2Iterator); - le_int32 mark2Coverage = getBaseCoverage(base, (LEGlyphID) mark2Glyph, success); -- const Mark2Array *mark2Array = (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset)); -+ LEReferenceTo mark2Array(base, success, (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset))); -+ if(LE_FAILURE(success)) return 0; - le_uint16 mark2Count = SWAPW(mark2Array->mark2RecordCount); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) - if (mark2Coverage < 0 || mark2Coverage >= mark2Count) { -@@ -89,9 +93,11 @@ - return 0; - } + /* + * Performs Linux specific mapping and returns a zone ID +@@ -678,7 +678,7 @@ + * Returns a GMT-offset-based zone ID. (e.g., "GMT-08:00") + */ -- const Mark2Record *mark2Record = &mark2Array->mark2RecordArray[mark2Coverage * mcCount]; -+ LEReferenceTo mark2Record(base, success, &mark2Array->mark2RecordArray[mark2Coverage * mcCount]); -+ if(LE_FAILURE(success)) return 0; - Offset anchorTableOffset = SWAPW(mark2Record->mark2AnchorTableOffsetArray[markClass]); -- const AnchorTable *anchorTable = (const AnchorTable *) ((char *) mark2Array + anchorTableOffset); -+ LEReferenceTo anchorTable(mark2Array, success, anchorTableOffset); -+ if(LE_FAILURE(success)) return 0; - LEPoint mark2Anchor, markAdvance, pixels; +-#ifdef MACOSX ++#ifdef _ALLBSD_SOURCE - if (anchorTableOffset == 0) { -@@ -99,7 +105,7 @@ - return 0; + char * + getGMTOffsetID() +@@ -738,4 +738,4 @@ + sign, (int)(offset/3600), (int)((offset%3600)/60)); + return strdup(buf); + } +-#endif /* MACOSX */ ++#endif /* _ALLBSD_SOURCE */ +--- ./jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -405,7 +405,14 @@ + target = (*env)->GetObjectField(env, peer, mComponentPeerIDs.target); } + #else +- target = (*env)->GetObjectField(env, peer, targetID); ++ if (window != None) { ++ peer = JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XToolkit", ++ "windowToXWindow", "(J)Lsun/awt/X11/XBaseWindow;", (jlong)window).l; ++ } ++ if ((peer != NULL) && ++ (JNU_IsInstanceOfByName(env, peer, "sun/awt/X11/XWindow") == 1)) { ++ target = (*env)->GetObjectField(env, peer, targetID); ++ } + #endif -- anchorTable->getAnchor(mark2Glyph, fontInstance, mark2Anchor); -+ anchorTable->getAnchor(anchorTable, mark2Glyph, fontInstance, mark2Anchor, success); - - fontInstance->getGlyphAdvance(markGlyph, pixels); - fontInstance->pixelsToUnits(pixels, markAdvance); -@@ -107,6 +113,8 @@ - float anchorDiffX = mark2Anchor.fX - markAnchor.fX; - float anchorDiffY = mark2Anchor.fY - markAnchor.fY; - -+ _LETRACE("Offset: (%.2f, %.2f) glyph 0x%X mark2 0x%X", anchorDiffX, anchorDiffY, markGlyph, mark2Glyph); -+ - glyphIterator->setCurrGlyphBaseOffset(mark2Iterator.getCurrStreamPosition()); - - if (glyphIterator->isRightToLeft()) { ---- jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -54,9 +54,10 @@ - // FIXME: is this always the right thing to do? - // FIXME: should this only be done for a non-zero - // glyphCount? -- if (filter != NULL && filter->accept(glyph)) { -+ if (filter != NULL && filter->accept(glyph, success)) { - return 0; + if (target == NULL) { +@@ -414,7 +421,6 @@ + return (jobject)NULL; } -+ if(LE_FAILURE(success)) return 0; - - le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); - le_uint16 seqCount = SWAPW(sequenceCount); -@@ -67,7 +68,7 @@ - - if (coverageIndex >= 0 && coverageIndex < seqCount) { - Offset sequenceTableOffset = SWAPW(sequenceTableOffsetArray[coverageIndex]); -- const SequenceTable *sequenceTable = (const SequenceTable *) ((char *) this + sequenceTableOffset); -+ LEReferenceTo sequenceTable(base, success, sequenceTableOffset); - le_uint16 glyphCount = SWAPW(sequenceTable->glyphCount); - if (glyphCount == 0) { -@@ -76,7 +77,7 @@ - } else if (glyphCount == 1) { - TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[0]); +- + AWT_UNLOCK(); -- if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute))) { -+ if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { - return 0; + return target; +--- ./jdk/src/solaris/native/sun/awt/awt_Font.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_Font.c 2014-06-06 19:56:34.000000000 -0700 +@@ -334,7 +334,7 @@ + if (strcmp(style, "regular") == 0) { + altstyle = "roman"; + } +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (!strcmp(family, "lucidasans")) { + family = "lucida"; } +--- ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2014-06-06 19:56:35.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -123,7 +123,7 @@ + */ -@@ -89,7 +90,7 @@ - for (le_int32 i = 0; i < glyphCount; i += 1) { - TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[i]); + #define MAXFRAMEBUFFERS 16 +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + typedef struct { + int screen_number; + short x_org; +@@ -652,7 +652,7 @@ + #endif /* HEADLESS */ -- if (! filter->accept(substitute)) { -+ if (! filter->accept(substitute, success)) { - return 0; - } - } ---- jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -470,6 +470,7 @@ - void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, - LEGlyphStorage &glyphStorage, LEErrorCode &success) + #ifndef HEADLESS +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static void xinerama_init_linux() { -+ _LETRACE("OTLE::adjustGPOS"); - if (LE_FAILURE(success)) { - return; + void* libHandle = NULL; +@@ -703,7 +703,7 @@ } -@@ -510,14 +511,17 @@ - if (!fGPOSTable.isEmpty()) { - if (fScriptTagV2 != nullScriptTag && - fGPOSTable->coversScriptAndLanguage(fGPOSTable, fScriptTagV2,fLangSysTag,success)) { -+ _LETRACE("OTLE::process [0]"); - fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag, - fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); - - } else { -+ _LETRACE("OTLE::process [1]"); - fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, - fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); - } - } else if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ -+ _LETRACE("OTLE::kerning"); - LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success); - KernTable kt(kernTable, success); - kt.process(glyphStorage, success); -@@ -546,6 +550,7 @@ - - xPlacement = fFontInstance->xUnitsToPoints(xPlacement); - yPlacement = fFontInstance->yUnitsToPoints(yPlacement); -+ _LETRACE("OTLE GPOS: #%d, (%.2f,%.2f)", i, xPlacement, yPlacement); - glyphStorage.adjustPosition(i, xAdjust + xPlacement, -(yAdjust + yPlacement), success); - - xAdjust += fFontInstance->xUnitsToPoints(xAdvance); ---- jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -80,6 +80,7 @@ - Offset OpenTypeUtilities::getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success) + } + #endif +-#if !defined(__linux__) && !defined(MACOSX) /* Solaris */ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* Solaris */ + static void xinerama_init_solaris() { - if(LE_FAILURE(success)) return 0; -+ const TagAndOffsetRecord *r0 = (const TagAndOffsetRecord*)records.getAlias(); - - le_uint32 recordCount = records.getCount(); - le_uint8 bit = highBit(recordCount); -@@ -89,17 +90,17 @@ - le_int32 index = 0; - - { -- const ATag &aTag = records.getAlias(extra,success)->tag; -+ const ATag &aTag = (r0+extra)->tag; - if (SWAPT(aTag) <= tag) { - index = extra; + void* libHandle = NULL; +@@ -763,11 +763,11 @@ } - } - -- while (probe > (1 << 0) && LE_SUCCESS(success)) { -+ while (probe > (1 << 0)) { - probe >>= 1; - - { -- const ATag &aTag = records.getAlias(index+probe,success)->tag; -+ const ATag &aTag = (r0+index+probe)->tag; - if (SWAPT(aTag) <= tag) { - index += probe; - } -@@ -107,9 +108,9 @@ - } - { -- const ATag &aTag = records.getAlias(index,success)->tag; -+ const ATag &aTag = (r0+index)->tag; - if (SWAPT(aTag) == tag) { -- return SWAPW(records.getAlias(index,success)->offset); -+ return SWAPW((r0+index)->offset); - } - } + DTRACE_PRINTLN("Xinerama extension is available"); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + xinerama_init_linux(); + #else /* Solaris */ + xinerama_init_solaris(); +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + } + #endif /* HEADLESS */ ---- jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h 2014-04-20 12:39:16.000000000 -0700 -@@ -46,15 +46,14 @@ - public: - static le_int8 highBit(le_int32 value); - static Offset getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success); -- /** -- * @deprecated TODO remove -- */ -+#if LE_ENABLE_RAW - static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount) { - LEErrorCode success = LE_NO_ERROR; - LETableReference recordRef0((const le_uint8*)records); - LEReferenceToArrayOf recordRef(recordRef0, success, (size_t)0, recordCount); - return getGlyphRangeIndex(glyphID, recordRef, success); +@@ -830,6 +830,8 @@ } -+#endif - static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf &records, LEErrorCode &success); - static le_int32 search(le_uint16 value, const le_uint16 array[], le_int32 count); - static le_int32 search(le_uint32 value, const le_uint32 array[], le_int32 count); ---- jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -76,19 +76,17 @@ - { - LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); -- -- if (LE_FAILURE(success)) { -- return 0; -- } - GlyphIterator tempIterator(*glyphIterator); - -- if (coverageIndex >= 0 && glyphIterator->next()) { -+ LEReferenceToArrayOf pairSetTableOffsetArrayRef(base, success, pairSetTableOffsetArray, SWAPW(pairSetCount)); -+ -+ if (LE_SUCCESS(success) && coverageIndex >= 0 && glyphIterator->next() && (le_uint32)coverageIndex < pairSetTableOffsetArrayRef.getCount()) { - Offset pairSetTableOffset = SWAPW(pairSetTableOffsetArray[coverageIndex]); -- LEReferenceTo pairSetTable(base, success, ((char *) this + pairSetTableOffset)); -- if (LE_FAILURE(success)) { -- return 0; -- } -+ LEReferenceTo pairSetTable(base, success, pairSetTableOffset); -+ if( LE_FAILURE(success) ) return 0; - le_uint16 pairValueCount = SWAPW(pairSetTable->pairValueCount); -+ LEReferenceTo pairValueRecordArray(pairSetTable, success, pairSetTable->pairValueRecordArray); -+ if( LE_FAILURE(success) ) return 0; - le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); - le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); - le_int16 recordSize = sizeof(PairValueRecord) - sizeof(ValueRecord) + valueRecord1Size + valueRecord2Size; -@@ -96,21 +94,22 @@ - LEReferenceTo pairValueRecord; - - if (pairValueCount != 0) { -- pairValueRecord = findPairValueRecord(base, (TTGlyphID) LE_GET_GLYPH(secondGlyph), pairSetTable->pairValueRecordArray, pairValueCount, recordSize, success); -+ pairValueRecord = findPairValueRecord((TTGlyphID) LE_GET_GLYPH(secondGlyph), pairValueRecordArray, pairValueCount, recordSize, success); - } -- if (pairValueRecord.isEmpty()) { -+ if (pairValueRecord.isEmpty() || LE_FAILURE(success)) { - return 0; - } + XSetIOErrorHandler(xioerror_handler); ++ JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XErrorHandlerUtil", "init", "(J)V", ++ ptr_to_jlong(awt_display)); - if (valueFormat1 != 0) { -- pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); -+ pairValueRecord->valueRecord1.adjustPosition(SWAPW(valueFormat1), base, tempIterator, fontInstance, success); - } + /* set awt_numScreens, and whether or not we're using Xinerama */ + xineramaInit(); +@@ -978,16 +980,11 @@ + static jint canUseShmExtPixmaps = UNSET_MITSHM; + static jboolean xshmAttachFailed = JNI_FALSE; - if (valueFormat2 != 0) { -- const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size); +-extern int mitShmPermissionMask; - -- valueRecord2->adjustPosition(SWAPW(valueFormat2), (char *) this, *glyphIterator, fontInstance); -+ LEReferenceTo valueRecord2(base, success, ((char *) &pairValueRecord->valueRecord1 + valueRecord1Size)); -+ if(LE_SUCCESS(success)) { -+ valueRecord2->adjustPosition(SWAPW(valueFormat2), base, *glyphIterator, fontInstance, success); -+ } - } - - // back up glyphIterator so second glyph can be -@@ -135,26 +134,28 @@ +-int J2DXErrHandler(Display *display, XErrorEvent *xerr) { +- int ret = 0; ++int XShmAttachXErrHandler(Display *display, XErrorEvent *xerr) { + if (xerr->minor_code == X_ShmAttach) { + xshmAttachFailed = JNI_TRUE; +- } else { +- ret = (*xerror_saved_handler)(display, xerr); + } +- return ret; ++ return 0; + } + jboolean isXShmAttachFailed() { + return xshmAttachFailed; +@@ -996,6 +993,8 @@ + xshmAttachFailed = JNI_FALSE; + } - if (coverageIndex >= 0 && glyphIterator->next()) { - LEGlyphID secondGlyph = glyphIterator->getCurrGlyphID(); -- const ClassDefinitionTable *classDef1 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef1Offset)); -- const ClassDefinitionTable *classDef2 = (const ClassDefinitionTable *) ((char *) this + SWAPW(classDef2Offset)); -- le_int32 class1 = classDef1->getGlyphClass(firstGlyph); -- le_int32 class2 = classDef2->getGlyphClass(secondGlyph); -+ const LEReferenceTo classDef1(base, success, SWAPW(classDef1Offset)); -+ const LEReferenceTo classDef2(base, success, SWAPW(classDef2Offset)); -+ le_int32 class1 = classDef1->getGlyphClass(classDef1, firstGlyph, success); -+ le_int32 class2 = classDef2->getGlyphClass(classDef2, secondGlyph, success); - le_int16 valueRecord1Size = ValueRecord::getSize(SWAPW(valueFormat1)); - le_int16 valueRecord2Size = ValueRecord::getSize(SWAPW(valueFormat2)); - le_int16 class2RecordSize = valueRecord1Size + valueRecord2Size; - le_int16 class1RecordSize = class2RecordSize * SWAPW(class2Count); -- const Class1Record *class1Record = (const Class1Record *) ((char *) class1RecordArray + (class1RecordSize * class1)); -- const Class2Record *class2Record = (const Class2Record *) ((char *) class1Record->class2RecordArray + (class2RecordSize * class2)); -- -+ const LEReferenceTo class1Record(base, success, (const Class1Record *) ((char *) class1RecordArray + (class1RecordSize * class1))); -+ const LEReferenceTo class2Record(base, success, (const Class2Record *) ((char *) class1Record->class2RecordArray + (class2RecordSize * class2))); ++extern int mitShmPermissionMask; ++ + void TryInitMITShm(JNIEnv *env, jint *shmExt, jint *shmPixmaps) { + XShmSegmentInfo shminfo; + int XShmMajor, XShmMinor; +@@ -1043,7 +1042,7 @@ + * The J2DXErrHandler handler will set xshmAttachFailed + * to JNI_TRUE if any Shm error has occured. + */ +- EXEC_WITH_XERROR_HANDLER(J2DXErrHandler, ++ EXEC_WITH_XERROR_HANDLER(XShmAttachXErrHandler, + XShmAttach(awt_display, &shminfo)); -+ if( LE_SUCCESS(success) ) { - if (valueFormat1 != 0) { -- class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), (char *) this, tempIterator, fontInstance); -+ class2Record->valueRecord1.adjustPosition(SWAPW(valueFormat1), base, tempIterator, fontInstance, success); - } -- - if (valueFormat2 != 0) { -- const ValueRecord *valueRecord2 = (const ValueRecord *) ((char *) &class2Record->valueRecord1 + valueRecord1Size); -- -- valueRecord2->adjustPosition(SWAPW(valueFormat2), (const char *) this, *glyphIterator, fontInstance); -+ const LEReferenceTo valueRecord2(base, success, ((char *) &class2Record->valueRecord1) + valueRecord1Size); -+ LEReferenceTo thisRef(base, success, this); -+ if(LE_SUCCESS(success)) { -+ valueRecord2->adjustPosition(SWAPW(valueFormat2), thisRef, *glyphIterator, fontInstance, success); -+ } -+ } - } + /** +@@ -1645,7 +1644,7 @@ + { + jobject point = NULL; + #ifndef HEADLESS /* return NULL in HEADLESS, Linux */ +-#if !defined(__linux__) && !defined(MACOSX) ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + int x,y; - // back up glyphIterator so second glyph can be -@@ -166,23 +167,24 @@ - return 0; + AWT_LOCK(); +@@ -1658,7 +1657,7 @@ + DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null"); + } + AWT_FLUSH_UNLOCK(); +-#endif /* __linux __ || MACOSX */ ++#endif /* __linux __ || _ALLBSD_SOURCE */ + #endif /* HEADLESS */ + return point; } +--- ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.h 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.h 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +--- ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2014-06-06 19:56:34.000000000 -0700 +@@ -67,7 +67,7 @@ + XIMPreeditDrawCallbackStruct *); + static void PreeditCaretCallback(XIC, XPointer, + XIMPreeditCaretCallbackStruct *); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static void StatusStartCallback(XIC, XPointer, XPointer); + static void StatusDoneCallback(XIC, XPointer, XPointer); + static void StatusDrawCallback(XIC, XPointer, +@@ -81,7 +81,7 @@ + #define PreeditDoneIndex 1 + #define PreeditDrawIndex 2 + #define PreeditCaretIndex 3 +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #define StatusStartIndex 4 + #define StatusDoneIndex 5 + #define StatusDrawIndex 6 +@@ -99,14 +99,14 @@ + (XIMProc)PreeditDoneCallback, + (XIMProc)PreeditDrawCallback, + (XIMProc)PreeditCaretCallback, +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + (XIMProc)StatusStartCallback, + (XIMProc)StatusDoneCallback, + (XIMProc)StatusDrawCallback, + #endif + }; --LEReferenceTo PairPositioningFormat1Subtable::findPairValueRecord(const LETableReference &base, TTGlyphID glyphID, const PairValueRecord *records, le_uint16 recordCount, le_uint16 recordSize, LEErrorCode &success) const -+LEReferenceTo -+PairPositioningFormat1Subtable::findPairValueRecord(TTGlyphID glyphID, LEReferenceTo& records, -+ le_uint16 recordCount, -+ le_uint16 recordSize, LEErrorCode &success) const +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #define MAX_STATUS_LEN 100 + typedef struct { + Window w; /*status window id */ +@@ -146,7 +146,7 @@ + #endif /* XAWT */ + jobject x11inputmethod; /* global ref to X11InputMethod instance */ + /* associated with the XIC */ +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + StatusWindow *statusWindow; /* our own status window */ + #else + #ifndef XAWT +@@ -425,7 +425,7 @@ + static void + freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData) { - #if 1 - // The OpenType spec. says that the ValueRecord table is - // sorted by secondGlyph. Unfortunately, there are fonts - // around that have an unsorted ValueRecord table. -- LEReferenceTo record(base, success, records); -- record.verifyLength(0, recordSize, success); -+ LEReferenceTo record(records); - - for(le_int32 r = 0; r < recordCount; r += 1) { -- if (LE_FAILURE(success)) return (const PairValueRecord*)NULL; -+ if(LE_FAILURE(success)) return LEReferenceTo(); - if (SWAPW(record->secondGlyph) == glyphID) { - return record; - } +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (pX11IMData->statusWindow != NULL){ + StatusWindow *sw = pX11IMData->statusWindow; + XFreeGC(awt_display, sw->lightGC); +@@ -531,7 +531,7 @@ + pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance); -- record = LEReferenceTo(base, success, ((const char*)record.getAlias())+ recordSize); -- record.verifyLength(0, recordSize, success); -+ record.addOffset(recordSize, success); - } + if (pX11IMData == NULL) { +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + return False; #else - #error dead code - not updated. -@@ -211,7 +213,7 @@ + return result; +@@ -539,7 +539,7 @@ } - #endif -- return (const PairValueRecord*)NULL; -+ return LEReferenceTo(); + if ((ic = pX11IMData->current_ic) == (XIC)0){ +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + return False; + #else + return result; +@@ -648,7 +648,7 @@ + return result; } - U_NAMESPACE_END ---- jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h 2014-04-20 12:39:16.000000000 -0700 -@@ -77,9 +77,8 @@ - le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; - - private: -- LEReferenceTo findPairValueRecord(const LETableReference &base, TTGlyphID glyphID, const PairValueRecord *records, -+ LEReferenceTo findPairValueRecord(TTGlyphID glyphID, LEReferenceTo &records, - le_uint16 recordCount, le_uint16 recordSize, LEErrorCode &success) const; -- - }; - LE_VAR_ARRAY(PairPositioningFormat1Subtable, pairSetTableOffsetArray) - ---- jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -106,7 +106,8 @@ +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static StatusWindow *createStatusWindow( + #ifdef XAWT + Window parent) { +@@ -993,7 +993,7 @@ } - } else { - LEReferenceToArrayOf scriptRecordArrayRef(base, success, &scriptRecordArray[0], count); -- scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); // TODO -+ -+ scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); + } + } +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + /* + * Creates two XICs, one for active clients and the other for passive + * clients. All information on those XICs are stored in the +@@ -1050,7 +1050,7 @@ + return FALSE ; } - if (scriptTableOffset != 0) { ---- jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -126,13 +126,13 @@ - linaScriptTag, /* 'lina' (LINA) */ - mandScriptTag, /* 'mand' (MANDAIC) */ - mayaScriptTag, /* 'maya' (MAYA) */ -- meroScriptTag, /* 'mero' (MERO) */ -+ meroScriptTag, /* 'mero' (MEROITIC_HIEROGLYPHS) */ - nkooScriptTag, /* 'nko ' (NKO) */ - orkhScriptTag, /* 'orkh' (OLD_TURKIC) */ - permScriptTag, /* 'perm' (PERM) */ - phagScriptTag, /* 'phag' (PHAGS_PA) */ - phnxScriptTag, /* 'phnx' (PHOENICIAN) */ -- plrdScriptTag, /* 'plrd' (PLRD) */ -+ plrdScriptTag, /* 'plrd' (MIAO/POLLARD) */ - roroScriptTag, /* 'roro' (RORO) */ - saraScriptTag, /* 'sara' (SARA) */ - syreScriptTag, /* 'syre' (SYRE) */ -@@ -158,7 +158,7 @@ - mteiScriptTag, /* 'mtei' (MEETEI_MAYEK) */ - armiScriptTag, /* 'armi' (IMPERIAL_ARAMAIC) */ - avstScriptTag, /* 'avst' (AVESTAN) */ -- cakmScriptTag, /* 'cakm' (CAKM) */ -+ cakmScriptTag, /* 'cakm' (CHAKMA) */ - koreScriptTag, /* 'kore' (KORE) */ - kthiScriptTag, /* 'kthi' (KAITHI) */ - maniScriptTag, /* 'mani' (MANI) */ -@@ -181,7 +181,7 @@ - kpelScriptTag, /* 'kpel' (KPEL) */ - lomaScriptTag, /* 'loma' (LOMA) */ - mendScriptTag, /* 'mend' (MEND) */ -- mercScriptTag, /* 'merc' (MERC) */ -+ mercScriptTag, /* 'merc' (MEROITIC_CURSIVE) */ - narbScriptTag, /* 'narb' (NARB) */ - nbatScriptTag, /* 'nbat' (NBAT) */ - palmScriptTag, /* 'palm' (PALM) */ ---- jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h 2014-04-20 12:39:16.000000000 -0700 -@@ -140,13 +140,13 @@ - const LETag linaScriptTag = 0x6C696E61; /* 'lina' (LINA) */ - const LETag mandScriptTag = 0x6D616E64; /* 'mand' (MANDAIC) */ - const LETag mayaScriptTag = 0x6D617961; /* 'maya' (MAYA) */ --const LETag meroScriptTag = 0x6D65726F; /* 'mero' (MERO) */ -+const LETag meroScriptTag = 0x6D65726F; /* 'mero' (MEROITIC_HIEROGLYPHS) */ - const LETag nkooScriptTag = 0x6E6B6F20; /* 'nko ' (NKO) */ - const LETag orkhScriptTag = 0x6F726B68; /* 'orkh' (OLD_TURKIC) */ - const LETag permScriptTag = 0x7065726D; /* 'perm' (PERM) */ - const LETag phagScriptTag = 0x70686167; /* 'phag' (PHAGS_PA) */ - const LETag phnxScriptTag = 0x70686E78; /* 'phnx' (PHOENICIAN) */ --const LETag plrdScriptTag = 0x706C7264; /* 'plrd' (PLRD) */ -+const LETag plrdScriptTag = 0x706C7264; /* 'plrd' (MIAO) */ - const LETag roroScriptTag = 0x726F726F; /* 'roro' (RORO) */ - const LETag saraScriptTag = 0x73617261; /* 'sara' (SARA) */ - const LETag syreScriptTag = 0x73797265; /* 'syre' (SYRE) */ -@@ -172,7 +172,7 @@ - const LETag mteiScriptTag = 0x6D746569; /* 'mtei' (MEETEI_MAYEK) */ - const LETag armiScriptTag = 0x61726D69; /* 'armi' (IMPERIAL_ARAMAIC) */ - const LETag avstScriptTag = 0x61767374; /* 'avst' (AVESTAN) */ --const LETag cakmScriptTag = 0x63616B6D; /* 'cakm' (CAKM) */ -+const LETag cakmScriptTag = 0x63616B6D; /* 'cakm' (CHAKMA) */ - const LETag koreScriptTag = 0x6B6F7265; /* 'kore' (KORE) */ - const LETag kthiScriptTag = 0x6B746869; /* 'kthi' (KAITHI) */ - const LETag maniScriptTag = 0x6D616E69; /* 'mani' (MANI) */ -@@ -195,7 +195,7 @@ - const LETag kpelScriptTag = 0x6B70656C; /* 'kpel' (KPEL) */ - const LETag lomaScriptTag = 0x6C6F6D61; /* 'loma' (LOMA) */ - const LETag mendScriptTag = 0x6D656E64; /* 'mend' (MEND) */ --const LETag mercScriptTag = 0x6D657263; /* 'merc' (MERC) */ -+const LETag mercScriptTag = 0x6D657263; /* 'merc' (MEROITIC_CURSIVE) */ - const LETag narbScriptTag = 0x6E617262; /* 'narb' (NARB) */ - const LETag nbatScriptTag = 0x6E626174; /* 'nbat' (NBAT) */ - const LETag palmScriptTag = 0x70616C6D; /* 'palm' (PALM) */ ---- jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -73,6 +73,7 @@ - - if (offset != 0) { - LEReferenceToArrayOf glyphArray(subtableHeader, success, offset, LE_UNBOUNDED_ARRAY); -+ if (LE_FAILURE(success)) { continue; } - TTGlyphID newGlyph = SWAPW(glyphArray(LE_GET_GLYPH(thisGlyph) - firstGlyph, success)); - glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); - } ---- jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -65,16 +65,17 @@ - - for (glyph = 0; glyph < glyphCount; glyph += 1) { - LEGlyphID thisGlyph = glyphStorage[glyph]; -+ // lookupSegment already range checked by lookupSegment() function. - const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + on_the_spot_styles |= XIMStatusNothing; -- if (lookupSegment != NULL) { -+ if (lookupSegment != NULL&& LE_SUCCESS(success)) { - TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph); -+ TTGlyphID lastGlyph = SWAPW(lookupSegment->lastGlyph); - le_int16 offset = SWAPW(lookupSegment->value); -- -- if (offset != 0) { -- TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader.getAliasTODO() + offset); -- TTGlyphID newGlyph = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]); -- -+ TTGlyphID thisGlyphId= LE_GET_GLYPH(thisGlyph); -+ LEReferenceToArrayOf glyphArray(subtableHeader, success, offset, lastGlyph - firstGlyph + 1); -+ if (offset != 0 && thisGlyphId <= lastGlyph && thisGlyphId >= firstGlyph && LE_SUCCESS(success) ) { -+ TTGlyphID newGlyph = SWAPW(glyphArray[thisGlyphId]); - glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); - } + /*kinput does not support XIMPreeditCallbacks and XIMStatusArea +@@ -1063,7 +1063,7 @@ + break; } ---- jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -75,7 +75,7 @@ } +-#else /*! __linux__ && !MACOSX */ ++#else /*! __linux__ && !_ALLBSD_SOURCE */ + #ifdef XAWT + on_the_spot_styles |= XIMStatusNothing; + #else /* !XAWT */ +@@ -1086,7 +1086,7 @@ + on_the_spot_styles |= XIMStatusNothing; - if (coverageIndex >= 0) { -- valueRecord.adjustPosition(SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); -+ valueRecord.adjustPosition(SWAPW(valueFormat), base, *glyphIterator, fontInstance, success); + #endif /* XAWT */ +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ - return 1; - } -@@ -92,7 +92,7 @@ - } + for (i = 0; i < im_styles->count_styles; i++) { + active_styles |= im_styles->supported_styles[i] & on_the_spot_styles; +@@ -1134,7 +1134,7 @@ + NULL); + if (preedit == (XVaNestedList)NULL) + goto err; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /*always try XIMStatusCallbacks for active client...*/ + { + status = (XVaNestedList)XVaCreateNestedList(0, +@@ -1156,7 +1156,7 @@ + XFree((void *)status); + XFree((void *)preedit); + } +-#else /* !__linux__ && !MACOSX */ ++#else /* !__linux__ && !_ALLBSD_SOURCE */ + #ifndef XAWT + if (on_the_spot_styles & XIMStatusArea) { + Widget parent; +@@ -1184,7 +1184,7 @@ + } + #endif /* XAWT */ + XFree((void *)preedit); +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + pX11IMData->ic_passive = XCreateIC(X11im, + XNClientWindow, w, + XNFocusWindow, w, +@@ -1343,7 +1343,7 @@ - if (coverageIndex >= 0) { -- valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); -+ valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), base, *glyphIterator, fontInstance, success); + } - return 1; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + static void + StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data) + { +@@ -1411,7 +1411,7 @@ + finally: + AWT_UNLOCK(); + } +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + + static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) { + JNIEnv *env = GetJNIEnv(); +@@ -1517,14 +1517,14 @@ + /* Use IMInstantiate call back only on Linux, as there is a bug in Solaris + (4768335) + */ +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL, + NULL, (XIDProc)OpenXIMCallback, NULL); + if (!registered) { + /* directly call openXIM callback */ + #endif + OpenXIMCallback(dpy, NULL, NULL); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) } ---- jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -76,7 +76,7 @@ - if (coverageIndex >= 0) { - TTGlyphID substitute = ((TTGlyphID) LE_GET_GLYPH(glyph)) + SWAPW(deltaGlyphID); + #endif -- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) { -+ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { - glyphIterator->setCurrGlyphID(substitute); - } +@@ -1588,13 +1588,13 @@ + #endif /* XAWT */ + globalRef = (*env)->NewGlobalRef(env, this); + pX11IMData->x11inputmethod = globalRef; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + pX11IMData->statusWindow = NULL; +-#else /* !__linux__ && !MACOSX */ ++#else /* !__linux__ && !_ALLBSD_SOURCE */ + #ifndef XAWT + pX11IMData->statusWidget = (Widget) NULL; + #endif /* XAWT */ +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ -@@ -97,7 +97,7 @@ - if (coverageIndex >= 0) { - TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]); + pX11IMData->lookup_buf = 0; + pX11IMData->lookup_buf_len = 0; +@@ -1741,14 +1741,14 @@ + setXICFocus(pX11IMData->current_ic, req); + currentX11InputMethodInstance = pX11IMData->x11inputmethod; + currentFocusWindow = w; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on) + onoffStatusWindow(pX11IMData, w, True); + #endif + } else { + currentX11InputMethodInstance = NULL; + currentFocusWindow = 0; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + onoffStatusWindow(pX11IMData, 0, False); + if (pX11IMData->current_ic != NULL) + #endif +@@ -1765,7 +1765,7 @@ + Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env, + jobject this) + { +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + X11InputMethodData *pX11IMData; + StatusWindow *statusWindow; -- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute))) { -+ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { - glyphIterator->setCurrGlyphID(substitute); - } +@@ -1862,7 +1862,7 @@ + X11InputMethodData *pX11IMData; + XVaNestedList status; ---- jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -97,6 +97,7 @@ +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /*do nothing for linux? */ + #else + AWT_LOCK(); +@@ -1968,7 +1968,7 @@ + JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow + (JNIEnv *env, jobject this, jlong window) + { +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + AWT_LOCK(); + adjustStatusWindow(window); + AWT_UNLOCK(); +--- ./jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2014-06-06 19:56:34.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -96,7 +96,7 @@ + jvm = vm; - LEReferenceToArrayOf stateArray(stHeader, success, currentState, LE_UNBOUNDED_ARRAY); - EntryTableIndex entryTableIndex = stateArray.getObject((le_uint8)classCode, success); -+ if (LE_FAILURE(success)) { break; } - LE_STATE_PATIENCE_CURR(le_int32, currGlyph); - currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); - LE_STATE_PATIENCE_INCR(currGlyph); ---- jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/SunLayoutEngine.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -104,6 +104,10 @@ + /* Get address of this library and the directory containing it. */ +- dladdr((void *)JNI_OnLoad, &dlinfo); ++ dladdr((void *)AWT_OnLoad, &dlinfo); + realpath((char *)dlinfo.dli_fname, buf); + len = strlen(buf); + p = strrchr(buf, '/'); +--- ./jdk/src/solaris/native/sun/awt/awt_Robot.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_Robot.c 2014-06-06 19:56:34.000000000 -0700 +@@ -46,7 +46,7 @@ + #include "wsutils.h" + #include "list.h" + #include "multiVis.h" +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif - int putGV(JNIEnv* env, jint gmask, jint baseIndex, jobject gvdata, const LayoutEngine* engine, int glyphCount) { - int count = env->GetIntField(gvdata, gvdCountFID); -+ if (count < 0) { -+ JNU_ThrowInternalError(env, "count negative"); -+ return 0; -+ } +--- ./jdk/src/solaris/native/sun/awt/awt_util.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_util.c 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,16 +58,14 @@ + #include "java_awt_event_MouseWheelEvent.h" - jarray glyphArray = (jarray)env->GetObjectField(gvdata, gvdGlyphsFID); - if (IS_NULL(glyphArray)) { ---- jdk/src/share/native/sun/font/layout/TibetanReordering.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/TibetanReordering.h 2014-04-20 12:39:16.000000000 -0700 -@@ -39,7 +39,7 @@ + /* +- * Since X reports protocol errors asynchronously, we often need to +- * install an error handler that acts like a callback. While that +- * specialized handler is installed we save original handler here. ++ * Called by "ToolkitErrorHandler" function in "XlibWrapper.c" file. */ +-XErrorHandler xerror_saved_handler; ++XErrorHandler current_native_xerror_handler = NULL; - #ifndef __TIBETANREORDERING_H --#define __TIBETANORDERING_H -+#define __TIBETANREORDERING_H + /* + * A place for error handler to report the error code. + */ +-unsigned char xerror_code; ++unsigned char xerror_code = Success; - /** - * \file ---- jdk/src/share/native/sun/font/layout/ValueRecords.cpp 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ValueRecords.cpp 2014-04-20 12:39:16.000000000 -0700 -@@ -59,8 +59,8 @@ - return SWAPW(value); - } + extern jint getModifiers(uint32_t state, jint button, jint keyCode); + extern jint getButton(uint32_t button); +--- ./jdk/src/solaris/native/sun/awt/awt_util.h 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_util.h 2014-06-06 19:56:35.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -82,7 +82,7 @@ + #define WITH_XERROR_HANDLER(f) do { \ + XSync(awt_display, False); \ + xerror_code = Success; \ +- xerror_saved_handler = XSetErrorHandler(f); \ ++ current_native_xerror_handler = (f); \ + } while (0) + + /* Convenience macro for handlers to use */ +@@ -92,7 +92,7 @@ --void ValueRecord::adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, -- const LEFontInstance *fontInstance) const -+void ValueRecord::adjustPosition(ValueFormat valueFormat, const LETableReference& base, GlyphIterator &glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode &success) const - { - float xPlacementAdjustment = 0; - float yPlacementAdjustment = 0; -@@ -118,8 +118,8 @@ - Offset dtOffset = getFieldValue(valueFormat, vrfXPlaDevice); + #define RESTORE_XERROR_HANDLER do { \ + XSync(awt_display, False); \ +- XSetErrorHandler(xerror_saved_handler); \ ++ current_native_xerror_handler = NULL; \ + } while (0) - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 xAdj = dt->getAdjustment(xppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); + #define EXEC_WITH_XERROR_HANDLER(f, code) do { \ +@@ -104,11 +104,9 @@ + } while (0) - xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj); - } -@@ -129,8 +129,8 @@ - Offset dtOffset = getFieldValue(valueFormat, vrfYPlaDevice); + /* +- * Since X reports protocol errors asynchronously, we often need to +- * install an error handler that acts like a callback. While that +- * specialized handler is installed we save original handler here. ++ * Called by "ToolkitErrorHandler" function in "XlibWrapper.c" file. + */ +-extern XErrorHandler xerror_saved_handler; ++extern XErrorHandler current_native_xerror_handler; - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 yAdj = dt->getAdjustment(yppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); + /* + * A place for error handler to report the error code. +@@ -187,7 +185,7 @@ + #ifdef __solaris__ + extern Widget awt_util_getXICStatusAreaWindow(Widget w); + #else +-#if defined(MACOSX) ++#if defined(_ALLBSD_SOURCE) + int32_t awt_util_getIMStatusHeight(Widget vw); + Widget awt_util_getXICStatusAreaWindow(Widget w); + #else +@@ -200,7 +198,7 @@ - yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj); - } -@@ -140,8 +140,8 @@ - Offset dtOffset = getFieldValue(valueFormat, vrfXAdvDevice); - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 xAdj = dt->getAdjustment(xppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); - xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj); - } -@@ -151,8 +151,8 @@ - Offset dtOffset = getFieldValue(valueFormat, vrfYAdvDevice); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + typedef struct _XmImRefRec { + Cardinal num_refs; /* Number of referencing widgets. */ + Cardinal max_refs; /* Maximum length of refs array. */ +--- ./jdk/src/solaris/native/sun/awt/awt_wm.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_wm.c 2014-06-06 19:56:35.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -121,12 +121,19 @@ + static Atom XA_KWM_WIN_MAXIMIZED; - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 yAdj = dt->getAdjustment(yppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); + /* OpenLook */ ++static Atom _XA_OL_DECOR_ADD; + static Atom _XA_OL_DECOR_DEL; + static Atom _XA_OL_DECOR_HEADER; + static Atom _XA_OL_DECOR_RESIZE; + static Atom _XA_OL_DECOR_PIN; + static Atom _XA_OL_DECOR_CLOSE; + ++/* AfterStep */ ++static Atom _XA_AS_STYLE; ++ ++/* WindowMaker */ ++static Atom _XA_WINDOWMAKER_STATE; ++ + /* For _NET_WM_STATE ClientMessage requests */ + #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ + #define _NET_WM_STATE_ADD 1 /* add/set property */ +@@ -193,7 +200,12 @@ + { &_XA_OL_DECOR_HEADER, "_OL_DECOR_HEADER" }, + { &_XA_OL_DECOR_RESIZE, "_OL_DECOR_RESIZE" }, + { &_XA_OL_DECOR_PIN, "_OL_DECOR_PIN" }, +- { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" } ++ { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" }, ++ { &_XA_OL_DECOR_ADD, "_OL_DECOR_ADD" }, ++ ++ { &_XA_AS_STYLE, "_XA_AS_STYLE" }, ++ ++ { &_XA_WINDOWMAKER_STATE, "_XA_WINDOWMAKER_STATE" } + }; + #define ATOM_LIST_LENGTH (sizeof(atom_list)/sizeof(atom_list[0])) - yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); - } -@@ -163,8 +163,8 @@ - xPlacementAdjustment, yPlacementAdjustment, xAdvanceAdjustment, yAdvanceAdjustment); +@@ -382,14 +394,10 @@ + XERROR_SAVE(err); + if (err->error_code == BadWindow) { + DTRACE_PRINTLN("IGNORING BadWindow"); +- return 0; /* ok to fail */ +- } +- else { +- return (*xerror_saved_handler)(dpy, err); + } ++ return 0; /* ok to fail */ } --void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, -- const LEFontInstance *fontInstance) const -+void ValueRecord::adjustPosition(le_int16 index, ValueFormat valueFormat, const LETableReference& base, GlyphIterator &glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode &success) const - { - float xPlacementAdjustment = 0; - float yPlacementAdjustment = 0; -@@ -222,8 +222,8 @@ - Offset dtOffset = getFieldValue(index, valueFormat, vrfXPlaDevice); - - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 xAdj = dt->getAdjustment(xppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); - - xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj); - } -@@ -233,8 +233,8 @@ - Offset dtOffset = getFieldValue(index, valueFormat, vrfYPlaDevice); +- + /* + * Convenience wrapper for XGetWindowProperty for XA_ATOM properties. + * E.g. WM_PROTOCOLS, _NET_WM_STATE, _OL_DECOR_DEL. +@@ -942,6 +950,39 @@ + return True; + } - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 yAdj = dt->getAdjustment(yppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); ++/* ++ * Window Maker. ++ */ ++static Boolean ++awt_wm_isWindowmaker() ++{ ++ if (awt_wm_atomInterned(&_XA_WINDOWMAKER_STATE, "_WINDOWMAKER_STATE")) ++ return True; ++ return False; ++} ++ ++/* ++ * Afterstep. ++ */ ++static Boolean ++awt_wm_isAfterstep() ++{ ++ if (awt_wm_atomInterned(&_XA_AS_STYLE, "_AS_STYLE")) ++ return True; ++ return False; ++} ++ ++/* ++ * FVWM 2. ++ */ ++static Boolean ++awt_wm_isFvwm2() ++{ ++ if (awt_wm_atomInterned(&_XA_OL_DECOR_ADD, "_OL_DECOR_ADD") ++ && !awt_wm_atomInterned(&_XA_OL_DECOR_PIN, "_OL_DECOR_PIN")) ++ return True; ++ return False; ++} - yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj); - } -@@ -244,8 +244,8 @@ - Offset dtOffset = getFieldValue(index, valueFormat, vrfXAdvDevice); + static Boolean + awt_wm_isNetWMName(char *name) +@@ -1011,7 +1052,6 @@ + return awt_wm_isNetWMName("Metacity"); + } - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 xAdj = dt->getAdjustment(xppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 xAdj = dt->getAdjustment(dt, xppem, success); +- + /* + * Temporary error handler that ensures that we know if + * XChangeProperty succeeded or not. +@@ -1020,15 +1060,10 @@ + xerror_verify_change_property(Display *dpy, XErrorEvent *err) + { + XERROR_SAVE(err); +- if (err->request_code == X_ChangeProperty) { +- return 0; +- } +- else { +- return (*xerror_saved_handler)(dpy, err); +- } ++ if (err->request_code == X_ChangeProperty) { } ++ return 0; + } - xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj); - } -@@ -255,8 +255,8 @@ - Offset dtOffset = getFieldValue(index, valueFormat, vrfYAdvDevice); +- + /* + * Prepare IceWM check. + * +@@ -1159,8 +1194,6 @@ + return True; + } - if (dtOffset != 0) { -- const DeviceTable *dt = (const DeviceTable *) (base + dtOffset); -- le_int16 yAdj = dt->getAdjustment(yppem); -+ LEReferenceTo dt(base, success, dtOffset); -+ le_int16 yAdj = dt->getAdjustment(dt, yppem, success); +- +- + static Boolean winmgr_running = False; - yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj); - } ---- jdk/src/share/native/sun/font/layout/ValueRecords.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/font/layout/ValueRecords.h 2014-04-20 12:39:16.000000000 -0700 -@@ -53,10 +53,10 @@ + /* +@@ -1176,14 +1209,10 @@ + { + DTRACE_PRINTLN("some WM is running (hmm, we'll see)"); + winmgr_running = True; +- return 0; +- } +- else { +- return (*xerror_saved_handler)(dpy, err); + } ++ return 0; + } - le_int16 getFieldValue(ValueFormat valueFormat, ValueRecordField field) const; - le_int16 getFieldValue(le_int16 index, ValueFormat valueFormat, ValueRecordField field) const; -- void adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, -- const LEFontInstance *fontInstance) const; -- void adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, -- const LEFontInstance *fontInstance) const; -+ void adjustPosition(ValueFormat valueFormat, const LETableReference &base, GlyphIterator &glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode &success) const; -+ void adjustPosition(le_int16 index, ValueFormat valueFormat, const LETableReference &base, GlyphIterator &glyphIterator, -+ const LEFontInstance *fontInstance, LEErrorCode &success) const; +- + /* + * Make an educated guess about running window manager. + * XXX: ideally, we should detect wm restart. +@@ -1280,6 +1309,12 @@ + else if (awt_wm_isKDE2()) { + awt_wmgr = KDE2_WM; + } ++ else if (awt_wm_isWindowmaker()) { ++ awt_wmgr = WINDOWMAKER_WM; ++ } ++ else if (awt_wm_isAfterstep()) { ++ awt_wmgr = AFTERSTEP_WM; ++ } + /* + * We don't check for legacy WM when we already know that WM + * supports WIN or _NET wm spec. +@@ -1302,6 +1337,9 @@ + awt_wmgr = MOTIF_WM; + } + else if (awt_wm_isOpenLook()) { ++ awt_wmgr = OPENLOOK_WM; ++ } ++ else if (awt_wm_isFvwm2()) { + awt_wmgr = OPENLOOK_WM; + } + else { +--- ./jdk/src/solaris/native/sun/awt/awt_wm.h 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_wm.h 2014-06-06 19:56:34.000000000 -0700 +@@ -45,7 +45,10 @@ + KDE2_WM, + SAWFISH_WM, + ICE_WM, +- METACITY_WM ++ METACITY_WM, ++ AFTERSTEP_WM, ++ WINDOWMAKER_WM, ++ FVWM2_WM + }; - static le_int16 getSize(ValueFormat valueFormat); + extern void awt_wm_init(void); +--- ./jdk/src/solaris/native/sun/awt/awt_xembed_server.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/awt_xembed_server.c 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +--- ./jdk/src/solaris/native/sun/awt/extutil.h 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/extutil.h 2014-06-06 19:56:34.000000000 -0700 +@@ -58,7 +58,7 @@ + */ + /* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmscam02.c 2014-04-20 12:39:16.000000000 -0700 -@@ -81,7 +81,7 @@ - cmsUInt32Number surround; - cmsFloat64Number n, Nbb, Ncb, z, FL, D; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) -- cmsContext ContextID; -+ cmsContext ContextID; + #ifndef _EXTUTIL_H_ + #define _EXTUTIL_H_ +@@ -248,4 +248,4 @@ + char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n) + #endif - } cmsCIECAM02; +-#endif /* __linux__ || MACOSX */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ +--- ./jdk/src/solaris/native/sun/awt/fontpath.c 2013-09-06 11:29:10.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/fontpath.c 2014-06-06 19:56:34.000000000 -0700 +@@ -23,7 +23,7 @@ + * questions. + */ -@@ -467,6 +467,7 @@ - CAM02COLOR clr; - cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel; +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif /* __linux__ */ + #include +@@ -79,7 +79,7 @@ -+ memset(&clr, 0, sizeof(clr)); - _cmsAssert(lpMod != NULL); - _cmsAssert(pIn != NULL); - _cmsAssert(pOut != NULL); -@@ -491,6 +492,7 @@ - CAM02COLOR clr; - cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel; + #define MAXFDIRS 512 /* Max number of directories that contain fonts */ -+ memset(&clr, 0, sizeof(clr)); - _cmsAssert(lpMod != NULL); - _cmsAssert(pIn != NULL); - _cmsAssert(pOut != NULL); ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmscgats.c 2014-04-20 12:39:16.000000000 -0700 -@@ -59,8 +59,8 @@ - // IT8.7 / CGATS.17-200x handling ----------------------------------------------------------------------------- +-#if !defined(__linux__) && !defined(MACOSX) ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + /* + * This can be set in the makefile to "/usr/X11" if so desired. + */ +@@ -145,6 +145,22 @@ + PACKAGE_PATH "/share/fonts/Type1", + NULL, /* terminates the list */ + }; ++#elif _ALLBSD_SOURCE ++static char *fullBSDFontPath[] = { ++ X11_PATH "/lib/X11/fonts/TrueType", ++ X11_PATH "/lib/X11/fonts/truetype", ++ X11_PATH "/lib/X11/fonts/tt", ++ X11_PATH "/lib/X11/fonts/TTF", ++ X11_PATH "/lib/X11/fonts/OTF", ++ PACKAGE_PATH "/share/fonts/TrueType", ++ PACKAGE_PATH "/share/fonts/truetype", ++ PACKAGE_PATH "/share/fonts/tt", ++ PACKAGE_PATH "/share/fonts/TTF", ++ PACKAGE_PATH "/share/fonts/OTF", ++ X11_PATH "/lib/X11/fonts/Type1", ++ PACKAGE_PATH "/share/fonts/Type1", ++ NULL, /* terminates the list */ ++}; + #else /* __linux */ + /* All the known interesting locations we have discovered on + * various flavors of Linux +@@ -401,7 +417,7 @@ + #endif /* !HEADLESS */ --#define MAXID 128 // Max lenght of identifier --#define MAXSTR 1024 // Max lenght of string -+#define MAXID 128 // Max length of identifier -+#define MAXSTR 1024 // Max length of string - #define MAXTABLES 255 // Max Number of tables in a single stream - #define MAXINCLUDE 20 // Max number of nested includes +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /* from awt_LoadLibrary.c */ + JNIEXPORT jboolean JNICALL AWTIsHeadless(); + #endif +@@ -530,6 +546,8 @@ + knowndirs = fullLinuxFontPath; + #elif defined(MACOSX) + knowndirs = full_MACOSX_X11FontPath; ++#elif defined(_ALLBSD_SOURCE) ++ knowndirs = fullBSDFontPath; + #else /* IF SOLARIS */ + knowndirs = fullSolarisFontPath; + #endif +@@ -540,7 +558,7 @@ + * be initialised. + */ + #ifndef HEADLESS +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + /* There's no headless build on linux ... */ + if (!AWTIsHeadless()) { /* .. so need to call a function to check */ + #endif +@@ -556,7 +574,7 @@ + x11dirs = getX11FontPath(); + } + AWT_UNLOCK(); +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + } + #endif + #endif /* !HEADLESS */ +--- ./jdk/src/solaris/native/sun/awt/robot_common.c 2013-09-06 11:29:11.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/robot_common.c 2014-06-06 19:56:34.000000000 -0700 +@@ -27,7 +27,7 @@ + #error This file should not be included in headless library + #endif -@@ -383,28 +383,28 @@ - //Forward declaration of some internal functions - static void* AllocChunk(cmsIT8* it8, cmsUInt32Number size); +-#ifdef MACOSX ++#ifdef _ALLBSD_SOURCE + #include + #endif --// Checks if c is a separator -+// Checks whatever c is a separator - static - cmsBool isseparator(int c) - { -- return (c == ' ') || (c == '\t') || (c == '\r'); -+ return (c == ' ') || (c == '\t') ; - } +--- ./jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c 2013-09-06 11:29:11.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c 2014-01-18 12:16:31.000000000 -0800 +@@ -577,8 +577,8 @@ + SplashUnlock(splash); + rc = poll(pfd, 2, timeout); + SplashLock(splash); +- if (splash->isVisible>0 && SplashTime() >= splash->time + +- splash->frames[splash->currentFrame].delay) { ++ if (splash->isVisible > 0 && splash->currentFrame >= 0 && ++ SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) { + SplashNextFrame(splash); + SplashUpdateShape(splash); + SplashRedrawWindow(splash); +--- ./jdk/src/solaris/native/sun/java2d/j2d_md.h 2013-09-06 11:29:11.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/java2d/j2d_md.h 2014-06-06 19:56:34.000000000 -0700 +@@ -28,9 +28,9 @@ + #include --// Checks whatever if c is a valid identifier char -+// Checks whatever c is a valid identifier char - static - cmsBool ismiddle(int c) - { - return (!isseparator(c) && (c != '#') && (c !='\"') && (c != '\'') && (c > 32) && (c < 127)); - } + /* +- * Linux and MACOSX's version of does not define intptr_t ++ * Linux and BSD's's version of does not define intptr_t + */ +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + #include + #endif /* __linux__ || MACOSX */ --// Checks whatsever if c is a valid identifier middle char. -+// Checks whatsever c is a valid identifier middle char. - static - cmsBool isidchar(int c) - { - return isalnum(c) || ismiddle(c); - } +--- ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2013-09-06 11:29:11.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2014-06-06 19:56:34.000000000 -0700 +@@ -804,7 +804,7 @@ + static int initialized; + static int usevis = JNI_TRUE; --// Checks whatsever if c is a valid identifier first char. -+// Checks whatsever c is a valid identifier first char. - static - cmsBool isfirstidchar(int c) +-#if defined(__linux__) || defined(MACOSX) ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + # define ULTRA_CHIP "sparc64" + #else + # define ULTRA_CHIP "sun4u" +--- ./jdk/src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -396,13 +396,10 @@ + static int + GLXSD_BadAllocXErrHandler(Display *display, XErrorEvent *xerr) { -@@ -436,7 +436,6 @@ +- int ret = 0; + if (xerr->error_code == BadAlloc) { + surfaceCreationFailed = JNI_TRUE; +- } else { +- ret = (*xerror_saved_handler)(display, xerr); + } +- return ret; ++ return 0; } + JNIEXPORT jboolean JNICALL +--- ./jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2014-06-06 19:56:35.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + #ifndef XAWT + extern struct MComponentPeerIDs mComponentPeerIDs; + #endif +-extern int J2DXErrHandler(Display *display, XErrorEvent *xerr); ++extern int XShmAttachXErrHandler(Display *display, XErrorEvent *xerr); + extern AwtGraphicsConfigDataPtr + getGraphicsConfigFromComponentPeer(JNIEnv *env, jobject this); + extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs; +@@ -591,7 +591,7 @@ + shminfo->readOnly = False; + + resetXShmAttachFailed(); +- EXEC_WITH_XERROR_HANDLER(J2DXErrHandler, ++ EXEC_WITH_XERROR_HANDLER(XShmAttachXErrHandler, + XShmAttach(awt_display, shminfo)); -- - // Makes a file path based on a given reference path - // NOTE: this function doesn't check if the path exists or even if it's legal - static -@@ -634,6 +633,9 @@ - cmsFloat64Number dnum = 0.0; - int sign = 1; - -+ // keep safe -+ if (Buffer == NULL) return 0.0; + /* +--- ./jdk/src/solaris/native/sun/net/portconfig.c 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/solaris/native/sun/net/portconfig.c 2014-06-06 19:56:34.000000000 -0700 +@@ -0,0 +1,140 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - if (*Buffer == '-' || *Buffer == '+') { - - sign = (*Buffer == '-') ? -1 : 1; -@@ -867,6 +869,14 @@ - - - // Next line -+ case '\r': -+ NextCh(it8); -+ if (it8 ->ch == '\n') -+ NextCh(it8); -+ it8->sy = SEOLN; -+ it8->lineno++; -+ break; ++#include ++#include ++#include ++#include ++ ++#if defined(_ALLBSD_SOURCE) ++#include ++#endif ++ ++#include "jni.h" ++#include "net_util.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++struct portrange { ++ int lower; ++ int higher; ++}; ++ ++static int getPortRange(struct portrange *range) ++{ ++#ifdef __linux__ ++ { ++ int ret; ++ FILE *f; ++ ++ f = fopen("/proc/sys/net/ipv4/ip_local_port_range", "r"); ++ if (f != NULL) { ++ ret = fscanf(f, "%d %d", &range->lower, &range->higher); ++ fclose(f); ++ return ret == 2 ? 0 : -1; ++ } ++ return -1; ++ } ++ ++#elif defined(__solaris__) ++ { ++ range->lower = net_getParam("/dev/tcp", "tcp_smallest_anon_port"); ++ range->higher = net_getParam("/dev/tcp", "tcp_largest_anon_port"); ++ return 0; ++ } ++#elif defined(__OpenBSD__) ++ { ++ int mib[3]; ++ mib[0] = CTL_NET; ++ mib[1] = PF_INET; ++ ++ mib[2] = IPCTL_IPPORT_HIFIRSTAUTO; ++ size_t rlen = sizeof(range->lower); ++ if (sysctl(mib, 3, &range->lower, &rlen, NULL, 0) == -1) ++ return -1; ++ ++ mib[2] = IPCTL_IPPORT_HILASTAUTO; ++ rlen = sizeof(range->higher); ++ if (sysctl(mib, 3, &range->higher, &rlen, NULL, 0) == -1) ++ return -1; ++ ++ return 0; ++ } ++#elif defined(_ALLBSD_SOURCE) ++ { ++ int ret; ++ size_t size = sizeof(range->lower); ++ ret = sysctlbyname( ++ "net.inet.ip.portrange.first", &range->lower, &size, 0, 0 ++ ); ++ if (ret == -1) { ++ return -1; ++ } ++ size = sizeof(range->higher); ++ ret = sysctlbyname( ++ "net.inet.ip.portrange.last", &range->higher, &size, 0, 0 ++ ); ++ return ret; ++ } ++#else ++ return -1; ++#endif ++} ++ ++/* ++ * Class: sun_net_PortConfig ++ * Method: getLower0 ++ * Signature: ()I ++ */ ++JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getLower0 ++ (JNIEnv *env, jclass clazz) ++{ ++ struct portrange range; ++ if (getPortRange(&range) < 0) { ++ return -1; ++ } ++ return range.lower; ++} + - case '\n': - NextCh(it8); - it8->sy = SEOLN; -@@ -876,7 +886,7 @@ - // Comment - case '#': - NextCh(it8); -- while (it8->ch && it8->ch != '\n') -+ while (it8->ch && it8->ch != '\n' && it8->ch != '\r') - NextCh(it8); ++/* ++ * Class: sun_net_PortConfig ++ * Method: getUpper ++ * Signature: ()I ++ */ ++JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getUpper0 ++ (JNIEnv *env, jclass clazz) ++{ ++ struct portrange range; ++ if (getPortRange(&range) < 0) { ++ return -1; ++ } ++ return range.higher; ++} ++ ++#ifdef __cplusplus ++} ++#endif +--- ./jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2014-06-06 19:56:34.000000000 -0700 +@@ -201,7 +201,7 @@ + return IOS_THROWN; + } + return result; +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__FreeBSD__) + off_t numBytes; + int result; - it8->sy = SCOMMENT; -@@ -994,6 +1004,9 @@ - { - switch (it8->sy) { +@@ -209,6 +209,8 @@ -+ case SEOLN: // Empty value -+ Buffer[0]=0; -+ break; - case SIDENT: strncpy(Buffer, it8->id, max); - Buffer[max-1]=0; - break; -@@ -1143,9 +1156,9 @@ - if (*Key != '#') { // Comments are ignored + #ifdef __APPLE__ + result = sendfile(srcFD, dstFD, position, &numBytes, NULL, 0); ++#elif defined(__FreeBSD__) ++ result = sendfile(srcFD, dstFD, position, count, NULL, &numBytes, 0); + #endif - if (cmsstrcasecmp(Key, p->Keyword) == 0) -- break; -- } -+ break; - } -+ } + if (numBytes > 0) +--- ./jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2014-06-06 19:56:34.000000000 -0700 +@@ -227,6 +227,21 @@ + fl.l_start = (off64_t)pos; + fl.l_type = F_UNLCK; + lockResult = fcntl(fd, cmd, &fl); ++#if defined(__FreeBSD__) || defined(__OpenBSD__) ++ /* XXXFREEBSD: While doing of preClose0() we're closing actual fd which ++ was locked, so here we'll get an error which need to be ignored to ++ satisfy TCK FileLock test */ ++ if (lockResult < 0 && errno == EBADF) ++ lockResult = errno = 0; ++#endif ++#if defined(__NetBSD__) ++ /* XXXNETBSD: The dup2 in preClose0 is being done onto 1 end of a ++ socketpair which isn't a valid target for F_UNLCK. No good way to see ++ this vs. a bad lock setup so just return errno = 0 there ++ to pass JCK (lock will get removed once all fd's close anyways) */ ++ if (lockResult < 0 && errno == EINVAL) ++ lockResult = errno = 0; ++#endif + if (lockResult < 0) { + JNU_ThrowIOExceptionWithLastError(env, "Release failed"); + } +--- ./jdk/src/solaris/native/sun/nio/ch/Sctp.h 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/nio/ch/Sctp.h 2014-06-06 19:56:34.000000000 -0700 +@@ -320,8 +320,20 @@ + typedef int sctp_peeloff_func(int sock, sctp_assoc_t id); - if (p == NULL) - return FALSE; -@@ -1155,11 +1168,13 @@ - for (; p != NULL; p = p->NextSubkey) { ++#elif defined(__FreeBSD__) && __FreeBSD__ >= 7 ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "jni.h" ++ + #endif /* __linux__ */ -+ if (p ->Subkey == NULL) continue; ++#if !defined(__FreeBSD__) || __FreeBSD__ < 7 + - if (LastPtr) *LastPtr = p; + sctp_getladdrs_func* nio_sctp_getladdrs; + sctp_freeladdrs_func* nio_sctp_freeladdrs; + sctp_getpaddrs_func* nio_sctp_getpaddrs; +@@ -329,6 +341,17 @@ + sctp_bindx_func* nio_sctp_bindx; + sctp_peeloff_func* nio_sctp_peeloff; - if (cmsstrcasecmp(Subkey, p->Subkey) == 0) -- return TRUE; -- } -+ return TRUE; -+ } ++#else ++ ++#define nio_sctp_getladdrs sctp_getladdrs ++#define nio_sctp_freeladdrs sctp_freeladdrs ++#define nio_sctp_getpaddrs sctp_getpaddrs ++#define nio_sctp_freepaddrs sctp_freepaddrs ++#define nio_sctp_bindx sctp_bindx ++#define nio_sctp_peeloff sctp_peeloff ++ ++#endif ++ + jboolean loadSocketExtensionFuncs(JNIEnv* env); - return FALSE; - } -@@ -1282,7 +1297,7 @@ + #endif /* !SUN_NIO_CH_SCTP_H */ +--- ./jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c 2014-06-06 19:56:35.000000000 -0700 +@@ -38,8 +38,7 @@ + #include "sun_nio_ch_SctpResultContainer.h" + #include "sun_nio_ch_SctpPeerAddrChange.h" + +-/* sizeof(union sctp_notification */ +-#define NOTIFICATION_BUFFER_SIZE 280 ++static int SCTP_NOTIFICATION_SIZE = sizeof(union sctp_notification); + + #define MESSAGE_IMPL_CLASS "sun/nio/ch/SctpMessageInfoImpl" + #define RESULT_CONTAINER_CLASS "sun/nio/ch/SctpResultContainer" +@@ -458,20 +457,47 @@ + if (msg->msg_flags & MSG_NOTIFICATION) { + char *bufp = (char*)addr; + union sctp_notification *snp; ++ jboolean allocated = JNI_FALSE; + +- if (!(msg->msg_flags & MSG_EOR) && length < NOTIFICATION_BUFFER_SIZE) { +- char buf[NOTIFICATION_BUFFER_SIZE]; ++ if (rv > SCTP_NOTIFICATION_SIZE) { ++ JNU_ThrowInternalError(env, "should not reach here"); ++ return -1; ++ } ++ ++ if (!(msg->msg_flags & MSG_EOR) && length < SCTP_NOTIFICATION_SIZE) { ++ char* newBuf; + int rvSAVE = rv; +- memcpy(buf, addr, rv); +- iov->iov_base = buf + rv; +- iov->iov_len = NOTIFICATION_BUFFER_SIZE - rv; ++ ++ if ((newBuf = malloc(SCTP_NOTIFICATION_SIZE)) == NULL) { ++ JNU_ThrowOutOfMemoryError(env, "Out of native heap space."); ++ return -1; ++ } ++ allocated = JNI_TRUE; ++ ++ memcpy(newBuf, addr, rv); ++ iov->iov_base = newBuf + rv; ++ iov->iov_len = SCTP_NOTIFICATION_SIZE - rv; + if ((rv = recvmsg(fd, msg, flags)) < 0) { + handleSocketError(env, errno); + return 0; + } +- bufp = buf; ++ bufp = newBuf; + rv += rvSAVE; + } ++#ifdef __sparc ++ else if ((intptr_t)addr & 0x3) { ++ /* the given buffer is not 4 byte aligned */ ++ char* newBuf; ++ if ((newBuf = malloc(SCTP_NOTIFICATION_SIZE)) == NULL) { ++ JNU_ThrowOutOfMemoryError(env, "Out of native heap space."); ++ return -1; ++ } ++ allocated = JNI_TRUE; ++ ++ memcpy(newBuf, addr, rv); ++ bufp = newBuf; ++ } ++#endif + snp = (union sctp_notification *) bufp; + if (handleNotification(env, fd, resultContainerObj, snp, rv, + (msg->msg_flags & MSG_EOR), +@@ -479,9 +505,16 @@ + /* We have received a notification that is of interest to + to the Java API. The appropriate notification will be + set in the result container. */ ++ if (allocated == JNI_TRUE) { ++ free(bufp); ++ } + return 0; + } - it8 ->nTable = nTable; ++ if (allocated == JNI_TRUE) { ++ free(bufp); ++ } ++ + // set iov back to addr, and reset msg_controllen + iov->iov_base = addr; + iov->iov_len = length; +--- ./jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2014-06-06 19:56:34.000000000 -0700 +@@ -58,6 +58,7 @@ + */ + jboolean loadSocketExtensionFuncs + (JNIEnv* env) { ++#if !defined(__FreeBSD__) || __FreeBSD__ < 7 /* On FreeBSD 7.x these functions are in libc */ + if (dlopen(nativeSctpLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) { + JNU_ThrowByName(env, "java/lang/UnsupportedOperationException", + dlerror()); +@@ -105,6 +106,7 @@ + dlerror()); + return JNI_FALSE; + } ++#endif /* __FreeBSD__ */ -- return nTable; -+ return (cmsInt32Number) nTable; - } + funcsLoaded = JNI_TRUE; + return JNI_TRUE; +--- ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2014-06-06 19:56:34.000000000 -0700 +@@ -33,6 +33,11 @@ + #include "j2secmod.h" -@@ -1387,7 +1402,7 @@ - cmsIT8* it8 = (cmsIT8*) hIT8; - char Buffer[1024]; ++#ifndef RTLD_NOLOAD ++/* A gross hack that will work if the NSS library is only opened once */ ++static void *nssLibHandle = NULL; ++#endif ++ + void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) { + void *hModule = (void*)jHandle; + void *fAddress = dlsym(hModule, functionName); +@@ -50,7 +55,11 @@ + { + const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL); + // look up existing handle only, do not load ++#ifdef RTLD_NOLOAD + void *hModule = dlopen(libName, RTLD_NOLOAD); ++#else ++ void *hModule = nssLibHandle; ++#endif + dprintf2("-handle for %s: %u\n", libName, hModule); + (*env)->ReleaseStringUTFChars(env, jLibName, libName); + return (jlong)hModule; +@@ -64,6 +73,9 @@ -- sprintf(Buffer, "%d", Val); -+ sprintf(Buffer, "%u", Val); + dprintf1("-lib %s\n", libName); + hModule = dlopen(libName, RTLD_LAZY); ++#ifndef RTLD_NOLOAD ++ nssLibHandle = hModule; ++#endif + (*env)->ReleaseStringUTFChars(env, jLibName, libName); + dprintf2("-handle: %u (0X%X)\n", hModule, hModule); - return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_HEXADECIMAL) != NULL; - } -@@ -1424,6 +1439,8 @@ +--- ./jdk/src/solaris/native/sun/xawt/XWindow.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/xawt/XWindow.c 2014-06-06 19:56:34.000000000 -0700 +@@ -867,7 +867,7 @@ { - const char *v = cmsIT8GetProperty(hIT8, cProp); + KeySym originalKeysym = *keysym; -+ if (v == NULL) return 0.0; +-#if !defined(__linux__) && !defined(MACOSX) ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + /* The following code on Linux will cause the keypad keys + * 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/native/sun/xawt/XlibWrapper.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/solaris/native/sun/xawt/XlibWrapper.c 2014-06-06 19:56:31.000000000 -0700 +@@ -41,6 +41,7 @@ + #include + + #include ++#include + #include + + #include +@@ -1262,11 +1263,15 @@ + JavaVM* jvm = NULL; + static int ToolkitErrorHandler(Display * dpy, XErrorEvent * event) { + JNIEnv * env; ++ // First call the native synthetic error handler declared in "awt_util.h" file. ++ if (current_native_xerror_handler != NULL) { ++ current_native_xerror_handler(dpy, event); ++ } + if (jvm != NULL) { + env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + if (env) { +- return JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XToolkit", "globalErrorHandler", "(JJ)I", +- ptr_to_jlong(dpy), ptr_to_jlong(event)).i; ++ return JNU_CallStaticMethodByName(env, NULL, "sun/awt/X11/XErrorHandlerUtil", ++ "globalErrorHandler", "(JJ)I", ptr_to_jlong(dpy), ptr_to_jlong(event)).i; + } + } + return 0; +--- ./jdk/src/windows/back/linker_md.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/windows/back/linker_md.c 2014-06-06 19:56:31.000000000 -0700 +@@ -39,33 +39,27 @@ + #include "path_md.h" + + static void dll_build_name(char* buffer, size_t buflen, +- const char* pname, const char* fname) { +- // Based on os_windows.cpp ++ const char* paths, const char* fname) { ++ char *path, *paths_copy, *next_token; + +- char *path_sep = PATH_SEPARATOR; +- char *pathname = (char *)pname; +- while (strlen(pathname) > 0) { +- char *p = strchr(pathname, *path_sep); +- if (p == NULL) { +- p = pathname + strlen(pathname); +- } +- /* check for NULL path */ +- if (p == pathname) { +- continue; +- } +- if (*(p-1) == ':' || *(p-1) == '\\') { +- (void)_snprintf(buffer, buflen, "%.*s%s.dll", (p - pathname), +- pathname, fname); +- } else { +- (void)_snprintf(buffer, buflen, "%.*s\\%s.dll", (p - pathname), +- pathname, fname); +- } ++ paths_copy = strdup(paths); ++ if (paths_copy == NULL) { ++ return; ++ } + - return ParseFloatNumber(v); - } - -@@ -1456,7 +1473,7 @@ - t -> nSamples = 10; ++ next_token = NULL; ++ path = strtok_s(paths_copy, PATH_SEPARATOR, &next_token); ++ ++ while (path != NULL) { ++ _snprintf(buffer, buflen, "%s\\%s.dll", path, fname); + if (_access(buffer, 0) == 0) { + break; } - -- t -> DataFormat = (char**) AllocChunk (it8, (t->nSamples + 1) * sizeof(char *)); -+ t -> DataFormat = (char**) AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * sizeof(char *)); - if (t->DataFormat == NULL) { - - SynError(it8, "AllocateDataFormat: Unable to allocate dataFormat array"); -@@ -1512,7 +1529,7 @@ - t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); - t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); - -- t-> Data = (char**)AllocChunk (it8, (t->nSamples + 1) * (t->nPatches + 1) *sizeof (char*)); -+ t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*)); - if (t->Data == NULL) { - - SynError(it8, "AllocateDataSet: Unable to allocate data array"); -@@ -1571,7 +1588,7 @@ - if (str == NULL) - str = " "; - -- // Lenghth to write -+ // Length to write - len = (cmsUInt32Number) strlen(str); - f ->Used += len; - -@@ -2095,7 +2112,7 @@ - NextCh(it8); - - // If a newline is found, then this is a type string -- if (it8 ->ch == '\n') { -+ if (it8 ->ch == '\n' || it8->ch == '\r') { - - cmsIT8SetSheetType(it8, it8 ->id); - InSymbol(it8); -@@ -2210,7 +2227,7 @@ - char Buffer[256]; - - char *Type = p ->Value; -- int nTable = k; -+ int nTable = (int) k; - - snprintf(Buffer, 255, "%s %d %s", Label, nTable, Type ); - -@@ -2564,6 +2581,8 @@ - - Buffer = cmsIT8GetDataRowCol(hIT8, row, col); - -+ if (Buffer == NULL) return 0.0; +- pathname = p + 1; + *buffer = '\0'; ++ path = strtok_s(NULL, PATH_SEPARATOR, &next_token); + } + - return ParseFloatNumber(Buffer); - } - -@@ -2776,7 +2795,7 @@ - if (Formatter == NULL) - strcpy(it8->DoubleFormatter, DEFAULT_DBL_FORMAT); - else -- strcpy(it8->DoubleFormatter, Formatter); -+ strncpy(it8->DoubleFormatter, Formatter, sizeof(it8->DoubleFormatter)); - - it8 ->DoubleFormatter[sizeof(it8 ->DoubleFormatter)-1] = 0; ++ free(paths_copy); } ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmscnvrt.c 2014-04-20 12:39:16.000000000 -0700 -@@ -270,7 +270,7 @@ - // m2 holds CHAD from output white to D50 times abs. col. scaling - - // Observer is not adapted, undo the chromatic adaptation -- _cmsMAT3per(m, &m3, ChromaticAdaptationMatrixOut); -+ _cmsMAT3per(m, &m2, ChromaticAdaptationMatrixOut); - - m3 = *ChromaticAdaptationMatrixIn; - if (!_cmsMAT3inverse(&m3, &m4)) return FALSE; -@@ -411,57 +411,61 @@ - // Handle PCS mismatches. A specialized stage is added to the LUT in such case - switch (InPCS) { - -- case cmsSigXYZData: // Input profile operates in XYZ -+ case cmsSigXYZData: // Input profile operates in XYZ -- switch (OutPCS) { -+ switch (OutPCS) { + /* +@@ -108,7 +102,7 @@ + * Build a machine dependent library name out of a path and file name. + */ + void +-dbgsysBuildLibName(char *holder, int holderlen, char *pname, char *fname) ++dbgsysBuildLibName(char *holder, int holderlen, const char *pname, const char *fname) + { + const int pnamelen = pname ? (int)strlen(pname) : 0; + +--- ./jdk/src/windows/bin/cmdtoargs.c 2013-09-06 11:29:12.000000000 -0700 ++++ ./jdk/src/windows/bin/cmdtoargs.c 2014-06-06 19:56:31.000000000 -0700 +@@ -53,6 +53,16 @@ + static StdArg *stdargs; + static int stdargc; + ++static int copyCh(USHORT ch, char* dest) { ++ if (HIBYTE(ch) == 0) { ++ *dest = (char)ch; ++ return 1; ++ } else { ++ *((USHORT *)dest) = ch; ++ return 2; ++ } ++} ++ + static char* next_arg(char* cmdline, char* arg, jboolean* wildcard) { -- case cmsSigXYZData: // XYZ -> XYZ -- if (!IsEmptyLayer(m, off)) -- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); -- break; -- -- case cmsSigLabData: // XYZ -> Lab -- if (!IsEmptyLayer(m, off)) -- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); -- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID)); -- break; -- -- default: -- return FALSE; // Colorspace mismatch -- } -- break; -+ case cmsSigXYZData: // XYZ -> XYZ -+ if (!IsEmptyLayer(m, off) && -+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl))) -+ return FALSE; -+ break; + char* src = cmdline; +@@ -61,31 +71,43 @@ + int quotes = 0; + int slashes = 0; -+ case cmsSigLabData: // XYZ -> Lab -+ if (!IsEmptyLayer(m, off) && -+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl))) -+ return FALSE; -+ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID))) -+ return FALSE; +- char prev = 0; +- char ch = 0; ++ // "prev"/"ch" may contain either a single byte, or a double byte ++ // character encoded in CP_ACP. ++ USHORT prev = 0; ++ USHORT ch = 0; + int i; + jboolean done = JNI_FALSE; ++ int charLength; + + *wildcard = JNI_FALSE; +- while ((ch = *src) != 0 && !done) { ++ while (!done) { ++ charLength = CharNextExA(CP_ACP, src, 0) - src; ++ if (charLength == 0) { + break; - -- case cmsSigLabData: // Input profile operates in Lab -+ default: -+ return FALSE; // Colorspace mismatch ++ } else if (charLength == 1) { ++ ch = (USHORT)(UCHAR)src[0]; ++ } else { ++ ch = ((USHORT *)src)[0]; + } -+ break; - -- switch (OutPCS) { -+ case cmsSigLabData: // Input profile operates in Lab - -- case cmsSigXYZData: // Lab -> XYZ -+ switch (OutPCS) { - -- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)); -- if (!IsEmptyLayer(m, off)) -- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); -- break; -+ case cmsSigXYZData: // Lab -> XYZ ++ + switch (ch) { +- case '"': ++ case L'"': + if (separator) { + done = JNI_TRUE; + break; + } +- if (prev == '\\') { ++ if (prev == L'\\') { + for (i = 1; i < slashes; i += 2) { +- *dest++ = prev; ++ dest += copyCh(prev, dest); + } + if (slashes % 2 == 1) { +- *dest++ = ch; ++ dest += copyCh(ch, dest); + } else { + quotes++; + } +- } else if (prev == '"' && quotes % 2 == 0) { ++ } else if (prev == L'"' && quotes % 2 == 0) { + quotes++; +- *dest++ = ch; // emit every other consecutive quote ++ dest += copyCh(ch, dest); // emit every other consecutive quote + } else if (quotes == 0) { + quotes++; // starting quote + } else { +@@ -94,7 +116,7 @@ + slashes = 0; + break; -- case cmsSigLabData: // Lab -> Lab -+ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID))) -+ return FALSE; -+ if (!IsEmptyLayer(m, off) && -+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl))) -+ return FALSE; -+ break; +- case '\\': ++ case L'\\': + slashes++; + if (separator) { + done = JNI_TRUE; +@@ -102,23 +124,23 @@ + } + break; -- if (!IsEmptyLayer(m, off)) { -- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)); -- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)); -- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID)); -- } -- break; -+ case cmsSigLabData: // Lab -> Lab +- case ' ': +- case '\t': +- if (prev == '\\') { ++ case L' ': ++ case L'\t': ++ if (prev == L'\\') { + for (i = 0 ; i < slashes; i++) { +- *dest++ = prev; ++ dest += copyCh(prev, dest); + } + } + if (quotes % 2 == 1) { +- *dest++ = ch; ++ dest += copyCh(ch, dest); + } else { + separator = JNI_TRUE; + } + slashes = 0; + break; -- default: -- return FALSE; // Mismatch -+ if (!IsEmptyLayer(m, off)) { -+ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)) || -+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)) || -+ !cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID))) -+ return FALSE; +- case '*': +- case '?': ++ case L'*': ++ case L'?': + if (separator) { + done = JNI_TRUE; + separator = JNI_FALSE; +@@ -127,36 +149,36 @@ + if (quotes % 2 == 0) { + *wildcard = JNI_TRUE; + } +- if (prev == '\\') { ++ if (prev == L'\\') { + for (i = 0 ; i < slashes ; i++) { +- *dest++ = prev; ++ dest += copyCh(prev, dest); + } } +- *dest++ = ch; ++ dest += copyCh(ch, dest); break; -- -- // On colorspaces other than PCS, check for same space default: -- if (InPCS != OutPCS) return FALSE; -- break; -+ return FALSE; // Mismatch -+ } -+ break; -+ -+ // On colorspaces other than PCS, check for same space -+ default: -+ if (InPCS != OutPCS) return FALSE; -+ break; - } +- if (prev == '\\') { ++ if (prev == L'\\') { + for (i = 0 ; i < slashes ; i++) { +- *dest++ = prev; ++ dest += copyCh(prev, dest); + } +- *dest++ = ch; ++ dest += copyCh(ch, dest); + } else if (separator) { + done = JNI_TRUE; + } else { +- *dest++ = ch; ++ dest += copyCh(ch, dest); + } + slashes = 0; + } - return TRUE; -@@ -497,7 +501,8 @@ - cmsFloat64Number AdaptationStates[], - cmsUInt32Number dwFlags) - { -- cmsPipeline* Lut, *Result; -+ cmsPipeline* Lut = NULL; -+ cmsPipeline* Result; - cmsHPROFILE hProfile; - cmsMAT3 m; - cmsVEC3 off; -@@ -593,8 +598,11 @@ + if (!done) { + prev = ch; +- src++; ++ src += charLength; } + } +- if (prev == '\\') { ++ if (prev == L'\\') { + for (i = 0; i < slashes; i++) { +- *dest++ = prev; ++ dest += copyCh(prev, dest); + } + } + *dest = 0; +--- ./jdk/src/windows/classes/java/lang/ProcessImpl.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/java/lang/ProcessImpl.java 2014-06-06 19:56:31.000000000 -0700 +@@ -457,8 +457,10 @@ - // Concatenate to the output LUT -- cmsPipelineCat(Result, Lut); -+ if (!cmsPipelineCat(Result, Lut)) -+ goto Error; -+ - cmsPipelineFree(Lut); -+ Lut = NULL; + /** + * Create a process using the win32 function CreateProcess. ++ * The method is synchronized due to MS kb315939 problem. ++ * All native handles should restore the inherit flag at the end of call. + * +- * @param cmdstr the Windows commandline ++ * @param cmdstr the Windows command line + * @param envblock NUL-separated, double-NUL-terminated list of + * environment strings in VAR=VALUE form + * @param dir the working directory of the process, or null if +@@ -474,7 +476,7 @@ + * @param redirectErrorStream redirectErrorStream attribute + * @return the native subprocess HANDLE returned by CreateProcess + */ +- private static native long create(String cmdstr, ++ private static synchronized native long create(String cmdstr, + String envblock, + String dir, + long[] stdHandles, +--- ./jdk/src/windows/classes/java/net/DualStackPlainSocketImpl.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/java/net/DualStackPlainSocketImpl.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -162,8 +162,9 @@ + if (!fd.valid()) + return; - // Update current space - CurrentColorSpace = ColorSpaceOut; -@@ -604,6 +612,7 @@ +- close0(fdAccess.get(fd)); ++ final int nativefd = fdAccess.get(fd); + fdAccess.set(fd, -1); ++ close0(nativefd); + } - Error: + void socketShutdown(int howto) throws IOException { +--- ./jdk/src/windows/classes/java/net/PlainSocketImpl.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/java/net/PlainSocketImpl.java 2014-06-06 19:56:31.000000000 -0700 +@@ -191,14 +191,17 @@ + } -+ if (Lut != NULL) cmsPipelineFree(Lut); - if (Result != NULL) cmsPipelineFree(Result); - return NULL; + protected synchronized void accept(SocketImpl s) throws IOException { +- // pass in the real impl not the wrapper. +- SocketImpl delegate = ((PlainSocketImpl)s).impl; +- delegate.address = new InetAddress(); +- delegate.fd = new FileDescriptor(); +- impl.accept(delegate); +- +- // set fd to delegate's fd to be compatible with older releases +- s.fd = delegate.fd; ++ if (s instanceof PlainSocketImpl) { ++ // pass in the real impl not the wrapper. ++ SocketImpl delegate = ((PlainSocketImpl)s).impl; ++ delegate.address = new InetAddress(); ++ delegate.fd = new FileDescriptor(); ++ impl.accept(delegate); ++ // set fd to delegate's fd to be compatible with older releases ++ s.fd = delegate.fd; ++ } else { ++ impl.accept(s); ++ } + } -@@ -742,7 +751,8 @@ - if (CLUT == NULL) goto Error; + void setFileDescriptor(FileDescriptor fd) { +--- ./jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java 2014-04-19 01:27:12.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -41,6 +41,7 @@ - // This is the one and only MPE in this LUT -- cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT); -+ if (!cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT)) -+ goto Error; + import static sun.awt.shell.Win32ShellFolder2.*; + import sun.awt.OSInfo; ++import sun.misc.ThreadGroupUtils; - // Sample it. We cannot afford pre/post linearization this time. - if (!cmsStageSampleCLut16bit(CLUT, BlackPreservingGrayOnlySampler, (void*) &bp, 0)) -@@ -959,7 +969,8 @@ - CLUT = cmsStageAllocCLut16bit(ContextID, nGridPoints, 4, 4, NULL); - if (CLUT == NULL) goto Cleanup; + // NOTE: This class supersedes Win32ShellFolderManager, which was removed + // from distribution after version 1.4.2. +@@ -505,23 +506,19 @@ + } + } + }; +- comThread = +- AccessController.doPrivileged( +- new PrivilegedAction() { +- public Thread run() { ++ comThread = AccessController.doPrivileged(new PrivilegedAction() { ++ @Override ++ public Thread run() { + /* The thread must be a member of a thread group + * which will not get GCed before VM exit. + * Make its parent the top-level thread group. + */ +- ThreadGroup tg = Thread.currentThread().getThreadGroup(); +- for (ThreadGroup tgn = tg; +- tgn != null; +- tg = tgn, tgn = tg.getParent()); +- Thread thread = new Thread(tg, comRun, "Swing-Shell"); +- thread.setDaemon(true); +- return thread; +- } +- } ++ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); ++ Thread thread = new Thread(rootTG, comRun, "Swing-Shell"); ++ thread.setDaemon(true); ++ return thread; ++ } ++ } + ); + return comThread; + } +--- ./jdk/src/windows/classes/sun/awt/windows/WClipboard.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/awt/windows/WClipboard.java 2014-04-19 01:27:12.000000000 -0700 +@@ -63,7 +63,6 @@ + } -- cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT); -+ if (!cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT)) -+ goto Cleanup; + protected void setContentsNative(Transferable contents) { +- + // Don't use delayed Clipboard rendering for the Transferable's data. + // If we did that, we would call Transferable.getTransferData on + // the Toolkit thread, which is a security hole. +@@ -72,7 +71,7 @@ + // translated. Then, for each format, translate the data and post + // it to the Clipboard. + Map formatMap = WDataTransferer.getInstance(). +- getFormatsForTransferable(contents, flavorMap); ++ getFormatsForTransferable(contents, getDefaultFlavorTable()); - cmsStageSampleCLut16bit(CLUT, BlackPreservingSampler, (void*) &bp, 0); + openClipboard(this); -@@ -1057,7 +1068,7 @@ - } +--- ./jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java 2014-06-06 19:56:31.000000000 -0700 +@@ -179,6 +179,7 @@ + private static final int SET_RES_LOW = 0x00000080; + private static final int SET_COLOR = 0x00000200; + private static final int SET_ORIENTATION = 0x00004000; ++ private static final int SET_COLLATED = 0x00008000; - // The plug-in registration. User can add new intents or override default routines --cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext id, cmsPluginBase* Data) - { - cmsPluginRenderingIntent* Plugin = (cmsPluginRenderingIntent*) Data; - cmsIntentsList* fl; -@@ -1072,7 +1083,7 @@ - fl = SearchIntent(Plugin ->Intent); + /** + * Values must match those defined in wingdi.h & commdlg.h +@@ -189,10 +190,33 @@ + private static final int PD_NOSELECTION = 0x00000004; + private static final int PD_COLLATE = 0x00000010; + private static final int PD_PRINTTOFILE = 0x00000020; +- private static final int DM_ORIENTATION = 0x00000001; +- private static final int DM_PRINTQUALITY = 0x00000400; +- private static final int DM_COLOR = 0x00000800; +- private static final int DM_DUPLEX = 0x00001000; ++ private static final int DM_ORIENTATION = 0x00000001; ++ private static final int DM_PAPERSIZE = 0x00000002; ++ private static final int DM_COPIES = 0x00000100; ++ private static final int DM_DEFAULTSOURCE = 0x00000200; ++ private static final int DM_PRINTQUALITY = 0x00000400; ++ private static final int DM_COLOR = 0x00000800; ++ private static final int DM_DUPLEX = 0x00001000; ++ private static final int DM_YRESOLUTION = 0x00002000; ++ private static final int DM_COLLATE = 0x00008000; ++ ++ private static final short DMCOLLATE_FALSE = 0; ++ private static final short DMCOLLATE_TRUE = 1; ++ ++ private static final short DMORIENT_PORTRAIT = 1; ++ private static final short DMORIENT_LANDSCAPE = 2; ++ ++ private static final short DMCOLOR_MONOCHROME = 1; ++ private static final short DMCOLOR_COLOR = 2; ++ ++ private static final short DMRES_DRAFT = -1; ++ private static final short DMRES_LOW = -2; ++ private static final short DMRES_MEDIUM = -3; ++ private static final short DMRES_HIGH = -4; ++ ++ private static final short DMDUP_SIMPLEX = 1; ++ private static final short DMDUP_VERTICAL = 2; ++ private static final short DMDUP_HORIZONTAL = 3; - if (fl == NULL) { -- fl = (cmsIntentsList*) _cmsPluginMalloc(sizeof(cmsIntentsList)); -+ fl = (cmsIntentsList*) _cmsPluginMalloc(id, sizeof(cmsIntentsList)); - if (fl == NULL) return FALSE; + /** + * Pageable MAX pages +@@ -592,13 +616,23 @@ + } + driverDoesMultipleCopies = false; + driverDoesCollation = false; +- setNativePrintService(service.getName()); ++ setNativePrintServiceIfNeeded(service.getName()); } ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmserr.c 2014-04-20 12:39:16.000000000 -0700 -@@ -302,8 +302,6 @@ - return NULL; + /* associates this job with the specified native service */ + private native void setNativePrintService(String name) + throws PrinterException; + ++ private String lastNativeService = null; ++ private void setNativePrintServiceIfNeeded(String name) ++ throws PrinterException { ++ ++ if (name != null && !(name.equals(lastNativeService))) { ++ setNativePrintService(name); ++ lastNativeService = name; ++ } ++ } ++ + public PrintService getPrintService() { + if (myService == null) { + String printerName = getNativePrintService(); +@@ -616,7 +650,7 @@ + myService = PrintServiceLookup.lookupDefaultPrintService(); + if (myService != null) { + try { +- setNativePrintService(myService.getName()); ++ setNativePrintServiceIfNeeded(myService.getName()); + } catch (Exception e) { + myService = null; + } +@@ -1742,8 +1776,13 @@ + mAttMediaSizeName = ((Win32PrintService)myService).findPaperID(msn); } -- -- - chunk ->BlockSize = Initial; - chunk ->Used = 0; - chunk ->next = NULL; ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsgamma.c 2014-04-20 12:39:16.000000000 -0700 -@@ -30,7 +30,7 @@ - //--------------------------------------------------------------------------------- - // - // Little Color Management System --// Copyright (c) 1998-2012 Marti Maria Saguer -+// Copyright (c) 1998-2013 Marti Maria Saguer - // - // Permission is hereby granted, free of charge, to any person obtaining - // a copy of this software and associated documentation files (the "Software"), -@@ -99,7 +99,7 @@ - static _cmsParametricCurvesCollection* ParametricCurves = &DefaultCurves; +- private void setWin32MediaAttrib(int dmIndex, int width, int length) { +- MediaSizeName msn = ++ private void addPaperSize(PrintRequestAttributeSet aset, ++ int dmIndex, int width, int length) { ++ ++ if (aset == null) { ++ return; ++ } ++ MediaSizeName msn = + ((Win32PrintService)myService).findWin32Media(dmIndex); + if (msn == null) { + msn = ((Win32PrintService)myService). +@@ -1751,10 +1790,12 @@ + } - // As a way to install new parametric curves --cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext id, cmsPluginBase* Data) - { - cmsPluginParametricCurves* Plugin = (cmsPluginParametricCurves*) Data; - _cmsParametricCurvesCollection* fl; -@@ -110,7 +110,7 @@ - return TRUE; + if (msn != null) { +- if (attributes != null) { +- attributes.add(msn); +- } ++ aset.add(msn); + } ++ } ++ ++ private void setWin32MediaAttrib(int dmIndex, int width, int length) { ++ addPaperSize(attributes, dmIndex, width, length); + mAttMediaSizeName = dmIndex; } -- fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(sizeof(_cmsParametricCurvesCollection)); -+ fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(id, sizeof(_cmsParametricCurvesCollection)); - if (fl == NULL) return FALSE; - - // Copy the parameters -@@ -258,7 +258,8 @@ +@@ -1776,7 +1817,7 @@ + // no equivalent predefined value + mAttMediaTray = 7; // DMBIN_AUTO + } else if (attr == MediaTray.TOP) { +- mAttMediaTray =1; // DMBIN_UPPER ++ mAttMediaTray = 1; // DMBIN_UPPER + } else { + if (attr instanceof Win32MediaTray) { + mAttMediaTray = ((Win32MediaTray)attr).winID; +@@ -1902,6 +1943,254 @@ + } } - p ->InterpParams = _cmsComputeInterpParams(ContextID, p ->nEntries, 1, 1, p->Table16, CMS_LERP_FLAGS_16BITS); -- return p; -+ if (p->InterpParams != NULL) -+ return p; ++ private static final class DevModeValues { ++ int dmFields; ++ short copies; ++ short collate; ++ short color; ++ short duplex; ++ short orient; ++ short paper; ++ short bin; ++ short xres_quality; ++ short yres; ++ } ++ ++ private void getDevModeValues(PrintRequestAttributeSet aset, ++ DevModeValues info) { ++ ++ Copies c = (Copies)aset.get(Copies.class); ++ if (c != null) { ++ info.dmFields |= DM_COPIES; ++ info.copies = (short)c.getValue(); ++ } ++ ++ SheetCollate sc = (SheetCollate)aset.get(SheetCollate.class); ++ if (sc != null) { ++ info.dmFields |= DM_COLLATE; ++ info.collate = (sc == SheetCollate.COLLATED) ? ++ DMCOLLATE_TRUE : DMCOLLATE_FALSE; ++ } ++ ++ Chromaticity ch = (Chromaticity)aset.get(Chromaticity.class); ++ if (ch != null) { ++ info.dmFields |= DM_COLOR; ++ if (ch == Chromaticity.COLOR) { ++ info.color = DMCOLOR_COLOR; ++ } else { ++ info.color = DMCOLOR_MONOCHROME; ++ } ++ } ++ ++ Sides s = (Sides)aset.get(Sides.class); ++ if (s != null) { ++ info.dmFields |= DM_DUPLEX; ++ if (s == Sides.TWO_SIDED_LONG_EDGE) { ++ info.duplex = DMDUP_VERTICAL; ++ } else if (s == Sides.TWO_SIDED_SHORT_EDGE) { ++ info.duplex = DMDUP_HORIZONTAL; ++ } else { // Sides.ONE_SIDED ++ info.duplex = DMDUP_SIMPLEX; ++ } ++ } ++ ++ OrientationRequested or = ++ (OrientationRequested)aset.get(OrientationRequested.class); ++ if (or != null) { ++ info.dmFields |= DM_ORIENTATION; ++ info.orient = (or == OrientationRequested.LANDSCAPE) ++ ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT; ++ } ++ ++ Media m = (Media)aset.get(Media.class); ++ if (m instanceof MediaSizeName) { ++ info.dmFields |= DM_PAPERSIZE; ++ MediaSizeName msn = (MediaSizeName)m; ++ info.paper = ++ (short)((Win32PrintService)myService).findPaperID(msn); ++ } ++ ++ MediaTray mt = null; ++ if (m instanceof MediaTray) { ++ mt = (MediaTray)m; ++ } ++ if (mt == null) { ++ SunAlternateMedia sam = ++ (SunAlternateMedia)aset.get(SunAlternateMedia.class); ++ if (sam != null && (sam.getMedia() instanceof MediaTray)) { ++ mt = (MediaTray)sam.getMedia(); ++ } ++ } ++ ++ if (mt != null) { ++ info.dmFields |= DM_DEFAULTSOURCE; ++ info.bin = (short)(((Win32PrintService)myService).findTrayID(mt)); ++ } ++ ++ PrintQuality q = (PrintQuality)aset.get(PrintQuality.class); ++ if (q != null) { ++ info.dmFields |= DM_PRINTQUALITY; ++ if (q == PrintQuality.DRAFT) { ++ info.xres_quality = DMRES_DRAFT; ++ } else if (q == PrintQuality.HIGH) { ++ info.xres_quality = DMRES_HIGH; ++ } else { ++ info.xres_quality = DMRES_MEDIUM; ++ } ++ } ++ ++ PrinterResolution r = ++ (PrinterResolution)aset.get(PrinterResolution.class); ++ if (r != null) { ++ info.dmFields |= DM_PRINTQUALITY | DM_YRESOLUTION; ++ info.xres_quality = ++ (short)r.getCrossFeedResolution(PrinterResolution.DPI); ++ info.yres = (short)r.getFeedResolution(PrinterResolution.DPI); ++ } ++ } ++ ++ /* This method is called from native to update the values in the ++ * attribute set which originates from the cross-platform dialog, ++ * but updated by the native DocumentPropertiesUI which updates the ++ * devmode. This syncs the devmode back in to the attributes so that ++ * we can update the cross-platform dialog. ++ * The attribute set here is a temporary one installed whilst this ++ * happens, ++ */ ++ private final void setJobAttributes(PrintRequestAttributeSet attributes, ++ int fields, int values, ++ short copies, ++ short dmPaperSize, ++ short dmPaperWidth, ++ short dmPaperLength, ++ short dmDefaultSource, ++ short xRes, ++ short yRes) { ++ ++ if (attributes == null) { ++ return; ++ } ++ ++ if ((fields & DM_COPIES) != 0) { ++ attributes.add(new Copies(copies)); ++ } ++ ++ if ((fields & DM_COLLATE) != 0) { ++ if ((values & SET_COLLATED) != 0) { ++ attributes.add(SheetCollate.COLLATED); ++ } else { ++ attributes.add(SheetCollate.UNCOLLATED); ++ } ++ } ++ ++ if ((fields & DM_ORIENTATION) != 0) { ++ if ((values & SET_ORIENTATION) != 0) { ++ attributes.add(OrientationRequested.LANDSCAPE); ++ } else { ++ attributes.add(OrientationRequested.PORTRAIT); ++ } ++ } ++ ++ if ((fields & DM_COLOR) != 0) { ++ if ((values & SET_COLOR) != 0) { ++ attributes.add(Chromaticity.COLOR); ++ } else { ++ attributes.add(Chromaticity.MONOCHROME); ++ } ++ } ++ ++ if ((fields & DM_PRINTQUALITY) != 0) { ++ /* value < 0 indicates quality setting. ++ * value > 0 indicates X resolution. In that case ++ * hopefully we will also find y-resolution specified. ++ * If its not, assume its the same as x-res. ++ * Maybe Java code should try to reconcile this against ++ * the printers claimed set of supported resolutions. ++ */ ++ if (xRes < 0) { ++ PrintQuality quality; ++ if ((values & SET_RES_LOW) != 0) { ++ quality = PrintQuality.DRAFT; ++ } else if ((fields & SET_RES_HIGH) != 0) { ++ quality = PrintQuality.HIGH; ++ } else { ++ quality = PrintQuality.NORMAL; ++ } ++ attributes.add(quality); ++ } else if (xRes > 0 && yRes > 0) { ++ attributes.add( ++ new PrinterResolution(xRes, yRes, PrinterResolution.DPI)); ++ } ++ } ++ ++ if ((fields & DM_DUPLEX) != 0) { ++ Sides sides; ++ if ((values & SET_DUP_VERTICAL) != 0) { ++ sides = Sides.TWO_SIDED_LONG_EDGE; ++ } else if ((values & SET_DUP_HORIZONTAL) != 0) { ++ sides = Sides.TWO_SIDED_SHORT_EDGE; ++ } else { ++ sides = Sides.ONE_SIDED; ++ } ++ attributes.add(sides); ++ } ++ ++ if ((fields & DM_PAPERSIZE) != 0) { ++ addPaperSize(attributes, dmPaperSize, dmPaperWidth, dmPaperLength); ++ } ++ ++ if ((fields & DM_DEFAULTSOURCE) != 0) { ++ MediaTray tray = ++ ((Win32PrintService)myService).findMediaTray(dmDefaultSource); ++ attributes.add(new SunAlternateMedia(tray)); ++ } ++ } ++ ++ private native boolean showDocProperties(long hWnd, ++ PrintRequestAttributeSet aset, ++ int dmFields, ++ short copies, ++ short collate, ++ short color, ++ short duplex, ++ short orient, ++ short paper, ++ short bin, ++ short xres_quality, ++ short yres); ++ ++ @SuppressWarnings("deprecation") ++ public PrintRequestAttributeSet ++ showDocumentProperties(Window owner, ++ PrintService service, ++ PrintRequestAttributeSet aset) ++ { ++ try { ++ setNativePrintServiceIfNeeded(service.getName()); ++ } catch (PrinterException e) { ++ } ++ long hWnd = ((WWindowPeer)(owner.getPeer())).getHWnd(); ++ DevModeValues info = new DevModeValues(); ++ getDevModeValues(aset, info); ++ boolean ok = ++ showDocProperties(hWnd, aset, ++ info.dmFields, ++ info.copies, ++ info.collate, ++ info.color, ++ info.duplex, ++ info.orient, ++ info.paper, ++ info.bin, ++ info.xres_quality, ++ info.yres); ++ ++ if (ok) { ++ return aset; ++ } else { ++ return null; ++ } ++ } - Error: - if (p -> Segments) _cmsFree(ContextID, p ->Segments); -@@ -423,7 +424,7 @@ - if (e > 0) - Val = pow(e, Params[0]) + Params[5]; - else -- Val = 0; -+ Val = Params[5]; + /* Printer Resolution. See also getXRes() and getYRes() */ + private final void setResolutionDPI(int xres, int yres) { +@@ -1944,7 +2233,7 @@ } - else - Val = R*Params[3] + Params[6]; -@@ -458,7 +459,7 @@ - e = Params[1]*R + Params[2]; + //** END Functions called by native code for querying/updating attributes - if (e < 0) -- Val = 0; -+ Val = Params[3]; - else - Val = pow(e, Params[0]) + Params[3]; - break; -@@ -478,7 +479,7 @@ +- } ++ } - e = Params[2] * pow(R, Params[0]) + Params[3]; - if (e <= 0) -- Val = 0; -+ Val = Params[4]; - else - Val = Params[1]*log10(e) + Params[4]; - break; -@@ -544,7 +545,7 @@ - // Type == 0 means segment is sampled - if (g ->Segments[i].Type == 0) { + class PrintToFileErrorDialog extends Dialog implements ActionListener{ + public PrintToFileErrorDialog(Frame parent, String title, String message, +--- ./jdk/src/windows/classes/sun/awt/windows/WToolkit.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/awt/windows/WToolkit.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -37,7 +37,9 @@ + import java.security.AccessController; + import java.security.PrivilegedAction; + import sun.awt.AWTAutoShutdown; ++import sun.awt.AppContext; + import sun.awt.SunToolkit; ++import sun.misc.ThreadGroupUtils; + import sun.awt.Win32GraphicsDevice; + import sun.awt.Win32GraphicsEnvironment; + import sun.java2d.d3d.D3DRenderQueue; +@@ -215,7 +217,7 @@ -- cmsFloat32Number R1 = (cmsFloat32Number) (R - g ->Segments[i].x0); -+ cmsFloat32Number R1 = (cmsFloat32Number) (R - g ->Segments[i].x0) / (g ->Segments[i].x1 - g ->Segments[i].x0); - cmsFloat32Number Out; + private static native void postDispose(); - // Setup the table (TODO: clean that) -@@ -629,20 +630,21 @@ - // Use a segmented curve to store the floating point table - cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[]) - { -- cmsCurveSegment Seg[2]; -+ cmsCurveSegment Seg[3]; +- private static native boolean startToolkitThread(Runnable thread); ++ private static native boolean startToolkitThread(Runnable thread, ThreadGroup rootThreadGroup); -- // Initialize segmented curve part up to 0 -- Seg[0].x0 = -1; -+ // A segmented tone curve should have function segments in the first and last positions -+ // Initialize segmented curve part up to 0 to constant value = samples[0] -+ Seg[0].x0 = MINUS_INF; - Seg[0].x1 = 0; - Seg[0].Type = 6; + public WToolkit() { + // Startup toolkit threads +@@ -232,8 +234,15 @@ + */ + AWTAutoShutdown.notifyToolkitThreadBusy(); - Seg[0].Params[0] = 1; - Seg[0].Params[1] = 0; - Seg[0].Params[2] = 0; -- Seg[0].Params[3] = 0; -+ Seg[0].Params[3] = values[0]; - Seg[0].Params[4] = 0; +- if (!startToolkitThread(this)) { +- Thread toolkitThread = new Thread(this, "AWT-Windows"); ++ // Find a root TG and attach Appkit thread to it ++ ThreadGroup rootTG = AccessController.doPrivileged(new PrivilegedAction() { ++ @Override ++ public ThreadGroup run() { ++ return ThreadGroupUtils.getRootThreadGroup(); ++ } ++ }); ++ if (!startToolkitThread(this, rootTG)) { ++ Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); + toolkitThread.setDaemon(true); + toolkitThread.start(); + } +@@ -263,14 +272,7 @@ + private final void registerShutdownHook() { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { +- ThreadGroup currentTG = +- Thread.currentThread().getThreadGroup(); +- ThreadGroup parentTG = currentTG.getParent(); +- while (parentTG != null) { +- currentTG = parentTG; +- parentTG = currentTG.getParent(); +- } +- Thread shutdown = new Thread(currentTG, new Runnable() { ++ Thread shutdown = new Thread(ThreadGroupUtils.getRootThreadGroup(), new Runnable() { + public void run() { + shutdown(); + } +@@ -283,7 +285,14 @@ + } -- // From zero to any -+ // From zero to 1 - Seg[1].x0 = 0; - Seg[1].x1 = 1.0; - Seg[1].Type = 0; -@@ -650,7 +652,19 @@ - Seg[1].nGridPoints = nEntries; - Seg[1].SampledPoints = (cmsFloat32Number*) values; + public void run() { +- Thread.currentThread().setPriority(Thread.NORM_PRIORITY+1); ++ AccessController.doPrivileged(new PrivilegedAction() { ++ @Override ++ public Void run() { ++ Thread.currentThread().setContextClassLoader(null); ++ return null; ++ } ++ }); ++ Thread.currentThread().setPriority(Thread.NORM_PRIORITY + 1); + boolean startPump = init(); -- return cmsBuildSegmentedToneCurve(ContextID, 2, Seg); -+ // Final segment is constant = lastsample -+ Seg[2].x0 = 1.0; -+ Seg[2].x1 = PLUS_INF; -+ Seg[2].Type = 6; + if (startPump) { +@@ -856,6 +865,7 @@ + */ + private void windowsSettingChange() { + EventQueue.invokeLater(new Runnable() { ++ @Override + public void run() { + updateProperties(); + } +--- ./jdk/src/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 2013-09-06 11:29:13.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 2014-04-19 01:27:12.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,8 +36,9 @@ + import java.security.PrivilegedAction; + import java.util.ArrayList; + import java.util.HashMap; +-import sun.awt.SunToolkit; + -+ Seg[2].Params[0] = 1; -+ Seg[2].Params[1] = 0; -+ Seg[2].Params[2] = 0; -+ Seg[2].Params[3] = values[nEntries-1]; -+ Seg[2].Params[4] = 0; + import sun.awt.AWTAccessor; ++import sun.misc.ThreadGroupUtils; + import sun.awt.Win32GraphicsConfig; + import sun.awt.windows.WComponentPeer; + import sun.java2d.InvalidPipeException; +@@ -92,30 +93,26 @@ + public D3DScreenUpdateManager() { + done = false; + AccessController.doPrivileged( +- new PrivilegedAction() { +- public Object run() { +- ThreadGroup currentTG = +- Thread.currentThread().getThreadGroup(); +- ThreadGroup parentTG = currentTG.getParent(); +- while (parentTG != null) { +- currentTG = parentTG; +- parentTG = currentTG.getParent(); +- } +- Thread shutdown = new Thread(currentTG, new Runnable() { ++ new PrivilegedAction() { ++ @Override ++ public Void run() { ++ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); ++ Thread shutdown = new Thread(rootTG, new Runnable() { ++ @Override + public void run() { + done = true; + wakeUpUpdateThread(); + } + }); +- shutdown.setContextClassLoader(null); +- try { +- Runtime.getRuntime().addShutdownHook(shutdown); +- } catch (Exception e) { +- done = true; ++ shutdown.setContextClassLoader(null); ++ try { ++ Runtime.getRuntime().addShutdownHook(shutdown); ++ } catch (Exception e) { ++ done = true; ++ } ++ return null; + } +- return null; + } +- } + ); + } + +@@ -354,21 +351,20 @@ + */ + private synchronized void startUpdateThread() { + if (screenUpdater == null) { +- screenUpdater = (Thread)java.security.AccessController.doPrivileged( +- new java.security.PrivilegedAction() { +- public Object run() { +- ThreadGroup tg = +- Thread.currentThread().getThreadGroup(); +- for (ThreadGroup tgn = tg; +- tgn != null; tg = tgn, tgn = tg.getParent()); +- Thread t = new Thread(tg, D3DScreenUpdateManager.this, +- "D3D Screen Updater"); +- // REMIND: should it be higher? +- t.setPriority(Thread.NORM_PRIORITY + 2); +- t.setDaemon(true); +- return t; +- } +- }); ++ screenUpdater = AccessController.doPrivileged( ++ new PrivilegedAction() { ++ @Override ++ public Thread run() { ++ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); ++ Thread t = new Thread(rootTG, ++ D3DScreenUpdateManager.this, ++ "D3D Screen Updater"); ++ // REMIND: should it be higher? ++ t.setPriority(Thread.NORM_PRIORITY + 2); ++ t.setDaemon(true); ++ return t; ++ } ++ }); + screenUpdater.start(); + } else { + wakeUpUpdateThread(); +--- ./jdk/src/windows/classes/sun/net/PortConfig.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/windows/classes/sun/net/PortConfig.java 2014-01-18 12:16:22.000000000 -0800 +@@ -0,0 +1,65 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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.net; + -+ return cmsBuildSegmentedToneCurve(ContextID, 3, Seg); - } ++import java.security.AccessController; ++ ++/** ++ * Determines the ephemeral port range in use on this system. ++ * If this cannot be determined, then the default settings ++ * of the OS are returned. ++ */ ++ ++public final class PortConfig { ++ ++ private final static int upper, lower; ++ ++ private PortConfig() {} ++ ++ static { ++ AccessController.doPrivileged( ++ new java.security.PrivilegedAction() { ++ public Void run() { ++ System.loadLibrary("net"); ++ return null; ++ } ++ }); ++ ++ lower = getLower0(); ++ upper = getUpper0(); ++ } ++ ++ static native int getLower0(); ++ static native int getUpper0(); ++ ++ public static int getLower() { ++ return lower; ++ } ++ ++ public static int getUpper() { ++ return upper; ++ } ++} +--- ./jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java 2014-06-06 19:56:31.000000000 -0700 +@@ -230,6 +230,7 @@ + @Override + public void run() { + long overlapped = 0L; ++ boolean pending = false; + try { + begin(); + +@@ -243,6 +244,7 @@ + overlapped); + if (n == IOStatus.UNAVAILABLE) { + // I/O is pending ++ pending = true; + return; + } + // acquired lock immediately +@@ -252,10 +254,10 @@ + } catch (Throwable x) { + // lock failed or channel closed + removeFromFileLockTable(fli); +- if (overlapped != 0L) +- ioCache.remove(overlapped); + result.setFailure(toIOException(x)); + } finally { ++ if (!pending && overlapped != 0L) ++ ioCache.remove(overlapped); + end(); + } - // Parametric curves -@@ -993,7 +1007,7 @@ +--- ./jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java 2014-01-18 12:16:22.000000000 -0800 +@@ -31,6 +31,9 @@ + import java.net.*; + import java.util.concurrent.*; + import java.io.IOException; ++import java.security.AccessController; ++import java.security.PrivilegedActionException; ++import java.security.PrivilegedExceptionAction; + import sun.misc.Unsafe; - if (Tab == NULL) return FALSE; + /** +@@ -300,6 +303,19 @@ + } + } + ++ private void doPrivilegedBind(final SocketAddress sa) throws IOException { ++ try { ++ AccessController.doPrivileged(new PrivilegedExceptionAction() { ++ public Void run() throws IOException { ++ bind(sa); ++ return null; ++ } ++ }); ++ } catch (PrivilegedActionException e) { ++ throw (IOException) e.getException(); ++ } ++ } ++ + @Override + Future implConnect(SocketAddress remote, + A attachment, +@@ -330,7 +346,12 @@ + throw new ConnectionPendingException(); + if (localAddress == null) { + try { +- bind(new InetSocketAddress(0)); ++ SocketAddress any = new InetSocketAddress(0); ++ if (sm == null) { ++ bind(any); ++ } else { ++ doPrivilegedBind(any); ++ } + } catch (IOException x) { + bindException = x; + } +--- ./jdk/src/windows/classes/sun/nio/fs/WindowsConstants.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/nio/fs/WindowsConstants.java 2014-06-06 19:56:31.000000000 -0700 +@@ -100,6 +100,7 @@ + public static final int ERROR_INVALID_LEVEL = 124; + public static final int ERROR_DIR_NOT_EMPTY = 145; + public static final int ERROR_ALREADY_EXISTS = 183; ++ public static final int ERROR_MORE_DATA = 234; + public static final int ERROR_DIRECTORY = 267; + public static final int ERROR_NOTIFY_ENUM_DIR = 1022; + public static final int ERROR_NONE_MAPPED = 1332; +--- ./jdk/src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java 2014-06-06 19:56:31.000000000 -0700 +@@ -973,19 +973,19 @@ + * HANDLE CreateIoCompletionPort ( + * HANDLE FileHandle, + * HANDLE ExistingCompletionPort, +- * DWORD CompletionKey, ++ * ULONG_PTR CompletionKey, + * DWORD NumberOfConcurrentThreads + * ) + */ + static native long CreateIoCompletionPort(long fileHandle, long existingPort, +- int completionKey) throws WindowsException; ++ long completionKey) throws WindowsException; -- if (cmsIsToneCurveLinear(Tab)) return FALSE; // Nothing to do -+ if (cmsIsToneCurveLinear(Tab)) return TRUE; // Nothing to do - nItems = Tab -> nEntries; + /** + * GetQueuedCompletionStatus( + * HANDLE CompletionPort, + * LPDWORD lpNumberOfBytesTransferred, +- * LPDWORD lpCompletionKey, ++ * PULONG_PTR lpCompletionKey, + * LPOVERLAPPED *lpOverlapped, + * DWORD dwMilliseconds + */ +@@ -999,12 +999,12 @@ + static class CompletionStatus { + private int error; + private int bytesTransferred; +- private int completionKey; ++ private long completionKey; + private CompletionStatus() { } + + int error() { return error; } + int bytesTransferred() { return bytesTransferred; } +- int completionKey() { return completionKey; } ++ long completionKey() { return completionKey; } + } + private static native void GetQueuedCompletionStatus0(long completionPort, + CompletionStatus status) throws WindowsException; +@@ -1013,12 +1013,12 @@ + * PostQueuedCompletionStatus( + * HANDLE CompletionPort, + * DWORD dwNumberOfBytesTransferred, +- * DWORD dwCompletionKey, ++ * ULONG_PTR dwCompletionKey, + * LPOVERLAPPED lpOverlapped + * ) + */ + static native void PostQueuedCompletionStatus(long completionPort, +- int completionKey) throws WindowsException; ++ long completionKey) throws WindowsException; -@@ -1020,11 +1034,20 @@ + /** + * ReadDirectoryChangesW( +--- ./jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java 2014-06-06 19:56:31.000000000 -0700 +@@ -41,6 +41,7 @@ + class WindowsWatchService + extends AbstractWatchService + { ++ private final static int WAKEUP_COMPLETION_KEY = 0; + private final Unsafe unsafe = Unsafe.getUnsafe(); - if (z[i] == 0.) Zeros++; - if (z[i] >= 65535.) Poles++; -- if (z[i] < z[i-1]) return FALSE; // Non-Monotonic -+ if (z[i] < z[i-1]) { -+ cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Non-Monotonic."); -+ return FALSE; -+ } + // background thread to service I/O completion port +@@ -83,7 +84,7 @@ + */ + private class WindowsWatchKey extends AbstractWatchKey { + // file key (used to detect existing registrations) +- private FileKey fileKey; ++ private final FileKey fileKey; + + // handle to directory + private volatile long handle = INVALID_HANDLE_VALUE; +@@ -223,8 +224,7 @@ + FileKey other = (FileKey)obj; + if (this.volSerialNumber != other.volSerialNumber) return false; + if (this.fileIndexHigh != other.fileIndexHigh) return false; +- if (this.fileIndexLow != other.fileIndexLow) return false; +- return true; ++ return this.fileIndexLow == other.fileIndexLow; + } } -- if (Zeros > (nItems / 3)) return FALSE; // Degenerated, mostly zeros -- if (Poles > (nItems / 3)) return FALSE; // Degenerated, mostly poles -+ if (Zeros > (nItems / 3)) { -+ cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly zeros."); -+ return FALSE; -+ } -+ if (Poles > (nItems / 3)) { -+ cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly poles."); -+ return FALSE; -+ } +@@ -268,6 +268,7 @@ + private static final short OFFSETOF_FILENAME = 12; - // Seems ok - for (i=0; i < nItems; i++) { ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsgmt.c 2014-04-20 12:39:16.000000000 -0700 -@@ -249,13 +249,10 @@ - cmsFloat64Number dE1, dE2, ErrorRatio; + // size of per-directory buffer for events (FIXME - make this configurable) ++ // Need to be less than 4*16384 = 65536. DWORD align. + private static final int CHANGES_BUFFER_SIZE = 16 * 1024; - // Assume in-gamut by default. -- dE1 = 0.; -- dE2 = 0; - ErrorRatio = 1.0; + private final WindowsFileSystem fs; +@@ -275,27 +276,28 @@ + private final long port; - // Convert input to Lab -- if (t -> hInput != NULL) -- cmsDoTransform(t -> hInput, In, &LabIn1, 1); -+ cmsDoTransform(t -> hInput, In, &LabIn1, 1); + // maps completion key to WatchKey +- private final Map int2key; ++ private final Map ck2key; - // converts from PCS to colorant. This always - // does return in-gamut values, -@@ -267,7 +264,7 @@ - memmove(&LabIn2, &LabOut1, sizeof(cmsCIELab)); + // maps file key to WatchKey + private final Map fk2key; - // Try again, but this time taking Check as input -- cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1); -+ cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1); - cmsDoTransform(t -> hReverse, Proof2, &LabOut2, 1); + // unique completion key for each directory ++ // native completion key capacity is 64 bits on Win64. + private int lastCompletionKey; - // Take difference of direct value -@@ -374,7 +371,7 @@ - ProfileList[nGamutPCSposition] = hLab; - BPCList[nGamutPCSposition] = 0; - AdaptationList[nGamutPCSposition] = 1.0; -- Intents[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC; -+ IntentList[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC; + Poller(WindowsFileSystem fs, WindowsWatchService watcher, long port) { + this.fs = fs; + this.watcher = watcher; + this.port = port; +- this.int2key = new HashMap(); +- this.fk2key = new HashMap(); ++ this.ck2key = new HashMap<>(); ++ this.fk2key = new HashMap<>(); + this.lastCompletionKey = 0; + } + @Override + void wakeup() throws IOException { + try { +- PostQueuedCompletionStatus(port, 0); ++ PostQueuedCompletionStatus(port, WAKEUP_COMPLETION_KEY); + } catch (WindowsException x) { + throw new IOException(x.getMessage()); + } +@@ -322,7 +324,6 @@ + for (WatchEvent.Modifier modifier: modifiers) { + if (modifier == ExtendedWatchEventModifier.FILE_TREE) { + watchSubtree = true; +- continue; + } else { + if (modifier == null) + return new NullPointerException(); +@@ -333,7 +334,7 @@ + } - ColorSpace = cmsGetColorSpace(hGamut); -@@ -385,45 +382,48 @@ + // open directory +- long handle = -1L; ++ long handle; + try { + handle = CreateFile(dir.getPathForWin32Calls(), + FILE_LIST_DIRECTORY, +@@ -347,7 +348,7 @@ + boolean registered = false; + try { + // read attributes and check file is a directory +- WindowsFileAttributes attrs = null; ++ WindowsFileAttributes attrs; + try { + attrs = WindowsFileAttributes.readAttributes(handle); + } catch (WindowsException x) { +@@ -370,9 +371,10 @@ + return existing; + } - // 16 bits to Lab double - Chain.hInput = cmsCreateExtendedTransform(ContextID, -- nGamutPCSposition + 1, -- ProfileList, -- BPCList, -- Intents, -- AdaptationList, -- NULL, 0, -- dwFormat, TYPE_Lab_DBL, -- cmsFLAGS_NOCACHE); -+ nGamutPCSposition + 1, -+ ProfileList, -+ BPCList, -+ IntentList, -+ AdaptationList, -+ NULL, 0, -+ dwFormat, TYPE_Lab_DBL, -+ cmsFLAGS_NOCACHE); +- // unique completion key (skip 0) ++ // Can overflow the int type capacity. ++ // Skip WAKEUP_COMPLETION_KEY value. + int completionKey = ++lastCompletionKey; +- if (completionKey == 0) ++ if (completionKey == WAKEUP_COMPLETION_KEY) + completionKey = ++lastCompletionKey; + + // associate handle with completion port +@@ -418,13 +420,13 @@ + // 1. remove mapping from old completion key to existing watch key + // 2. release existing key's resources (handle/buffer) + // 3. re-initialize key with new handle/buffer +- int2key.remove(existing.completionKey()); ++ ck2key.remove(existing.completionKey()); + existing.releaseResources(); + watchKey = existing.init(handle, events, watchSubtree, buffer, + countAddress, overlappedAddress, completionKey); + } + // map completion map to watch key +- int2key.put(completionKey, watchKey); ++ ck2key.put(completionKey, watchKey); + + registered = true; + return watchKey; +@@ -440,7 +442,7 @@ + WindowsWatchKey key = (WindowsWatchKey)obj; + if (key.isValid()) { + fk2key.remove(key.fileKey()); +- int2key.remove(key.completionKey()); ++ ck2key.remove(key.completionKey()); + key.invalidate(); + } + } +@@ -449,11 +451,11 @@ + @Override + void implCloseAll() { + // cancel all keys +- for (Map.Entry entry: int2key.entrySet()) { ++ for (Map.Entry entry: ck2key.entrySet()) { + entry.getValue().invalidate(); + } + fk2key.clear(); +- int2key.clear(); ++ ck2key.clear(); + // close I/O completion port + CloseHandle(port); +@@ -517,7 +519,7 @@ + @Override + public void run() { + for (;;) { +- CompletionStatus info = null; ++ CompletionStatus info; + try { + info = GetQueuedCompletionStatus(port); + } catch (WindowsException x) { +@@ -527,7 +529,7 @@ + } - // Does create the forward step. Lab double to device - dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2)); - Chain.hForward = cmsCreateTransformTHR(ContextID, -- hLab, TYPE_Lab_DBL, -- hGamut, dwFormat, -- INTENT_RELATIVE_COLORIMETRIC, -- cmsFLAGS_NOCACHE); -+ hLab, TYPE_Lab_DBL, -+ hGamut, dwFormat, -+ INTENT_RELATIVE_COLORIMETRIC, -+ cmsFLAGS_NOCACHE); + // wakeup +- if (info.completionKey() == 0) { ++ if (info.completionKey() == WAKEUP_COMPLETION_KEY) { + boolean shutdown = processRequests(); + if (shutdown) { + return; +@@ -536,7 +538,7 @@ + } - // Does create the backwards step - Chain.hReverse = cmsCreateTransformTHR(ContextID, hGamut, dwFormat, -- hLab, TYPE_Lab_DBL, -- INTENT_RELATIVE_COLORIMETRIC, -- cmsFLAGS_NOCACHE); -+ hLab, TYPE_Lab_DBL, -+ INTENT_RELATIVE_COLORIMETRIC, -+ cmsFLAGS_NOCACHE); + // map completionKey to get WatchKey +- WindowsWatchKey key = int2key.get(info.completionKey()); ++ WindowsWatchKey key = ck2key.get((int)info.completionKey()); + if (key == null) { + // We get here when a registration is changed. In that case + // the directory is closed which causes an event with the +@@ -544,38 +546,44 @@ + continue; + } +- // ReadDirectoryChangesW failed +- if (info.error() != 0) { ++ boolean criticalError = false; ++ int errorCode = info.error(); ++ int messageSize = info.bytesTransferred(); ++ if (errorCode == ERROR_NOTIFY_ENUM_DIR) { + // buffer overflow +- if (info.error() == ERROR_NOTIFY_ENUM_DIR) { ++ key.signalEvent(StandardWatchEventKinds.OVERFLOW, null); ++ } else if (errorCode != 0 && errorCode != ERROR_MORE_DATA) { ++ // ReadDirectoryChangesW failed ++ criticalError = true; ++ } else { ++ // ERROR_MORE_DATA is a warning about incomplite ++ // data transfer over TCP/UDP stack. For the case ++ // [messageSize] is zero in the most of cases. ++ ++ if (messageSize > 0) { ++ // process non-empty events. ++ processEvents(key, messageSize); ++ } else if (errorCode == 0) { ++ // insufficient buffer size ++ // not described, but can happen. + key.signalEvent(StandardWatchEventKinds.OVERFLOW, null); +- } else { +- // other error so cancel key +- implCancelKey(key); +- key.signal(); + } +- continue; +- } - // All ok? -- if (Chain.hForward && Chain.hReverse) { -+ if (Chain.hInput && Chain.hForward && Chain.hReverse) { +- // process the events +- if (info.bytesTransferred() > 0) { +- processEvents(key, info.bytesTransferred()); +- } else { +- // insufficient buffer size +- key.signalEvent(StandardWatchEventKinds.OVERFLOW, null); ++ // start read for next batch of changes ++ try { ++ ReadDirectoryChangesW(key.handle(), ++ key.buffer().address(), ++ CHANGES_BUFFER_SIZE, ++ key.watchSubtree(), ++ ALL_FILE_NOTIFY_EVENTS, ++ key.countAddress(), ++ key.overlappedAddress()); ++ } catch (WindowsException x) { ++ // no choice but to cancel key ++ criticalError = true; ++ } + } +- +- // start read for next batch of changes +- try { +- ReadDirectoryChangesW(key.handle(), +- key.buffer().address(), +- CHANGES_BUFFER_SIZE, +- key.watchSubtree(), +- ALL_FILE_NOTIFY_EVENTS, +- key.countAddress(), +- key.overlappedAddress()); +- } catch (WindowsException x) { +- // no choice but to cancel key ++ if (criticalError) { + implCancelKey(key); + key.signal(); + } +--- ./jdk/src/windows/classes/sun/print/Win32MediaTray.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/print/Win32MediaTray.java 2014-06-06 19:56:31.000000000 -0700 +@@ -70,6 +70,10 @@ + winEnumTable.add(this); + } - // Go on, try to compute gamut LUT from PCS. This consist on a single channel containing - // dE when doing a transform back and forth on the colorimetric intent. ++ public int getDMBinID() { ++ return winID; ++ } ++ + private static final String[] myStringTable ={ + "Manual-Envelope", + "Automatic-Feeder", +--- ./jdk/src/windows/classes/sun/print/Win32PrintService.java 2013-09-06 11:29:14.000000000 -0700 ++++ ./jdk/src/windows/classes/sun/print/Win32PrintService.java 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,14 +25,13 @@ - Gamut = cmsPipelineAlloc(ContextID, 3, 1); + package sun.print; + ++import java.awt.Window; ++import java.awt.print.PrinterJob; + import java.io.File; + import java.net.URI; + import java.net.URISyntaxException; +-import java.net.URL; - - if (Gamut != NULL) { +-import java.util.Vector; ++import java.util.ArrayList; + import java.util.HashMap; +- + import javax.print.DocFlavor; + import javax.print.DocPrintJob; + import javax.print.PrintService; +@@ -42,6 +41,7 @@ + import javax.print.attribute.AttributeSetUtilities; + import javax.print.attribute.EnumSyntax; + import javax.print.attribute.HashAttributeSet; ++import javax.print.attribute.PrintRequestAttributeSet; + import javax.print.attribute.PrintServiceAttribute; + import javax.print.attribute.PrintServiceAttributeSet; + import javax.print.attribute.HashPrintServiceAttributeSet; +@@ -69,22 +69,15 @@ + import javax.print.attribute.standard.Sides; + import javax.print.attribute.standard.ColorSupported; + import javax.print.attribute.standard.PrintQuality; +-import javax.print.attribute.ResolutionSyntax; + import javax.print.attribute.standard.PrinterResolution; + import javax.print.attribute.standard.SheetCollate; + import javax.print.event.PrintServiceAttributeListener; +-import java.util.ArrayList; +- +-import sun.print.SunPrinterJobService; ++import sun.awt.windows.WPrinterJob; -- CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL); -- cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT); + public class Win32PrintService implements PrintService, AttributeUpdater, + SunPrinterJobService { + +- public static MediaSize[] predefMedia; - -- cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0); -+ CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL); -+ if (!cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT)) { -+ cmsPipelineFree(Gamut); -+ Gamut = NULL; -+ } -+ else { -+ cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0); -+ } - } +- static { +- Class c = Win32MediaSize.class; +- } ++ public static MediaSize[] predefMedia = Win32MediaSize.getPredefMedia(); + + private static final DocFlavor[] supportedFlavors = { + DocFlavor.BYTE_ARRAY.GIF, +@@ -290,6 +283,22 @@ + return 0; } - else ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsintrp.c 2014-04-20 12:39:16.000000000 -0700 -@@ -83,7 +83,6 @@ ++ public int findTrayID(MediaTray tray) { ++ ++ getMediaTrays(); // make sure they are initialised. ++ ++ if (tray instanceof Win32MediaTray) { ++ Win32MediaTray winTray = (Win32MediaTray)tray; ++ return winTray.getDMBinID(); ++ } ++ for (int id=0; id= 1 && dmBin <= dmPaperBinToPrintService.length) { + return dmPaperBinToPrintService[dmBin-1]; +@@ -310,7 +319,9 @@ - // Set the interpolation method + public MediaSizeName findWin32Media(int dmIndex) { + if (dmIndex >= 1 && dmIndex <= dmPaperToPrintService.length) { +- switch(dmIndex) { ++ return dmPaperToPrintService[dmIndex - 1]; ++ } ++ switch(dmIndex) { + /* matching media sizes with indices beyond + dmPaperToPrintService's length */ + case DMPAPER_A2: +@@ -320,11 +331,8 @@ + case DMPAPER_B6_JIS: + return MediaSizeName.JIS_B6; + default: +- return dmPaperToPrintService[dmIndex - 1]; +- } ++ return null; + } - - cmsBool _cmsSetInterpolationRoutine(cmsInterpParams* p) - { - // Invoke factory, possibly in the Plug-in -@@ -215,6 +214,11 @@ - Output[0] = LinearInterp(rest, y0, y1); - } +- return null; + } -+// To prevent out of bounds indexing -+cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v) -+{ -+ return v < 0.0f ? 0.0f : (v > 1.0f ? 1.0f : v); -+} + private boolean addToUniqueList(ArrayList msnList, MediaSizeName mediaName) { +@@ -350,6 +358,7 @@ + } - // Floating-point version of 1D interpolation - static -@@ -227,13 +231,15 @@ - int cell0, cell1; - const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table; + ArrayList msnList = new ArrayList(); ++ ArrayList trailingWmsList = new ArrayList(); + ArrayList printableList = new ArrayList(); + MediaSizeName mediaName; + boolean added; +@@ -368,7 +377,8 @@ + idList.add(Integer.valueOf(media[i])); + } -+ val2 = fclamp(Value[0]); -+ - // if last value... -- if (Value[0] == 1.0) { -+ if (val2 == 1.0) { - Output[0] = LutTable[p -> Domain[0]]; - return; - } +- mediaSizes = getMediaSizes(idList, media); ++ ArrayList dmPaperNameList = new ArrayList(); ++ mediaSizes = getMediaSizes(idList, media, dmPaperNameList); + for (int i = 0; i < idList.size(); i++) { -- val2 = p -> Domain[0] * Value[0]; -+ val2 *= p -> Domain[0]; + // match Win ID with our predefined ID using table +@@ -387,6 +397,7 @@ + mediaName = null; + } + } ++ boolean dmPaperIDMatched = (mediaName != null); - cell0 = (int) floor(val2); - cell1 = (int) ceil(val2); -@@ -292,13 +298,15 @@ - cmsUInt32Number OutChan; - const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table; + // No match found, then we get the MediaSizeName out of the MediaSize + // This requires 1-1 correspondence, lengths must be checked. +@@ -395,9 +406,32 @@ + } -+ val2 = fclamp(Value[0]); -+ - // if last value... -- if (Value[0] == 1.0) { -+ if (val2 == 1.0) { - Output[0] = LutTable[p -> Domain[0]]; - return; - } + // Add mediaName to the msnList ++ added = false; + if (mediaName != null) { + added = addToUniqueList(msnList, mediaName); + } ++ if ((!dmPaperIDMatched || !added) && (idList.size() == dmPaperNameList.size())) { ++ /* The following block allows to add such media names to the list, whose sizes ++ * matched with media sizes predefined in JDK, while whose paper IDs did not, ++ * or whose sizes and paper IDs both did not match with any predefined in JDK. ++ */ ++ Win32MediaSize wms = Win32MediaSize.findMediaName(dmPaperNameList.get(i)); ++ if ((wms == null) && (idList.size() == mediaSizes.length)) { ++ wms = new Win32MediaSize(dmPaperNameList.get(i), (Integer)idList.get(i)); ++ mediaSizes[i] = new MediaSize(mediaSizes[i].getX(MediaSize.MM), ++ mediaSizes[i].getY(MediaSize.MM), MediaSize.MM, wms); ++ } ++ if ((wms != null) && (wms != mediaName)) { ++ if (!added) { ++ added = addToUniqueList(msnList, mediaName = wms); ++ } else { ++ trailingWmsList.add(wms); ++ } ++ } ++ } ++ } ++ for (Win32MediaSize wms : trailingWmsList) { ++ added = addToUniqueList(msnList, wms); + } -- val2 = p -> Domain[0] * Value[0]; -+ val2 *= p -> Domain[0]; + // init mediaSizeNames +@@ -588,7 +622,11 @@ + } - cell0 = (int) floor(val2); - cell1 = (int) ceil(val2); -@@ -339,8 +347,8 @@ - dxy; - TotalOut = p -> nOutputs; -- px = Input[0] * p->Domain[0]; -- py = Input[1] * p->Domain[1]; -+ px = fclamp(Input[0]) * p->Domain[0]; -+ py = fclamp(Input[1]) * p->Domain[1]; +- private MediaSize[] getMediaSizes(ArrayList idList, int[] media) { ++ private MediaSize[] getMediaSizes(ArrayList idList, int[] media, ArrayList dmPaperNameList) { ++ if (dmPaperNameList == null) { ++ dmPaperNameList = new ArrayList(); ++ } ++ + String prnPort = getPort(); + int[] mediaSz = getAllMediaSizes(printer, prnPort); + String[] winMediaNames = getAllMediaNames(printer, prnPort); +@@ -607,40 +645,43 @@ + wid = mediaSz[i*2]/10f; + ht = mediaSz[i*2+1]/10f; + +- // Make sure to validate wid & ht. +- // HP LJ 4050 (german) causes IAE in Sonderformat paper, wid & ht +- // returned is not constant. +- if ((wid <= 0) || (ht <= 0)) { +- //Remove corresponding ID from list +- if (nMedia == media.length) { +- Integer remObj = Integer.valueOf(media[i]); +- idList.remove(idList.indexOf(remObj)); ++ // Make sure to validate wid & ht. ++ // HP LJ 4050 (german) causes IAE in Sonderformat paper, wid & ht ++ // returned is not constant. ++ if ((wid <= 0) || (ht <= 0)) { ++ //Remove corresponding ID from list ++ if (nMedia == media.length) { ++ Integer remObj = Integer.valueOf(media[i]); ++ idList.remove(idList.indexOf(remObj)); ++ } ++ continue; + } +- continue; +- } +- // Find matching media using dimensions. +- // This call matches only with our own predefined sizes. +- msn = findMatchingMediaSizeNameMM(wid, ht); +- if (msn != null) { +- ms = MediaSize.getMediaSizeForName(msn); +- } +- +- if (ms != null) { +- msList.add(ms); +- } else { +- Win32MediaSize wms = +- new Win32MediaSize(winMediaNames[i], media[i]); +- try { +- ms = new MediaSize(wid, ht, MediaSize.MM, wms); +- msList.add(ms); +- } catch(IllegalArgumentException e) { +- if (nMedia == media.length) { +- Integer remObj = Integer.valueOf(media[i]); +- idList.remove(idList.indexOf(remObj)); +- } ++ // Find matching media using dimensions. ++ // This call matches only with our own predefined sizes. ++ msn = findMatchingMediaSizeNameMM(wid, ht); ++ if (msn != null) { ++ ms = MediaSize.getMediaSizeForName(msn); + } +- } - x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0; - y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0; -@@ -454,20 +462,9 @@ - TotalOut = p -> nOutputs; ++ if (ms != null) { ++ msList.add(ms); ++ dmPaperNameList.add(winMediaNames[i]); ++ } else { ++ Win32MediaSize wms = Win32MediaSize.findMediaName(winMediaNames[i]); ++ if (wms == null) { ++ wms = new Win32MediaSize(winMediaNames[i], media[i]); ++ } ++ try { ++ ms = new MediaSize(wid, ht, MediaSize.MM, wms); ++ msList.add(ms); ++ dmPaperNameList.add(winMediaNames[i]); ++ } catch(IllegalArgumentException e) { ++ if (nMedia == media.length) { ++ Integer remObj = Integer.valueOf(media[i]); ++ idList.remove(idList.indexOf(remObj)); ++ } ++ } ++ } + } + + MediaSize[] arr2 = new MediaSize[msList.size()]; +@@ -649,7 +690,6 @@ + return arr2; + } - // We need some clipping here -- px = Input[0]; -- py = Input[1]; -- pz = Input[2]; -- -- if (px < 0) px = 0; -- if (px > 1) px = 1; -- if (py < 0) py = 0; -- if (py > 1) py = 1; -- if (pz < 0) pz = 0; -- if (pz > 1) pz = 1; - -- px *= p->Domain[0]; -- py *= p->Domain[1]; -- pz *= p->Domain[2]; -+ px = fclamp(Input[0]) * p->Domain[0]; -+ py = fclamp(Input[1]) * p->Domain[1]; -+ pz = fclamp(Input[2]) * p->Domain[2]; + private PrinterIsAcceptingJobs getPrinterIsAcceptingJobs() { + if (getJobStatus(printer, 2) != 1) { + return PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS; +@@ -1572,8 +1612,76 @@ + } + } - x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0; - y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0; -@@ -609,20 +606,9 @@ - TotalOut = p -> nOutputs; +- public ServiceUIFactory getServiceUIFactory() { +- return null; ++ private Win32DocumentPropertiesUI docPropertiesUI = null; ++ ++ private static class Win32DocumentPropertiesUI ++ extends DocumentPropertiesUI { ++ ++ Win32PrintService service; ++ ++ private Win32DocumentPropertiesUI(Win32PrintService s) { ++ service = s; ++ } ++ ++ public PrintRequestAttributeSet ++ showDocumentProperties(PrinterJob job, ++ Window owner, ++ PrintService service, ++ PrintRequestAttributeSet aset) { ++ ++ if (!(job instanceof WPrinterJob)) { ++ return null; ++ } ++ WPrinterJob wJob = (WPrinterJob)job; ++ return wJob.showDocumentProperties(owner, service, aset); ++ } ++ } ++ ++ private synchronized DocumentPropertiesUI getDocumentPropertiesUI() { ++ return new Win32DocumentPropertiesUI(this); ++ } ++ ++ private static class Win32ServiceUIFactory extends ServiceUIFactory { ++ ++ Win32PrintService service; ++ ++ Win32ServiceUIFactory(Win32PrintService s) { ++ service = s; ++ } ++ ++ public Object getUI(int role, String ui) { ++ if (role <= ServiceUIFactory.MAIN_UIROLE) { ++ return null; ++ } ++ if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE && ++ DocumentPropertiesUI.DOCPROPERTIESCLASSNAME.equals(ui)) ++ { ++ return service.getDocumentPropertiesUI(); ++ } ++ throw new IllegalArgumentException("Unsupported role"); ++ } ++ ++ public String[] getUIClassNamesForRole(int role) { ++ ++ if (role <= ServiceUIFactory.MAIN_UIROLE) { ++ return null; ++ } ++ if (role == DocumentPropertiesUI.DOCUMENTPROPERTIES_ROLE) { ++ String[] names = new String[0]; ++ names[0] = DocumentPropertiesUI.DOCPROPERTIESCLASSNAME; ++ return names; ++ } ++ throw new IllegalArgumentException("Unsupported role"); ++ } ++ } ++ ++ private Win32ServiceUIFactory uiFactory = null; ++ ++ public synchronized ServiceUIFactory getServiceUIFactory() { ++ if (uiFactory == null) { ++ uiFactory = new Win32ServiceUIFactory(this); ++ } ++ return uiFactory; + } - // We need some clipping here -- px = Input[0]; -- py = Input[1]; -- pz = Input[2]; -- -- if (px < 0) px = 0; -- if (px > 1) px = 1; -- if (py < 0) py = 0; -- if (py > 1) py = 1; -- if (pz < 0) pz = 0; -- if (pz > 1) pz = 1; -- -- px *= p->Domain[0]; -- py *= p->Domain[1]; -- pz *= p->Domain[2]; -+ px = fclamp(Input[0]) * p->Domain[0]; -+ py = fclamp(Input[1]) * p->Domain[1]; -+ pz = fclamp(Input[2]) * p->Domain[2]; + public String toString() { +@@ -1614,6 +1722,7 @@ + class Win32MediaSize extends MediaSizeName { + private static ArrayList winStringTable = new ArrayList(); + private static ArrayList winEnumTable = new ArrayList(); ++ private static MediaSize[] predefMedia; - x0 = (int) _cmsQuickFloor(px); rx = (px - (cmsFloat32Number) x0); - y0 = (int) _cmsQuickFloor(py); ry = (py - (cmsFloat32Number) y0); -@@ -844,7 +830,7 @@ - register cmsUInt16Number Output[], - register const cmsInterpParams* p16) - { -- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table; -+ const cmsUInt16Number* LutTable; - cmsS15Fixed16Number fk; - cmsS15Fixed16Number k0, rk; - int K0, K1; -@@ -1039,8 +1025,7 @@ - cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; - cmsInterpParams p1; + private int dmPaperID; // driver ID for this paper. -- -- pk = Input[0] * p->Domain[0]; -+ pk = fclamp(Input[0]) * p->Domain[0]; - k0 = _cmsQuickFloor(pk); - rest = pk - (cmsFloat32Number) k0; +@@ -1627,6 +1736,18 @@ + return (winStringTable.size()-1); + } -@@ -1127,7 +1112,7 @@ - cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; - cmsInterpParams p1; ++ public static synchronized Win32MediaSize findMediaName(String name) { ++ int nameIndex = winStringTable.indexOf(name); ++ if (nameIndex != -1) { ++ return (Win32MediaSize)winEnumTable.get(nameIndex); ++ } ++ return null; ++ } ++ ++ public static MediaSize[] getPredefMedia() { ++ return predefMedia; ++ } ++ + public Win32MediaSize(String name, int dmPaper) { + super(nextValue(name)); + dmPaperID = dmPaper; +@@ -1638,18 +1759,17 @@ + } -- pk = Input[0] * p->Domain[0]; -+ pk = fclamp(Input[0]) * p->Domain[0]; - k0 = _cmsQuickFloor(pk); - rest = pk - (cmsFloat32Number) k0; + static { +- /* initialize Win32PrintService.predefMedia */ ++ /* initialize predefMedia */ + { + Win32MediaSize winMedia = new Win32MediaSize(-1); + + // cannot call getSuperEnumTable directly because of static context + MediaSizeName[] enumMedia = winMedia.getSuperEnumTable(); + if (enumMedia != null) { +- Win32PrintService.predefMedia = new MediaSize[enumMedia.length]; ++ predefMedia = new MediaSize[enumMedia.length]; + + for (int i=0; i 0) { +- char *p = strchr(pathname, ';'); +- if (p == NULL) { +- p = pathname + strlen(pathname); +- } +- /* check for NULL path */ +- if (p == pathname) { +- continue; +- } +- if (*(p-1) == ':' || *(p-1) == '\\') { +- (void)_snprintf(buffer, buflen, "%.*s%s.dll", (p - pathname), +- pathname, fname); +- } else { +- (void)_snprintf(buffer, buflen, "%.*s\\%s.dll", (p - pathname), +- pathname, fname); +- } ++ paths_copy = strdup(paths); ++ if (paths_copy == NULL) { ++ return; ++ } ++ ++ next_token = NULL; ++ path = strtok_s(paths_copy, ";", &next_token); ++ ++ while (path != NULL) { ++ _snprintf(buffer, buflen, "%s\\%s.dll", path, fname); + if (_access(buffer, 0) == 0) { + break; + } +- pathname = p + 1; + *buffer = '\0'; ++ path = strtok_s(NULL, ";", &next_token); + } ++ ++ free(paths_copy); + } -- pk = Input[0] * p->Domain[0]; -+ pk = fclamp(Input[0]) * p->Domain[0]; - k0 = _cmsQuickFloor(pk); - rest = pk - (cmsFloat32Number) k0; + /* Build a machine dependent library name out of a path and file name. */ + void +-md_build_library_name(char *holder, int holderlen, char *pname, char *fname) ++md_build_library_name(char *holder, int holderlen, const char *pname, const char *fname) + { + int pnamelen; -@@ -1299,7 +1284,7 @@ - cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; - cmsInterpParams p1; +--- ./jdk/src/windows/native/java/lang/ProcessImpl_md.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/lang/ProcessImpl_md.c 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -63,46 +63,52 @@ + return source; + } -- pk = Input[0] * p->Domain[0]; -+ pk = fclamp(Input[0]) * p->Domain[0]; - k0 = _cmsQuickFloor(pk); - rest = pk - (cmsFloat32Number) k0; ++static const char EXE_EXT[] = ".exe"; ++ + DWORD + selectProcessFlag(JNIEnv *env, jstring cmd0) + { +- char buf[MAX_PATH]; + DWORD newFlag = 0; +- char *exe, *p, *name; +- unsigned char buffer[2]; +- long headerLoc = 0; +- int fd = 0; +- +- exe = (char *)JNU_GetStringPlatformChars(env, cmd0, 0); +- exe = extractExecutablePath(env, exe); +- ++ char *exe = (char *)JNU_GetStringPlatformChars(env, cmd0, 0); + if (exe != NULL) { +- if ((p = strchr(exe, '\\')) == NULL) { +- SearchPath(NULL, exe, ".exe", MAX_PATH, buf, &name); +- } else { +- p = strrchr(exe, '\\'); +- *p = 0; +- p++; +- SearchPath(exe, p, ".exe", MAX_PATH, buf, &name); ++ char buf[MAX_PATH]; ++ char *name; ++ DWORD len; ++ exe = extractExecutablePath(env, exe); ++ if (exe != NULL) { ++ /* We are here for Win9x/Me, so the [/] is not the path sep */ ++ char *p = strrchr(exe, '\\'); ++ if (p == NULL) { ++ len = SearchPath(NULL, exe, EXE_EXT, MAX_PATH, buf, &name); ++ } else { ++ *p = 0; ++ len = SearchPath(exe, p + 1, EXE_EXT, MAX_PATH, buf, &name); ++ } + } +- } -@@ -1384,7 +1369,7 @@ - cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS]; - cmsInterpParams p1; +- fd = _open(buf, _O_RDONLY); +- if (fd > 0) { +- _read(fd, buffer, 2); +- if (buffer[0] == 'M' && buffer[1] == 'Z') { +- _lseek(fd, 60L, SEEK_SET); +- _read(fd, buffer, 2); +- headerLoc = (long)buffer[1] << 8 | (long)buffer[0]; +- _lseek(fd, headerLoc, SEEK_SET); +- _read(fd, buffer, 2); +- if (buffer[0] == 'P' && buffer[1] == 'E') { +- newFlag = DETACHED_PROCESS; ++ if (len > 0 && len < MAX_PATH) { ++ /* Here the [buf] path is valid and null terminated */ ++ int fd = _open(buf, _O_RDONLY); ++ if (fd != -1) { ++ unsigned char buffer[2]; ++ if (_read(fd, buffer, 2) == 2 ++ && buffer[0] == 'M' && buffer[1] == 'Z' ++ && _lseek(fd, 60L, SEEK_SET) == 60L ++ && _read(fd, buffer, 2) == 2) ++ { ++ long headerLoc = (long)buffer[1] << 8 | (long)buffer[0]; ++ if (_lseek(fd, headerLoc, SEEK_SET) == headerLoc ++ && _read(fd, buffer, 2) == 2 ++ && buffer[0] == 'P' && buffer[1] == 'E') ++ { ++ newFlag = DETACHED_PROCESS; ++ } ++ } ++ _close(fd); + } + } +- _close(fd); ++ JNU_ReleaseStringPlatformChars(env, cmd0, exe); + } +- JNU_ReleaseStringPlatformChars(env, cmd0, exe); + return newFlag; + } -- pk = Input[0] * p->Domain[0]; -+ pk = fclamp(Input[0]) * p->Domain[0]; - k0 = _cmsQuickFloor(pk); - rest = pk - (cmsFloat32Number) k0; +@@ -129,6 +135,237 @@ + CloseHandle(handle); + } + ++static BOOL hasInheritFlag(HANDLE handle) ++{ ++ DWORD mask; ++ if (GetHandleInformation(handle, &mask)) { ++ return mask & HANDLE_FLAG_INHERIT; ++ } ++ return FALSE; ++} ++ ++#define HANDLE_STORAGE_SIZE 6 ++#define OFFSET_READ 0 ++#define OFFSET_WRITE 1 ++//long signed version of INVALID_HANDLE_VALUE ++#define JAVA_INVALID_HANDLE_VALUE ((jlong) -1) ++#define OPPOSITE_END(offset) (offset==OFFSET_READ ? OFFSET_WRITE : OFFSET_READ) ++ ++/* Pipe holder structure */ ++typedef struct _STDHOLDER { ++ HANDLE pipe[2]; ++ int offset; ++} STDHOLDER; ++ ++/* Responsible for correct initialization of the [pHolder] structure ++ (that is used for handles recycling) if needs, ++ and appropriate setup of IOE handle [phStd] for child process based ++ on created pipe or Java handle. */ ++static BOOL initHolder( ++ JNIEnv *env, ++ jlong *pjhandles, /* IN OUT - the handle form Java, ++ that can be a file, console or undefined */ ++ STDHOLDER *pHolder, /* OUT - initialized structure that holds pipe ++ handles */ ++ HANDLE *phStd /* OUT - initialized handle for child process */ ++) { ++ /* Here we test the value from Java against invalid ++ handle value. We are not using INVALID_HANDLE_VALUE macro ++ due to double signed/unsigned and 32/64bit ambiguity. ++ Otherwise it will be easy to get the wrong ++ value 0x00000000FFFFFFFF ++ instead 0xFFFFFFFFFFFFFFFF. */ ++ if (*pjhandles != JAVA_INVALID_HANDLE_VALUE) { ++ /* Java file or console redirection */ ++ *phStd = (HANDLE) *pjhandles; ++ /* Here we set the related Java stream (Process.getXXXXStream()) ++ to [ProcessBuilder.NullXXXXStream.INSTANCE] value. ++ The initial Java handle [*pjhandles] will be closed in ++ ANY case. It is not a handle leak. */ ++ *pjhandles = JAVA_INVALID_HANDLE_VALUE; ++ } else { ++ /* Creation of parent-child pipe */ ++ if (!CreatePipe( ++ &pHolder->pipe[OFFSET_READ], ++ &pHolder->pipe[OFFSET_WRITE], ++ NULL, /* we would like to inherit ++ default process access, ++ instead of 'Everybody' access */ ++ PIPE_SIZE)) ++ { ++ win32Error(env, "CreatePipe"); ++ return FALSE; ++ } else { ++ /* [thisProcessEnd] has no the inherit flag because ++ the [lpPipeAttributes] param of [CreatePipe] ++ had the NULL value. */ ++ HANDLE thisProcessEnd = pHolder->pipe[OPPOSITE_END(pHolder->offset)]; ++ *phStd = pHolder->pipe[pHolder->offset]; ++ *pjhandles = (jlong) thisProcessEnd; ++ } ++ } ++ /* Pipe handle will be closed in the [releaseHolder] call, ++ file handle will be closed in Java. ++ The long-live handle need to restore the inherit flag, ++ we do it later in the [prepareIOEHandleState] call. */ ++ SetHandleInformation( ++ *phStd, ++ HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT); ++ return TRUE; ++} ++ ++/* Smart recycling of pipe handles in [pHolder]. For the failed ++ create process attempts, both ends of pipe need to be released. ++ The [complete] has the [TRUE] value in the failed attempt. */ ++static void releaseHolder(BOOL complete, STDHOLDER *pHolder) { ++ closeSafely(pHolder->pipe[pHolder->offset]); ++ if (complete) { ++ /* Error occur, close this process pipe end */ ++ closeSafely(pHolder->pipe[OPPOSITE_END(pHolder->offset)]); ++ } ++} ++ ++/* Stores and drops the inherit flag of handles that should not ++ be shared with the child process by default, but can hold the ++ inherit flag due to MS process birth specific. */ ++static void prepareIOEHandleState( ++ HANDLE *stdIOE, ++ BOOL *inherit) ++{ ++ int i; ++ for (i = 0; i < HANDLE_STORAGE_SIZE; ++i) { ++ HANDLE hstd = stdIOE[i]; ++ if (INVALID_HANDLE_VALUE != hstd && hasInheritFlag(hstd)) { ++ /* FALSE by default */ ++ inherit[i] = TRUE; ++ /* Java does not need implicit inheritance for IOE handles, ++ so we drop inherit flag that probably was installed by ++ previous CreateProcess call that launched current process. ++ We will return the handle state back after CreateProcess call. ++ By clearing inherit flag we prevent "greedy grandchild" birth. ++ The explicit inheritance for child process IOE handles is ++ implemented in the [initHolder] call. */ ++ SetHandleInformation(hstd, HANDLE_FLAG_INHERIT, 0); ++ } ++ } ++} ++ ++/* Restores the inheritance flag of handles from stored values. */ ++static void restoreIOEHandleState( ++ const HANDLE *stdIOE, ++ const BOOL *inherit) ++{ ++ /* The set of current process standard IOE handles and ++ the set of child process IOE handles can intersect. ++ To restore the inherit flag right, we use backward ++ array iteration. */ ++ int i; ++ for (i = HANDLE_STORAGE_SIZE - 1; i >= 0; --i) ++ if (INVALID_HANDLE_VALUE != stdIOE[i]) { ++ /* Restore inherit flag for any case. ++ The handle can be changed by explicit inheritance.*/ ++ SetHandleInformation(stdIOE[i], ++ HANDLE_FLAG_INHERIT, ++ inherit[i] ? HANDLE_FLAG_INHERIT : 0); ++ } ++} ++ ++/* Please, read about the MS inheritance problem ++ http://support.microsoft.com/kb/315939 ++ and critical section/synchronized block solution. */ ++static jlong processCreate( ++ JNIEnv *env, ++ const jchar *pcmd, ++ const jchar *penvBlock, ++ const jchar *pdir, ++ jlong *handles, ++ jboolean redirectErrorStream) ++{ ++ jlong ret = 0L; ++ STARTUPINFOW si = {sizeof(si)}; ++ ++ /* Handles for which the inheritance flag must be restored. */ ++ HANDLE stdIOE[HANDLE_STORAGE_SIZE] = { ++ /* Current process standard IOE handles: JDK-7147084 */ ++ INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, ++ /* Child process IOE handles: JDK-6921885 */ ++ (HANDLE)handles[0], (HANDLE)handles[1], (HANDLE)handles[2]}; ++ BOOL inherit[HANDLE_STORAGE_SIZE] = { ++ FALSE, FALSE, FALSE, ++ FALSE, FALSE, FALSE}; ++ ++ { ++ /* Extraction of current process standard IOE handles */ ++ DWORD idsIOE[3] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE}; ++ int i; ++ for (i = 0; i < 3; ++i) ++ /* Should not be closed by CloseHandle! */ ++ stdIOE[i] = GetStdHandle(idsIOE[i]); ++ } ++ ++ prepareIOEHandleState(stdIOE, inherit); ++ { ++ /* Input */ ++ STDHOLDER holderIn = {{INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}, OFFSET_READ}; ++ if (initHolder(env, &handles[0], &holderIn, &si.hStdInput)) { ++ ++ /* Output */ ++ STDHOLDER holderOut = {{INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}, OFFSET_WRITE}; ++ if (initHolder(env, &handles[1], &holderOut, &si.hStdOutput)) { ++ ++ /* Error */ ++ STDHOLDER holderErr = {{INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}, OFFSET_WRITE}; ++ BOOL success; ++ if (redirectErrorStream) { ++ si.hStdError = si.hStdOutput; ++ /* Here we set the error stream to [ProcessBuilder.NullInputStream.INSTANCE] ++ value. That is in accordance with Java Doc for the redirection case. ++ The Java file for the [ handles[2] ] will be closed in ANY case. It is not ++ a handle leak. */ ++ handles[2] = JAVA_INVALID_HANDLE_VALUE; ++ success = TRUE; ++ } else { ++ success = initHolder(env, &handles[2], &holderErr, &si.hStdError); ++ } ++ ++ if (success) { ++ PROCESS_INFORMATION pi; ++ DWORD processFlag = CREATE_UNICODE_ENVIRONMENT; ++ ++ /* Suppress popping-up of a console window for non-console applications */ ++ if (GetConsoleWindow() == NULL) ++ processFlag |= CREATE_NO_WINDOW; ++ ++ si.dwFlags = STARTF_USESTDHANDLES; ++ if (!CreateProcessW( ++ NULL, /* executable name */ ++ (LPWSTR)pcmd, /* command line */ ++ NULL, /* process security attribute */ ++ NULL, /* thread security attribute */ ++ TRUE, /* inherits system handles */ ++ processFlag, /* selected based on exe type */ ++ (LPVOID)penvBlock,/* environment block */ ++ (LPCWSTR)pdir, /* change to the new current directory */ ++ &si, /* (in) startup information */ ++ &pi)) /* (out) process information */ ++ { ++ win32Error(env, "CreateProcess"); ++ } else { ++ closeSafely(pi.hThread); ++ ret = (jlong)pi.hProcess; ++ } ++ } ++ releaseHolder(ret == 0, &holderErr); ++ releaseHolder(ret == 0, &holderOut); ++ } ++ releaseHolder(ret == 0, &holderIn); ++ } ++ } ++ restoreIOEHandleState(stdIOE, inherit); ++ ++ return ret; ++} ++ + JNIEXPORT jlong JNICALL + Java_java_lang_ProcessImpl_create(JNIEnv *env, jclass ignored, + jstring cmd, +@@ -137,142 +374,35 @@ + jlongArray stdHandles, + jboolean redirectErrorStream) + { +- HANDLE inRead = INVALID_HANDLE_VALUE; +- HANDLE inWrite = INVALID_HANDLE_VALUE; +- HANDLE outRead = INVALID_HANDLE_VALUE; +- HANDLE outWrite = INVALID_HANDLE_VALUE; +- HANDLE errRead = INVALID_HANDLE_VALUE; +- HANDLE errWrite = INVALID_HANDLE_VALUE; +- SECURITY_ATTRIBUTES sa; +- PROCESS_INFORMATION pi; +- STARTUPINFOW si; +- const jchar* pcmd = NULL; +- const jchar* pdir = NULL; +- const jchar* penvBlock = NULL; +- jlong *handles = NULL; + jlong ret = 0; +- OSVERSIONINFO ver; +- jboolean onNT = JNI_FALSE; +- DWORD processFlag; +- +- ver.dwOSVersionInfoSize = sizeof(ver); +- GetVersionEx(&ver); +- if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) +- onNT = JNI_TRUE; +- +- assert(cmd != NULL); +- pcmd = (*env)->GetStringChars(env, cmd, NULL); +- if (pcmd == NULL) goto Catch; +- +- if (dir != 0) { +- pdir = (*env)->GetStringChars(env, dir, NULL); +- if (pdir == NULL) goto Catch; +- } +- if (envBlock != NULL) { +- penvBlock = ((*env)->GetStringChars(env, envBlock, NULL)); +- if (penvBlock == NULL) goto Catch; +- } +- assert(stdHandles != NULL); +- handles = (*env)->GetLongArrayElements(env, stdHandles, NULL); +- if (handles == NULL) goto Catch; +- +- memset(&si, 0, sizeof(si)); +- si.cb = sizeof(si); +- si.dwFlags = STARTF_USESTDHANDLES; +- +- sa.nLength = sizeof(sa); +- sa.lpSecurityDescriptor = 0; +- sa.bInheritHandle = TRUE; +- +- if (handles[0] != (jlong) -1) { +- si.hStdInput = (HANDLE) handles[0]; +- handles[0] = (jlong) -1; +- } else { +- if (! CreatePipe(&inRead, &inWrite, &sa, PIPE_SIZE)) { +- win32Error(env, "CreatePipe"); +- goto Catch; +- } +- si.hStdInput = inRead; +- SetHandleInformation(inWrite, HANDLE_FLAG_INHERIT, FALSE); +- handles[0] = (jlong) inWrite; +- } +- SetHandleInformation(si.hStdInput, HANDLE_FLAG_INHERIT, TRUE); +- +- if (handles[1] != (jlong) -1) { +- si.hStdOutput = (HANDLE) handles[1]; +- handles[1] = (jlong) -1; +- } else { +- if (! CreatePipe(&outRead, &outWrite, &sa, PIPE_SIZE)) { +- win32Error(env, "CreatePipe"); +- goto Catch; +- } +- si.hStdOutput = outWrite; +- SetHandleInformation(outRead, HANDLE_FLAG_INHERIT, FALSE); +- handles[1] = (jlong) outRead; +- } +- SetHandleInformation(si.hStdOutput, HANDLE_FLAG_INHERIT, TRUE); +- +- if (redirectErrorStream) { +- si.hStdError = si.hStdOutput; +- handles[2] = (jlong) -1; +- } else if (handles[2] != (jlong) -1) { +- si.hStdError = (HANDLE) handles[2]; +- handles[2] = (jlong) -1; +- } else { +- if (! CreatePipe(&errRead, &errWrite, &sa, PIPE_SIZE)) { +- win32Error(env, "CreatePipe"); +- goto Catch; ++ if (cmd != NULL && stdHandles != NULL) { ++ const jchar *pcmd = (*env)->GetStringChars(env, cmd, NULL); ++ if (pcmd != NULL) { ++ const jchar *penvBlock = (envBlock != NULL) ++ ? (*env)->GetStringChars(env, envBlock, NULL) ++ : NULL; ++ const jchar *pdir = (dir != NULL) ++ ? (*env)->GetStringChars(env, dir, NULL) ++ : NULL; ++ jlong *handles = (*env)->GetLongArrayElements(env, stdHandles, NULL); ++ if (handles != NULL) { ++ ret = processCreate( ++ env, ++ pcmd, ++ penvBlock, ++ pdir, ++ handles, ++ redirectErrorStream); ++ (*env)->ReleaseLongArrayElements(env, stdHandles, handles, 0); ++ } ++ if (pdir != NULL) ++ (*env)->ReleaseStringChars(env, dir, pdir); ++ if (penvBlock != NULL) ++ (*env)->ReleaseStringChars(env, envBlock, penvBlock); ++ (*env)->ReleaseStringChars(env, cmd, pcmd); + } +- si.hStdError = errWrite; +- SetHandleInformation(errRead, HANDLE_FLAG_INHERIT, FALSE); +- handles[2] = (jlong) errRead; + } +- SetHandleInformation(si.hStdError, HANDLE_FLAG_INHERIT, TRUE); +- +- if (onNT) +- processFlag = CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT; +- else +- processFlag = selectProcessFlag(env, cmd) | CREATE_UNICODE_ENVIRONMENT; +- ret = CreateProcessW(0, /* executable name */ +- (LPWSTR)pcmd, /* command line */ +- 0, /* process security attribute */ +- 0, /* thread security attribute */ +- TRUE, /* inherits system handles */ +- processFlag, /* selected based on exe type */ +- (LPVOID)penvBlock,/* environment block */ +- (LPCWSTR)pdir, /* change to the new current directory */ +- &si, /* (in) startup information */ +- &pi); /* (out) process information */ +- if (!ret) { +- win32Error(env, "CreateProcess"); +- goto Catch; +- } +- +- CloseHandle(pi.hThread); +- ret = (jlong)pi.hProcess; +- +- Finally: +- /* Always clean up the child's side of the pipes */ +- closeSafely(inRead); +- closeSafely(outWrite); +- closeSafely(errWrite); +- +- if (pcmd != NULL) +- (*env)->ReleaseStringChars(env, cmd, pcmd); +- if (pdir != NULL) +- (*env)->ReleaseStringChars(env, dir, pdir); +- if (penvBlock != NULL) +- (*env)->ReleaseStringChars(env, envBlock, penvBlock); +- if (handles != NULL) +- (*env)->ReleaseLongArrayElements(env, stdHandles, handles, 0); + return ret; +- +- Catch: +- /* Clean up the parent's side of the pipes in case of failure only */ +- closeSafely(inWrite); +- closeSafely(outRead); +- closeSafely(errRead); +- goto Finally; + } ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsio0.c 2014-04-20 12:39:16.000000000 -0700 -@@ -154,7 +154,6 @@ - return iohandler; + JNIEXPORT jint JNICALL +--- ./jdk/src/windows/native/java/lang/java_props_md.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/lang/java_props_md.c 2014-04-19 01:27:12.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -448,6 +448,7 @@ + case 0: sprops.os_name = "Windows Vista"; break; + case 1: sprops.os_name = "Windows 7"; break; + case 2: sprops.os_name = "Windows 8"; break; ++ case 3: sprops.os_name = "Windows 8.1"; break; + default: sprops.os_name = "Windows NT (unknown)"; + } + } else { +@@ -455,6 +456,7 @@ + case 0: sprops.os_name = "Windows Server 2008"; break; + case 1: sprops.os_name = "Windows Server 2008 R2"; break; + case 2: sprops.os_name = "Windows Server 2012"; break; ++ case 3: sprops.os_name = "Windows Server 2012 R2"; break; + default: sprops.os_name = "Windows NT (unknown)"; + } + } +--- ./jdk/src/windows/native/java/net/Inet6AddressImpl.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/net/Inet6AddressImpl.c 2013-12-01 11:14:37.000000000 -0800 +@@ -77,7 +77,6 @@ + static jclass ni_ia6cls; + static jmethodID ni_ia4ctrID; + static jmethodID ni_ia6ctrID; +-static jfieldID ni_ia6ipaddressID; + static int initialized = 0; - Error: -- if (fm) _cmsFree(ContextID, fm); - if (iohandler) _cmsFree(ContextID, iohandler); - return NULL; + JNIEXPORT jobjectArray JNICALL +@@ -101,7 +100,6 @@ + ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); + ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); + ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); +- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); + initialized = 1; + } + if (IS_NULL(host)) { +@@ -242,26 +240,22 @@ + (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); + inetIndex ++; + } else if (iterator->ai_family == AF_INET6) { +- jint scope = 0; +- jbyteArray ipaddress; ++ jint scope = 0, ret1; + jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); + if (IS_NULL(iaObj)) { + ret = NULL; + goto cleanupAndReturn; + } +- ipaddress = (*env)->NewByteArray(env, 16); +- if (IS_NULL(ipaddress)) { ++ ret1 = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); ++ ++ if (ret1 == JNI_FALSE) { + ret = NULL; + goto cleanupAndReturn; + } +- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, +- (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); + scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; + if (scope != 0) { /* zero is default value, no need to set */ +- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); +- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); ++ setInet6Address_scopeid(env, iaObj, scope); + } +- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); + setInetAddress_hostName(env, iaObj, host); + (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); + inet6Index ++; +--- ./jdk/src/windows/native/java/net/NetworkInterface.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/net/NetworkInterface.c 2013-12-01 11:14:37.000000000 -0800 +@@ -72,8 +72,6 @@ -@@ -223,12 +222,17 @@ + jclass ni_ia6cls; /* Inet6Address */ + jmethodID ni_ia6ctrID; /* Inet6Address() */ +-jfieldID ni_ia6ipaddressID; +-jfieldID ni_ia6ipaddressID; - // Writes data to memory, also keeps used space for further reference. - static --cmsBool MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number size, const void *Ptr) -+cmsBool MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number size, const void *Ptr) - { - FILEMEM* ResData = (FILEMEM*) iohandler ->stream; + jclass ni_ibcls; /* InterfaceAddress */ + jmethodID ni_ibctrID; /* InterfaceAddress() */ +@@ -482,7 +480,6 @@ + ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address"); + ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); + ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); +- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); - if (ResData == NULL) return FALSE; // Housekeeping + ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress"); + ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls); +@@ -583,19 +580,16 @@ + int scope; + iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); + if (iaObj) { +- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); +- if (ipaddress == NULL) { ++ int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); ++ if (ret == JNI_FALSE) { + return NULL; + } +- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, +- (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); ++ + scope = addrs->addr.him6.sin6_scope_id; + if (scope != 0) { /* zero is default value, no need to set */ +- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); +- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); +- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); ++ setInet6Address_scopeid(env, iaObj, scope); ++ setInet6Address_scopeifname(env, iaObj, netifObj); + } +- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); + ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); + if (ibObj == NULL) { + free_netaddr(netaddrP); +--- ./jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2013-12-01 11:14:37.000000000 -0800 +@@ -499,19 +499,15 @@ + int scope; + iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); + if (iaObj) { +- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); +- if (ipaddress == NULL) { ++ int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); ++ if (ret == JNI_FALSE) { + return NULL; + } +- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, +- (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); + scope = addrs->addr.him6.sin6_scope_id; + if (scope != 0) { /* zero is default value, no need to set */ +- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); +- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); +- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); ++ setInet6Address_scopeid(env, iaObj, scope); ++ setInet6Address_scopeifname(env, iaObj, netifObj); + } +- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); + ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); + if (ibObj == NULL) { + free_netaddr(netaddrP); +--- ./jdk/src/windows/native/java/net/SocketInputStream.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/net/SocketInputStream.c 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -134,32 +134,34 @@ + (*env)->SetByteArrayRegion(env, data, off, nread, (jbyte *)bufP); + } else { + if (nread < 0) { +- /* +- * Recv failed. +- */ +- switch (WSAGetLastError()) { +- case WSAEINTR: +- JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", +- "socket closed"); +- break; +- +- case WSAECONNRESET: +- case WSAESHUTDOWN: +- /* +- * Connection has been reset - Windows sometimes reports +- * the reset as a shutdown error. +- */ +- JNU_ThrowByName(env, "sun/net/ConnectionResetException", +- ""); +- break; ++ // Check if the socket has been closed since we last checked. ++ // This could be a reason for recv failing. ++ if ((*env)->GetIntField(env, fdObj, IO_fd_fdID) == -1) { ++ NET_ThrowSocketException(env, "Socket closed"); ++ } else { ++ switch (WSAGetLastError()) { ++ case WSAEINTR: ++ JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", ++ "socket closed"); ++ break; ++ case WSAECONNRESET: ++ case WSAESHUTDOWN: ++ /* ++ * Connection has been reset - Windows sometimes reports ++ * the reset as a shutdown error. ++ */ ++ JNU_ThrowByName(env, "sun/net/ConnectionResetException", ++ ""); ++ break; ++ ++ case WSAETIMEDOUT : ++ JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", ++ "Read timed out"); ++ break; -+ // Check for available space. Clip. -+ if (iohandler ->UsedSpace + size > ResData->Size) { -+ size = ResData ->Size - iohandler ->UsedSpace; -+ } +- case WSAETIMEDOUT : +- JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", +- "Read timed out"); +- break; +- +- default: +- NET_ThrowCurrent(env, "recv failed"); ++ default: ++ NET_ThrowCurrent(env, "recv failed"); ++ } + } + } + } +--- ./jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c 2013-12-01 11:14:37.000000000 -0800 +@@ -728,7 +728,6 @@ + setInetAddress_family(env, socketAddressObj, IPv4); + (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj); + } else { +- jbyteArray addr; + /* AF_INET6 -> Inet6Address */ + if (inet6Cls == 0) { + jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); +@@ -751,10 +750,10 @@ + NET_SocketClose(fd); + return; + } +- addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID); +- (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr); ++ setInet6Address_ipaddress(env, socketAddressObj, (const char *)&him.him6.sin6_addr); + - if (size == 0) return TRUE; // Write zero bytes is ok, but does nothing + setInetAddress_family(env, socketAddressObj, IPv6); +- (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, him.him6.sin6_scope_id); ++ setInet6Address_scopeid(env, socketAddressObj, him.him6.sin6_scope_id); + } + /* fields common to AF_INET and AF_INET6 */ - memmove(ResData ->Block + ResData ->Pointer, Ptr, size); -@@ -389,13 +393,15 @@ - return TRUE; - } +--- ./jdk/src/windows/native/java/net/net_util_md.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/java/net/net_util_md.c 2013-12-01 11:14:37.000000000 -0800 +@@ -851,7 +851,6 @@ + family = (iafam == IPv4)? AF_INET : AF_INET6; + if (ipv6_available() && !(family == AF_INET && v4MappedAddress == JNI_FALSE)) { + struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him; +- jbyteArray ipaddress; + jbyte caddr[16]; + jint address, scopeid = 0; + jint cached_scope_id = 0; +@@ -872,10 +871,9 @@ + caddr[15] = (address & 0xff); + } + } else { +- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); +- scopeid = (jint)(*env)->GetIntField(env, iaObj, ia6_scopeidID); ++ getInet6Address_ipaddress(env, iaObj, (char *)caddr); ++ scopeid = getInet6Address_scopeid(env, iaObj); + cached_scope_id = (jint)(*env)->GetIntField(env, iaObj, ia6_cachedscopeidID); +- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); + } --// Create a iohandler for disk based files. if FileName is NULL, then 'stream' member is also set --// to NULL and no real writting is performed. This only happens in writting access mode -+// Create a iohandler for disk based files. - cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromFile(cmsContext ContextID, const char* FileName, const char* AccessMode) - { - cmsIOHANDLER* iohandler = NULL; - FILE* fm = NULL; + memset((char *)him6, 0, sizeof(struct SOCKADDR_IN6)); +--- ./jdk/src/windows/native/sun/font/fontpath.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/sun/font/fontpath.c 2014-04-19 01:27:12.000000000 -0700 +@@ -185,6 +185,12 @@ + return 0; + } -+ _cmsAssert(FileName != NULL); -+ _cmsAssert(AccessMode != NULL); ++/* This HDC is initialised and released in the populate family map ++ * JNI entry point, and used within the call which would otherwise ++ * create many DCs. ++ */ ++static HDC screenDC = NULL; + - iohandler = (cmsIOHANDLER*) _cmsMallocZero(ContextID, sizeof(cmsIOHANDLER)); - if (iohandler == NULL) return NULL; + static int DifferentFamily(wchar_t *family, wchar_t* fullName) { + LOGFONTW lfw; + CheckFamilyInfo info; +@@ -202,7 +208,7 @@ + memset(&lfw, 0, sizeof(lfw)); + wcscpy(lfw.lfFaceName, fullName); + lfw.lfCharSet = DEFAULT_CHARSET; +- EnumFontFamiliesExW(GetDC(NULL), &lfw, ++ EnumFontFamiliesExW(screenDC, &lfw, + (FONTENUMPROCW)CheckFontFamilyProcW, + (LPARAM)(&info), 0L); -@@ -432,11 +438,8 @@ - iohandler ->UsedSpace = 0; +@@ -299,7 +305,7 @@ + memset(&lfa, 0, sizeof(lfa)); + strcpy(lfa.lfFaceName, lpelfe->elfLogFont.lfFaceName); + lfa.lfCharSet = lpelfe->elfLogFont.lfCharSet; +- EnumFontFamiliesExA(GetDC(NULL), &lfa, ++ EnumFontFamiliesExA(screenDC, &lfa, + (FONTENUMPROCA)EnumFontFacesInFamilyProcA, + lParam, 0L); + return 1; +@@ -353,7 +359,7 @@ + memset(&lfw, 0, sizeof(lfw)); + wcscpy(lfw.lfFaceName, lpelfe->elfLogFont.lfFaceName); + lfw.lfCharSet = lpelfe->elfLogFont.lfCharSet; +- EnumFontFamiliesExW(GetDC(NULL), &lfw, ++ EnumFontFamiliesExW(screenDC, &lfw, + (FONTENUMPROCW)EnumFontFacesInFamilyProcW, + lParam, 0L); + return 1; +@@ -613,13 +619,17 @@ + return; + } - // Keep track of the original file -- if (FileName != NULL) { -- -- strncpy(iohandler -> PhysicalFile, FileName, sizeof(iohandler -> PhysicalFile)-1); -- iohandler -> PhysicalFile[sizeof(iohandler -> PhysicalFile)-1] = 0; -- } -+ strncpy(iohandler -> PhysicalFile, FileName, sizeof(iohandler -> PhysicalFile)-1); -+ iohandler -> PhysicalFile[sizeof(iohandler -> PhysicalFile)-1] = 0; ++ screenDC = GetDC(NULL); ++ if (screenDC == NULL) { ++ return; ++ } + /* Enumerate fonts via GDI to build maps of fonts and families */ + if (IS_NT) { + LOGFONTW lfw; + memset(&lfw, 0, sizeof(lfw)); + lfw.lfCharSet = DEFAULT_CHARSET; /* all charsets */ + wcscpy(lfw.lfFaceName, L""); /* one face per family (CHECK) */ +- EnumFontFamiliesExW(GetDC(NULL), &lfw, ++ EnumFontFamiliesExW(screenDC, &lfw, + (FONTENUMPROCW)EnumFamilyNamesW, + (LPARAM)(&fmi), 0L); + } else { +@@ -627,7 +637,7 @@ + memset(&lfa, 0, sizeof(lfa)); + lfa.lfCharSet = DEFAULT_CHARSET; /* all charsets */ + strcpy(lfa.lfFaceName, ""); /* one face per family */ +- ret = EnumFontFamiliesExA(GetDC(NULL), &lfa, ++ ret = EnumFontFamiliesExA(screenDC, &lfa, + (FONTENUMPROCA)EnumFamilyNamesA, + (LPARAM)(&fmi), 0L); + } +@@ -637,6 +647,8 @@ + ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, + fontKeyName, 0L, KEY_READ, &hkeyFonts); + if (ret != ERROR_SUCCESS) { ++ ReleaseDC(NULL, screenDC); ++ screenDC = NULL; + return; + } - iohandler ->Read = FileRead; - iohandler ->Seek = FileSeek; -@@ -616,6 +619,31 @@ - return _cmsSearchTag(Icc, sig, FALSE) >= 0; +@@ -653,6 +665,8 @@ + dwMaxValueNameLen >= MAX_BUFFER || + dwMaxValueDataLen >= MAX_BUFFER) { + RegCloseKey(hkeyFonts); ++ ReleaseDC(NULL, screenDC); ++ screenDC = NULL; + return; + } + for (nval = 0; nval < dwNumValues; nval++ ) { +@@ -692,4 +706,6 @@ + } + } + RegCloseKey(hkeyFonts); ++ ReleaseDC(NULL, screenDC); ++ screenDC = NULL; } - +--- ./jdk/src/windows/native/sun/net/portconfig.c 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/src/windows/native/sun/net/portconfig.c 2014-01-18 12:16:22.000000000 -0800 +@@ -0,0 +1,106 @@ +/* -+ * Enforces that the profile version is per. spec. -+ * Operates on the big endian bytes from the profile. -+ * Called before converting to platform endianness. -+ * Byte 0 is BCD major version, so max 9. -+ * Byte 1 is 2 BCD digits, one per nibble. -+ * Reserved bytes 2 & 3 must be 0. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. + */ -+static cmsUInt32Number _validatedVersion(cmsUInt32Number DWord) ++ ++#include ++#include "jni.h" ++#include "net_util.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++struct portrange { ++ int lower; ++ int higher; ++}; ++ ++static int getPortRange(struct portrange *range) +{ -+ cmsUInt8Number* pByte = (cmsUInt8Number*)&DWord; -+ cmsUInt8Number temp1; -+ cmsUInt8Number temp2; ++ OSVERSIONINFO ver; ++ ver.dwOSVersionInfoSize = sizeof(ver); ++ GetVersionEx(&ver); + -+ if (*pByte > 0x09) *pByte = (cmsUInt8Number)9; -+ temp1 = *(pByte+1) & 0xf0; -+ temp2 = *(pByte+1) & 0x0f; -+ if (temp1 > 0x90) temp1 = 0x90; -+ if (temp2 > 9) temp2 = 0x09; -+ *(pByte+1) = (cmsUInt8Number)(temp1 | temp2); -+ *(pByte+2) = (cmsUInt8Number)0; -+ *(pByte+3) = (cmsUInt8Number)0; ++ /* Check for major version 5 or less = Windows XP/2003 or older */ ++ if (ver.dwMajorVersion <= 5) { ++ LONG ret; ++ HKEY hKey; ++ range->lower = 1024; ++ range->higher = 4999; + -+ return DWord; ++ /* check registry to see if upper limit was raised */ ++ ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, ++ "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", ++ 0, KEY_READ, (PHKEY)&hKey ++ ); ++ if (ret == ERROR_SUCCESS) { ++ DWORD maxuserport; ++ ULONG ulType; ++ DWORD dwLen = sizeof(maxuserport); ++ ret = RegQueryValueEx(hKey, "MaxUserPort", NULL, &ulType, ++ (LPBYTE)&maxuserport, &dwLen); ++ RegCloseKey(hKey); ++ if (ret == ERROR_SUCCESS) { ++ range->higher = maxuserport; ++ } ++ } ++ } else { ++ /* There doesn't seem to be an API to access this. "MaxUserPort" ++ * is affected, but is not sufficient to determine. ++ * so we just use the defaults, which are less likely to change ++ */ ++ range->lower = 49152; ++ range->higher = 65535; ++ } ++ return 0; +} - - // Read profile header and validate it - cmsBool _cmsReadHeader(_cmsICCPROFILE* Icc) -@@ -643,12 +671,15 @@ - Icc -> DeviceClass = (cmsProfileClassSignature) _cmsAdjustEndianess32(Header.deviceClass); - Icc -> ColorSpace = (cmsColorSpaceSignature) _cmsAdjustEndianess32(Header.colorSpace); - Icc -> PCS = (cmsColorSpaceSignature) _cmsAdjustEndianess32(Header.pcs); + - Icc -> RenderingIntent = _cmsAdjustEndianess32(Header.renderingIntent); - Icc -> flags = _cmsAdjustEndianess32(Header.flags); - Icc -> manufacturer = _cmsAdjustEndianess32(Header.manufacturer); - Icc -> model = _cmsAdjustEndianess32(Header.model); -+ Icc -> creator = _cmsAdjustEndianess32(Header.creator); ++/* ++ * Class: sun_net_PortConfig ++ * Method: getLower0 ++ * Signature: ()I ++ */ ++JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getLower0 ++ (JNIEnv *env, jclass clazz) ++{ ++ struct portrange range; ++ getPortRange(&range); ++ return range.lower; ++} + - _cmsAdjustEndianess64(&Icc -> attributes, &Header.attributes); -- Icc -> Version = _cmsAdjustEndianess32(Header.version); -+ Icc -> Version = _cmsAdjustEndianess32(_validatedVersion(Header.version)); - - // Get size as reported in header - HeaderSize = _cmsAdjustEndianess32(Header.size); -@@ -815,28 +846,33 @@ - cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile) - { - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -- return (cmsUInt32Number) Icc ->manufacturer; -+ return Icc ->manufacturer; - } - - void CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer) - { - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -- Icc -> manufacturer = (cmsUInt32Number) manufacturer; -+ Icc -> manufacturer = manufacturer; ++/* ++ * Class: sun_net_PortConfig ++ * Method: getUpper0 ++ * Signature: ()I ++ */ ++JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getUpper0 ++ (JNIEnv *env, jclass clazz) ++{ ++ struct portrange range; ++ getPortRange(&range); ++ return range.higher; +} ++#ifdef __cplusplus ++} ++#endif +--- ./jdk/src/windows/native/sun/nio/ch/SocketDispatcher.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/sun/nio/ch/SocketDispatcher.c 2014-06-06 19:56:31.000000000 -0700 +@@ -192,45 +192,66 @@ + jobject fdo, jlong address, jint len) + { + /* set up */ +- int i = 0; ++ int next_index, next_offset, ret=0; + DWORD written = 0; + jint fd = fdval(env, fdo); + struct iovec *iovp = (struct iovec *)address; + WSABUF *bufs = malloc(len * sizeof(WSABUF)); +- jint rem = MAX_BUFFER_SIZE; ++ jlong count = 0; + + if (bufs == 0) { + JNU_ThrowOutOfMemoryError(env, 0); + return IOS_THROWN; + } + +- /* copy iovec into WSABUF */ +- for(i=0; i rem) +- iov_len = rem; +- bufs[i].buf = (char *)iovp[i].iov_base; +- bufs[i].len = (u_long)iov_len; +- rem -= iov_len; +- if (rem == 0) { +- len = i+1; ++ // next buffer and offset to consume ++ next_index = 0; ++ next_offset = 0; ++ ++ while (next_index < len) { ++ DWORD buf_count = 0; ++ ++ /* Prepare the WSABUF array to a maximum total size of MAX_BUFFER_SIZE */ ++ jint rem = MAX_BUFFER_SIZE; ++ while (next_index < len && rem > 0) { ++ jint iov_len = iovp[next_index].iov_len - next_offset; ++ char* ptr = (char *)iovp[next_index].iov_base; ++ ptr += next_offset; ++ if (iov_len > rem) { ++ iov_len = rem; ++ next_offset += rem; ++ } else { ++ next_index ++; ++ next_offset = 0; ++ } + -+cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile) -+{ -+ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -+ return Icc ->creator; ++ bufs[buf_count].buf = ptr; ++ bufs[buf_count].len = (u_long)iov_len; ++ buf_count++; ++ ++ rem -= iov_len; ++ } ++ ++ /* write the buffers */ ++ ret = WSASend((SOCKET)fd, /* Socket */ ++ bufs, /* pointers to the buffers */ ++ buf_count, /* number of buffers to process */ ++ &written, /* receives number of bytes written */ ++ 0, /* no flags */ ++ 0, /* no overlapped sockets */ ++ 0); /* no completion routine */ ++ ++ if (ret == SOCKET_ERROR) { + break; + } +- } + +- /* read into the buffers */ +- i = WSASend((SOCKET)fd, /* Socket */ +- bufs, /* pointers to the buffers */ +- (DWORD)len, /* number of buffers to process */ +- &written, /* receives number of bytes written */ +- 0, /* no flags */ +- 0, /* no overlapped sockets */ +- 0); /* no completion routine */ ++ count += written; ++ } + + /* clean up */ + free(bufs); + +- if (i != 0) { ++ if (ret == SOCKET_ERROR && count == 0) { + int theErr = (jint)WSAGetLastError(); + if (theErr == WSAEWOULDBLOCK) { + return IOS_UNAVAILABLE; +@@ -239,7 +260,7 @@ + return IOS_THROWN; + } + +- return convertLongReturnVal(env, (jlong)written, JNI_FALSE); ++ return convertLongReturnVal(env, count, JNI_FALSE); } - cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile) + JNIEXPORT void JNICALL +--- ./jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c 2014-06-06 19:56:31.000000000 -0700 +@@ -162,7 +162,7 @@ + } + completionStatus_error = (*env)->GetFieldID(env, clazz, "error", "I"); + completionStatus_bytesTransferred = (*env)->GetFieldID(env, clazz, "bytesTransferred", "I"); +- completionStatus_completionKey = (*env)->GetFieldID(env, clazz, "completionKey", "I"); ++ completionStatus_completionKey = (*env)->GetFieldID(env, clazz, "completionKey", "J"); + + clazz = (*env)->FindClass(env, "sun/nio/fs/WindowsNativeDispatcher$BackupResult"); + if (clazz == NULL) { +@@ -1169,12 +1169,11 @@ + + JNIEXPORT jlong JNICALL + Java_sun_nio_fs_WindowsNativeDispatcher_CreateIoCompletionPort(JNIEnv* env, jclass this, +- jlong fileHandle, jlong existingPort, jint completionKey) ++ jlong fileHandle, jlong existingPort, jlong completionKey) { - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -- return (cmsUInt32Number) Icc ->model; -+ return Icc ->model; +- ULONG_PTR ck = completionKey; + HANDLE port = CreateIoCompletionPort((HANDLE)jlong_to_ptr(fileHandle), + (HANDLE)jlong_to_ptr(existingPort), +- ck, ++ (ULONG_PTR)completionKey, + 0); + if (port == NULL) { + throwWindowsException(env, GetLastError()); +@@ -1203,21 +1202,20 @@ + (*env)->SetIntField(env, obj, completionStatus_error, ioResult); + (*env)->SetIntField(env, obj, completionStatus_bytesTransferred, + (jint)bytesTransferred); +- (*env)->SetIntField(env, obj, completionStatus_completionKey, +- (jint)completionKey); +- ++ (*env)->SetLongField(env, obj, completionStatus_completionKey, ++ (jlong)completionKey); + } } - void CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model) + JNIEXPORT void JNICALL + Java_sun_nio_fs_WindowsNativeDispatcher_PostQueuedCompletionStatus(JNIEnv* env, jclass this, +- jlong completionPort, jint completionKey) ++ jlong completionPort, jlong completionKey) { - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -- Icc -> model = (cmsUInt32Number) model; -+ Icc -> model = model; - } + BOOL res; + + res = PostQueuedCompletionStatus((HANDLE)jlong_to_ptr(completionPort), + (DWORD)0, /* dwNumberOfBytesTransferred */ +- (DWORD)completionKey, ++ (ULONG_PTR)completionKey, + NULL); /* lpOverlapped */ + if (res == 0) { + throwWindowsException(env, GetLastError()); +@@ -1232,7 +1230,17 @@ + BOOL res; + BOOL subtree = (watchSubTree == JNI_TRUE) ? TRUE : FALSE; + +- ((LPOVERLAPPED)jlong_to_ptr(pOverlapped))->hEvent = NULL; ++ /* Any unused members of [OVERLAPPED] structure should always be initialized to zero ++ before the structure is used in a function call. ++ Otherwise, the function may fail and return ERROR_INVALID_PARAMETER. ++ http://msdn.microsoft.com/en-us/library/windows/desktop/ms684342%28v=vs.85%29.aspx ++ ++ The [Offset] and [OffsetHigh] members of this structure are not used. ++ http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx ++ ++ [hEvent] should be zero, other fields are the return values. */ ++ ZeroMemory((LPOVERLAPPED)jlong_to_ptr(pOverlapped), sizeof(OVERLAPPED)); ++ + res = ReadDirectoryChangesW((HANDLE)jlong_to_ptr(hDirectory), + (LPVOID)jlong_to_ptr(bufferAddress), + (DWORD)bufferLength, +--- ./jdk/src/windows/native/sun/security/krb5/NativeCreds.c 2013-09-06 11:29:15.000000000 -0700 ++++ ./jdk/src/windows/native/sun/security/krb5/NativeCreds.c 2014-06-06 19:56:31.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -380,7 +380,8 @@ + */ + JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativeCreds( + JNIEnv *env, +- jclass krbcredsClass) { ++ jclass krbcredsClass, ++ jintArray jetypes) { + + KERB_QUERY_TKT_CACHE_REQUEST CacheRequest; + PKERB_RETRIEVE_TKT_RESPONSE TktCacheResponse = NULL; +@@ -396,9 +397,12 @@ + jobject ticketFlags, startTime, endTime, krbCreds = NULL; + jobject authTime, renewTillTime, hostAddresses = NULL; + KERB_EXTERNAL_TICKET *msticket; +- int ignore_cache = 0; ++ int found_in_cache = 0; + FILETIME Now, EndTime, LocalEndTime; + ++ int i, netypes; ++ jint *etypes = NULL; ++ + while (TRUE) { + + if (krbcredsConstructor == 0) { +@@ -465,31 +469,33 @@ + // got the native MS TGT + msticket = &(TktCacheResponse->Ticket); + ++ netypes = (*env)->GetArrayLength(env, jetypes); ++ etypes = (jint *) (*env)->GetIntArrayElements(env, jetypes, NULL); ++ + // check TGT validity +- switch (msticket->SessionKey.KeyType) { +- case KERB_ETYPE_DES_CBC_CRC: +- case KERB_ETYPE_DES_CBC_MD5: +- case KERB_ETYPE_NULL: +- case KERB_ETYPE_RC4_HMAC_NT: +- GetSystemTimeAsFileTime(&Now); +- EndTime.dwLowDateTime = msticket->EndTime.LowPart; +- EndTime.dwHighDateTime = msticket->EndTime.HighPart; +- FileTimeToLocalFileTime(&EndTime, &LocalEndTime); +- if (CompareFileTime(&Now, &LocalEndTime) >= 0) { +- ignore_cache = 1; +- } +- if (msticket->TicketFlags & KERB_TICKET_FLAGS_invalid) { +- ignore_cache = 1; ++ if (native_debug) { ++ printf("LSA: TICKET SessionKey KeyType is %d\n", msticket->SessionKey.KeyType); ++ } ++ ++ if ((msticket->TicketFlags & KERB_TICKET_FLAGS_invalid) == 0) { ++ GetSystemTimeAsFileTime(&Now); ++ EndTime.dwLowDateTime = msticket->EndTime.LowPart; ++ EndTime.dwHighDateTime = msticket->EndTime.HighPart; ++ FileTimeToLocalFileTime(&EndTime, &LocalEndTime); ++ if (CompareFileTime(&Now, &LocalEndTime) < 0) { ++ for (i=0; iSessionKey.KeyType) { ++ found_in_cache = 1; ++ if (native_debug) { ++ printf("LSA: Valid etype found: %d\n", etypes[i]); ++ } ++ break; ++ } + } +- break; +- case KERB_ETYPE_RC4_MD4: +- default: +- // not supported +- ignore_cache = 1; +- break; ++ } + } + +- if (ignore_cache) { ++ if (!found_in_cache) { + if (native_debug) { + printf("LSA: MS TGT in cache is invalid/not supported; request new ticket\n"); + } +@@ -503,34 +509,40 @@ + } + + pTicketRequest->MessageType = KerbRetrieveEncodedTicketMessage; +- pTicketRequest->EncryptionType = KERB_ETYPE_DES_CBC_MD5; + pTicketRequest->CacheOptions = KERB_RETRIEVE_TICKET_DONT_USE_CACHE; + +- Status = LsaCallAuthenticationPackage( +- LogonHandle, +- PackageId, +- pTicketRequest, +- requestSize, +- &pTicketResponse, +- &responseSize, +- &SubStatus +- ); ++ for (i=0; iEncryptionType = etypes[i]; ++ Status = LsaCallAuthenticationPackage( ++ LogonHandle, ++ PackageId, ++ pTicketRequest, ++ requestSize, ++ &pTicketResponse, ++ &responseSize, ++ &SubStatus ++ ); + +- if (native_debug) { +- printf("LSA: Response size is %d\n", responseSize); +- } ++ if (native_debug) { ++ printf("LSA: Response size is %d for %d\n", responseSize, etypes[i]); ++ } +- if (!LSA_SUCCESS(Status) || !LSA_SUCCESS(SubStatus)) { +- if (!LSA_SUCCESS(Status)) { +- ShowNTError("LsaCallAuthenticationPackage", Status); +- } else { +- ShowNTError("Protocol status", SubStatus); ++ if (!LSA_SUCCESS(Status) || !LSA_SUCCESS(SubStatus)) { ++ if (!LSA_SUCCESS(Status)) { ++ ShowNTError("LsaCallAuthenticationPackage", Status); ++ } else { ++ ShowNTError("Protocol status", SubStatus); ++ } ++ continue; + } ++ ++ // got the native MS Kerberos TGT ++ msticket = &(pTicketResponse->Ticket); + break; + } - - void CMSEXPORT cmsGetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number* Flags) - { - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -@@ -1073,7 +1109,33 @@ - return cmsOpenProfileFromMemTHR(NULL, MemPtr, dwSize); - } +- // got the native MS Kerberos TGT +- msticket = &(pTicketResponse->Ticket); ++ } ++ if (etypes != NULL) { ++ (*env)->ReleaseIntArrayElements(env, jetypes, etypes, 0); + } -+static -+cmsBool SanityCheck(_cmsICCPROFILE* profile) -+{ -+ cmsIOHANDLER* io; + /* +@@ -653,7 +665,7 @@ + hostAddresses); + + break; +- } // end of WHILE ++ } // end of WHILE. This WHILE will never loop. + + // clean up resources + if (TktCacheResponse != NULL) { +--- ./jdk/src/windows/native/sun/windows/awt_FileDialog.cpp 2013-09-06 11:29:16.000000000 -0700 ++++ ./jdk/src/windows/native/sun/windows/awt_FileDialog.cpp 2014-06-06 19:56:31.000000000 -0700 +@@ -372,7 +372,9 @@ + + // Report result to peer. + if (result) { +- jint length = (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile); ++ jint length = multipleMode ++ ? (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile) ++ : (jint)_tcslen(ofn.lpstrFile); + jcharArray jnames = env->NewCharArray(length); + env->SetCharArrayRegion(jnames, 0, length, (jchar*)ofn.lpstrFile); + +--- ./jdk/src/windows/native/sun/windows/awt_PrintControl.cpp 2013-09-06 11:29:16.000000000 -0700 ++++ ./jdk/src/windows/native/sun/windows/awt_PrintControl.cpp 2014-06-06 19:56:31.000000000 -0700 +@@ -81,6 +81,7 @@ + jmethodID AwtPrintControl::setNativeAttID; + jmethodID AwtPrintControl::setRangeCopiesID; + jmethodID AwtPrintControl::setResID; ++jmethodID AwtPrintControl::setJobAttributesID; + + + BOOL AwtPrintControl::IsSupportedLevel(HANDLE hPrinter, DWORD dwLevel) { +@@ -297,6 +298,10 @@ + AwtPrintControl::setPrinterID = + env->GetMethodID(cls, "setPrinterNameAttrib", "(Ljava/lang/String;)V"); + ++ AwtPrintControl::setJobAttributesID = ++ env->GetMethodID(cls, "setJobAttributes", ++ "(Ljavax/print/attribute/PrintRequestAttributeSet;IISSSSSSS)V"); ++ + DASSERT(AwtPrintControl::driverDoesMultipleCopiesID != NULL); + DASSERT(AwtPrintControl::getPrintDCID != NULL); + DASSERT(AwtPrintControl::setPrintDCID != NULL); +@@ -327,6 +332,7 @@ + DASSERT(AwtPrintControl::getSidesID != NULL); + DASSERT(AwtPrintControl::getSelectID != NULL); + DASSERT(AwtPrintControl::getPrintToFileEnabledID != NULL); ++ DASSERT(AwtPrintControl::setJobAttributesID != NULL); + + + CATCH_BAD_ALLOC; +--- ./jdk/src/windows/native/sun/windows/awt_PrintControl.h 2013-09-06 11:29:16.000000000 -0700 ++++ ./jdk/src/windows/native/sun/windows/awt_PrintControl.h 2014-06-06 19:56:31.000000000 -0700 +@@ -47,7 +47,6 @@ + static jmethodID setDevmodeID; + static jmethodID getDevnamesID; + static jmethodID setDevnamesID; +- + static jmethodID getWin32MediaID; + static jmethodID setWin32MediaID; + static jmethodID getWin32MediaTrayID; +@@ -73,6 +72,7 @@ + static jmethodID setNativeAttID; + static jmethodID setRangeCopiesID; + static jmethodID setResID; ++ static jmethodID setJobAttributesID; + + static void initIDs(JNIEnv *env, jclass cls); + static BOOL FindPrinter(jstring printerName, LPBYTE pPrinterEnum, +--- ./jdk/src/windows/native/sun/windows/awt_PrintJob.cpp 2013-09-06 11:29:16.000000000 -0700 ++++ ./jdk/src/windows/native/sun/windows/awt_PrintJob.cpp 2014-06-06 19:56:31.000000000 -0700 +@@ -329,6 +329,156 @@ + static int embolden(int currentWeight); + static BOOL getPrintableArea(HDC pdc, HANDLE hDevMode, RectDouble *margin); + ++ ++ ++/************************************************************************ ++ * DocumentProperties native support ++ */ + -+ if (!profile) { -+ return FALSE; ++/* Values must match those defined in WPrinterJob.java */ ++static const DWORD SET_COLOR = 0x00000200; ++static const DWORD SET_ORIENTATION = 0x00004000; ++static const DWORD SET_COLLATED = 0x00008000; ++static const DWORD SET_DUP_VERTICAL = 0x00000010; ++static const DWORD SET_DUP_HORIZONTAL = 0x00000020; ++static const DWORD SET_RES_HIGH = 0x00000040; ++static const DWORD SET_RES_LOW = 0x00000080; ++ ++/* ++ * Copy DEVMODE state back into JobAttributes. ++ */ ++ ++static void UpdateJobAttributes(JNIEnv *env, ++ jobject wJob, ++ jobject attrSet, ++ DEVMODE *devmode) { ++ ++ DWORD dmValues = 0; ++ int xRes = 0, yRes = 0; ++ ++ if (devmode->dmFields & DM_COLOR) { ++ if (devmode->dmColor == DMCOLOR_COLOR) { ++ dmValues |= SET_COLOR; ++ } + } + -+ io = profile->IOhandler; -+ if (!io) { -+ return FALSE; ++ if (devmode->dmFields & DM_ORIENTATION) { ++ if (devmode->dmOrientation == DMORIENT_LANDSCAPE) { ++ dmValues |= SET_ORIENTATION; ++ } + } + -+ if (!io->Seek || -+ !(io->Seek==NULLSeek || io->Seek==MemorySeek || io->Seek==FileSeek)) -+ { -+ return FALSE; ++ if (devmode->dmFields & DM_COLLATE && ++ devmode->dmCollate == DMCOLLATE_TRUE) { ++ dmValues |= SET_COLLATED; + } -+ if (!io->Read || -+ !(io->Read==NULLRead || io->Read==MemoryRead || io->Read==FileRead)) -+ { -+ return FALSE; ++ ++ if (devmode->dmFields & DM_PRINTQUALITY) { ++ /* value < 0 indicates quality setting. ++ * value > 0 indicates X resolution. In that case ++ * hopefully we will also find y-resolution specified. ++ * If its not, assume its the same as x-res. ++ * Maybe Java code should try to reconcile this against ++ * the printers claimed set of supported resolutions. ++ */ ++ if (devmode->dmPrintQuality < 0) { ++ if (devmode->dmPrintQuality == DMRES_HIGH) { ++ dmValues |= SET_RES_HIGH; ++ } else if ((devmode->dmPrintQuality == DMRES_LOW) || ++ (devmode->dmPrintQuality == DMRES_DRAFT)) { ++ dmValues |= SET_RES_LOW; ++ } ++ /* else if (devmode->dmPrintQuality == DMRES_MEDIUM) ++ * will set to NORMAL. ++ */ ++ } else { ++ xRes = devmode->dmPrintQuality; ++ yRes = (devmode->dmFields & DM_YRESOLUTION) ? ++ devmode->dmYResolution : devmode->dmPrintQuality; ++ } + } - -+ return TRUE; ++ ++ if (devmode->dmFields & DM_DUPLEX) { ++ if (devmode->dmDuplex == DMDUP_HORIZONTAL) { ++ dmValues |= SET_DUP_HORIZONTAL; ++ } else if (devmode->dmDuplex == DMDUP_VERTICAL) { ++ dmValues |= SET_DUP_VERTICAL; ++ } ++ } ++ ++ env->CallVoidMethod(wJob, AwtPrintControl::setJobAttributesID, attrSet, ++ devmode->dmFields, dmValues, devmode->dmCopies, ++ devmode->dmPaperSize, devmode->dmPaperWidth, ++ devmode->dmPaperLength, devmode->dmDefaultSource, ++ xRes, yRes); ++ +} - - // Dump tag contents. If the profile is being modified, untouched tags are copied from FileOrig - static -@@ -1085,12 +1147,13 @@ - cmsIOHANDLER* io = Icc ->IOhandler; - cmsTagDescriptor* TagDescriptor; - cmsTagTypeSignature TypeBase; -+ cmsTagTypeSignature Type; - cmsTagTypeHandler* TypeHandler; -- -+ cmsFloat64Number Version = cmsGetProfileVersion((cmsHPROFILE) Icc); -+ cmsTagTypeHandler LocalTypeHandler; - - for (i=0; i < Icc -> TagCount; i++) { - -- - if (Icc ->TagNames[i] == 0) continue; - - // Linked tags are not written -@@ -1104,7 +1167,7 @@ - - // Reach here if we are copying a tag from a disk-based ICC profile which has not been modified by user. - // In this case a blind copy of the block data is performed -- if (FileOrig != NULL && Icc -> TagOffsets[i]) { -+ if (SanityCheck(FileOrig) && Icc -> TagOffsets[i]) { - - cmsUInt32Number TagSize = FileOrig -> TagSizes[i]; - cmsUInt32Number TagOffset = FileOrig -> TagOffsets[i]; -@@ -1142,7 +1205,16 @@ - TagDescriptor = _cmsGetTagDescriptor(Icc -> TagNames[i]); - if (TagDescriptor == NULL) continue; // Unsupported, ignore it - -- TypeHandler = Icc ->TagTypeHandlers[i]; -+ if (TagDescriptor ->DecideType != NULL) { + -+ Type = TagDescriptor ->DecideType(Version, Data); ++JNIEXPORT jboolean JNICALL ++Java_sun_awt_windows_WPrinterJob_showDocProperties(JNIEnv *env, ++ jobject wJob, ++ jlong hWndParent, ++ jobject attrSet, ++ jint dmFields, ++ jshort copies, ++ jshort collate, ++ jshort color, ++ jshort duplex, ++ jshort orient, ++ jshort paper, ++ jshort bin, ++ jshort xres_quality, ++ jshort yres) ++{ ++ TRY; ++ ++ HGLOBAL hDevMode = AwtPrintControl::getPrintHDMode(env, wJob); ++ HGLOBAL hDevNames = AwtPrintControl::getPrintHDName(env, wJob); ++ DEVMODE *devmode = NULL; ++ DEVNAMES *devnames = NULL; ++ LONG rval = IDCANCEL; ++ jboolean ret = JNI_FALSE; ++ ++ if (hDevMode != NULL && hDevNames != NULL) { ++ devmode = (DEVMODE *)::GlobalLock(hDevMode); ++ devnames = (DEVNAMES *)::GlobalLock(hDevNames); ++ ++ LPTSTR lpdevnames = (LPTSTR)devnames; ++ // No need to call _tcsdup as we won't unlock until we are done. ++ LPTSTR printerName = lpdevnames+devnames->wDeviceOffset; ++ LPTSTR portName = lpdevnames+devnames->wOutputOffset; ++ ++ HANDLE hPrinter; ++ if (::OpenPrinter(printerName, &hPrinter, NULL) == TRUE) { ++ devmode->dmFields |= dmFields; ++ devmode->dmCopies = copies; ++ devmode->dmCollate = collate; ++ devmode->dmColor = color; ++ devmode->dmDuplex = duplex; ++ devmode->dmOrientation = orient; ++ devmode->dmPrintQuality = xres_quality; ++ devmode->dmYResolution = yres; ++ devmode->dmPaperSize = paper; ++ devmode->dmDefaultSource = bin; ++ ++ rval = ::DocumentProperties((HWND)hWndParent, ++ hPrinter, printerName, devmode, devmode, ++ DM_IN_BUFFER | DM_OUT_BUFFER | DM_IN_PROMPT); ++ if (rval == IDOK) { ++ UpdateJobAttributes(env, wJob, attrSet, devmode); ++ ret = JNI_TRUE; + } -+ else { ++ VERIFY(::ClosePrinter(hPrinter)); ++ } ++ ::GlobalUnlock(hDevNames); ++ ::GlobalUnlock(hDevMode); ++ } + -+ Type = TagDescriptor ->SupportedTypes[0]; -+ } ++ return ret; + -+ TypeHandler = _cmsGetTagTypeHandler(Type); - - if (TypeHandler == NULL) { - cmsSignalError(Icc ->ContextID, cmsERROR_INTERNAL, "(Internal) no handler for tag %x", Icc -> TagNames[i]); -@@ -1153,9 +1225,10 @@ - if (!_cmsWriteTypeBase(io, TypeBase)) - return FALSE; - -- TypeHandler ->ContextID = Icc ->ContextID; -- TypeHandler ->ICCVersion = Icc ->Version; -- if (!TypeHandler ->WritePtr(TypeHandler, io, Data, TagDescriptor ->ElemCount)) { -+ LocalTypeHandler = *TypeHandler; -+ LocalTypeHandler.ContextID = Icc ->ContextID; -+ LocalTypeHandler.ICCVersion = Icc ->Version; -+ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, io, Data, TagDescriptor ->ElemCount)) { - - char String[5]; - -@@ -1293,7 +1366,7 @@ - if (MemPtr == NULL) { ++ CATCH_BAD_ALLOC_RET(0); ++} ++ + /************************************************************************ + * WPageDialog native methods + */ +@@ -732,7 +882,6 @@ + memset(&pd, 0, sizeof(PRINTDLG)); + pd.lStructSize = sizeof(PRINTDLG); + pd.Flags = PD_RETURNDEFAULT | PD_RETURNDC; +- + if (::PrintDlg(&pd)) { + printDC = pd.hDC; + hDevMode = pd.hDevMode; +@@ -792,8 +941,19 @@ + jint imgPixelWid = GetDeviceCaps(printDC, HORZRES); + jint imgPixelHgt = GetDeviceCaps(printDC, VERTRES); + ++ // The DC may be obtained when we first selected the printer as a ++ // result of a call to setNativePrintService. ++ // If the Devmode was obtained later on from the DocumentProperties dialog ++ // the DC won't have been updated and its settings may be for PORTRAIT. ++ // This may happen in other cases too, but was observed for the above. ++ // To get a DC compatible with this devmode we should really call ++ // CreateDC() again to get a DC for the devmode we are using. ++ // The changes for that are a lot more risk, so to minimise that ++ // risk, assume its not LANDSCAPE unless width > height, even if the ++ // devmode says its LANDSCAPE. + // if the values were obtained from a rotated device, swap. +- if (getOrientationFromDevMode2(hDevMode) == DMORIENT_LANDSCAPE) { ++ if ((getOrientationFromDevMode2(hDevMode) == DMORIENT_LANDSCAPE) && ++ (imgPixelWid > imgPixelHgt)) { + jint tmp; + tmp = xPixelRes; + xPixelRes = yPixelRes; +@@ -941,6 +1101,9 @@ + setBooleanField(env, self, DRIVER_COLLATE_STR, JNI_FALSE); + } - *BytesNeeded = cmsSaveProfileToIOhandler(hProfile, NULL); -- return TRUE; -+ return (*BytesNeeded == 0 ? FALSE : TRUE); ++ if (dmFields & DM_COPIES) { ++ setBooleanField(env, self, DRIVER_COPIES_STR, JNI_TRUE); ++ } } - // That is a real write operation -@@ -1331,10 +1404,11 @@ - cmsTagTypeHandler* TypeHandler = Icc ->TagTypeHandlers[i]; - - if (TypeHandler != NULL) { -+ cmsTagTypeHandler LocalTypeHandler = *TypeHandler; - -- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameters -- TypeHandler ->ICCVersion = Icc ->Version; -- TypeHandler ->FreePtr(TypeHandler, Icc -> TagPtrs[i]); -+ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameters -+ LocalTypeHandler.ICCVersion = Icc ->Version; -+ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]); - } - else - _cmsFree(Icc ->ContextID, Icc ->TagPtrs[i]); -@@ -1378,6 +1452,7 @@ - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; - cmsIOHANDLER* io = Icc ->IOhandler; - cmsTagTypeHandler* TypeHandler; -+ cmsTagTypeHandler LocalTypeHandler; - cmsTagDescriptor* TagDescriptor; - cmsTagTypeSignature BaseType; - cmsUInt32Number Offset, TagSize; -@@ -1401,7 +1476,7 @@ - - // Seek to its location - if (!io -> Seek(io, Offset)) -- return NULL; -+ return NULL; - - // Search for support on this tag - TagDescriptor = _cmsGetTagDescriptor(sig); -@@ -1418,14 +1493,15 @@ - // Get type handler - TypeHandler = _cmsGetTagTypeHandler(BaseType); - if (TypeHandler == NULL) return NULL; -+ LocalTypeHandler = *TypeHandler; - - - // Read the tag - Icc -> TagTypeHandlers[n] = TypeHandler; - -- TypeHandler ->ContextID = Icc ->ContextID; -- TypeHandler ->ICCVersion = Icc ->Version; -- Icc -> TagPtrs[n] = TypeHandler ->ReadPtr(TypeHandler, io, &ElemCount, TagSize); -+ LocalTypeHandler.ContextID = Icc ->ContextID; -+ LocalTypeHandler.ICCVersion = Icc ->Version; -+ Icc -> TagPtrs[n] = LocalTypeHandler.ReadPtr(&LocalTypeHandler, io, &ElemCount, TagSize); - - // The tag type is supported, but something wrong happend and we cannot read the tag. - // let know the user about this (although it is just a warning) -@@ -1446,7 +1522,7 @@ + CATCH_BAD_ALLOC; +--- ./jdk/src/windows/native/sun/windows/awt_Toolkit.cpp 2013-09-06 11:29:17.000000000 -0700 ++++ ./jdk/src/windows/native/sun/windows/awt_Toolkit.cpp 2014-04-19 01:27:12.000000000 -0700 +@@ -365,6 +365,7 @@ + HANDLE hCompleted; - _cmsTagSignature2String(String, sig); - cmsSignalError(Icc ->ContextID, cmsERROR_CORRUPTION_DETECTED, "'%s' Inconsistent number of items: expected %d, got %d", -- String, TagDescriptor ->ElemCount, ElemCount); -+ String, TagDescriptor ->ElemCount, ElemCount); - } + jobject thread; ++ jobject threadGroup; + }; + void ToolkitThreadProc(void *param) +@@ -377,7 +378,7 @@ + JavaVMAttachArgs attachArgs; + attachArgs.version = JNI_VERSION_1_2; + attachArgs.name = "AWT-Windows"; +- attachArgs.group = NULL; ++ attachArgs.group = data->threadGroup; -@@ -1478,6 +1554,7 @@ + jint res = jvm->AttachCurrentThreadAsDaemon((void **)&env, &attachArgs); + if (res < 0) { +@@ -416,17 +417,18 @@ + /* + * Class: sun_awt_windows_WToolkit + * Method: startToolkitThread +- * Signature: (Ljava/lang/Runnable;)Z ++ * Signature: (Ljava/lang/Runnable;Ljava/lang/ThreadGroup)Z + */ + JNIEXPORT jboolean JNICALL +-Java_sun_awt_windows_WToolkit_startToolkitThread(JNIEnv *env, jclass cls, jobject thread) ++Java_sun_awt_windows_WToolkit_startToolkitThread(JNIEnv *env, jclass cls, jobject thread, jobject threadGroup) { - _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; - cmsTagTypeHandler* TypeHandler = NULL; -+ cmsTagTypeHandler LocalTypeHandler; - cmsTagDescriptor* TagDescriptor = NULL; - cmsTagTypeSignature Type; - int i; -@@ -1508,9 +1585,10 @@ - - if (TypeHandler != NULL) { - -- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameter -- TypeHandler ->ICCVersion = Icc ->Version; -- TypeHandler->FreePtr(TypeHandler, Icc -> TagPtrs[i]); -+ LocalTypeHandler = *TypeHandler; -+ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameter -+ LocalTypeHandler.ICCVersion = Icc ->Version; -+ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]); - } - } - } -@@ -1549,7 +1627,7 @@ - // Let the tag descriptor to decide the type base on depending on - // the data. This is useful for example on parametric curves, where - // curves specified by a table cannot be saved as parametric and needs -- // to be revented to single v2-curves, even on v4 profiles. -+ // to be casted to single v2-curves, even on v4 profiles. + AwtToolkit& tk = AwtToolkit::GetInstance(); - Type = TagDescriptor ->DecideType(Version, data); + ToolkitThreadProc_Data data; + data.result = false; + data.thread = env->NewGlobalRef(thread); +- if (data.thread == NULL) { ++ data.threadGroup = env->NewGlobalRef(threadGroup); ++ if (data.thread == NULL || data.threadGroup == NULL) { + return JNI_FALSE; } -@@ -1587,9 +1665,10 @@ - Icc ->TagSizes[i] = 0; - Icc ->TagOffsets[i] = 0; - -- TypeHandler ->ContextID = Icc ->ContextID; -- TypeHandler ->ICCVersion = Icc ->Version; -- Icc ->TagPtrs[i] = TypeHandler ->DupPtr(TypeHandler, data, TagDescriptor ->ElemCount); -+ LocalTypeHandler = *TypeHandler; -+ LocalTypeHandler.ContextID = Icc ->ContextID; -+ LocalTypeHandler.ICCVersion = Icc ->Version; -+ Icc ->TagPtrs[i] = LocalTypeHandler.DupPtr(&LocalTypeHandler, data, TagDescriptor ->ElemCount); + data.hCompleted = ::CreateEvent(NULL, FALSE, FALSE, NULL); +@@ -444,6 +446,7 @@ + ::CloseHandle(data.hCompleted); - if (Icc ->TagPtrs[i] == NULL) { + env->DeleteGlobalRef(data.thread); ++ env->DeleteGlobalRef(data.threadGroup); -@@ -1616,6 +1695,7 @@ - int i; - cmsIOHANDLER* MemIO; - cmsTagTypeHandler* TypeHandler = NULL; -+ cmsTagTypeHandler LocalTypeHandler; - cmsTagDescriptor* TagDescriptor = NULL; - cmsUInt32Number rc; - cmsUInt32Number Offset, TagSize; -@@ -1631,15 +1711,16 @@ - Offset = Icc ->TagOffsets[i]; - TagSize = Icc ->TagSizes[i]; + return result ? JNI_TRUE : JNI_FALSE; + } +--- ./jdk/src/windows/resource/java.manifest 2013-09-06 11:29:17.000000000 -0700 ++++ ./jdk/src/windows/resource/java.manifest 2014-04-19 01:27:12.000000000 -0700 +@@ -44,9 +44,15 @@ + + + +- ++ + ++ ++ ++ ++ ++ ++ + +- ++ + +--- ./jdk/test/Makefile 2013-09-06 11:29:17.000000000 -0700 ++++ ./jdk/test/Makefile 2014-06-06 19:56:34.000000000 -0700 +@@ -79,6 +79,11 @@ + endif + OS_VERSION := $(shell $(UNAME) -r) + endif ++ifeq ($(findstring BSD,$(UNAME_S)), BSD) ++ OS_NAME = bsd ++ OS_ARCH := $(shell $(UNAME) -m) ++ OS_VERSION := $(shell $(UNAME) -r) ++endif + ifeq ($(UNAME_S), Darwin) + OS_NAME = macosx + OS_ARCH := $(shell $(UNAME) -m) +--- ./jdk/test/ProblemList.txt 2013-09-06 11:29:17.000000000 -0700 ++++ ./jdk/test/ProblemList.txt 2014-06-06 19:56:31.000000000 -0700 +@@ -369,15 +369,6 @@ + # 7147060 + com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java generic-all + +-# 8000439: NPG: REGRESSION : sun/security/krb5/auto/MaxRetries.java fails with timeout +-sun/security/krb5/auto/MaxRetries.java solaris-sparcv9 - - // read the data directly, don't keep copy - if (data != NULL) { +-# 8006690: sun/security/krb5/auto/BadKdc1.java fails intermittently +-sun/security/krb5/auto/BadKdc1.java solaris-sparcv9 +-sun/security/krb5/auto/BadKdc2.java solaris-sparcv9 +-sun/security/krb5/auto/BadKdc3.java solaris-sparcv9 +-sun/security/krb5/auto/BadKdc4.java solaris-sparcv9 +- + ############################################################################ - if (BufferSize < TagSize) -- TagSize = BufferSize; -+ TagSize = BufferSize; + # jdk_swing +@@ -456,6 +447,9 @@ + # 7041639, Solaris DSA keypair generation bug + java/util/TimeZone/TimeZoneDatePermissionCheck.sh solaris-all - if (!Icc ->IOhandler ->Seek(Icc ->IOhandler, Offset)) return 0; - if (!Icc ->IOhandler ->Read(Icc ->IOhandler, data, 1, TagSize)) return 0; ++# 8026772: test/sun/util/resources/TimeZone/Bug6317929.java failing ++sun/util/resources/TimeZone/Bug6317929.java generic-all ++ + ############################################################################ + + +--- ./jdk/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,108 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8007267 ++ * @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working ++ * @author leonid.romanov@oracle.com ++ * @run main DefaultMenuBarTest ++ */ ++ ++import java.awt.*; ++import java.awt.event.*; ++import javax.swing.*; ++import sun.awt.*; ++import java.lang.reflect.Method; ++ ++ ++public class DefaultMenuBarTest { ++ static KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.META_MASK); ++ ++ 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(ks.getKeyCode()); ++ robot.keyRelease(ks.getKeyCode()); ++ robot.keyRelease(KeyEvent.VK_META); ++ ++ toolkit.realSync(); ++ ++ if (listenerCallCounter != 1) { ++ throw new Exception("Test failed: ActionListener either wasn't called or was called more than once"); ++ } ++ } ++ ++ private static void createAndShowGUI() { ++ JMenu menu = new JMenu("File"); ++ JMenuItem newItem = new JMenuItem("Open"); ++ ++ newItem.setAccelerator(ks); ++ newItem.addActionListener( ++ new ActionListener(){ ++ public void actionPerformed(ActionEvent e) { ++ listenerCallCounter++; ++ } ++ } ++ ); ++ menu.add(newItem); ++ ++ JMenuBar defaultMenu = new JMenuBar(); ++ defaultMenu.add(menu); ++ ++ // Application.getApplication().setDefaultMenuBar(defaultMenu); ++ try { ++ Class appClass = Class.forName("com.apple.eawt.Application"); ++ if (appClass != null) { ++ Method method = appClass.getMethod("getApplication"); ++ if (method != null) { ++ Object app = method.invoke(null, new Object[]{}); ++ if (app != null) { ++ method = appClass.getMethod("setDefaultMenuBar", new Class[]{JMenuBar.class}); ++ if (method != null) { ++ method.invoke(app, new Object[]{defaultMenu}); ++ } ++ } ++ } ++ } ++ } catch (Exception e) { ++ e.printStackTrace(); ++ } ++ } ++} +--- ./jdk/test/com/sun/corba/se/impl/orb/SetDefaultORBTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/com/sun/corba/se/impl/orb/SetDefaultORBTest.java 2014-01-18 12:16:22.000000000 -0800 +@@ -0,0 +1,61 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8028215 ++ * @summary SetDefaultORBTest setting ORB impl via properties test ++ * @run main/othervm SetDefaultORBTest ++ * ++ */ ++ ++import java.util.Properties; ++ ++import org.omg.CORBA.ORB; ++ ++ ++public class SetDefaultORBTest { ++ ++ public static void main(String[] args) { ++ Properties systemProperties = System.getProperties(); ++ systemProperties.setProperty("org.omg.CORBA.ORBSingletonClass", ++ "com.sun.corba.se.impl.orb.ORBSingleton"); ++ System.setSecurityManager(new SecurityManager()); ++ Properties props = new Properties(); ++ props.put("org.omg.CORBA.ORBClass", "com.sun.corba.se.impl.orb.ORBImpl"); ++ ORB orb = ORB.init(args, props); ++ Class orbClass = orb.getClass(); ++ if (orbClass.getName().equals("com.sun.corba.se.impl.orb.ORBImpl")) { ++ System.out.println("orbClass is com.sun.corba.se.impl.orb.ORBimpl as expected"); ++ } else { ++ throw new RuntimeException("com.sun.corba.se.impl.orb.ORBimpl class expected for ORBImpl"); ++ } ++ ORB singletonORB = ORB.init(); ++ Class singletoneOrbClass = singletonORB.getClass(); ++ if (singletoneOrbClass.getName().equals("com.sun.corba.se.impl.orb.ORBSingleton")) { ++ System.out.println("singeletonOrbClass is com.sun.corba.se.impl.orb.ORBSingleton as expected"); ++ } else { ++ throw new RuntimeException("com.sun.corba.se.impl.orb.ORBSingleton class expected for ORBSingleton"); ++ } ++ } ++} +--- ./jdk/test/com/sun/corba/transport/KeepAliveSockets.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/com/sun/corba/transport/KeepAliveSockets.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,68 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ return TagSize; - } - - return Icc ->TagSizes[i]; -@@ -1653,9 +1734,11 @@ - - TagSize = Icc ->TagSizes[i]; - if (BufferSize < TagSize) -- TagSize = BufferSize; -+ TagSize = BufferSize; - - memmove(data, Icc ->TagPtrs[i], TagSize); ++/* ++ * @test ++ * @bug 8017195 ++ * @summary Introduce option to setKeepAlive parameter on CORBA sockets ++ * ++ * @run main/othervm KeepAliveSockets ++ * @run main/othervm -Dcom.sun.CORBA.transport.enableTcpKeepAlive KeepAliveSockets ++ * @run main/othervm -Dcom.sun.CORBA.transport.enableTcpKeepAlive=true KeepAliveSockets ++ * @run main/othervm -Dcom.sun.CORBA.transport.enableTcpKeepAlive=false KeepAliveSockets ++ */ + -+ return TagSize; - } - - return Icc ->TagSizes[i]; -@@ -1671,7 +1754,7 @@ - if (data == NULL) { - MemIO = cmsOpenIOhandlerFromNULL(cmsGetProfileContextID(hProfile)); - } else{ -- MemIO = cmsOpenIOhandlerFromMem(cmsGetProfileContextID(hProfile), data, BufferSize, "w"); -+ MemIO = cmsOpenIOhandlerFromMem(cmsGetProfileContextID(hProfile), data, BufferSize, "w"); - } - if (MemIO == NULL) return 0; - -@@ -1679,20 +1762,22 @@ - TypeHandler = Icc ->TagTypeHandlers[i]; - TagDescriptor = _cmsGetTagDescriptor(sig); - if (TagDescriptor == NULL) { -- cmsCloseIOhandler(MemIO); -- return 0; -+ cmsCloseIOhandler(MemIO); -+ return 0; - } - -+ // FIXME: No handling for TypeHandler == NULL here? - // Serialize -- TypeHandler ->ContextID = Icc ->ContextID; -- TypeHandler ->ICCVersion = Icc ->Version; -+ LocalTypeHandler = *TypeHandler; -+ LocalTypeHandler.ContextID = Icc ->ContextID; -+ LocalTypeHandler.ICCVersion = Icc ->Version; - - if (!_cmsWriteTypeBase(MemIO, TypeHandler ->Signature)) { - cmsCloseIOhandler(MemIO); - return 0; - } - -- if (!TypeHandler ->WritePtr(TypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) { -+ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) { - cmsCloseIOhandler(MemIO); - return 0; - } -@@ -1730,7 +1815,7 @@ - // Using this function you can collapse several tag entries to the same block in the profile - cmsBool CMSEXPORT cmsLinkTag(cmsHPROFILE hProfile, cmsTagSignature sig, cmsTagSignature dest) - { -- _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; -+ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile; - int i; - - if (!_cmsNewTag(Icc, sig, &i)) return FALSE; ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c 2014-04-20 12:39:16.000000000 -0700 -@@ -129,7 +129,6 @@ - Tag = (cmsMAT3*) cmsReadTag(hProfile, cmsSigChromaticAdaptationTag); - - if (Tag != NULL) { -- - *Dest = *Tag; - return TRUE; - } -@@ -193,7 +192,8 @@ - if (GrayTRC == NULL) return NULL; - - Lut = cmsPipelineAlloc(ContextID, 1, 3); -- if (Lut == NULL) return NULL; -+ if (Lut == NULL) -+ goto Error; - - if (cmsGetPCS(hProfile) == cmsSigLabData) { - -@@ -204,28 +204,35 @@ - - EmptyTab = cmsBuildTabulatedToneCurve16(ContextID, 2, Zero); - -- if (EmptyTab == NULL) { -- -- cmsPipelineFree(Lut); -- return NULL; -- } -+ if (EmptyTab == NULL) -+ goto Error; - - LabCurves[0] = GrayTRC; - LabCurves[1] = EmptyTab; - LabCurves[2] = EmptyTab; - -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, OneToThreeInputMatrix, NULL)); -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, LabCurves)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, OneToThreeInputMatrix, NULL)) || -+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, LabCurves))) { -+ cmsFreeToneCurve(EmptyTab); -+ goto Error; ++import java.lang.*; ++import java.net.InetSocketAddress; ++import java.net.Socket; ++import java.nio.channels.ServerSocketChannel; ++import java.util.*; ++import com.sun.corba.se.impl.orb.*; ++ ++import com.sun.corba.se.impl.transport.*; ++ ++public class KeepAliveSockets { ++ ++ public static void main(String[] args) throws Exception { ++ ++ boolean keepAlive = false; ++ String prop = System.getProperty("com.sun.CORBA.transport.enableTcpKeepAlive"); ++ if (prop != null) ++ keepAlive = !"false".equalsIgnoreCase(prop); ++ ++ DefaultSocketFactoryImpl sfImpl = new DefaultSocketFactoryImpl(); ++ ORBImpl orb = new ORBImpl(); ++ orb.set_parameters(null); ++ sfImpl.setORB(orb); ++ ++ ServerSocketChannel ssc = ServerSocketChannel.open(); ++ ssc.socket().bind(new InetSocketAddress(0)); ++ ++ InetSocketAddress isa = new InetSocketAddress("localhost", ssc.socket().getLocalPort()); ++ Socket s = sfImpl.createSocket("ignore", isa); ++ System.out.println("Received factory socket" + s); ++ if (keepAlive != s.getKeepAlive()) ++ throw new RuntimeException("KeepAlive value not honoured in CORBA socket"); ++ } ++ ++} +--- ./jdk/test/com/sun/crypto/provider/TLS/TestLeadingZeroes.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/com/sun/crypto/provider/TLS/TestLeadingZeroes.java 2014-01-18 12:16:22.000000000 -0800 +@@ -0,0 +1,420 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8014618 ++ * @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement ++ * @author Pasi Eronen ++ */ ++ ++import java.io.*; ++import java.security.*; ++import java.security.spec.*; ++import java.security.interfaces.*; ++import javax.crypto.*; ++import javax.crypto.spec.*; ++import javax.crypto.interfaces.*; ++import com.sun.crypto.provider.SunJCE; ++ ++/** ++ * Test that leading zeroes are stripped in TlsPremasterSecret case, ++ * but are left as-is in other cases. ++ * ++ * We use pre-generated keypairs, since with randomly generated keypairs, ++ * a leading zero happens only (roughly) 1 out of 256 cases. ++ */ ++ ++public class TestLeadingZeroes { ++ ++ private static final String SUNJCE = "SunJCE"; ++ ++ private TestLeadingZeroes() {} ++ ++ public static void main(String argv[]) throws Exception { ++ // Add JCE to the list of providers ++ SunJCE jce = new SunJCE(); ++ Security.addProvider(jce); ++ ++ TestLeadingZeroes keyAgree = new TestLeadingZeroes(); ++ keyAgree.run(); ++ System.out.println("Test Passed"); ++ } ++ ++ private void run() throws Exception { ++ ++ // decode pre-generated keypairs ++ KeyFactory kfac = KeyFactory.getInstance("DH"); ++ PublicKey alicePubKey = ++ kfac.generatePublic(new X509EncodedKeySpec(alicePubKeyEnc)); ++ PublicKey bobPubKey = ++ kfac.generatePublic(new X509EncodedKeySpec(bobPubKeyEnc)); ++ PrivateKey alicePrivKey = ++ kfac.generatePrivate(new PKCS8EncodedKeySpec(alicePrivKeyEnc)); ++ PrivateKey bobPrivKey = ++ kfac.generatePrivate(new PKCS8EncodedKeySpec(bobPrivKeyEnc)); ++ ++ // generate normal shared secret ++ KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", SUNJCE); ++ aliceKeyAgree.init(alicePrivKey); ++ aliceKeyAgree.doPhase(bobPubKey, true); ++ byte[] sharedSecret = aliceKeyAgree.generateSecret(); ++ System.out.println("shared secret:\n" + toHexString(sharedSecret)); ++ ++ // verify that leading zero is present ++ if (sharedSecret.length != 128) { ++ throw new Exception("Unexpected shared secret length"); ++ } ++ if (sharedSecret[0] != 0) { ++ throw new Exception("First byte is not zero as expected"); + } - - cmsFreeToneCurve(EmptyTab); - - } - else { -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &GrayTRC)); -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, GrayInputMatrix, NULL)); + -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &GrayTRC)) || -+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, GrayInputMatrix, NULL))) -+ goto Error; - } - - return Lut; ++ // now, test TLS premaster secret ++ aliceKeyAgree.init(alicePrivKey); ++ aliceKeyAgree.doPhase(bobPubKey, true); ++ byte[] tlsPremasterSecret = ++ aliceKeyAgree.generateSecret("TlsPremasterSecret").getEncoded(); ++ System.out.println( ++ "tls premaster secret:\n" + toHexString(tlsPremasterSecret)); + -+Error: -+ cmsFreeToneCurve(GrayTRC); -+ cmsPipelineFree(Lut); -+ return NULL; - } - - // RGB Matrix shaper -@@ -259,49 +266,31 @@ - Lut = cmsPipelineAlloc(ContextID, 3, 3); - if (Lut != NULL) { - -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, Shapes)); -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Mat, NULL)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, Shapes)) || -+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Mat, NULL))) -+ goto Error; - - // Note that it is certainly possible a single profile would have a LUT based - // tag for output working in lab and a matrix-shaper for the fallback cases. - // This is not allowed by the spec, but this code is tolerant to those cases - if (cmsGetPCS(hProfile) == cmsSigLabData) { - -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocXYZ2Lab(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocXYZ2Lab(ContextID))) -+ goto Error; - } - - } - - return Lut; ++ // check that leading zero has been stripped ++ if (tlsPremasterSecret.length != 127) { ++ throw new Exception("Unexpected TLS premaster secret length"); ++ } ++ if (tlsPremasterSecret[0] == 0) { ++ throw new Exception("First byte is zero"); ++ } ++ for (int i = 0; i < tlsPremasterSecret.length; i++) { ++ if (tlsPremasterSecret[i] != sharedSecret[i+1]) { ++ throw new Exception("Shared secrets differ"); ++ } ++ } + -+Error: -+ cmsPipelineFree(Lut); -+ return NULL; - } - - - - // Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded --/*static --cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) --{ -- cmsContext ContextID = cmsGetProfileContextID(hProfile); -- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat)); -- cmsColorSpaceSignature spc = cmsGetColorSpace(hProfile); -- -- if (Lut == NULL) return NULL; -- -- // If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding, -- // and since the formatter has already accomodated to 0..1.0, we should undo this change -- if ( spc == cmsSigLabData) -- { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); -- } -- else -- if (spc == cmsSigXYZData) -- { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); -- } -- -- return Lut; --} --*/ - static - cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) - { -@@ -316,23 +305,31 @@ - // these need to be normalized into the appropriate ranges (Lab = 100,0,0, XYZ=1.0,1.0,1.0) - if ( spc == cmsSigLabData) - { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID))) -+ goto Error; - } - else if (spc == cmsSigXYZData) - { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID))) -+ goto Error; - } - - if ( PCS == cmsSigLabData) - { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID))) -+ goto Error; - } - else if( PCS == cmsSigXYZData) - { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID))) -+ goto Error; - } - - return Lut; ++ } ++ ++ /* ++ * Converts a byte to hex digit and writes to the supplied buffer ++ */ ++ private void byte2hex(byte b, StringBuffer buf) { ++ char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8', ++ '9', 'A', 'B', 'C', 'D', 'E', 'F' }; ++ int high = ((b & 0xf0) >> 4); ++ int low = (b & 0x0f); ++ buf.append(hexChars[high]); ++ buf.append(hexChars[low]); ++ } ++ ++ /* ++ * Converts a byte array to hex string ++ */ ++ private String toHexString(byte[] block) { ++ StringBuffer buf = new StringBuffer(); ++ ++ int len = block.length; ++ ++ for (int i = 0; i < len; i++) { ++ byte2hex(block[i], buf); ++ if (i < len-1) { ++ buf.append(":"); ++ } ++ } ++ return buf.toString(); ++ } ++ ++ private static final byte alicePubKeyEnc[] = { ++ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x24, ++ (byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06, ++ (byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48, ++ (byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01, ++ (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81, ++ (byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81, ++ (byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD, ++ (byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB, ++ (byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D, ++ (byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36, ++ (byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38, ++ (byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F, ++ (byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C, ++ (byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E, ++ (byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23, ++ (byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5, ++ (byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E, ++ (byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8, ++ (byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34, ++ (byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57, ++ (byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18, ++ (byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21, ++ (byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF, ++ (byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29, ++ (byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D, ++ (byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A, ++ (byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4, ++ (byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07, ++ (byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95, ++ (byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F, ++ (byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50, ++ (byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3, ++ (byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4, ++ (byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C, ++ (byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B, ++ (byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA, ++ (byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3, ++ (byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78, ++ (byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02, ++ (byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00, ++ (byte)0x03, (byte)0x81, (byte)0x85, (byte)0x00, ++ (byte)0x02, (byte)0x81, (byte)0x81, (byte)0x00, ++ (byte)0xEE, (byte)0xD6, (byte)0xB1, (byte)0xA3, ++ (byte)0xB4, (byte)0x78, (byte)0x2B, (byte)0x35, ++ (byte)0xEF, (byte)0xCD, (byte)0x17, (byte)0x86, ++ (byte)0x63, (byte)0x2B, (byte)0x97, (byte)0x0E, ++ (byte)0x7A, (byte)0xD1, (byte)0xFF, (byte)0x7A, ++ (byte)0xEB, (byte)0x57, (byte)0x61, (byte)0xA1, ++ (byte)0xF7, (byte)0x90, (byte)0x11, (byte)0xA7, ++ (byte)0x79, (byte)0x28, (byte)0x69, (byte)0xBA, ++ (byte)0xA7, (byte)0xB2, (byte)0x37, (byte)0x17, ++ (byte)0xAE, (byte)0x3C, (byte)0x92, (byte)0x89, ++ (byte)0x88, (byte)0xE5, (byte)0x7E, (byte)0x8E, ++ (byte)0xF0, (byte)0x24, (byte)0xD0, (byte)0xE1, ++ (byte)0xC4, (byte)0xB0, (byte)0x26, (byte)0x5A, ++ (byte)0x1E, (byte)0xBD, (byte)0xA0, (byte)0xCF, ++ (byte)0x3E, (byte)0x97, (byte)0x2A, (byte)0x13, ++ (byte)0x92, (byte)0x3B, (byte)0x39, (byte)0xD0, ++ (byte)0x1D, (byte)0xA3, (byte)0x6B, (byte)0x3E, ++ (byte)0xC2, (byte)0xBB, (byte)0x14, (byte)0xB6, ++ (byte)0xE2, (byte)0x4C, (byte)0x0E, (byte)0x5B, ++ (byte)0x4B, (byte)0xA4, (byte)0x9D, (byte)0xA6, ++ (byte)0x21, (byte)0xB0, (byte)0xF9, (byte)0xDE, ++ (byte)0x55, (byte)0xAE, (byte)0x5C, (byte)0x29, ++ (byte)0x0E, (byte)0xC1, (byte)0xFC, (byte)0xBA, ++ (byte)0x51, (byte)0xD3, (byte)0xB6, (byte)0x6D, ++ (byte)0x75, (byte)0x72, (byte)0xDF, (byte)0x43, ++ (byte)0xAB, (byte)0x94, (byte)0x21, (byte)0x6E, ++ (byte)0x0C, (byte)0xD1, (byte)0x93, (byte)0x54, ++ (byte)0x56, (byte)0x7D, (byte)0x4B, (byte)0x90, ++ (byte)0xF1, (byte)0x94, (byte)0x45, (byte)0xD4, ++ (byte)0x2A, (byte)0x71, (byte)0xA1, (byte)0xB8, ++ (byte)0xDD, (byte)0xAA, (byte)0x05, (byte)0xF0, ++ (byte)0x27, (byte)0x37, (byte)0xBD, (byte)0x44 ++ }; ++ ++ private static final byte alicePrivKeyEnc[] = { ++ (byte)0x30, (byte)0x81, (byte)0xE3, (byte)0x02, ++ (byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81, ++ (byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A, ++ (byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7, ++ (byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01, ++ (byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02, ++ (byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4, ++ (byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E, ++ (byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20, ++ (byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91, ++ (byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33, ++ (byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45, ++ (byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88, ++ (byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B, ++ (byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3, ++ (byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43, ++ (byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18, ++ (byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55, ++ (byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38, ++ (byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C, ++ (byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3, ++ (byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE, ++ (byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5, ++ (byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1, ++ (byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18, ++ (byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84, ++ (byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6, ++ (byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19, ++ (byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A, ++ (byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9, ++ (byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0, ++ (byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02, ++ (byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D, ++ (byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41, ++ (byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD, ++ (byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19, ++ (byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2, ++ (byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9, ++ (byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02, ++ (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02, ++ (byte)0x02, (byte)0x00, (byte)0x04, (byte)0x42, ++ (byte)0x02, (byte)0x40, (byte)0x36, (byte)0x4D, ++ (byte)0xD0, (byte)0x58, (byte)0x64, (byte)0x91, ++ (byte)0x78, (byte)0xA2, (byte)0x4B, (byte)0x79, ++ (byte)0x46, (byte)0xFE, (byte)0xC9, (byte)0xD9, ++ (byte)0xCA, (byte)0x5C, (byte)0xF9, (byte)0xFD, ++ (byte)0x6C, (byte)0x5D, (byte)0x76, (byte)0x3A, ++ (byte)0x41, (byte)0x6D, (byte)0x44, (byte)0x62, ++ (byte)0x75, (byte)0x93, (byte)0x81, (byte)0x93, ++ (byte)0x00, (byte)0x4C, (byte)0xB1, (byte)0xD8, ++ (byte)0x7D, (byte)0x9D, (byte)0xF3, (byte)0x16, ++ (byte)0x2C, (byte)0x6C, (byte)0x9F, (byte)0x7A, ++ (byte)0x84, (byte)0xA3, (byte)0x7A, (byte)0xC1, ++ (byte)0x4F, (byte)0x60, (byte)0xE3, (byte)0xB5, ++ (byte)0x86, (byte)0x28, (byte)0x08, (byte)0x4D, ++ (byte)0x94, (byte)0xB6, (byte)0x04, (byte)0x0D, ++ (byte)0xAC, (byte)0xBD, (byte)0x1F, (byte)0x42, ++ (byte)0x8F, (byte)0x1B ++ }; + -+Error: -+ cmsPipelineFree(Lut); -+ return NULL; - } - - -@@ -359,8 +356,11 @@ - return NULL; - } - -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, TRUE)); -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, TRUE)) || -+ !cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) { -+ cmsPipelineFree(Lut); -+ return NULL; -+ } - return Lut; - } - -@@ -395,12 +395,18 @@ - return Lut; - - // If the input is Lab, add also a conversion at the begin -- if (cmsGetColorSpace(hProfile) == cmsSigLabData) -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); -+ if (cmsGetColorSpace(hProfile) == cmsSigLabData && -+ !cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) -+ goto Error; - - // Add a matrix for conversion V2 to V4 Lab PCS -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) -+ goto Error; ++ private static final byte bobPubKeyEnc[] = { ++ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x23, ++ (byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06, ++ (byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48, ++ (byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01, ++ (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81, ++ (byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81, ++ (byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD, ++ (byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB, ++ (byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D, ++ (byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36, ++ (byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38, ++ (byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F, ++ (byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C, ++ (byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E, ++ (byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23, ++ (byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5, ++ (byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E, ++ (byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8, ++ (byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34, ++ (byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57, ++ (byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18, ++ (byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21, ++ (byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF, ++ (byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29, ++ (byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D, ++ (byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A, ++ (byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4, ++ (byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07, ++ (byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95, ++ (byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F, ++ (byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50, ++ (byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3, ++ (byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4, ++ (byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C, ++ (byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B, ++ (byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA, ++ (byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3, ++ (byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78, ++ (byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02, ++ (byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00, ++ (byte)0x03, (byte)0x81, (byte)0x84, (byte)0x00, ++ (byte)0x02, (byte)0x81, (byte)0x80, (byte)0x2C, ++ (byte)0x40, (byte)0xFA, (byte)0xF6, (byte)0xA6, ++ (byte)0xF8, (byte)0xAC, (byte)0xC2, (byte)0x4F, ++ (byte)0xCD, (byte)0xC7, (byte)0x37, (byte)0x93, ++ (byte)0xE5, (byte)0xE4, (byte)0x5E, (byte)0x18, ++ (byte)0x14, (byte)0xE6, (byte)0x50, (byte)0xDA, ++ (byte)0x55, (byte)0x38, (byte)0x5D, (byte)0x24, ++ (byte)0xF5, (byte)0x42, (byte)0x68, (byte)0x5F, ++ (byte)0xF5, (byte)0x15, (byte)0xC8, (byte)0x9B, ++ (byte)0x5D, (byte)0x06, (byte)0x3D, (byte)0xE1, ++ (byte)0x52, (byte)0x2F, (byte)0x98, (byte)0xFF, ++ (byte)0x37, (byte)0xBB, (byte)0x75, (byte)0x48, ++ (byte)0x48, (byte)0xE9, (byte)0x65, (byte)0x84, ++ (byte)0x37, (byte)0xBB, (byte)0xB3, (byte)0xE9, ++ (byte)0x36, (byte)0x01, (byte)0xB4, (byte)0x6A, ++ (byte)0x1C, (byte)0xB2, (byte)0x11, (byte)0x82, ++ (byte)0xCE, (byte)0x3D, (byte)0x65, (byte)0xE5, ++ (byte)0x3C, (byte)0x89, (byte)0xE9, (byte)0x52, ++ (byte)0x19, (byte)0xBD, (byte)0x58, (byte)0xF6, ++ (byte)0xA2, (byte)0x03, (byte)0xA8, (byte)0xB2, ++ (byte)0xA5, (byte)0xDB, (byte)0xEB, (byte)0xF5, ++ (byte)0x94, (byte)0xF9, (byte)0x46, (byte)0xBE, ++ (byte)0x45, (byte)0x4C, (byte)0x65, (byte)0xD2, ++ (byte)0xD1, (byte)0xCF, (byte)0xFF, (byte)0xFF, ++ (byte)0xFA, (byte)0x38, (byte)0xF1, (byte)0x72, ++ (byte)0xAB, (byte)0xB9, (byte)0x14, (byte)0x4E, ++ (byte)0xF5, (byte)0xF0, (byte)0x7A, (byte)0x8E, ++ (byte)0x45, (byte)0xFD, (byte)0x5B, (byte)0xF9, ++ (byte)0xA2, (byte)0x97, (byte)0x1B, (byte)0xAE, ++ (byte)0x2C, (byte)0x7B, (byte)0x6B, (byte)0x7C, ++ (byte)0x98, (byte)0xFE, (byte)0x58, (byte)0xDD, ++ (byte)0xBE, (byte)0xF6, (byte)0x1C, (byte)0x8E, ++ (byte)0xD0, (byte)0xA1, (byte)0x72 ++ }; + - return Lut; -+Error: -+ cmsPipelineFree(Lut); -+ return NULL; - } - - // Lut was not found, try to create a matrix-shaper -@@ -445,19 +451,25 @@ - - if (cmsGetPCS(hProfile) == cmsSigLabData) { - -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL))) -+ goto Error; - } - else { -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickYMatrix, NULL)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickYMatrix, NULL))) -+ goto Error; - } - -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &RevGrayTRC)); -- cmsFreeToneCurve(RevGrayTRC); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &RevGrayTRC))) -+ goto Error; - -+ cmsFreeToneCurve(RevGrayTRC); - return Lut; --} -- - -+Error: -+ cmsFreeToneCurve(RevGrayTRC); -+ cmsPipelineFree(Lut); -+ return NULL; ++ private static final byte bobPrivKeyEnc[] = { ++ (byte)0x30, (byte)0x81, (byte)0xE4, (byte)0x02, ++ (byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81, ++ (byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A, ++ (byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7, ++ (byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01, ++ (byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02, ++ (byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4, ++ (byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E, ++ (byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20, ++ (byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91, ++ (byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33, ++ (byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45, ++ (byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88, ++ (byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B, ++ (byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3, ++ (byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43, ++ (byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18, ++ (byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55, ++ (byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38, ++ (byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C, ++ (byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3, ++ (byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE, ++ (byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5, ++ (byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1, ++ (byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18, ++ (byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84, ++ (byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6, ++ (byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19, ++ (byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A, ++ (byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9, ++ (byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0, ++ (byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02, ++ (byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D, ++ (byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41, ++ (byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD, ++ (byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19, ++ (byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2, ++ (byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9, ++ (byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02, ++ (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02, ++ (byte)0x02, (byte)0x00, (byte)0x04, (byte)0x43, ++ (byte)0x02, (byte)0x41, (byte)0x00, (byte)0xE0, ++ (byte)0x31, (byte)0xE7, (byte)0x77, (byte)0xB8, ++ (byte)0xD0, (byte)0x7E, (byte)0x0A, (byte)0x9B, ++ (byte)0x94, (byte)0xD5, (byte)0x3D, (byte)0x33, ++ (byte)0x62, (byte)0x32, (byte)0x51, (byte)0xCE, ++ (byte)0x74, (byte)0x5C, (byte)0xA5, (byte)0x72, ++ (byte)0xD9, (byte)0x36, (byte)0xF3, (byte)0x8A, ++ (byte)0x3F, (byte)0x8B, (byte)0xC6, (byte)0xFE, ++ (byte)0xEF, (byte)0x94, (byte)0x8B, (byte)0x50, ++ (byte)0x41, (byte)0x9B, (byte)0x14, (byte)0xC8, ++ (byte)0xE9, (byte)0x1F, (byte)0x24, (byte)0x1F, ++ (byte)0x65, (byte)0x8E, (byte)0xD3, (byte)0x85, ++ (byte)0xD0, (byte)0x68, (byte)0x6C, (byte)0xF1, ++ (byte)0x79, (byte)0x45, (byte)0xD0, (byte)0x06, ++ (byte)0xA4, (byte)0xB8, (byte)0xE0, (byte)0x64, ++ (byte)0xF5, (byte)0x38, (byte)0x72, (byte)0x97, ++ (byte)0x00, (byte)0x23, (byte)0x5F ++ }; +} - - - static -@@ -506,15 +518,21 @@ - // This is not allowed by the spec, but this code is tolerant to those cases - if (cmsGetPCS(hProfile) == cmsSigLabData) { - -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLab2XYZ(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLab2XYZ(ContextID))) -+ goto Error; - } - -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Inv, NULL)); -- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, InvShapes)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Inv, NULL)) || -+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, InvShapes))) -+ goto Error; - } - - cmsFreeToneCurveTriple(InvShapes); - return Lut; -+Error: -+ cmsFreeToneCurveTriple(InvShapes); -+ cmsPipelineFree(Lut); -+ return NULL; - } - - -@@ -540,30 +558,6 @@ - - - // Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded --/*static --cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) --{ -- cmsContext ContextID = cmsGetProfileContextID(hProfile); -- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat)); -- cmsColorSpaceSignature PCS = cmsGetPCS(hProfile); -- -- if (Lut == NULL) return NULL; -- -- // If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding, -- // and since the formatter has already accomodated to 0..1.0, we should undo this change -- if ( PCS == cmsSigLabData) -- { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); -- } -- else -- if (PCS == cmsSigXYZData) -- { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); -- } -- -- return Lut; --}*/ -- - static - cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat) - { -@@ -578,25 +572,33 @@ - // and since the formatter has already accomodated to 0..1.0, we should undo this change - if ( PCS == cmsSigLabData) - { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID))) -+ goto Error; - } - else - if (PCS == cmsSigXYZData) - { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID))) -+ goto Error; - } - - // the output can be Lab or XYZ, in which case normalisation is needed on the end of the pipeline - if ( dataSpace == cmsSigLabData) - { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID))) -+ goto Error; - } -- else if ( dataSpace == cmsSigXYZData) -+ else if (dataSpace == cmsSigXYZData) - { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID))) -+ goto Error; - } - - return Lut; -+ -+Error: -+ cmsPipelineFree(Lut); -+ return NULL; - } - - // Create an output MPE LUT from agiven profile. Version mismatches are handled here -@@ -636,30 +638,35 @@ - // Now it is time for a controversial stuff. I found that for 3D LUTS using - // Lab used as indexer space, trilinear interpolation should be used - if (cmsGetPCS(hProfile) == cmsSigLabData) -- ChangeInterpolationToTrilinear(Lut); -+ ChangeInterpolationToTrilinear(Lut); - - // We need to adjust data only for Lab and Lut16 type - if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData) - return Lut; - - // Add a matrix for conversion V4 to V2 Lab PCS -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) -+ goto Error; - - // If the output is Lab, add also a conversion at the end - if (cmsGetColorSpace(hProfile) == cmsSigLabData) -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) -+ goto Error; - - return Lut; -+Error: -+ cmsPipelineFree(Lut); -+ return NULL; - } - - // Lut not found, try to create a matrix-shaper - - // Check if this is a grayscale profile. -- if (cmsGetColorSpace(hProfile) == cmsSigGrayData) { -+ if (cmsGetColorSpace(hProfile) == cmsSigGrayData) { - -- // if so, build appropiate conversion tables. -- // The tables are the PCS iluminant, scaled across GrayTRC -- return BuildGrayOutputPipeline(hProfile); -+ // if so, build appropiate conversion tables. -+ // The tables are the PCS iluminant, scaled across GrayTRC -+ return BuildGrayOutputPipeline(hProfile); - } - - // Not gray, create a normal matrix-shaper, which only operates in XYZ space -@@ -681,25 +688,32 @@ - - if (spc == cmsSigLabData) - { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID))) -+ goto Error; - } - else - if (spc == cmsSigXYZData) - { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID))) -+ goto Error; - } - - if (PCS == cmsSigLabData) - { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID))) -+ goto Error; - } - else - if (PCS == cmsSigXYZData) - { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID))) -+ goto Error; - } - -- return Lut; -+ return Lut; -+Error: -+ cmsPipelineFree(Lut); -+ return NULL; - } - - // This one includes abstract profiles as well. Matrix-shaper cannot be obtained on that device class. The -@@ -721,15 +735,21 @@ - if (nc == NULL) return NULL; - - Lut = cmsPipelineAlloc(ContextID, 0, 0); -- if (Lut == NULL) { -- cmsFreeNamedColorList(nc); -- return NULL; -- } -+ if (Lut == NULL) -+ goto Error; -+ -+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, FALSE))) -+ goto Error; - -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, FALSE)); - if (cmsGetColorSpace(hProfile) == cmsSigLabData) -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); -+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) -+ goto Error; + - return Lut; -+Error: -+ cmsPipelineFree(Lut); -+ cmsFreeNamedColorList(nc); -+ return NULL; - } - - if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence -@@ -760,10 +780,10 @@ - Lut = cmsPipelineDup(Lut); - if (Lut == NULL) return NULL; - -- // Now it is time for a controversial stuff. I found that for 3D LUTS using -- // Lab used as indexer space, trilinear interpolation should be used -+ // Now it is time for a controversial stuff. I found that for 3D LUTS using -+ // Lab used as indexer space, trilinear interpolation should be used - if (cmsGetColorSpace(hProfile) == cmsSigLabData) -- ChangeInterpolationToTrilinear(Lut); -+ ChangeInterpolationToTrilinear(Lut); - - // After reading it, we have info about the original type - OriginalType = _cmsGetTagTrueType(hProfile, tag16); -@@ -774,16 +794,20 @@ - // Here it is possible to get Lab on both sides - - if (cmsGetPCS(hProfile) == cmsSigLabData) { -- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); -+ if(!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) -+ goto Error2; - } +--- ./jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2013-09-06 11:29:18.000000000 -0700 ++++ ./jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -56,7 +56,7 @@ - if (cmsGetColorSpace(hProfile) == cmsSigLabData) { -- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); -+ if(!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) -+ goto Error2; - } + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + ;; - return Lut; +--- ./jdk/test/com/sun/jdi/JITDebug.sh 2013-09-06 11:29:18.000000000 -0700 ++++ ./jdk/test/com/sun/jdi/JITDebug.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -63,7 +63,7 @@ + OS=`uname -s` + export TRANSPORT_METHOD + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + TRANSPORT_METHOD=dt_socket + ;; +--- ./jdk/test/com/sun/jdi/PrivateTransportTest.sh 2013-09-06 11:29:18.000000000 -0700 ++++ ./jdk/test/com/sun/jdi/PrivateTransportTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -123,7 +123,7 @@ + esac + libloc=${jreloc}/lib/${libarch} + ;; +- Linux) ++ Linux | *BSD) + xx=`find ${jreloc}/lib -name libdt_socket.so` + libloc=`dirname ${xx}` + ;; +--- ./jdk/test/com/sun/jdi/ShellScaffold.sh 2013-09-06 11:29:19.000000000 -0700 ++++ ./jdk/test/com/sun/jdi/ShellScaffold.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -293,7 +293,7 @@ + psCmd=ps + jstack=jstack.exe + ;; +- SunOS | Linux | Darwin) ++ SunOS | Linux | *BSD | Darwin) + transport=dt_socket + address= + devnull=/dev/null +--- ./jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2013-09-06 11:29:19.000000000 -0700 ++++ ./jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -112,7 +112,7 @@ + fi + ;; -- -+Error2: -+ cmsPipelineFree(Lut); -+ return NULL; - } +- Linux | Darwin ) ++ Linux | *BSD | Darwin ) + pass "This test always passes on $OS" + ;; - // --------------------------------------------------------------------------------------------------------------- ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c 2014-04-20 12:39:16.000000000 -0700 -@@ -264,10 +264,10 @@ - if (NewElem ->TheCurves != NULL) { - for (i=0; i < NewElem ->nCurves; i++) { - if (NewElem ->TheCurves[i]) -- cmsFreeToneCurve(Data ->TheCurves[i]); -+ cmsFreeToneCurve(NewElem ->TheCurves[i]); - } - } -- _cmsFree(mpe ->ContextID, Data ->TheCurves); -+ _cmsFree(mpe ->ContextID, NewElem ->TheCurves); - _cmsFree(mpe ->ContextID, NewElem); - return NULL; +--- ./jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2013-09-06 11:29:19.000000000 -0700 ++++ ./jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -45,7 +45,7 @@ + + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + ;; + Windows* | CYGWIN*) +--- ./jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2013-09-06 11:29:19.000000000 -0700 ++++ ./jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -72,6 +72,16 @@ + done } -@@ -392,6 +392,8 @@ - void MatrixElemTypeFree(cmsStage* mpe) - { - _cmsStageMatrixData* Data = (_cmsStageMatrixData*) mpe ->Data; -+ if (Data == NULL) -+ return; - if (Data ->Double) - _cmsFree(mpe ->ContextID, Data ->Double); -@@ -526,10 +528,15 @@ ++bsd_swap_size() ++{ ++ total_swap=0 ++ for i in `/usr/sbin/swapinfo -k | awk '{print $2}' | grep -v blocks` ++ do ++ # swapinfo -k returns size in kilobytes. ++ total_swap=`expr $i \* 1024 + $total_swap` ++ done ++} ++ + # Test GetTotalSwapSpaceSize if we are running on Unix + total_swap=0 + case `uname -s` in +@@ -83,6 +93,9 @@ + total_swap=`free -b | grep -i swap | awk '{print $2}'` + runOne GetTotalSwapSpaceSize $total_swap + ;; ++ *BSD ) ++ bsd_swap_size ++ runOne GetTotalSwapSpaceSize $total_swap + Darwin ) + # $ sysctl -n vm.swapusage + # total = 8192.00M used = 7471.11M free = 720.89M (encrypted) +--- ./jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2013-09-06 11:29:19.000000000 -0700 ++++ ./jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -48,7 +48,7 @@ - if (Data ->Tab.T) { + # Test GetMaxFileDescriptorCount if we are running on Unix + case `uname -s` in +- SunOS | Linux ) ++ SunOS | Linux | *BSD | Darwin ) + runOne GetMaxFileDescriptorCount + ;; + * ) +--- ./jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2013-09-06 11:29:19.000000000 -0700 ++++ ./jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -48,7 +48,7 @@ -- if (Data ->HasFloatValues) -+ if (Data ->HasFloatValues) { - NewElem ->Tab.TFloat = (cmsFloat32Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.TFloat, Data ->nEntries * sizeof (cmsFloat32Number)); -- else -+ if (NewElem ->Tab.TFloat == NULL) -+ goto Error; + # Test GetOpenFileDescriptorCount if we are running on Unix + case `uname -s` in +- SunOS | Linux ) ++ SunOS | Linux | *BSD | Darwin ) + runOne GetOpenFileDescriptorCount + ;; + * ) +--- ./jdk/test/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,276 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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 8034181 ++ * @summary SIGBUS in SctpChannelImpl receive ++ * @author chegar ++ */ ++ ++import java.net.InetSocketAddress; ++import java.net.SocketAddress; ++import java.io.IOException; ++import java.nio.ByteBuffer; ++import com.sun.nio.sctp.AbstractNotificationHandler; ++import com.sun.nio.sctp.AssociationChangeNotification; ++import com.sun.nio.sctp.AssociationChangeNotification.AssocChangeEvent; ++import com.sun.nio.sctp.HandlerResult; ++import com.sun.nio.sctp.MessageInfo; ++import com.sun.nio.sctp.Notification; ++import com.sun.nio.sctp.PeerAddressChangeNotification; ++import com.sun.nio.sctp.SctpChannel; ++import com.sun.nio.sctp.SctpServerChannel; ++import com.sun.nio.sctp.ShutdownNotification; ++import static java.lang.System.out; ++import static java.lang.System.err; ++import static java.nio.charset.StandardCharsets.US_ASCII; ++ ++public class ReceiveIntoDirect { ++ /* suitably small message to NOT overrun small buffers */ ++ final byte[] msgBytes = "Hello".getBytes(US_ASCII); ++ ++ /* number of client connections/combinations (accepted by the server) */ ++ final int NUM_CONNECTIONS = 75; ++ ++ void test(String[] args) throws IOException { ++ SocketAddress address = null; ++ Server server; ++ ++ if (!Util.isSCTPSupported()) { ++ out.println("SCTP protocol is not supported"); ++ out.println("Test cannot be run"); ++ return; ++ } ++ ++ if (args.length == 2) { ++ /* requested to connecct to a specific address */ ++ try { ++ int port = Integer.valueOf(args[1]); ++ address = new InetSocketAddress(args[0], port); ++ } catch (NumberFormatException nfe) { ++ err.println(nfe); ++ } + } else { - NewElem ->Tab.T = (cmsUInt16Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.T, Data ->nEntries * sizeof (cmsUInt16Number)); -+ if (NewElem ->Tab.TFloat == NULL) -+ goto Error; ++ /* start server on local machine, default */ ++ server = new Server(); ++ server.start(); ++ address = server.address(); ++ debug("Server started and listening on " + address); + } - } ++ ++ /* many combinations with varing buffer sizes, and offsets */ ++ runWithManyOffsets(address, 20); ++ runWithManyOffsets(address, 49); ++ runWithManyOffsets(address, 50); ++ runWithManyOffsets(address, 51); ++ runWithManyOffsets(address, 1024); ++ } ++ ++ void runWithManyOffsets(SocketAddress addr, int bufferSize) ++ throws IOException ++ { ++ doTest(addr, bufferSize, 1); ++ doTest(addr, bufferSize, 2); ++ doTest(addr, bufferSize, 3); ++ doTest(addr, bufferSize, 4); ++ doTest(addr, bufferSize, 5); ++ doTest(addr, bufferSize, 6); ++ doTest(addr, bufferSize, 7); ++ doTest(addr, bufferSize, 8); ++ doTest(addr, bufferSize, 9); ++ doTest(addr, bufferSize, 10); ++ doTest(addr, bufferSize, 11); ++ doTest(addr, bufferSize, 12); ++ doTest(addr, bufferSize, 13); ++ doTest(addr, bufferSize, 14); ++ doTest(addr, bufferSize, 15); ++ } ++ ++ void doTest(SocketAddress peerAddress, int bufferSize, int bufferOffset) ++ throws IOException ++ { ++ debug("\n\nTesting with bufferSize " + bufferSize + " and offset " + bufferOffset); ++ assert bufferOffset + msgBytes.length <= bufferSize : ++ "buffer offset + message length greater than buffer size "; ++ ++ ByteBuffer buffer = ByteBuffer.allocateDirect(bufferSize); ++ MessageInfo info; ++ ++ try (SctpChannel channel = SctpChannel.open()) { ++ channel.connect(peerAddress); ++ ++ ReceiveNotificationHandler handler = ++ new ReceiveNotificationHandler(); ++ ++ /* TEST 1: Assoc/peer change notif into direct buffer with offest */ ++ do { ++ debug("Test 1: Assoc/peer change with offset " + bufferOffset); ++ buffer.position(bufferOffset); ++ info = channel.receive(buffer, null, handler); ++ if (info == null) { ++ fail("unexpected null from receive"); ++ return; ++ } ++ } while (!info.isComplete()); ++ ++ buffer.flip().position(bufferOffset); ++ check(handler.receivedCommUp(), "SCTP_COMM_UP not received"); ++ check(info != null, "info is null"); ++ check(info.address() != null, "address is null"); ++ check(info.association() != null, "association is null"); ++ check(info.isComplete(), "message is not complete"); ++ check(info.isUnordered() != true, ++ "message should not be unordered"); ++ check(info.streamNumber() >= 0, "invalid stream number"); ++ check(info.bytes() == msgBytes.length, ++ "bytes received not equal to message length"); ++ check(info.bytes() == buffer.remaining(), "bytes != remaining"); ++ check(Util.compare(buffer, msgBytes), ++ "received message not the same as sent message"); ++ ++ /* TEST 2: shutdown notification with offset */ ++ debug("Test 2: shutdown notif with offset " + bufferOffset); ++ buffer.clear().position(bufferOffset); ++ while ((info = channel.receive(buffer, null, handler )) != null && ++ info.bytes() != -1 ); ++ } ++ } ++ ++ class Server implements Runnable ++ { ++ private final InetSocketAddress serverAddr; ++ private final SctpServerChannel ssc; ++ ++ public Server() throws IOException { ++ ssc = SctpServerChannel.open().bind(null); ++ java.util.Set addrs = ssc.getAllLocalAddresses(); ++ if (addrs.isEmpty()) ++ debug("addrs should not be empty"); ++ ++ serverAddr = (InetSocketAddress) addrs.iterator().next(); ++ } ++ ++ public void start() { ++ (new Thread(this, "Server-" + serverAddr.getPort())).start(); ++ } ++ ++ public InetSocketAddress address() { ++ return serverAddr; ++ } ++ ++ @Override ++ public void run() { ++ try { ++ for (int i=0; i ++ { ++ boolean receivedCommUp; // false ++ ++ public ReceiveNotificationHandler() { } ++ ++ public boolean receivedCommUp() { ++ return receivedCommUp; ++ } ++ ++ @Override ++ public HandlerResult handleNotification( ++ Notification notification, Object attachment) { ++ fail("Unknown notification type"); ++ return HandlerResult.CONTINUE; ++ } ++ ++ @Override ++ public HandlerResult handleNotification( ++ AssociationChangeNotification notification, Object attachment) { ++ AssocChangeEvent event = notification.event(); ++ debug("AssociationChangeNotification"); ++ debug(" Association: " + notification.association()); ++ debug(" Event: " + event); ++ ++ if (event.equals(AssocChangeEvent.COMM_UP)) ++ receivedCommUp = true; ++ ++ return HandlerResult.CONTINUE; ++ } ++ ++ @Override ++ public HandlerResult handleNotification( ++ PeerAddressChangeNotification pacn, Object unused) ++ { ++ debug("PeerAddressChangeNotification: " + pacn); ++ return HandlerResult.CONTINUE; ++ } ++ ++ @Override ++ public HandlerResult handleNotification( ++ ShutdownNotification notification, Object attachment) { ++ debug("ShutdownNotification"); ++ debug(" Association: " + notification.association()); ++ return HandlerResult.CONTINUE; ++ } ++ } ++ //--------------------- Infrastructure --------------------------- ++ boolean debug = true; ++ volatile int passed = 0, failed = 0; ++ void pass() {passed++;} ++ void fail() {failed++; Thread.dumpStack();} ++ void fail(String msg) {System.err.println(msg); fail();} ++ void unexpected(Throwable t) {failed++; t.printStackTrace();} ++ void check(boolean cond) {if (cond) pass(); else fail();} ++ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} ++ void debug(String message) {if(debug) { ++ System.out.println(Thread.currentThread() + " " + message); } } ++ public static void main(String[] args) throws Throwable { ++ Class k = new Object(){}.getClass().getEnclosingClass(); ++ try {k.getMethod("instanceMain",String[].class) ++ .invoke( k.newInstance(), (Object) args);} ++ catch (Throwable e) {throw e.getCause();}} ++ public void instanceMain(String[] args) throws Throwable { ++ try {test(args);} catch (Throwable t) {unexpected(t);} ++ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed); ++ if (failed > 0) throw new AssertionError("Some tests failed");} ++ ++} +--- ./jdk/test/com/sun/tools/attach/CommonSetup.sh 2013-09-06 11:29:21.000000000 -0700 ++++ ./jdk/test/com/sun/tools/attach/CommonSetup.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -36,7 +36,7 @@ - NewElem ->Params = _cmsComputeInterpParamsEx(mpe ->ContextID, -@@ -538,8 +545,14 @@ - Data ->Params ->nOutputs, - NewElem ->Tab.T, - Data ->Params ->dwFlags); -- -- return (void*) NewElem; -+ if (NewElem->Params != NULL) -+ return (void*) NewElem; -+ Error: -+ if (NewElem->Tab.T) -+ // This works for both types -+ _cmsFree(mpe ->ContextID, NewElem -> Tab.T); -+ _cmsFree(mpe ->ContextID, NewElem); -+ return NULL; + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/InterprocessMessages.java 2013-09-06 11:29:21.000000000 -0700 ++++ ./jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/InterprocessMessages.java 2014-06-06 19:56:32.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,5 +24,6 @@ + interface InterprocessMessages { + final static int EXECUTION_IS_SUCCESSFULL = 0; + final static int DATA_IS_CORRUPTED = 212; ++ final static int NO_DROP_HAPPENED = 112; } - -@@ -636,7 +649,6 @@ - for (i=0; i < MAX_INPUT_DIMENSIONS; i++) - Dimensions[i] = nGridPoints; - +--- ./jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html 2013-09-06 11:29:21.000000000 -0700 ++++ ./jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html 2014-06-06 19:56:32.000000000 -0700 +@@ -1,18 +1,39 @@ + +- ++ ++ ++ + + Java 7 on mac os x only provides text clipboard formats + +--- ./jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java 2013-09-06 11:29:21.000000000 -0700 ++++ ./jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java 2014-06-06 19:56:32.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,17 +22,10 @@ + */ + /* +- @test +- @bug 8005932 +- @summary Java 7 on mac os x only provides text clipboard formats +- @author mikhail.cherkasov@oracle.com +- @library ../../regtesthelpers +- @library ../../regtesthelpers/process +- @build Util +- @build ProcessResults ProcessCommunicator - - - return NewMPE; - } - -@@ -772,7 +781,7 @@ - int i, t, nTotalPoints, index, rest; - int nInputs, nOutputs; - cmsUInt32Number* nSamples; -- cmsUInt16Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS]; -+ cmsUInt16Number In[MAX_INPUT_DIMENSIONS+1], Out[MAX_STAGE_CHANNELS]; - _cmsStageCLutData* clut; - - if (mpe == NULL) return FALSE; -@@ -785,7 +794,9 @@ - nInputs = clut->Params ->nInputs; - nOutputs = clut->Params ->nOutputs; - -- if (nInputs >= cmsMAXCHANNELS) return FALSE; -+ if (nInputs <= 0) return FALSE; -+ if (nOutputs <= 0) return FALSE; -+ if (nInputs > MAX_INPUT_DIMENSIONS) return FALSE; - if (nOutputs >= MAX_STAGE_CHANNELS) return FALSE; - - nTotalPoints = CubeSize(nSamples, nInputs); -@@ -832,14 +843,16 @@ - int i, t, nTotalPoints, index, rest; - int nInputs, nOutputs; - cmsUInt32Number* nSamples; -- cmsFloat32Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS]; -+ cmsFloat32Number In[MAX_INPUT_DIMENSIONS+1], Out[MAX_STAGE_CHANNELS]; - _cmsStageCLutData* clut = (_cmsStageCLutData*) mpe->Data; +- @run applet/othervm MissedHtmlAndRtfBug.html ++ This is a part of MissedHtmlAndRtfBug.html test. Do not add any JTREG tags here ++ bug 8005932 ++ summary Java 7 on mac os x only provides text clipboard formats ++ author mikhail.cherkasov@oracle.com + */ + import java.awt.*; + import java.awt.datatransfer.DataFlavor; +@@ -49,6 +42,7 @@ + import static java.lang.Thread.sleep; + + public class MissedHtmlAndRtfBug extends Applet { ++ + public void init() { + setLayout(new BorderLayout()); + }//End init() +@@ -84,9 +78,6 @@ + args.add(concatStrings(DataFlavorSearcher.RICH_TEXT_NAMES)); + + ProcessResults processResults = +-// ProcessCommunicator.executeChildProcess(this.getClass(), "/Users/mcherkasov/ws/clipboard/DataFlover/out/production/DataFlover" + +-// " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 ", +-// args.toArray(new String[0])); + ProcessCommunicator.executeChildProcess(this.getClass(), + "." + File.separator + System.getProperty("java.class.path"), args.toArray(new String[]{})); + +@@ -119,6 +110,13 @@ + throw new RuntimeException("TEST IS FAILED: Target has received" + + " corrupted data."); + } ++ if (InterprocessMessages.NO_DROP_HAPPENED == ++ processResults.getExitValue()) { ++ processResults.printProcessErrorOutput(System.err); ++ throw new RuntimeException("Error. Drop did not happen." + ++ " Target frame is possibly covered by a window of other application." + ++ " Please, rerun the test with all windows minimized."); ++ } + processResults.verifyStdErr(System.err); + processResults.verifyProcessExitValue(System.err); + processResults.printProcessStandartOutput(System.out); +@@ -186,7 +184,7 @@ + } + } - nSamples = clut->Params ->nSamples; - nInputs = clut->Params ->nInputs; - nOutputs = clut->Params ->nOutputs; +- public static void main(String[] args) { ++ public static void main(String[] args) throws InterruptedException { + Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extractInt(args), + InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extractInt(args)); + Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extractInt(args), +@@ -199,6 +197,8 @@ + } catch (InterruptedException e) { + e.printStackTrace(); + } ++ sleep(5000); ++ System.exit(InterprocessMessages.NO_DROP_HAPPENED); + } -- if (nInputs >= cmsMAXCHANNELS) return FALSE; -+ if (nInputs <= 0) return FALSE; -+ if (nOutputs <= 0) return FALSE; -+ if (nInputs > MAX_INPUT_DIMENSIONS) return FALSE; - if (nOutputs >= MAX_STAGE_CHANNELS) return FALSE; - nTotalPoints = CubeSize(nSamples, nInputs); -@@ -1021,7 +1034,7 @@ - mpe = cmsStageAllocToneCurves(ContextID, 3, LabTable); - cmsFreeToneCurveTriple(LabTable); +--- ./jdk/test/java/awt/Focus/KeyEventForBadFocusOwnerTest/KeyEventForBadFocusOwnerTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/Focus/KeyEventForBadFocusOwnerTest/KeyEventForBadFocusOwnerTest.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,144 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 4476629 ++ @library ../../../../javax/swing/regtesthelpers ++ @build Util ++ @summary KeyEvents dispatched to old focus owner that is no longer showing ++ @author son@sparc.spb.su: area=awt.focus ++ @run main KeyEventForBadFocusOwnerTest ++*/ ++ ++/** ++ * KeyEventForBadFocusOwnerTest.java ++ * ++ * summary: KeyEvents dispatched to old focus owner that is no longer showing ++ */ ++ ++ ++import java.awt.Robot; ++import java.awt.Toolkit; ++ ++import java.awt.event.*; ++ ++import javax.swing.*; ++import javax.swing.event.*; ++import sun.awt.SunToolkit; ++ ++public class KeyEventForBadFocusOwnerTest { ++ final static String ITEM_ONE_TEXT = "one"; ++ final static String ITEM_TWO_TEXT = "two"; ++ ++ volatile static boolean itemOneSelected = false; ++ volatile static boolean itemTwoSelected = false; ++ volatile static boolean unexpectedItemSelected = false; ++ ++ static Robot robot; ++ static SunToolkit toolkit; ++ ++ public static void main(String[] args) throws Exception { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ JFrame frame = new JFrame("TEST"); ++ JMenuBar mb = new JMenuBar(); ++ JMenu one = new JMenu(ITEM_ONE_TEXT); ++ JMenu two = new JMenu(ITEM_TWO_TEXT); ++ ++ mb.add(one); ++ mb.add(two); ++ ++ ActionListener al = new ActionListener() { ++ public void actionPerformed(ActionEvent ae) { ++ String itemText = ((JMenuItem)ae.getSource()).getText(); ++ System.out.println("--> " + itemText); ++ unexpectedItemSelected = true; ++ } ++ }; ++ one.setMnemonic(KeyEvent.VK_O); ++ JMenuItem item = new JMenuItem("one 1"); ++ item.setMnemonic(KeyEvent.VK_O); ++ item.addActionListener(al); ++ one.add(item); ++ one.add("two"); ++ one.add("three"); ++ ++ two.setMnemonic(KeyEvent.VK_T); ++ item = new JMenuItem("two 2"); ++ item.setMnemonic(KeyEvent.VK_T); ++ item.addActionListener(al); ++ two.add(item); ++ two.add("three"); ++ two.add("four"); ++ ++ PopupMenuListener popupMenuListener = new PopupMenuListener() { ++ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { ++ System.out.print(e); ++ System.out.print(e.getSource()); ++ String itemText = ((JPopupMenu)e.getSource()).getName(); ++ System.out.println("Menu " + itemText + "is opened."); ++ switch(itemText) { ++ case ITEM_ONE_TEXT: ++ itemOneSelected = true; ++ break; ++ case ITEM_TWO_TEXT: ++ itemTwoSelected = true; ++ break; ++ } ++ } ++ ++ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {} ++ public void popupMenuCanceled(PopupMenuEvent e) {} ++ }; ++ one.getPopupMenu().setName(ITEM_ONE_TEXT); ++ two.getPopupMenu().setName(ITEM_TWO_TEXT); ++ one.getPopupMenu().addPopupMenuListener(popupMenuListener); ++ two.getPopupMenu().addPopupMenuListener(popupMenuListener); ++ frame.setJMenuBar(mb); ++ frame.setSize(100,100); ++ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ frame.pack(); ++ frame.setVisible(true); ++ } ++ }); ++ ++ toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ toolkit.realSync(); ++ ++ robot = new Robot(); ++ robot.setAutoDelay(100); ++ ++ Util.hitMnemonics(robot, KeyEvent.VK_O); ++ Util.hitMnemonics(robot, KeyEvent.VK_T); ++ ++ toolkit.realSync(); ++ Thread.sleep(1000); // workaround for MacOS ++ ++ if (unexpectedItemSelected) { ++ throw new Exception("Test failed. KeyEvent dispatched to old focus owner. "); ++ } ++ if (!itemOneSelected || !itemTwoSelected) { ++ throw new Exception("Not all expected events were received"); ++ } ++ } ++} +--- ./jdk/test/java/awt/Frame/DefaultUnixIcon/TestUnixDefaultIcon.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/Frame/DefaultUnixIcon/TestUnixDefaultIcon.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,448 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 4934843 ++@summary Tests that Frame/Dialog have java-cup icon on Unix ++@author dom@sparc.spb.su: area=awt.toplevel ++@run main/manual TestUnixDefaultIcon ++*/ ++ ++import java.awt.*; ++import java.awt.event.*; ++import java.awt.image.*; ++import javax.imageio.ImageIO; ++import java.lang.reflect.*; ++import java.io.*; ++import java.awt.color.*; ++ ++public class TestUnixDefaultIcon ++{ ++ private static void init() ++ { ++ //*** Create instructions for the user here *** ++ boolean isWindows = Toolkit.getDefaultToolkit().getClass().getName().equals("sun.awt.windows.WToolkit"); ++ ++ String[] instructions; ++ if (isWindows){ ++ instructions = new String[]{"This test is for linux only. Passed automatically."}; ++ } else { ++ instructions = new String[]{ ++ "This test verifies that Frame and Dialog on Unix have Java-cup", ++ "icon by default as their icon. For your convenience, the example ", ++ "of such icons of different sizes are displayed inside of the frame", ++ "Press Pass if it is so, Fail otherwise." ++ }; ++ } ++ Sysout.createDialog( ); ++ Sysout.printInstructions( instructions ); ++ ++ if (isWindows){ ++ pass(); ++ return; ++ } ++ ++ Frame frame = new Frame("frame"); ++ frame.setLayout(new FlowLayout()); ++ frame.add(new IconCanvas(16, getImage("16"))); ++ frame.add(new IconCanvas(24, getImage("24"))); ++ frame.add(new IconCanvas(32, getImage("32"))); ++ frame.add(new IconCanvas(48, getImage("48"))); ++ frame.setBounds(0, 500, 200, 100); ++ frame.setVisible(true); ++ ++ Dialog d = new Dialog(frame, "Dialog", false); ++ d.setBounds(200, 500, 200, 100); ++ d.setVisible(true); ++ ++ }//End init() ++ ++ private static BufferedImage createImage(int[] bits) { ++ ColorModel cm = ++ new DirectColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), 32, ++ 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000, ++ false, DataBuffer.TYPE_INT); ++ DataBuffer buffer = new DataBufferInt(bits, bits.length-2, 2); ++ WritableRaster raster = ++ Raster.createPackedRaster(buffer, bits[0], bits[1], ++ bits[0], ++ new int[] {0x00ff0000, 0x0000ff00, ++ 0x000000ff, 0xff000000}, ++ null); ++ BufferedImage im = new BufferedImage(cm, raster, false, null); ++ return im; ++ } ++ private static Image getImage(String name) { ++ try { ++ Class cl = Class.forName("sun.awt.AWTIcon32_java_icon" + name + "_png"); ++ Field f = cl.getField("java_icon" + name + "_png"); ++ int[] ints = (int[])f.get(cl); ++ ++ return createImage(ints); ++ } catch (ClassNotFoundException | IllegalAccessException | NoSuchFieldException e) { ++ throw new RuntimeException(e); ++ } ++ } ++ ++ static class IconCanvas extends Canvas { ++ private Image im; ++ private int s; ++ public IconCanvas(int s, Image im) { ++ this.im = im; ++ this.s = s; ++ } ++ ++ public Dimension getPreferredSize() { ++ return new Dimension(s, s); ++ } ++ ++ public void paint(Graphics g) { ++ if (im != null) { ++ g.drawImage(im, 0, 0, this); ++ } ++ } ++ } ++ ++ /***************************************************** ++ * Standard Test Machinery Section ++ * DO NOT modify anything in this section -- it's a ++ * standard chunk of code which has all of the ++ * synchronisation necessary for the test harness. ++ * By keeping it the same in all tests, it is easier ++ * to read and understand someone else's test, as ++ * well as insuring that all tests behave correctly ++ * with the test harness. ++ * There is a section following this for test-defined ++ * classes ++ ******************************************************/ ++ private static boolean theTestPassed = false; ++ private static boolean testGeneratedInterrupt = false; ++ private static String failureMessage = ""; ++ ++ private static Thread mainThread = null; ++ ++ private static int sleepTime = 300000; ++ ++ public static void main( String args[] ) throws InterruptedException ++ { ++ mainThread = Thread.currentThread(); ++ try ++ { ++ init(); ++ } ++ catch( TestPassedException e ) ++ { ++ //The test passed, so just return from main and harness will ++ // interepret this return as a pass ++ return; ++ } ++ //At this point, neither test passed nor test failed has been ++ // called -- either would have thrown an exception and ended the ++ // test, so we know we have multiple threads. ++ ++ //Test involves other threads, so sleep and wait for them to ++ // called pass() or fail() ++ try ++ { ++ Thread.sleep( sleepTime ); ++ //Timed out, so fail the test ++ throw new RuntimeException( "Timed out after " + sleepTime/1000 + " seconds" ); ++ } ++ catch (InterruptedException e) ++ { ++ if( ! testGeneratedInterrupt ) throw e; ++ ++ //reset flag in case hit this code more than once for some reason (just safety) ++ testGeneratedInterrupt = false; ++ if ( theTestPassed == false ) ++ { ++ throw new RuntimeException( failureMessage ); ++ } ++ } ++ ++ }//main ++ ++ public static synchronized void setTimeoutTo( int seconds ) ++ { ++ sleepTime = seconds * 1000; ++ } ++ ++ public static synchronized void pass() ++ { ++ Sysout.println( "The test passed." ); ++ Sysout.println( "The test is over, hit Ctl-C to stop Java VM" ); ++ //first check if this is executing in main thread ++ if ( mainThread == Thread.currentThread() ) ++ { ++ //Still in the main thread, so set the flag just for kicks, ++ // and throw a test passed exception which will be caught ++ // and end the test. ++ theTestPassed = true; ++ throw new TestPassedException(); ++ } ++ //pass was called from a different thread, so set the flag and interrupt ++ // the main thead. ++ theTestPassed = true; ++ testGeneratedInterrupt = true; ++ mainThread.interrupt(); ++ }//pass() ++ ++ public static synchronized void fail() ++ { ++ //test writer didn't specify why test failed, so give generic ++ fail( "it just plain failed! :-)" ); ++ } ++ ++ public static synchronized void fail( String whyFailed ) ++ { ++ Sysout.println( "The test failed: " + whyFailed ); ++ Sysout.println( "The test is over, hit Ctl-C to stop Java VM" ); ++ //check if this called from main thread ++ if ( mainThread == Thread.currentThread() ) ++ { ++ //If main thread, fail now 'cause not sleeping ++ throw new RuntimeException( whyFailed ); ++ } ++ theTestPassed = false; ++ testGeneratedInterrupt = true; ++ failureMessage = whyFailed; ++ mainThread.interrupt(); ++ }//fail() ++ ++}// class TestUnixDefaultIcon ++ ++//This exception is used to exit from any level of call nesting ++// when it's determined that the test has passed, and immediately ++// end the test. ++class TestPassedException extends RuntimeException ++{ ++} ++ ++//*********** End Standard Test Machinery Section ********** ++ ++ ++//************ Begin classes defined for the test **************** ++ ++// make listeners in a class defined here, and instantiate them in init() ++ ++/* Example of a class which may be written as part of a test ++class NewClass implements anInterface ++ { ++ static int newVar = 0; ++ ++ public void eventDispatched(AWTEvent e) ++ { ++ //Counting events to see if we get enough ++ eventCount++; ++ ++ if( eventCount == 20 ) ++ { ++ //got enough events, so pass ++ ++ TestUnixDefaultIcon.pass(); ++ } ++ else if( tries == 20 ) ++ { ++ //tried too many times without getting enough events so fail ++ ++ TestUnixDefaultIcon.fail(); ++ } ++ ++ }// eventDispatched() ++ ++ }// NewClass class ++ ++*/ ++ ++ ++//************** End classes defined for the test ******************* ++ ++ ++ ++ ++/**************************************************** ++ Standard Test Machinery ++ DO NOT modify anything below -- it's a standard ++ chunk of code whose purpose is to make user ++ interaction uniform, and thereby make it simpler ++ to read and understand someone else's test. ++ ****************************************************/ ++ ++/** ++ This is part of the standard test machinery. ++ It creates a dialog (with the instructions), and is the interface ++ for sending text messages to the user. ++ To print the instructions, send an array of strings to Sysout.createDialog ++ WithInstructions method. Put one line of instructions per array entry. ++ To display a message for the tester to see, simply call Sysout.println ++ with the string to be displayed. ++ This mimics System.out.println but works within the test harness as well ++ as standalone. ++ */ ++ ++class Sysout ++{ ++ private static TestDialog dialog; ++ ++ public static void createDialogWithInstructions( String[] instructions ) ++ { ++ dialog = new TestDialog( new Frame(), "Instructions" ); ++ dialog.printInstructions( instructions ); ++ dialog.setVisible(true); ++ println( "Any messages for the tester will display here." ); ++ } ++ ++ public static void createDialog( ) ++ { ++ dialog = new TestDialog( new Frame(), "Instructions" ); ++ String[] defInstr = { "Instructions will appear here. ", "" } ; ++ dialog.printInstructions( defInstr ); ++ dialog.setVisible(true); ++ println( "Any messages for the tester will display here." ); ++ } ++ ++ ++ public static void printInstructions( String[] instructions ) ++ { ++ dialog.printInstructions( instructions ); ++ } ++ ++ ++ public static void println( String messageIn ) ++ { ++ dialog.displayMessage( messageIn ); ++ } ++ ++}// Sysout class ++ ++/** ++ This is part of the standard test machinery. It provides a place for the ++ test instructions to be displayed, and a place for interactive messages ++ to the user to be displayed. ++ To have the test instructions displayed, see Sysout. ++ To have a message to the user be displayed, see Sysout. ++ Do not call anything in this dialog directly. ++ */ ++class TestDialog extends Dialog implements ActionListener ++{ ++ ++ TextArea instructionsText; ++ TextArea messageText; ++ int maxStringLength = 80; ++ Panel buttonP = new Panel(); ++ Button passB = new Button( "pass" ); ++ Button failB = new Button( "fail" ); ++ ++ //DO NOT call this directly, go through Sysout ++ public TestDialog( Frame frame, String name ) ++ { ++ super( frame, name ); ++ int scrollBoth = TextArea.SCROLLBARS_BOTH; ++ instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth ); ++ add( "North", instructionsText ); ++ ++ messageText = new TextArea( "", 5, maxStringLength, scrollBoth ); ++ add("Center", messageText); ++ ++ passB = new Button( "pass" ); ++ passB.setActionCommand( "pass" ); ++ passB.addActionListener( this ); ++ buttonP.add( "East", passB ); ++ ++ failB = new Button( "fail" ); ++ failB.setActionCommand( "fail" ); ++ failB.addActionListener( this ); ++ buttonP.add( "West", failB ); ++ ++ add( "South", buttonP ); ++ pack(); ++ ++ setVisible(true); ++ }// TestDialog() ++ ++ //DO NOT call this directly, go through Sysout ++ public void printInstructions( String[] instructions ) ++ { ++ //Clear out any current instructions ++ instructionsText.setText( "" ); ++ ++ //Go down array of instruction strings ++ ++ String printStr, remainingStr; ++ for( int i=0; i < instructions.length; i++ ) ++ { ++ //chop up each into pieces maxSringLength long ++ remainingStr = instructions[ i ]; ++ while( remainingStr.length() > 0 ) ++ { ++ //if longer than max then chop off first max chars to print ++ if( remainingStr.length() >= maxStringLength ) ++ { ++ //Try to chop on a word boundary ++ int posOfSpace = remainingStr. ++ lastIndexOf( ' ', maxStringLength - 1 ); ++ ++ if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1; ++ ++ printStr = remainingStr.substring( 0, posOfSpace + 1 ); ++ remainingStr = remainingStr.substring( posOfSpace + 1 ); ++ } ++ //else just print ++ else ++ { ++ printStr = remainingStr; ++ remainingStr = ""; ++ } ++ ++ instructionsText.append( printStr + "\n" ); ++ ++ }// while ++ ++ }// for ++ ++ }//printInstructions() ++ ++ //DO NOT call this directly, go through Sysout ++ public void displayMessage( String messageIn ) ++ { ++ messageText.append( messageIn + "\n" ); ++ System.out.println(messageIn); ++ } ++ ++ //catch presses of the passed and failed buttons. ++ //simply call the standard pass() or fail() static methods of ++ //TestUnixDefaultIcon ++ public void actionPerformed( ActionEvent e ) ++ { ++ if( e.getActionCommand() == "pass" ) ++ { ++ TestUnixDefaultIcon.pass(); ++ } ++ else ++ { ++ TestUnixDefaultIcon.fail(); ++ } ++ } ++ ++}// TestDialog class +--- ./jdk/test/java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 2013-09-06 11:29:22.000000000 -0700 ++++ ./jdk/test/java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 2014-06-06 19:56:32.000000000 -0700 +@@ -42,6 +42,7 @@ + GraphicsDevice gd = ge.getDefaultScreenDevice(); -- if (mpe == NULL) return mpe; -+ if (mpe == NULL) return NULL; - mpe ->Implements = cmsSigLabV2toV4; - return mpe; - } -@@ -1247,12 +1260,22 @@ - NULL); - if (NewMPE == NULL) return NULL; + Frame f = new Frame("Test frame"); ++ f.setUndecorated(true); + f.setBounds(100, 100, 320, 240); -- NewMPE ->Implements = mpe ->Implements; -+ NewMPE ->Implements = mpe ->Implements; + // First, check it can be made fullscreen window without any effects applied +--- ./jdk/test/java/awt/Graphics2D/DrawString/DrawRotatedString.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/Graphics2D/DrawString/DrawRotatedString.java 2014-04-19 01:27:12.000000000 -0700 +@@ -0,0 +1,81 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ if (mpe ->DupElemPtr) { ++import java.awt.Color; ++import java.awt.Graphics2D; ++import java.awt.RenderingHints; ++import java.awt.image.BufferedImage; ++import java.io.File; ++import java.io.IOException; + -+ NewMPE ->Data = mpe ->DupElemPtr(mpe); ++import javax.imageio.ImageIO; + -+ if (NewMPE->Data == NULL) { ++/** ++ * @test ++ * @bug 7190349 ++ * @summary Verifies that we get correct direction, when draw rotated string. ++ * @author Sergey Bylokhov ++ * @run main/othervm DrawRotatedString ++ */ ++public final class DrawRotatedString { + -+ cmsStageFree(NewMPE); -+ return NULL; ++ private static final int SIZE = 500; ++ ++ public static void main(final String[] args) throws IOException { ++ BufferedImage bi = createBufferedImage(true); ++ verify(bi); ++ bi = createBufferedImage(false); ++ verify(bi); ++ System.out.println("Passed"); ++ } ++ ++ private static void verify(BufferedImage bi) throws IOException { ++ for (int i = 0; i < SIZE; ++i) { ++ for (int j = 0; j < 99; ++j) { ++ //Text should not appear before 100 ++ if (bi.getRGB(i, j) != Color.RED.getRGB()) { ++ ImageIO.write(bi, "png", new File("image.png")); ++ throw new RuntimeException("Failed: wrong text location"); ++ } ++ } + } ++ } + -+ } else { - -- if (mpe ->DupElemPtr) -- NewMPE ->Data = mpe ->DupElemPtr(mpe); -- else - NewMPE ->Data = NULL; ++ private static BufferedImage createBufferedImage(final boolean aa) { ++ final BufferedImage bi = new BufferedImage(SIZE, SIZE, ++ BufferedImage.TYPE_INT_RGB); ++ final Graphics2D bg = bi.createGraphics(); ++ bg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, ++ aa ? RenderingHints.VALUE_ANTIALIAS_ON ++ : RenderingHints.VALUE_ANTIALIAS_OFF); ++ bg.setColor(Color.RED); ++ bg.fillRect(0, 0, SIZE, SIZE); ++ bg.translate(100, 100); ++ bg.rotate(Math.toRadians(90)); ++ bg.setColor(Color.BLACK); ++ bg.setFont(bg.getFont().deriveFont(20.0f)); ++ bg.drawString("MMMMMMMMMMMMMMMM", 0, 0); ++ bg.dispose(); ++ return bi; + } - - return NewMPE; - } -@@ -1465,12 +1488,12 @@ - } - - --void CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe) -+int CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe) - { - cmsStage* Anterior = NULL, *pt; - -- _cmsAssert(lut != NULL); -- _cmsAssert(mpe != NULL); -+ if (lut == NULL || mpe == NULL) -+ return FALSE; - - switch (loc) { - -@@ -1494,9 +1517,11 @@ - } - break; - default:; -+ return FALSE; - } - - BlessLUT(lut); -+ return TRUE; - } - - // Unlink an element and return the pointer to it -@@ -1558,7 +1583,7 @@ - // Concatenate two LUT into a new single one - cmsBool CMSEXPORT cmsPipelineCat(cmsPipeline* l1, const cmsPipeline* l2) - { -- cmsStage* mpe, *NewMPE; -+ cmsStage* mpe; - - // If both LUTS does not have elements, we need to inherit - // the number of channels -@@ -1573,17 +1598,12 @@ - mpe = mpe ->Next) { - - // We have to dup each element -- NewMPE = cmsStageDup(mpe); -- -- if (NewMPE == NULL) { -- return FALSE; -- } -- -- cmsPipelineInsertStage(l1, cmsAT_END, NewMPE); -+ if (!cmsPipelineInsertStage(l1, cmsAT_END, cmsStageDup(mpe))) -+ return FALSE; - } - -- BlessLUT(l1); -- return TRUE; -+ BlessLUT(l1); -+ return TRUE; - } - - -@@ -1713,16 +1733,11 @@ - cmsFloat32Number fx[4], x[4], xd[4], fxd[4]; - cmsVEC3 tmp, tmp2; - cmsMAT3 Jacobian; -- cmsFloat64Number LastResult[4]; -- - - // Only 3->3 and 4->3 are supported - if (lut ->InputChannels != 3 && lut ->InputChannels != 4) return FALSE; - if (lut ->OutputChannels != 3) return FALSE; - -- // Mark result of -1 -- LastResult[0] = LastResult[1] = LastResult[2] = -1.0f; -- - // Take the hint as starting point if specified - if (Hint == NULL) { - ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsmd5.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsmd5.c 2014-04-20 12:39:16.000000000 -0700 -@@ -338,7 +338,7 @@ - Error: - - // Free resources as something went wrong -- if (MD5 != NULL) _cmsFree(ContextID, MD5); -+ // "MD5" cannot be other than NULL here, so no need to free it - if (Mem != NULL) _cmsFree(ContextID, Mem); - memmove(Icc, &Keep, sizeof(_cmsICCPROFILE)); - return FALSE; ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsnamed.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsnamed.c 2014-04-20 12:39:16.000000000 -0700 -@@ -359,9 +359,9 @@ - if (Best == -1) - Best = 0; - -- v = mlu ->Entries + Best; -+ v = mlu ->Entries + Best; - -- if (UsedLanguageCode != NULL) *UsedLanguageCode = v ->Language; -+ if (UsedLanguageCode != NULL) *UsedLanguageCode = v ->Language; - if (UsedCountryCode != NULL) *UsedCountryCode = v ->Country; - - if (len != NULL) *len = v ->Len; -@@ -475,6 +475,35 @@ - } - - ++} +--- ./jdk/test/java/awt/Graphics2D/IncorrectTextSize/IncorrectTextSize.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/Graphics2D/IncorrectTextSize/IncorrectTextSize.java 2014-04-19 01:27:12.000000000 -0700 +@@ -0,0 +1,77 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+// Get the number of translations in the MLU object -+cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu) -+{ -+ if (mlu == NULL) return 0; -+ return mlu->UsedEntries; ++import java.awt.Color; ++import java.awt.Font; ++import java.awt.Graphics2D; ++import java.awt.image.BufferedImage; ++import java.io.File; ++import java.io.IOException; ++ ++import javax.imageio.ImageIO; ++ ++/** ++ * @test ++ * @bug 8013569 ++ * @author Sergey Bylokhov ++ */ ++public final class IncorrectTextSize { ++ ++ static final int scale = 2; ++ static final int width = 1200; ++ static final int height = 100; ++ static BufferedImage bi = new BufferedImage(width, height, ++ BufferedImage.TYPE_INT_ARGB); ++ static final String TEXT = "The quick brown fox jumps over the lazy dog" ++ + "The quick brown fox jumps over the lazy dog"; ++ ++ public static void main(final String[] args) throws IOException { ++ for (int point = 5; point < 11; ++point) { ++ Graphics2D g2d = bi.createGraphics(); ++ g2d.setFont(new Font(Font.DIALOG, Font.PLAIN, point)); ++ g2d.scale(scale, scale); ++ g2d.setColor(Color.WHITE); ++ g2d.fillRect(0, 0, width, height); ++ g2d.setColor(Color.green); ++ g2d.drawString(TEXT, 0, 20); ++ int length = g2d.getFontMetrics().stringWidth(TEXT); ++ if (length < 0) { ++ throw new RuntimeException("Negative length"); ++ } ++ for (int i = (length + 1) * scale; i < width; ++i) { ++ for (int j = 0; j < height; ++j) { ++ if (bi.getRGB(i, j) != Color.white.getRGB()) { ++ g2d.drawLine(length, 0, length, height); ++ ImageIO.write(bi, "png", new File("image.png")); ++ System.out.println("length = " + length); ++ System.err.println("Wrong color at x=" + i + ",y=" + j); ++ System.err.println("Color is:" + new Color(bi.getRGB(i, ++ j))); ++ throw new RuntimeException("Test failed."); ++ } ++ } ++ } ++ g2d.dispose(); ++ } ++ } ++} +--- ./jdk/test/java/awt/JAWT/JAWT.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/JAWT.sh 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,173 @@ ++#!/bin/sh ++ ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This code is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License version 2 only, as ++# published by the Free Software Foundation. Oracle designates this ++# particular file as subject to the "Classpath" exception as provided ++# by Oracle in the LICENSE file that accompanied this code. ++# ++# This code is distributed in the hope that it will be useful, but WITHOUT ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# version 2 for more details (a copy is included in the LICENSE file that ++# accompanied this code). ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++# ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++# or visit www.oracle.com if you need additional information or have any ++# questions. ++ ++# @test JAWT.sh ++# @bug 7190587 ++# @summary Tests Java AWT native interface library ++# @author kshefov ++# @run shell JAWT.sh ++ ++# NB: To run on Windows with MKS and Visual Studio compiler ++# add the following options to jtreg: -e INCLUDE="%INCLUDE%;." -e LIB="%LIB%;." ++ ++if [ "${TESTSRC}" = "" ] ++then TESTSRC=. ++fi ++ ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ echo "TESTJAVA not set, selecting " ${TESTJAVA} ++ echo "If this is incorrect, try setting the variable manually." ++fi ++ ++# set platform-dependent variables ++OS=`uname -s` ++case "$OS" in ++ Linux ) ++ NULL=/dev/null ++ PS=":" ++ FS="/" ++ ${TESTJAVA}${FS}bin${FS}java -version 2>&1 | grep '64-Bit' > $NULL ++ if [ $? -eq '0' ] ++ then ++ ARCH="amd64" ++ else ++ ARCH="i386" ++ fi ++ SYST="linux" ++ MAKEFILE="Makefile.unix" ++ CC="gcc" ++ MAKE="make" ++ LD_LIBRARY_PATH=".":${TESTJAVA}${FS}jre${FS}lib${FS}${ARCH} ++ ;; ++ SunOS ) ++ NULL=/dev/null ++ PS=":" ++ FS="/" ++ if [ `uname -p | grep -c 'sparc'` -gt '0' ] ++ then ++ ARCH="sparc" ++ else ++ ARCH="i386" ++ fi ++ SYST="solaris" ++ MAKEFILE="Makefile.unix" ++ CC="gcc" ++ MAKE="make" ++ LD_LIBRARY_PATH=".":${TESTJAVA}${FS}jre${FS}lib${FS}${ARCH} ++ ;; ++ Windows* ) ++ NULL=null ++ PS=";" ++ FS="\\" ++ MAKEFILE="Makefile.win" ++ CC="cl" ++ MAKE="nmake" ++ ${TESTJAVA}${FS}bin${FS}java -d64 -version 2>&1 | grep '64-Bit' > $NULL ++ if [ "$?" -eq '0' ] ++ then ++ ARCH="amd64" ++ else ++ ARCH="i386" ++ fi ++ SYST="windows" ++ ;; ++ CYGWIN* ) ++ NULL=/dev/null ++ PS=":" ++ FS="/" ++ MAKEFILE="Makefile.cygwin" ++ CC="gcc" ++ ${TESTJAVA}${FS}bin${FS}java -d64 -version 2>&1 | grep '64-Bit' > $NULL ++ if [ "$?" -eq '0' ] ++ then ++ ARCH="amd64" ++ else ++ ARCH="i386" ++ fi ++ SYST="cygwin" ++ MAKE="make" ++ ;; ++ Darwin ) ++ echo "Test passed. This test is not for MacOS." ++ exit 0; ++ ;; ++ * ) ++ echo "Unrecognized system!" ++ exit 1; ++ ;; ++esac ++ ++# Skip unsupported platforms ++case `uname -m` in ++ arm* | ppc* ) ++ echo "Test passed. Not supported on current architecture." ++ exit 0 ++ ;; ++esac ++ ++echo "OS-ARCH is" ${SYST}-${ARCH} ++${TESTJAVA}${FS}jre${FS}bin${FS}java -fullversion 2>&1 ++ ++which ${MAKE} >${NULL} 2>&1 ++if [ "$?" -ne '0' ] ++then ++ echo "No make found. Test passed." ++ exit 0 ++fi ++ ++which ${CC} >${NULL} 2>&1 ++if [ "$?" -ne '0' ] ++then ++ echo "No C compiler found. Test passed." ++ exit 0 ++fi ++case "$OS" in ++ SunOS ) ++ ${CC} -v >${NULL} 2>&1 ++ if [ "$?" -ne '0' ] ++ then ++ echo "No C compiler found. Test passed." ++ exit 0 ++ fi ++esac ++ ++cp ${TESTSRC}${FS}${MAKEFILE} . ++ ++JAVA=${TESTJAVA}${FS}jre${FS}bin${FS}java ++JAVAC=${TESTJAVA}${FS}bin${FS}javac ++JAVAH=${TESTJAVA}${FS}bin${FS}javah ++ ++export CC SYST ARCH LD_LIBRARY_PATH ++ ++${JAVAC} -d . ${TESTSRC}${FS}MyCanvas.java ++${JAVAH} -jni -classpath . -d . MyCanvas ++${MAKE} -f ${MAKEFILE} ++${JAVA} -classpath . MyCanvas ++ ++exit $? ++ +--- ./jdk/test/java/awt/JAWT/Makefile.cygwin 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/Makefile.cygwin 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,49 @@ ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# 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. ++ ++CFLAGS = ++OBJS = myfile.o ++HEADERS = MyCanvas.h ++CLASSES = MyCanvas.class ++ ++JAVA = $(TESTJAVA)/bin/java -classpath . ++JAVAC = $(TESTJAVA)/bin/javac ++JAVAH = $(TESTJAVA)/bin/javah ++DEL = rm -rf ++LINK = $(CC) ++ ++INCLUDES = -I $(TESTJAVA)/include/win32 -I $(TESTJAVA)/include -I . ++ ++LIBS = $(TESTJAVA)/lib/jawt.lib -lgdi32 ++ ++all: $(CLASSES) mylib.dll ++ ++mylib.dll: $(HEADERS) $(OBJS) ++ $(LINK) -shared -o mylib.dll $(OBJS) $(LIBS) ++ ++myfile.o: ++ $(CC) $(CFLAGS) $(INCLUDES) -c $(TESTSRC)/myfile.cpp ++ ++clean: ++ $(DEL) mylib.* *.h *.class *.o ++ +--- ./jdk/test/java/awt/JAWT/Makefile.unix 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/Makefile.unix 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,48 @@ ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# 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. ++ ++CFLAGS = -fPIC -O ++OBJS = myfile.o ++HEADERS = MyCanvas.h ++CLASSES = MyCanvas.class ++ ++ENV = /usr/bin/env ++JAVA = $(TESTJAVA)/bin/java -classpath . ++JAVAC = $(TESTJAVA)/bin/javac ++JAVAH = $(TESTJAVA)/bin/javah ++LINK = ld ++ ++J_INC = $(TESTJAVA)/include ++INCLUDES = -I$(J_INC) -I$(J_INC)/$(SYST) -I. ++LIBS = -L$(TESTJAVA)/jre/lib/$(ARCH) -ljawt -lX11 ++ ++all: $(CLASSES) libmylib.so ++ ++libmylib.so: $(HEADERS) $(OBJS) ++ $(LINK) -G -o libmylib.so $(OBJS) $(LIBS) ++ ++myfile.o: $(TESTSRC)/myfile.c ++ $(CC) $(CFLAGS) $(INCLUDES) -c $(TESTSRC)/myfile.c ++ ++clean: ++ rm -rf libmylib.so $(HEADERS) $(CLASSES) $(OBJS) +--- ./jdk/test/java/awt/JAWT/Makefile.win 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/Makefile.win 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,47 @@ ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# 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. ++ ++CFLAGS = -nologo ++OBJS = myfile.obj ++HEADERS = MyCanvas.h ++CLASSES = MyCanvas.class ++ ++DEL = del /Q ++LINK = link ++ ++INCLUDES = -I$(TESTJAVA)\include\win32 -I$(TESTJAVA)\include ++ ++LIBS = gdi32.lib user32.lib $(TESTJAVA)\lib\jawt.lib ++ ++all: $(CLASSES) mylib.dll ++ ++mylib.dll: $(HEADERS) $(OBJS) ++ $(LINK) -nologo -dll -out:mylib.dll $(OBJS) $(LIBS) ++ ++myfile.obj: $(TESTSRC)\myfile.cpp ++ $(CC) $(CFLAGS) $(INCLUDES) -c $(TESTSRC)\myfile.cpp ++ ++clean: ++ $(DEL) mylib.* ++ $(DEL) $(HEADERS) $(CLASSES) ++ $(DEL) *.obj +--- ./jdk/test/java/awt/JAWT/MyCanvas.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/MyCanvas.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,72 @@ ++/** ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import java.awt.*; ++import java.awt.event.*; ++ ++public class MyCanvas extends Canvas { ++ ++ static { ++ try { ++ System.loadLibrary("mylib"); ++ } catch (Throwable t) { ++ System.out.println("Test failed!!"); ++ t.printStackTrace(); ++ System.exit(1); ++ } ++ } ++ ++ public native void paint(Graphics g); ++ ++ public static void main(String[] args) { ++ try { ++ Robot robot = new Robot(); ++ Frame f = new Frame(); ++ f.setBounds(0, 0, 100, 100); ++ f.add(new MyCanvas()); ++ f.addWindowListener(new WindowAdapter() { ++ public void windowClosing(WindowEvent ev) { ++ System.exit(0); ++ } ++ }); ++ f.setVisible(true); ++ robot.delay(5000); ++ Color col1 = new Color(0, 0, 0); ++ Color col2 = robot.getPixelColor(f.getX()+50, f.getY()+50); ++ if (col1.equals(col2)) { ++ System.out.println("Test passed!"); ++ } else { ++ throw new RuntimeException("Color of JAWT canvas is wrong or " + ++ "it was not rendered. " + "Check that other windows " + ++ "do not block the test frame."); ++ } ++ System.exit(0); ++ } catch (Throwable t) { ++ System.out.println("Test failed!"); ++ t.printStackTrace(); ++ System.exit(1); ++ } ++ } +} +--- ./jdk/test/java/awt/JAWT/myfile.c 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/myfile.c 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,106 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+// Get the language and country codes for a specific MLU index -+cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu, -+ cmsUInt32Number idx, -+ char LanguageCode[3], -+ char CountryCode[3]) ++#include "MyCanvas.h" ++#include "jawt_md.h" ++ ++/* ++ * Class: MyCanvas ++ * Method: paint ++ * Signature: (Ljava/awt/Graphics;)V ++ */ ++JNIEXPORT void JNICALL Java_MyCanvas_paint ++(JNIEnv* env, jobject canvas, jobject graphics) +{ -+ _cmsMLUentry *entry; ++ JAWT awt; ++ JAWT_DrawingSurface* ds; ++ JAWT_DrawingSurfaceInfo* dsi; ++ JAWT_X11DrawingSurfaceInfo* dsi_x11; ++ jboolean result; ++ jint lock; ++ GC gc; ++ jobject ref; ++ ++ /* Get the AWT */ ++ awt.version = JAWT_VERSION_1_4; ++ if (JAWT_GetAWT(env, &awt) == JNI_FALSE) { ++ printf("AWT Not found\n"); ++ return; ++ } + -+ if (mlu == NULL) return FALSE; ++ /* Lock the AWT */ ++ awt.Lock(env); + -+ if (idx >= (cmsUInt32Number) mlu->UsedEntries) return FALSE; ++ /* Unlock the AWT */ ++ awt.Unlock(env); + -+ entry = &mlu->Entries[idx]; ++ /* Get the drawing surface */ ++ ds = awt.GetDrawingSurface(env, canvas); ++ if (ds == NULL) { ++ printf("NULL drawing surface\n"); ++ return; ++ } + -+ *(cmsUInt16Number *)LanguageCode = _cmsAdjustEndianess16(entry->Language); -+ *(cmsUInt16Number *)CountryCode = _cmsAdjustEndianess16(entry->Country); ++ /* Lock the drawing surface */ ++ lock = ds->Lock(ds); ++ printf("Lock value %d\n", (int)lock); ++ if((lock & JAWT_LOCK_ERROR) != 0) { ++ printf("Error locking surface\n"); ++ awt.FreeDrawingSurface(ds); ++ return; ++ } + -+ return TRUE; ++ /* Get the drawing surface info */ ++ dsi = ds->GetDrawingSurfaceInfo(ds); ++ if (dsi == NULL) { ++ printf("Error getting surface info\n"); ++ ds->Unlock(ds); ++ awt.FreeDrawingSurface(ds); ++ return; ++ } ++ ++ /* Get the platform-specific drawing info */ ++ dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo; ++ ++ /* Now paint */ ++ gc = XCreateGC(dsi_x11->display, dsi_x11->drawable, 0, 0); ++ XSetForeground(dsi_x11->display, gc, 0); ++ XFillRectangle(dsi_x11->display, dsi_x11->drawable, gc, ++ 5, 5, 90, 90); ++ XFreeGC(dsi_x11->display, gc); ++ ref = awt.GetComponent(env, (void*)(dsi_x11->drawable)); ++ if (!(*env)->IsSameObject(env, ref, canvas)) { ++ printf("Error! Different objects!\n"); ++ } ++ ++ /* Free the drawing surface info */ ++ ds->FreeDrawingSurfaceInfo(dsi); ++ ++ /* Unlock the drawing surface */ ++ ds->Unlock(ds); ++ ++ /* Free the drawing surface */ ++ awt.FreeDrawingSurface(ds); +} +--- ./jdk/test/java/awt/JAWT/myfile.cpp 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/JAWT/myfile.cpp 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,110 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + ++#include ++#include "MyCanvas.h" ++#include "jawt_md.h" + - // Named color lists -------------------------------------------------------------------------------------------- - - // Grow the list to keep at least NumElements -@@ -517,9 +546,9 @@ - while (v -> Allocated < n) - GrowNamedColorList(v); - -- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix) - 1); -- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix) - 1); -- v->Prefix[sizeof(v ->Prefix) - 1] = v->Suffix[sizeof(v ->Suffix) - 1] = 0; -+ strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix)-1); -+ strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix)-1); -+ v->Prefix[32] = v->Suffix[32] = 0; - - v -> ColorantCount = ColorantCount; - -@@ -529,8 +558,9 @@ - // Free a list - void CMSEXPORT cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v) - { -+ if (v == NULL) return; - if (v ->List) _cmsFree(v ->ContextID, v ->List); -- if (v) _cmsFree(v ->ContextID, v); -+ _cmsFree(v ->ContextID, v); - } - - cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v) -@@ -576,11 +606,8 @@ - - if (Name != NULL) { - -- strncpy(NamedColorList ->List[NamedColorList ->nColors].Name, Name, -- sizeof(NamedColorList ->List[NamedColorList ->nColors].Name) - 1); -- -- NamedColorList ->List[NamedColorList ->nColors]. -- Name[sizeof(NamedColorList ->List[NamedColorList ->nColors].Name) - 1] = 0; -+ strncpy(NamedColorList ->List[NamedColorList ->nColors].Name, Name, cmsMAX_PATH-1); -+ NamedColorList ->List[NamedColorList ->nColors].Name[cmsMAX_PATH-1] = 0; - - } - else -@@ -891,7 +918,6 @@ - { - _cmsDICT* old_dict = (_cmsDICT*) hDict; - cmsHANDLE hNew; -- _cmsDICT* new_dict; - cmsDICTentry *entry; - - _cmsAssert(old_dict != NULL); -@@ -899,8 +925,6 @@ - hNew = cmsDictAlloc(old_dict ->ContextID); - if (hNew == NULL) return NULL; - -- new_dict = (_cmsDICT*) hNew; -- - // Walk the list freeing all nodes - entry = old_dict ->head; - while (entry != NULL) { ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c 2014-04-20 12:39:16.000000000 -0700 -@@ -27,6 +27,7 @@ - // However, the following notice accompanied the original version of this - // file: - // ++/* ++ * Class: MyCanvas ++ * Method: paint ++ * Signature: (Ljava/awt/Graphics;)V ++ */ + - //--------------------------------------------------------------------------------- - // - // Little Color Management System -@@ -81,10 +82,6 @@ - int nInputs; - int nOutputs; - -- // Since there is no limitation of the output number of channels, this buffer holding the connexion CLUT-shaper -- // has to be dynamically allocated. This is not the case of first step shaper-CLUT, which is limited to max inputs -- cmsUInt16Number* StageDEF; -- - _cmsInterpFn16 EvalCurveIn16[MAX_INPUT_DIMENSIONS]; // The maximum number of input channels is known in advance - cmsInterpParams* ParamsCurveIn16[MAX_INPUT_DIMENSIONS]; - -@@ -202,8 +199,6 @@ - { - cmsBool AnyOpt = FALSE, Opt; - -- AnyOpt = FALSE; -- - do { - - Opt = FALSE; -@@ -253,6 +248,7 @@ - { - Prelin16Data* p16 = (Prelin16Data*) D; - cmsUInt16Number StageABC[MAX_INPUT_DIMENSIONS]; -+ cmsUInt16Number StageDEF[cmsMAXCHANNELS]; - int i; - - for (i=0; i < p16 ->nInputs; i++) { -@@ -260,11 +256,11 @@ - p16 ->EvalCurveIn16[i](&Input[i], &StageABC[i], p16 ->ParamsCurveIn16[i]); - } - -- p16 ->EvalCLUT(StageABC, p16 ->StageDEF, p16 ->CLUTparams); -+ p16 ->EvalCLUT(StageABC, StageDEF, p16 ->CLUTparams); - - for (i=0; i < p16 ->nOutputs; i++) { - -- p16 ->EvalCurveOut16[i](&p16->StageDEF[i], &Output[i], p16 ->ParamsCurveOut16[i]); -+ p16 ->EvalCurveOut16[i](&StageDEF[i], &Output[i], p16 ->ParamsCurveOut16[i]); - } - } - -@@ -274,7 +270,6 @@ - { - Prelin16Data* p16 = (Prelin16Data*) ptr; - -- _cmsFree(ContextID, p16 ->StageDEF); - _cmsFree(ContextID, p16 ->EvalCurveOut16); - _cmsFree(ContextID, p16 ->ParamsCurveOut16); - -@@ -289,7 +284,6 @@ - - if (Duped == NULL) return NULL; - -- Duped ->StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number)); - Duped ->EvalCurveOut16 = _cmsDupMem(ContextID, p16 ->EvalCurveOut16, p16 ->nOutputs * sizeof(_cmsInterpFn16)); - Duped ->ParamsCurveOut16 = _cmsDupMem(ContextID, p16 ->ParamsCurveOut16, p16 ->nOutputs * sizeof(cmsInterpParams* )); - -@@ -328,7 +322,6 @@ - p16 ->EvalCLUT = ColorMap ->Interpolation.Lerp16; - - -- p16 -> StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number)); - p16 -> EvalCurveOut16 = (_cmsInterpFn16*) _cmsCalloc(ContextID, nOutputs, sizeof(_cmsInterpFn16)); - p16 -> ParamsCurveOut16 = (cmsInterpParams**) _cmsCalloc(ContextID, nOutputs, sizeof(cmsInterpParams* )); - -@@ -413,7 +406,7 @@ - int i, index; - - if (CLUT -> Type != cmsSigCLutElemType) { -- cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut MPE"); -+ cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut stage"); - return FALSE; - } - -@@ -548,6 +541,10 @@ - for (i=0; i < nOuts; i++) { - - cmsToneCurve* InversePostLin = cmsReverseToneCurve(Curves[i]); -+ if (InversePostLin == NULL) { -+ WhiteOut[i] = 0; -+ continue; -+ } - WhiteOut[i] = cmsEvalToneCurve16(InversePostLin, WhitePointOut[i]); - cmsFreeToneCurve(InversePostLin); - } -@@ -575,8 +572,8 @@ - static - cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags) - { -- cmsPipeline* Src; -- cmsPipeline* Dest; -+ cmsPipeline* Src = NULL; -+ cmsPipeline* Dest = NULL; - cmsStage* mpe; - cmsStage* CLUT; - cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL; -@@ -589,7 +586,6 @@ - cmsToneCurve** DataSetOut; - Prelin16Data* p16; - -- - // This is a loosy optimization! does not apply in floating-point cases - if (_cmsFormatterIsFloat(*InputFormat) || _cmsFormatterIsFloat(*OutputFormat)) return FALSE; - -@@ -603,10 +599,10 @@ - - Src = *Lut; - -- // Named color pipelines cannot be optimized either -- for (mpe = cmsPipelineGetPtrToFirstStage(Src); -- mpe != NULL; -- mpe = cmsStageNext(mpe)) { -+ // Named color pipelines cannot be optimized either -+ for (mpe = cmsPipelineGetPtrToFirstStage(Src); -+ mpe != NULL; -+ mpe = cmsStageNext(mpe)) { - if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE; - } - -@@ -628,7 +624,8 @@ - - // All seems ok, proceed. - NewPreLin = cmsStageDup(PreLin); -- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, NewPreLin); -+ if(!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, NewPreLin)) -+ goto Error; - - // Remove prelinearization. Since we have duplicated the curve - // in destination LUT, the sampling shoud be applied after this stage. -@@ -642,7 +639,9 @@ - if (CLUT == NULL) return FALSE; - - // Add the CLUT to the destination LUT -- cmsPipelineInsertStage(Dest, cmsAT_END, CLUT); -+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) { -+ goto Error; ++extern "C" { ++ ++JNIEXPORT void JNICALL Java_MyCanvas_paint ++(JNIEnv* env, jobject canvas, jobject graphics) ++{ ++ /* Get the AWT */ ++ JAWT awt; ++ awt.version = JAWT_VERSION_1_4; ++ if (JAWT_GetAWT(env, &awt) == JNI_FALSE) { ++ printf("AWT Not found\n"); ++ return; + } - - // Postlinearization tables are kept unless indicated by flags - if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) { -@@ -658,7 +657,8 @@ - - // All seems ok, proceed. - NewPostLin = cmsStageDup(PostLin); -- cmsPipelineInsertStage(Dest, cmsAT_END, NewPostLin); -+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, NewPostLin)) -+ goto Error; - - // In destination LUT, the sampling shoud be applied after this stage. - cmsPipelineUnlinkStage(Src, cmsAT_END, &KeepPostLin); -@@ -669,10 +669,18 @@ - // Now its time to do the sampling. We have to ignore pre/post linearization - // The source LUT whithout pre/post curves is passed as parameter. - if (!cmsStageSampleCLut16bit(CLUT, XFormSampler16, (void*) Src, 0)) { -- -+Error: - // Ops, something went wrong, Restore stages -- if (KeepPreLin != NULL) cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin); -- if (KeepPostLin != NULL) cmsPipelineInsertStage(Src, cmsAT_END, KeepPostLin); -+ if (KeepPreLin != NULL) { -+ if (!cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin)) { -+ _cmsAssert(0); // This never happens -+ } -+ } -+ if (KeepPostLin != NULL) { -+ if (!cmsPipelineInsertStage(Src, cmsAT_END, KeepPostLin)) { -+ _cmsAssert(0); // This never happens -+ } -+ } - cmsPipelineFree(Dest); - return FALSE; - } -@@ -699,12 +707,11 @@ - else { - - p16 = PrelinOpt16alloc(Dest ->ContextID, -- DataCLUT ->Params, -- Dest ->InputChannels, -- DataSetIn, -- Dest ->OutputChannels, -- DataSetOut); -- -+ DataCLUT ->Params, -+ Dest ->InputChannels, -+ DataSetIn, -+ Dest ->OutputChannels, -+ DataSetOut); - - _cmsPipelineSetOptimizationParameters(Dest, PrelinEval16, (void*) p16, PrelinOpt16free, Prelin16dup); - } -@@ -1058,7 +1065,8 @@ - LutPlusCurves = cmsPipelineDup(OriginalLut); - if (LutPlusCurves == NULL) goto Error; - -- cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, TransReverse)); -+ if (!cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, TransReverse))) -+ goto Error; - - // Create the result LUT - OptimizedLUT = cmsPipelineAlloc(OriginalLut ->ContextID, OriginalLut ->InputChannels, OriginalLut ->OutputChannels); -@@ -1067,13 +1075,15 @@ - OptimizedPrelinMpe = cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, Trans); - - // Create and insert the curves at the beginning -- cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe); -+ if (!cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe)) -+ goto Error; - - // Allocate the CLUT for result - OptimizedCLUTmpe = cmsStageAllocCLut16bit(OriginalLut ->ContextID, nGridPoints, OriginalLut ->InputChannels, OriginalLut ->OutputChannels, NULL); - - // Add the CLUT to the destination LUT -- cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe); -+ if (!cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe)) -+ goto Error; - - // Resample the LUT - if (!cmsStageSampleCLut16bit(OptimizedCLUTmpe, XFormSampler16, (void*) LutPlusCurves, 0)) goto Error; -@@ -1201,13 +1211,14 @@ - for (i=0; i < nCurves; i++) { - - c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number)); + - if (c16->Curves[i] == NULL) { ++ /* Lock the AWT */ ++ awt.Lock(env); + - for (j=0; j < i; j++) { - _cmsFree(ContextID, c16->Curves[j]); - } - _cmsFree(ContextID, c16->Curves); - _cmsFree(ContextID, c16); -- - return NULL; - } - -@@ -1336,7 +1347,8 @@ - // Maybe the curves are linear at the end - if (!AllCurvesAreLinear(ObtainedCurves)) { - -- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, ObtainedCurves); -+ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, ObtainedCurves)) -+ goto Error; - - // If the curves are to be applied in 8 bits, we can save memory - if (_cmsFormatterIs8bit(*InputFormat)) { -@@ -1344,6 +1356,7 @@ - _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) ObtainedCurves ->Data; - Curves16Data* c16 = CurvesAlloc(Dest ->ContextID, Data ->nCurves, 256, Data ->TheCurves); - -+ if (c16 == NULL) goto Error; - *dwFlags |= cmsFLAGS_NOCACHE; - _cmsPipelineSetOptimizationParameters(Dest, FastEvaluateCurves8, c16, CurvesFree, CurvesDup); - -@@ -1353,6 +1366,7 @@ - _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) cmsStageData(ObtainedCurves); - Curves16Data* c16 = CurvesAlloc(Dest ->ContextID, Data ->nCurves, 65536, Data ->TheCurves); - -+ if (c16 == NULL) goto Error; - *dwFlags |= cmsFLAGS_NOCACHE; - _cmsPipelineSetOptimizationParameters(Dest, FastEvaluateCurves16, c16, CurvesFree, CurvesDup); - } -@@ -1362,7 +1376,8 @@ - // LUT optimizes to nothing. Set the identity LUT - cmsStageFree(ObtainedCurves); - -- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageAllocIdentity(Dest ->ContextID, Src ->InputChannels)); -+ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageAllocIdentity(Dest ->ContextID, Src ->InputChannels))) -+ goto Error; - - *dwFlags |= cmsFLAGS_NOCACHE; - _cmsPipelineSetOptimizationParameters(Dest, FastIdentity16, (void*) Dest, NULL, NULL); -@@ -1592,10 +1607,14 @@ - if (!Dest) return FALSE; - - // Assamble the new LUT -- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1)); -+ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1))) -+ goto Error; ++ /* Unlock the AWT */ ++ awt.Unlock(env); + - if (!IdentityMat) -- cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageAllocMatrix(Dest ->ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset)); -- cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2)); -+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageAllocMatrix(Dest ->ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset))) -+ goto Error; -+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2))) -+ goto Error; - - // If identity on matrix, we can further optimize the curves, so call the join curves routine - if (IdentityMat) { -@@ -1617,6 +1636,10 @@ - cmsPipelineFree(Src); - *Lut = Dest; - return TRUE; -+Error: -+ // Leave Src unchanged -+ cmsPipelineFree(Dest); -+ return FALSE; - } - - -@@ -1646,7 +1669,7 @@ - static _cmsOptimizationCollection* OptimizationCollection = DefaultOptimization; - - // Register new ways to optimize --cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterOptimizationPlugin(cmsContext id, cmsPluginBase* Data) - { - cmsPluginOptimization* Plugin = (cmsPluginOptimization*) Data; - _cmsOptimizationCollection* fl; -@@ -1660,7 +1683,7 @@ - // Optimizer callback is required - if (Plugin ->OptimizePtr == NULL) return FALSE; - -- fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(sizeof(_cmsOptimizationCollection)); -+ fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(id, sizeof(_cmsOptimizationCollection)); - if (fl == NULL) return FALSE; - - // Copy the parameters ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmspack.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmspack.c 2014-04-20 12:39:16.000000000 -0700 -@@ -317,6 +317,23 @@ - } - - static -+cmsUInt8Number* Unroll3BytesSkip1SwapSwapFirst(register _cmsTRANSFORM* info, -+ register cmsUInt16Number wIn[], -+ register cmsUInt8Number* accum, -+ register cmsUInt32Number Stride) ++ /* Get the drawing surface */ ++ JAWT_DrawingSurface* ds = awt.GetDrawingSurface(env, canvas); ++ if (ds == NULL) { ++ printf("NULL drawing surface\n"); ++ return; ++ } ++ ++ /* Lock the drawing surface */ ++ jint lock = ds->Lock(ds); ++ printf("Lock value %d\n", (int)lock); ++ if((lock & JAWT_LOCK_ERROR) != 0) { ++ printf("Error locking surface\n"); ++ return; ++ } ++ ++ /* Get the drawing surface info */ ++ JAWT_DrawingSurfaceInfo* dsi = ds->GetDrawingSurfaceInfo(ds); ++ if (dsi == NULL) { ++ printf("Error getting surface info\n"); ++ ds->Unlock(ds); ++ return; ++ } ++ ++ /* Get the platform-specific drawing info */ ++ JAWT_Win32DrawingSurfaceInfo* dsi_win = ++ (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo; ++ ++ /* Now paint */ ++ PAINTSTRUCT ps; ++ /* Do not use the HDC returned from BeginPaint()!! */ ++ ::BeginPaint(dsi_win->hwnd, &ps); ++ HBRUSH hbrush = (HBRUSH)::GetStockObject(BLACK_BRUSH); ++ RECT rect; ++ rect.left = 5; ++ rect.top = 5; ++ rect.right = 95; ++ rect.bottom = 95; ++ ::FillRect(dsi_win->hdc, &rect, hbrush); ++ ::EndPaint(dsi_win->hwnd, &ps); ++ ++ jobject ref = awt.GetComponent(env, (void*)(dsi_win->hwnd)); ++ if (!env->IsSameObject(ref, canvas)) { ++ printf("Error! Different objects!\n"); ++ } ++ ++ /* Free the drawing surface info */ ++ ds->FreeDrawingSurfaceInfo(dsi); ++ ++ /* Unlock the drawing surface */ ++ ds->Unlock(ds); ++ ++ /* Free the drawing surface */ ++ awt.FreeDrawingSurface(ds); ++} ++ ++} +--- ./jdk/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.html 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.html 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,43 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++

FirstItemRemoveTest
Bug ID: 6299858

++ ++

This is an AUTOMATIC test, simply wait for completion

++ ++ ++ ++ ++ +--- ./jdk/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,119 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 6299858 7124338 ++ @summary PIT. Focused border not shown on List if selected item is removed, XToolkit ++ @author Dmitry.Cherepanov@SUN.COM area=awt.list ++ @run applet FirstItemRemoveTest.html ++*/ ++ ++import java.applet.Applet; ++import java.awt.*; ++import java.awt.event.*; ++ ++public class FirstItemRemoveTest extends Applet +{ -+ wIn[2] = FROM_8_TO_16(*accum); accum++; // B -+ wIn[1] = FROM_8_TO_16(*accum); accum++; // G -+ wIn[0] = FROM_8_TO_16(*accum); accum++; // R -+ accum++; // A ++ List list = new List(4, false); ++ Panel panel = new Panel(); + -+ return accum; ++ public void init() ++ { ++ list.add("000"); ++ list.add("111"); ++ list.add("222"); ++ list.add("333"); ++ list.add("444"); ++ list.add("555"); + -+ cmsUNUSED_PARAMETER(info); -+ cmsUNUSED_PARAMETER(Stride); -+} ++ panel.setLayout(new FlowLayout ()); ++ panel.add(list); + -+static - cmsUInt8Number* Unroll3BytesSkip1SwapFirst(register _cmsTRANSFORM* info, - register cmsUInt16Number wIn[], - register cmsUInt8Number* accum, -@@ -2901,6 +2918,9 @@ - { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1), ANYSPACE, Unroll3BytesSkip1Swap}, - { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|SWAPFIRST_SH(1), ANYSPACE, Unroll3BytesSkip1SwapFirst}, - -+ { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1), -+ ANYSPACE, Unroll3BytesSkip1SwapSwapFirst}, ++ this.add(panel); ++ this.setLayout (new FlowLayout ()); ++ }//End init() + - { CHANNELS_SH(4)|BYTES_SH(1), ANYSPACE, Unroll4Bytes}, - { CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1), ANYSPACE, Unroll4BytesReverse}, - { CHANNELS_SH(4)|BYTES_SH(1)|SWAPFIRST_SH(1), ANYSPACE, Unroll4BytesSwapFirst}, -@@ -3166,7 +3186,7 @@ - - - // Formatters management --cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterFormattersPlugin(cmsContext id, cmsPluginBase* Data) - { - cmsPluginFormatters* Plugin = (cmsPluginFormatters*) Data; - cmsFormattersFactoryList* fl ; -@@ -3178,7 +3198,7 @@ - return TRUE; - } - -- fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(sizeof(cmsFormattersFactoryList)); -+ fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(id, sizeof(cmsFormattersFactoryList)); - if (fl == NULL) return FALSE; - - fl ->Factory = Plugin ->FormattersFactory; ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmspcs.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmspcs.c 2014-04-20 12:39:16.000000000 -0700 -@@ -898,9 +898,11 @@ - { - switch (ColorSpace) { - -+ case cmsSigMCH1Data: - case cmsSig1colorData: - case cmsSigGrayData: return 1; - -+ case cmsSigMCH2Data: - case cmsSig2colorData: return 2; - - case cmsSigXYZData: -@@ -912,10 +914,12 @@ - case cmsSigHsvData: - case cmsSigHlsData: - case cmsSigCmyData: -+ case cmsSigMCH3Data: - case cmsSig3colorData: return 3; - - case cmsSigLuvKData: - case cmsSigCmykData: -+ case cmsSigMCH4Data: - case cmsSig4colorData: return 4; - - case cmsSigMCH5Data: ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsplugin.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsplugin.c 2014-04-20 12:39:16.000000000 -0700 -@@ -125,10 +125,14 @@ - pOut[0] = pIn[7]; - - #else -- - _cmsAssert(Result != NULL); - -+# ifdef CMS_DONT_USE_INT64 -+ (*Result)[0] = QWord[0]; -+ (*Result)[1] = QWord[1]; -+# else - *Result = *QWord; -+# endif - #endif - } - -@@ -543,10 +547,10 @@ - static _cmsSubAllocator* PluginPool = NULL; - - // Specialized malloc for plug-ins, that is freed upon exit. --void* _cmsPluginMalloc(cmsUInt32Number size) -+void* _cmsPluginMalloc(cmsContext id, cmsUInt32Number size) - { - if (PluginPool == NULL) -- PluginPool = _cmsCreateSubAlloc(0, 4*1024); -+ PluginPool = _cmsCreateSubAlloc(id, 4*1024); - - return _cmsSubAlloc(PluginPool, size); - } -@@ -555,6 +559,11 @@ - // Main plug-in dispatcher - cmsBool CMSEXPORT cmsPlugin(void* Plug_in) - { -+ return cmsPluginTHR(NULL, Plug_in); -+} ++ public void start () ++ { ++ setSize (200,200); ++ setVisible(true); ++ validate(); ++ ++ test(); ++ }// start() ++ ++ private void test(){ ++ ++ if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) { ++ System.err.println("Skipped. This test is not for OS X."); ++ return; ++ } ++ ++ Robot r; ++ try { ++ r = new Robot(); ++ } catch(AWTException e) { ++ throw new RuntimeException(e.getMessage()); ++ } ++ ++ // Removing first item in order to reproduce incorrect behaviour ++ r.delay(1000); ++ list.remove(0); ++ r.delay(1000); ++ ++ // Request focus to list ++ Point loc = this.getLocationOnScreen(); ++ r.delay(1000); ++ ++ r.mouseMove(loc.x+10, loc.y+10); ++ r.delay(10); ++ r.mousePress(InputEvent.BUTTON1_MASK); ++ r.delay(10); ++ r.mouseRelease(InputEvent.BUTTON1_MASK); ++ r.delay(1000); ++ ++ list.requestFocusInWindow(); ++ r.delay(1000); ++ r.waitForIdle(); ++ if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != list){ ++ throw new RuntimeException("Test failed - list isn't focus owner."); ++ } ++ ++ // The focus index should be set to first item after removing ++ // So if we press VK_SPACE then the selected item will be equals 0. ++ r.delay(100); ++ r.keyPress(KeyEvent.VK_SPACE); ++ r.delay(10); ++ r.keyRelease(KeyEvent.VK_SPACE); ++ r.delay(1000); ++ r.waitForIdle(); ++ ++ int selectedIndex = list.getSelectedIndex(); ++ if (selectedIndex != 0){ ++ throw new RuntimeException("Test failed. list.getSelectedIndex() = "+selectedIndex); ++ } + -+cmsBool CMSEXPORT cmsPluginTHR(cmsContext id, void* Plug_in) -+{ - cmsPluginBase* Plugin; - - for (Plugin = (cmsPluginBase*) Plug_in; -@@ -583,35 +592,35 @@ - break; - - case cmsPluginTagTypeSig: -- if (!_cmsRegisterTagTypePlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterTagTypePlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginTagSig: -- if (!_cmsRegisterTagPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterTagPlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginFormattersSig: -- if (!_cmsRegisterFormattersPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterFormattersPlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginRenderingIntentSig: -- if (!_cmsRegisterRenderingIntentPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterRenderingIntentPlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginParametricCurveSig: -- if (!_cmsRegisterParametricCurvesPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterParametricCurvesPlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginMultiProcessElementSig: -- if (!_cmsRegisterMultiProcessElementPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterMultiProcessElementPlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginOptimizationSig: -- if (!_cmsRegisterOptimizationPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterOptimizationPlugin(id, Plugin)) return FALSE; - break; - - case cmsPluginTransformSig: -- if (!_cmsRegisterTransformPlugin(Plugin)) return FALSE; -+ if (!_cmsRegisterTransformPlugin(id, Plugin)) return FALSE; - break; - - default: -@@ -630,14 +639,14 @@ - { - _cmsRegisterMemHandlerPlugin(NULL); - _cmsRegisterInterpPlugin(NULL); -- _cmsRegisterTagTypePlugin(NULL); -- _cmsRegisterTagPlugin(NULL); -- _cmsRegisterFormattersPlugin(NULL); -- _cmsRegisterRenderingIntentPlugin(NULL); -- _cmsRegisterParametricCurvesPlugin(NULL); -- _cmsRegisterMultiProcessElementPlugin(NULL); -- _cmsRegisterOptimizationPlugin(NULL); -- _cmsRegisterTransformPlugin(NULL); -+ _cmsRegisterTagTypePlugin(NULL, NULL); -+ _cmsRegisterTagPlugin(NULL, NULL); -+ _cmsRegisterFormattersPlugin(NULL, NULL); -+ _cmsRegisterRenderingIntentPlugin(NULL, NULL); -+ _cmsRegisterParametricCurvesPlugin(NULL, NULL); -+ _cmsRegisterMultiProcessElementPlugin(NULL, NULL); -+ _cmsRegisterOptimizationPlugin(NULL, NULL); -+ _cmsRegisterTransformPlugin(NULL, NULL); - - if (PluginPool != NULL) - _cmsSubAllocDestroy(PluginPool); ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsps2.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsps2.c 2014-04-20 12:39:16.000000000 -0700 -@@ -806,7 +806,6 @@ - - mpe = Pipeline ->Elements; - -- - switch (cmsStageInputChannels(mpe)) { - case 3: - -@@ -838,8 +837,6 @@ - mpe = mpe ->Next; - } - -- -- - if (cmsStageType(mpe) == cmsSigCLutElemType) { - - _cmsIOPrintf(m, "/Table "); -@@ -854,7 +851,6 @@ - _cmsIOPrintf(m, " >>\n"); - _cmsIOPrintf(m, "]\n"); - -- - return 1; - } - -@@ -950,6 +946,7 @@ - - rc = EmitCIEBasedDEF(m, DeviceLink, Intent, &BlackPointAdaptedToD50); - cmsPipelineFree(DeviceLink); -+ if (rc == 0) return 0; - } - break; - ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmssamp.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmssamp.c 2014-04-20 12:39:16.000000000 -0700 -@@ -56,6 +56,8 @@ - #include "lcms2_internal.h" - - -+#define cmsmin(a, b) (((a) < (b)) ? (a) : (b)) -+#define cmsmax(a, b) (((a) > (b)) ? (a) : (b)) - - // This file contains routines for resampling and LUT optimization, black point detection - // and black preservation. -@@ -67,13 +69,13 @@ - static - cmsHTRANSFORM CreateRoundtripXForm(cmsHPROFILE hProfile, cmsUInt32Number nIntent) - { -- cmsHPROFILE hLab = cmsCreateLab4Profile(NULL); -+ cmsContext ContextID = cmsGetProfileContextID(hProfile); -+ cmsHPROFILE hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); - cmsHTRANSFORM xform; - cmsBool BPC[4] = { FALSE, FALSE, FALSE, FALSE }; - cmsFloat64Number States[4] = { 1.0, 1.0, 1.0, 1.0 }; - cmsHPROFILE hProfiles[4]; - cmsUInt32Number Intents[4]; -- cmsContext ContextID = cmsGetProfileContextID(hProfile); - - hProfiles[0] = hLab; hProfiles[1] = hProfile; hProfiles[2] = hProfile; hProfiles[3] = hLab; - Intents[0] = INTENT_RELATIVE_COLORIMETRIC; Intents[1] = nIntent; Intents[2] = INTENT_RELATIVE_COLORIMETRIC; Intents[3] = INTENT_RELATIVE_COLORIMETRIC; -@@ -141,8 +143,8 @@ - cmsCloseProfile(hLab); - - if (xform == NULL) { -- // Something went wrong. Get rid of open resources and return zero as black - -+ // Something went wrong. Get rid of open resources and return zero as black - BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; - return FALSE; - } -@@ -173,7 +175,6 @@ - // Lab (0, 0, 0) -> [Perceptual] Profile -> CMYK -> [Rel. colorimetric] Profile -> Lab - static - cmsBool BlackPointUsingPerceptualBlack(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile) -- - { - cmsHTRANSFORM hRoundTrip; - cmsCIELab LabIn, LabOut; -@@ -218,17 +219,27 @@ - // involves to turn BP to neutral and to use only L component. - cmsBool CMSEXPORT cmsDetectBlackPoint(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags) - { -+ cmsProfileClassSignature devClass; - -- // Zero for black point -- if (cmsGetDeviceClass(hProfile) == cmsSigLinkClass) { -+ // Make sure the device class is adequate -+ devClass = cmsGetDeviceClass(hProfile); -+ if (devClass == cmsSigLinkClass || -+ devClass == cmsSigAbstractClass || -+ devClass == cmsSigNamedColorClass) { -+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -+ return FALSE; + } ++ ++}// class AutomaticAppletTest +--- ./jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2013-09-06 11:29:24.000000000 -0700 ++++ ./jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -25,10 +25,11 @@ + fi -- BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -- return FALSE; -+ // Make sure intent is adequate -+ if (Intent != INTENT_PERCEPTUAL && -+ Intent != INTENT_RELATIVE_COLORIMETRIC && -+ Intent != INTENT_SATURATION) { -+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -+ return FALSE; - } - - // v4 + perceptual & saturation intents does have its own black point, and it is - // well specified enough to use it. Black point tag is deprecated in V4. -- - if ((cmsGetEncodedICCversion(hProfile) >= 0x4000000) && - (Intent == INTENT_PERCEPTUAL || Intent == INTENT_SATURATION)) { - -@@ -303,7 +314,7 @@ - { - double sum_x = 0, sum_x2 = 0, sum_x3 = 0, sum_x4 = 0; - double sum_y = 0, sum_yx = 0, sum_yx2 = 0; -- double disc; -+ double d, a, b, c; - int i; - cmsMAT3 m; - cmsVEC3 v, res; -@@ -333,14 +344,32 @@ - - if (!_cmsMAT3solve(&res, &m, &v)) return 0; -- // y = t x2 + u x + c -- // x = ( - u + Sqrt( u^2 - 4 t c ) ) / ( 2 t ) -- disc = res.n[1]*res.n[1] - 4.0 * res.n[0] * res.n[2]; -- if (disc < 0) return -1; +-if [ $OS = SunOS -o $OS = Linux ] +-then +- exit 0 +-fi ++case "${OS}" in ++ SunOS | Linux | *BSD | Darwin ) ++ exit 0 ++ ;; ++esac + # Windows -- return ( -1.0 * res.n[1] + sqrt( disc )) / (2.0 * res.n[0]); -+ a = res.n[2]; -+ b = res.n[1]; -+ c = res.n[0]; + if [ -z "${TESTJAVA}" ] ; then +--- ./jdk/test/java/awt/Toolkit/LoadAWTCrashTest/LoadAWTCrashTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/Toolkit/LoadAWTCrashTest/LoadAWTCrashTest.java 2014-04-19 01:27:12.000000000 -0700 +@@ -0,0 +1,37 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ if (fabs(a) < 1.0E-10) { ++/* ++ @test ++ @bug 8031477 ++ @summary Crash while awt starting ++ @author Petr Pchelko ++ @run main/othervm LoadAWTCrashTest ++*/ + -+ return cmsmin(0, cmsmax(50, -c/b )); ++public class LoadAWTCrashTest { ++ public static void main(String[] args) { ++ System.loadLibrary("awt"); ++ // If the bug is present JVM would crash or deadlock + } -+ else { ++} +--- ./jdk/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,50 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ d = b*b - 4.0 * a * c; -+ if (d <= 0) { -+ return 0; -+ } -+ else { ++/* ++ * @test ++ * @bug 7129133 ++ * @summary [macosx] Accelerators are displayed as Meta instead of the Command symbol ++ * @author leonid.romanov@oracle.com ++ * @run main bug7129133 ++ */ + -+ double rt = (-b + sqrt(d)) / (2.0 * a); ++import java.awt.*; + -+ return cmsmax(0, cmsmin(50, rt)); -+ } -+ } ++public class bug7129133 { ++ 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; ++ } + - } - ++ Toolkit.getDefaultToolkit(); ++ ++ String cmdSymbol = "\u2318"; ++ String val = Toolkit.getProperty("AWT.meta", "Meta"); ++ ++ if (!val.equals(cmdSymbol)) { ++ throw new Exception("Wrong property value for AWT.meta. Expected: " + cmdSymbol + ", actual: " + val); ++ } ++ } ++} +--- ./jdk/test/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.html 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.html 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,43 @@ ++ ++ ++ ++ ++ ++ ShowAfterDisposeTest ++ ++ ++ ++

ShowAfterDisposeTest
Bug ID: 6384984

++ ++

See the dialog box (usually in upper left corner) for instructions

++ ++ ++ ++ +--- ./jdk/test/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,246 @@ +/* - static - cmsBool IsMonotonic(int n, const cmsFloat64Number Table[]) - { -@@ -361,6 +390,7 @@ - - return TRUE; - } ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 6384984 8004032 ++ @summary TrayIcon try to dispay a tooltip when is not visible ++ @author Dmitry.Cherepanov@sun.com area=awt.tray ++ @run applet/manual=yesno ShowAfterDisposeTest.html +*/ - - // Calculates the black point of a destination profile. - // This algorithm comes from the Adobe paper disclosing its black point compensation method. -@@ -369,21 +399,30 @@ - cmsColorSpaceSignature ColorSpace; - cmsHTRANSFORM hRoundTrip = NULL; - cmsCIELab InitialLab, destLab, Lab; -- -+ cmsFloat64Number inRamp[256], outRamp[256]; - cmsFloat64Number MinL, MaxL; -- cmsBool NearlyStraightMidRange = FALSE; -- cmsFloat64Number L; -- cmsFloat64Number x[101], y[101]; -- cmsFloat64Number lo, hi, NonMonoMin; -- int n, l, i, NonMonoIndx; -- -+ cmsBool NearlyStraightMidrange = TRUE; -+ cmsFloat64Number yRamp[256]; -+ cmsFloat64Number x[256], y[256]; -+ cmsFloat64Number lo, hi; -+ int n, l; -+ cmsProfileClassSignature devClass; + -+ // Make sure the device class is adequate -+ devClass = cmsGetDeviceClass(hProfile); -+ if (devClass == cmsSigLinkClass || -+ devClass == cmsSigAbstractClass || -+ devClass == cmsSigNamedColorClass) { -+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -+ return FALSE; ++import java.applet.*; ++ ++import java.awt.*; ++import java.awt.event.*; ++import java.awt.image.*; ++ ++public class ShowAfterDisposeTest extends Applet ++{ ++ boolean traySupported; ++ ++ public void init() ++ { ++ this.setLayout (new BorderLayout ()); ++ ++ String[] instructions; ++ traySupported = SystemTray.isSupported(); ++ if (traySupported) ++ { ++ String[] s = ++ { ++ "1) When the test starts an icon is added to the SystemTray area.", ++ "2a) If you use Apple OS X,", ++ " right click on this icon (it's important to click before the tooltip is shown).", ++ " The icon should disappear.", ++ "2b) If you use other os (Windows, Linux, Solaris),", ++ " double click on this icon (it's important to click before the tooltip is shown).", ++ " The icon should disappear.", ++ "3) If the bug is reproducible then the test will fail without assistance.", ++ "4) Just press the 'pass' button." ++ }; ++ instructions = s; ++ } ++ else ++ { ++ String[] s = ++ { ++ "The test cannot be run because SystemTray is not supported.", ++ "Simply press PASS button." ++ }; ++ instructions = s; ++ } ++ Sysout.createDialogWithInstructions(instructions); ++ } ++ ++ public void start () ++ { ++ setSize (200,200); ++ setVisible(true); ++ validate(); ++ ++ if (!traySupported) ++ { ++ return; ++ } ++ ++ BufferedImage img = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB); ++ Graphics g = img.createGraphics(); ++ g.setColor(Color.WHITE); ++ g.fillRect(0, 0, 32, 32); ++ g.setColor(Color.RED); ++ g.fillRect(6, 6, 20, 20); ++ g.dispose(); ++ ++ final SystemTray tray = SystemTray.getSystemTray(); ++ final TrayIcon icon = new TrayIcon(img); ++ icon.setImageAutoSize(true); ++ icon.addActionListener(new ActionListener() ++ { ++ public void actionPerformed(ActionEvent ev) ++ { ++ tray.remove(icon); ++ } ++ } ++ ); ++ ++ try { ++ tray.add(icon); ++ } catch (AWTException e) { ++ Sysout.println(e.toString()); ++ Sysout.println("!!! The test coudn't be performed !!!"); ++ return; ++ } ++ icon.setToolTip("tooltip"); ++ } ++} ++ ++/**************************************************** ++ Standard Test Machinery ++ DO NOT modify anything below -- it's a standard ++ chunk of code whose purpose is to make user ++ interaction uniform, and thereby make it simpler ++ to read and understand someone else's test. ++ ****************************************************/ ++ ++/** ++ This is part of the standard test machinery. ++ It creates a dialog (with the instructions), and is the interface ++ for sending text messages to the user. ++ To print the instructions, send an array of strings to Sysout.createDialog ++ WithInstructions method. Put one line of instructions per array entry. ++ To display a message for the tester to see, simply call Sysout.println ++ with the string to be displayed. ++ This mimics System.out.println but works within the test harness as well ++ as standalone. ++ */ ++ ++class Sysout ++{ ++ private static TestDialog dialog; ++ ++ public static void createDialogWithInstructions( String[] instructions ) ++ { ++ dialog = new TestDialog( new Frame(), "Instructions" ); ++ dialog.printInstructions( instructions ); ++ dialog.setVisible(true); ++ println( "Any messages for the tester will display here." ); + } - - // Make sure intent is adequate - if (Intent != INTENT_PERCEPTUAL && - Intent != INTENT_RELATIVE_COLORIMETRIC && - Intent != INTENT_SATURATION) { -- BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -- return FALSE; -+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -+ return FALSE; - } - - -@@ -415,10 +454,8 @@ - return cmsDetectBlackPoint(BlackPoint, hProfile, Intent, dwFlags); - } - -- // It is one of the valid cases!, presto chargo hocus pocus, go for the Adobe magic -+ // It is one of the valid cases!, use Adobe algorithm - -- // Step 1 -- // ====== - - // Set a first guess, that should work on good profiles. - if (Intent == INTENT_RELATIVE_COLORIMETRIC) { -@@ -449,71 +486,68 @@ - hRoundTrip = CreateRoundtripXForm(hProfile, Intent); - if (hRoundTrip == NULL) return FALSE; - -- // Calculate Min L* -- Lab = InitialLab; -- Lab.L = 0; -- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); -- MinL = destLab.L; -- -- // Calculate Max L* -- Lab = InitialLab; -- Lab.L = 100; -- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); -- MaxL = destLab.L; -+ // Compute ramps - -- // Step 3 -- // ====== -+ for (l=0; l < 256; l++) { - -- // check if quadratic estimation needs to be done. -- if (Intent == INTENT_RELATIVE_COLORIMETRIC) { -+ Lab.L = (cmsFloat64Number) (l * 100.0) / 255.0; -+ Lab.a = cmsmin(50, cmsmax(-50, InitialLab.a)); -+ Lab.b = cmsmin(50, cmsmax(-50, InitialLab.b)); - -- // Conceptually, this code tests how close the source l and converted L are to one another in the mid-range -- // of the values. If the converted ramp of L values is close enough to a straight line y=x, then InitialLab -- // is good enough to be the DestinationBlackPoint, -- NearlyStraightMidRange = TRUE; -+ cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); + -+ inRamp[l] = Lab.L; -+ outRamp[l] = destLab.L; ++ public static void createDialog( ) ++ { ++ dialog = new TestDialog( new Frame(), "Instructions" ); ++ String[] defInstr = { "Instructions will appear here. ", "" } ; ++ dialog.printInstructions( defInstr ); ++ dialog.setVisible(true); ++ println( "Any messages for the tester will display here." ); + } + -+ // Make monotonic -+ for (l = 254; l > 0; --l) { -+ outRamp[l] = cmsmin(outRamp[l], outRamp[l+1]); ++ public static void printInstructions( String[] instructions ) ++ { ++ dialog.printInstructions( instructions ); + } - -- for (l=0; l <= 100; l++) { -+ // Check -+ if (! (outRamp[0] < outRamp[255])) { - -- Lab.L = l; -- Lab.a = InitialLab.a; -- Lab.b = InitialLab.b; -+ cmsDeleteTransform(hRoundTrip); -+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -+ return FALSE; ++ ++ public static void println( String messageIn ) ++ { ++ dialog.displayMessage( messageIn ); + } - -- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); - -- L = destLab.L; -+ // Test for mid range straight (only on relative colorimetric) - -- // Check the mid range in 20% after MinL -- if (L > (MinL + 0.2 * (MaxL - MinL))) { -+ NearlyStraightMidrange = TRUE; -+ MinL = outRamp[0]; MaxL = outRamp[255]; -+ if (Intent == INTENT_RELATIVE_COLORIMETRIC) { - -- // Is close enough? -- if (fabs(L - l) > 4.0) { -+ for (l=0; l < 256; l++) { - -- // Too far away, profile is buggy! -- NearlyStraightMidRange = FALSE; -- break; -- } -- } -+ if (! ((inRamp[l] <= MinL + 0.2 * (MaxL - MinL) ) || -+ (fabs(inRamp[l] - outRamp[l]) < 4.0 ))) -+ NearlyStraightMidrange = FALSE; - } -- } -- else { -- // Check is always performed for perceptual and saturation intents -- NearlyStraightMidRange = FALSE; -- } - -+ // If the mid range is straight (as determined above) then the -+ // DestinationBlackPoint shall be the same as initialLab. -+ // Otherwise, the DestinationBlackPoint shall be determined -+ // using curve fitting. - -- // If no furter checking is needed, we are done -- if (NearlyStraightMidRange) { -+ if (NearlyStraightMidrange) { - -- cmsLab2XYZ(NULL, BlackPoint, &InitialLab); -- cmsDeleteTransform(hRoundTrip); -- return TRUE; -+ cmsLab2XYZ(NULL, BlackPoint, &InitialLab); -+ cmsDeleteTransform(hRoundTrip); -+ return TRUE; -+ } - } - -- // The round-trip curve normally looks like a nearly constant section at the black point, ++} + -+ // curve fitting: The round-trip curve normally looks like a nearly constant section at the black point, - // with a corner and a nearly straight line to the white point. - -- // STEP 4 -- // ======= -+ for (l=0; l < 256; l++) { ++/** ++ This is part of the standard test machinery. It provides a place for the ++ test instructions to be displayed, and a place for interactive messages ++ to the user to be displayed. ++ To have the test instructions displayed, see Sysout. ++ To have a message to the user be displayed, see Sysout. ++ Do not call anything in this dialog directly. ++ */ ++class TestDialog extends Dialog ++{ + -+ yRamp[l] = (outRamp[l] - MinL) / (MaxL - MinL); ++ TextArea instructionsText; ++ TextArea messageText; ++ int maxStringLength = 80; ++ ++ //DO NOT call this directly, go through Sysout ++ public TestDialog( Frame frame, String name ) ++ { ++ super( frame, name ); ++ int scrollBoth = TextArea.SCROLLBARS_BOTH; ++ instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth ); ++ add( "North", instructionsText ); ++ ++ messageText = new TextArea( "", 5, maxStringLength, scrollBoth ); ++ add("Center", messageText); ++ ++ pack(); ++ ++ setVisible(true); + } - - // find the black point using the least squares error quadratic curve fitting - -@@ -528,62 +562,32 @@ - hi = 0.25; - } - -- // Capture points for the fitting. -+ // Capture shadow points for the fitting. - n = 0; -- for (l=0; l <= 100; l++) { -- -- cmsFloat64Number ff; -- -- Lab.L = (cmsFloat64Number) l; -- Lab.a = InitialLab.a; -- Lab.b = InitialLab.b; -+ for (l=0; l < 256; l++) { - -- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1); -- -- ff = (destLab.L - MinL)/(MaxL - MinL); -+ cmsFloat64Number ff = yRamp[l]; - - if (ff >= lo && ff < hi) { -- -- x[n] = Lab.L; -- y[n] = ff; -+ x[n] = inRamp[l]; -+ y[n] = yRamp[l]; - n++; - } -- - } - -- // This part is not on the Adobe paper, but I found is necessary for getting any result. -- -- if (IsMonotonic(n, y)) { -- -- // Monotonic means lower point is stil valid -- cmsLab2XYZ(NULL, BlackPoint, &InitialLab); -- cmsDeleteTransform(hRoundTrip); -- return TRUE; -- } - -- // No suitable points, regret and use safer algorithm -- if (n == 0) { -+ // No suitable points -+ if (n < 3 ) { - cmsDeleteTransform(hRoundTrip); -- return cmsDetectBlackPoint(BlackPoint, hProfile, Intent, dwFlags); -- } -- -- -- NonMonoMin = 100; -- NonMonoIndx = 0; -- for (i=0; i < n; i++) { -- -- if (y[i] < NonMonoMin) { -- NonMonoIndx = i; -- NonMonoMin = y[i]; -- } -+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0; -+ return FALSE; - } - -- Lab.L = x[NonMonoIndx]; - - // fit and get the vertex of quadratic curve - Lab.L = RootOfLeastSquaresFitQuadraticCurve(n, x, y); - -- if (Lab.L < 0.0 || Lab.L > 50.0) { // clip to zero L* if the vertex is negative -+ if (Lab.L < 0.0) { // clip to zero L* if the vertex is negative - Lab.L = 0; - } - ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c 2014-04-20 12:39:16.000000000 -0700 -@@ -91,7 +91,7 @@ - - // Register a new type handler. This routine is shared between normal types and MPE - static --cmsBool RegisterTypesPlugin(cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount) -+cmsBool RegisterTypesPlugin(cmsContext id, cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount) - { - cmsPluginTagType* Plugin = (cmsPluginTagType*) Data; - _cmsTagTypeLinkedList *pt, *Anterior = NULL; -@@ -118,7 +118,7 @@ - } - - // Registering happens in plug-in memory pool -- pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagTypeLinkedList)); -+ pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagTypeLinkedList)); - if (pt == NULL) return FALSE; - - pt ->Handler = Plugin ->Handler; -@@ -208,10 +208,10 @@ - cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL; - - // Let's take the offsets to each element -- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); -+ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); - if (ElementOffsets == NULL) goto Error; - -- ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); -+ ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); - if (ElementSizes == NULL) goto Error; - - for (i=0; i < Count; i++) { -@@ -257,10 +257,10 @@ - cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL; - - // Create table -- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); -+ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); - if (ElementOffsets == NULL) goto Error; - -- ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *)); -+ ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number)); - if (ElementSizes == NULL) goto Error; - - // Keep starting position of curve offsets -@@ -456,6 +456,7 @@ - void* Type_Chromaticity_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n) - { - return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsCIExyYTRIPLE)); + - cmsUNUSED_PARAMETER(n); - } - -@@ -1106,8 +1107,6 @@ - { - cmsUInt32Number Count; - cmsToneCurve* NewGamma; -- cmsUInt16Number Linear[2] = { 0, 0xffff }; -- - - *nItems = 0; - if (!_cmsReadUInt32Number(io, &Count)) return NULL; -@@ -1115,11 +1114,14 @@ - switch (Count) { - - case 0: // Linear. -+ { -+ cmsFloat64Number SingleGamma = 1.0; - -- NewGamma = cmsBuildTabulatedToneCurve16(self ->ContextID, 2, Linear); -- if (!NewGamma) return NULL; -- *nItems = 1; -- return NewGamma; -+ NewGamma = cmsBuildParametricToneCurve(self ->ContextID, 1, &SingleGamma); -+ if (!NewGamma) return NULL; -+ *nItems = 1; -+ return NewGamma; -+ } - - case 1: // Specified as the exponent of gamma function - { -@@ -1210,6 +1212,7 @@ - if (ICCVersion < 4.0) return cmsSigCurveType; - if (Curve ->nSegments != 1) return cmsSigCurveType; // Only 1-segment curves can be saved as parametric - if (Curve ->Segments[0].Type < 0) return cmsSigCurveType; // Only non-inverted curves -+ if (Curve ->Segments[0].Type > 5) return cmsSigCurveType; // Only ICC parametric curves - - return cmsSigParametricCurveType; - } -@@ -1386,6 +1389,9 @@ - { - cmsICCMeasurementConditions mc; - ++ //DO NOT call this directly, go through Sysout ++ public void printInstructions( String[] instructions ) ++ { ++ //Clear out any current instructions ++ instructionsText.setText( "" ); + -+ memset(&mc, 0, sizeof(mc)); ++ //Go down array of instruction strings + - if (!_cmsReadUInt32Number(io, &mc.Observer)) return NULL; - if (!_cmsReadXYZNumber(io, &mc.Backing)) return NULL; - if (!_cmsReadUInt32Number(io, &mc.Geometry)) return NULL; -@@ -1640,7 +1646,6 @@ - static - cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels) - { -- cmsStage* mpe; - cmsUInt8Number* Temp = NULL; - int i, j; - cmsToneCurve* Tables[cmsMAXCHANNELS]; -@@ -1669,11 +1674,8 @@ - _cmsFree(ContextID, Temp); - Temp = NULL; - -- -- mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables); -- if (mpe == NULL) goto Error; -- -- cmsPipelineInsertStage(lut, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables))) -+ goto Error; - - for (i=0; i < nChannels; i++) - cmsFreeToneCurve(Tables[i]); -@@ -1701,21 +1703,30 @@ - - if (Tables) { - -- if (Tables ->TheCurves[i]->nEntries != 256) { -- cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization"); -- return FALSE; -- } -- -- } -- -- for (j=0; j < 256; j++) { -+ // Usual case of identity curves -+ if ((Tables ->TheCurves[i]->nEntries == 2) && -+ (Tables->TheCurves[i]->Table16[0] == 0) && -+ (Tables->TheCurves[i]->Table16[1] == 65535)) { - -- if (Tables != NULL) -- val = (cmsUInt8Number) FROM_16_TO_8(Tables->TheCurves[i]->Table16[j]); -+ for (j=0; j < 256; j++) { -+ if (!_cmsWriteUInt8Number(io, (cmsUInt8Number) j)) return FALSE; -+ } -+ } - else -- val = (cmsUInt8Number) j; -+ if (Tables ->TheCurves[i]->nEntries != 256) { -+ cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization"); -+ return FALSE; ++ String printStr, remainingStr; ++ for( int i=0; i < instructions.length; i++ ) ++ { ++ //chop up each into pieces maxSringLength long ++ remainingStr = instructions[ i ]; ++ while( remainingStr.length() > 0 ) ++ { ++ //if longer than max then chop off first max chars to print ++ if( remainingStr.length() >= maxStringLength ) ++ { ++ //Try to chop on a word boundary ++ int posOfSpace = remainingStr. ++ lastIndexOf( ' ', maxStringLength - 1 ); ++ ++ if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1; ++ ++ printStr = remainingStr.substring( 0, posOfSpace + 1 ); ++ remainingStr = remainingStr.substring( posOfSpace + 1 ); + } ++ //else just print + else -+ for (j=0; j < 256; j++) { ++ { ++ printStr = remainingStr; ++ remainingStr = ""; ++ } + -+ if (Tables != NULL) -+ val = (cmsUInt8Number) FROM_16_TO_8(Tables->TheCurves[i]->Table16[j]); -+ else -+ val = (cmsUInt8Number) j; - -- if (!_cmsWriteUInt8Number(io, val)) return FALSE; -+ if (!_cmsWriteUInt8Number(io, val)) return FALSE; -+ } - } - } - return TRUE; -@@ -1724,7 +1735,7 @@ - - // Check overflow - static --size_t uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b) -+cmsUInt32Number uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b) - { - cmsUInt32Number rv = 1, rc; - -@@ -1736,13 +1747,13 @@ - rv *= a; - - // Check for overflow -- if (rv > UINT_MAX / a) return (size_t) -1; -+ if (rv > UINT_MAX / a) return (cmsUInt32Number) -1; - - } - - rc = rv * n; - -- if (rv != rc / n) return (size_t) -1; -+ if (rv != rc / n) return (cmsUInt32Number) -1; - return rc; - } - -@@ -1757,7 +1768,6 @@ - cmsUInt8Number InputChannels, OutputChannels, CLUTpoints; - cmsUInt8Number* Temp = NULL; - cmsPipeline* NewLUT = NULL; -- cmsStage *mpemat, *mpeclut; - cmsUInt32Number nTabSize, i; - cmsFloat64Number Matrix[3*3]; - -@@ -1796,9 +1806,8 @@ - // Only operates if not identity... - if ((InputChannels == 3) && !_cmsMAT3isIdentity((cmsMAT3*) Matrix)) { - -- mpemat = cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL); -- if (mpemat == NULL) goto Error; -- cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, mpemat); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL))) -+ goto Error; - } - - // Get input tables -@@ -1806,13 +1815,10 @@ - - // Get 3D CLUT. Check the overflow.... - nTabSize = uipow(OutputChannels, CLUTpoints, InputChannels); -- if (nTabSize == (size_t) -1) goto Error; -+ if (nTabSize == (cmsUInt32Number) -1) goto Error; - if (nTabSize > 0) { - - cmsUInt16Number *PtrW, *T; -- cmsUInt32Number Tsize; -- -- Tsize = (cmsUInt32Number) nTabSize * sizeof(cmsUInt16Number); - - PtrW = T = (cmsUInt16Number*) _cmsCalloc(self ->ContextID, nTabSize, sizeof(cmsUInt16Number)); - if (T == NULL) goto Error; -@@ -1829,10 +1835,8 @@ - _cmsFree(self ->ContextID, Temp); - Temp = NULL; - -- -- mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T); -- if (mpeclut == NULL) goto Error; -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) -+ goto Error; - _cmsFree(self ->ContextID, T); - } - -@@ -1934,7 +1938,7 @@ - if (!Write8bitTables(self ->ContextID, io, NewLUT ->InputChannels, PreMPE)) return FALSE; - - nTabSize = uipow(NewLUT->OutputChannels, clutPoints, NewLUT ->InputChannels); -- if (nTabSize == (size_t) -1) return FALSE; -+ if (nTabSize == (cmsUInt32Number) -1) return FALSE; - if (nTabSize > 0) { - - // The 3D CLUT. -@@ -1983,7 +1987,6 @@ - static - cmsBool Read16bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels, int nEntries) - { -- cmsStage* mpe; - int i; - cmsToneCurve* Tables[cmsMAXCHANNELS]; - -@@ -2007,10 +2010,8 @@ - - - // Add the table (which may certainly be an identity, but this is up to the optimizer, not the reading code) -- mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables); -- if (mpe == NULL) goto Error; -- -- cmsPipelineInsertStage(lut, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables))) -+ goto Error; - - for (i=0; i < nChannels; i++) - cmsFreeToneCurve(Tables[i]); -@@ -2031,7 +2032,9 @@ - int j; - cmsUInt32Number i; - cmsUInt16Number val; -- int nEntries = 256; -+ int nEntries; ++ instructionsText.append( printStr + "\n" ); ++ } ++ } ++ } ++ ++ //DO NOT call this directly, go through Sysout ++ public void displayMessage( String messageIn ) ++ { ++ messageText.append( messageIn + "\n" ); ++ System.out.println(messageIn); ++ } ++} +--- ./jdk/test/java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,133 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ _cmsAssert(Tables != NULL); - - nEntries = Tables->TheCurves[0]->nEntries; - -@@ -2039,11 +2042,7 @@ - - for (j=0; j < nEntries; j++) { - -- if (Tables != NULL) -- val = Tables->TheCurves[i]->Table16[j]; -- else -- val = _cmsQuantizeVal(j, nEntries); -- -+ val = Tables->TheCurves[i]->Table16[j]; - if (!_cmsWriteUInt16Number(io, val)) return FALSE; - } - } -@@ -2057,7 +2056,6 @@ - { - cmsUInt8Number InputChannels, OutputChannels, CLUTpoints; - cmsPipeline* NewLUT = NULL; -- cmsStage *mpemat, *mpeclut; - cmsUInt32Number nTabSize; - cmsFloat64Number Matrix[3*3]; - cmsUInt16Number InputEntries, OutputEntries; -@@ -2094,9 +2092,8 @@ - // Only operates on 3 channels - if ((InputChannels == 3) && !_cmsMAT3isIdentity((cmsMAT3*) Matrix)) { - -- mpemat = cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL); -- if (mpemat == NULL) goto Error; -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpemat); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL))) -+ goto Error; - } - - if (!_cmsReadUInt16Number(io, &InputEntries)) goto Error; -@@ -2110,7 +2107,7 @@ - - // Get 3D CLUT - nTabSize = uipow(OutputChannels, CLUTpoints, InputChannels); -- if (nTabSize == (size_t) -1) goto Error; -+ if (nTabSize == (cmsUInt32Number) -1) goto Error; - if (nTabSize > 0) { - - cmsUInt16Number *T; -@@ -2123,13 +2120,10 @@ - goto Error; - } - -- mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T); -- if (mpeclut == NULL) { -- _cmsFree(self ->ContextID, T); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) { -+ _cmsFree(self ->ContextID, T); - goto Error; - } -- -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut); - _cmsFree(self ->ContextID, T); - } - -@@ -2159,7 +2153,7 @@ - _cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL; - _cmsStageMatrixData* MatMPE = NULL; - _cmsStageCLutData* clut = NULL; -- int InputChannels, OutputChannels, clutPoints; -+ int i, InputChannels, OutputChannels, clutPoints; - - // Disassemble the LUT into components. - mpe = NewLUT -> Elements; -@@ -2234,13 +2228,13 @@ - if (PreMPE != NULL) { - if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) PreMPE ->TheCurves[0]->nEntries)) return FALSE; - } else { -- if (!_cmsWriteUInt16Number(io, 0)) return FALSE; -+ if (!_cmsWriteUInt16Number(io, 2)) return FALSE; - } - - if (PostMPE != NULL) { - if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) PostMPE ->TheCurves[0]->nEntries)) return FALSE; - } else { -- if (!_cmsWriteUInt16Number(io, 0)) return FALSE; -+ if (!_cmsWriteUInt16Number(io, 2)) return FALSE; - - } - -@@ -2249,9 +2243,16 @@ - if (PreMPE != NULL) { - if (!Write16bitTables(self ->ContextID, io, PreMPE)) return FALSE; - } -+ else { -+ for (i=0; i < InputChannels; i++) { ++/** ++ * @test ++ * @bug 8024163 ++ * @summary Checks the dragEnter event is correctly generated ++ * @library ../../regtesthelpers ++ * @build Util ++ * @compile ExtraDragEnterTest.java ++ * @run main/othervm ExtraDragEnterTest ++ * @author Petr Pchelko ++ */ + -+ if (!_cmsWriteUInt16Number(io, 0)) return FALSE; -+ if (!_cmsWriteUInt16Number(io, 0xffff)) return FALSE; ++import test.java.awt.regtesthelpers.Util; ++ ++import javax.swing.*; ++import java.awt.*; ++import java.awt.datatransfer.StringSelection; ++import java.awt.dnd.DnDConstants; ++import java.awt.dnd.DragGestureEvent; ++import java.awt.dnd.DragGestureListener; ++import java.awt.dnd.DragSource; ++import java.awt.dnd.DropTarget; ++import java.awt.dnd.DropTargetAdapter; ++import java.awt.dnd.DropTargetDragEvent; ++import java.awt.dnd.DropTargetDropEvent; ++import java.awt.event.InputEvent; ++import java.util.concurrent.atomic.AtomicInteger; ++ ++public class ExtraDragEnterTest { ++ ++ private static final int FRAME_SIZE = 100; ++ private static final int FRAME_LOCATION = 100; ++ ++ private static AtomicInteger dragEnterCalled = new AtomicInteger(0); ++ ++ private static volatile Panel mainPanel; ++ private static volatile Frame f; ++ ++ private static void initAndShowUI() { ++ f = new Frame("Test frame"); ++ f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE); ++ mainPanel = new Panel(); ++ mainPanel.setBounds(0, 0, FRAME_SIZE, FRAME_SIZE); ++ mainPanel.setBackground(Color.black); ++ mainPanel.setLayout(new GridLayout(2, 1)); ++ ++ final DraggablePanel dragSource = new DraggablePanel(); ++ dragSource.setBackground(Color.yellow); ++ dragSource.setDropTarget(null); ++ mainPanel.add(dragSource); ++ ++ Panel dropTarget = new Panel(); ++ dropTarget.setBackground(Color.red); ++ DropTarget dt = new DropTarget(dropTarget, new DropTargetAdapter() { ++ @Override public void drop(DropTargetDropEvent dtde) { } ++ ++ @Override ++ public void dragEnter(DropTargetDragEvent dtde) { ++ dragEnterCalled.incrementAndGet(); ++ } ++ }); ++ dropTarget.setDropTarget(dt); ++ mainPanel.add(dropTarget); ++ ++ f.add(mainPanel); ++ f.setVisible(true); ++ } ++ ++ public static void main(String[] args) throws Throwable { ++ try { ++ ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ initAndShowUI(); ++ } ++ }); ++ ++ Robot r = new Robot(); ++ Util.waitForIdle(r); ++ Point leftCorner = new Point(mainPanel.getLocationOnScreen()); ++ leftCorner.translate(5, 5); ++ Point rightCorner = new Point(mainPanel.getLocationOnScreen()); ++ rightCorner.translate(mainPanel.getWidth(), mainPanel.getHeight()); ++ rightCorner.translate(-5, -5); ++ Util.drag(r, leftCorner, rightCorner, InputEvent.BUTTON1_MASK); ++ Util.waitForIdle(r); ++ ++ int called = dragEnterCalled.get(); ++ if (called != 1) { ++ throw new RuntimeException("Failed. Drag enter called " + called + " times. Expected 1" ); ++ } ++ } finally { ++ if (f != null) { ++ f.dispose(); ++ } + } + } - - nTabSize = uipow(OutputChannels, clutPoints, InputChannels); -- if (nTabSize == (size_t) -1) return FALSE; -+ if (nTabSize == (cmsUInt32Number) -1) return FALSE; - if (nTabSize > 0) { - // The 3D CLUT. - if (clut != NULL) { -@@ -2263,7 +2264,13 @@ - if (PostMPE != NULL) { - if (!Write16bitTables(self ->ContextID, io, PostMPE)) return FALSE; - } -+ else { -+ for (i=0; i < OutputChannels; i++) { - -+ if (!_cmsWriteUInt16Number(io, 0)) return FALSE; -+ if (!_cmsWriteUInt16Number(io, 0xffff)) return FALSE; ++ ++ private static class DraggablePanel extends Panel implements DragGestureListener { ++ ++ public DraggablePanel() { ++ (new DragSource()).createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this); ++ } ++ ++ @Override ++ public void dragGestureRecognized(DragGestureEvent dge) { ++ dge.startDrag(Cursor.getDefaultCursor(), new StringSelection("test")); + } + } - - return TRUE; - -@@ -2479,7 +2486,6 @@ - cmsUInt32Number offsetM; // Offset to first "M" curve - cmsUInt32Number offsetC; // Offset to CLUT - cmsUInt32Number offsetA; // Offset to first "A" curve -- cmsStage* mpe; - cmsPipeline* NewLUT = NULL; - - -@@ -2501,37 +2507,35 @@ - if (NewLUT == NULL) return NULL; - - if (offsetA!= 0) { -- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetA, inputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetA, inputChan))) -+ goto Error; - } - - if (offsetC != 0) { -- mpe = ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan))) -+ goto Error; - } - - if (offsetM != 0) { -- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetM, outputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetM, outputChan))) -+ goto Error; - } - - if (offsetMat != 0) { -- mpe = ReadMatrix(self, io, BaseOffset + offsetMat); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadMatrix(self, io, BaseOffset + offsetMat))) -+ goto Error; - } - - if (offsetB != 0) { -- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetB, outputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetB, outputChan))) -+ goto Error; - } - - *nItems = 1; - return NewLUT; -+Error: -+ cmsPipelineFree(NewLUT); -+ return NULL; - - cmsUNUSED_PARAMETER(SizeOfTag); - } -@@ -2798,7 +2802,6 @@ - cmsUInt32Number offsetM; // Offset to first "M" curve - cmsUInt32Number offsetC; // Offset to CLUT - cmsUInt32Number offsetA; // Offset to first "A" curve -- cmsStage* mpe; - cmsPipeline* NewLUT = NULL; - - -@@ -2821,37 +2824,35 @@ - if (NewLUT == NULL) return NULL; - - if (offsetB != 0) { -- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetB, inputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetB, inputChan))) -+ goto Error; - } - - if (offsetMat != 0) { -- mpe = ReadMatrix(self, io, BaseOffset + offsetMat); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadMatrix(self, io, BaseOffset + offsetMat))) -+ goto Error; - } - - if (offsetM != 0) { -- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetM, inputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetM, inputChan))) -+ goto Error; - } - - if (offsetC != 0) { -- mpe = ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan))) -+ goto Error; - } - - if (offsetA!= 0) { -- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetA, outputChan); -- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; } -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetA, outputChan))) -+ goto Error; - } - - *nItems = 1; - return NewLUT; -+Error: -+ cmsPipelineFree(NewLUT); -+ return NULL; - - cmsUNUSED_PARAMETER(SizeOfTag); - } -@@ -3287,7 +3288,7 @@ - SizeOfTag -= sizeof(cmsUInt32Number); - - if (!_cmsReadUInt64Number(io, &sec ->attributes)) goto Error; -- if (SizeOfTag < sizeof(cmsUInt32Number)) goto Error; -+ if (SizeOfTag < sizeof(cmsUInt64Number)) goto Error; - SizeOfTag -= sizeof(cmsUInt64Number); - - if (!_cmsReadUInt32Number(io, (cmsUInt32Number *)&sec ->technology)) goto Error; -@@ -4292,6 +4293,9 @@ - if (!_cmsReadUInt16Number(io, &InputChans)) return NULL; - if (!_cmsReadUInt16Number(io, &OutputChans)) return NULL; - -+ if (InputChans == 0) goto Error; -+ if (OutputChans == 0) goto Error; ++} +--- ./jdk/test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,128 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - if (io ->Read(io, Dimensions8, sizeof(cmsUInt8Number), 16) != 16) - goto Error; - -@@ -4381,7 +4385,6 @@ - { - cmsStageSignature ElementSig; - cmsTagTypeHandler* TypeHandler; -- cmsStage *mpe = NULL; - cmsUInt32Number nItems; - cmsPipeline *NewLUT = (cmsPipeline *) Cargo; - -@@ -4409,11 +4412,8 @@ - if (TypeHandler ->ReadPtr != NULL) { - - // This is a real element which should be read and processed -- mpe = (cmsStage*) TypeHandler ->ReadPtr(self, io, &nItems, SizeOfTag); -- if (mpe == NULL) return FALSE; -- -- // All seems ok, insert element -- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe); -+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, (cmsStage*) TypeHandler ->ReadPtr(self, io, &nItems, SizeOfTag))) -+ return FALSE; - } - - return TRUE; -@@ -4479,10 +4479,10 @@ - outputChan = cmsPipelineOutputChannels(Lut); - ElemCount = cmsPipelineStageCount(Lut); - -- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number *)); -+ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number)); - if (ElementOffsets == NULL) goto Error; - -- ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number *)); -+ ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number)); - if (ElementSizes == NULL) goto Error; - - // Write the head -@@ -4825,10 +4825,10 @@ - static - cmsBool AllocElem(cmsContext ContextID, _cmsDICelem* e, cmsUInt32Number Count) - { -- e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *)); -+ e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number)); - if (e->Offsets == NULL) return FALSE; - -- e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *)); -+ e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number)); - if (e->Sizes == NULL) { - - _cmsFree(ContextID, e -> Offsets); -@@ -4844,7 +4844,7 @@ - void FreeElem(_cmsDICelem* e) - { - if (e ->Offsets != NULL) _cmsFree(e -> ContextID, e -> Offsets); -- if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e ->Sizes); -+ if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e -> Sizes); - e->Offsets = e ->Sizes = NULL; - } - -@@ -5084,7 +5084,7 @@ - if (!_cmsReadUInt32Number(io, &Count)) return NULL; - SizeOfTag -= sizeof(cmsUInt32Number); - -- // Get rec lenghth -+ // Get rec length - if (!_cmsReadUInt32Number(io, &Length)) return NULL; - SizeOfTag -= sizeof(cmsUInt32Number); ++/** ++ * @test ++ * @bug 8024163 ++ * @summary Checks that dragExit is generated when the new DropTarget is created under the drag ++ * @library ../../regtesthelpers ++ * @build Util ++ * @compile MissedDragExitTest.java ++ * @run main/othervm MissedDragExitTest ++ * @author Petr Pchelko ++ */ ++ ++import test.java.awt.regtesthelpers.Util; ++ ++import javax.swing.*; ++import java.awt.*; ++import java.awt.datatransfer.StringSelection; ++import java.awt.dnd.DnDConstants; ++import java.awt.dnd.DragGestureEvent; ++import java.awt.dnd.DragGestureListener; ++import java.awt.dnd.DragSource; ++import java.awt.dnd.DropTarget; ++import java.awt.dnd.DropTargetAdapter; ++import java.awt.dnd.DropTargetDragEvent; ++import java.awt.dnd.DropTargetDropEvent; ++import java.awt.dnd.DropTargetEvent; ++import java.awt.event.InputEvent; ++ ++public class MissedDragExitTest { ++ ++ private static final int FRAME_SIZE = 100; ++ private static final int FRAME_LOCATION = 100; ++ ++ private static volatile boolean dragExitCalled = false; ++ ++ private static volatile Frame f; ++ ++ private static void initAndShowUI() { ++ f = new Frame("Test frame"); ++ f.setBounds(FRAME_LOCATION,FRAME_LOCATION,FRAME_SIZE,FRAME_SIZE); ++ ++ final DraggablePanel dragSource = new DraggablePanel(); ++ dragSource.setBackground(Color.yellow); ++ DropTarget dt = new DropTarget(dragSource, new DropTargetAdapter() { ++ @Override public void drop(DropTargetDropEvent dtde) { } ++ ++ @Override ++ public void dragExit(DropTargetEvent dte) { ++ dragExitCalled = true; ++ } ++ ++ @Override ++ public void dragOver(DropTargetDragEvent dtde) { ++ Panel newDropTarget = new Panel(); ++ newDropTarget.setDropTarget(new DropTarget()); ++ newDropTarget.setBackground(Color.red); ++ newDropTarget.setBounds(0, 0, FRAME_SIZE, FRAME_SIZE); ++ dragSource.add(newDropTarget); ++ } ++ }); ++ dragSource.setDropTarget(dt); ++ f.add(dragSource); ++ ++ f.setVisible(true); ++ } ++ ++ public static void main(String[] args) throws Throwable { ++ try { ++ ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ initAndShowUI(); ++ } ++ }); ++ ++ Robot r = new Robot(); ++ Util.waitForIdle(r); ++ Util.drag(r, ++ new Point(FRAME_LOCATION + FRAME_SIZE / 3, FRAME_LOCATION + FRAME_SIZE / 3), ++ new Point(FRAME_LOCATION + FRAME_SIZE / 3 * 2, FRAME_LOCATION + FRAME_SIZE / 3 * 2), ++ InputEvent.BUTTON1_MASK); ++ Util.waitForIdle(r); ++ ++ if (!dragExitCalled) { ++ throw new RuntimeException("Failed. Drag exit was not called" ); ++ } ++ } finally { ++ if (f != null) { ++ f.dispose(); ++ } ++ } ++ } ++ ++ private static class DraggablePanel extends Panel implements DragGestureListener { ++ ++ public DraggablePanel() { ++ (new DragSource()).createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this); ++ } ++ ++ @Override ++ public void dragGestureRecognized(DragGestureEvent dge) { ++ dge.startDrag(Cursor.getDefaultCursor(), new StringSelection("test")); ++ } ++ } ++} +--- ./jdk/test/java/awt/event/KeyEvent/KeyReleasedInAppletTest/KeyReleasedInAppletTest.java 2013-09-06 11:29:24.000000000 -0700 ++++ ./jdk/test/java/awt/event/KeyEvent/KeyReleasedInAppletTest/KeyReleasedInAppletTest.java 2014-01-18 12:16:24.000000000 -0800 +@@ -39,13 +39,10 @@ + import java.util.Hashtable; -@@ -5118,14 +5118,22 @@ - if (!ReadOneMLUC(self, io, &a.DisplayValue, i, &DisplayValueMLU)) goto Error; - } + /* +-@test +-@bug 8010009 +-@summary [macosx] Unable type into online word games on MacOSX +-@author petr.pchelko : area=awt.keyboard +-@run clean * +-@run build TestApplet +-@run applet/manual=yesno KeyReleasedInAppletTest.html ++ This is a part of test KeyReleasedInAppletTest.html. Do not add any JTREG tags here ++ bug 8010009 ++ summary [macosx] Unable type into online word games on MacOSX ++ author petr.pchelko : area=awt.keyboard + */ -+ if (NameWCS == NULL || ValueWCS == NULL) { + public class KeyReleasedInAppletTest extends JApplet { +--- ./jdk/test/java/awt/font/TextLayout/TestAATMorxFont.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/font/TextLayout/TestAATMorxFont.java 2014-04-19 01:27:12.000000000 -0700 +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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 verify rendering of MORX fonts on OS X. ++ * @bug 8031462 ++ */ ++ ++import javax.swing.*; ++import javax.swing.border.LineBorder; ++import java.awt.*; ++import java.awt.event.ActionEvent; ++ ++public class TestAATMorxFont extends JComponent { ++ public static void main(String[] args) { ++ String osName = System.getProperty("os.name"); ++ System.out.println("OS is " + osName); ++ osName = osName.toLowerCase(); ++ if (!osName.startsWith("mac")) { ++ return; ++ } ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ JFrame frame = new JFrame("Test Morx"); ++ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ TestAATMorxFont panel = new TestAATMorxFont(); ++ frame.add(panel); ++ frame.pack(); ++ frame.setVisible(true); ++ } ++ }); ++ } ++ ++ public Dimension getPreferredSize() { ++ return new Dimension(1200, 400); ++ } ++ ++ public void paintComponent(Graphics g) { ++ Graphics2D g2d = (Graphics2D)g; ++ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, ++ RenderingHints.VALUE_TEXT_ANTIALIAS_ON); ++ int y = 50; ++ g.setFont(new Font("Gujarati MT", Font.PLAIN, 40)); ++ System.out.println(g.getFont()); ++ g.drawString("\u0A95\u0ACD \u0A95\u0A95\u0A95 \u0A95\u0ACD\u0A95\u0ACD\u0A95", 20, y); ++ y += 50; ++ g.setFont(new Font("Tamil Sangam MN", Font.PLAIN, 40)); ++ System.out.println(g.getFont()); ++ g.drawString("\u0b95\u0bCD \u0b95\u0b95\u0b95 \u0b95\u0bCD\u0b95\u0bCD\u0b95", 20, y); ++ y += 50; ++ g.setFont(new Font("Telugu Sangam MN", Font.PLAIN, 40)); ++ System.out.println(g.getFont()); ++ g.drawString("\u0c15\u0c4D \u0c15\u0c15\u0c15 \u0c15\u0c4D\u0c15\u0c4D\u0c15", 20, y); ++ y += 50; ++ g.setFont(new Font("Devanagari Sangam MN", Font.PLAIN, 40)); ++ System.out.println(g.getFont()); ++ g.drawString("\u0915\u0940 \u0915\u0947 \u0915\u0942", 20, y); ++ y += 50; ++ g.drawString("\u0907\u0930\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915", 20, y); ++ y += 50; ++ g.drawString("\u0930\u093F\u0935\u094D\u092F\u0942 \u0915\u0947 \u092C\u093E\u0926 \u0935\u093F\u0915\u093E\u0938 \u0913\u0932\u0902\u092A\u093F\u0915 \u0938\u0947 \u092C\u093E\u0939\u0930 (\u0926\u0947\u0935\u0928\u093E\u0917\u0930\u0940) (\u0939\u093F\u0928\u094D\u0926\u0940) \u0907\u0930\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915", 20, y); + -+ cmsSignalError(self->ContextID, cmsERROR_CORRUPTION_DETECTED, "Bad dictionary Name/Value"); -+ rc = FALSE; -+ } -+ else { ++ } ++} + - rc = cmsDictAddEntry(hDict, NameWCS, ValueWCS, DisplayNameMLU, DisplayValueMLU); -+ } - - if (NameWCS != NULL) _cmsFree(self ->ContextID, NameWCS); - if (ValueWCS != NULL) _cmsFree(self ->ContextID, ValueWCS); - if (DisplayNameMLU != NULL) cmsMLUfree(DisplayNameMLU); - if (DisplayValueMLU != NULL) cmsMLUfree(DisplayValueMLU); - -- if (!rc) return FALSE; -+ if (!rc) goto Error; - } - - FreeArray(&a); -@@ -5277,14 +5285,14 @@ - #define DEFAULT_TAG_TYPE_COUNT (sizeof(SupportedTagTypes) / sizeof(_cmsTagTypeLinkedList)) - - // Both kind of plug-ins share same structure --cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterTagTypePlugin(cmsContext id, cmsPluginBase* Data) - { -- return RegisterTypesPlugin(Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT); -+ return RegisterTypesPlugin(id, Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT); - } - --cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext id, cmsPluginBase* Data) - { -- return RegisterTypesPlugin(Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT); -+ return RegisterTypesPlugin(id, Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT); - } - - -@@ -5391,7 +5399,9 @@ - { cmsSigScreeningTag, { 1, 1, { cmsSigScreeningType}, NULL }, &SupportedTags[59]}, - { cmsSigVcgtTag, { 1, 1, { cmsSigVcgtType}, NULL }, &SupportedTags[60]}, - { cmsSigMetaTag, { 1, 1, { cmsSigDictType}, NULL }, &SupportedTags[61]}, -- { cmsSigProfileSequenceIdTag, { 1, 1, { cmsSigProfileSequenceIdType}, NULL}, NULL} -+ { cmsSigProfileSequenceIdTag, { 1, 1, { cmsSigProfileSequenceIdType}, NULL }, &SupportedTags[62]}, -+ { cmsSigProfileDescriptionMLTag,{ 1, 1, { cmsSigMultiLocalizedUnicodeType}, NULL}, NULL} +--- ./jdk/test/java/awt/print/bug8023392/bug8023392.html 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/print/bug8023392/bug8023392.html 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,20 @@ ++ ++ ++ ++ Bug 8023392 ++ ++ ++ ++

Bug ID: 8023392

++ ++

See the dialog box (usually in upper left corner) for instructions

++ ++ ++ ++ +--- ./jdk/test/java/awt/print/bug8023392/bug8023392.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/awt/print/bug8023392/bug8023392.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,286 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - - }; - -@@ -5406,7 +5416,7 @@ - - #define DEFAULT_TAG_COUNT (sizeof(SupportedTags) / sizeof(_cmsTagLinkedList)) - --cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterTagPlugin(cmsContext id, cmsPluginBase* Data) - { - cmsPluginTag* Plugin = (cmsPluginTag*) Data; - _cmsTagLinkedList *pt, *Anterior; -@@ -5430,7 +5440,7 @@ - pt = pt ->Next; - } - -- pt = (_cmsTagLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagLinkedList)); -+ pt = (_cmsTagLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagLinkedList)); - if (pt == NULL) return FALSE; - - pt ->Signature = Plugin ->Signature; ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsvirt.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsvirt.c 2014-04-20 12:39:16.000000000 -0700 -@@ -208,9 +208,26 @@ - - if (TransferFunction) { - -+ // Tries to minimize space. Thanks to Richard Hughes for this nice idea - if (!cmsWriteTag(hICC, cmsSigRedTRCTag, (void*) TransferFunction[0])) goto Error; -- if (!cmsWriteTag(hICC, cmsSigGreenTRCTag, (void*) TransferFunction[1])) goto Error; -- if (!cmsWriteTag(hICC, cmsSigBlueTRCTag, (void*) TransferFunction[2])) goto Error; ++/* ++ test ++ @bug 8023392 ++ @summary Swing text components printed with spaces between chars ++ @author Anton Nashatyrev ++ @run applet/manual=yesno bug8023392.html ++*/ + -+ if (TransferFunction[1] == TransferFunction[0]) { ++import javax.swing.*; ++import javax.swing.border.LineBorder; ++import java.applet.Applet; ++import java.awt.*; ++import java.awt.event.ActionEvent; ++import java.awt.event.ActionListener; ++import java.awt.font.TextAttribute; ++import java.awt.print.PageFormat; ++import java.awt.print.Printable; ++import java.awt.print.PrinterException; ++import java.awt.print.PrinterJob; ++import java.text.AttributedCharacterIterator; ++import java.text.AttributedString; ++ ++ ++public class bug8023392 extends Applet { ++ static final String[] instructions = { ++ "A Frame containing several pairs of labels ((a) and (b)) is displayed.", ++ "Labels of each pair look the same and are left-aligned (with spaces ", ++ "between chars).", ++ "1. Hit the print button.", ++ "2. Select any available printer (printing to file is also fine).", ++ "3. Look at the printing result (paper, PDF, PS, etc.):", ++ " The (a) and (b) labels should look almost the same and the (a) labels", ++ " shouldn't appear as if they are stretched along X axis."}; ++ ++ public void init() { ++ this.setLayout(new BorderLayout()); ++ add(new SimplePrint2(), BorderLayout.CENTER); ++ ++ Sysout.createDialogWithInstructions(instructions); + -+ if (!cmsLinkTag (hICC, cmsSigGreenTRCTag, cmsSigRedTRCTag)) goto Error; ++ } + -+ } else { ++ public static class SimplePrint2 extends JPanel ++ implements ActionListener, Printable { ++ JLabel label1; ++ JLabel label2; ++ JButton printButton; + -+ if (!cmsWriteTag(hICC, cmsSigGreenTRCTag, (void*) TransferFunction[1])) goto Error; -+ } + -+ if (TransferFunction[2] == TransferFunction[0]) { ++ public SimplePrint2() { ++ setLayout(new BorderLayout()); ++ label1 = new JLabel("2a) a b c d e" + ++ " "); ++ label2 = new JLabel("2b) a b c d e"); + -+ if (!cmsLinkTag (hICC, cmsSigBlueTRCTag, cmsSigRedTRCTag)) goto Error; ++ Box p1 = new Box(BoxLayout.Y_AXIS); ++ p1.add(label1); ++ p1.add(label2); ++ p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") { ++ String s = "3a) a b c d e "; ++ @Override ++ protected void paintComponent(Graphics g) { ++ sun.swing.SwingUtilities2.drawChars(this, g, s.toCharArray(), ++ 0, s.length(), 0, 15); ++ } ++ }); ++ p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") { ++ String s = "3b) a b c d e"; ++ @Override ++ protected void paintComponent(Graphics g) { ++ sun.swing.SwingUtilities2.drawChars(this, g, s.toCharArray(), ++ 0, s.length(), 0, 15); ++ } ++ }); ++ p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") { ++ String s = "4a) a b c d e "; ++ AttributedCharacterIterator it; ++ { ++ AttributedString as = new AttributedString(s); ++ as.addAttribute(TextAttribute.FONT, getFont()); ++ as.addAttribute(TextAttribute.FOREGROUND, Color.RED, 3, 8); ++ it = as.getIterator(); ++ } ++ @Override ++ protected void paintComponent(Graphics g) { ++ sun.swing.SwingUtilities2.drawString(this, g, it, 0, 15); ++ } ++ }); + -+ } else { ++ p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") { ++ String s = "4b) a b c d e"; ++ AttributedCharacterIterator it; ++ { ++ AttributedString as = new AttributedString(s); ++ as.addAttribute(TextAttribute.FONT, getFont()); ++ as.addAttribute(TextAttribute.FOREGROUND, Color.RED, 3, 8); ++ it = as.getIterator(); ++ } ++ @Override ++ protected void paintComponent(Graphics g) { ++ sun.swing.SwingUtilities2.drawString(this, g, it, 0, 15); ++ } ++ }); + -+ if (!cmsWriteTag(hICC, cmsSigBlueTRCTag, (void*) TransferFunction[2])) goto Error; ++ JPanel p2 = new JPanel(); ++ printButton = new JButton("Print"); ++ printButton.addActionListener(this); ++ p2.add(printButton); ++ ++ Container c = this; ++ c.add(p1, BorderLayout.CENTER); ++ c.add(p2, BorderLayout.SOUTH); ++ ++ String[] data = { ++ "1a) \u30aa\u30f3\u30e9\u30a4\u30f3\u6d88\u8fbc" + ++ " ", ++ "1b) \u30aa\u30f3\u30e9\u30a4\u30f3\u6d88\u8fbc" ++ }; ++ JList l0 = new JList(data); ++ l0.setVisibleRowCount(l0.getModel().getSize()); ++ JScrollPane jsp = new JScrollPane(l0); ++ l0.setBorder(new LineBorder(Color.GRAY)); ++ c.add(jsp, BorderLayout.NORTH); ++ ++ for (Component comp : new Component[]{label1, label2, printButton}) { ++ comp.setFont(new Font("Monospaced", 0, 16)); ++ } ++ } ++ ++ public void actionPerformed(ActionEvent e) { ++ PrinterJob job = PrinterJob.getPrinterJob(); ++ job.setPrintable(this); ++ if (job.printDialog()) { ++ try { ++ job.print(); ++ } catch (PrinterException ex) { ++ ex.printStackTrace(); ++ } ++ } ++ } ++ ++ public int print(Graphics graphics, ++ PageFormat pageFormat, ++ int pageIndex) ++ throws PrinterException { ++ if (pageIndex >= 1) { ++ return Printable.NO_SUCH_PAGE; ++ } ++ ++ this.paint(graphics); ++ return Printable.PAGE_EXISTS; + } - } - - if (Primaries) { -@@ -303,7 +320,6 @@ - { - cmsHPROFILE hICC; - cmsPipeline* Pipeline; -- cmsStage* Lin; - int nChannels; - - hICC = cmsCreateProfilePlaceholder(ContextID); -@@ -327,10 +343,8 @@ - - - // Copy tables to Pipeline -- Lin = cmsStageAllocToneCurves(ContextID, nChannels, TransferFunctions); -- if (Lin == NULL) goto Error; -- -- cmsPipelineInsertStage(Pipeline, cmsAT_BEGIN, Lin); -+ if (!cmsPipelineInsertStage(Pipeline, cmsAT_BEGIN, cmsStageAllocToneCurves(ContextID, nChannels, TransferFunctions))) -+ goto Error; - - // Create tags - if (!SetTextTags(hICC, L"Linearization built-in")) goto Error; -@@ -344,6 +358,7 @@ - return hICC; - - Error: -+ cmsPipelineFree(Pipeline); - if (hICC) - cmsCloseProfile(hICC); - -@@ -451,9 +466,10 @@ - - if (!cmsStageSampleCLut16bit(CLUT, InkLimitingSampler, (void*) &Limit, 0)) goto Error; - -- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, nChannels)); -- cmsPipelineInsertStage(LUT, cmsAT_END, CLUT); -- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, nChannels)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, nChannels)) || -+ !cmsPipelineInsertStage(LUT, cmsAT_END, CLUT) || -+ !cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, nChannels))) -+ goto Error; - - // Create tags - if (!SetTextTags(hICC, L"ink-limiting built-in")) goto Error; -@@ -504,7 +520,8 @@ - LUT = cmsPipelineAlloc(ContextID, 3, 3); - if (LUT == NULL) goto Error; - -- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCLut(ContextID, 3)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCLut(ContextID, 3))) -+ goto Error; - - if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error; - cmsPipelineFree(LUT); -@@ -550,7 +567,8 @@ - LUT = cmsPipelineAlloc(ContextID, 3, 3); - if (LUT == NULL) goto Error; - -- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3))) -+ goto Error; - - if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error; - cmsPipelineFree(LUT); -@@ -595,7 +613,8 @@ - LUT = cmsPipelineAlloc(ContextID, 3, 3); - if (LUT == NULL) goto Error; - -- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3))) -+ goto Error; - - if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error; - cmsPipelineFree(LUT); -@@ -734,81 +753,83 @@ - // contrast, Saturation and white point displacement - - cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID, -- int nLUTPoints, -- cmsFloat64Number Bright, -- cmsFloat64Number Contrast, -- cmsFloat64Number Hue, -- cmsFloat64Number Saturation, -- int TempSrc, -- int TempDest) --{ -- cmsHPROFILE hICC; -- cmsPipeline* Pipeline; -- BCHSWADJUSTS bchsw; -- cmsCIExyY WhitePnt; -- cmsStage* CLUT; -- cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS]; -- int i; -- -- -- bchsw.Brightness = Bright; -- bchsw.Contrast = Contrast; -- bchsw.Hue = Hue; -- bchsw.Saturation = Saturation; -- -- cmsWhitePointFromTemp(&WhitePnt, TempSrc ); -- cmsxyY2XYZ(&bchsw.WPsrc, &WhitePnt); -- -- cmsWhitePointFromTemp(&WhitePnt, TempDest); -- cmsxyY2XYZ(&bchsw.WPdest, &WhitePnt); -- -- hICC = cmsCreateProfilePlaceholder(ContextID); -- if (!hICC) // can't allocate -- return NULL; -- -- -- cmsSetDeviceClass(hICC, cmsSigAbstractClass); -- cmsSetColorSpace(hICC, cmsSigLabData); -- cmsSetPCS(hICC, cmsSigLabData); -- -- cmsSetHeaderRenderingIntent(hICC, INTENT_PERCEPTUAL); -- -- -- // Creates a Pipeline with 3D grid only -- Pipeline = cmsPipelineAlloc(ContextID, 3, 3); -- if (Pipeline == NULL) { -- cmsCloseProfile(hICC); -- return NULL; -- } -+ int nLUTPoints, -+ cmsFloat64Number Bright, -+ cmsFloat64Number Contrast, -+ cmsFloat64Number Hue, -+ cmsFloat64Number Saturation, -+ int TempSrc, -+ int TempDest) -+{ -+ cmsHPROFILE hICC; -+ cmsPipeline* Pipeline; -+ BCHSWADJUSTS bchsw; -+ cmsCIExyY WhitePnt; -+ cmsStage* CLUT; -+ cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS]; -+ int i; - -- for (i=0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = nLUTPoints; -- CLUT = cmsStageAllocCLut16bitGranular(ContextID, Dimensions, 3, 3, NULL); -- if (CLUT == NULL) return NULL; -+ bchsw.Brightness = Bright; -+ bchsw.Contrast = Contrast; -+ bchsw.Hue = Hue; -+ bchsw.Saturation = Saturation; - -+ cmsWhitePointFromTemp(&WhitePnt, TempSrc ); -+ cmsxyY2XYZ(&bchsw.WPsrc, &WhitePnt); - -- if (!cmsStageSampleCLut16bit(CLUT, bchswSampler, (void*) &bchsw, 0)) { -+ cmsWhitePointFromTemp(&WhitePnt, TempDest); -+ cmsxyY2XYZ(&bchsw.WPdest, &WhitePnt); - -- // Shouldn't reach here -- cmsPipelineFree(Pipeline); -- cmsCloseProfile(hICC); -- return NULL; -- } -+ hICC = cmsCreateProfilePlaceholder(ContextID); -+ if (!hICC) // can't allocate -+ return NULL; - -- cmsPipelineInsertStage(Pipeline, cmsAT_END, CLUT); - -- // Create tags -+ cmsSetDeviceClass(hICC, cmsSigAbstractClass); -+ cmsSetColorSpace(hICC, cmsSigLabData); -+ cmsSetPCS(hICC, cmsSigLabData); - -- if (!SetTextTags(hICC, L"BCHS built-in")) return NULL; -+ cmsSetHeaderRenderingIntent(hICC, INTENT_PERCEPTUAL); - -- cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void*) cmsD50_XYZ()); -+ // Creates a Pipeline with 3D grid only -+ Pipeline = cmsPipelineAlloc(ContextID, 3, 3); -+ if (Pipeline == NULL) { -+ cmsCloseProfile(hICC); -+ return NULL; + } ++} + -+ for (i=0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = nLUTPoints; -+ CLUT = cmsStageAllocCLut16bitGranular(ContextID, Dimensions, 3, 3, NULL); -+ if (CLUT == NULL) return NULL; + ++/** ++ * ************************************************* ++ * Standard Test Machinery ++ * DO NOT modify anything below -- it's a standard ++ * chunk of code whose purpose is to make user ++ * interaction uniform, and thereby make it simpler ++ * to read and understand someone else's test. ++ * ************************************************** ++ */ ++class Sysout { ++ private static TestDialog dialog; ++ ++ public static void createDialogWithInstructions(String[] instructions) { ++ dialog = new TestDialog(new Frame(), "Instructions"); ++ dialog.printInstructions(instructions); ++ dialog.show(); ++ println("Any messages for the tester will display here."); ++ } ++ ++ public static void createDialog() { ++ dialog = new TestDialog(new Frame(), "Instructions"); ++ String[] defInstr = {"Instructions will appear here. ", ""}; ++ dialog.printInstructions(defInstr); ++ dialog.show(); ++ println("Any messages for the tester will display here."); ++ } + -+ if (!cmsStageSampleCLut16bit(CLUT, bchswSampler, (void*) &bchsw, 0)) { + -+ // Shouldn't reach here -+ goto Error; ++ public static void printInstructions(String[] instructions) { ++ dialog.printInstructions(instructions); + } + -+ if (!cmsPipelineInsertStage(Pipeline, cmsAT_END, CLUT)) { -+ goto Error; ++ ++ public static void println(String messageIn) { ++ dialog.displayMessage(messageIn); + } + -+ // Create tags -+ if (!SetTextTags(hICC, L"BCHS built-in")) return NULL; ++}// Sysout class + -+ cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void*) cmsD50_XYZ()); - -- cmsWriteTag(hICC, cmsSigAToB0Tag, (void*) Pipeline); -+ cmsWriteTag(hICC, cmsSigAToB0Tag, (void*) Pipeline); - -- // Pipeline is already on virtual profile -- cmsPipelineFree(Pipeline); -+ // Pipeline is already on virtual profile -+ cmsPipelineFree(Pipeline); - -- // Ok, done -- return hICC; -+ // Ok, done -+ return hICC; + -+Error: -+ cmsPipelineFree(Pipeline); -+ cmsCloseProfile(hICC); -+ return NULL; - } - - -@@ -856,7 +877,8 @@ - PostLin = cmsStageAllocToneCurves(ContextID, 1, &EmptyTab); - cmsFreeToneCurve(EmptyTab); - -- cmsPipelineInsertStage(LUT, cmsAT_END, PostLin); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, PostLin)) -+ goto Error; - - if (!cmsWriteTag(hProfile, cmsSigBToA0Tag, (void*) LUT)) goto Error; - if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, cmsD50_XYZ())) goto Error; -@@ -999,6 +1021,7 @@ - - { FALSE, 0, cmsSigLut16Type, 4, { cmsSigMatrixElemType, cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType}}, - { FALSE, 0, cmsSigLut16Type, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType}}, -+ { FALSE, 0, cmsSigLut16Type, 2, { cmsSigCurveSetElemType, cmsSigCLutElemType}}, - { TRUE , 0, cmsSigLutAtoBType, 1, { cmsSigCurveSetElemType }}, - { TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 3, { cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType } }, - { TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType } }, -@@ -1059,6 +1082,7 @@ - cmsContext ContextID = cmsGetTransformContextID(hTransform); - const cmsAllowedLUT* AllowedLUT; - cmsTagSignature DestinationTag; -+ cmsProfileClassSignature deviceClass; - - _cmsAssert(hTransform != NULL); - -@@ -1080,13 +1104,15 @@ - // Time to fix the Lab2/Lab4 issue. - if ((xform ->EntryColorSpace == cmsSigLabData) && (Version < 4.0)) { - -- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID))) -+ goto Error; - } - - // On the output side too - if ((xform ->ExitColorSpace) == cmsSigLabData && (Version < 4.0)) { - -- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID))) -+ goto Error; - } - - -@@ -1108,8 +1134,9 @@ - FrmIn = COLORSPACE_SH(ColorSpaceBitsIn) | CHANNELS_SH(ChansIn)|BYTES_SH(2); - FrmOut = COLORSPACE_SH(ColorSpaceBitsOut) | CHANNELS_SH(ChansOut)|BYTES_SH(2); - -+ deviceClass = cmsGetDeviceClass(hProfile); - -- if (cmsGetDeviceClass(hProfile) == cmsSigOutputClass) -+ if (deviceClass == cmsSigOutputClass) - DestinationTag = cmsSigBToA0Tag; - else - DestinationTag = cmsSigAToB0Tag; -@@ -1136,10 +1163,12 @@ - - // Put identity curves if needed - if (cmsPipelineGetPtrToFirstStage(LUT) ->Type != cmsSigCurveSetElemType) -- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn))) -+ goto Error; - - if (cmsPipelineGetPtrToLastStage(LUT) ->Type != cmsSigCurveSetElemType) -- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut)); -+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut))) -+ goto Error; - - AllowedLUT = FindCombination(LUT, Version >= 4.0, DestinationTag); - } -@@ -1168,10 +1197,22 @@ - if (!cmsWriteTag(hProfile, cmsSigColorantTableOutTag, xform->OutputColorant)) goto Error; - } - -- if (xform ->Sequence != NULL) { -+ if ((deviceClass == cmsSigLinkClass) && (xform ->Sequence != NULL)) { - if (!_cmsWriteProfileSequence(hProfile, xform ->Sequence)) goto Error; - } - -+ // Set the white point -+ if (deviceClass == cmsSigInputClass) { -+ if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->EntryWhitePoint)) goto Error; ++class TestDialog extends Dialog { ++ ++ TextArea instructionsText; ++ TextArea messageText; ++ int maxStringLength = 80; ++ ++ //DO NOT call this directly, go through Sysout ++ public TestDialog(Frame frame, String name) { ++ super(frame, name); ++ int scrollBoth = TextArea.SCROLLBARS_BOTH; ++ instructionsText = new TextArea("", 15, maxStringLength, scrollBoth); ++ add("North", instructionsText); ++ ++ messageText = new TextArea("", 5, maxStringLength, scrollBoth); ++ add("South", messageText); ++ ++ pack(); ++ ++ show(); ++ }// TestDialog() ++ ++ //DO NOT call this directly, go through Sysout ++ public void printInstructions(String[] instructions) { ++ //Clear out any current instructions ++ instructionsText.setText(""); ++ ++ //Go down array of instruction strings ++ ++ String printStr, remainingStr; ++ for (int i = 0; i < instructions.length; i++) { ++ //chop up each into pieces maxSringLength long ++ remainingStr = instructions[i]; ++ while (remainingStr.length() > 0) { ++ //if longer than max then chop off first max chars to print ++ if (remainingStr.length() >= maxStringLength) { ++ //Try to chop on a word boundary ++ int posOfSpace = remainingStr. ++ lastIndexOf(' ', maxStringLength - 1); ++ ++ if (posOfSpace <= 0) posOfSpace = maxStringLength - 1; ++ ++ printStr = remainingStr.substring(0, posOfSpace + 1); ++ remainingStr = remainingStr.substring(posOfSpace + 1); ++ } ++ //else just print ++ else { ++ printStr = remainingStr; ++ remainingStr = ""; ++ } ++ ++ instructionsText.append(printStr + "\n"); ++ ++ }// while ++ ++ }// for ++ ++ }//printInstructions() ++ ++ //DO NOT call this directly, go through Sysout ++ public void displayMessage(String messageIn) { ++ messageText.append(messageIn + "\n"); + } -+ else { -+ if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->ExitWhitePoint)) goto Error; ++ ++}// TestDialog class ++ +--- ./jdk/test/java/beans/Introspector/TestTypeResolver.java 2013-09-06 11:29:26.000000000 -0700 ++++ ./jdk/test/java/beans/Introspector/TestTypeResolver.java 2014-04-19 01:27:12.000000000 -0700 +@@ -113,6 +113,8 @@ + // by private implementations of the various Type interfaces + if (expect.equals(t) && t.equals(expect)) + System.out.println(", as expected"); ++ else if ((expect.equals(t) || t.equals(expect)) && expect.toString().equals(t.toString())) ++ System.out.println(", as workaround of the 8023301 bug"); + else { + System.out.println(" BUT SHOULD BE " + expect); + failedCases.add(c); +--- ./jdk/test/java/beans/XMLDecoder/8028054/Task.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/beans/XMLDecoder/8028054/Task.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,99 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import java.util.ArrayList; ++import java.util.Enumeration; ++import java.util.List; ++import java.util.jar.JarEntry; ++import java.util.jar.JarFile; ++import java.util.regex.Matcher; ++import java.util.regex.Pattern; ++ ++abstract class Task implements Runnable { ++ private transient boolean working = true; ++ private final List methods; ++ private final Thread thread; ++ ++ Task(List methods) { ++ this.methods = methods; ++ this.thread = new Thread(this); ++ this.thread.start(); + } + ++ boolean isAlive() { ++ return this.thread.isAlive(); ++ } + -+ // Per 7.2.15 in spec 4.3 -+ cmsSetHeaderRenderingIntent(hProfile, xform ->RenderingIntent); ++ boolean isWorking() { ++ boolean working = this.working && this.thread.isAlive(); ++ this.working = false; ++ return working; ++ } + - cmsPipelineFree(LUT); - return hProfile; - ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmswtpnt.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmswtpnt.c 2014-04-20 12:39:16.000000000 -0700 -@@ -30,7 +30,7 @@ - //--------------------------------------------------------------------------------- - // - // Little Color Management System --// Copyright (c) 1998-2010 Marti Maria Saguer -+// Copyright (c) 1998-2012 Marti Maria Saguer - // - // Permission is hereby granted, free of charge, to any person obtaining - // a copy of this software and associated documentation files (the "Software"), -@@ -76,48 +76,48 @@ - // Obtains WhitePoint from Temperature - cmsBool CMSEXPORT cmsWhitePointFromTemp(cmsCIExyY* WhitePoint, cmsFloat64Number TempK) - { -- cmsFloat64Number x, y; -- cmsFloat64Number T, T2, T3; -- // cmsFloat64Number M1, M2; -+ cmsFloat64Number x, y; -+ cmsFloat64Number T, T2, T3; -+ // cmsFloat64Number M1, M2; - -- _cmsAssert(WhitePoint != NULL); -- -- T = TempK; -- T2 = T*T; // Square -- T3 = T2*T; // Cube -- -- // For correlated color temperature (T) between 4000K and 7000K: -+ _cmsAssert(WhitePoint != NULL); - -- if (T >= 4000. && T <= 7000.) -- { -- x = -4.6070*(1E9/T3) + 2.9678*(1E6/T2) + 0.09911*(1E3/T) + 0.244063; -- } -- else -- // or for correlated color temperature (T) between 7000K and 25000K: -+ T = TempK; -+ T2 = T*T; // Square -+ T3 = T2*T; // Cube ++ @Override ++ public void run() { ++ long time = -System.currentTimeMillis(); ++ for (T method : this.methods) { ++ this.working = true; ++ try { ++ for (int i = 0; i < 100; i++) { ++ process(method); ++ } ++ } catch (NoSuchMethodException ignore) { ++ } ++ } ++ time += System.currentTimeMillis(); ++ print("thread done in " + time / 1000 + " seconds"); ++ } + -+ // For correlated color temperature (T) between 4000K and 7000K: ++ protected abstract void process(T method) throws NoSuchMethodException; + -+ if (T >= 4000. && T <= 7000.) -+ { -+ x = -4.6070*(1E9/T3) + 2.9678*(1E6/T2) + 0.09911*(1E3/T) + 0.244063; ++ static synchronized void print(Object message) { ++ System.out.println(message); ++ System.out.flush(); + } -+ else -+ // or for correlated color temperature (T) between 7000K and 25000K: - -- if (T > 7000.0 && T <= 25000.0) -- { -- x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T) + 0.237040; -- } -- else { -- cmsSignalError(0, cmsERROR_RANGE, "cmsWhitePointFromTemp: invalid temp"); -- return FALSE; -- } -+ if (T > 7000.0 && T <= 25000.0) -+ { -+ x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T) + 0.237040; -+ } -+ else { -+ cmsSignalError(0, cmsERROR_RANGE, "cmsWhitePointFromTemp: invalid temp"); -+ return FALSE; ++ ++ static List> getClasses(int count) throws Exception { ++ String resource = ClassLoader.getSystemClassLoader().getResource("java/lang/Object.class").toString(); ++ ++ Pattern pattern = Pattern.compile("jar:file:(.*)!.*"); ++ Matcher matcher = pattern.matcher(resource); ++ matcher.matches(); ++ resource = matcher.group(1); ++ ++ List> classes = new ArrayList<>(); ++ try (JarFile jarFile = new JarFile(resource)) { ++ Enumeration entries = jarFile.entries(); ++ while (entries.hasMoreElements()) { ++ String name = entries.nextElement().getName(); ++ if (name.startsWith("java") && name.endsWith(".class")) { ++ classes.add(Class.forName(name.substring(0, name.indexOf(".")).replace('/', '.'))); ++ if (count == classes.size()) { ++ break; ++ } ++ } ++ } + } - -- // Obtain y(x) -+ // Obtain y(x) - -- y = -3.000*(x*x) + 2.870*x - 0.275; -+ y = -3.000*(x*x) + 2.870*x - 0.275; - -- // wave factors (not used, but here for futures extensions) -+ // wave factors (not used, but here for futures extensions) - -- // M1 = (-1.3515 - 1.7703*x + 5.9114 *y)/(0.0241 + 0.2562*x - 0.7341*y); -- // M2 = (0.0300 - 31.4424*x + 30.0717*y)/(0.0241 + 0.2562*x - 0.7341*y); -+ // M1 = (-1.3515 - 1.7703*x + 5.9114 *y)/(0.0241 + 0.2562*x - 0.7341*y); -+ // M2 = (0.0300 - 31.4424*x + 30.0717*y)/(0.0241 + 0.2562*x - 0.7341*y); - -- WhitePoint -> x = x; -- WhitePoint -> y = y; -- WhitePoint -> Y = 1.0; -+ WhitePoint -> x = x; -+ WhitePoint -> y = y; -+ WhitePoint -> Y = 1.0; - -- return TRUE; -+ return TRUE; - } - - -@@ -266,7 +266,7 @@ - {{ 0.8951, 0.2664, -0.1614 }}, - {{ -0.7502, 1.7135, 0.0367 }}, - {{ 0.0389, -0.0685, 1.0296 }} -- }}; -+ }}; - - if (ConeMatrix == NULL) - ConeMatrix = &LamRigg; ---- jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/cmsxform.c 2014-04-20 12:39:16.000000000 -0700 -@@ -396,7 +396,7 @@ - static _cmsTransformCollection* TransformCollection = NULL; - - // Register new ways to transform --cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Data) -+cmsBool _cmsRegisterTransformPlugin(cmsContext id, cmsPluginBase* Data) - { - cmsPluginTransform* Plugin = (cmsPluginTransform*) Data; - _cmsTransformCollection* fl; -@@ -412,7 +412,7 @@ - if (Plugin ->Factory == NULL) return FALSE; - - -- fl = (_cmsTransformCollection*) _cmsPluginMalloc(sizeof(_cmsTransformCollection)); -+ fl = (_cmsTransformCollection*) _cmsPluginMalloc(id, sizeof(_cmsTransformCollection)); - if (fl == NULL) return FALSE; - - // Copy the parameters -@@ -651,6 +651,22 @@ - - // ---------------------------------------------------------------------------------------------------------------- - -+static -+void SetWhitePoint(cmsCIEXYZ* wtPt, const cmsCIEXYZ* src) -+{ -+ if (src == NULL) { -+ wtPt ->X = cmsD50X; -+ wtPt ->Y = cmsD50Y; -+ wtPt ->Z = cmsD50Z; -+ } -+ else { -+ wtPt ->X = src->X; -+ wtPt ->Y = src->Y; -+ wtPt ->Z = src->Z; ++ return classes; + } -+ +} +--- ./jdk/test/java/beans/XMLDecoder/8028054/TestConstructorFinder.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/beans/XMLDecoder/8028054/TestConstructorFinder.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,81 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - // New to lcms 2.0 -- have all parameters available. - cmsHTRANSFORM CMSEXPORT cmsCreateExtendedTransform(cmsContext ContextID, - cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[], -@@ -664,7 +680,6 @@ - cmsUInt32Number dwFlags) - { - _cmsTRANSFORM* xform; -- cmsBool FloatTransform; - cmsColorSpaceSignature EntryColorSpace; - cmsColorSpaceSignature ExitColorSpace; - cmsPipeline* Lut; -@@ -681,9 +696,7 @@ - if (hGamutProfile == NULL) dwFlags &= ~cmsFLAGS_GAMUTCHECK; - } - -- // On floating point transforms, inhibit optimizations -- FloatTransform = (_cmsFormatterIsFloat(InputFormat) && _cmsFormatterIsFloat(OutputFormat)); -- -+ // On floating point transforms, inhibit cache - if (_cmsFormatterIsFloat(InputFormat) || _cmsFormatterIsFloat(OutputFormat)) - dwFlags |= cmsFLAGS_NOCACHE; - -@@ -730,6 +743,10 @@ - xform ->ExitColorSpace = ExitColorSpace; - xform ->RenderingIntent = Intents[nProfiles-1]; - -+ // Take white points -+ SetWhitePoint(&xform->EntryWhitePoint, (cmsCIEXYZ*) cmsReadTag(hProfiles[0], cmsSigMediaWhitePointTag)); -+ SetWhitePoint(&xform->ExitWhitePoint, (cmsCIEXYZ*) cmsReadTag(hProfiles[nProfiles-1], cmsSigMediaWhitePointTag)); ++import com.sun.beans.finder.ConstructorFinder; + - - // Create a gamut check LUT if requested - if (hGamutProfile != NULL && (dwFlags & cmsFLAGS_GAMUTCHECK)) ---- jdk/src/share/native/sun/java2d/cmm/lcms/lcms2.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/lcms2.h 2014-04-20 12:39:16.000000000 -0700 -@@ -30,7 +30,7 @@ - //--------------------------------------------------------------------------------- - // - // Little Color Management System --// Copyright (c) 1998-2011 Marti Maria Saguer -+// Copyright (c) 1998-2013 Marti Maria Saguer - // - // Permission is hereby granted, free of charge, to any person obtaining - // a copy of this software and associated documentation files (the "Software"), -@@ -52,7 +52,7 @@ - // - //--------------------------------------------------------------------------------- - // --// Version 2.4 -+// Version 2.5 - // - - #ifndef _lcms2_H -@@ -101,7 +101,7 @@ - #endif - - // Version/release --#define LCMS_VERSION 2040 -+#define LCMS_VERSION 2050 - - // I will give the chance of redefining basic types for compilers that are not fully C99 compliant - #ifndef CMS_BASIC_TYPES_ALREADY_DEFINED -@@ -367,6 +367,7 @@ - cmsSigPreview1Tag = 0x70726531, // 'pre1' - cmsSigPreview2Tag = 0x70726532, // 'pre2' - cmsSigProfileDescriptionTag = 0x64657363, // 'desc' -+ cmsSigProfileDescriptionMLTag = 0x6473636d, // 'dscm' - cmsSigProfileSequenceDescTag = 0x70736571, // 'pseq' - cmsSigProfileSequenceIdTag = 0x70736964, // 'psid' - cmsSigPs2CRD0Tag = 0x70736430, // 'psd0' -@@ -1014,6 +1015,7 @@ - // Plug-In registering --------------------------------------------------------------------------------------------------- - - CMSAPI cmsBool CMSEXPORT cmsPlugin(void* Plugin); -+CMSAPI cmsBool CMSEXPORT cmsPluginTHR(cmsContext ContextID, void* Plugin); - CMSAPI void CMSEXPORT cmsUnregisterPlugins(void); - - // Error logging ---------------------------------------------------------------------------------------------------------- -@@ -1190,7 +1192,7 @@ - // Where to place/locate the stages in the pipeline chain - typedef enum { cmsAT_BEGIN, cmsAT_END } cmsStageLoc; - --CMSAPI void CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe); -+CMSAPI int CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe); - CMSAPI void CMSEXPORT cmsPipelineUnlinkStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage** mpe); - - // This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements -@@ -1274,6 +1276,13 @@ - const char LanguageCode[3], const char CountryCode[3], - char ObtainedLanguage[3], char ObtainedCountry[3]); - -+CMSAPI cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu); ++import java.lang.reflect.Constructor; ++import java.util.ArrayList; ++import java.util.Collections; ++import java.util.List; + -+CMSAPI cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu, -+ cmsUInt32Number idx, -+ char LanguageCode[3], -+ char CountryCode[3]); ++/* ++ * @test ++ * @bug 8028054 ++ * @summary Tests that cached constructors have synchronized access ++ * @author Sergey Malenkov ++ * @compile -XDignore.symbol.file TestConstructorFinder.java ++ * @run main TestConstructorFinder ++ */ + - // Undercolorremoval & black generation ------------------------------------------------------------------------------------- - - typedef struct { -@@ -1424,6 +1433,7 @@ - CMSAPI void CMSEXPORT cmsSetHeaderFlags(cmsHPROFILE hProfile, cmsUInt32Number Flags); - CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile); - CMSAPI void CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer); -+CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile); - CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile); - CMSAPI void CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model); - CMSAPI void CMSEXPORT cmsSetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number Flags); ---- jdk/src/share/native/sun/java2d/cmm/lcms/lcms2_internal.h 2013-09-06 11:29:02.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/cmm/lcms/lcms2_internal.h 2014-04-20 12:39:16.000000000 -0700 -@@ -27,7 +27,7 @@ - // However, the following notice accompanied the original version of this - // file: - // --//--------------------------------------------------------------------------------- ++public class TestConstructorFinder { ++ public static void main(String[] args) throws Exception { ++ List> classes = Task.getClasses(Integer.MAX_VALUE); ++ List constructors = new ArrayList<>(); ++ for (Class type : classes) { ++ Collections.addAll(constructors, type.getConstructors()); ++ } ++ Task.print("found " + constructors.size() + " constructors in " + classes.size() + " classes"); + - // - // Little Color Management System - // Copyright (c) 1998-2011 Marti Maria Saguer -@@ -196,7 +196,7 @@ - // Plug-In registering --------------------------------------------------------------- - - // Specialized function for plug-in memory management. No pairing free() since whole pool is freed at once. --void* _cmsPluginMalloc(cmsUInt32Number size); -+void* _cmsPluginMalloc(cmsContext ContextID, cmsUInt32Number size); - - // Memory management - cmsBool _cmsRegisterMemHandlerPlugin(cmsPluginBase* Plugin); -@@ -205,28 +205,28 @@ - cmsBool _cmsRegisterInterpPlugin(cmsPluginBase* Plugin); - - // Parametric curves --cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Formatters management --cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterFormattersPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Tag type management --cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterTagTypePlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Tag management --cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterTagPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Intent management --cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Multi Process elements --cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Optimization --cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterOptimizationPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // Transform --cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Plugin); -+cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Plugin); - - // --------------------------------------------------------------------------------------------------------- - -@@ -263,7 +263,7 @@ - cmsUInt16Number Country; - - cmsUInt32Number StrW; // Offset to current unicode string -- cmsUInt32Number Len; // Lenght in bytes -+ cmsUInt32Number Len; // Length in bytes - - } _cmsMLUentry; - -@@ -330,9 +330,11 @@ - cmsColorSpaceSignature ColorSpace; - cmsColorSpaceSignature PCS; - cmsUInt32Number RenderingIntent; ++ List tasks = new ArrayList<>(); ++ for (int i = 0; i < 50; i++) { ++ tasks.add(new Task(constructors) { ++ @Override ++ protected void process(Constructor constructor) throws NoSuchMethodException { ++ ConstructorFinder.findConstructor(constructor.getDeclaringClass(), constructor.getParameterTypes()); ++ } ++ }); ++ } ++ int alarm = 0; ++ while (true) { ++ int alive = 0; ++ int working = 0; ++ for (Task task : tasks) { ++ if (task.isWorking()) { ++ working++; ++ alive++; ++ } else if (task.isAlive()) { ++ alive++; ++ } ++ } ++ if (alive == 0) { ++ break; ++ } ++ Task.print(working + " out of " + alive + " threads are working"); ++ if ((working == 0) && (++alarm == 10)) { ++ Task.print("DEADLOCK DETECTED"); ++ System.exit(100); ++ } ++ Thread.sleep(1000); ++ } ++ } ++} +--- ./jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/beans/XMLDecoder/8028054/TestMethodFinder.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,81 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - cmsUInt32Number flags; - cmsUInt32Number manufacturer, model; - cmsUInt64Number attributes; -+ cmsUInt32Number creator; - - cmsProfileID ProfileID; - -@@ -585,6 +587,10 @@ - cmsColorSpaceSignature EntryColorSpace; - cmsColorSpaceSignature ExitColorSpace; - -+ // White points (informative only) -+ cmsCIEXYZ EntryWhitePoint; -+ cmsCIEXYZ ExitWhitePoint; ++import com.sun.beans.finder.MethodFinder; + - // Profiles used to create the transform - cmsSEQ* Sequence; - ---- jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2013-09-06 11:29:03.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2014-04-20 12:39:16.000000000 -0700 -@@ -661,7 +661,12 @@ - (sy2-sy1) != (jint)(dy2-dy1) || - oglc->extraAlpha != 1.0f; - break; -- -+#ifdef MACOSX -+ case OGLC_VENDOR_ATI: -+ // see 8024461 -+ viaTexture = JNI_TRUE; -+ break; -+#endif - default: - // just use the glDrawPixels() codepath - viaTexture = JNI_FALSE; ---- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2013-09-06 11:29:03.000000000 -0700 -+++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2014-04-20 12:39:16.000000000 -0700 -@@ -26,7 +26,7 @@ - #ifndef OGLFuncs_h_Included - #define OGLFuncs_h_Included - --#ifdef MACOSX -+#ifdef _ALLBSD_SOURCE - #include - #endif - #include "jni.h" ---- jdk/src/share/native/sun/management/Flag.c 2013-09-06 11:29:03.000000000 -0700 -+++ jdk/src/share/native/sun/management/Flag.c 2014-04-20 12:39:16.000000000 -0700 -@@ -95,12 +95,12 @@ - return 0; - } - -- if (count == 0) { -+ if (count <= 0) { - JNU_ThrowIllegalArgumentException(env, 0); - return 0; - } - -- gsize = count * sizeof(jmmVMGlobal); -+ gsize = (size_t)count * sizeof(jmmVMGlobal); - globals = (jmmVMGlobal*) malloc(gsize); - if (globals == NULL) { - JNU_ThrowOutOfMemoryError(env, 0); ---- jdk/src/share/native/sun/management/GcInfoBuilder.c 2013-09-06 11:29:03.000000000 -0700 -+++ jdk/src/share/native/sun/management/GcInfoBuilder.c 2014-04-20 12:39:16.000000000 -0700 -@@ -59,12 +59,12 @@ - return; - } - -- if (num_attributes == 0) { -+ if (num_attributes <= 0) { - JNU_ThrowIllegalArgumentException(env, "Invalid num_attributes"); - return; - } - -- ext_att_info = (jmmExtAttributeInfo*) malloc(num_attributes * -+ ext_att_info = (jmmExtAttributeInfo*) malloc((size_t)num_attributes * - sizeof(jmmExtAttributeInfo)); - if (ext_att_info == NULL) { - JNU_ThrowOutOfMemoryError(env, 0); -@@ -78,7 +78,7 @@ - return; - } - -- nativeTypes = (jchar*) malloc(num_attributes * sizeof(jchar)); -+ nativeTypes = (jchar*) malloc((size_t)num_attributes * sizeof(jchar)); - if (nativeTypes == NULL) { - free(ext_att_info); - JNU_ThrowOutOfMemoryError(env, 0); -@@ -188,11 +188,16 @@ - return 0; - } - -+ if (ext_att_count <= 0) { -+ JNU_ThrowIllegalArgumentException(env, "Invalid ext_att_count"); -+ return 0; ++import java.lang.reflect.Method; ++import java.util.ArrayList; ++import java.util.Collections; ++import java.util.List; ++ ++/* ++ * @test ++ * @bug 8028054 ++ * @summary Tests that cached methods have synchronized access ++ * @author Sergey Malenkov ++ * @compile -XDignore.symbol.file TestMethodFinder.java ++ * @run main TestMethodFinder ++ */ ++ ++public class TestMethodFinder { ++ public static void main(String[] args) throws Exception { ++ List> classes = Task.getClasses(4000); ++ List methods = new ArrayList<>(); ++ for (Class type : classes) { ++ Collections.addAll(methods, type.getMethods()); ++ } ++ Task.print("found " + methods.size() + " methods in " + classes.size() + " classes"); ++ ++ List tasks = new ArrayList<>(); ++ for (int i = 0; i < 50; i++) { ++ tasks.add(new Task(methods) { ++ @Override ++ protected void process(Method method) throws NoSuchMethodException { ++ MethodFinder.findMethod(method.getDeclaringClass(), method.getName(), method.getParameterTypes()); ++ } ++ }); ++ } ++ int alarm = 0; ++ while (true) { ++ int alive = 0; ++ int working = 0; ++ for (Task task : tasks) { ++ if (task.isWorking()) { ++ working++; ++ alive++; ++ } else if (task.isAlive()) { ++ alive++; ++ } ++ } ++ if (alive == 0) { ++ break; ++ } ++ Task.print(working + " out of " + alive + " threads are working"); ++ if ((working == 0) && (++alarm == 10)) { ++ Task.print("DEADLOCK DETECTED"); ++ System.exit(100); ++ } ++ Thread.sleep(1000); ++ } ++ } ++} +--- ./jdk/test/java/beans/XMLEncoder/Test8027066.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/beans/XMLEncoder/Test8027066.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8027066 ++ * @summary Tests that the same array can be encoded twice ++ * @author Anton Nashatyrev ++ */ ++public class Test8027066 extends AbstractTest { ++ public static void main(String[] args) { ++ new Test8027066().test(true); + } + - gc_stat.usage_before_gc = usageBeforeGC; - gc_stat.usage_after_gc = usageAfterGC; - gc_stat.gc_ext_attribute_values_size = ext_att_count; - if (ext_att_count > 0) { -- gc_stat.gc_ext_attribute_values = (jvalue*) malloc(ext_att_count * -+ gc_stat.gc_ext_attribute_values = (jvalue*) malloc((size_t)ext_att_count * - sizeof(jvalue)); - if (gc_stat.gc_ext_attribute_values == NULL) { - JNU_ThrowOutOfMemoryError(env, 0); -@@ -212,7 +217,7 @@ - } ++ @Override ++ protected String[][] getObject() { ++ String[] strings = {"first", "second"}; ++ String[][] arrays = {strings, strings}; ++ return arrays; ++ } ++} +--- ./jdk/test/java/io/File/GetXSpace.sh 2013-09-06 11:29:29.000000000 -0700 ++++ ./jdk/test/java/io/File/GetXSpace.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -26,7 +26,7 @@ + # set platform-dependent variable + OS=`uname -s` + case "$OS" in +- SunOS | Linux ) TMP=/tmp ;; ++ SunOS | Linux | *BSD | Darwin ) TMP=/tmp ;; + Windows_98 ) return ;; + Windows* ) SID=`sid`; TMP="c:/temp" ;; + * ) +--- ./jdk/test/java/io/File/createTempFile/SpecialTempFile.java 2013-09-06 11:29:29.000000000 -0700 ++++ ./jdk/test/java/io/File/createTempFile/SpecialTempFile.java 2013-12-01 11:14:28.000000000 -0800 +@@ -23,7 +23,7 @@ - // convert the ext_att_types to native types -- nativeTypes = (jchar*) malloc(ext_att_count * sizeof(jchar)); -+ nativeTypes = (jchar*) malloc((size_t)ext_att_count * sizeof(jchar)); - if (nativeTypes == NULL) { - if (gc_stat.gc_ext_attribute_values != NULL) { - free(gc_stat.gc_ext_attribute_values); ---- jdk/src/share/native/sun/management/HotSpotDiagnostic.c 2013-09-06 11:29:03.000000000 -0700 -+++ jdk/src/share/native/sun/management/HotSpotDiagnostic.c 2014-04-20 12:39:16.000000000 -0700 -@@ -29,7 +29,7 @@ - #include "sun_management_HotSpotDiagnostic.h" + /* + * @test +- * @bug 8013827 8011950 ++ * @bug 8013827 8011950 8025128 + * @summary Check whether File.createTempFile can handle special parameters + * on Windows platforms + * @author Dan Xu +@@ -34,7 +34,9 @@ - JNIEXPORT void JNICALL --Java_sun_management_HotSpotDiagnostic_dumpHeap -+Java_sun_management_HotSpotDiagnostic_dumpHeap0 - (JNIEnv *env, jobject dummy, jstring outputfile, jboolean live) - { - jmm_interface->DumpHeap0(env, outputfile, live); ---- jdk/src/solaris/back/util_md.h 2013-09-06 11:29:05.000000000 -0700 -+++ jdk/src/solaris/back/util_md.h 2014-04-20 12:39:22.000000000 -0700 -@@ -51,7 +51,7 @@ + public class SpecialTempFile { - /* On little endian machines, convert java big endian numbers. */ +- private static void test(String name, String[] prefix, String[] suffix) { ++ private static void test(String name, String[] prefix, String[] suffix, ++ boolean expectedException) throws IOException ++ { + if (prefix == null || suffix == null + || prefix.length != suffix.length) + { +@@ -42,39 +44,59 @@ + } --#if defined(_LITTLE_ENDIAN) -+#if (BYTE_ORDER == LITTLE_ENDIAN) + final String exceptionMsg = "Unable to create temporary file"; +- final String errMsg = "IOException is expected"; - #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 2013-09-06 11:29:05.000000000 -0700 -+++ jdk/src/solaris/bin/ergo.c 2014-04-20 12:39:22.000000000 -0700 -@@ -100,6 +100,27 @@ - /* Compute physical memory by asking the OS */ - uint64_t - physical_memory(void) { -+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE) -+ uint64_t result; -+#ifdef HW_PHYSMEM64 -+ int64_t physmem; -+ int name[2] = { CTL_HW, HW_PHYSMEM64 }; -+#else -+ unsigned long physmem; -+ int name[2] = { CTL_HW, HW_PHYSMEM }; -+#endif -+ size_t physmem_len = sizeof(physmem); -+# define UINT64_FORMAT "%" PRIu64 + for (int i = 0; i < prefix.length; i++) { + boolean exceptionThrown = false; + File f = null; +- System.out.println("In test " + name +- + ", creating temp file with prefix, " +- + prefix[i] + ", suffix, " + suffix[i]); +- try { +- f = File.createTempFile(prefix[i], suffix[i]); +- } catch (IOException e) { +- if (exceptionMsg.equals(e.getMessage())) +- exceptionThrown = true; +- else +- System.out.println("Wrong error message:" + e.getMessage()); + -+ if (sysctl(name, 2, &physmem, &physmem_len, NULL, 0) == -1) -+ physmem = 256 * MB; ++ String[] dirs = { null, "." }; + -+ result = (uint64_t)physmem; ++ for (String dir : dirs ) { ++ System.out.println("In test " + name + ++ ", creating temp file with prefix, " + ++ prefix[i] + ", suffix, " + suffix[i] + ++ ", in dir, " + dir); + -+ JLI_TraceLauncher("physical memory: " UINT64_FORMAT " (%.3fGB)\n", -+ result, result / (double) GB); -+ return result; -+#else /* !_ALLBSD_SOURCE */ - const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES); - const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE); - const uint64_t result = pages * page_size; -@@ -110,4 +131,5 @@ - " physical memory: " UINT64_FORMAT " (%.3fGB)\n", - pages, page_size, result, result / (double) GB); - return result; -+#endif - } ---- jdk/src/solaris/bin/ergo.h 2013-09-06 11:29:05.000000000 -0700 -+++ jdk/src/solaris/bin/ergo.h 2014-04-20 12:39:22.000000000 -0700 -@@ -33,6 +33,10 @@ - #include - #include - #include -+#ifdef _ALLBSD_SOURCE -+#include -+#include -+#endif - - #include "java.h" - ---- jdk/src/solaris/bin/ergo_i586.c 2013-09-06 11:29:05.000000000 -0700 -+++ jdk/src/solaris/bin/ergo_i586.c 2014-04-20 12:39:22.000000000 -0700 -@@ -106,7 +106,7 @@ - - #endif /* __solaris__ */ - --#ifdef __linux__ -+#if !defined(MACOSX) && (defined(__linux__) || defined(_ALLBSD_SOURCE)) - - /* - * A utility method for asking the CPU about itself. -@@ -171,6 +171,12 @@ - #endif /* _LP64 */ - } - -+#ifdef __linux__ -+#define OSNAMEPREFIX "linux_" -+#else -+#define OSNAMEPREFIX "bsd_" -+#endif ++ try { ++ if (dir == null || dir.isEmpty()) ++ f = File.createTempFile(prefix[i], suffix[i]); ++ else ++ f = File.createTempFile(prefix[i], suffix[i], new File(dir)); ++ } catch (IOException e) { ++ if (expectedException) { ++ if (e.getMessage().startsWith(exceptionMsg)) ++ exceptionThrown = true; ++ else ++ System.out.println("Wrong error message:" + ++ e.getMessage()); ++ } else { ++ throw e; ++ } ++ } + - /* The definition of a server-class machine for linux-i586 */ - jboolean - ServerClassMachineImpl(void) { -@@ -193,11 +199,11 @@ - result = JNI_TRUE; ++ if (expectedException && (!exceptionThrown || f != null)) ++ throw new RuntimeException("IOException is expected"); + } +- if (!exceptionThrown || f != null) +- throw new RuntimeException(errMsg); + } } - } -- JLI_TraceLauncher("linux_" LIBARCHNAME "_ServerClassMachine: %s\n", -+ JLI_TraceLauncher(OSNAMEPREFIX LIBARCHNAME "_ServerClassMachine: %s\n", - (result == JNI_TRUE ? "true" : "false")); - return result; - } --#endif /* __linux__ */ -+#endif /* !MACOSX && (__linux__ || _ALLBSD_SOURCE) */ - /* - * Routines shared by solaris-i586 and linux-i586. -@@ -308,6 +314,15 @@ - /* Compute the number of physical processors, not logical processors */ - static unsigned long - physical_processors(void) { -+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE) -+ unsigned long result; -+ int name[2] = { CTL_HW, HW_NCPU }; -+ size_t rlen = sizeof(result); + public static void main(String[] args) throws Exception { ++ // Test JDK-8025128 ++ String[] goodPre = { "///..///", "/foo" }; ++ String[] goodSuf = { ".temp", ".tmp" }; ++ test("goodName", goodPre, goodSuf, false); + -+ if (sysctl(name, 2, &result, &rlen, NULL, 0) == -1) -+ result = 1; -+ return result; -+#else - const long sys_processors = sysconf(_SC_NPROCESSORS_CONF); - unsigned long result = sys_processors; ++ // Test JDK-8011950 ++ String[] slashPre = { "temp", "///..///", "/foo" }; ++ String[] slashSuf = { "///..///..", "///..///..", "///..///.." }; ++ test("SlashedName", slashPre, slashSuf, true); ++ + if (!System.getProperty("os.name").startsWith("Windows")) + return; -@@ -320,4 +335,5 @@ - } - JLI_TraceLauncher("physical processors: %lu\n", result); - return result; -+#endif + // Test JDK-8013827 + String[] resvPre = { "LPT1.package.zip", "com7.4.package.zip" }; + String[] resvSuf = { ".temp", ".temp" }; +- test("ReservedName", resvPre, resvSuf); +- +- // Test JDK-8011950 +- String[] slashPre = { "///..///", "temp", "///..///" }; +- String[] slashSuf = { ".temp", "///..///..", "///..///.." }; +- test("SlashedName", slashPre, slashSuf); ++ test("ReservedName", resvPre, resvSuf, true); + } } ---- jdk/src/solaris/bin/java_md_solinux.c 2013-09-06 11:29:05.000000000 -0700 -+++ jdk/src/solaris/bin/java_md_solinux.c 2014-04-20 12:39:22.000000000 -0700 +--- ./jdk/test/java/io/FileOutputStream/ManyFiles.java 2013-09-06 11:29:29.000000000 -0700 ++++ ./jdk/test/java/io/FileOutputStream/ManyFiles.java 2014-06-06 19:56:34.000000000 -0700 +@@ -43,7 +43,7 @@ + // Windows capability it is much simpler to only run it + // on that platform. + String osName = System.getProperty("os.name"); +- if (osName.startsWith("Linux")||osName.startsWith("SunOS")) ++ if (osName.startsWith("Linux")||osName.startsWith("SunOS")||osName.endsWith("BSD")||osName.contains("OS X")) + return; + + for (int n = 0; n < NUM_FILES; n++) { +--- ./jdk/test/java/io/IOException/LastErrorString.java 2013-09-06 11:29:29.000000000 -0700 ++++ ./jdk/test/java/io/IOException/LastErrorString.java 2014-06-06 19:56:32.000000000 -0700 @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -@@ -950,15 +950,46 @@ - return exec_path; - } +@@ -22,7 +22,8 @@ + */ -+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE) + /* @test +- @bug 4167937 ++ @bug 4167937 8023964 ++ @ignore Test truncates system files when run as root, see 7042603 + @summary Test code paths that use the JVM_LastErrorString procedure + */ + +--- ./jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2013-09-06 11:29:30.000000000 -0700 ++++ ./jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -41,7 +41,7 @@ + # Need to determine the classpath separator and filepath separator based on the + # operating system. + case "$OS" in +-SunOS | Linux | Darwin ) ++SunOS | Linux | *BSD | Darwin ) + PS=":" ;; + Windows* | CYGWIN* ) + PS=";" ;; +--- ./jdk/test/java/io/Serializable/serialver/classpath/run.sh 2013-09-06 11:29:31.000000000 -0700 ++++ ./jdk/test/java/io/Serializable/serialver/classpath/run.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -47,7 +47,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" ;; + Windows* | CYGWIN* ) + PS=";" ;; +--- ./jdk/test/java/io/Serializable/serialver/nested/run.sh 2013-09-06 11:29:31.000000000 -0700 ++++ ./jdk/test/java/io/Serializable/serialver/nested/run.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -47,7 +47,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" ;; + Windows* | CYGWIN* ) + PS=";" ;; +--- ./jdk/test/java/lang/Class/checkMemberAccess/CheckMemberAccess.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/Class/checkMemberAccess/CheckMemberAccess.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,123 @@ +/* -+ * BSD's implementation of CounterGet() ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. + */ -+int64_t -+CounterGet() -+{ -+ struct timeval tv; -+ gettimeofday(&tv, NULL); -+ return (tv.tv_sec * 1000) + tv.tv_usec; -+} -+#endif + - /* --- Splash Screen shared library support --- */ - static const char* SPLASHSCREEN_SO = JNI_LIB_NAME("splashscreen"); - static void* hSplashLib = NULL; - - void* SplashProcAddress(const char* name) { - if (!hSplashLib) { -- const char * splashLibPath; -- splashLibPath = SPLASHSCREEN_SO; -- hSplashLib = dlopen(splashLibPath, RTLD_LAZY | RTLD_GLOBAL); -+ int ret; -+ char jrePath[MAXPATHLEN]; -+ char splashPath[MAXPATHLEN]; ++import java.io.IOException; ++import java.lang.reflect.Method; ++import java.nio.file.Files; ++import java.nio.file.Path; ++import java.nio.file.Paths; + -+ if (!GetJREPath(jrePath, sizeof(jrePath), GetArch(), JNI_FALSE)) { -+ JLI_ReportErrorMessage(JRE_ERROR1); -+ return NULL; ++/* ++ * @test ++ * @bug 8021368 ++ * @summary SecurityManager.checkMemberAccess call should not resolve ++ * and load other classes ++ * @run main/othervm/policy=test.policy CheckMemberAccess ++ */ ++ ++public class CheckMemberAccess { ++ private static int count = 0; ++ public static void main(String[] args) throws Exception { ++ String testClasses = System.getProperty("test.classes", "."); ++ // remove Foo class ++ // the test will verify SecurityManager.checkMemberAccess should not ++ // cause any class loading of implementation classes ++ Path p = Paths.get(testClasses, "CheckMemberAccess$Foo.class"); ++ if (Files.exists(p)) { ++ // Foo already deleted in rerun ++ Files.delete(p); + } -+ ret = JLI_Snprintf(splashPath, sizeof(splashPath), "%s/lib/%s/%s", -+ jrePath, GetArch(), SPLASHSCREEN_SO); ++ // patch the checkMemberAcces_ method name ++ patch(Paths.get(testClasses, "CheckMemberAccess$PrivateCheckMemberAccess.class")); ++ patch(Paths.get(testClasses, "CheckMemberAccess$StaticCheckMemberAccess.class")); ++ ++ test(new OverriddedCheckMemberAccess(), count+1); ++ test(new NoOverriddedCheckMemberAccess(), count+1); ++ test(new PrivateCheckMemberAccess(), count); ++ test(new StaticCheckMemberAccess(), count); ++ } + -+ if (ret >= (int) sizeof(splashPath)) { -+ JLI_ReportErrorMessage(JRE_ERROR11); -+ return NULL; ++ private static void patch(Path p) throws IOException { ++ // s/checkMemberAcces_/checkMemberAccess ++ byte[] bytes = Files.readAllBytes(p); ++ int len = "Acces_".length(); ++ for (int i=0; i < bytes.length-len; i++) { ++ if (bytes[i] == 'A' && ++ bytes[i+1] == 'c' && ++ bytes[i+2] == 'c' && ++ bytes[i+3] == 'e' && ++ bytes[i+4] == 's' && ++ bytes[i+5] == '_') { ++ bytes[i+5] = 's'; ++ break; ++ } + } -+ if (ret < 0) { -+ JLI_ReportErrorMessage(JRE_ERROR13); -+ return NULL; ++ Files.write(p, bytes); ++ } ++ ++ public void findMe() {}; ++ public static void test(SecurityManager smgr, int expected) throws Exception { ++ System.setSecurityManager(smgr); ++ // this will trigger SecurityManager.checkMemberAccess to be called ++ Method m = CheckMemberAccess.class.getMethod("findMe", new Class[0]); ++ if (count != expected) { ++ throw new RuntimeException(smgr.getClass() + ": " + count + " != " + expected); + } -+ hSplashLib = dlopen(splashPath, RTLD_LAZY | RTLD_GLOBAL); -+ JLI_TraceLauncher("Info: loaded %s\n", splashPath); - } - if (hSplashLib) { - void* sym = dlsym(hSplashLib, name); ---- jdk/src/solaris/bin/java_md_solinux.h 2013-09-06 11:29:05.000000000 -0700 -+++ jdk/src/solaris/bin/java_md_solinux.h 2014-04-20 12:39:22.000000000 -0700 -@@ -33,6 +33,10 @@ - #include - #define CounterGet() (gethrtime()/1000) - #define Counter2Micros(counts) (counts) -+#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE) -+/* CounterGet() is implemented in java_md_solinux.c */ -+int64_t CounterGet(void); -+#define Counter2Micros(counts) (counts) - #else /* ! HAVE_GETHRTIME */ - #define CounterGet() (0) - #define Counter2Micros(counts) (1) -@@ -48,6 +52,9 @@ - #ifdef __linux__ - static const char *system_dir = "/usr/java"; - static const char *user_dir = "/java"; -+#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE) -+static const char *system_dir = PACKAGE_PATH "/openjdk7"; -+static const char *user_dir = "/java"; - #else /* Solaris */ - static const char *system_dir = "/usr/jdk"; - static const char *user_dir = "/jdk"; ---- jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd 2013-09-06 11:29:06.000000000 -0700 -+++ jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd 2014-04-28 17:39:02.000000000 -0700 -@@ -63,11 +63,66 @@ - private /* final */ InputStream stdout; - private /* final */ InputStream stderr; ++ } ++ ++ static class OverriddedCheckMemberAccess extends SecurityManager { ++ @Override ++ public void checkMemberAccess(Class clazz, int which) { ++ System.out.println("OverriddedCheckMemberAccess.checkMemberAccess called"); ++ count++; ++ } ++ // implementation-specific class should not be loaded when ++ // this.checkMemberAccess is called ++ public Foo foo() { ++ return null; ++ } ++ } ++ static class NoOverriddedCheckMemberAccess extends OverriddedCheckMemberAccess { ++ } ++ static class PrivateCheckMemberAccess extends SecurityManager { ++ private void checkMemberAcces_(Class clazz, int which) { ++ throw new RuntimeException("should not reach here"); ++ } ++ // implementation-specific class should not be loaded when ++ // this.checkMemberAccess is called ++ public Foo foo() { ++ return null; ++ } ++ } ++ static class StaticCheckMemberAccess extends SecurityManager { ++ public static void checkMemberAcces_(Class clazz, int which) { ++ throw new RuntimeException("should not reach here"); ++ } ++ // implementation-specific class should not be loaded when ++ // this.checkMemberAccess is called ++ public Foo foo() { ++ return null; ++ } ++ } ++ static class Foo {} ++} +--- ./jdk/test/java/lang/Class/checkMemberAccess/test.policy 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/Class/checkMemberAccess/test.policy 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,6 @@ ++grant { ++ permission java.lang.RuntimePermission "createSecurityManager"; ++ permission java.lang.RuntimePermission "setSecurityManager"; ++ permission java.io.FilePermission "<>", "read,write,delete"; ++ permission java.util.PropertyPermission "*", "read"; ++}; +--- ./jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2013-09-06 11:29:32.000000000 -0700 ++++ ./jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -45,13 +45,7 @@ + # set platform-specific variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- FS="/" +- ;; +- Linux ) +- FS="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + FS="/" + ;; + Windows*) +--- ./jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2013-09-06 11:29:32.000000000 -0700 ++++ ./jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -49,13 +49,7 @@ + # set platform-specific variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- FS="/" +- ;; +- Linux ) +- FS="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + FS="/" + ;; + Windows* | CYGWIN* ) +--- ./jdk/test/java/lang/ProcessBuilder/Basic.java 2013-09-06 11:29:33.000000000 -0700 ++++ ./jdk/test/java/lang/ProcessBuilder/Basic.java 2014-06-06 19:56:33.000000000 -0700 +@@ -29,6 +29,7 @@ + * 4947220 7018606 7034570 + * @summary Basic tests for Process and Environment Variable code + * @run main/othervm/timeout=300 Basic ++ * @run main/othervm/timeout=300 -Djdk.lang.Process.launchMechanism=fork Basic + * @author Martin Buchholz + */ -+ private static enum LaunchMechanism { -+ FORK(1), -+ POSIX_SPAWN(2); +@@ -295,11 +296,15 @@ + System.exit(5); + System.err.print("standard error"); + System.out.print("standard output"); +- } else if (action.equals("testInheritIO")) { ++ } else if (action.equals("testInheritIO") ++ || action.equals("testRedirectInherit")) { + List childArgs = new ArrayList(javaChildArgs); + childArgs.add("testIO"); + ProcessBuilder pb = new ProcessBuilder(childArgs); +- pb.inheritIO(); ++ if (action.equals("testInheritIO")) ++ pb.inheritIO(); ++ else ++ redirectIO(pb, INHERIT, INHERIT, INHERIT); + ProcessResults r = run(pb); + if (! r.out().equals("")) + System.exit(7); +@@ -554,9 +559,10 @@ + System.getProperty("java.class.path"); + + private static final List javaChildArgs = +- Arrays.asList(new String[] +- { javaExe, "-classpath", absolutifyPath(classpath), +- "Basic$JavaChild"}); ++ Arrays.asList(javaExe, ++ "-XX:+DisplayVMOutputToStderr", ++ "-classpath", absolutifyPath(classpath), ++ "Basic$JavaChild"); + + private static void testEncoding(String encoding, String tested) { + try { +@@ -988,10 +994,10 @@ + // Note that this requires __FOUR__ nested JVMs involved in one test, + // if you count the harness JVM. + //---------------------------------------------------------------- +- { ++ for (String testName : new String[] { "testInheritIO", "testRedirectInherit" } ) { + redirectIO(pb, PIPE, PIPE, PIPE); + List command = pb.command(); +- command.set(command.size() - 1, "testInheritIO"); ++ command.set(command.size() - 1, testName); + Process p = pb.start(); + new PrintStream(p.getOutputStream()).print("standard input"); + p.getOutputStream().close(); +@@ -1592,8 +1598,8 @@ + javaExe)); + list.add("ArrayOOME"); + ProcessResults r = run(new ProcessBuilder(list)); +- check(r.out().contains("java.lang.OutOfMemoryError:")); +- check(r.out().contains(javaExe)); ++ check(r.err().contains("java.lang.OutOfMemoryError:")); ++ check(r.err().contains(javaExe)); + check(r.err().contains(System.getProperty("java.version"))); + equal(r.exitValue(), 1); + } catch (Throwable t) { unexpected(t); } +--- ./jdk/test/java/lang/ProcessBuilder/BasicLauncher.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/ProcessBuilder/BasicLauncher.java 2014-04-19 01:27:13.000000000 -0700 +@@ -0,0 +1,99 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ private int value; -+ LaunchMechanism(int x) {value = x;} -+ }; ++/* ++ * @test ++ * @bug 5049299 ++ * @summary (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion ++ * @compile BasicLauncher.java Basic.java ++ * @run main BasicLauncher ++ */ + -+ /* On BSD, the default is to spawn */ -+ private static final LaunchMechanism launchMechanism; -+ private static byte[] helperpath; ++import java.io.*; ++import java.nio.file.*; ++ ++public class BasicLauncher { ++ ++ private static boolean passed = false; ++ ++ public static void main(String args[]) throws Exception { ++ String osName = System.getProperty("os.name"); ++ if (osName.startsWith("SunOS")) { ++ BasicLauncher l = new BasicLauncher(); ++ l.start(); ++ } ++ } ++ ++ private void start() throws Exception { ++ String separator = System.getProperty("file.separator"); ++ String jdkpath = System.getProperty("test.jdk") + separator + "bin" + separator; ++ String srcpath = System.getProperty("test.src", ".") + separator; ++ String testClasses = System.getProperty("test.classes", "."); ++ ++ ProcessBuilder builder = new ProcessBuilder( ++ jdkpath + "java", ++ "-cp", ++ testClasses, ++ "-Djdk.lang.Process.launchMechanism=posix_spawn", ++ "Basic"); ++ builder.redirectErrorStream(true); ++ Process testProc = builder.start(); ++ printProcessThread ppt = ++ new printProcessThread(testProc, "testproc"); ++ ppt.start(); ++ testProc.waitFor(); ++ System.out.println("testproc done"); + -+ private static byte[] toCString(String s) { -+ if (s == null) -+ return null; -+ byte[] bytes = s.getBytes(); -+ byte[] result = new byte[bytes.length + 1]; -+ System.arraycopy(bytes, 0, -+ result, 0, -+ bytes.length); -+ result[result.length-1] = (byte)0; -+ return result; ++ if (!passed) ++ throw new RuntimeException("Test Failed: "); + } + -+ static { -+ launchMechanism = AccessController.doPrivileged( -+ new PrivilegedAction() -+ { -+ public LaunchMechanism run() { -+ String javahome = System.getProperty("java.home"); + -+ String osname = System.getProperty("os.name"); -+ if (osname.endsWith("BSD")) { -+ String osArch = System.getProperty("os.arch"); -+ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); -+ } else { -+ helperpath = toCString(javahome + "/lib/jspawnhelper"); -+ } ++ class printProcessThread extends Thread { ++ Process p; ++ String pName; + -+ String s = System.getProperty( -+ "jdk.lang.Process.launchMechanism", "posix_spawn"); ++ public printProcessThread(Process p, String pName) { ++ this.p = p; ++ this.pName = pName; ++ } + -+ try { -+ return LaunchMechanism.valueOf(s.toUpperCase()); -+ } catch (IllegalArgumentException e) { -+ throw new Error(s + " is not a supported " + -+ "process launch mechanism on this platform."); ++ @Override ++ public void run() { ++ try (BufferedReader reader = ++ new BufferedReader(new InputStreamReader(p.getInputStream()))) { ++ String line; ++ while ((line = reader.readLine()) != null) { ++ System.out.println("[Output: " + pName + "]" + line); ++ if (line.contains("failed = 0")) { ++ passed = true; ++ } + } ++ ++ } catch (Exception e) { ++ System.out.println("Exception encountered in " + pName ++ + " thread\n" + e); + } -+ }); ++ } + } ++} +--- ./jdk/test/java/lang/ProcessBuilder/InheritIO/InheritIO.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/ProcessBuilder/InheritIO/InheritIO.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,47 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - /* this is for the reaping thread */ - private native int waitForProcessExit(int pid); - - /** -- * Create a process using fork(2) and exec(2). -+ * Create a process. Depending on the mode flag, this is done by -+ * one of the following mechanisms. -+ * - fork(2) and exec(2) -+ * - posix_spawn(2) - * - * @param fds an array of three file descriptors. - * Indexes 0, 1, and 2 correspond to standard input, -@@ -80,7 +135,8 @@ - * output. - * @return the pid of the subprocess - */ -- private native int forkAndExec(byte[] prog, -+ private native int forkAndExec(int mode, byte[] helperpath, -+ byte[] prog, - byte[] argBlock, int argc, - byte[] envBlock, int envc, - byte[] dir, -@@ -132,7 +188,9 @@ - final boolean redirectErrorStream) - throws IOException { - -- pid = forkAndExec(prog, -+ pid = forkAndExec(launchMechanism.value, -+ helperpath, -+ prog, - argBlock, argc, - envBlock, envc, - dir, -@@ -236,11 +294,10 @@ - try { stderr.close(); } catch (IOException ignored) {} - } - -- /* This routine initializes JNI field offsets for the class */ -- private static native void initIDs(); -+ private static native void init(); - - static { -- initIDs(); -+ init(); - } - - /** ---- jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2013-09-06 11:29:06.000000000 -0700 -+++ jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2014-04-20 12:39:22.000000000 -0700 -@@ -63,11 +63,61 @@ - private /* final */ InputStream stdout; - private /* final */ InputStream stderr; - -+ private static enum LaunchMechanism { -+ FORK(1), -+ VFORK(3); ++import static java.lang.ProcessBuilder.Redirect.*; + -+ private int value; -+ LaunchMechanism(int x) {value = x;} -+ }; ++class InheritIO { + -+ /* default is VFORK on Linux */ -+ private static final LaunchMechanism launchMechanism; -+ private static byte[] helperpath; ++ public static class TestInheritIO { ++ public static void main(String args[]) throws Throwable { ++ int err = new ProcessBuilder(args).inheritIO().start().waitFor(); ++ System.err.print("exit value: " + err); ++ System.exit(err); ++ } ++ } + -+ private static byte[] toCString(String s) { -+ if (s == null) -+ return null; -+ byte[] bytes = s.getBytes(); -+ byte[] result = new byte[bytes.length + 1]; -+ System.arraycopy(bytes, 0, -+ result, 0, -+ bytes.length); -+ result[result.length-1] = (byte)0; -+ return result; ++ public static class TestRedirectInherit { ++ public static void main(String args[]) throws Throwable { ++ int err = new ProcessBuilder(args) ++ .redirectInput(INHERIT) ++ .redirectOutput(INHERIT) ++ .redirectError(INHERIT) ++ .start().waitFor(); ++ System.err.print("exit value: " + err); ++ System.exit(err); ++ } + } ++} +--- ./jdk/test/java/lang/ProcessBuilder/InheritIO/InheritIO.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/ProcessBuilder/InheritIO/InheritIO.sh 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,81 @@ ++# ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# 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. ++# + -+ static { -+ launchMechanism = AccessController.doPrivileged( -+ new PrivilegedAction() -+ { -+ public LaunchMechanism run() { -+ String javahome = System.getProperty("java.home"); -+ String osArch = System.getProperty("os.arch"); ++# @test ++# @bug 8023130 ++# @summary (process) ProcessBuilder#inheritIO does not work on Windows ++# @run shell InheritIO.sh + -+ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); -+ String s = System.getProperty( -+ "jdk.lang.Process.launchMechanism", "vfork"); ++if [ "x${TESTSRC}" = "x" ]; then ++ echo "TESTSRC not set. Test cannot execute. Failed." ++ exit 1 ++fi + -+ try { -+ return LaunchMechanism.valueOf(s.toUpperCase()); -+ } catch (IllegalArgumentException e) { -+ throw new Error(s + " is not a supported " + -+ "process launch mechanism on this platform."); -+ } -+ } -+ }); -+ } ++if [ "x${TESTJAVA}" = "x" ]; then ++ echo "TESTJAVA not set. Test cannot execute. Failed." ++ exit 1 ++fi + - /* this is for the reaping thread */ - private native int waitForProcessExit(int pid); - - /** -- * Create a process using fork(2) and exec(2). -+ * Create a process. Depending on the mode flag, this is done by -+ * one of the following mechanisms. -+ * - fork(2) and exec(2) -+ * - clone(2) and exec(2) -+ * - vfork(2) and exec(2) - * - * @param fds an array of three file descriptors. - * Indexes 0, 1, and 2 correspond to standard input, -@@ -80,7 +130,8 @@ - * output. - * @return the pid of the subprocess - */ -- private native int forkAndExec(byte[] prog, -+ private native int forkAndExec(int mode, byte[] helperpath, -+ byte[] prog, - byte[] argBlock, int argc, - byte[] envBlock, int envc, - byte[] dir, -@@ -132,7 +183,9 @@ - final boolean redirectErrorStream) - throws IOException { - -- pid = forkAndExec(prog, -+ pid = forkAndExec(launchMechanism.value, -+ helperpath, -+ prog, - argBlock, argc, - envBlock, envc, - dir, -@@ -236,11 +289,10 @@ - try { stderr.close(); } catch (IOException ignored) {} - } - -- /* This routine initializes JNI field offsets for the class */ -- private static native void initIDs(); -+ private static native void init(); - - static { -- initIDs(); -+ init(); - } - - /** ---- jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris 2013-09-06 11:29:06.000000000 -0700 -+++ jdk/src/solaris/classes/java/lang/UNIXProcess.java.solaris 2014-04-20 12:39:22.000000000 -0700 -@@ -26,6 +26,8 @@ - package java.lang; - - import java.io.*; -+import java.security.AccessController; -+import java.security.PrivilegedAction; - - /* java.lang.Process subclass in the UNIX environment. - * -@@ -45,11 +47,65 @@ - private DeferredCloseInputStream stdout_inner_stream; - private InputStream stderr_stream; - -+ private static enum LaunchMechanism { -+ FORK(1), -+ POSIX_SPAWN(2); + -+ private int value; -+ LaunchMechanism(int x) {value = x;} -+ }; ++JAVA="${TESTJAVA}/bin/java" ++JAVAC="${TESTJAVA}/bin/javac" + -+ /* On Solaris, the default is to spawn */ -+ private static final LaunchMechanism launchMechanism; -+ private static byte[] helperpath; ++cp -f ${TESTSRC}/InheritIO.java . + -+ private static byte[] toCString(String s) { -+ if (s == null) -+ return null; -+ byte[] bytes = s.getBytes(); -+ byte[] result = new byte[bytes.length + 1]; -+ System.arraycopy(bytes, 0, -+ result, 0, -+ bytes.length); -+ result[result.length-1] = (byte)0; -+ return result; -+ } ++# compile the class ourselves, so this can run as a standalone test + -+ static { -+ launchMechanism = AccessController.doPrivileged( -+ new PrivilegedAction() -+ { -+ public LaunchMechanism run() { -+ String javahome = System.getProperty("java.home"); -+ String osArch = System.getProperty("os.arch"); -+ if (osArch.equals("x86")) { -+ osArch = "i386"; -+ } else if (osArch.equals("x86_64")) { -+ osArch = "amd64"; -+ } ++${JAVAC} InheritIO.java ++RES="$?" ++if [ ${RES} != 0 ]; then ++ echo 'FAIL: Cannot compile InheritIO.java' ++ exit ${RES} ++fi + -+ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); -+ String s = System.getProperty( -+ "jdk.lang.Process.launchMechanism", "fork"); + -+ try { -+ return LaunchMechanism.valueOf(s.toUpperCase()); -+ } catch (IllegalArgumentException e) { -+ throw new Error(s + " is not a supported " + -+ "process launch mechanism on this platform."); -+ } -+ } -+ }); -+ } ++for TEST_NAME in TestInheritIO TestRedirectInherit ++do ++ ${JAVA} ${TESTVMOPTS} -classpath . \ ++ 'InheritIO$'${TEST_NAME} printf message > stdout.txt 2> stderr.txt + - /* this is for the reaping thread */ - private native int waitForProcessExit(int pid); - - /** -- * Create a process using fork(2) and exec(2). -+ * Create a process. Depending on the mode flag, this is done by -+ * one of the following mechanisms. -+ * - fork(2) and exec(2) -+ * - posix_spawn(2) - * - * @param std_fds array of file descriptors. Indexes 0, 1, and - * 2 correspond to standard input, standard output and -@@ -61,7 +117,8 @@ - * if and only if it is not -1 on output. - * @return the pid of the subprocess - */ -- private native int forkAndExec(byte[] prog, -+ private native int forkAndExec(int mode, byte[] helperpath, -+ byte[] prog, - byte[] argBlock, int argc, - byte[] envBlock, int envc, - byte[] dir, -@@ -76,7 +133,9 @@ - final int[] std_fds, - final boolean redirectErrorStream) - throws IOException { -- pid = forkAndExec(prog, -+ pid = forkAndExec(launchMechanism.value, -+ helperpath, -+ prog, - argBlock, argc, - envBlock, envc, - dir, -@@ -294,10 +353,9 @@ - - } - -- /* This routine initializes JNI field offsets for the class */ -- private static native void initIDs(); -+ private static native void init(); - - static { -- initIDs(); -+ init(); - } - } ---- jdk/src/solaris/classes/sun/awt/X11/XClipboard.java 2013-09-06 11:29:06.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XClipboard.java 2014-04-20 12:39:22.000000000 -0700 -@@ -84,7 +84,7 @@ - - protected synchronized void setContentsNative(Transferable contents) { - SortedMap formatMap = DataTransferer.getInstance().getFormatsForTransferable -- (contents, DataTransferer.adaptFlavorMap(flavorMap)); -+ (contents, DataTransferer.adaptFlavorMap(getDefaultFlavorTable())); - long[] formats = DataTransferer.keysToLongArray(formatMap); - - if (!selection.setOwner(contents, formatMap, formats, -@@ -123,7 +123,7 @@ - private void checkChangeHere(Transferable contents) { - if (areFlavorListenersRegistered()) { - checkChange(DataTransferer.getInstance(). -- getFormatsForTransferableAsArray(contents, flavorMap)); -+ getFormatsForTransferableAsArray(contents, getDefaultFlavorTable())); - } - } - ---- jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2013-09-06 11:29:07.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -49,6 +49,7 @@ - import sun.awt.*; - import sun.font.FontConfigManager; - import sun.misc.PerformanceLogger; -+import sun.misc.ThreadGroupUtils; - import sun.print.PrintJob2D; - import sun.security.action.GetPropertyAction; - import sun.security.action.GetBooleanAction; -@@ -311,13 +312,7 @@ - } - PrivilegedAction a = new PrivilegedAction() { - public Void run() { -- ThreadGroup mainTG = Thread.currentThread().getThreadGroup(); -- ThreadGroup parentTG = mainTG.getParent(); -- while (parentTG != null) { -- mainTG = parentTG; -- parentTG = mainTG.getParent(); -- } -- Thread shutdownThread = new Thread(mainTG, "XToolkt-Shutdown-Thread") { -+ Thread shutdownThread = new Thread(ThreadGroupUtils.getRootThreadGroup(), "XToolkt-Shutdown-Thread") { - public void run() { - XSystemTrayPeer peer = XSystemTrayPeer.getPeerInstance(); - if (peer != null) { -@@ -379,22 +374,16 @@ - init(); - XWM.init(); - SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME); -- -- PrivilegedAction action = new PrivilegedAction() { -+ toolkitThread = AccessController.doPrivileged(new PrivilegedAction() { -+ @Override - public Thread run() { -- ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); -- ThreadGroup parentTG = currentTG.getParent(); -- while (parentTG != null) { -- currentTG = parentTG; -- parentTG = currentTG.getParent(); -- } -- Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT"); -+ Thread thread = new Thread(ThreadGroupUtils.getRootThreadGroup(), XToolkit.this, "AWT-XAWT"); -+ thread.setContextClassLoader(null); - thread.setPriority(Thread.NORM_PRIORITY + 1); - thread.setDaemon(true); - return thread; - } -- }; -- toolkitThread = AccessController.doPrivileged(action); -+ }); - toolkitThread.start(); - } - } ---- jdk/src/solaris/classes/sun/awt/X11FontManager.java 2013-09-06 11:29:07.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11FontManager.java 2014-04-20 12:39:22.000000000 -0700 -@@ -213,7 +213,7 @@ - if (fontID != null) { - fileName = (String)fontNameMap.get(fontID); - /* On Linux check for the Lucida Oblique fonts */ -- if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) { -+ if (fileName == null && (FontUtilities.isLinux || FontUtilities.isBSD) && !isOpenJDK()) { - if (oblmap == null) { - initObliqueLucidaFontMap(); - } -@@ -712,7 +712,7 @@ - if (fontConfigDirs == null) { - return; - } -- if (FontUtilities.isLinux) { -+ if (FontUtilities.isLinux || FontUtilities.isBSD) { - fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts"); - } - fontdirs = (String[])fontConfigDirs.toArray(new String[0]); -@@ -740,7 +740,7 @@ - */ - FontConfiguration mFontConfig = new MFontConfiguration(this); - if (FontUtilities.isOpenSolaris || -- (FontUtilities.isLinux && -+ ((FontUtilities.isLinux || FontUtilities.isBSD) && - (!mFontConfig.foundOsSpecificFile() || - !mFontConfig.fontFilesArePresent()) || - (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) { ---- jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2013-09-06 11:29:07.000000000 -0700 -+++ jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -41,6 +41,7 @@ - import sun.java2d.opengl.GLXGraphicsConfig; - import sun.java2d.xr.XRGraphicsConfig; - import sun.java2d.loops.SurfaceType; -+import sun.misc.ThreadGroupUtils; - - /** - * This is an implementation of a GraphicsDevice object for a single -@@ -424,23 +425,20 @@ - // hook will have no effect) - shutdownHookRegistered = true; - PrivilegedAction a = new PrivilegedAction() { -+ @Override - public Void run() { -- ThreadGroup mainTG = Thread.currentThread().getThreadGroup(); -- ThreadGroup parentTG = mainTG.getParent(); -- while (parentTG != null) { -- mainTG = parentTG; -- parentTG = mainTG.getParent(); -- } -+ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); - Runnable r = new Runnable() { -- public void run() { -- Window old = getFullScreenWindow(); -- if (old != null) { -- exitFullScreenExclusive(old); -- setDisplayMode(origDisplayMode); -- } -+ @Override -+ public void run() { -+ Window old = getFullScreenWindow(); -+ if (old != null) { -+ exitFullScreenExclusive(old); -+ setDisplayMode(origDisplayMode); - } -- }; -- Thread t = new Thread(mainTG, r,"Display-Change-Shutdown-Thread-"+screen); -+ } -+ }; -+ Thread t = new Thread(rootTG, r, "Display-Change-Shutdown-Thread-" + screen); - t.setContextClassLoader(null); - Runtime.getRuntime().addShutdownHook(t); - return null; ---- jdk/src/solaris/classes/sun/net/PortConfig.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/solaris/classes/sun/net/PortConfig.java 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,89 @@ ++ RES="$?" ++ if [ ${RES} != 0 ]; then ++ echo 'FAIL: InheritIO$'${TEST_NAME}' failed with '${RES} ++ exit ${RES} ++ fi ++ ++ OUT_EXPECTED='message' ++ OUT_RECEIVED=`cat stdout.txt` ++ if [ "x${OUT_RECEIVED}" != "x${OUT_EXPECTED}" ]; then ++ echo "FAIL: unexpected '${OUT_RECEIVED}' in stdout" ++ exit 1 ++ fi ++ ++ ERR_EXPECTED='exit value: 0' ++ ERR_RECEIVED=`cat stderr.txt` ++ if [ "x${ERR_RECEIVED}" != "x${ERR_EXPECTED}" ]; then ++ echo "FAIL: unexpected '${ERR_RECEIVED}' in stderr" ++ exit 1 ++ fi ++done ++ ++echo 'PASS: InheritIO works as expected' +--- ./jdk/test/java/lang/ProcessBuilder/InheritIOEHandle.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/ProcessBuilder/InheritIOEHandle.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,147 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -56645,1366 +100774,1912 @@ + * questions. + */ + -+package sun.net; ++/** ++ * @test ++ * @bug 7147084 ++ * @run main/othervm InheritIOEHandle ++ * @summary inherit IOE handles and MS CreateProcess limitations (kb315939) ++ */ + -+import java.security.AccessController; ++import java.io.BufferedReader; ++import java.io.File; ++import java.io.IOException; ++import java.io.InputStreamReader; ++ ++public class InheritIOEHandle { ++ private static enum APP { ++ B, C; ++ } ++ private static File stopC = new File(".\\StopC.txt"); ++ private static String SIGNAL = "After call child process"; ++ private static String JAVA_EXE = System.getProperty("java.home") ++ + File.separator + "bin" ++ + File.separator + "java"; ++ ++ private static String[] getCommandArray(String processName) { ++ String[] cmdArray = { ++ JAVA_EXE, ++ "-cp", ++ System.getProperty("java.class.path"), ++ InheritIOEHandle.class.getName(), ++ processName ++ }; ++ return cmdArray; ++ } ++ ++ public static void main(String[] args) throws Exception { ++ if (!System.getProperty("os.name").startsWith("Windows")) { ++ return; ++ } ++ ++ if (args.length > 0) { ++ APP app = APP.valueOf(args[0]); ++ switch (app) { ++ case B: ++ performB(); ++ break; ++ case C: ++ performC(); ++ break; ++ } ++ return; ++ } ++ performA(); ++ } ++ ++ private static void performA() { ++ try { ++ stopC.delete(); ++ ++ ProcessBuilder builder = new ProcessBuilder( ++ getCommandArray(APP.B.name())); ++ builder.redirectErrorStream(true); ++ ++ Process process = builder.start(); ++ ++ process.getOutputStream().close(); ++ process.getErrorStream().close(); ++ ++ try (BufferedReader in = new BufferedReader( new InputStreamReader( ++ process.getInputStream(), "utf-8"))) ++ { ++ String result; ++ while ((result = in.readLine()) != null) { ++ if (!SIGNAL.equals(result)) { ++ throw new Error("Catastrophe in process B! Bad output."); ++ } ++ } ++ } ++ ++ // If JDK-7147084 is not fixed that point is unreachable. ++ ++ // write signal file ++ stopC.createNewFile(); ++ ++ System.err.println("Read stream finished."); ++ } catch (IOException ex) { ++ throw new Error("Catastrophe in process A!", ex); ++ } ++ } ++ ++ private static void performB() { ++ try { ++ ProcessBuilder builder = new ProcessBuilder( ++ getCommandArray(APP.C.name())); ++ ++ Process process = builder.start(); ++ ++ process.getInputStream().close(); ++ process.getOutputStream().close(); ++ process.getErrorStream().close(); ++ ++ System.out.println(SIGNAL); ++ ++ // JDK-7147084 subject: ++ // Process C inherits the [System.out] handle and ++ // handle close in B does not finalize the streaming for A. ++ // (handle reference count > 1). ++ } catch (IOException ex) { ++ throw new Error("Catastrophe in process B!", ex); ++ } ++ } ++ ++ private static void performC() { ++ // If JDK-7147084 is not fixed the loop is 5min long. ++ for (int i = 0; i < 5*60; ++i) { ++ try { ++ Thread.sleep(1000); ++ // check for sucess ++ if (stopC.exists()) ++ break; ++ } catch (InterruptedException ex) { ++ // that is ok. Longer sleep - better effect. ++ } ++ } ++ } ++} +--- ./jdk/test/java/lang/ProcessBuilder/SiblingIOEHandle.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/ProcessBuilder/SiblingIOEHandle.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,205 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + +/** -+ * Determines the ephemeral port range in use on this system. -+ * If this cannot be determined, then the default settings -+ * of the OS are returned. ++ * @test ++ * @bug 6921885 ++ * @run main/othervm SiblingIOEHandle ++ * @summary inherit IOE handles and MS CreateProcess limitations (kb315939) + */ + -+public final class PortConfig { ++import java.io.BufferedReader; ++import java.io.File; ++import java.io.IOException; ++import java.io.InputStreamReader; ++import java.util.concurrent.BrokenBarrierException; ++import java.util.concurrent.CyclicBarrier; + -+ private static int defaultUpper, defaultLower; -+ private final static int upper, lower; ++public class SiblingIOEHandle { ++ private static enum APP { ++ B, C; ++ } ++ private static File stopC = new File(".\\StopCs.txt"); ++ private static String SIGNAL = "B child reported."; ++ private static String JAVA_EXE = System.getProperty("java.home") ++ + File.separator + "bin" ++ + File.separator + "java"; ++ ++ private static String[] getCommandArray(String processName) { ++ String[] cmdArray = { ++ JAVA_EXE, ++ "-cp", ++ System.getProperty("java.class.path"), ++ SiblingIOEHandle.class.getName(), ++ processName ++ }; ++ return cmdArray; ++ } + -+ private PortConfig() {} ++ public static void main(String[] args) { ++ if (!System.getProperty("os.name").startsWith("Windows")) { ++ return; ++ } + -+ static { -+ AccessController.doPrivileged( -+ new java.security.PrivilegedAction() { -+ public Void run() { -+ System.loadLibrary("net"); -+ String os = System.getProperty("os.name"); -+ if (os.startsWith("Linux")) { -+ defaultLower = 32768; -+ defaultUpper = 61000; -+ } else if (os.startsWith("SunOS")) { -+ defaultLower = 32768; -+ defaultUpper = 65535; -+ } else if (os.contains("OS X") || os.endsWith("BSD")) { -+ defaultLower = 49152; -+ defaultUpper = 65535; -+ } else { -+ throw new InternalError( -+ "sun.net.PortConfig: unknown OS"); ++ if (args.length > 0) { ++ APP app = APP.valueOf(args[0]); ++ switch (app) { ++ case B: ++ performB(); ++ break; ++ case C: ++ performC(); ++ break; ++ } ++ return; ++ } ++ performA(true); ++ performA(false); ++ } ++ ++ static boolean procClaunched = false; ++ ++ private static void waitAbit() { ++ try { ++ Thread.sleep(0); ++ } catch (InterruptedException ex) { ++ // that was long enough ++ } ++ } ++ private static boolean waitBarrier(CyclicBarrier barrier) { ++ while (true) try { ++ barrier.await(); ++ return true; ++ } catch (InterruptedException ex) { ++ continue; ++ } catch (BrokenBarrierException ex) { ++ ex.printStackTrace(); ++ return false; ++ } ++ } ++ ++ private static void performA(boolean fileOut) { ++ try { ++ stopC.delete(); ++ ProcessBuilder builderB = new ProcessBuilder( ++ getCommandArray(APP.B.name())); ++ ++ File outB = null; ++ if (fileOut) { ++ outB = new File("outB.txt"); ++ builderB.redirectOutput(outB); ++ } ++ builderB.redirectErrorStream(true); ++ ++ final CyclicBarrier barrier = new CyclicBarrier(2); ++ Thread procCRunner = new Thread(new Runnable() { ++ @Override public void run() { ++ try { ++ if (waitBarrier(barrier)) { ++ waitAbit(); ++ // Run process C next to B ASAP to make an attempt ++ // to capture the B-process IOE handles in C process. ++ Runtime.getRuntime().exec(getCommandArray(APP.C.name())); ++ procClaunched = true; ++ } ++ } catch (IOException ex) { ++ ex.printStackTrace(); + } -+ return null; + } + }); ++ procCRunner.start(); + -+ int v = getLower0(); -+ if (v == -1) { -+ v = defaultLower; -+ } -+ lower = v; + -+ v = getUpper0(); -+ if (v == -1) { -+ v = defaultUpper; ++ if (!waitBarrier(barrier)) { ++ throw new Error("Catastrophe in process A! Synchronization failed."); ++ } ++ // Run process B first. ++ Process processB = builderB.start(); ++ ++ while (true) try { ++ procCRunner.join(); ++ break; ++ } catch (InterruptedException ex) { ++ continue; ++ } ++ ++ if (!procClaunched) { ++ throw new Error("Catastrophe in process A! C was not launched."); ++ } ++ ++ processB.getOutputStream().close(); ++ processB.getErrorStream().close(); ++ ++ if (fileOut) { ++ try { ++ processB.waitFor(); ++ } catch (InterruptedException ex) { ++ throw new Error("Catastrophe in process B! B hung up."); ++ } ++ System.err.println("Trying to delete [outB.txt]."); ++ if (!outB.delete()) { ++ throw new Error("Greedy brother C deadlock! File share."); ++ } ++ System.err.println("Succeeded in delete [outB.txt]."); ++ } else { ++ System.err.println("Read stream start."); ++ try (BufferedReader in = new BufferedReader( new InputStreamReader( ++ processB.getInputStream(), "utf-8"))) ++ { ++ String result; ++ while ((result = in.readLine()) != null) { ++ if (!SIGNAL.equals(result)) { ++ throw new Error("Catastrophe in process B! Bad output."); ++ } ++ } ++ } ++ System.err.println("Read stream finished."); ++ } ++ // If JDK-6921885 is not fixed that point is unreachable. ++ // Test timeout exception. ++ ++ // write signal file to stop C process. ++ stopC.createNewFile(); ++ } catch (IOException ex) { ++ throw new Error("Catastrophe in process A!", ex); + } -+ upper = v; + } + -+ static native int getLower0(); -+ static native int getUpper0(); -+ -+ public static int getLower() { -+ return lower; ++ private static void performB() { ++ System.out.println(SIGNAL); + } + -+ public static int getUpper() { -+ return upper; ++ private static void performC() { ++ // If JDK-7147084 is not fixed the loop is 5min long. ++ for (int i = 0; i < 5*60; ++i) { ++ try { ++ Thread.sleep(1000); ++ // check for sucess ++ if (stopC.exists()) ++ break; ++ } catch (InterruptedException ex) { ++ // that is ok. Longer sleep - better effect. ++ } ++ } + } +} ---- jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java 2014-04-28 17:39:02.000000000 -0700 -@@ -50,7 +50,7 @@ - return new SolarisAsynchronousChannelProvider(); - if (osname.equals("Linux")) - return new LinuxAsynchronousChannelProvider(); -- if (osname.contains("OS X")) -+ if (osname.contains("OS X") || osname.endsWith("BSD")) - return new BsdAsynchronousChannelProvider(); - throw new InternalError("platform not recognized"); - } ---- jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java 2014-04-20 12:39:22.000000000 -0700 -@@ -26,9 +26,11 @@ - package sun.nio.ch; - - import java.io.IOException; -+import java.security.AccessController; - import java.util.BitSet; - import java.util.Map; - import java.util.HashMap; -+import sun.security.action.GetIntegerAction; - - - /** -@@ -78,10 +80,11 @@ - static final int NUM_POLLFDS = Math.min(OPEN_MAX-1, 8192); - - // Initial size of arrays for fd registration changes -- private final int INITIAL_PENDING_UPDATE_SIZE = 64; -+ private static final int INITIAL_PENDING_UPDATE_SIZE = 64; - - // maximum size of updatesLow -- private final int MAX_UPDATE_ARRAY_SIZE = Math.min(OPEN_MAX, 64*1024); -+ private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged( -+ new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024))); - - // The pollfd array for results from devpoll driver - private final AllocatedNativeObject pollArray; ---- jdk/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java 2014-04-20 12:39:22.000000000 -0700 -@@ -26,9 +26,11 @@ - package sun.nio.ch; - - import java.io.IOException; -+import java.security.AccessController; - import java.util.BitSet; - import java.util.HashMap; - import java.util.Map; -+import sun.security.action.GetIntegerAction; - - /** - * Manipulates a native array of epoll_event structs on Linux: -@@ -78,8 +80,8 @@ - private static final int INITIAL_PENDING_UPDATE_SIZE = 64; - - // maximum size of updatesLow -- private static final int MAX_UPDATE_ARRAY_SIZE = Math.min(OPEN_MAX, 64*1024); -- -+ private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged( -+ new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024))); - - // The fd of the epoll driver - private final int epfd; -@@ -164,6 +166,16 @@ - } - - /** -+ * Returns {@code true} if updates for the given key (file -+ * descriptor) are killed. -+ */ -+ private boolean isEventsHighKilled(Integer key) { -+ assert key >= MAX_UPDATE_ARRAY_SIZE; -+ Byte value = eventsHigh.get(key); -+ return (value != null && value == KILLED); +--- ./jdk/test/java/lang/Runtime/exec/CloseRace.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/Runtime/exec/CloseRace.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,146 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8024521 ++ * @summary Closing ProcessPipeInputStream at the time the process exits is racy ++ * and leads to the data corruption. ++ * @library /lib/testlibrary ++ * @run main/othervm/timeout=80 CloseRace ++ */ ++ ++/** ++ * This test has a little chance to catch the race during the given default ++ * time gap of 20 seconds. To increase the time gap, set the system property ++ * CloseRaceTimeGap=N to the number of seconds. ++ * Jtreg's timeoutFactor should also be set appropriately. ++ * ++ * For example, to run the test for 10 minutes: ++ * > jtreg \ ++ * -testjdk:$(PATH_TO_TESTED_JDK) \ ++ * -timeoutFactor:10 \ ++ * -DCloseRaceTimeGap=600 \ ++ * $(PATH_TO_TESTED_JDK_SOURCE)/test/java/lang/Runtime/exec/CloseRace.java ++ */ ++ ++import java.io.*; ++import java.nio.file.Files; ++import java.nio.file.Path; ++import java.nio.file.Paths; ++import java.util.ArrayList; ++import java.util.Arrays; ++import java.util.LinkedList; ++import java.util.List; ++import jdk.testlibrary.OutputAnalyzer; ++import static jdk.testlibrary.ProcessTools.*; ++ ++public class CloseRace { ++ ++ public static void main(String args[]) throws Exception { ++ ProcessBuilder pb = createJavaProcessBuilder("-Xmx64M", "CloseRace$Child", ++ System.getProperty("CloseRaceTimeGap", "20")); ++ OutputAnalyzer oa = new OutputAnalyzer(pb.start()); ++ oa.stderrShouldNotContain("java.lang.OutOfMemoryError"); + } + -+ /** - * Sets the pending update events for the given file descriptor. This - * method has no effect if the update events is already set to KILLED, - * unless {@code force} is {@code true}. -@@ -175,7 +187,7 @@ - } - } else { - Integer key = Integer.valueOf(fd); -- if ((eventsHigh.get(key) != KILLED) || force) { -+ if (!isEventsHighKilled(key) || force) { - eventsHigh.put(key, Byte.valueOf(events)); - } - } ---- jdk/src/solaris/classes/sun/nio/ch/EventPortWrapper.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/ch/EventPortWrapper.java 2014-04-20 12:39:22.000000000 -0700 -@@ -25,9 +25,14 @@ - - package sun.nio.ch; - --import sun.misc.Unsafe; - import java.io.IOException; --import java.util.*; -+import java.security.AccessController; -+import java.util.BitSet; -+import java.util.HashMap; -+import java.util.Map; ++ public static class Child { ++ private static final String BIG_FILE = "bigfile"; ++ private static final String SMALL_FILE = "smallfile"; ++ private static int timeGap = 20; // seconds + -+import sun.misc.Unsafe; -+import sun.security.action.GetIntegerAction; - import static sun.nio.ch.SolarisEventPort.*; - - /** -@@ -49,7 +54,8 @@ - private final int INITIAL_PENDING_UPDATE_SIZE = 256; - - // maximum size of updateArray -- private final int MAX_UPDATE_ARRAY_SIZE = Math.min(OPEN_MAX, 64*1024); -+ private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged( -+ new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024))); - - // special update status to indicate that it should be ignored - private static final byte IGNORE = -1; ---- jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/ch/SctpChannelImpl.java 2014-04-20 12:39:22.000000000 -0700 -@@ -180,6 +180,10 @@ - SctpNet.throwAlreadyBoundException(); - InetSocketAddress isa = (local == null) ? - new InetSocketAddress(0) : Net.checkAddress(local); -+ SecurityManager sm = System.getSecurityManager(); -+ if (sm != null) { -+ sm.checkListen(isa.getPort()); ++ public static void main(String args[]) throws Exception { ++ if (args.length > 0) { ++ try { ++ timeGap = Integer.parseInt(args[0]); ++ timeGap = Math.max(timeGap, 10); ++ timeGap = Math.min(timeGap, 10 * 60 * 60); // no more than 10 hours ++ } catch (NumberFormatException ignore) {} ++ } ++ try (RandomAccessFile f = new RandomAccessFile(BIG_FILE, "rw")) { ++ f.setLength(1024 * 1024 * 1024); // 1 Gb, greater than max heap size ++ } ++ try (FileOutputStream fs = new FileOutputStream(SMALL_FILE); ++ PrintStream ps = new PrintStream(fs)) { ++ for (int i = 0; i < 128; ++i) ++ ps.println("line of text"); ++ } ++ ++ List threads = new LinkedList<>(); ++ for (int i = 0; i < 99; ++i) { ++ Thread t = new Thread (new OpenLoop()); ++ t.start(); ++ threads.add(t); ++ } ++ Thread t2 = new Thread (new ExecLoop()); ++ t2.start(); ++ threads.add(t2); ++ ++ Thread.sleep(timeGap); ++ ++ for (Thread t : threads) { ++ t.interrupt(); ++ t.join(); ++ } ++ } ++ ++ private static class OpenLoop implements Runnable { ++ public void run() { ++ final Path bigFilePath = Paths.get(BIG_FILE); ++ while (!Thread.interrupted()) { ++ try (InputStream in = Files.newInputStream(bigFilePath)) { ++ // Widen the race window by sleeping 1ms ++ Thread.sleep(1); ++ } catch (InterruptedException e) { ++ break; ++ } catch (Exception e) { ++ System.err.println(e); + } - Net.bind(fd, isa.getAddress(), isa.getPort()); - InetSocketAddress boundIsa = Net.localAddress(fd); - port = boundIsa.getPort(); ---- jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2014-04-20 12:39:22.000000000 -0700 -@@ -70,6 +70,8 @@ - return createProvider("sun.nio.fs.LinuxFileSystemProvider"); - if (osname.equals("Darwin") || osname.contains("OS X")) - return createProvider("sun.nio.fs.MacOSXFileSystemProvider"); -+ if (osname.endsWith("BSD")) -+ return createProvider("sun.nio.fs.BsdFileSystemProvider"); - throw new AssertionError("Platform not recognized"); - } - } ---- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2013-09-06 11:29:08.000000000 -0700 -+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2014-04-20 12:39:22.000000000 -0700 -@@ -129,6 +129,7 @@ - - static boolean isBSD() { - return (osname.equals("Linux") || -+ osname.endsWith("BSD") || - osname.contains("OS X")); - } - ---- jdk/src/solaris/demo/jni/Poller/Poller.c 2013-09-06 11:29:09.000000000 -0700 -+++ jdk/src/solaris/demo/jni/Poller/Poller.c 2014-04-20 12:39:22.000000000 -0700 -@@ -318,7 +318,7 @@ - - ioevent_t *ioeh; - -- if (handle < 0 || handle > MAX_HANDLES) -+ if (handle < 0 || handle >= MAX_HANDLES) - { - STATE_EXCEPTION("DestroyPoller - handle out of range"); - return; -@@ -366,7 +366,7 @@ - int retval; - ioevent_t *ioeh; - -- if (handle < 0 || handle > MAX_HANDLES) -+ if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("AddFd - handle out of range"); - - ioeh = &IOE_handles[handle]; -@@ -459,7 +459,7 @@ - return fd; - } - -- /* -+/* - * Class: Poller - * Method: nativeRemoveFd - * Signature: (II)I -@@ -469,7 +469,7 @@ - { - ioevent_t *ioeh; - -- if (handle < 0 || handle > MAX_HANDLES) -+ if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("RemoveFd - handle out of range"); - - ioeh = &IOE_handles[handle]; -@@ -576,7 +576,7 @@ - int i; - ioevent_t *ioeh; - -- if (handle < 0 || handle > MAX_HANDLES) -+ if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("IsMember - handle out of range"); - - ioeh = &IOE_handles[handle]; -@@ -629,7 +629,7 @@ - ioevent_t *ioeh; - jboolean isCopy1,isCopy2; - -- if (handle < 0 || handle > MAX_HANDLES) -+ if (handle < 0 || handle >= MAX_HANDLES) - return STATE_EXCEPTION("nativeWait - handle out of range"); - - ioeh = &IOE_handles[handle]; ---- jdk/src/solaris/javavm/export/jvm_md.h 2013-09-06 11:29:09.000000000 -0700 -+++ jdk/src/solaris/javavm/export/jvm_md.h 2014-04-20 12:39:22.000000000 -0700 -@@ -75,7 +75,11 @@ - #define JVM_O_O_APPEND O_APPEND - #define JVM_O_EXCL O_EXCL - #define JVM_O_CREAT O_CREAT -+#if !defined(__APPLE__) && defined(_ALLBSD_SOURCE) -+#define JVM_O_DELETE 0x10000000 -+#else - #define JVM_O_DELETE 0x10000 -+#endif - - /* Signals */ - ---- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2013-09-06 11:29:09.000000000 -0700 -+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -168,6 +168,9 @@ - /* - * XXXBSD: there's no way available to get swap info in - * FreeBSD. Usage of libkvm is not an option here -+ * -+ * XXX: Investigate how swapinfo(8) does this. -+ * Total swap is in vm.swap_total - */ - // throw_internal_error(env, "Unimplemented in FreeBSD"); - return (0); -@@ -242,6 +245,8 @@ - #else /* _ALLBSD_SOURCE */ - /* - * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. -+ * -+ * XXX: Determine how linprocfs gets this. - */ - // throw_internal_error(env, "Unimplemented in FreeBSD"); - return (64 * MB); -@@ -323,6 +328,8 @@ - #elif defined(_ALLBSD_SOURCE) - /* - * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. -+ * -+ * XXX: Investigate how top(8) gets this on FreeBSD. - */ - // throw_internal_error(env, "Unimplemented in FreeBSD"); - return (128 * MB); -@@ -342,7 +349,11 @@ - size_t rlen; ++ } ++ } ++ } ++ ++ private static class ExecLoop implements Runnable { ++ public void run() { ++ List command = new ArrayList<>( ++ Arrays.asList("/bin/cat", SMALL_FILE)); ++ while (!Thread.interrupted()) { ++ try { ++ ProcessBuilder builder = new ProcessBuilder(command); ++ final Process process = builder.start(); ++ InputStream is = process.getInputStream(); ++ InputStreamReader isr = new InputStreamReader(is); ++ BufferedReader br = new BufferedReader(isr); ++ while (br.readLine() != null) {} ++ process.waitFor(); ++ isr.close(); ++ } catch (InterruptedException e) { ++ break; ++ } catch (Exception e) { ++ System.err.println(e); ++ } ++ } ++ } ++ } ++ } ++} +--- ./jdk/test/java/lang/SecurityManager/CheckPackageAccess.java 2013-09-06 11:29:33.000000000 -0700 ++++ ./jdk/test/java/lang/SecurityManager/CheckPackageAccess.java 2014-06-06 19:56:33.000000000 -0700 +@@ -23,7 +23,7 @@ - mib[0] = CTL_HW; -+#ifdef __APPLE__ - mib[1] = HW_MEMSIZE; -+#else -+ mib[1] = HW_PHYSMEM; -+#endif - rlen = sizeof(result); - if (sysctl(mib, 2, &result, &rlen, NULL, 0) != 0) { - throw_internal_error(env, "sysctl failed"); -@@ -408,6 +419,8 @@ - #elif defined(_ALLBSD_SOURCE) - /* - * XXXBSD: there's no way available to do it in FreeBSD, AFAIK. -+ * -+ * XXX: Investigate getting this on FreeBSD. Look at lsof. - */ - // throw_internal_error(env, "Unimplemented in FreeBSD"); - return (100); ---- jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_Utils.c 2014-04-20 12:39:22.000000000 -0700 -@@ -76,7 +76,7 @@ - adPath[*count].st_ino = statBuf.st_ino; - adPath[*count].st_dev = statBuf.st_dev; - strncpy(adPath[*count].path, path, MAX_NAME_LENGTH); -- adPath[*count].path[MAX_NAME_LENGTH] = 0; -+ adPath[*count].path[MAX_NAME_LENGTH - 1] = 0; - (*count)++; - TRACE1("Added audio device %s\n", path); - } ---- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -151,7 +151,6 @@ - return rv; - } + /* + * @test +- * @bug 6741606 7146431 8000450 ++ * @bug 6741606 7146431 8000450 8022945 + * @summary Make sure all restricted packages listed in the package.access + * property in the java.security file are blocked + * @run main/othervm CheckPackageAccess +@@ -54,7 +54,9 @@ + "com.sun.imageio.", + "com.sun.istack.internal.", + "com.sun.jmx.", ++ "com.sun.naming.internal.", + "com.sun.proxy.", ++ "com.sun.corba.se.", + "com.sun.org.apache.bcel.internal.", + "com.sun.org.apache.regexp.internal.", + "com.sun.org.apache.xerces.internal.", +@@ -74,6 +76,7 @@ + "com.sun.org.apache.xml.internal.serializer.utils.", + "com.sun.org.apache.xml.internal.utils.", + "com.sun.org.glassfish.", ++ "com.sun.script.", + "oracle.jrockit.jfr.", + "org.jcp.xml.dsig.internal.", + }; +--- ./jdk/test/java/lang/String/ToLowerCase.java 2013-09-06 11:29:33.000000000 -0700 ++++ ./jdk/test/java/lang/String/ToLowerCase.java 2014-06-06 19:56:33.000000000 -0700 +@@ -23,7 +23,7 @@ -- - JNIEXPORT jboolean JNICALL - Java_java_io_UnixFileSystem_setPermission(JNIEnv *env, jobject this, - jobject file, ---- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -31,21 +31,24 @@ - #ifdef __APPLE__ - #include - #define environ (*_NSGetEnviron()) -+#else -+/* This is one of the rare times it's more portable to declare an -+ * external symbol explicitly, rather than via a system header. -+ * The declaration is standardized as part of UNIX98, but there is -+ * no standard (not even de-facto) header file where the -+ * declaration is to be found. See: -+ * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html -+ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html + /* + @test +- @bug 4217441 4533872 4900935 ++ @bug 4217441 4533872 4900935 8020037 + @summary toLowerCase should lower-case Greek Sigma correctly depending + on the context (final/non-final). Also it should handle + Locale specific (lt, tr, and az) lowercasings and supplementary +@@ -69,10 +69,11 @@ + test("\u00CD", Locale.US, "\u00ED"); + test("\u0128", Locale.US, "\u0129"); + +- // I-dot tests (Turkish and Azeri) ++ // I-dot tests + test("\u0130", turkish, "i"); + test("\u0130", az, "i"); +- test("\u0130", Locale.US, "i\u0307"); ++ test("\u0130", lt, "i"); ++ test("\u0130", Locale.US, "i"); + + // Remove dot_above in the sequence I + dot_above (Turkish and Azeri) + test("I\u0307", turkish, "i"); +--- ./jdk/test/java/lang/StringCoding/CheckEncodings.sh 2013-09-06 11:29:33.000000000 -0700 ++++ ./jdk/test/java/lang/StringCoding/CheckEncodings.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -30,7 +30,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin) ;; ++ SunOS | Linux | *BSD | Darwin) ;; + Windows* | CYGWIN* ) + echo "Passed"; exit 0 ;; + * ) echo "Unrecognized system!" ; exit 1 ;; +--- ./jdk/test/java/lang/System/MacEncoding/ExpectedEncoding.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/System/MacEncoding/ExpectedEncoding.java 2014-06-06 19:56:33.000000000 -0700 +@@ -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. + * -+ * "All identifiers in this volume of IEEE Std 1003.1-2001, except -+ * environ, are defined in at least one of the headers" (!) ++ * 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. + */ -+extern char **environ; - #endif - - JNIEXPORT jobjectArray JNICALL - Java_java_lang_ProcessEnvironment_environ(JNIEnv *env, jclass ign) - { -- /* This is one of the rare times it's more portable to declare an -- * external symbol explicitly, rather than via a system header. -- * The declaration is standardized as part of UNIX98, but there is -- * no standard (not even de-facto) header file where the -- * declaration is to be found. See: -- * http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html */ --#ifndef __APPLE__ -- extern char ** environ; /* environ[i] looks like: VAR=VALUE\0 */ --#endif -- - jsize count = 0; - jsize i, j; - jobjectArray result; -@@ -53,7 +56,7 @@ - - for (i = 0; environ[i]; i++) { - /* Ignore corrupted environment variables */ -- if (strchr(environ[i], '=') != NULL) -+ if (strchr(environ[i], '=') != NULL && *environ[i] != '=') - count++; - } - -@@ -63,7 +66,7 @@ - for (i = 0, j = 0; environ[i]; i++) { - const char * varEnd = strchr(environ[i], '='); - /* Ignore corrupted environment variables */ -- if (varEnd != NULL) { -+ if (varEnd != NULL && varEnd != environ[i]) { - jbyteArray var, val; - const char * valBeg = varEnd + 1; - jsize varLength = varEnd - environ[i]; ---- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -47,19 +47,15 @@ - #endif - #include - #include --#include --#include --#include --#include --#include -- --#ifdef __APPLE__ --#include --#define environ (*_NSGetEnviron()) + -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) -+#include - #endif - -+#include "childproc.h" ++/** ++ * Check that the value of file.encoding and sun.jnu.encoding match the expected ++ * values passed in on the command-line. ++ */ ++public class ExpectedEncoding { ++ public static void main(String[] args) { ++ boolean failed = false; ++ if (args.length != 2) { ++ System.out.println("Usage:"); ++ System.out.println("$ java ExpectedEncoding "); ++ System.out.println("$ use \"skip\" to skip checking property's value"); ++ System.exit(1); ++ } ++ String expectFileEnc = args[0]; ++ String expectSunJnuEnc = args[1]; + - /* -- * There are 3 possible strategies we might use to "fork": -+ * There are 4 possible strategies we might use to "fork": - * - * - fork(2). Very portable and reliable but subject to - * failure due to overcommit (see the documentation on -@@ -94,80 +90,20 @@ - * http://sources.redhat.com/bugzilla/show_bug.cgi?id=10311 - * but the glibc maintainers closed it as WONTFIX. - * -- * Based on the above analysis, we are currently using vfork() on -- * Linux and fork() on other Unix systems, but the code to use clone() -- * remains. -- */ -- --#define START_CHILD_USE_CLONE 0 /* clone() currently disabled; see above. */ -- --#ifndef START_CHILD_USE_CLONE -- #ifdef __linux__ -- #define START_CHILD_USE_CLONE 1 -- #else -- #define START_CHILD_USE_CLONE 0 -- #endif --#endif -- --/* By default, use vfork() on Linux. */ --#ifndef START_CHILD_USE_VFORK -- #ifdef __linux__ -- #define START_CHILD_USE_VFORK 1 -- #else -- #define START_CHILD_USE_VFORK 0 -- #endif --#endif -- --#if START_CHILD_USE_CLONE --#include --#define START_CHILD_SYSTEM_CALL "clone" --#elif START_CHILD_USE_VFORK --#define START_CHILD_SYSTEM_CALL "vfork" --#else --#define START_CHILD_SYSTEM_CALL "fork" --#endif -- --#ifndef STDIN_FILENO --#define STDIN_FILENO 0 --#endif -- --#ifndef STDOUT_FILENO --#define STDOUT_FILENO 1 --#endif -- --#ifndef STDERR_FILENO --#define STDERR_FILENO 2 --#endif -- --#ifndef SA_NOCLDSTOP --#define SA_NOCLDSTOP 0 --#endif -- --#ifndef SA_RESTART --#define SA_RESTART 0 --#endif -- --#define FAIL_FILENO (STDERR_FILENO + 1) -- --/* TODO: Refactor. */ --#define RESTARTABLE(_cmd, _result) do { \ -- do { \ -- _result = _cmd; \ -- } while((_result == -1) && (errno == EINTR)); \ --} while(0) -- --/* This is one of the rare times it's more portable to declare an -- * external symbol explicitly, rather than via a system header. -- * The declaration is standardized as part of UNIX98, but there is -- * no standard (not even de-facto) header file where the -- * declaration is to be found. See: -- * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html -- * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html -+ * - posix_spawn(). While posix_spawn() is a fairly elaborate and -+ * complicated system call, it can't quite do everything that the old -+ * fork()/exec() combination can do, so the only feasible way to do -+ * this, is to use posix_spawn to launch a new helper executable -+ * "jprochelper", which in turn execs the target (after cleaning -+ * up file-descriptors etc.) The end result is the same as before, -+ * a child process linked to the parent in the same way, but it -+ * avoids the problem of duplicating the parent (VM) process -+ * address space temporarily, before launching the target command. - * -- * "All identifiers in this volume of IEEE Std 1003.1-2001, except -- * environ, are defined in at least one of the headers" (!) -+ * Based on the above analysis, we are currently using vfork() on -+ * Linux, posix_spawn() on Mac and fork() on Solaris, but the code to -+ * use clone() and fork() remains. - */ --extern char **environ; - - - static void -@@ -245,53 +181,35 @@ - } - - static const char * const * --splitPath(JNIEnv *env, const char *path) -+effectivePathv(JNIEnv *env) - { -- const char *p, *q; -- char **pathv; -+ char *p; - int i; -+ const char *path = effectivePath(); - int count = countOccurrences(path, ':') + 1; -- -- pathv = NEW(char*, count+1); -- pathv[count] = NULL; -- for (p = path, i = 0; i < count; i++, p = q + 1) { -- for (q = p; (*q != ':') && (*q != '\0'); q++) -- ; -- if (q == p) /* empty PATH component => "." */ -- pathv[i] = "./"; -- else { -- int addSlash = ((*(q - 1)) != '/'); -- pathv[i] = NEW(char, q - p + addSlash + 1); -- memcpy(pathv[i], p, q - p); -- if (addSlash) -- pathv[i][q - p] = '/'; -- pathv[i][q - p + addSlash] = '\0'; -- } -+ size_t pathvsize = sizeof(const char *) * (count+1); -+ size_t pathsize = strlen(path) + 1; -+ const char **pathv = (const char **) xmalloc(env, pathvsize + pathsize); ++ String fileEnc = System.getProperty("file.encoding"); ++ String jnuEnc = System.getProperty("sun.jnu.encoding"); + -+ if (pathv == NULL) -+ return NULL; -+ p = (char *) pathv + pathvsize; -+ memcpy(p, path, pathsize); -+ /* split PATH by replacing ':' with NULs; empty components => "." */ -+ for (i = 0; i < count; i++) { -+ char *q = p + strcspn(p, ":"); -+ pathv[i] = (p == q) ? "." : p; -+ *q = '\0'; -+ p = q + 1; - } -- return (const char * const *) pathv; -+ pathv[count] = NULL; -+ return pathv; - } - --/** -- * Cached value of JVM's effective PATH. -- * (We don't support putenv("PATH=...") in native code) -- */ --static const char *parentPath; -- --/** -- * Split, canonicalized version of parentPath -- */ --static const char * const *parentPathv; -- --static jfieldID field_exitcode; -- - JNIEXPORT void JNICALL --Java_java_lang_UNIXProcess_initIDs(JNIEnv *env, jclass clazz) -+Java_java_lang_UNIXProcess_init(JNIEnv *env, jclass clazz) - { -- field_exitcode = (*env)->GetFieldID(env, clazz, "exitcode", "I"); -- -- parentPath = effectivePath(); -- parentPathv = splitPath(env, parentPath); -- -+ parentPathv = effectivePathv(env); - setSIGCHLDHandler(env); - } - -@@ -358,96 +276,6 @@ - } - } - --static ssize_t --restartableWrite(int fd, const void *buf, size_t count) --{ -- ssize_t result; -- RESTARTABLE(write(fd, buf, count), result); -- return result; --} -- --static int --restartableDup2(int fd_from, int fd_to) --{ -- int err; -- RESTARTABLE(dup2(fd_from, fd_to), err); -- return err; --} -- --static int --restartableClose(int fd) --{ -- int err; -- RESTARTABLE(close(fd), err); -- return err; --} -- --static int --closeSafely(int fd) --{ -- return (fd == -1) ? 0 : restartableClose(fd); --} -- --static int --isAsciiDigit(char c) --{ -- return c >= '0' && c <= '9'; --} -- --#ifdef _ALLBSD_SOURCE --#define FD_DIR "/dev/fd" --#define dirent64 dirent --#define readdir64 readdir --#else --#define FD_DIR "/proc/self/fd" --#endif -- --static int --closeDescriptors(void) --{ -- DIR *dp; -- struct dirent64 *dirp; -- int from_fd = FAIL_FILENO + 1; -- -- /* We're trying to close all file descriptors, but opendir() might -- * itself be implemented using a file descriptor, and we certainly -- * don't want to close that while it's in use. We assume that if -- * opendir() is implemented using a file descriptor, then it uses -- * the lowest numbered file descriptor, just like open(). So we -- * close a couple explicitly. */ -- -- restartableClose(from_fd); /* for possible use by opendir() */ -- restartableClose(from_fd + 1); /* another one for good luck */ -- -- if ((dp = opendir(FD_DIR)) == NULL) -- return 0; -- -- /* We use readdir64 instead of readdir to work around Solaris bug -- * 6395699: /proc/self/fd fails to report file descriptors >= 1024 on Solaris 9 -- */ -- while ((dirp = readdir64(dp)) != NULL) { -- int fd; -- if (isAsciiDigit(dirp->d_name[0]) && -- (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) -- restartableClose(fd); -- } -- -- closedir(dp); -- -- return 1; --} -- --static int --moveDescriptor(int fd_from, int fd_to) --{ -- if (fd_from != fd_to) { -- if ((restartableDup2(fd_from, fd_to) == -1) || -- (restartableClose(fd_from) == -1)) -- return -1; -- } -- return 0; --} -- - static const char * - getBytes(JNIEnv *env, jbyteArray arr) - { -@@ -463,19 +291,6 @@ - } - - static void --initVectorFromBlock(const char**vector, const char* block, int count) --{ -- int i; -- const char *p; -- for (i = 0, p = block; i < count; i++) { -- /* Invariant: p always points to the start of a C string. */ -- vector[i] = p; -- while (*(p++)); -- } -- vector[count] = NULL; --} -- --static void - throwIOException(JNIEnv *env, int errnum, const char *defaultDetail) - { - static const char * const format = "error=%d, %s"; -@@ -490,6 +305,9 @@ - } - /* ASCII Decimal representation uses 2.4 times as many bits as binary. */ - errmsg = NEW(char, strlen(format) + strlen(detail) + 3 * sizeof(errnum)); -+ if (errmsg == NULL) -+ return; ++ if ("skip".equals(expectFileEnc)) { ++ System.err.println("Expected file.encoding is \"skip\", ignoring"); ++ } else { ++ System.err.println("Expected file.encoding: " + expectFileEnc); ++ System.err.println("Actual file.encoding: " + fileEnc); ++ if (fileEnc == null || !fileEnc.equals(expectFileEnc)) { ++ failed = true; ++ } ++ } ++ if ("skip".equals(expectSunJnuEnc)) { ++ System.err.println("Expected sun.jnu.encoding is \"skip\", ignoring"); ++ } else { ++ if (jnuEnc == null || !jnuEnc.equals(expectSunJnuEnc)) { ++ System.err.println("Expected sun.jnu.encoding: " + expectSunJnuEnc); ++ System.err.println("Actual sun.jnu.encoding: " + jnuEnc); ++ failed = true; ++ } ++ } ++ ++ if (failed) { ++ throw new RuntimeException("Test Failed"); ++ } ++ } ++} +--- ./jdk/test/java/lang/System/MacEncoding/MacJNUEncoding.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/System/MacEncoding/MacJNUEncoding.sh 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,96 @@ ++#!/bin/sh ++ ++# ++# 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 8003228 ++# @summary Test the value of sun.jnu.encoding on Mac ++# @author Brent Christian ++# ++# @run shell MacJNUEncoding.sh ++ ++# Only run test on Mac ++OS=`uname -s` ++case "$OS" in ++ Darwin ) ;; ++ * ) ++ exit 0 ++ ;; ++esac ++ ++if [ "${TESTJAVA}" = "" ] ++then ++ echo "TESTJAVA not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++if [ "${TESTSRC}" = "" ] ++then ++ echo "TESTSRC not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++if [ "${TESTCLASSES}" = "" ] ++then ++ echo "TESTCLASSES not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++JAVAC="${TESTJAVA}"/bin/javac ++JAVA="${TESTJAVA}"/bin/java ++ ++echo "Building test classes..." ++"$JAVAC" -d "${TESTCLASSES}" "${TESTSRC}"/ExpectedEncoding.java ++ ++echo "" ++echo "Running test for C locale" ++export LANG=C ++export LC_ALL=C ++"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding US-ASCII UTF-8 ++result1=$? ++ ++echo "" ++echo "Running test for en_US.UTF-8 locale" ++export LANG=en_US.UTF-8 ++export LC_ALL=en_US.UTF-8 ++"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding UTF-8 UTF-8 ++result2=$? ++ ++echo "" ++echo "Cleanup" ++rm ${TESTCLASSES}/ExpectedEncoding.class ++ ++if [ ${result1} -ne 0 ] ; then ++ echo "Test failed for C locale" ++ echo " LANG=\"${LANG}\"" ++ echo " LC_ALL=\"${LC_ALL}\"" ++ exit ${result1} ++fi ++if [ ${result2} -ne 0 ] ; then ++ echo "Test failed for en_US.UTF-8 locale" ++ echo " LANG=\"${LANG}\"" ++ echo " LC_ALL=\"${LC_ALL}\"" ++ exit ${result2} ++fi ++exit 0 ++ +--- ./jdk/test/java/lang/System/MacEncoding/TestFileEncoding.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/System/MacEncoding/TestFileEncoding.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,168 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import java.util.*; ++ ++/* ++ * @test ++ * @bug 8011194 ++ * @summary Test value of file.encoding for corresponding value of LANG, etc ++ * @library ../../../../tools/launcher/ ../ ++ * @build TestHelper TestFileEncoding ExpectedEncoding ++ * @run main TestFileEncoding UTF-8 ++ * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding ++ * @run main TestFileEncoding UTF-8 en_US.UTF-8 ++ * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding en_US.UTF-8 ++ * @run main TestFileEncoding US-ASCII C ++ * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding C ++ * @author Brent Christian ++ */ ++ ++/** ++ * Setup the environment and run a sub-test to check the expected value of ++ * file.encoding, based on the value(s) of encoding-related environment vars ++ * (LANG, LC_ALL, LC_CTYPE). ++ * ++ * The first argument (required) is the expected value of the ++ * file.encoding System property. ++ * The second argument (optional) is the value to set to the LANG/etc env vars. ++ */ ++public class TestFileEncoding { ++ private static final String TEST_NAME = "ExpectedEncoding"; + - sprintf(errmsg, format, errnum, detail); - s = JNU_NewStringPlatform(env, errmsg); - if (s != NULL) { -@@ -515,278 +333,74 @@ - } - #endif /* DEBUG_PROCESS */ - --/** -- * Exec FILE as a traditional Bourne shell script (i.e. one without #!). -- * If we could do it over again, we would probably not support such an ancient -- * misfeature, but compatibility wins over sanity. The original support for -- * this was imported accidentally from execvp(). ++ private String expectedEncoding; // Expected value for file.encoding ++ private String langVar = null; // Value to set for LANG, etc ++ ++ private static Set envToRm = new HashSet<>(3); ++ static { ++ // Take these vars out of the test's run environment, possibly adding ++ // our own value back in. ++ envToRm.add("LANG"); ++ envToRm.add("LC_ALL"); ++ envToRm.add("LC_CTYPE"); ++ } ++ ++ public TestFileEncoding(String expectedEncoding) { ++ this.expectedEncoding = expectedEncoding; ++ } ++ ++ public TestFileEncoding(String expectedEncoding, String langVar) { ++ this.expectedEncoding = expectedEncoding; ++ this.langVar = langVar; ++ } ++ ++ /* ++ * Launch ExpectedEncoding with the given parameters, check for the ++ * expected file.encoding. ++ */ ++ private void run() { ++ String testClasses = System.getProperty("test.classes"); ++ ++ // Pick up VM opts ++ String vmOptsStr = System.getProperty("test.vm.opts"); ++ System.out.println("test.vm.opts: " + vmOptsStr); ++ String[] vmOpts = new String[0]; ++ if (vmOptsStr != null && !"".equals(vmOptsStr)) { ++ vmOpts = vmOptsStr.split(" "); ++ System.out.println("found vm options:"); ++ for (String opt : vmOpts) { ++ System.out.println(" <" + opt + ">"); ++ } ++ } ++ ++ // Build java cmd ++ LinkedList cmdList = new LinkedList<>(); ++ cmdList.add(TestHelper.javaCmd); ++ for (String vmOpt : vmOpts) { ++ if (vmOpt != null && !vmOpt.equals("")) { ++ cmdList.add(vmOpt); ++ } ++ } ++ ++ // See if the user specified a file.encoding that we should pass through ++ String userEncoding = System.getProperty("userEncoding"); ++ if (userEncoding != null) { ++ cmdList.add("-Dfile.encoding="+userEncoding); ++ } ++ ++ cmdList.add("-cp"); ++ cmdList.add(testClasses); ++ cmdList.add(TEST_NAME); ++ cmdList.add(expectedEncoding); ++ cmdList.add("skip"); // ignore sun.jnu.encoding for this test ++ ++ String cmdArray[] = new String[cmdList.size()]; ++ cmdList.toArray(cmdArray); ++ ++ // Run the test(s) ++ if (langVar == null) { ++ System.out.println("TestFileEncoding: Running with no envvars set"); ++ TestHelper.TestResult tr = TestHelper.doExec(null, envToRm, ++ cmdArray); ++ checkResult(tr); ++ } else { ++ runWithEnvVar("LANG", cmdArray); ++ runWithEnvVar("LC_ALL", cmdArray); ++ runWithEnvVar("LC_CTYPE", cmdArray); ++ } ++ } ++ ++ /* ++ * Run the test, setting the environment named by envVarName to the value ++ * in langVar. ++ */ ++ private void runWithEnvVar(String envVarName, String[] cmdArray) { ++ Map envToAdd = new HashMap<>(1); ++ TestHelper.TestResult tr = null; ++ ++ System.out.println("TestFileEncoding: Running with " + envVarName + "=" + langVar); ++ envToAdd.put(envVarName, langVar); ++ tr = TestHelper.doExec(envToAdd, envToRm, cmdArray); ++ checkResult(tr); ++ } ++ ++ private void checkResult(TestHelper.TestResult tr) { ++ System.out.println(tr); ++ if (!tr.isOK()) { ++ throw new RuntimeException("TEST FAILED: !tr.isOK()"); ++ } ++ } ++ ++ public static void main(String[] args) { ++ TestFileEncoding cfe = null; ++ if (!TestHelper.isMacOSX) { ++ System.out.println("Test is currently only for Mac OS X - pass."); ++ return; ++ } ++ if (args.length == 1) { ++ cfe = new TestFileEncoding(args[0]); ++ } else if (args.length == 2) { ++ cfe = new TestFileEncoding(args[0], args[1]); ++ } else { ++ System.out.println("Usage: TestFileEncoding "); ++ System.out.println(" TestFileEncoding "); ++ return; ++ } ++ cfe.run(); ++ } ++} +--- ./jdk/test/java/lang/System/MacJNUEncoding/ExpectedEncoding.java 2013-09-06 11:29:33.000000000 -0700 ++++ ./jdk/test/java/lang/System/MacJNUEncoding/ExpectedEncoding.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,56 +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. - */ - static void --execve_as_traditional_shell_script(const char *file, -- const char *argv[], -- const char *const envp[]) --{ -- /* Use the extra word of space provided for us in argv by caller. */ -- const char *argv0 = argv[0]; -- const char *const *end = argv; -- while (*end != NULL) -- ++end; -- memmove(argv+2, argv+1, (end-argv) * sizeof (*end)); -- argv[0] = "/bin/sh"; -- argv[1] = file; -- execve(argv[0], (char **) argv, (char **) envp); -- /* Can't even exec /bin/sh? Big trouble, but let's soldier on... */ -- memmove(argv+1, argv+2, (end-argv) * sizeof (*end)); -- argv[0] = argv0; --} - -/** -- * Like execve(2), except that in case of ENOEXEC, FILE is assumed to -- * be a shell script and the system default shell is invoked to run it. -- */ --static void --execve_with_shell_fallback(const char *file, -- const char *argv[], -- const char *const envp[]) --{ --#if START_CHILD_USE_CLONE || START_CHILD_USE_VFORK -- /* shared address space; be very careful. */ -- execve(file, (char **) argv, (char **) envp); -- if (errno == ENOEXEC) -- execve_as_traditional_shell_script(file, argv, envp); --#else -- /* unshared address space; we can mutate environ. */ -- environ = (char **) envp; -- execvp(file, (char **) argv); --#endif -+copyPipe(int from[2], int to[2]) -+{ -+ to[0] = from[0]; -+ to[1] = from[1]; - } - --/** -- * 'execvpe' should have been included in the Unix standards, -- * and is a GNU extension in glibc 2.10. -+/* arg is an array of pointers to 0 terminated strings. array is terminated -+ * by a null element. - * -- * JDK_execvpe is identical to execvp, except that the child environment is -- * specified via the 3rd argument instead of being inherited from environ. +- * Check that the value of file.encoding and sun.jnu.encoding match the expected +- * values passed in on the command-line. - */ --static void --JDK_execvpe(const char *file, -- const char *argv[], -- const char *const envp[]) --{ -- if (envp == NULL || (char **) envp == environ) { -- execvp(file, (char **) argv); -+ * *nelems and *nbytes receive the number of elements of array (incl 0) -+ * and total number of bytes (incl. 0) -+ * Note. An empty array will have one null element -+ * But if arg is null, then *nelems set to 0, and *nbytes to 0 -+ */ -+static void arraysize(const char * const *arg, int *nelems, int *nbytes) -+{ -+ int i, bytes, count; -+ const char * const *a = arg; -+ char *p; -+ int *q; -+ if (arg == 0) { -+ *nelems = 0; -+ *nbytes = 0; - return; - } +-public class ExpectedEncoding { +- public static void main(String[] args) { +- boolean failed = false; +- if (args.length != 2) { +- System.out.println("Usage:"); +- System.out.println("$ java ExpectedEncoding "); +- System.exit(1); +- } +- String expectFileEnc = args[0]; +- String expectSunJnuEnc = args[1]; - -- if (*file == '\0') { -- errno = ENOENT; -- return; -- } +- String fileEnc = System.getProperty("file.encoding"); +- String jnuEnc = System.getProperty("sun.jnu.encoding"); - -- if (strchr(file, '/') != NULL) { -- execve_with_shell_fallback(file, argv, envp); -- } else { -- /* We must search PATH (parent's, not child's) */ -- char expanded_file[PATH_MAX]; -- int filelen = strlen(file); -- int sticky_errno = 0; -- const char * const * dirs; -- for (dirs = parentPathv; *dirs; dirs++) { -- const char * dir = *dirs; -- int dirlen = strlen(dir); -- if (filelen + dirlen + 1 >= PATH_MAX) { -- errno = ENAMETOOLONG; -- continue; -- } -- memcpy(expanded_file, dir, dirlen); -- memcpy(expanded_file + dirlen, file, filelen); -- expanded_file[dirlen + filelen] = '\0'; -- execve_with_shell_fallback(expanded_file, argv, envp); -- /* There are 3 responses to various classes of errno: -- * return immediately, continue (especially for ENOENT), -- * or continue with "sticky" errno. -- * -- * From exec(3): -- * -- * If permission is denied for a file (the attempted -- * execve returned EACCES), these functions will continue -- * searching the rest of the search path. If no other -- * file is found, however, they will return with the -- * global variable errno set to EACCES. -- */ -- switch (errno) { -- case EACCES: -- sticky_errno = errno; -- /* FALLTHRU */ -- case ENOENT: -- case ENOTDIR: --#ifdef ELOOP -- case ELOOP: --#endif --#ifdef ESTALE -- case ESTALE: --#endif --#ifdef ENODEV -- case ENODEV: --#endif --#ifdef ETIMEDOUT -- case ETIMEDOUT: --#endif -- break; /* Try other directories in PATH */ -- default: -- return; -- } +- if (fileEnc == null || !fileEnc.equals(expectFileEnc)) { +- System.err.println("Expected file.encoding: " + expectFileEnc); +- System.err.println("Actual file.encoding: " + fileEnc); +- failed = true; - } -- if (sticky_errno != 0) -- errno = sticky_errno; -+ /* count the array elements and number of bytes */ -+ for (count=0, bytes=0; *a != 0; count++, a++) { -+ bytes += strlen(*a)+1; - } -+ *nbytes = bytes; -+ *nelems = count+1; - } - --/* -- * Reads nbyte bytes from file descriptor fd into buf, -- * The read operation is retried in case of EINTR or partial reads. -- * -- * Returns number of bytes read (normally nbyte, but may be less in -- * case of EOF). In case of read errors, returns -1 and sets errno. -+/* copy the strings from arg[] into buf, starting at given offset -+ * return new offset to next free byte - */ --static ssize_t --readFully(int fd, void *buf, size_t nbyte) --{ -- ssize_t remaining = nbyte; -- for (;;) { -- ssize_t n = read(fd, buf, remaining); -- if (n == 0) { -- return nbyte - remaining; -- } else if (n > 0) { -- remaining -= n; -- if (remaining <= 0) -- return nbyte; -- /* We were interrupted in the middle of reading the bytes. -- * Unlikely, but possible. */ -- buf = (void *) (((char *)buf) + n); -- } else if (errno == EINTR) { -- /* Strange signals like SIGJVM1 are possible at any time. -- * See http://www.dreamsongs.com/WorseIsBetter.html */ -- } else { -- return -1; +- if (jnuEnc == null || !jnuEnc.equals(expectSunJnuEnc)) { +- System.err.println("Expected sun.jnu.encoding: " + expectSunJnuEnc); +- System.err.println("Actual sun.jnu.encoding: " + jnuEnc); +- failed = true; +- } +- if (failed) { +- throw new RuntimeException("Test Failed"); - } - } -} +--- ./jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh 2013-09-06 11:29:33.000000000 -0700 ++++ ./jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh 1969-12-31 16:00:00.000000000 -0800 +@@ -1,96 +0,0 @@ +-#!/bin/sh - --typedef struct _ChildStuff --{ -- int in[2]; -- int out[2]; -- int err[2]; -- int fail[2]; -- int fds[3]; -- const char **argv; -- const char **envv; -- const char *pdir; -- jboolean redirectErrorStream; --#if START_CHILD_USE_CLONE -- void *clone_stack; --#endif --} ChildStuff; -+static int copystrings(char *buf, int offset, const char * const *arg) { -+ char *p; -+ const char * const *a; -+ int count=0; - --static void --copyPipe(int from[2], int to[2]) --{ -- to[0] = from[0]; -- to[1] = from[1]; --} +-# +-# 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. - --/** -- * Child process after a successful fork() or clone(). -- * This function must not return, and must be prepared for either all -- * of its address space to be shared with its parent, or to be a copy. -- * It must not modify global variables such as "environ". -- */ --static int --childProcess(void *arg) --{ -- const ChildStuff* p = (const ChildStuff*) arg; +-# @test +-# @bug 8003228 +-# @summary Test the value of sun.jnu.encoding on Mac +-# @author Brent Christian +-# +-# @run shell MacJNUEncoding.sh - -- /* Close the parent sides of the pipes. -- Closing pipe fds here is redundant, since closeDescriptors() -- would do it anyways, but a little paranoia is a good thing. */ -- if ((closeSafely(p->in[1]) == -1) || -- (closeSafely(p->out[0]) == -1) || -- (closeSafely(p->err[0]) == -1) || -- (closeSafely(p->fail[0]) == -1)) -- goto WhyCantJohnnyExec; +-# Only run test on Mac +-OS=`uname -s` +-case "$OS" in +- Darwin ) ;; +- * ) +- exit 0 +- ;; +-esac - -- /* Give the child sides of the pipes the right fileno's. */ -- /* Note: it is possible for in[0] == 0 */ -- if ((moveDescriptor(p->in[0] != -1 ? p->in[0] : p->fds[0], -- STDIN_FILENO) == -1) || -- (moveDescriptor(p->out[1]!= -1 ? p->out[1] : p->fds[1], -- STDOUT_FILENO) == -1)) -- goto WhyCantJohnnyExec; +-if [ "${TESTJAVA}" = "" ] +-then +- echo "TESTJAVA not set. Test cannot execute. Failed." +- exit 1 +-fi - -- if (p->redirectErrorStream) { -- if ((closeSafely(p->err[1]) == -1) || -- (restartableDup2(STDOUT_FILENO, STDERR_FILENO) == -1)) -- goto WhyCantJohnnyExec; -- } else { -- if (moveDescriptor(p->err[1] != -1 ? p->err[1] : p->fds[2], -- STDERR_FILENO) == -1) -- goto WhyCantJohnnyExec; -- } +-if [ "${TESTSRC}" = "" ] +-then +- echo "TESTSRC not set. Test cannot execute. Failed." +- exit 1 +-fi - -- if (moveDescriptor(p->fail[1], FAIL_FILENO) == -1) -- goto WhyCantJohnnyExec; +-if [ "${TESTCLASSES}" = "" ] +-then +- echo "TESTCLASSES not set. Test cannot execute. Failed." +- exit 1 +-fi - -- /* close everything */ -- if (closeDescriptors() == 0) { /* failed, close the old way */ -- int max_fd = (int)sysconf(_SC_OPEN_MAX); -- int fd; -- for (fd = FAIL_FILENO + 1; fd < max_fd; fd++) -- if (restartableClose(fd) == -1 && errno != EBADF) -- goto WhyCantJohnnyExec; -- } +-JAVAC="${TESTJAVA}"/bin/javac +-JAVA="${TESTJAVA}"/bin/java - -- /* change to the new working directory */ -- if (p->pdir != NULL && chdir(p->pdir) < 0) -- goto WhyCantJohnnyExec; +-echo "Building test classes..." +-"$JAVAC" -d "${TESTCLASSES}" "${TESTSRC}"/ExpectedEncoding.java - -- if (fcntl(FAIL_FILENO, F_SETFD, FD_CLOEXEC) == -1) -- goto WhyCantJohnnyExec; +-echo "" +-echo "Running test for C locale" +-export LANG=C +-export LC_ALL=C +-"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding US-ASCII UTF-8 +-result1=$? - -- JDK_execvpe(p->argv[0], p->argv, p->envv); +-echo "" +-echo "Running test for en_US.UTF-8 locale" +-export LANG=en_US.UTF-8 +-export LC_ALL=en_US.UTF-8 +-"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding UTF-8 UTF-8 +-result2=$? - -- WhyCantJohnnyExec: -- /* We used to go to an awful lot of trouble to predict whether the -- * child would fail, but there is no reliable way to predict the -- * success of an operation without *trying* it, and there's no way -- * to try a chdir or exec in the parent. Instead, all we need is a -- * way to communicate any failure back to the parent. Easy; we just -- * send the errno back to the parent over a pipe in case of failure. -- * The tricky thing is, how do we communicate the *success* of exec? -- * We use FD_CLOEXEC together with the fact that a read() on a pipe -- * yields EOF when the write ends (we have two of them!) are closed. -- */ -- { -- int errnum = errno; -- restartableWrite(FAIL_FILENO, &errnum, sizeof(errnum)); +-echo "" +-echo "Cleanup" +-rm ${TESTCLASSES}/ExpectedEncoding.class +- +-if [ ${result1} -ne 0 ] ; then +- echo "Test failed for C locale" +- echo " LANG=\"${LANG}\"" +- echo " LC_ALL=\"${LC_ALL}\"" +- exit ${result1} +-fi +-if [ ${result2} -ne 0 ] ; then +- echo "Test failed for en_US.UTF-8 locale" +- echo " LANG=\"${LANG}\"" +- echo " LC_ALL=\"${LC_ALL}\"" +- exit ${result2} +-fi +-exit 0 +- +--- ./jdk/test/java/lang/ThreadGroup/Suspend.java 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/ThreadGroup/Suspend.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,47 +23,55 @@ + + /** + * @test +- * @bug 4176355 ++ * @bug 4176355 7181748 + * @summary Suspending a ThreadGroup that contains the current thread has + * unpredictable results. + */ + + public class Suspend implements Runnable { +- private static Thread first=null; +- private static Thread second=null; +- private static ThreadGroup group = new ThreadGroup(""); +- private static int count = 0; +- +- Suspend() { +- Thread thread = new Thread(group, this); +- if (first == null) +- first = thread; +- else +- second = thread; + +- thread.start(); - } -- restartableClose(FAIL_FILENO); -- _exit(-1); -- return 0; /* Suppress warning "no return value from function" */ -+ if (arg == 0) { -+ return offset; -+ } -+ for (p=buf+offset, a=arg; *a != 0; a++) { -+ int len = strlen(*a) +1; -+ memcpy(p, *a, len); -+ p += len; -+ count += len; ++ private static volatile int count = 0; ++ private static final ThreadGroup group = new ThreadGroup(""); ++ private static final Thread first = new Thread(group, new Suspend()); ++ private static final Thread second = new Thread(group, new Suspend()); + + public void run() { + while (true) { + try { +- Thread.sleep(1000); // Give other thread a chance to start +- if (Thread.currentThread() == first) +- group.suspend(); +- else ++ Thread.sleep(100); ++ if (Thread.currentThread() == first) { ++ if (second.isAlive()) { ++ group.suspend(); ++ } ++ } else { + count++; +- } catch(InterruptedException e){ ++ } ++ } catch (InterruptedException e) { + } + } + } + + public static void main(String[] args) throws Exception { +- for (int i=0; i<2; i++) +- new Suspend(); +- Thread.sleep(3000); ++ // Launch two threads as part of the same thread group ++ first.start(); ++ second.start(); ++ ++ // Wait for the thread group suspend to be issued ++ while (!first.isAlive() || !second.isAlive()) { ++ Thread.sleep(100); ++ } ++ Thread.sleep(1000); ++ // Suppose, the thread group is now suspended ++ ++ count = 0; ++ Thread.sleep(1000); ++ ++ // Increment of the count indicates that the second thread is still running + boolean failed = (count > 1); +- first.stop(); second.stop(); +- if (failed) ++ first.stop(); ++ second.stop(); ++ if (failed) { + throw new RuntimeException("Failure."); ++ } + } + } +--- ./jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -44,7 +44,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin) ++ SunOS | Linux | *BSD | Darwin) + NULL=/dev/null + PS=":" + FS="/" +--- ./jdk/test/java/lang/instrument/MakeJAR2.sh 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/instrument/MakeJAR2.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -49,7 +49,7 @@ + + OS=`uname -s` + case "$OS" in +- SunOS | Linux ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + ;; + +--- ./jdk/test/java/lang/instrument/RedefineBigClass.sh 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/instrument/RedefineBigClass.sh 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + # 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 7121600 ++# @bug 7121600 8016838 + # @summary Redefine a big class. + # @author Daniel D. Daugherty + # +--- ./jdk/test/java/lang/instrument/RedefineBigClassApp.java 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/instrument/RedefineBigClassApp.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -21,12 +21,21 @@ + * questions. + */ + ++import java.io.*; ++ + public class RedefineBigClassApp { ++ /** ++ * Memory leak is assumed, if application consumes more than specified amount of memory during its execution. ++ * The number is given in Kb. ++ */ ++ private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb ++ + public static void main(String[] args) throws Exception { + System.out.println("Creating instance of " + + RedefineBigClassAgent.clz); + RedefineBigClassAgent.clz.newInstance(); + ++ long vMemBefore = getVMemSize(); + int count = 0; + while (!RedefineBigClassAgent.doneRedefining) { + System.out.println("App loop count: " + ++count); +@@ -37,6 +46,39 @@ + } + System.out.println("App looped " + count + " times."); + ++ long vMemAfter = getVMemSize(); ++ if (vMemBefore == 0 || vMemAfter == 0) { ++ System.err.println("WARNING: Cannot perform memory leak detection on this OS"); ++ } else { ++ long vMemDelta = vMemAfter - vMemBefore; ++ if (vMemDelta > MEM_LEAK_THRESHOLD) { ++ System.err.println("FAIL: Virtual memory usage increased by " + vMemDelta + "Kb " + ++ "(greater than " + MEM_LEAK_THRESHOLD + "Kb)"); ++ System.exit(1); ++ } ++ System.err.println("PASS: Virtual memory usage increased by " + vMemDelta + "Kb " + ++ "(not greater than " + MEM_LEAK_THRESHOLD + "Kb)"); ++ } + System.exit(0); + } ++ ++ /** ++ * Return size of virtual memory allocated to the process in Kb. ++ * Linux specific. On other platforms and in case of any errors return 0. ++ */ ++ private static long getVMemSize() { ++ ++ // Refer to the Linux proc(5) man page for details about /proc/self/stat file ++ // ++ // In short, this file contains status information about the current process ++ // written in one line. The fields are separated with spaces. ++ // The 23rd field is defined as 'vsize %lu Virtual memory size in bytes' ++ ++ try (FileReader fileReader = new FileReader("/proc/self/stat"); ++ BufferedReader bufferedReader = new BufferedReader(fileReader)) { ++ String line = bufferedReader.readLine(); ++ return Long.parseLong(line.split(" ")[22]) / 1024; ++ } catch (Exception ex) {} ++ return 0; + } -+ return offset+count; } +--- ./jdk/test/java/lang/instrument/RetransformBigClass.sh 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/instrument/RetransformBigClass.sh 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + # 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 @@ + # - /** -- * Start a child process running function childProcess. -- * This function only returns in the parent. - * We are unusually paranoid; use of clone/vfork is - * especially likely to tickle gcc/glibc bugs. + # @test +-# @bug 7122253 ++# @bug 7122253 8016838 + # @ignore until the fix for 7122253 (from HotSpot) is in a promoted build + # @summary Retransform a big class. + # @author Daniel D. Daugherty +--- ./jdk/test/java/lang/instrument/RetransformBigClassApp.java 2013-09-06 11:29:34.000000000 -0700 ++++ ./jdk/test/java/lang/instrument/RetransformBigClassApp.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -21,12 +21,21 @@ + * questions. */ - #ifdef __attribute_noinline__ /* See: sys/cdefs.h */ - __attribute_noinline__ - #endif + ++import java.io.*; ++ + public class RetransformBigClassApp { ++ /** ++ * Memory leak is assumed, if application consumes more than specified amount of memory during its execution. ++ * The number is given in Kb. ++ */ ++ private static final long MEM_LEAK_THRESHOLD = 32 * 1024; // 32Mb ++ + public static void main(String[] args) throws Exception { + System.out.println("Creating instance of " + + RetransformBigClassAgent.clz); + RetransformBigClassAgent.clz.newInstance(); + ++ long vMemBefore = getVMemSize(); + int count = 0; + while (!RetransformBigClassAgent.doneRetransforming) { + System.out.println("App loop count: " + ++count); +@@ -37,6 +46,39 @@ + } + System.out.println("App looped " + count + " times."); + ++ long vMemAfter = getVMemSize(); ++ if (vMemBefore == 0 || vMemAfter == 0) { ++ System.err.println("WARNING: Cannot perform memory leak detection on this OS"); ++ } else { ++ long vMemDelta = vMemAfter - vMemBefore; ++ if (vMemDelta > MEM_LEAK_THRESHOLD) { ++ System.err.println("FAIL: Virtual memory usage increased by " + vMemDelta + "Kb " + ++ "(greater than " + MEM_LEAK_THRESHOLD + "Kb)"); ++ System.exit(1); ++ } ++ System.err.println("PASS: Virtual memory usage increased by " + vMemDelta + "Kb " + ++ "(not greater than " + MEM_LEAK_THRESHOLD + "Kb)"); ++ } + System.exit(0); + } ++ ++ /** ++ * Return size of virtual memory allocated to the process in Kb. ++ * Linux specific. On other platforms and in case of any errors return 0. ++ */ ++ private static long getVMemSize() { ++ ++ // Refer to the Linux proc(5) man page for details about /proc/self/stat file ++ // ++ // In short, this file contains status information about the current process ++ // written in one line. The fields are separated with spaces. ++ // The 23rd field is defined as 'vsize %lu Virtual memory size in bytes' ++ ++ try (FileReader fileReader = new FileReader("/proc/self/stat"); ++ BufferedReader bufferedReader = new BufferedReader(fileReader)) { ++ String line = bufferedReader.readLine(); ++ return Long.parseLong(line.split(" ")[22]) / 1024; ++ } catch (Exception ex) {} ++ return 0; ++ } + } +--- ./jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -35,15 +35,7 @@ + + OS=`uname -s` + case "$OS" in +- SunOS ) +- PS=":" +- FS="/" +- ;; +- Linux ) +- PS=":" +- FS="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/java/lang/invoke/8009222/Test8009222.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/invoke/8009222/Test8009222.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,49 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ * ++ */ + -+#define START_CHILD_USE_CLONE 0 /* clone() currently disabled; see above. */ ++/** ++ * @test ++ * @bug 8009222 ++ * @summary java.lang.IllegalArgumentException: not invocable, no method type ++ * when attempting to get getter method handle for a static field ++ * ++ * @run main/othervm Test8009222 ++ */ + -+#ifdef START_CHILD_USE_CLONE - static pid_t --startChild(ChildStuff *c) { --#if START_CHILD_USE_CLONE -+cloneChild(ChildStuff *c) { -+#ifdef __linux__ - #define START_CHILD_CLONE_STACK_SIZE (64 * 1024) - /* - * See clone(2). -@@ -800,33 +414,161 @@ - c->clone_stack + START_CHILD_CLONE_STACK_SIZE, - CLONE_VFORK | CLONE_VM | SIGCHLD, c); - #else -- #if START_CHILD_USE_VFORK -+/* not available on Solaris / Mac */ -+ assert(0); -+ return -1; -+#endif -+} -+#endif ++import java.lang.invoke.MethodHandle; ++import java.lang.invoke.MethodHandles; + -+static pid_t -+vforkChild(ChildStuff *c) { -+ volatile pid_t resultPid; ++interface Intf { ++ static int i = 0; ++} + - /* - * We separate the call to vfork into a separate function to make - * very sure to keep stack of child from corrupting stack of parent, - * as suggested by the scary gcc warning: - * warning: variable 'foo' might be clobbered by 'longjmp' or 'vfork' - */ -- volatile pid_t resultPid = vfork(); -- #else -+ resultPid = vfork(); ++public class Test8009222 { ++ public static void main(String[] args) throws Exception { ++ MethodHandles.lookup() ++ .findStaticGetter(Intf.class, "i", int.class) ++ .getClass(); // null check + -+ if (resultPid == 0) { -+ childProcess(c); ++ System.out.println("TEST PASSED"); + } -+ assert(resultPid != 0); /* childProcess never returns */ -+ return resultPid; +} +--- ./jdk/test/java/lang/invoke/BigArityTest.java 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/invoke/BigArityTest.java 2014-06-06 19:56:29.000000000 -0700 +@@ -26,7 +26,7 @@ + /* @test + * @summary High arity invocations, up to the maximum of 255 arguments + * @compile BigArityTest.java +- * @run junit/othervm -DBigArityTest.ITERATION_COUNT=1 test.java.lang.invoke.BigArityTest ++ * @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -esa -DBigArityTest.ITERATION_COUNT=1 test.java.lang.invoke.BigArityTest + */ + + package test.java.lang.invoke; +--- ./jdk/test/java/lang/invoke/CallSiteTest.java 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/invoke/CallSiteTest.java 2014-06-06 19:56:29.000000000 -0700 +@@ -28,7 +28,7 @@ + * + * @build indify.Indify + * @compile CallSiteTest.java +- * @run main/othervm ++ * @run main/othervm/timeout=3600 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies + * indify.Indify + * --expand-properties --classpath ${test.classes} + * --java test.java.lang.invoke.CallSiteTest +--- ./jdk/test/java/lang/invoke/MethodHandleConstants.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/invoke/MethodHandleConstants.java 2013-12-01 11:14:29.000000000 -0800 +@@ -0,0 +1,188 @@ ++/* ++ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+static pid_t -+forkChild(ChildStuff *c) { -+ pid_t resultPid; ++/* @test ++ * @bug 8022066 ++ * @summary smoke test for method handle constants ++ * @build indify.Indify ++ * @compile MethodHandleConstants.java ++ * @run main/othervm ++ * indify.Indify ++ * --verify-specifier-count=0 ++ * --expand-properties --classpath ${test.classes} ++ * --java test.java.lang.invoke.MethodHandleConstants --check-output ++ * @run main/othervm ++ * indify.Indify ++ * --expand-properties --classpath ${test.classes} ++ * --java test.java.lang.invoke.MethodHandleConstants --security-manager ++ */ + - /* - * From Solaris fork(2): In Solaris 10, a call to fork() is - * identical to a call to fork1(); only the calling thread is - * replicated in the child process. This is the POSIX-specified - * behavior for fork(). - */ -- pid_t resultPid = fork(); -- #endif -- if (resultPid == 0) -+ resultPid = fork(); ++package test.java.lang.invoke; + -+ if (resultPid == 0) { - childProcess(c); ++import java.util.*; ++import java.io.*; ++import java.lang.invoke.*; ++import java.security.*; ++ ++import static java.lang.invoke.MethodHandles.*; ++import static java.lang.invoke.MethodType.*; ++ ++public class MethodHandleConstants { ++ public static void main(String... av) throws Throwable { ++ if (av.length > 0 && av[0].equals("--check-output")) openBuf(); ++ if (av.length > 0 && av[0].equals("--security-manager")) setSM(); ++ System.out.println("Obtaining method handle constants:"); ++ testCase(MH_String_replace_C2(), String.class, "replace", String.class, String.class, char.class, char.class); ++ testCase(MH_MethodHandle_invokeExact_SC2(), MethodHandle.class, "invokeExact", String.class, MethodHandle.class, String.class, char.class, char.class); ++ testCase(MH_MethodHandle_invoke_SC2(), MethodHandle.class, "invoke", String.class, MethodHandle.class, String.class, char.class, char.class); ++ testCase(MH_Class_forName_S(), Class.class, "forName", Class.class, String.class); ++ testCase(MH_Class_forName_SbCL(), Class.class, "forName", Class.class, String.class, boolean.class, ClassLoader.class); ++ System.out.println("Done."); ++ closeBuf(); + } - assert(resultPid != 0); /* childProcess never returns */ - return resultPid; --#endif /* ! START_CHILD_USE_CLONE */ -+} + -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) -+static pid_t -+spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) { -+ pid_t resultPid; -+ jboolean isCopy; -+ int i, offset, rval, bufsize, magic; -+ char *buf, buf1[16]; -+ char *hlpargs[2]; -+ SpawnInfo sp; ++ private static void testCase(MethodHandle mh, Class defc, String name, Class rtype, Class... ptypes) throws Throwable { ++ System.out.println(mh); ++ // we include defc, because we assume it is a non-static MH: ++ MethodType mt = methodType(rtype, ptypes); ++ assertEquals(mh.type(), mt); ++ // FIXME: Use revealDirect to find out more ++ } ++ private static void assertEquals(Object exp, Object act) { ++ if (exp == act || (exp != null && exp.equals(act))) return; ++ throw new AssertionError("not equal: "+exp+", "+act); ++ } + -+ /* need to tell helper which fd is for receiving the childstuff -+ * and which fd to send response back on -+ */ -+ snprintf(buf1, sizeof(buf1), "%d:%d", c->childenv[0], c->fail[1]); -+ /* put the fd string as argument to the helper cmd */ -+ hlpargs[0] = buf1; -+ hlpargs[1] = 0; ++ private static void setSM() { ++ Policy.setPolicy(new TestPolicy()); ++ System.setSecurityManager(new SecurityManager()); ++ } + -+ /* Following items are sent down the pipe to the helper -+ * after it is spawned. -+ * All strings are null terminated. All arrays of strings -+ * have an empty string for termination. -+ * - the ChildStuff struct -+ * - the SpawnInfo struct -+ * - the argv strings array -+ * - the envv strings array -+ * - the home directory string -+ * - the parentPath string -+ * - the parentPathv array -+ */ -+ /* First calculate the sizes */ -+ arraysize(c->argv, &sp.nargv, &sp.argvBytes); -+ bufsize = sp.argvBytes; -+ arraysize(c->envv, &sp.nenvv, &sp.envvBytes); -+ bufsize += sp.envvBytes; -+ sp.dirlen = c->pdir == 0 ? 0 : strlen(c->pdir)+1; -+ bufsize += sp.dirlen; -+ arraysize(parentPathv, &sp.nparentPathv, &sp.parentPathvBytes); -+ bufsize += sp.parentPathvBytes; -+ /* We need to clear FD_CLOEXEC if set in the fds[]. -+ * Files are created FD_CLOEXEC in Java. -+ * Otherwise, they will be closed when the target gets exec'd */ -+ for (i=0; i<3; i++) { -+ if (c->fds[i] != -1) { -+ int flags = fcntl(c->fds[i], F_GETFD); -+ if (flags & FD_CLOEXEC) { -+ fcntl(c->fds[i], F_SETFD, flags & (~1)); -+ } ++ private static PrintStream oldOut; ++ private static ByteArrayOutputStream buf; ++ private static void openBuf() { ++ oldOut = System.out; ++ buf = new ByteArrayOutputStream(); ++ System.setOut(new PrintStream(buf)); ++ } ++ private static void closeBuf() { ++ if (buf == null) return; ++ System.out.flush(); ++ System.setOut(oldOut); ++ String[] haveLines = new String(buf.toByteArray()).split("[\n\r]+"); ++ for (String line : haveLines) System.out.println(line); ++ Iterator iter = Arrays.asList(haveLines).iterator(); ++ for (String want : EXPECT_OUTPUT) { ++ String have = iter.hasNext() ? iter.next() : "[EOF]"; ++ if (want.equals(have)) continue; ++ System.err.println("want line: "+want); ++ System.err.println("have line: "+have); ++ throw new AssertionError("unexpected output: "+have); + } ++ if (iter.hasNext()) ++ throw new AssertionError("unexpected output: "+iter.next()); + } ++ private static final String[] EXPECT_OUTPUT = { ++ "Obtaining method handle constants:", ++ "MethodHandle(String,char,char)String", ++ "MethodHandle(MethodHandle,String,char,char)String", ++ "MethodHandle(MethodHandle,String,char,char)String", ++ "MethodHandle(String)Class", ++ "MethodHandle(String,boolean,ClassLoader)Class", ++ "Done." ++ }; + -+ rval = posix_spawn(&resultPid, helperpath, 0, 0, (char * const *) hlpargs, environ); ++ // String.replace(String, char, char) ++ private static MethodType MT_String_replace_C2() { ++ shouldNotCallThis(); ++ return methodType(String.class, char.class, char.class); ++ } ++ private static MethodHandle MH_String_replace_C2() throws ReflectiveOperationException { ++ shouldNotCallThis(); ++ return lookup().findVirtual(String.class, "replace", MT_String_replace_C2()); ++ } + -+ if (rval != 0) { -+ return -1; ++ // MethodHandle.invokeExact(...) ++ private static MethodType MT_MethodHandle_invokeExact_SC2() { ++ shouldNotCallThis(); ++ return methodType(String.class, String.class, char.class, char.class); ++ } ++ private static MethodHandle MH_MethodHandle_invokeExact_SC2() throws ReflectiveOperationException { ++ shouldNotCallThis(); ++ return lookup().findVirtual(MethodHandle.class, "invokeExact", MT_MethodHandle_invokeExact_SC2()); + } + -+ /* now the lengths are known, copy the data */ -+ buf = NEW(char, bufsize); -+ if (buf == 0) { -+ return -1; ++ // MethodHandle.invoke(...) ++ private static MethodType MT_MethodHandle_invoke_SC2() { ++ shouldNotCallThis(); ++ return methodType(String.class, String.class, char.class, char.class); ++ } ++ private static MethodHandle MH_MethodHandle_invoke_SC2() throws ReflectiveOperationException { ++ shouldNotCallThis(); ++ return lookup().findVirtual(MethodHandle.class, "invoke", MT_MethodHandle_invoke_SC2()); + } -+ offset = copystrings(buf, 0, &c->argv[0]); -+ offset = copystrings(buf, offset, &c->envv[0]); -+ memcpy(buf+offset, c->pdir, sp.dirlen); -+ offset += sp.dirlen; -+ offset = copystrings(buf, offset, parentPathv); -+ assert(offset == bufsize); + -+ magic = magicNumber(); ++ // Class.forName(String) ++ private static MethodType MT_Class_forName_S() { ++ shouldNotCallThis(); ++ return methodType(Class.class, String.class); ++ } ++ private static MethodHandle MH_Class_forName_S() throws ReflectiveOperationException { ++ shouldNotCallThis(); ++ return lookup().findStatic(Class.class, "forName", MT_Class_forName_S()); ++ } + -+ /* write the two structs and the data buffer */ -+ write(c->childenv[1], (char *)&magic, sizeof(magic)); // magic number first -+ write(c->childenv[1], (char *)c, sizeof(*c)); -+ write(c->childenv[1], (char *)&sp, sizeof(sp)); -+ write(c->childenv[1], buf, bufsize); -+ free(buf); ++ // Class.forName(String, boolean, ClassLoader) ++ private static MethodType MT_Class_forName_SbCL() { ++ shouldNotCallThis(); ++ return methodType(Class.class, String.class, boolean.class, ClassLoader.class); ++ } ++ private static MethodHandle MH_Class_forName_SbCL() throws ReflectiveOperationException { ++ shouldNotCallThis(); ++ return lookup().findStatic(Class.class, "forName", MT_Class_forName_SbCL()); ++ } + -+ /* In this mode an external main() in invoked which calls back into -+ * childProcess() in this file, rather than directly -+ * via the statement below */ -+ return resultPid; ++ private static void shouldNotCallThis() { ++ // if this gets called, the transformation has not taken place ++ if (System.getProperty("MethodHandleConstants.allow-untransformed") != null) return; ++ throw new AssertionError("this code should be statically transformed away by Indify"); ++ } ++ ++ static class TestPolicy extends Policy { ++ final PermissionCollection permissions = new Permissions(); ++ TestPolicy() { ++ permissions.add(new java.io.FilePermission("<>", "read")); ++ } ++ public PermissionCollection getPermissions(ProtectionDomain domain) { ++ return permissions; ++ } ++ ++ public PermissionCollection getPermissions(CodeSource codesource) { ++ return permissions; ++ } ++ ++ public boolean implies(ProtectionDomain domain, Permission perm) { ++ return permissions.implies(perm); ++ } ++ } +} -+#endif +--- ./jdk/test/java/lang/invoke/MethodHandlesTest.java 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/invoke/MethodHandlesTest.java 2014-06-06 19:56:29.000000000 -0700 +@@ -26,7 +26,7 @@ + /* @test + * @summary unit tests for java.lang.invoke.MethodHandles + * @compile MethodHandlesTest.java remote/RemoteExample.java +- * @run junit/othervm test.java.lang.invoke.MethodHandlesTest ++ * @run junit/othervm/timeout=2500 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -esa test.java.lang.invoke.MethodHandlesTest + */ + + package test.java.lang.invoke; +--- ./jdk/test/java/lang/invoke/RicochetTest.java 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/invoke/RicochetTest.java 2014-06-06 19:56:29.000000000 -0700 +@@ -25,7 +25,7 @@ + + /* @test + * @summary unit tests for recursive method handles +- * @run junit/othervm -DRicochetTest.MAX_ARITY=50 test.java.lang.invoke.RicochetTest ++ * @run junit/othervm/timeout=3600 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -DRicochetTest.MAX_ARITY=10 test.java.lang.invoke.RicochetTest + */ + /* + * @ignore The following test creates an unreasonable number of adapters in -Xcomp mode (7049122) +--- ./jdk/test/java/lang/invoke/TestCatchExceptionWithVarargs.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/invoke/TestCatchExceptionWithVarargs.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,97 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + +/* -+ * Start a child process running function childProcess. -+ * This function only returns in the parent. ++ * @test ++ * @bug 8019184 ++ * @summary MethodHandles.catchException() fails when methods have 8 args + varargs + */ -+static pid_t -+startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) { -+ switch (c->mode) { -+ case MODE_VFORK: -+ return vforkChild(c); -+ case MODE_FORK: -+ return forkChild(c); -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) -+ case MODE_POSIX_SPAWN: -+ return spawnChild(env, process, c, helperpath); -+#endif -+ default: -+ return -1; ++ ++import java.util.*; ++import java.lang.invoke.*; ++ ++public class TestCatchExceptionWithVarargs { ++ ++ private static final Class CLASS = TestCatchExceptionWithVarargs.class; ++ private static final int MAX_MH_ARITY = 254; ++ ++ public static MethodHandle target; ++ public static MethodHandle handler; ++ ++ private static Object firstArg; ++ ++ static class MyException extends Exception { + } - } - - JNIEXPORT jint JNICALL - Java_java_lang_UNIXProcess_forkAndExec(JNIEnv *env, - jobject process, -+ jint mode, -+ jbyteArray helperpath, - jbyteArray prog, - jbyteArray argBlock, jint argc, - jbyteArray envBlock, jint envc, -@@ -836,32 +578,35 @@ - { - int errnum; - int resultPid = -1; -- int in[2], out[2], err[2], fail[2]; -+ int in[2], out[2], err[2], fail[2], childenv[2]; - jint *fds = NULL; -+ const char *phelperpath = NULL; - const char *pprog = NULL; - const char *pargBlock = NULL; - const char *penvBlock = NULL; - ChildStuff *c; - - in[0] = in[1] = out[0] = out[1] = err[0] = err[1] = fail[0] = fail[1] = -1; -+ childenv[0] = childenv[1] = -1; - - if ((c = NEW(ChildStuff, 1)) == NULL) return -1; - c->argv = NULL; - c->envv = NULL; - c->pdir = NULL; --#if START_CHILD_USE_CLONE - c->clone_stack = NULL; --#endif - - /* Convert prog + argBlock into a char ** argv. - * Add one word room for expansion of argv for use by - * execve_as_traditional_shell_script. -+ * This word is also used when using spawn mode - */ - assert(prog != NULL && argBlock != NULL); -+ if ((phelperpath = getBytes(env, helperpath)) == NULL) goto Catch; - if ((pprog = getBytes(env, prog)) == NULL) goto Catch; - if ((pargBlock = getBytes(env, argBlock)) == NULL) goto Catch; - if ((c->argv = NEW(const char *, argc + 3)) == NULL) goto Catch; - c->argv[0] = pprog; -+ c->argc = argc + 2; - initVectorFromBlock(c->argv+1, pargBlock, argc); - - if (envBlock != NULL) { -@@ -882,6 +627,7 @@ - if ((fds[0] == -1 && pipe(in) < 0) || - (fds[1] == -1 && pipe(out) < 0) || - (fds[2] == -1 && pipe(err) < 0) || -+ (pipe(childenv) < 0) || - (pipe(fail) < 0)) { - throwIOException(env, errno, "Bad file descriptor"); - goto Catch; -@@ -894,18 +640,29 @@ - copyPipe(out, c->out); - copyPipe(err, c->err); - copyPipe(fail, c->fail); -+ copyPipe(childenv, c->childenv); - - c->redirectErrorStream = redirectErrorStream; -+ c->mode = mode; - -- resultPid = startChild(c); -+ resultPid = startChild(env, process, c, phelperpath); - assert(resultPid != 0); - - if (resultPid < 0) { -- throwIOException(env, errno, START_CHILD_SYSTEM_CALL " failed"); -+ switch (c->mode) { -+ case MODE_VFORK: -+ throwIOException(env, errno, "vfork failed"); -+ break; -+ case MODE_FORK: -+ throwIOException(env, errno, "fork failed"); -+ break; -+ case MODE_POSIX_SPAWN: -+ throwIOException(env, errno, "spawn failed"); -+ break; ++ ++ public static Object target(Object... a) throws Exception { ++ if (a[0] != firstArg) { ++ throw new AssertionError("first argument different than expected: " + a[0] + " != " + firstArg); + } - goto Catch; - } -- -- restartableClose(fail[1]); fail[1] = -1; /* See: WhyCantJohnnyExec */ -+ close(fail[1]); fail[1] = -1; /* See: WhyCantJohnnyExec (childproc.c) */ ++ throw new MyException(); ++ } ++ ++ public static Object handler(Object... a) { ++ if (a[0] != firstArg) { ++ throw new AssertionError("first argument different than expected: " + a[0] + " != " + firstArg); ++ } ++ return a[0]; ++ } ++ ++ static { ++ try { ++ MethodType mtype = MethodType.methodType(Object.class, Object[].class); ++ target = MethodHandles.lookup().findStatic(CLASS, "target", mtype); ++ handler = MethodHandles.lookup().findStatic(CLASS, "handler", mtype); ++ } catch (Exception e) { ++ throw new AssertionError(e); ++ } ++ } ++ ++ public static void main(String[] args) throws Throwable { ++ List> ptypes = new LinkedList<>(); ++ ptypes.add(Object[].class); ++ ++ // We use MAX_MH_ARITY - 1 here to account for the Object[] argument. ++ for (int i = 1; i < MAX_MH_ARITY - 1; i++) { ++ ptypes.add(0, Object.class); ++ ++ MethodHandle targetWithArgs = target.asType(MethodType.methodType(Object.class, ptypes)); ++ MethodHandle handlerWithArgs = handler.asType(MethodType.methodType(Object.class, ptypes)); ++ handlerWithArgs = MethodHandles.dropArguments(handlerWithArgs, 0, MyException.class); ++ ++ MethodHandle gwc1 = MethodHandles.catchException(targetWithArgs, MyException.class, handlerWithArgs); ++ ++ // The next line throws an IllegalArgumentException if there is a bug. ++ MethodHandle gwc2 = MethodHandles.catchException(gwc1, MyException.class, handlerWithArgs); ++ ++ // This is only to verify that the method handles can actually be invoked and do the right thing. ++ firstArg = new Object(); ++ Object o = gwc2.asSpreader(Object[].class, ptypes.size() - 1).invoke(firstArg, new Object[i]); ++ if (o != firstArg) { ++ throw new AssertionError("return value different than expected: " + o + " != " + firstArg); ++ } ++ } ++ } ++} +--- ./jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -61,7 +61,7 @@ + while true; do + echo "Run $i: TestSystemLoadAvg" + case `uname -s` in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + runOne GetSystemLoadAverage + ;; + * ) +--- ./jdk/test/java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java 2014-06-06 19:56:29.000000000 -0700 +@@ -23,7 +23,7 @@ - switch (readFully(fail[0], &errnum, sizeof(errnum))) { - case 0: break; /* Exec succeeded */ -@@ -923,18 +680,18 @@ - fds[2] = (err[0] != -1) ? err[0] : -1; + /* + * @test +- * @bug 7024172 ++ * @bug 7024172 7067691 + * @summary Test if proxy for PlatformLoggingMXBean is equivalent + * to proxy for LoggingMXBean + * +@@ -36,12 +36,21 @@ + import java.util.logging.*; + import java.util.ArrayList; + import java.util.List; ++import java.util.Map; ++import java.util.HashMap; - Finally: --#if START_CHILD_USE_CLONE - free(c->clone_stack); --#endif + public class LoggingMXBeanTest + { +- static String LOGGER_NAME_1 = "com.sun.management.Logger"; +- static String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2"; +- static String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown"; ++ static final String LOGGER_NAME_1 = "com.sun.management.Logger"; ++ static final String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2"; ++ static final String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown"; ++ ++ // These instance variables prevent premature logger garbage collection ++ // See getLogger() weak reference warnings. ++ Logger logger1; ++ Logger logger2; ++ ++ static LoggingMXBeanTest test; + + public static void main(String[] argv) throws Exception { + MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); +@@ -51,7 +60,7 @@ + LoggingMXBean.class); + + // test LoggingMXBean proxy +- LoggingMXBeanTest p = new LoggingMXBeanTest(proxy); ++ test = new LoggingMXBeanTest(proxy); + + // check if the attributes implemented by PlatformLoggingMXBean + // and LoggingMXBean return the same value +@@ -64,9 +73,9 @@ + // same verification as in java/util/logging/LoggingMXBeanTest2 + public LoggingMXBeanTest(LoggingMXBean mbean) throws Exception { + +- Logger logger1 = Logger.getLogger( LOGGER_NAME_1 ); ++ logger1 = Logger.getLogger( LOGGER_NAME_1 ); + logger1.setLevel(Level.FINE); +- Logger logger2 = Logger.getLogger( LOGGER_NAME_2 ); ++ logger2 = Logger.getLogger( LOGGER_NAME_2 ); + logger2.setLevel(null); - /* Always clean up the child's side of the pipes */ - closeSafely(in [0]); - closeSafely(out[1]); - closeSafely(err[1]); + /* +@@ -206,20 +215,36 @@ + PlatformLoggingMXBean mxbean2) { + // verify logger names + List loggers1 = mxbean1.getLoggerNames(); ++ System.out.println("Loggers: " + loggers1); ++ ++ // Retrieve the named loggers to prevent them from being ++ // spontaneously gc'ed. ++ Map loggersMap = new HashMap<>(); ++ for (String n : loggers1) { ++ loggersMap.put(n, Logger.getLogger(n)); ++ } ++ + List loggers2 = mxbean2.getLoggerNames(); ++ ++ // loggers1 and loggers2 should be identical - no new logger should ++ // have been created in between (at least no new logger name) ++ // + if (loggers1.size() != loggers2.size()) + throw new RuntimeException("LoggerNames: unmatched number of entries"); +- List loggers3 = new ArrayList<>(loggers1); +- loggers3.removeAll(loggers2); +- if (loggers3.size() != 0) ++ if (!loggers2.containsAll(loggersMap.keySet())) + throw new RuntimeException("LoggerNames: unmatched loggers"); + ++ + // verify logger's level and parent + for (String logger : loggers1) { +- if (!mxbean1.getLoggerLevel(logger) +- .equals(mxbean2.getLoggerLevel(logger))) ++ String level1 = mxbean1.getLoggerLevel(logger); ++ String level2 = mxbean2.getLoggerLevel(logger); ++ if (!java.util.Objects.equals(level1, level2)) { + throw new RuntimeException( +- "LoggerLevel: unmatched level for " + logger); ++ "LoggerLevel: unmatched level for " + logger ++ + ", " + level1 + ", " + level2); ++ } ++ + if (!mxbean1.getParentLoggerName(logger) + .equals(mxbean2.getParentLoggerName(logger))) + throw new RuntimeException( +--- ./jdk/test/java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java 2013-09-06 11:29:35.000000000 -0700 ++++ ./jdk/test/java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java 2014-06-06 19:56:29.000000000 -0700 +@@ -23,7 +23,7 @@ -- /* Always clean up fail descriptors */ -+ /* Always clean up fail and childEnv descriptors */ - closeSafely(fail[0]); - closeSafely(fail[1]); -+ closeSafely(childenv[0]); -+ closeSafely(childenv[1]); + /* + * @test +- * @bug 6876135 7024172 ++ * @bug 6876135 7024172 7067691 + * + * @summary Test PlatformLoggingMXBean + * This test performs similar testing as +@@ -41,11 +41,15 @@ - releaseBytes(env, prog, pprog); - releaseBytes(env, argBlock, pargBlock); -@@ -952,9 +709,9 @@ + public class PlatformLoggingMXBeanTest + { +- + ObjectName objectName = null; + static String LOGGER_NAME_1 = "com.sun.management.Logger1"; + static String LOGGER_NAME_2 = "com.sun.management.Logger2"; - Catch: - /* Clean up the parent's side of the pipes in case of failure only */ -- closeSafely(in [1]); -- closeSafely(out[0]); -- closeSafely(err[0]); -+ closeSafely(in [1]); in[1] = -1; -+ closeSafely(out[0]); out[0] = -1; -+ closeSafely(err[0]); err[0] = -1; - goto Finally; - } ++ // Use Logger instance variables to prevent premature garbage collection ++ // of weak references. ++ Logger logger1; ++ Logger logger2; ++ + public PlatformLoggingMXBeanTest() throws Exception { + } ---- jdk/src/solaris/native/java/lang/childproc.c 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/solaris/native/java/lang/childproc.c 2014-04-28 17:39:02.000000000 -0700 -@@ -0,0 +1,387 @@ +@@ -135,8 +139,8 @@ + System.out.println( "*********** Phase 3 ***********" ); + System.out.println( "*******************************" ); + System.out.println( " Create and test new Loggers" ); +- Logger logger1 = Logger.getLogger( LOGGER_NAME_1 ); +- Logger logger2 = Logger.getLogger( LOGGER_NAME_2 ); ++ logger1 = Logger.getLogger( LOGGER_NAME_1 ); ++ logger2 = Logger.getLogger( LOGGER_NAME_2 ); + + // check that Level object are returned properly + try { +@@ -187,6 +191,7 @@ + System.out.println( " Set and Check the Logger Level" ); + log1 = false; + log2 = false; ++ + try { + // Set the level of logger1 to ALL + params = new Object[2]; +--- ./jdk/test/java/lang/ref/FinalizeOverride.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/lang/ref/FinalizeOverride.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -58021,380 +102696,1152 @@ + * questions. + */ + -+#include -+#include -+#include -+#include -+#include -+#include -+#include ++import java.io.ByteArrayOutputStream; ++import java.io.IOException; ++import java.nio.file.Files; ++import java.nio.file.Path; ++import java.nio.file.Paths; ++import java.util.concurrent.atomic.AtomicInteger; + -+#include "childproc.h" ++/* @test ++ * @bug 8027351 ++ * @summary Basic test of the finalize method ++ */ + ++public class FinalizeOverride { ++ // finalizedCount is incremented when the finalize method is invoked ++ private static AtomicInteger finalizedCount = new AtomicInteger(); + -+ssize_t -+restartableWrite(int fd, const void *buf, size_t count) -+{ -+ ssize_t result; -+ RESTARTABLE(write(fd, buf, count), result); -+ return result; -+} ++ // finalizedSum and privateFinalizedInvoke are used to verify ++ // the right overrided finalize method is invoked ++ private static AtomicInteger finalizedSum = new AtomicInteger(); ++ private static volatile boolean privateFinalizeInvoked = false; + -+int -+restartableDup2(int fd_from, int fd_to) -+{ -+ int err; -+ RESTARTABLE(dup2(fd_from, fd_to), err); -+ return err; -+} ++ public static void main(String[] argvs) throws IOException { ++ patchPrivateFinalize(); + -+int -+closeSafely(int fd) -+{ -+ return (fd == -1) ? 0 : close(fd); -+} ++ test(new Base(10), 10); ++ test(new Subclass(20), 0); ++ test(new SubSubclass(30), 30); ++ test(new PublicFinalize(40), 40*100+40); ++ test(new PrivateFinalize(50), 50); ++ test(new NoOverride(60), 60); ++ } + -+int -+isAsciiDigit(char c) -+{ -+ return c >= '0' && c <= '9'; -+} ++ static void test(Object o, int expected) { ++ int count = finalizedCount.get(); ++ int sum = finalizedSum.get(); ++ privateFinalizeInvoked = false; + -+#if defined(__OpenBSD__) -+int -+closeDescriptors(void) -+{ -+ int err; -+ RESTARTABLE(closefrom(FAIL_FILENO + 1), err); -+ return err; -+} -+#else ++ // force GC and finalization ++ o = null; ++ while (finalizedCount.get() != (count+1)) { ++ System.gc(); ++ System.runFinalization(); ++ } + -+#ifdef _ALLBSD_SOURCE -+#define FD_DIR "/dev/fd" -+#define dirent64 dirent -+#define readdir64 readdir -+#else -+#define FD_DIR "/proc/self/fd" -+#endif ++ if (privateFinalizeInvoked) { ++ throw new RuntimeException("private finalize method invoked"); ++ } ++ if (finalizedCount.get() != (count+1)) { ++ throw new RuntimeException("Unexpected count=" + finalizedCount + ++ " expected=" + (count+1)); ++ } ++ if (finalizedSum.get() != (sum+expected)) { ++ throw new RuntimeException("Unexpected sum=" + finalizedSum + ++ " prev=" + sum + " value=" + expected); ++ } ++ } + -+int -+closeDescriptors(void) -+{ -+ DIR *dp; -+ struct dirent64 *dirp; -+ int from_fd = FAIL_FILENO + 1; ++ static void patchPrivateFinalize() throws IOException { ++ // patch the private f_nal_ze method name to "finalize" ++ String testClasses = System.getProperty("test.classes", "."); ++ Path p = Paths.get(testClasses, "FinalizeOverride$PrivateFinalize.class"); ++ byte[] bytes = Files.readAllBytes(p); ++ int len = "f_nal_ze".length(); ++ for (int i=0; i < bytes.length-len; i++) { ++ if (bytes[i] == 'f' && ++ bytes[i+1] == '_' && ++ bytes[i+2] == 'n' && ++ bytes[i+3] == 'a' && ++ bytes[i+4] == 'l' && ++ bytes[i+5] == '_' && ++ bytes[i+6] == 'z' && ++ bytes[i+7] == 'e') ++ { ++ // s%_%i% ++ bytes[i+1] = 'i'; ++ bytes[i+5] = 'i'; ++ break; ++ } ++ } ++ Files.write(p, bytes); ++ } + -+ /* We're trying to close all file descriptors, but opendir() might -+ * itself be implemented using a file descriptor, and we certainly -+ * don't want to close that while it's in use. We assume that if -+ * opendir() is implemented using a file descriptor, then it uses -+ * the lowest numbered file descriptor, just like open(). So we -+ * close a couple explicitly. */ ++ static class Base { ++ protected int value; ++ Base(int v) { ++ this.value = v; ++ } ++ int called() { ++ finalizedSum.addAndGet(value); ++ return value; ++ } ++ protected void finalize() { ++ System.out.println("Base.finalize() sum += " + called()); ++ finalizedCount.incrementAndGet(); ++ } ++ } ++ static class PublicFinalize extends Base { ++ PublicFinalize(int v) { ++ super(v); ++ } ++ public void finalize() { ++ finalizedSum.addAndGet(value * 100); ++ System.out.println("PublicFinalize.finalize() sum += " + called() + ++ "+"+value+"*100"); ++ finalizedCount.incrementAndGet(); ++ } ++ } ++ static class Subclass extends Base { ++ Subclass(int v) { ++ super(v); ++ } ++ protected void finalize() { ++ // no value added to sum ++ System.out.println("Subclass.finalize() sum += 0"); ++ finalizedCount.incrementAndGet(); ++ } ++ } ++ static class SubSubclass extends Subclass { ++ SubSubclass(int v) { ++ super(v); ++ } ++ protected final void finalize() { ++ finalizedSum.addAndGet(value); ++ System.out.println("SubSubclass.finalize() sum +=" +value); ++ finalizedCount.incrementAndGet(); ++ } ++ } ++ static class PrivateFinalize extends Base { ++ PrivateFinalize(int v) { ++ super(v); ++ } ++ private void f_nal_ze() { ++ // finalization catches any exception ++ System.out.println("Error: private finalize invoked!!"); ++ privateFinalizeInvoked = true; ++ finalizedCount.incrementAndGet(); ++ } ++ } ++ static class NoOverride extends PrivateFinalize { ++ NoOverride(int v) { ++ super(v); ++ } ++ } ++} +--- ./jdk/test/java/net/Authenticator/B4769350.java 2013-09-06 11:29:36.000000000 -0700 ++++ ./jdk/test/java/net/Authenticator/B4769350.java 2014-06-06 19:56:29.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,9 +23,7 @@ + + /** + * @test +- * @bug 4769350 +- * @library ../../../sun/net/www/httptest/ +- * @build HttpCallback HttpServer ClosedChannelList HttpTransaction AbstractCallback ++ * @bug 4769350 8017779 + * @run main/othervm B4769350 server + * @run main/othervm B4769350 proxy + * @summary proxy authentication username and password caching only works in serial case +@@ -34,8 +32,17 @@ + * tests may already have invoked the HTTP handler. + */ + ++import com.sun.net.httpserver.HttpExchange; ++import com.sun.net.httpserver.HttpHandler; ++import com.sun.net.httpserver.HttpServer; + import java.io.*; + import java.net.*; ++import java.util.concurrent.BrokenBarrierException; ++import java.util.concurrent.CountDownLatch; ++import java.util.concurrent.CyclicBarrier; ++import java.util.concurrent.Executor; ++import java.util.concurrent.ExecutorService; ++import java.util.concurrent.Executors; + + public class B4769350 { + +@@ -43,13 +50,12 @@ + static boolean error = false; + + static void read (InputStream is) throws IOException { +- int c; +- while ((c=is.read()) != -1) { ++ while (is.read() != -1) { + //System.out.write (c); + } + } + +- static class Client extends Thread { ++ static class Client extends Thread { + String authority, path; + boolean allowerror; + +@@ -64,8 +70,8 @@ + try { + URI u = new URI ("http", authority, path, null, null); + URL url = u.toURL(); +- URLConnection urlc = url.openConnection (); +- InputStream is = urlc.getInputStream (); ++ URLConnection urlc = url.openConnection(); ++ InputStream is = urlc.getInputStream(); + read (is); + is.close(); + } catch (URISyntaxException e) { +@@ -73,7 +79,8 @@ + error = true; + } catch (IOException e) { + if (!allowerror) { +- System.out.println (Thread.currentThread().getName() + " " + e); ++ System.out.println (Thread.currentThread().getName() ++ + " " + e); + e.printStackTrace(); + error = true; + } +@@ -81,55 +88,58 @@ + } + } + +- static class CallBack extends AbstractCallback { ++ class Server implements AutoCloseable { ++ HttpServer server; ++ Executor executor; ++ CyclicBarrier t1Cond1; ++ CyclicBarrier t1Cond2; + +- void errorReply (HttpTransaction req, String reply) throws IOException { +- req.addResponseHeader ("Connection", "close"); +- req.addResponseHeader ("WWW-Authenticate", reply); +- req.sendResponse (401, "Unauthorized"); +- req.orderlyClose(); ++ public String getAddress() { ++ return server.getAddress().getHostName(); + } + +- void proxyReply (HttpTransaction req, String reply) throws IOException { +- req.addResponseHeader ("Proxy-Authenticate", reply); +- req.sendResponse (407, "Proxy Authentication Required"); +- } +- +- void okReply (HttpTransaction req) throws IOException { +- req.addResponseHeader ("Connection", "close"); +- req.setResponseEntityBody ("Hello ."); +- req.sendResponse (200, "Ok"); +- req.orderlyClose(); +- } ++ public void startServer() { ++ InetSocketAddress addr = new InetSocketAddress(0); + +- public void request (HttpTransaction req, int count) { + try { +- URI uri = req.getRequestURI(); +- String path = uri.getPath(); +- if (path.endsWith ("/t1a")) { +- doT1a (req, count); +- } else if (path.endsWith ("/t1b")) { +- doT1b (req, count); +- } else if (path.endsWith ("/t1c")) { +- doT1c (req, count); +- } else if (path.endsWith ("/t1d")) { +- doT1d (req, count); +- } else if (path.endsWith ("/t2a")) { +- doT2a (req, count); +- } else if (path.endsWith ("/t2b")) { +- doT2b (req, count); +- } else if (path.endsWith ("/t3a")) { +- doT3a (req, count); +- } else if (path.endsWith ("/t3b")) { +- doT3bc (req, count); +- } else if (path.endsWith ("/t3c")) { +- doT3bc (req, count); +- } else { +- System.out.println ("unexpected request URI"); +- } +- } catch (IOException e) { +- e.printStackTrace(); +- } ++ server = HttpServer.create(addr, 0); ++ } catch (IOException ioe) { ++ throw new RuntimeException("Server could not be created"); ++ } ++ executor = Executors.newFixedThreadPool(10); ++ server.setExecutor(executor); ++ server.createContext("/test/realm1/t1a", ++ new AuthenticationHandlerT1a() ); ++ server.createContext("/test/realm2/t1b", ++ new AuthenticationHandlerT1b()); ++ server.createContext("/test/realm1/t1c", ++ new AuthenticationHandlerT1c()); ++ server.createContext("/test/realm2/t1d", ++ new AuthenticationHandlerT1d()); ++ server.createContext("/test/realm3/t2a", ++ new AuthenticationHandlerT2a()); ++ server.createContext("/test/realm3/t2b", ++ new AuthenticationHandlerT2b()); ++ server.createContext("/test/realm4/t3a", ++ new AuthenticationHandlerT3a()); ++ server.createContext("/test/realm4/t3b", ++ new AuthenticationHandlerT3bc()); ++ server.createContext("/test/realm4/t3c", ++ new AuthenticationHandlerT3bc()); ++ t1Cond1 = new CyclicBarrier(2); ++ t1Cond2 = new CyclicBarrier(2); ++ server.start(); ++ } + -+ close(from_fd); /* for possible use by opendir() */ -+ close(from_fd + 1); /* another one for good luck */ ++ public int getPort() { ++ return server.getAddress().getPort(); ++ } + -+ if ((dp = opendir(FD_DIR)) == NULL) -+ return 0; ++ public void close() { ++ if (executor != null) ++ ((ExecutorService)executor).shutdownNow(); ++ if (server != null) ++ server.stop(0); + } + + /* T1 tests the client by sending 4 requests to 2 different realms +@@ -138,90 +148,158 @@ + * the second requests should be executed without calling the authenticator. + * The test succeeds if the authenticator was only called twice. + */ +- void doT1a (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- errorReply (req, "Basic realm=\"realm1\""); +- HttpServer.rendezvous ("one", 2); +- break; +- case 1: +- HttpServer.waitForCondition ("cond2"); +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ class AuthenticationHandlerT1a implements HttpHandler ++ { ++ volatile int count = -1; + -+ /* We use readdir64 instead of readdir to work around Solaris bug -+ * 6395699: /proc/self/fd fails to report file descriptors >= 1024 on Solaris 9 -+ */ -+ while ((dirp = readdir64(dp)) != NULL) { -+ int fd; -+ if (isAsciiDigit(dirp->d_name[0]) && -+ (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd + 2) -+ close(fd); -+ } ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ try { ++ switch(count) { ++ case 0: ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm1\""); ++ break; ++ case 1: ++ t1Cond1.await(); ++ t1cond2latch.await(); ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } ++ } catch (InterruptedException | ++ BrokenBarrierException e) ++ { ++ throw new RuntimeException(e); ++ } + } + } + +- +- void doT1b (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- errorReply (req, "Basic realm=\"realm2\""); +- HttpServer.rendezvous ("one", 2); +- HttpServer.setCondition ("cond1"); +- break; +- case 1: +- HttpServer.waitForCondition ("cond2"); +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ class AuthenticationHandlerT1b implements HttpHandler ++ { ++ volatile int count = -1; + -+ closedir(dp); ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ try { ++ switch(count) { ++ case 0: ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm2\""); ++ break; ++ case 1: ++ t1Cond1.await(); ++ t1cond1latch.countDown(); ++ t1cond2latch.await(); ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } ++ } catch (InterruptedException | BrokenBarrierException e) { ++ throw new RuntimeException(e); ++ } + } + } + +- void doT1c (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- errorReply (req, "Basic realm=\"realm1\""); +- HttpServer.rendezvous ("two", 2); +- break; +- case 1: +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ class AuthenticationHandlerT1c implements HttpHandler ++ { ++ volatile int count = -1; + -+ return 1; -+} -+#endif ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ switch(count) { ++ case 0: ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm1\""); ++ try { ++ t1Cond2.await(); ++ } catch (InterruptedException | ++ BrokenBarrierException e) ++ { ++ throw new RuntimeException(e); ++ } ++ break; ++ case 1: ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } + } + } + +- void doT1d (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- errorReply (req, "Basic realm=\"realm2\""); +- HttpServer.rendezvous ("two", 2); +- HttpServer.setCondition ("cond2"); +- break; +- case 1: +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ class AuthenticationHandlerT1d implements HttpHandler ++ { ++ volatile int count = -1; + -+int -+moveDescriptor(int fd_from, int fd_to) -+{ -+ if (fd_from != fd_to) { -+ if ((restartableDup2(fd_from, fd_to) == -1) || -+ (close(fd_from) == -1)) -+ return -1; -+ } -+ return 0; -+} ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ switch(count) { ++ case 0: ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm2\""); ++ try { ++ t1Cond2.await(); ++ } catch (InterruptedException | ++ BrokenBarrierException e) ++ { ++ throw new RuntimeException(e); ++ } ++ t1cond2latch.countDown(); ++ break; ++ case 1: ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } + } + } + +- + /* T2 tests to check that if initial authentication fails, the second will + * succeed, and the authenticator is called twice + */ + +- void doT2a (HttpTransaction req, int count) throws IOException { +- /* This will be called several times */ +- if (count == 1) { +- HttpServer.setCondition ("T2cond1"); +- } +- errorReply (req, "Basic realm=\"realm3\""); +- } +- +- void doT2b (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- errorReply (req, "Basic realm=\"realm3\""); +- break; +- case 1: +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ class AuthenticationHandlerT2a implements HttpHandler ++ { ++ volatile int count = -1; + -+int -+magicNumber() { -+ return 43110; -+} ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ if (count == 1) { ++ t2condlatch.countDown(); ++ } ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm3\""); + -+/* -+ * Reads nbyte bytes from file descriptor fd into buf, -+ * The read operation is retried in case of EINTR or partial reads. -+ * -+ * Returns number of bytes read (normally nbyte, but may be less in -+ * case of EOF). In case of read errors, returns -1 and sets errno. -+ */ -+ssize_t -+readFully(int fd, void *buf, size_t nbyte) -+{ -+ ssize_t remaining = nbyte; -+ for (;;) { -+ ssize_t n = read(fd, buf, remaining); -+ if (n == 0) { -+ return nbyte - remaining; -+ } else if (n > 0) { -+ remaining -= n; -+ if (remaining <= 0) -+ return nbyte; -+ /* We were interrupted in the middle of reading the bytes. -+ * Unlikely, but possible. */ -+ buf = (void *) (((char *)buf) + n); -+ } else if (errno == EINTR) { -+ /* Strange signals like SIGJVM1 are possible at any time. -+ * See http://www.dreamsongs.com/WorseIsBetter.html */ -+ } else { -+ return -1; ++ } + } ++ ++ class AuthenticationHandlerT2b implements HttpHandler ++ { ++ volatile int count = -1; ++ ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ switch(count) { ++ case 0: ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm3\""); ++ break; ++ case 1: ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } + } + } + +@@ -229,36 +307,82 @@ + * resource at same time. Authenticator should be called once for server + * and once for proxy + */ +- void doT3a (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- proxyReply (req, "Basic realm=\"proxy\""); +- HttpServer.setCondition ("T3cond1"); +- break; +- case 1: +- errorReply (req, "Basic realm=\"realm4\""); +- break; +- case 2: +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ ++ class AuthenticationHandlerT3a implements HttpHandler ++ { ++ volatile int count = -1; ++ ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ switch(count) { ++ case 0: ++ AuthenticationHandler.proxyReply(exchange, ++ "Basic realm=\"proxy\""); ++ break; ++ case 1: ++ t3cond1.countDown(); ++ AuthenticationHandler.errorReply(exchange, ++ "Basic realm=\"realm4\""); ++ break; ++ case 2: ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } + } + } + +- void doT3bc (HttpTransaction req, int count) throws IOException { +- switch (count) { +- case 0: +- proxyReply (req, "Basic realm=\"proxy\""); +- break; +- case 1: +- okReply (req); +- break; +- default: +- System.out.println ("Unexpected request"); ++ class AuthenticationHandlerT3bc implements HttpHandler ++ { ++ volatile int count = -1; ++ ++ @Override ++ public void handle(HttpExchange exchange) throws IOException { ++ count++; ++ switch(count) { ++ case 0: ++ AuthenticationHandler.proxyReply(exchange, ++ "Basic realm=\"proxy\""); ++ break; ++ case 1: ++ AuthenticationHandler.okReply(exchange); ++ break; ++ default: ++ System.out.println ("Unexpected request"); ++ } + } + } +- }; + } -+} + -+void -+initVectorFromBlock(const char**vector, const char* block, int count) -+{ -+ int i; -+ const char *p; -+ for (i = 0, p = block; i < count; i++) { -+ /* Invariant: p always points to the start of a C string. */ -+ vector[i] = p; -+ while (*(p++)); ++ static class AuthenticationHandler { ++ static void errorReply(HttpExchange exchange, String reply) ++ throws IOException ++ { ++ exchange.getResponseHeaders().add("Connection", "close"); ++ exchange.getResponseHeaders().add("WWW-Authenticate", reply); ++ exchange.sendResponseHeaders(401, 0); ++ exchange.close(); ++ } ++ ++ static void proxyReply (HttpExchange exchange, String reply) ++ throws IOException ++ { ++ exchange.getResponseHeaders().add("Proxy-Authenticate", reply); ++ exchange.sendResponseHeaders(407, 0); ++ } ++ ++ static void okReply (HttpExchange exchange) throws IOException { ++ exchange.getResponseHeaders().add("Connection", "close"); ++ String response = "Hello ."; ++ exchange.sendResponseHeaders(200, response.getBytes().length); ++ OutputStream os = exchange.getResponseBody(); ++ os.write(response.getBytes()); ++ os.close(); ++ exchange.close(); ++ } + } -+ vector[count] = NULL; -+} + + static HttpServer server; + static MyAuthenticator auth = new MyAuthenticator (); +@@ -267,7 +391,14 @@ + + static Client c1,c2,c3,c4,c5,c6,c7,c8,c9; + +- static void doServerTests (String authority) throws Exception { ++ static CountDownLatch t1cond1latch; ++ static CountDownLatch t1cond2latch; ++ static CountDownLatch t2condlatch; ++ static CountDownLatch t3cond1; + -+/** -+ * Exec FILE as a traditional Bourne shell script (i.e. one without #!). -+ * If we could do it over again, we would probably not support such an ancient -+ * misfeature, but compatibility wins over sanity. The original support for -+ * this was imported accidentally from execvp(). -+ */ -+void -+execve_as_traditional_shell_script(const char *file, -+ const char *argv[], -+ const char *const envp[]) -+{ -+ /* Use the extra word of space provided for us in argv by caller. */ -+ const char *argv0 = argv[0]; -+ const char *const *end = argv; -+ while (*end != NULL) -+ ++end; -+ memmove(argv+2, argv+1, (end-argv) * sizeof(*end)); -+ argv[0] = "/bin/sh"; -+ argv[1] = file; -+ execve(argv[0], (char **) argv, (char **) envp); -+ /* Can't even exec /bin/sh? Big trouble, but let's soldier on... */ -+ memmove(argv+1, argv+2, (end-argv) * sizeof(*end)); -+ argv[0] = argv0; -+} ++ static void doServerTests (String authority, Server server) throws Exception ++ { + -+/** -+ * Like execve(2), except that in case of ENOEXEC, FILE is assumed to -+ * be a shell script and the system default shell is invoked to run it. -+ */ -+void -+execve_with_shell_fallback(int mode, const char *file, -+ const char *argv[], -+ const char *const envp[]) -+{ -+ if (mode == MODE_CLONE || mode == MODE_VFORK) { -+ /* shared address space; be very careful. */ -+ execve(file, (char **) argv, (char **) envp); -+ if (errno == ENOEXEC) -+ execve_as_traditional_shell_script(file, argv, envp); -+ } else { -+ /* unshared address space; we can mutate environ. */ -+ environ = (char **) envp; -+ execvp(file, (char **) argv); + System.out.println ("Doing Server tests"); + System.out.println ("T1"); + c1 = new Client (authority, "/test/realm1/t1a", false); +@@ -275,17 +406,20 @@ + c3 = new Client (authority, "/test/realm1/t1c", false); + c4 = new Client (authority, "/test/realm2/t1d", false); + ++ t1cond1latch = new CountDownLatch(1); ++ t1cond2latch = new CountDownLatch(1); + c1.start(); c2.start(); +- HttpServer.waitForCondition ("cond1"); ++ t1cond1latch.await(); + c3.start(); c4.start(); + c1.join(); c2.join(); c3.join(); c4.join(); + + int f = auth.getCount(); + if (f != 2) { +- except ("Authenticator was called "+f+" times. Should be 2"); ++ except ("Authenticator was called "+f+" times. Should be 2", ++ server); + } + if (error) { +- except ("error occurred"); ++ except ("error occurred", server); + } + + auth.resetCount(); +@@ -293,73 +427,71 @@ + + c5 = new Client (authority, "/test/realm3/t2a", true); + c6 = new Client (authority, "/test/realm3/t2b", false); ++ t2condlatch = new CountDownLatch(1); + c5.start (); +- HttpServer.waitForCondition ("T2cond1"); ++ t2condlatch.await(); + c6.start (); + c5.join(); c6.join(); + + f = auth.getCount(); + if (f != redirects+1) { +- except ("Authenticator was called "+f+" times. Should be: " + redirects+1); ++ except ("Authenticator was called "+f+" times. Should be: " ++ + redirects+1, server); + } + if (error) { +- except ("error occurred"); ++ except ("error occurred", server); + } + } + +- static void doProxyTests (String authority) throws Exception { ++ static void doProxyTests (String authority, Server server) throws Exception ++ { + System.out.println ("Doing Proxy tests"); + c7 = new Client (authority, "/test/realm4/t3a", false); + c8 = new Client (authority, "/test/realm4/t3b", false); + c9 = new Client (authority, "/test/realm4/t3c", false); ++ t3cond1 = new CountDownLatch(1); + c7.start (); +- HttpServer.waitForCondition ("T3cond1"); ++ t3cond1.await(); + c8.start (); + c9.start (); + c7.join(); c8.join(); c9.join(); + + int f = auth.getCount(); + if (f != 2) { +- except ("Authenticator was called "+f+" times. Should be: " + 2); ++ except ("Authenticator was called "+f+" times. Should be: " + 2, ++ server); + } + if (error) { +- except ("error occurred"); ++ except ("error occurred", server); + } + } + + public static void main (String[] args) throws Exception { ++ new B4769350().runTest(args[0].equals ("proxy")); + } -+} + -+/** -+ * 'execvpe' should have been included in the Unix standards, -+ * and is a GNU extension in glibc 2.10. ++ public void runTest(boolean proxy) throws Exception { + System.setProperty ("http.maxRedirects", Integer.toString (redirects)); + System.setProperty ("http.auth.serializeRequests", "true"); + Authenticator.setDefault (auth); +- boolean proxy = args[0].equals ("proxy"); +- try { +- server = new HttpServer (new CallBack(), 10, 1, 0); +- System.out.println ("Server: listening on port: " + server.getLocalPort()); ++ try (Server server = new Server()) { ++ server.startServer(); ++ System.out.println ("Server: listening on port: " ++ + server.getPort()); + if (proxy) { + System.setProperty ("http.proxyHost", "localhost"); +- System.setProperty ("http.proxyPort",Integer.toString(server.getLocalPort())); +- doProxyTests ("www.foo.com"); ++ System.setProperty ("http.proxyPort", ++ Integer.toString(server.getPort())); ++ doProxyTests ("www.foo.com", server); + } else { +- doServerTests ("localhost:"+server.getLocalPort()); ++ doServerTests ("localhost:"+server.getPort(), server); + } +- server.terminate(); +- +- } catch (Exception e) { +- if (server != null) { +- server.terminate(); +- } +- throw e; + } +- } + +- static void pause (int millis) { +- try { +- Thread.sleep (millis); +- } catch (InterruptedException e) {} + } + +- public static void except (String s) { +- server.terminate(); ++ public static void except (String s, Server server) { ++ server.close(); + throw new RuntimeException (s); + } + +@@ -368,13 +500,10 @@ + super (); + } + +- int count = 0; ++ volatile int count = 0; + ++ @Override + public PasswordAuthentication getPasswordAuthentication () { +- //System.out.println ("Authenticator called: " + getRequestingPrompt()); +- //try { +- //Thread.sleep (1000); +- //} catch (InterruptedException e) {} + PasswordAuthentication pw; + pw = new PasswordAuthentication ("user", "pass1".toCharArray()); + count ++; +@@ -386,7 +515,7 @@ + } + + public int getCount () { +- return (count); ++ return count; + } + } + } +--- ./jdk/test/java/net/Authenticator/B4933582.sh 2013-09-06 11:29:36.000000000 -0700 ++++ ./jdk/test/java/net/Authenticator/B4933582.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -26,7 +26,7 @@ + + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2013-09-06 11:29:36.000000000 -0700 ++++ ./jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2014-06-06 19:56:34.000000000 -0700 +@@ -45,6 +45,8 @@ + return (true); + if (p.getProperty ("os.name").equals ("Linux")) + return (true); ++ if (p.getProperty ("os.name").endsWith ("BSD")) ++ return (true); + if (p.getProperty ("os.name").startsWith ("Mac OS")) + return (true); + // Check for specific Solaris version from here +--- ./jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2013-09-06 11:29:36.000000000 -0700 ++++ ./jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -27,11 +27,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Darwin ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Linux ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/net/IDN/UseSTD3ASCIIRules.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/net/IDN/UseSTD3ASCIIRules.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,80 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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). + * -+ * JDK_execvpe is identical to execvp, except that the child environment is -+ * specified via the 3rd argument instead of being inherited from environ. ++ * 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. + */ -+void -+JDK_execvpe(int mode, const char *file, -+ const char *argv[], -+ const char *const envp[]) -+{ -+ if (envp == NULL || (char **) envp == environ) { -+ execvp(file, (char **) argv); -+ return; -+ } + -+ if (*file == '\0') { -+ errno = ENOENT; -+ return; -+ } ++/* ++ * @test ++ * @bug 8023881 ++ * @summary IDN.USE_STD3_ASCII_RULES option is too strict to use Unicode ++ * in IDN.toASCII ++ */ + -+ if (strchr(file, '/') != NULL) { -+ execve_with_shell_fallback(mode, file, argv, envp); -+ } else { -+ /* We must search PATH (parent's, not child's) */ -+ char expanded_file[PATH_MAX]; -+ int filelen = strlen(file); -+ int sticky_errno = 0; -+ const char * const * dirs; -+ for (dirs = parentPathv; *dirs; dirs++) { -+ const char * dir = *dirs; -+ int dirlen = strlen(dir); -+ if (filelen + dirlen + 2 >= PATH_MAX) { -+ errno = ENAMETOOLONG; -+ continue; -+ } -+ memcpy(expanded_file, dir, dirlen); -+ if (expanded_file[dirlen - 1] != '/') -+ expanded_file[dirlen++] = '/'; -+ memcpy(expanded_file + dirlen, file, filelen); -+ expanded_file[dirlen + filelen] = '\0'; -+ execve_with_shell_fallback(mode, expanded_file, argv, envp); -+ /* There are 3 responses to various classes of errno: -+ * return immediately, continue (especially for ENOENT), -+ * or continue with "sticky" errno. -+ * -+ * From exec(3): -+ * -+ * If permission is denied for a file (the attempted -+ * execve returned EACCES), these functions will continue -+ * searching the rest of the search path. If no other -+ * file is found, however, they will return with the -+ * global variable errno set to EACCES. -+ */ -+ switch (errno) { -+ case EACCES: -+ sticky_errno = errno; -+ /* FALLTHRU */ -+ case ENOENT: -+ case ENOTDIR: -+#ifdef ELOOP -+ case ELOOP: -+#endif -+#ifdef ESTALE -+ case ESTALE: -+#endif -+#ifdef ENODEV -+ case ENODEV: -+#endif -+#ifdef ETIMEDOUT -+ case ETIMEDOUT: -+#endif -+ break; /* Try other directories in PATH */ -+ default: -+ return; ++import java.net.*; ++ ++public class UseSTD3ASCIIRules { ++ ++ public static void main(String[] args) throws Exception { ++ // Per Section 4.1, RFC 3490, if the UseSTD3ASCIIRules flag is set, ++ // then perform these checks: ++ // ++ // (a) Verify the absence of non-LDH ASCII code points; that is, the ++ // absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F. ++ // ++ // (b) Verify the absence of leading and trailing hyphen-minus; that ++ // is, the absence of U+002D at the beginning and end of the ++ // sequence. ++ String[] illegalNames = { ++ "www.example.com-", ++ "-www.example.com", ++ "-www.example.com-", ++ "www.ex\u002Cmple.com", ++ "www.ex\u007Bmple.com", ++ "www.ex\u007Fmple.com" ++ }; ++ ++ String[] legalNames = { ++ "www.ex-ample.com", ++ "www.ex\u002Dmple.com", // www.ex-mple.com ++ "www.ex\u007Ample.com", // www.exzmple.com ++ "www.ex\u3042mple.com", // www.xn--exmple-j43e.com ++ "www.\u3042\u3044\u3046.com", // www.xn--l8jeg.com ++ "www.\u793A\u4F8B.com" // www.xn--fsq092h.com ++ }; ++ ++ for (String name : illegalNames) { ++ try { ++ System.out.println("Convering illegal IDN: " + name); ++ IDN.toASCII(name, IDN.USE_STD3_ASCII_RULES); ++ throw new Exception( ++ "Expected to get IllegalArgumentException for " + name); ++ } catch (IllegalArgumentException iae) { ++ // That's the right behavior. + } + } -+ if (sticky_errno != 0) -+ errno = sticky_errno; ++ ++ for (String name : legalNames) { ++ System.out.println("Convering legal IDN: " + name); ++ System.out.println("\tThe ACE form is: " + ++ IDN.toASCII(name, IDN.USE_STD3_ASCII_RULES)); ++ } + } +} +--- ./jdk/test/java/net/Inet6Address/serialize/Serialize.java 2013-09-06 11:29:37.000000000 -0700 ++++ ./jdk/test/java/net/Inet6Address/serialize/Serialize.java 2013-12-01 11:14:30.000000000 -0800 +@@ -94,7 +94,26 @@ + } finally { + ois.close(); + } +- System.out.println(nobj); + -+/** -+ * Child process after a successful fork() or clone(). -+ * This function must not return, and must be prepared for either all -+ * of its address space to be shared with its parent, or to be a copy. -+ * It must not modify global variables such as "environ". -+ */ -+int -+childProcess(void *arg) -+{ -+ const ChildStuff* p = (const ChildStuff*) arg; -+ -+ /* Close the parent sides of the pipes. -+ Closing pipe fds here is redundant, since closeDescriptors() -+ would do it anyways, but a little paranoia is a good thing. */ -+ if ((closeSafely(p->in[1]) == -1) || -+ (closeSafely(p->out[0]) == -1) || -+ (closeSafely(p->err[0]) == -1) || -+ (closeSafely(p->childenv[0]) == -1) || -+ (closeSafely(p->childenv[1]) == -1) || -+ (closeSafely(p->fail[0]) == -1)) -+ goto WhyCantJohnnyExec; -+ -+ /* Give the child sides of the pipes the right fileno's. */ -+ /* Note: it is possible for in[0] == 0 */ -+ if ((moveDescriptor(p->in[0] != -1 ? p->in[0] : p->fds[0], -+ STDIN_FILENO) == -1) || -+ (moveDescriptor(p->out[1]!= -1 ? p->out[1] : p->fds[1], -+ STDOUT_FILENO) == -1)) -+ goto WhyCantJohnnyExec; ++ nobj = (Inet6Address)InetAddress.getByAddress("foo.com", new byte[] { ++ (byte)0xfe,(byte)0x80,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0, ++ (byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)1 ++ }); ++ if (!test1(nobj, addr1)) { ++ throw new RuntimeException("failed with " + nobj.toString()); ++ } ++ nobj = (Inet6Address)InetAddress.getByAddress("x.bar.com", new byte[] { ++ (byte)0xfe,(byte)0xC0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0, ++ (byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)1 ++ }); ++ if (!test1(nobj, addr2)) { ++ throw new RuntimeException("failed with " + nobj.toString()); ++ } ++ nobj = (Inet6Address)InetAddress.getByName("::1"); ++ if (!test1(nobj, addr3)) { ++ throw new RuntimeException("failed with " + nobj.toString()); ++ } + -+ if (p->redirectErrorStream) { -+ if ((closeSafely(p->err[1]) == -1) || -+ (restartableDup2(STDOUT_FILENO, STDERR_FILENO) == -1)) -+ goto WhyCantJohnnyExec; -+ } else { -+ if (moveDescriptor(p->err[1] != -1 ? p->err[1] : p->fds[2], -+ STDERR_FILENO) == -1) -+ goto WhyCantJohnnyExec; -+ } + System.out.println("All tests passed"); + } + +@@ -113,4 +132,162 @@ + return false; + } + } +- } + -+ if (moveDescriptor(p->fail[1], FAIL_FILENO) == -1) -+ goto WhyCantJohnnyExec; ++ static boolean test1 (Inet6Address obj, byte[] buf) throws Exception { ++ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buf)); ++ Inet6Address nobj = (Inet6Address) ois.readObject(); ++ ois.close(); + -+ /* close everything */ -+ if (closeDescriptors() == 0) { /* failed, close the old way */ -+ int max_fd = (int)sysconf(_SC_OPEN_MAX); -+ int fd; -+ for (fd = FAIL_FILENO + 1; fd < max_fd; fd++) -+ if (close(fd) == -1 && errno != EBADF) -+ goto WhyCantJohnnyExec; ++ if (nobj.equals(obj)) { ++ return true; ++ } else { ++ return false; ++ } + } + -+ /* change to the new working directory */ -+ if (p->pdir != NULL && chdir(p->pdir) < 0) -+ goto WhyCantJohnnyExec; ++ // Inet6Address instances serialized with JDK 6 + -+ if (fcntl(FAIL_FILENO, F_SETFD, FD_CLOEXEC) == -1) -+ goto WhyCantJohnnyExec; ++ static byte[] addr1 = { ++ (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72, ++ (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, ++ (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49, ++ (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64, ++ (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f, ++ (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80, ++ (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00, ++ (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65, ++ (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c, ++ (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f, ++ (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74, ++ (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f, ++ (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e, ++ (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65, ++ (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66, ++ (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00, ++ (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, ++ (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f, ++ (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67, ++ (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70, ++ (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73, ++ (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42, ++ (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61, ++ (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74, ++ (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41, ++ (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73, ++ (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3, ++ (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49, ++ (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72, ++ (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06, ++ (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79, ++ (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73, ++ (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71, ++ (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x02,(byte)0x74,(byte)0x00,(byte)0x07,(byte)0x66, ++ (byte)0x6f,(byte)0x6f,(byte)0x2e,(byte)0x63,(byte)0x6f,(byte)0x6d, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x70,(byte)0x75,(byte)0x72,(byte)0x00,(byte)0x02,(byte)0x5b, ++ (byte)0x42,(byte)0xac,(byte)0xf3,(byte)0x17,(byte)0xf8,(byte)0x06, ++ (byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02,(byte)0x00,(byte)0x00, ++ (byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x10, ++ (byte)0xfe,(byte)0x80,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x78 ++ }; + -+ JDK_execvpe(p->mode, p->argv[0], p->argv, p->envv); ++ static byte[] addr2 = { ++ (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72, ++ (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, ++ (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49, ++ (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64, ++ (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f, ++ (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80, ++ (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00, ++ (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65, ++ (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c, ++ (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f, ++ (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74, ++ (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f, ++ (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e, ++ (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65, ++ (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66, ++ (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00, ++ (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, ++ (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f, ++ (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67, ++ (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70, ++ (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73, ++ (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42, ++ (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61, ++ (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74, ++ (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41, ++ (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73, ++ (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3, ++ (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49, ++ (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72, ++ (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06, ++ (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79, ++ (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73, ++ (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71, ++ (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x02,(byte)0x74,(byte)0x00,(byte)0x09,(byte)0x78, ++ (byte)0x2e,(byte)0x62,(byte)0x61,(byte)0x72,(byte)0x2e,(byte)0x63, ++ (byte)0x6f,(byte)0x6d,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x70,(byte)0x75,(byte)0x72,(byte)0x00, ++ (byte)0x02,(byte)0x5b,(byte)0x42,(byte)0xac,(byte)0xf3,(byte)0x17, ++ (byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02, ++ (byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x10,(byte)0xfe,(byte)0xc0,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01, ++ (byte)0x78 ++ }; + -+ WhyCantJohnnyExec: -+ /* We used to go to an awful lot of trouble to predict whether the -+ * child would fail, but there is no reliable way to predict the -+ * success of an operation without *trying* it, and there's no way -+ * to try a chdir or exec in the parent. Instead, all we need is a -+ * way to communicate any failure back to the parent. Easy; we just -+ * send the errno back to the parent over a pipe in case of failure. -+ * The tricky thing is, how do we communicate the *success* of exec? -+ * We use FD_CLOEXEC together with the fact that a read() on a pipe -+ * yields EOF when the write ends (we have two of them!) are closed. -+ */ -+ { -+ int errnum = errno; -+ restartableWrite(FAIL_FILENO, &errnum, sizeof(errnum)); -+ } -+ close(FAIL_FILENO); -+ _exit(-1); -+ return 0; /* Suppress warning "no return value from function" */ ++ static byte[] addr3 = { ++ (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72, ++ (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, ++ (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49, ++ (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64, ++ (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f, ++ (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80, ++ (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00, ++ (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65, ++ (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c, ++ (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f, ++ (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74, ++ (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f, ++ (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e, ++ (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65, ++ (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66, ++ (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00, ++ (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, ++ (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f, ++ (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67, ++ (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70, ++ (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73, ++ (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42, ++ (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61, ++ (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74, ++ (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41, ++ (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73, ++ (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3, ++ (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49, ++ (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72, ++ (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06, ++ (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79, ++ (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73, ++ (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71, ++ (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x02,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x70,(byte)0x75,(byte)0x72, ++ (byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42,(byte)0xac,(byte)0xf3, ++ (byte)0x17,(byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0, ++ (byte)0x02,(byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x10,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, ++ (byte)0x01,(byte)0x78 ++ }; +} ---- jdk/src/solaris/native/java/lang/childproc.h 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/solaris/native/java/lang/childproc.h 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,145 @@ +--- ./jdk/test/java/net/PlainSocketImpl/CustomSocketImplFactory.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/net/PlainSocketImpl/CustomSocketImplFactory.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,107 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -58411,169 +103858,100 @@ + * questions. + */ + -+#ifndef CHILDPROC_MD_H -+#define CHILDPROC_MD_H ++/* ++ * @test ++ * @bug 8024952 ++ * @summary ClassCastException in PlainSocketImpl.accept() when using custom socketImpl ++ * @run main/othervm CustomSocketImplFactory ++ */ + -+#include ++import java.net.*; ++import java.io.*; + -+#ifdef __APPLE__ -+#include -+#define environ (*_NSGetEnviron()) -+#else -+/* This is one of the rare times it's more portable to declare an -+ * external symbol explicitly, rather than via a system header. -+ * The declaration is standardized as part of UNIX98, but there is -+ * no standard (not even de-facto) header file where the -+ * declaration is to be found. See: -+ * http://www.opengroup.org/onlinepubs/009695399/functions/environ.html -+ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html -+ * -+ * "All identifiers in this volume of IEEE Std 1003.1-2001, except -+ * environ, are defined in at least one of the headers" (!) -+ */ -+extern char **environ; -+#endif ++public class CustomSocketImplFactory implements SocketImplFactory { + -+#ifdef __linux__ -+#include -+#endif ++ @Override ++ public SocketImpl createSocketImpl() { ++ try { ++ SocketImpl s = new CustomSocketImpl(); ++ System.out.println("Created " + s); ++ return s; ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } ++ } + -+#ifndef STDIN_FILENO -+#define STDIN_FILENO 0 -+#endif ++ public static void main(String[] args) throws Exception { + -+#ifndef STDOUT_FILENO -+#define STDOUT_FILENO 1 -+#endif ++ Socket.setSocketImplFactory(new CustomSocketImplFactory()); ++ try (ServerSocket ss = new ServerSocket(0)) { ++ ss.setSoTimeout(1); ++ ss.accept(); ++ System.out.println("PASS"); ++ } catch (SocketTimeoutException | NullPointerException e) { ++ // Not a real socket impl ++ } ++ } + -+#ifndef STDERR_FILENO -+#define STDERR_FILENO 2 -+#endif ++ class CustomSocketImpl extends SocketImpl { + -+#ifndef SA_NOCLDSTOP -+#define SA_NOCLDSTOP 0 -+#endif ++ public void create(boolean stream) throws IOException { ++ } + -+#ifndef SA_RESTART -+#define SA_RESTART 0 -+#endif ++ public void connect(String host, int port) throws IOException { ++ } + -+#define FAIL_FILENO (STDERR_FILENO + 1) ++ public void connect(InetAddress addr, int port) throws IOException { ++ } + -+/* TODO: Refactor. */ -+#define RESTARTABLE(_cmd, _result) do { \ -+ do { \ -+ _result = _cmd; \ -+ } while((_result == -1) && (errno == EINTR)); \ -+} while(0) ++ public void connect(SocketAddress addr, int timeout) throws IOException { ++ } + -+/* These numbers must be the same as the Enum in UNIXProcess.java -+ * Must be a better way of doing this. -+ */ -+#define MODE_FORK 1 -+#define MODE_POSIX_SPAWN 2 -+#define MODE_VFORK 3 -+#define MODE_CLONE 4 ++ public void bind(InetAddress host, int port) throws IOException { ++ } + -+typedef struct _ChildStuff -+{ -+ int in[2]; -+ int out[2]; -+ int err[2]; -+ int fail[2]; -+ int childenv[2]; -+ int fds[3]; -+ int mode; -+ const char **argv; -+ int argc; -+ const char **envv; -+ const char *pdir; -+ int redirectErrorStream; -+ void *clone_stack; -+} ChildStuff; ++ public void listen(int backlog) throws IOException { ++ } + -+/* following used in addition when mode is SPAWN */ -+typedef struct _SpawnInfo { -+ int nargv; /* number of argv array elements */ -+ int argvBytes; /* total number of bytes in argv array */ -+ int nenvv; /* number of envv array elements */ -+ int envvBytes; /* total number of bytes in envv array */ -+ int dirlen; /* length of home directory string */ -+ int nparentPathv; /* number of elements in parentPathv array */ -+ int parentPathvBytes; /* total number of bytes in parentPathv array */ -+} SpawnInfo; ++ public void accept(SocketImpl s) throws IOException { ++ } + -+/** -+ * The cached and split version of the JDK's effective PATH. -+ * (We don't support putenv("PATH=...") in native code) -+ */ -+const char * const *parentPathv; ++ public InputStream getInputStream() throws IOException { ++ return null; ++ } + -+ssize_t restartableWrite(int fd, const void *buf, size_t count); -+int restartableDup2(int fd_from, int fd_to); -+int closeSafely(int fd); -+int isAsciiDigit(char c); -+int closeDescriptors(void); -+int moveDescriptor(int fd_from, int fd_to); ++ public OutputStream getOutputStream() throws IOException { ++ return null; ++ } + -+int magicNumber(); -+ssize_t readFully(int fd, void *buf, size_t nbyte); -+void initVectorFromBlock(const char**vector, const char* block, int count); -+void execve_as_traditional_shell_script(const char *file, -+ const char *argv[], -+ const char *const envp[]); -+void execve_with_shell_fallback(int mode, const char *file, -+ const char *argv[], -+ const char *const envp[]); -+void JDK_execvpe(int mode, const char *file, -+ const char *argv[], -+ const char *const envp[]); -+int childProcess(void *arg); ++ public int available() throws IOException { ++ return 0; ++ } + -+#endif ---- jdk/src/solaris/native/java/lang/java_props_md.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/lang/java_props_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -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/lang/jspawnhelper.c 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/solaris/native/java/lang/jspawnhelper.c 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,149 @@ ++ public void close() throws IOException { ++ } ++ ++ public void sendUrgentData(int data) throws IOException { ++ } ++ ++ public Object getOption(int i) throws SocketException { ++ return null; ++ } ++ ++ public void setOption(int i, Object o) throws SocketException { ++ } ++ } ++} +--- ./jdk/test/java/net/ServerSocket/AnotherSelectFdsLimit.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/net/ServerSocket/AnotherSelectFdsLimit.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,78 @@ +/* -+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -58590,1248 +103968,3008 @@ + * questions. + */ + -+#include -+#include -+#include -+#include -+#include -+#include -+#include ++/* ++ * @test ++ * @bug 8035897 ++ * @summary FD_SETSIZE should be set on macosx ++ * @run main/othervm AnotherSelectFdsLimit 1023 ++ * @run main/othervm AnotherSelectFdsLimit 1024 ++ * @run main/othervm AnotherSelectFdsLimit 1025 ++ * @run main/othervm AnotherSelectFdsLimit 1600 ++ */ + -+#include "childproc.h" ++import java.io.IOException; ++import java.net.ServerSocket; ++import java.net.SocketTimeoutException; ++import java.util.ArrayList; ++import java.util.List; + -+extern int errno; ++public class AnotherSelectFdsLimit { ++ static final int DEFAULT_FDS_TO_USE = 1600; + -+#define ALLOC(X,Y) { \ -+ void *mptr; \ -+ mptr = malloc (Y); \ -+ if (mptr == 0) { \ -+ error (fdout, ERR_MALLOC); \ -+ } \ -+ X = mptr; \ -+} ++ public static void main(String [] args) throws Exception { ++ if (!System.getProperty("os.name").contains("OS X")) { ++ System.out.println("Test only run on MAC. Exiting."); ++ return; ++ } + -+#define ERR_MALLOC 1 -+#define ERR_PIPE 2 -+#define ERR_ARGS 3 ++ int fdsToUse = DEFAULT_FDS_TO_USE; ++ if (args.length == 1) ++ fdsToUse = Integer.parseInt(args[0]); + -+void error (int fd, int err) { -+ write (fd, &err, sizeof(err)); -+ exit (1); -+} ++ System.out.println("Using " + fdsToUse + " fds."); + -+void shutItDown() { -+ fprintf(stdout, "This command is not for general use and should "); -+ fprintf(stdout, "only be run as the result of a call to\n"); -+ fprintf(stdout, "ProcessBuilder.start() or Runtime.exec() in a java "); -+ fprintf(stdout, "application\n"); -+ _exit(1); ++ List threads = new ArrayList<>(); ++ for (int i=0; iargv, sizeof(char *) * sp.nargv); -+ initVectorFromBlock (c->argv, buf+offset, sp.nargv-1); -+ offset += sp.argvBytes; ++ //Consume FD ids for this java process to overflow the 1024 ++ openFiles(FDTOOPEN,new File(TESTFILE)); + -+ /* Initialize envv[] */ -+ if (sp.nenvv == 0) { -+ c->envv = 0; -+ } else { -+ ALLOC(c->envv, sizeof(char *) * sp.nenvv); -+ initVectorFromBlock (c->envv, buf+offset, sp.nenvv-1); -+ offset += sp.envvBytes; -+ } ++ //Wait for incoming connection and make the select() used in java.net ++ //classes fail the limitation on FDSET_SIZE ++ ServerSocket socket = new ServerSocket(0); + -+ /* Initialize pdir */ -+ if (sp.dirlen == 0) { -+ c->pdir = 0; -+ } else { -+ c->pdir = buf+offset; -+ offset += sp.dirlen; ++ //Set the minimal timeout, no one is ++ //going to connect to this server socket ++ socket.setSoTimeout(1); ++ ++ // The accept() call will throw SocketException if the ++ // select() has failed due to limitation on fds size, ++ // indicating test failure. A SocketTimeoutException ++ // is expected, so it is caught and ignored, and the test ++ // passes. ++ try { ++ socket.accept(); ++ } catch (SocketTimeoutException e) { } + } ++} +--- ./jdk/test/java/net/Socket/OldSocketImpl.sh 2013-09-06 11:29:37.000000000 -0700 ++++ ./jdk/test/java/net/Socket/OldSocketImpl.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -28,7 +28,7 @@ + + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/java/net/Socket/asyncClose/Race.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/net/Socket/asyncClose/Race.java 2014-06-06 19:56:29.000000000 -0700 +@@ -0,0 +1,77 @@ ++/* ++ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ /* Initialize parentPathv[] */ -+ ALLOC(parentPathv, sizeof (char *) * sp.nparentPathv) -+ initVectorFromBlock ((const char**)parentPathv, buf+offset, sp.nparentPathv-1); -+ offset += sp.parentPathvBytes; ++/* ++ * @test ++ * @bug 8006395 8012244 ++ * @summary Tests racing code that reads and closes a Socket ++ */ ++ ++import java.io.InputStream; ++import java.net.ServerSocket; ++import java.net.Socket; ++import java.net.SocketException; ++import java.util.concurrent.Phaser; ++ ++// Racey test, will not always fail, but if it does then we have a problem. ++ ++public class Race { ++ final static int THREADS = 100; ++ ++ public static void main(String[] args) throws Exception { ++ try (ServerSocket ss = new ServerSocket(0)) { ++ final int port = ss.getLocalPort(); ++ final Phaser phaser = new Phaser(THREADS + 1); ++ for (int i=0; i<100; i++) { ++ final Socket s = new Socket("localhost", port); ++ s.setSoLinger(false, 0); ++ try (Socket sa = ss.accept()) { ++ sa.setSoLinger(false, 0); ++ final InputStream is = s.getInputStream(); ++ Thread[] threads = new Thread[THREADS]; ++ for (int j=0; j= 0) { +- o.write (buf, 0, count); +- } +- i.close(); +- o.close(); ++ Files.copy(src.toPath(), dst.toPath(), REPLACE_EXISTING); + } catch (IOException e) { + throw new RuntimeException (e); + } + } + +- static void rm_minus_rf (File path) { +- if (!path.exists()) { ++ static void rm_minus_rf (File path) throws IOException, InterruptedException { ++ if (!path.exists()) + return; +- } +- if (path.isFile()) { +- if (!path.delete()) { +- throw new RuntimeException ("Could not delete " + path); +- } +- } else if (path.isDirectory ()) { +- String[] names = path.list(); +- File[] files = path.listFiles(); +- for (int i=0; i queue = +- new ArrayBlockingQueue(CONCURRENCY_COUNT); ++ // set to true if an I/O operation fails ++ static volatile boolean failed; ++ ++ // set to true when the test is done ++ static volatile boolean finished; + ++ public static void main(String[] args) throws Exception { + // create listener to accept connections +- final AsynchronousServerSocketChannel listener = ++ AsynchronousServerSocketChannel listener = + AsynchronousServerSocketChannel.open() + .bind(new InetSocketAddress(0)); +- listener.accept((Void)null, new CompletionHandler() { +- public void completed(AsynchronousSocketChannel ch, Void att) { +- queue.add(ch); +- listener.accept((Void)null, this); +- } +- public void failed(Throwable exc, Void att) { +- } +- }); +- System.out.println("Listener created."); + +- // establish lots of connections ++ // establish connections + -+int main(int argc, char *argv[]) { -+ ChildStuff c; -+ int t; -+ struct stat buf; -+ /* argv[0] contains the fd number to read all the child info */ -+ int r, fdin, fdout; ++ AsynchronousSocketChannel[] clients = new AsynchronousSocketChannel[CONCURRENCY_COUNT]; ++ AsynchronousSocketChannel[] peers = new AsynchronousSocketChannel[CONCURRENCY_COUNT]; + -+ r = sscanf (argv[argc-1], "%d:%d", &fdin, &fdout); -+ if (r == 2 && fcntl(fdin, F_GETFD) != -1) { -+ fstat(fdin, &buf); -+ if (!S_ISFIFO(buf.st_mode)) -+ shutItDown(); -+ } else { -+ shutItDown(); + int port = ((InetSocketAddress)(listener.getLocalAddress())).getPort(); + SocketAddress sa = new InetSocketAddress(InetAddress.getLocalHost(), port); +- AsynchronousSocketChannel[] channels = +- new AsynchronousSocketChannel[CONCURRENCY_COUNT]; ++ + for (int i=0; i= 3) +- throw x; +- Thread.sleep(50); +- } +- } ++ clients[i] = AsynchronousSocketChannel.open(); ++ Future result = clients[i].connect(sa); ++ peers[i] = listener.accept().get(); ++ result.get(); + } + System.out.println("All connection established."); + +@@ -81,9 +68,9 @@ + final CyclicBarrier barrier = new CyclicBarrier(CONCURRENCY_COUNT+1); + + // initiate a read operation on each channel. +- for (int i=0; i() { + public void completed(Integer bytesRead, AsynchronousSocketChannel ch) { + try { +@@ -94,23 +81,29 @@ + } + } + public void failed(Throwable exc, AsynchronousSocketChannel ch) { ++ failed = true; ++ System.err.println("read failed: " + exc); ++ completed(0, ch); + } + }); + } + System.out.println("All read operations outstanding."); + + // write data to each of the accepted connections +- int remaining = CONCURRENCY_COUNT; +- while (remaining > 0) { +- AsynchronousSocketChannel ch = queue.take(); +- ch.write(ByteBuffer.wrap("welcome".getBytes())).get(); +- ch.close(); +- remaining--; ++ for (AsynchronousSocketChannel peer: peers) { ++ peer.write(ByteBuffer.wrap("welcome".getBytes())).get(); ++ peer.shutdownOutput(); ++ peer.close(); + } + + // wait for all threads to reach the barrier + System.out.println("Waiting for all threads to reach barrier"); + barrier.await(); ++ ++ // finish up ++ finished = true; + listener.close(); ++ if (failed) ++ throw new RuntimeException("I/O operation failed, see log for details"); + } + } +--- ./jdk/test/java/nio/channels/Selector/LotsOfChannels.java 2013-09-06 11:29:40.000000000 -0700 ++++ ./jdk/test/java/nio/channels/Selector/LotsOfChannels.java 2013-12-01 11:14:31.000000000 -0800 +@@ -22,9 +22,10 @@ + */ + + /* @test +- * @bug 4503092 ++ * @bug 4503092 8024883 + * @summary Tests that Windows Selector can use more than 63 channels +- * @run main/timeout=300 LotsOfChannels ++ * @run main LotsOfChannels ++ * @run main/othervm -Dsun.nio.ch.maxUpdateArraySize=64 LotsOfChannels + * @author kladko + */ + +--- ./jdk/test/java/nio/channels/Selector/SelectorLimit.java 2013-09-06 11:29:40.000000000 -0700 ++++ ./jdk/test/java/nio/channels/Selector/SelectorLimit.java 2013-12-01 11:14:31.000000000 -0800 +@@ -22,12 +22,13 @@ + */ + + /* @test +- * @bug 4777504 ++ * @bug 4777504 8024883 + * @summary Ensure that a Selector can return at least 100 selected keys + * @author Mark Reinhold + * @library .. + * @build SelectorLimit + * @run main/othervm SelectorLimit ++ * @run main/othervm -Dsun.nio.ch.maxUpdateArraySize=128 SelectorLimit + */ + + import java.io.*; +--- ./jdk/test/java/nio/channels/SocketChannel/ShortWrite.java 2013-09-06 11:29:40.000000000 -0700 ++++ ./jdk/test/java/nio/channels/SocketChannel/ShortWrite.java 2014-06-06 19:56:29.000000000 -0700 +@@ -22,7 +22,7 @@ + */ + + /* @test +- * @bug 7176630 ++ * @bug 7176630 7074436 + * @summary Check for short writes on SocketChannels configured in blocking mode + */ + +@@ -40,9 +40,10 @@ + /** + * Returns a checksum on the remaining bytes in the given buffer. + */ +- static long computeChecksum(ByteBuffer bb) { ++ static long computeChecksum(ByteBuffer... bufs) { + CRC32 crc32 = new CRC32(); +- crc32.update(bb.array()); ++ for (int i=0; i result = pool.submit(new Reader(sink, total)); ++ ++ // write the bytes ++ long n = source.write(bufs); ++ if (n != total) ++ throw new RuntimeException("Short write detected"); ++ ++ // check the bytes that were received match ++ for (int i=0; i= 8) ++ for (int i=0; i<20; i++) { ++ int n = rand.nextInt(9); ++ int[] sizes = new int[n]; ++ for (int j=0; jNewGlobalRef(env, ni_ia6cls); - ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); -- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); - initialized = 1; +- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * 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,9 @@ + */ + + /* @test +- * @bug 7006126 ++ * @bug 7006126 8020669 8024788 ++ * @build BytesAndLines PassThroughFileSystem ++ * @run main BytesAndLines + * @summary Unit test for methods for Files readAllBytes, readAllLines and + * and write methods. + */ +@@ -82,6 +84,26 @@ + write(file, lines, Charset.defaultCharset(), opts); + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException ignore) { } ++ ++ // read from procfs ++ if (System.getProperty("os.name").equals("Linux")) { ++ // Refer to the Linux proc(5) man page for details about /proc/self/stat file ++ // procfs reports it to be zero sized, even though data can be read from it ++ String statFile = "/proc/self/stat"; ++ Path pathStat = Paths.get(statFile); ++ byte[] data = Files.readAllBytes(pathStat); ++ assertTrue(data.length > 0, "Files.readAllBytes('" + statFile + "') failed to read"); ++ } ++ ++ // test readAllBytes on custom file system ++ Path myfile = PassThroughFileSystem.create().getPath(file.toString()); ++ for (int size=0; size<=1024; size+=512) { ++ byte[] b1 = new byte[size]; ++ rand.nextBytes(b1); ++ Files.write(myfile, b1); ++ byte[] b2 = Files.readAllBytes(myfile); ++ assertTrue(Arrays.equals(b1, b2), "bytes not equal"); ++ } } -@@ -306,6 +304,7 @@ - } - while (iterator != NULL) { -+ int ret1; - if (iterator->ai_family == AF_INET) { - jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); - if (IS_NULL(iaObj)) { -@@ -318,20 +317,17 @@ - inetIndex++; - } else if (iterator->ai_family == AF_INET6) { - jint scope = 0; -- jbyteArray ipaddress; +@@ -174,6 +196,16 @@ + throw new RuntimeException("NullPointerException expected"); + } catch (NullPointerException ignore) { } - jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } -- ipaddress = (*env)->NewByteArray(env, 16); -- if (IS_NULL(ipaddress)) { -- ret = NULL; -- goto cleanupAndReturn; -+ ret1 = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); -+ if (!ret1) { -+ ret = NULL; -+ goto cleanupAndReturn; - } -- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, -- (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); - #ifdef __linux__ - if (!kernelIsV22()) { - scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; -@@ -340,10 +336,8 @@ - scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; - #endif - if (scope != 0) { /* zero is default value, no need to set */ -- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); -- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); -+ setInet6Address_scopeid(env, iaObj, scope); - } -- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - setInetAddress_hostName(env, iaObj, host); - (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); - inet6Index++; ---- jdk/src/solaris/native/java/net/NetworkInterface.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/net/NetworkInterface.c 2014-04-28 17:39:02.000000000 -0700 -@@ -60,14 +60,19 @@ - #include - #include - #include --#if defined(__APPLE__) -+#if defined(__FreeBSD__) || defined(__APPLE__) - #include - #include -+#elif defined(__OpenBSD__) -+#include -+#include -+#elif defined(__NetBSD__) -+#include -+#endif - #include - #include - #include - #endif --#endif ++ // read from procfs ++ if (System.getProperty("os.name").equals("Linux")) { ++ // Refer to the Linux proc(5) man page for details about /proc/self/status file ++ // procfs reports this file to be zero sized, even though data can be read from it ++ String statusFile = "/proc/self/status"; ++ Path pathStatus = Paths.get(statusFile); ++ lines = Files.readAllLines(pathStatus, US_ASCII); ++ assertTrue(lines.size() > 0, "Files.readAllLines('" + pathStatus + "') failed to read"); ++ } ++ + } finally { + delete(tmpfile); + } +--- ./jdk/test/java/nio/file/Files/CopyAndMove.java 2013-09-06 11:29:41.000000000 -0700 ++++ ./jdk/test/java/nio/file/Files/CopyAndMove.java 2014-06-06 19:56:34.000000000 -0700 +@@ -634,7 +634,7 @@ - #include "jvm.h" - #include "jni_util.h" -@@ -118,7 +123,6 @@ - static jmethodID ni_ia4ctrID; - static jmethodID ni_ia6ctrID; - static jmethodID ni_ibctrID; --static jfieldID ni_ia6ipaddressID; - static jfieldID ni_ibaddressID; - static jfieldID ni_ib4broadcastID; - static jfieldID ni_ib4maskID; -@@ -193,7 +197,6 @@ - ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); - ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "", "()V"); -- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); - ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;"); - ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;"); - ni_ib4maskID = (*env)->GetFieldID(env, ni_ibcls, "maskLength", "S"); -@@ -332,11 +335,9 @@ - #ifdef AF_INET6 - if (family == AF_INET6) { - jbyte *bytes = (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr); -- jbyteArray ipaddress = (*env)->GetObjectField(env, iaObj, ni_ia6ipaddressID); - jbyte caddr[16]; - int i; -- -- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); -+ getInet6Address_ipaddress(env, iaObj, (char *)caddr); - i = 0; - while (i < 16) { - if (caddr[i] != bytes[i]) { -@@ -670,21 +671,17 @@ - int scope=0; - iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); - if (iaObj) { -- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); -- if (ipaddress == NULL) { -+ int ret = setInet6Address_ipaddress(env, iaObj, (char *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); -+ if (ret == JNI_FALSE) { - return NULL; - } -- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, -- (jbyte *)&(((struct sockaddr_in6*)addrP->addr)->sin6_addr)); + // check POSIX attributes are copied + String os = System.getProperty("os.name"); +- if (os.equals("SunOS") || os.equals("Linux")) { ++ if (os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD")) { + checkPosixAttributes( + readAttributes(source, PosixFileAttributes.class, linkOptions), + readAttributes(target, PosixFileAttributes.class, linkOptions)); +@@ -1136,7 +1136,7 @@ + static void randomizeAttributes(Path file) throws IOException { + String os = System.getProperty("os.name"); + boolean isWindows = os.startsWith("Windows"); +- boolean isUnix = os.equals("SunOS") || os.equals("Linux"); ++ boolean isUnix = os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD"); + boolean isDirectory = isDirectory(file, NOFOLLOW_LINKS); - scope = ((struct sockaddr_in6*)addrP->addr)->sin6_scope_id; + if (isUnix) { +--- ./jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java 2013-09-06 11:29:42.000000000 -0700 ++++ ./jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java 2014-01-18 12:16:28.000000000 -0800 +@@ -88,6 +88,17 @@ + TestLibrary.RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT); + rmid.addOptions(new String[]{ + "-Djava.nio.channels.spi.SelectorProvider=RmidViaInheritedChannel$RmidSelectorProvider"}); ++ if (System.getProperty("os.name").startsWith("Windows") && ++ System.getProperty("os.version").startsWith("5.")) ++ { ++ /* Windows XP/2003 or older ++ * Need to expand ephemeral range to include RMI test ports ++ */ ++ rmid.addOptions(new String[]{ ++ "-Djdk.net.ephemeralPortRange.low=1024", ++ "-Djdk.net.ephemeralPortRange.high=64000" ++ }); ++ } + rmid.start(); - if (scope != 0) { /* zero is default value, no need to set */ -- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); -- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); -- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); -+ setInet6Address_scopeid(env, iaObj, scope); -+ setInet6Address_scopeifname(env, iaObj, netifObj); - } -- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - } - ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); - if (ibObj) { -@@ -1293,11 +1290,15 @@ - return -1; - } + /* +--- ./jdk/test/java/rmi/registry/readTest/readTest.sh 2013-09-06 11:29:43.000000000 -0700 ++++ ./jdk/test/java/rmi/registry/readTest/readTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -29,8 +29,12 @@ + # @run shell readTest.sh -+#ifdef __FreeBSD__ -+ *flags = ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16)); -+#else - if (sizeof(if2.ifr_flags) == sizeof(short)) { - *flags = (if2.ifr_flags & 0xffff); - } else { - *flags = if2.ifr_flags; - } -+#endif - return 0; - } + OS=`uname -s` ++VER=`uname -r` ++ARGS="" ++REGARGS="" ++ + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + FILEURL="file:" +@@ -39,11 +43,19 @@ + PS=";" + FS="\\" + FILEURL="file:/" ++ if [ "$VER" -eq "5" ]; then ++ ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000" ++ REGARGS="-J-Djdk.net.ephemeralPortRange.low=1024 -J-Djdk.net.ephemeralPortRange.high=65000" ++ fi + ;; + CYGWIN* ) + PS=";" + FS="/" + FILEURL="file:/" ++ if [ "${VER}" -eq "5" ]; then ++ ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000" ++ REGARGS="-J-Djdk.net.ephemeralPortRange.low=1024 -J-Djdk.net.ephemeralPortRange.high=65000" ++ fi + ;; + * ) + echo "Unrecognized system!" +@@ -61,8 +73,8 @@ + #start rmiregistry without any local classes on classpath + cd rmi_tmp + # NOTE: This RMI Registry port must match TestLibrary.READTEST_REGISTRY_PORT +-${TESTJAVA}${FS}bin${FS}rmiregistry -J-Djava.rmi.server.useCodebaseOnly=false \ +- ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 & ++${TESTJAVA}${FS}bin${FS}rmiregistry ${REGARGS} -J-Djava.rmi.server.useCodebaseOnly=false \ ++ ${TESTTOOLVMOPTS} 60005 > ..${FS}${RMIREG_OUT} 2>&1 & + RMIREG_PID=$! + # allow some time to start + sleep 3 +@@ -74,10 +86,10 @@ + ;; + * ) + CODEBASE=`pwd` +- ;; ++ ;; + esac + # trailing / after code base is important for rmi codebase property. +-${TESTJAVA}${FS}bin${FS}java -cp $TEST_CLASSPATH -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & ++${TESTJAVA}${FS}bin${FS}java -cp $TEST_CLASSPATH ${ARGS} -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & + TEST_PID=$! + #bulk of testcase - let it run for a while + sleep 5 +@@ -100,7 +112,7 @@ + result2=$? -@@ -1989,11 +1990,15 @@ - return -1; - } + if [ $result1 -eq 0 -a $result2 -eq 0 ] +-then ++then + echo "Passed" + exitCode=0; + else +@@ -108,6 +120,6 @@ + exitCode=1 + fi + rm -rf OUT.TXT ${RMIREG_OUT} rmi_tmp +-exit ${exitCode} ++exit ${exitCode} -+#ifdef __FreeBSD__ -+ *flags = ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16)); -+#else - if (sizeof(if2.ifr_flags) == sizeof(short)) { - *flags = (if2.ifr_flags & 0xffff); - } else { - *flags = if2.ifr_flags; - } -+#endif - return 0; - } ---- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2014-04-20 12:39:22.000000000 -0700 -@@ -23,12 +23,12 @@ - * questions. - */ +--- ./jdk/test/java/rmi/reliability/launch_reliability.ksh 2013-09-06 11:29:43.000000000 -0700 ++++ ./jdk/test/java/rmi/reliability/launch_reliability.ksh 2014-06-06 19:56:34.000000000 -0700 +@@ -84,14 +84,12 @@ -+#include -+#include - #include - #include - #include - #include --#include --#include - #ifdef __solaris__ - #include -@@ -357,13 +357,21 @@ - #ifdef AF_INET6 - if (ipv6_available()) { - struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr; -+#ifdef __FreeBSD__ -+ him6->sin6_family = AF_INET6; -+#else - him6->sin6_family = AF_UNSPEC; -+#endif - len = sizeof(struct sockaddr_in6); - } else - #endif - { - struct sockaddr_in *him4 = (struct sockaddr_in*)&addr; -+#ifdef __FreeBSD__ -+ him4->sin_family = AF_INET; -+#else - him4->sin_family = AF_UNSPEC; -+#endif - len = sizeof(struct sockaddr_in); - } - JVM_Connect(fd, (struct sockaddr *)&addr, len); -@@ -2359,8 +2367,7 @@ - caddr[14] = ((address >> 8) & 0xff); - caddr[15] = (address & 0xff); - } else { -- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); -- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); -+ getInet6Address_ipaddress(env, iaObj, caddr); - } + # set platform-dependent variables +-if [ `uname` = "SunOS" ] ; then ++case `uname` in ++ SunOS | Linux | *BSD | Darwin ) + PATH_SEP=":" +- +-elif [ `uname` = "Linux" ] ; then +- PATH_SEP=":" +-else ++ * ) + PATH_SEP=";" +-fi ++esac - memcpy((void *)&(mname6.ipv6mr_multiaddr), caddr, sizeof(struct in6_addr)); ---- jdk/src/solaris/native/java/net/bsd_close.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/net/bsd_close.c 2014-04-20 12:39:22.000000000 -0700 -@@ -345,6 +345,76 @@ - * signal other than our wakeup signal. - */ - int NET_Timeout(int s, long timeout) { + export PATH_SEP + mainpid=$$ +--- ./jdk/test/java/rmi/testlibrary/TestLibrary.java 2013-09-06 11:29:44.000000000 -0700 ++++ ./jdk/test/java/rmi/testlibrary/TestLibrary.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -86,13 +86,13 @@ + * FIXED_PORT_MIN or above FIXED_PORT_MAX, then adjust + * FIXED_PORT_MIN/MAX appropriately. + */ +- public final static int FIXED_PORT_MIN = 64001; +- public final static int FIXED_PORT_MAX = 64010; +- public final static int RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT = 64001; +- public final static int RMIDVIAINHERITEDCHANNEL_REGISTRY_PORT = 64002; +- public final static int INHERITEDCHANNELNOTSERVERSOCKET_ACTIVATION_PORT = 64003; +- public final static int INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT = 64004; +- public final static int READTEST_REGISTRY_PORT = 64005; ++ public final static int FIXED_PORT_MIN = 60001; ++ public final static int FIXED_PORT_MAX = 60010; ++ public final static int RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT = 60001; ++ public final static int RMIDVIAINHERITEDCHANNEL_REGISTRY_PORT = 60002; ++ public final static int INHERITEDCHANNELNOTSERVERSOCKET_ACTIVATION_PORT = 60003; ++ public final static int INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT = 60004; ++ public final static int READTEST_REGISTRY_PORT = 60005; + private final static int MAX_SERVER_SOCKET_TRIES = 2*(FIXED_PORT_MAX-FIXED_PORT_MIN+1); + + static void mesg(Object mesg) { +@@ -127,6 +127,33 @@ + bomb(null, e); + } + ++ /** ++ * Helper method to determine if registry has started ++ * ++ * @param port The port number to check ++ * @param msTimeout The amount of milliseconds to spend checking ++ */ ++ ++ public static boolean checkIfRegistryRunning(int port, int msTimeout) { ++ long stopTime = System.currentTimeMillis() + msTimeout; ++ do { ++ try { ++ Registry r = LocateRegistry.getRegistry(port); ++ String[] s = r.list(); ++ // no exception. We're now happy that registry is running ++ return true; ++ } catch (RemoteException e) { ++ // problem - not ready ? Try again ++ try { ++ Thread.sleep(500); ++ } catch (InterruptedException ie) { ++ // not expected ++ } ++ } ++ } while (stopTime > System.currentTimeMillis()); ++ return false; ++ } ++ + public static String getProperty(String property, String defaultVal) { + final String prop = property; + final String def = defaultVal; +--- ./jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2013-09-06 11:29:45.000000000 -0700 ++++ ./jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -46,15 +46,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Linux ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2013-09-06 11:29:46.000000000 -0700 ++++ ./jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -34,15 +34,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Linux ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2013-09-06 11:29:46.000000000 -0700 ++++ ./jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -50,19 +50,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Linux ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- CYGWIN* ) +- PATHSEP=";" +- FILESEP="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/security/Security/signedfirst/Dyn.sh 2013-09-06 11:29:46.000000000 -0700 ++++ ./jdk/test/java/security/Security/signedfirst/Dyn.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -46,15 +46,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Linux ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/security/Security/signedfirst/Static.sh 2013-09-06 11:29:46.000000000 -0700 ++++ ./jdk/test/java/security/Security/signedfirst/Static.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -46,15 +46,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Linux ) +- PATHSEP=":" +- FILESEP="/" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/util/Arrays/TimSortStackSize.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/Arrays/TimSortStackSize.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,123 @@ +/* -+ * On MacOS X, poll(2) is not working correctly, so a select(2) based -+ * implementation is preferred. See ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * -+ * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7131399 ++ * 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. + * -+ * However, on FreeBSD, the select(2) based implementation can cause -+ * crashes under load and poll(2) is preferred. See ++ * 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). + * -+ * http://docs.freebsd.org/cgi/getmsg.cgi?fetch=215525+0+current/freebsd-java ++ * 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. + * -+ * Other *BSD will use poll(2) for now, but please adjust as appropriate. ++ * 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. + */ -+#ifndef __APPLE__ -+ long prevtime = 0, newtime; -+ struct timeval t; -+ fdEntry_t *fdEntry = getFdEntry(s); + -+ /* -+ * Check that fd hasn't been closed. -+ */ -+ if (fdEntry == NULL) { -+ errno = EBADF; -+ return -1; ++/* ++ * @test ++ * @bug 8011944 ++ * @summary Test TimSort stack size ++ */ ++import java.util.Arrays; ++import java.util.ArrayDeque; ++import java.util.Comparator; ++ ++public class TimSortStackSize { ++ ++ public static void main(String[] args) { ++ testComparableTimSort(); ++ testTimSort(); + } + -+ /* -+ * Pick up current time as may need to adjust timeout -+ */ -+ if (timeout > 0) { -+ gettimeofday(&t, NULL); -+ prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; ++ static void testComparableTimSort() { ++ System.out.printf("testComparableTimSort()%n"); ++ Arrays.sort(genData()); + } + -+ for(;;) { -+ struct pollfd pfd; -+ int rv; -+ threadEntry_t self; ++ static void testTimSort() { ++ System.out.printf("testTimSort()%n"); ++ //Arrays.sort(genData(), Integer::compare); ++ Arrays.sort(genData(), ++ new java.util.Comparator() { ++ public int compare(Integer a1, Integer a2){ ++ return Integer.compare(a1.intValue(), a2.intValue()); ++ } ++ }); ++ } + -+ /* -+ * Poll the fd. If interrupted by our wakeup signal -+ * errno will be set to EBADF. -+ */ -+ pfd.fd = s; -+ pfd.events = POLLIN | POLLERR; ++ private static final int MIN = 16; + -+ startOp(fdEntry, &self); -+ rv = poll(&pfd, 1, timeout); -+ endOp(fdEntry, &self); ++ private static final int BOUND1 = 2 * MIN + 1; ++ private static final int BOUND2 = BOUND1 + MIN + 2; ++ private static final int BOUND3 = BOUND1 + 1 + BOUND2; ++ private static final int BOUND4 = BOUND2 + 1 + BOUND3; ++ private static final int BOUND5 = BOUND3 + 1 + BOUND4; + -+ /* -+ * If interrupted then adjust timeout. If timeout -+ * has expired return 0 (indicating timeout expired). -+ */ -+ if (rv < 0 && errno == EINTR) { -+ if (timeout > 0) { -+ gettimeofday(&t, NULL); -+ newtime = t.tv_sec * 1000 + t.tv_usec / 1000; -+ timeout -= newtime - prevtime; -+ if (timeout <= 0) { -+ return 0; -+ } -+ prevtime = newtime; -+ } -+ } else { -+ return rv; ++ static int build(int size, int B, ArrayDeque chunks) { ++ chunks.addFirst(B); ++ if (size < BOUND1) { ++ chunks.addFirst(size); ++ return size; + } + ++ int asize = (size + 2) / 2; ++ if (size >= BOUND2 && asize < BOUND1) { ++ asize = BOUND1; ++ } else if (size >= BOUND3 && asize < BOUND2) { ++ asize = BOUND2; ++ } else if (size >= BOUND4 && asize < BOUND3) { ++ asize = BOUND3; ++ } else if (size >= BOUND5 && asize < BOUND4) { ++ asize = BOUND4; ++ } ++ if (size - asize >= B) { ++ throw new AssertionError(" " + size + " , " + asize + " , " + B); ++ } ++ return build(asize, size - asize, chunks); + } -+#else - long prevtime = 0, newtime; - struct timeval t, *tp = &t; - fdEntry_t *fdEntry = getFdEntry(s); -@@ -414,4 +484,5 @@ - } - - } -+#endif - } ---- jdk/src/solaris/native/java/net/net_util_md.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/net/net_util_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -45,6 +45,10 @@ - #endif - #endif - -+#ifdef __OpenBSD__ -+#include -+#endif + - #ifdef __solaris__ - #include - #include -@@ -114,9 +118,9 @@ - static jfieldID ni_defaultIndexID; - if (ni_class == NULL) { - jclass c = (*env)->FindClass(env, "java/net/NetworkInterface"); -- CHECK_NULL(c); -+ CHECK_NULL_RETURN(c, 0); - c = (*env)->NewGlobalRef(env, c); -- CHECK_NULL(c); -+ CHECK_NULL_RETURN(c, 0); - ni_defaultIndexID = (*env)->GetStaticFieldID( - env, c, "defaultIndex", "I"); - ni_class = c; -@@ -138,8 +142,7 @@ - * of the parameter is assumed to be an 'int'. If the parameter - * cannot be obtained return -1 - */ --static int --getParam(char *driver, char *param) -+int net_getParam(char *driver, char *param) - { - struct strioctl stri; - char buf [64]; -@@ -166,7 +169,7 @@ - - /* - * Iterative way to find the max value that SO_SNDBUF or SO_RCVBUF -- * for Solaris versions that do not support the ioctl() in getParam(). -+ * for Solaris versions that do not support the ioctl() in net_getParam(). - * Ugly, but only called once (for each sotype). - * - * As an optimisation, we make a guess using the default values for Solaris -@@ -823,7 +826,6 @@ - /* needs work. 1. family 2. clean up him6 etc deallocate memory */ - if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) { - struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)him; -- jbyteArray ipaddress; - jbyte caddr[16]; - jint address; - -@@ -844,8 +846,7 @@ - caddr[15] = (address & 0xff); - } - } else { -- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); -- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); -+ getInet6Address_ipaddress(env, iaObj, (char *)caddr); - } - memset((char *)him6, 0, sizeof(struct sockaddr_in6)); - him6->sin6_port = htons(port); -@@ -882,7 +883,7 @@ - */ - if (!cached_scope_id) { - if (ia6_scopeidID) { -- scope_id = (int)(*env)->GetIntField(env,iaObj,ia6_scopeidID); -+ scope_id = getInet6Address_scopeid(env, iaObj); - } - if (scope_id != 0) { - /* check user-specified value for loopback case -@@ -928,7 +929,7 @@ - - if (family != IPv4) { - if (ia6_scopeidID) { -- him6->sin6_scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_scopeidID); -+ him6->sin6_scope_id = getInet6Address_scopeid(env, iaObj); - } - } - #endif -@@ -1409,7 +1410,7 @@ - * If that fails, we use the search algorithm in findMaxBuf() - */ - if (!init_tcp_max_buf && sotype == SOCK_STREAM) { -- tcp_max_buf = getParam("/dev/tcp", "tcp_max_buf"); -+ tcp_max_buf = net_getParam("/dev/tcp", "tcp_max_buf"); - if (tcp_max_buf == -1) { - tcp_max_buf = findMaxBuf(fd, opt, SOCK_STREAM); - if (tcp_max_buf == -1) { -@@ -1418,7 +1419,7 @@ - } - init_tcp_max_buf = 1; - } else if (!init_udp_max_buf && sotype == SOCK_DGRAM) { -- udp_max_buf = getParam("/dev/udp", "udp_max_buf"); -+ udp_max_buf = net_getParam("/dev/udp", "udp_max_buf"); - if (udp_max_buf == -1) { - udp_max_buf = findMaxBuf(fd, opt, SOCK_DGRAM); - if (udp_max_buf == -1) { -@@ -1515,7 +1516,22 @@ - } - } - --#endif -+#ifndef __APPLE__ -+ /* -+ * Don't allow SO_LINGER value to be too big. -+ * Current max value (240) is empiric value based on tcp_timer.h's -+ * constant TCP_LINGERTIME, which was doubled. -+ * -+ * XXXBSD: maybe we should step it down to 120 ? -+ */ -+ if (level == SOL_SOCKET && opt == SO_LINGER) { -+ ling = (struct linger *)arg; -+ if (ling->l_linger > 240 || ling->l_linger < 0) { -+ ling->l_linger = 240; -+ } ++ static Integer[] genData() { ++ ArrayDeque chunks = new ArrayDeque(); ++ chunks.addFirst(MIN); ++ ++ int B = MIN + 4; ++ int A = B + MIN + 1; ++ ++ for (int i = 0; i < 8; i++) { ++ int eps = build(A, B, chunks); ++ B = B + A + 1; ++ A = B + eps + 1; ++ } ++ chunks.addFirst(B); ++ chunks.addFirst(A); ++ int total = 0; ++ for (Integer len : chunks) { ++ total += len; ++ } ++ int pow = MIN; ++ while (pow < total) { ++ pow += pow; ++ } ++ chunks.addLast(pow - total); ++ System.out.println(" Total: " + total); ++ Integer[] array = new Integer[pow]; ++ int off = 0; ++ int pos = 0; ++ for (Integer len : chunks) { ++ for (int i = 0; i < len; i++) { ++ array[pos++] = Integer.valueOf(i == 0 ? 0 : 1); ++ } ++ off++; ++ } ++ return array; + } -+#endif __APPLE__ -+#endif _ALLBSD_SOURCE - - return setsockopt(fd, level, opt, arg, len); - } ---- jdk/src/solaris/native/java/net/net_util_md.h 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/net/net_util_md.h 2014-04-20 12:39:22.000000000 -0700 -@@ -37,7 +37,7 @@ - #endif - - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(__FreeBSD__) || defined(MACOSX) - extern int NET_Timeout(int s, long timeout); - extern int NET_Read(int s, void* buf, size_t len); - extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, -@@ -81,6 +81,9 @@ - int getDefaultIPv6Interface(struct in6_addr *target_addr); - #endif - -+#ifdef __solaris__ -+extern int net_getParam(char *driver, char *param); -+#endif - - /* needed from libsocket on Solaris 8 */ - ---- jdk/src/solaris/native/java/util/TimeZone_md.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/java/util/TimeZone_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -123,7 +123,7 @@ - return NULL; - } - --#if defined(__linux__) || defined(MACOSX) || (defined(__solaris__) \ -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) || (defined(__solaris__) \ - && (defined(_POSIX_PTHREAD_SEMANTICS) || defined(_LP64))) - while (readdir_r(dirp, entry, &dp) == 0 && dp != NULL) { - #else -@@ -212,7 +212,7 @@ - return tz; - } - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - - /* - * Performs Linux specific mapping and returns a zone ID -@@ -678,7 +678,7 @@ - * Returns a GMT-offset-based zone ID. (e.g., "GMT-08:00") - */ - --#ifdef MACOSX -+#ifdef _ALLBSD_SOURCE - - char * - getGMTOffsetID() -@@ -738,4 +738,4 @@ - sign, (int)(offset/3600), (int)((offset%3600)/60)); - return strdup(buf); - } --#endif /* MACOSX */ -+#endif /* _ALLBSD_SOURCE */ ---- jdk/src/solaris/native/sun/awt/awt_Font.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_Font.c 2014-04-20 12:39:22.000000000 -0700 -@@ -334,7 +334,7 @@ - if (strcmp(style, "regular") == 0) { - altstyle = "roman"; - } --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - if (!strcmp(family, "lucidasans")) { - family = "lucida"; - } ---- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2014-04-20 12:39:22.000000000 -0700 -@@ -123,7 +123,7 @@ - */ - - #define MAXFRAMEBUFFERS 16 --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - typedef struct { - int screen_number; - short x_org; -@@ -652,7 +652,7 @@ - #endif /* HEADLESS */ - - #ifndef HEADLESS --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - static void xinerama_init_linux() - { - void* libHandle = NULL; -@@ -703,7 +703,7 @@ - } - } - #endif --#if !defined(__linux__) && !defined(MACOSX) /* Solaris */ -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* Solaris */ - static void xinerama_init_solaris() - { - void* libHandle = NULL; -@@ -763,11 +763,11 @@ - } - - DTRACE_PRINTLN("Xinerama extension is available"); --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - xinerama_init_linux(); - #else /* Solaris */ - xinerama_init_solaris(); --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ - } - #endif /* HEADLESS */ - -@@ -1645,7 +1645,7 @@ - { - jobject point = NULL; - #ifndef HEADLESS /* return NULL in HEADLESS, Linux */ --#if !defined(__linux__) && !defined(MACOSX) -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - int x,y; - - AWT_LOCK(); -@@ -1658,7 +1658,7 @@ - DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null"); - } - AWT_FLUSH_UNLOCK(); --#endif /* __linux __ || MACOSX */ -+#endif /* __linux __ || _ALLBSD_SOURCE */ - #endif /* HEADLESS */ - return point; - } ---- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2014-04-20 12:39:22.000000000 -0700 -@@ -67,7 +67,7 @@ - XIMPreeditDrawCallbackStruct *); - static void PreeditCaretCallback(XIC, XPointer, - XIMPreeditCaretCallbackStruct *); --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - static void StatusStartCallback(XIC, XPointer, XPointer); - static void StatusDoneCallback(XIC, XPointer, XPointer); - static void StatusDrawCallback(XIC, XPointer, -@@ -81,7 +81,7 @@ - #define PreeditDoneIndex 1 - #define PreeditDrawIndex 2 - #define PreeditCaretIndex 3 --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - #define StatusStartIndex 4 - #define StatusDoneIndex 5 - #define StatusDrawIndex 6 -@@ -99,14 +99,14 @@ - (XIMProc)PreeditDoneCallback, - (XIMProc)PreeditDrawCallback, - (XIMProc)PreeditCaretCallback, --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - (XIMProc)StatusStartCallback, - (XIMProc)StatusDoneCallback, - (XIMProc)StatusDrawCallback, - #endif - }; - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - #define MAX_STATUS_LEN 100 - typedef struct { - Window w; /*status window id */ -@@ -146,7 +146,7 @@ - #endif /* XAWT */ - jobject x11inputmethod; /* global ref to X11InputMethod instance */ - /* associated with the XIC */ --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - StatusWindow *statusWindow; /* our own status window */ - #else - #ifndef XAWT -@@ -425,7 +425,7 @@ - static void - freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData) - { --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - if (pX11IMData->statusWindow != NULL){ - StatusWindow *sw = pX11IMData->statusWindow; - XFreeGC(awt_display, sw->lightGC); -@@ -531,7 +531,7 @@ - pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance); - - if (pX11IMData == NULL) { --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - return False; - #else - return result; -@@ -539,7 +539,7 @@ - } - - if ((ic = pX11IMData->current_ic) == (XIC)0){ --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - return False; - #else - return result; -@@ -648,7 +648,7 @@ - return result; - } - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - static StatusWindow *createStatusWindow( - #ifdef XAWT - Window parent) { -@@ -993,7 +993,7 @@ - } - } - } --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ - /* - * Creates two XICs, one for active clients and the other for passive - * clients. All information on those XICs are stored in the -@@ -1050,7 +1050,7 @@ - return FALSE ; - } - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - on_the_spot_styles |= XIMStatusNothing; - - /*kinput does not support XIMPreeditCallbacks and XIMStatusArea -@@ -1063,7 +1063,7 @@ - break; - } - } --#else /*! __linux__ && !MACOSX */ -+#else /*! __linux__ && !_ALLBSD_SOURCE */ - #ifdef XAWT - on_the_spot_styles |= XIMStatusNothing; - #else /* !XAWT */ -@@ -1086,7 +1086,7 @@ - on_the_spot_styles |= XIMStatusNothing; - - #endif /* XAWT */ --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ ++ ++} +--- ./jdk/test/java/util/Currency/PropertiesTest.sh 2013-09-06 11:29:47.000000000 -0700 ++++ ./jdk/test/java/util/Currency/PropertiesTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -30,7 +30,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/java/util/PluggableLocale/ExecTest.sh 2013-09-06 11:29:48.000000000 -0700 ++++ ./jdk/test/java/util/PluggableLocale/ExecTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -58,7 +58,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2013-09-06 11:29:49.000000000 -0700 ++++ ./jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -31,7 +31,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PATHSEP=":" + FILESEP="/" + ;; +--- ./jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2013-09-06 11:29:49.000000000 -0700 ++++ ./jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -72,10 +72,10 @@ + Windows* | CYGWIN* ) + DEL=";" + ;; +-SunOS | Darwin) ++SunOS | Darwin ) + DEL=":" + ;; +-Linux) ++Linux | *BSD ) + DEL=":" + HAS_S=YES + ;; +--- ./jdk/test/java/util/ServiceLoader/basic.sh 2013-09-06 11:29:50.000000000 -0700 ++++ ./jdk/test/java/util/ServiceLoader/basic.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -42,9 +42,7 @@ - for (i = 0; i < im_styles->count_styles; i++) { - active_styles |= im_styles->supported_styles[i] & on_the_spot_styles; -@@ -1134,7 +1134,7 @@ - NULL); - if (preedit == (XVaNestedList)NULL) - goto err; --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - /*always try XIMStatusCallbacks for active client...*/ - { - status = (XVaNestedList)XVaCreateNestedList(0, -@@ -1156,7 +1156,7 @@ - XFree((void *)status); - XFree((void *)preedit); + OS=`uname -s` + case "$OS" in +- SunOS | Darwin ) +- SEP=':' ;; +- Linux ) ++ SunOS | Linux | *BSD | Darwin ) + SEP=':' ;; + * ) + SEP='\;' ;; +--- ./jdk/test/java/util/jar/JarInputStream/ExtraFileInMetaInf.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/jar/JarInputStream/ExtraFileInMetaInf.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,71 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8021788 ++ * @summary JarInputStream doesn't provide certificates for some file under META-INF ++ */ ++ ++import java.util.jar.*; ++import java.io.*; ++import java.util.zip.ZipEntry; ++import java.util.zip.ZipOutputStream; ++ ++public class ExtraFileInMetaInf { ++ public static void main(String args[]) throws Exception { ++ ++ // Create a zip file with 2 entries ++ try (ZipOutputStream zos = ++ new ZipOutputStream(new FileOutputStream("x.jar"))) { ++ zos.putNextEntry(new ZipEntry("META-INF/SUB/file")); ++ zos.write(new byte[10]); ++ zos.putNextEntry(new ZipEntry("x")); ++ zos.write(new byte[10]); ++ zos.close(); ++ } ++ ++ // Sign it ++ new File("ks").delete(); ++ sun.security.tools.KeyTool.main( ++ ("-keystore ks -storepass changeit -keypass changeit " + ++ "-alias a -dname CN=A -genkeypair").split(" ")); ++ sun.security.tools.JarSigner.main( ++ "-keystore ks -storepass changeit x.jar a".split(" ")); ++ ++ // Check if the entries are signed ++ try (JarInputStream jis = ++ new JarInputStream(new FileInputStream("x.jar"))) { ++ JarEntry je; ++ while ((je = jis.getNextJarEntry()) != null) { ++ String name = je.toString(); ++ if (name.equals("META-INF/SUB/file") || name.equals("x")) { ++ while (jis.read(new byte[1000]) >= 0); ++ if (je.getCertificates() == null) { ++ throw new Exception(name + " not signed"); ++ } ++ } ++ } ++ } ++ } ++} +--- ./jdk/test/java/util/logging/LevelResourceBundle.java 2013-09-06 11:29:51.000000000 -0700 ++++ ./jdk/test/java/util/logging/LevelResourceBundle.java 2014-06-06 19:56:30.000000000 -0700 +@@ -33,15 +33,19 @@ + + public class LevelResourceBundle { + public static void main(String args[]) throws Exception { +- final String name = "SEVERE"; +- String en = getLocalizedMessage(Locale.getDefault(), name); +- String fr = getLocalizedMessage(Locale.FRANCE, name); ++ final String key = "SEVERE"; ++ final String name = "Severe"; ++ String en = getLocalizedMessage(Locale.getDefault(), key); ++ String fr = getLocalizedMessage(Locale.FRANCE, key); + if (!name.equals(en)) { + throw new RuntimeException("Expect " + name + " equals " + en); } --#else /* !__linux__ && !MACOSX */ -+#else /* !__linux__ && !_ALLBSD_SOURCE */ - #ifndef XAWT - if (on_the_spot_styles & XIMStatusArea) { - Widget parent; -@@ -1184,7 +1184,7 @@ + if (name.equals(fr)) { + throw new RuntimeException("Expect " + name + " not equals " + fr); } - #endif /* XAWT */ - XFree((void *)preedit); --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ - pX11IMData->ic_passive = XCreateIC(X11im, - XNClientWindow, w, - XNFocusWindow, w, -@@ -1343,7 +1343,7 @@ - - } - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - static void - StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data) - { -@@ -1411,7 +1411,7 @@ - finally: - AWT_UNLOCK(); - } --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ - - static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) { - JNIEnv *env = GetJNIEnv(); -@@ -1517,14 +1517,14 @@ - /* Use IMInstantiate call back only on Linux, as there is a bug in Solaris - (4768335) - */ --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL, - NULL, (XIDProc)OpenXIMCallback, NULL); - if (!registered) { - /* directly call openXIM callback */ - #endif - OpenXIMCallback(dpy, NULL, NULL); --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) ++ if (key.equals(fr)) { ++ throw new RuntimeException("Expect " + key + " not equals " + fr); ++ } } - #endif - -@@ -1588,13 +1588,13 @@ - #endif /* XAWT */ - globalRef = (*env)->NewGlobalRef(env, this); - pX11IMData->x11inputmethod = globalRef; --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - pX11IMData->statusWindow = NULL; --#else /* !__linux__ && !MACOSX */ -+#else /* !__linux__ && !_ALLBSD_SOURCE */ - #ifndef XAWT - pX11IMData->statusWidget = (Widget) NULL; - #endif /* XAWT */ --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ - - pX11IMData->lookup_buf = 0; - pX11IMData->lookup_buf_len = 0; -@@ -1741,14 +1741,14 @@ - setXICFocus(pX11IMData->current_ic, req); - currentX11InputMethodInstance = pX11IMData->x11inputmethod; - currentFocusWindow = w; --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on) - onoffStatusWindow(pX11IMData, w, True); - #endif - } else { - currentX11InputMethodInstance = NULL; - currentFocusWindow = 0; --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - onoffStatusWindow(pX11IMData, 0, False); - if (pX11IMData->current_ic != NULL) - #endif -@@ -1765,7 +1765,7 @@ - Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env, - jobject this) - { --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - X11InputMethodData *pX11IMData; - StatusWindow *statusWindow; - -@@ -1862,7 +1862,7 @@ - X11InputMethodData *pX11IMData; - XVaNestedList status; - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - /*do nothing for linux? */ - #else - AWT_LOCK(); -@@ -1968,7 +1968,7 @@ - JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow - (JNIEnv *env, jobject this, jlong window) - { --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - AWT_LOCK(); - adjustStatusWindow(window); - AWT_UNLOCK(); ---- jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -96,7 +96,7 @@ - jvm = vm; - - /* Get address of this library and the directory containing it. */ -- dladdr((void *)JNI_OnLoad, &dlinfo); -+ dladdr((void *)AWT_OnLoad, &dlinfo); - realpath((char *)dlinfo.dli_fname, buf); - len = strlen(buf); - p = strrchr(buf, '/'); ---- jdk/src/solaris/native/sun/awt/awt_Robot.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2014-04-20 12:39:22.000000000 -0700 -@@ -46,7 +46,7 @@ - #include "wsutils.h" - #include "list.h" - #include "multiVis.h" --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - #include - #endif - ---- jdk/src/solaris/native/sun/awt/awt_util.h 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_util.h 2014-04-20 12:39:22.000000000 -0700 -@@ -187,7 +187,7 @@ - #ifdef __solaris__ - extern Widget awt_util_getXICStatusAreaWindow(Widget w); - #else --#if defined(MACOSX) -+#if defined(_ALLBSD_SOURCE) - int32_t awt_util_getIMStatusHeight(Widget vw); - Widget awt_util_getXICStatusAreaWindow(Widget w); - #else -@@ -200,7 +200,7 @@ - + private static final String RBNAME = "sun.util.logging.resources.logging"; +--- ./jdk/test/java/util/logging/LocalizedLevelName.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/LocalizedLevelName.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,103 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import java.util.*; ++import java.util.logging.*; ++ ++/* ++ * @test ++ * @bug 8016127 8024131 ++ * @summary test logging.properties localized ++ * @run main/othervm LocalizedLevelName ++ */ ++ ++public class LocalizedLevelName { ++ private static Object[] namesMap = { ++ "SEVERE", Locale.ENGLISH, "Severe", Level.SEVERE, ++ "WARNING", Locale.FRENCH, "Avertissement", Level.WARNING, ++ "INFO", Locale.ITALIAN, "Informazioni", Level.INFO, ++ "SEVERE", Locale.FRENCH, "Grave", Level.SEVERE, ++ "CONFIG", Locale.GERMAN, "Konfiguration", Level.CONFIG, ++ "ALL", Locale.ROOT, "All", Level.ALL, ++ "SEVERE", Locale.ROOT, "Severe", Level.SEVERE, ++ "WARNING", Locale.ROOT, "Warning", Level.WARNING, ++ "CONFIG", Locale.ROOT, "Config", Level.CONFIG, ++ "INFO", Locale.ROOT, "Info", Level.INFO, ++ "FINE", Locale.ROOT, "Fine", Level.FINE, ++ "FINER", Locale.ROOT, "Finer", Level.FINER, ++ "FINEST", Locale.ROOT, "Finest", Level.FINEST ++ }; ++ ++ public static void main(String args[]) throws Exception { ++ Locale defaultLocale = Locale.getDefault(); ++ for (int i=0; i localized(" + Locale.ENGLISH + ", " ++ + key + ")=" + en); ++ System.out.println(" => localized(" + locale + ", " + key ++ + ")=" + other); ++ if (!key.equals(en.toUpperCase(Locale.ROOT))) { ++ throw new RuntimeException("Expect " + key ++ + " equals upperCase(" + en + ")"); ++ } ++ if (!Locale.ENGLISH.equals(locale) && !Locale.ROOT.equals(locale) ++ && key.equals(other.toUpperCase(Locale.ROOT))) { ++ throw new RuntimeException("Expect " + key ++ + " not equals upperCase(" + other +")"); ++ } ++ if ((Locale.ENGLISH.equals(locale) || Locale.ROOT.equals(locale)) ++ && !key.equals(other.toUpperCase(Locale.ROOT))) { ++ throw new RuntimeException("Expect " + key ++ + " equals upperCase(" + other +")"); ++ } ++ if (!other.equals(expectedTranslation)) { ++ throw new RuntimeException("Expected \"" + expectedTranslation ++ + "\" for '" + locale + "' but got \"" + other + "\""); ++ } ++ Locale.setDefault(locale); ++ final String levelName = level.getLocalizedName(); ++ System.out.println("Level.getLocalizedName() is: " + levelName); ++ if (!levelName.equals(other.toUpperCase(locale))) { ++ throw new RuntimeException("Expected \"" ++ + other.toUpperCase(locale) + "\" for '" ++ + locale + "' but got \"" + levelName + "\""); ++ } ++ Locale.setDefault(defaultLocale); ++ } ++ } ++ ++ private static final String RBNAME = "sun.util.logging.resources.logging"; ++ private static String getLocalizedMessage(Locale locale, String key) { ++ ResourceBundle rb = ResourceBundle.getBundle(RBNAME, locale); ++ return rb.getString(key); ++ } ++} +--- ./jdk/test/java/util/logging/TestAppletLoggerContext.java 2013-09-06 11:29:51.000000000 -0700 ++++ ./jdk/test/java/util/logging/TestAppletLoggerContext.java 2014-04-19 01:27:14.000000000 -0700 +@@ -110,28 +110,19 @@ + } --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - typedef struct _XmImRefRec { - Cardinal num_refs; /* Number of referencing widgets. */ - Cardinal max_refs; /* Maximum length of refs array. */ ---- jdk/src/solaris/native/sun/awt/awt_wm.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_wm.c 2014-04-20 12:39:22.000000000 -0700 -@@ -121,12 +121,19 @@ - static Atom XA_KWM_WIN_MAXIMIZED; + TestExc exc; +- TestExc global = new TestExc(); - /* OpenLook */ -+static Atom _XA_OL_DECOR_ADD; - static Atom _XA_OL_DECOR_DEL; - static Atom _XA_OL_DECOR_HEADER; - static Atom _XA_OL_DECOR_RESIZE; - static Atom _XA_OL_DECOR_PIN; - static Atom _XA_OL_DECOR_CLOSE; + @Override +- public Object getContext() { return active ? global : null; } ++ public Object getAppletContext() { return active ? exc : null; } + @Override +- public Object getExecutionContext() { return active ? exc : null; } ++ public Object get(Object o) { return exc.get(o); } + @Override +- public Object get(Object o, Object o1) { return TestExc.exc(o).get(o1); } ++ public void put(Object o, Object o1) { exc.put(o, o1); } + @Override +- public void put(Object o, Object o1, Object o2) { TestExc.exc(o).put(o1, o2); } +- @Override +- public void remove(Object o, Object o1) { TestExc.exc(o).remove(o1); } +- @Override +- public Object get(Object o) { return global.get(o); } +- @Override +- public void put(Object o, Object o1) { global.put(o, o1); } +- @Override +- public void remove(Object o) { global.remove(o); } ++ public void remove(Object o) { exc.remove(o); } + @Override + public boolean isDisposed() { return false; } + @Override +- public boolean isMainAppContext() { return exc == null; } ++ public boolean isMainAppContext() { return !active || exc == null; } + } -+/* AfterStep */ -+static Atom _XA_AS_STYLE; + final static JavaAWTAccessStub javaAwtAccess = new JavaAWTAccessStub(); +--- ./jdk/test/java/util/logging/TestGetLoggerNPE.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/TestGetLoggerNPE.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,91 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++import java.io.PrintStream; ++import java.security.Permission; ++import java.security.Policy; ++import java.security.ProtectionDomain; ++import java.util.logging.LogManager; ++import java.util.logging.Logger; ++import sun.awt.SunToolkit; ++ ++/* ++ * @test ++ * @bug 8025512 ++ * ++ * @summary NPE with logging while launching webstart ++ * ++ * @build TestGetLoggerNPE ++ * @run main/othervm TestGetLoggerNPE getLogger ++ * @run main/othervm TestGetLoggerNPE getLogManager ++ */ ++public class TestGetLoggerNPE { ++ static volatile Throwable thrown = null; ++ static volatile sun.awt.AppContext context = null; ++ public static void main(String[] args) throws Exception { ++ final String testCase = args.length == 0 ? "getLogger" : args[0]; ++ final ThreadGroup tg = new ThreadGroup("TestGroup"); ++ Thread t = new Thread(tg, "test") { ++ public void run() { ++ try { ++ context = SunToolkit.createNewAppContext(); ++ final PrintStream out = System.out; ++ System.setOut(null); ++ try { ++ if ("getLogger".equals(testCase)) { ++ Logger.getLogger("sun.plugin"); ++ } else { ++ LogManager.getLogManager(); ++ } ++ } finally { ++ System.setOut(out); ++ } ++ ++ System.out.println(Logger.global); ++ } catch (Throwable x) { ++ x.printStackTrace(); ++ thrown = x; ++ } ++ } ++ }; ++ Policy.setPolicy(new Policy() { ++ public boolean implies(ProtectionDomain domain, ++ Permission permission) { ++ return true; // all permissions ++ } ++ }); ++ System.setSecurityManager(new SecurityManager()); ++ t.start(); ++ t.join(); ++ if (context != null && !context.isDisposed()) { ++ context.dispose(); ++ } ++ if (thrown == null) { ++ System.out.println("PASSED: " + testCase); ++ } else { ++ System.err.println("FAILED: " + testCase); ++ throw new Error("Test failed: " + testCase + " - " + thrown, thrown); ++ } ++ ++ } ++ ++} +--- ./jdk/test/java/util/logging/TestLogConfigurationDeadLock.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/TestLogConfigurationDeadLock.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,256 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++import java.lang.management.ManagementFactory; ++import java.lang.management.ThreadInfo; ++import java.security.Permission; ++import java.security.Policy; ++import java.security.ProtectionDomain; ++import java.util.ArrayList; ++import java.util.List; ++import java.util.concurrent.atomic.AtomicLong; ++import java.util.logging.LogManager; ++import java.util.logging.Logger; ++ ++ ++/** ++ * @test ++ * @bug 8029281 8027670 ++ * @summary Synchronization issues in Logger and LogManager. This test ++ * focusses more particularly on potential deadlock in ++ * drainLoggerRefQueueBounded / readConfiguration ++ * @run main/othervm TestLogConfigurationDeadLock ++ * @author danielfuchs ++ */ ++// This test is a best effort to try & detect issues. The test itself will run ++// for 8secs. This is usually unsufficient to detect issues. ++// To get a greater confidence it is recommended to run this test in a loop: ++// e.g. use something like: ++// $ while jtreg -jdk:$JDK -verbose:all \ ++// test/java/util/logging/TestLogConfigurationDeadLock.java ; \ ++// do echo Running test again ; done ++// and let it run for a few hours... ++// ++public class TestLogConfigurationDeadLock { ++ ++ static volatile Exception thrown = null; ++ static volatile boolean goOn = true; ++ ++ static final int READERS = 2; ++ static final int LOGGERS = 2; ++ static final long TIME = 4 * 1000; // 4 sec. ++ static final long STEP = 1 * 1000; // message every 1 sec. ++ static final int LCOUNT = 50; // 50 loggers created in a row... ++ static final AtomicLong nextLogger = new AtomicLong(0); ++ static final AtomicLong readCount = new AtomicLong(0); ++ static final AtomicLong checkCount = new AtomicLong(0); ++ ++ /** ++ * This test will run both with and without a security manager. ++ * ++ * The test starts a number of threads that will call ++ * LogManager.readConfiguration() concurrently (ReadConf), then starts ++ * a number of threads that will create new loggers concurrently ++ * (AddLogger), and then two additional threads: one (Stopper) that ++ * will stop the test after 4secs (TIME ms), and one DeadlockDetector ++ * that will attempt to detect deadlocks. ++ * If after 4secs no deadlock was detected and no exception was thrown ++ * then the test is considered a success and passes. ++ * ++ * This procedure is done twice: once without a security manager and once ++ * again with a security manager - which means the test takes ~8secs to ++ * run. ++ * ++ * Note that 8sec may not be enough to detect issues if there are some. ++ * This is a best effort test. ++ * ++ * @param args the command line arguments ++ */ ++ public static void main(String[] args) throws Exception { ++ ++ // test without security ++ System.out.println("No security"); ++ test(); ++ ++ // test with security ++ System.out.println("\nWith security"); ++ Policy.setPolicy(new Policy() { ++ @Override ++ public boolean implies(ProtectionDomain domain, Permission permission) { ++ if (super.implies(domain, permission)) return true; ++ // System.out.println("Granting " + permission); ++ return true; // all permissions ++ } ++ }); ++ System.setSecurityManager(new SecurityManager()); ++ test(); ++ } ++ ++ /** ++ * Starts all threads, wait 4secs, then stops all threads. ++ * @throws Exception if a deadlock was detected or an error occurred. ++ */ ++ public static void test() throws Exception { ++ goOn = true; ++ thrown = null; ++ long sNextLogger = nextLogger.get(); ++ long sReadCount = readCount.get(); ++ long sCheckCount = checkCount.get(); ++ List threads = new ArrayList<>(); ++ for (int i = 0; i 0) { ++ ThreadInfo[] infos = ManagementFactory.getThreadMXBean() ++ .getThreadInfo(ids, Integer.MAX_VALUE); ++ System.err.println("Found "+ids.length+" deadlocked threads: "); ++ for (ThreadInfo inf : infos) { ++ System.err.println(inf.toString()); ++ } ++ throw new RuntimeException("Found "+ids.length+" deadlocked threads"); ++ } ++ Thread.sleep(100); ++ } catch(InterruptedException | RuntimeException x) { ++ fail(x); ++ } ++ } ++ } ++ ++ } ++ ++ static final class Stopper extends Thread { ++ long start; ++ long time; ++ ++ Stopper(long time) { ++ start = System.currentTimeMillis(); ++ this.time = time; ++ } ++ ++ @Override ++ public void run() { ++ try { ++ long rest, previous; ++ previous = time; ++ while (goOn && (rest = start - System.currentTimeMillis() + time) > 0) { ++ if (previous == time || previous - rest >= STEP) { ++ Logger.getLogger("remaining").info(String.valueOf(rest)+"ms remaining..."); ++ previous = rest == time ? rest -1 : rest; ++ System.gc(); ++ } ++ if (goOn == false) break; ++ Thread.sleep(Math.min(rest, 100)); ++ } ++ System.out.println(System.currentTimeMillis() - start ++ + " ms elapsed ("+time+ " requested)"); ++ goOn = false; ++ } catch(InterruptedException | RuntimeException x) { ++ fail(x); ++ } ++ } ++ ++ } ++ ++ static void fail(Exception x) { ++ x.printStackTrace(); ++ if (thrown == null) { ++ thrown = x; ++ } ++ goOn = false; ++ } ++} +--- ./jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,340 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++import java.io.File; ++import java.io.PrintStream; ++import java.lang.management.ManagementFactory; ++import java.lang.management.ThreadInfo; ++import java.security.Permission; ++import java.security.Policy; ++import java.security.ProtectionDomain; ++import java.util.ArrayList; ++import java.util.Collections; ++import java.util.HashSet; ++import java.util.List; ++import java.util.Random; ++import java.util.Set; ++import java.util.concurrent.atomic.AtomicLong; ++import java.util.logging.Level; ++import java.util.logging.LogManager; ++import java.util.logging.Logger; ++ ++ ++/** ++ * @test ++ * @bug 8027670 8029281 ++ * @summary Deadlock in drainLoggerRefQueueBounded / readConfiguration ++ * caused by synchronization issues in Logger and LogManager. ++ * @run main/othervm TestLogConfigurationDeadLockWithConf ++ * @author danielfuchs ++ */ ++// This test is a best effort to try & detect issues. The test itself will run ++// for 8secs. This is usually sufficient to detect issues. ++// However to get a greater confidence it is recommended to run this test in a loop: ++// e.g. use something like: ++// $ while jtreg -jdk:$JDK -verbose:all \ ++// test/java/util/logging/TestLogConfigurationDeadLockWithConf.java ; \ ++// do echo Running test again ; done ++// and let it run for a few hours... ++// ++public class TestLogConfigurationDeadLockWithConf { ++ ++ static volatile Exception thrown = null; ++ static volatile boolean goOn = true; ++ ++ static final int READERS = 2; ++ static final int LOGGERS = 2; ++ static final long TIME = 4 * 1000; // 4 sec. ++ static final long STEP = 1 * 1000; // message every 1 sec. ++ static final int LCOUNT = 50; // 50 loggers created in a row... ++ static final AtomicLong nextLogger = new AtomicLong(0); ++ static final AtomicLong readCount = new AtomicLong(0); ++ static final AtomicLong checkCount = new AtomicLong(0); ++ ++ /** ++ * This test will run both with and without a security manager. ++ * ++ * The test starts a number of threads that will call ++ * LogManager.readConfiguration() concurrently (ReadConf), then starts ++ * a number of threads that will create new loggers concurrently ++ * (AddLogger), and then two additional threads: one (Stopper) that ++ * will stop the test after 4secs (TIME ms), and one DeadlockDetector ++ * that will attempt to detect deadlocks. ++ * If after 4secs no deadlock was detected and no exception was thrown ++ * then the test is considered a success and passes. ++ * ++ * This procedure is done twice: once without a security manager and once ++ * again with a security manager - which means the test takes ~8secs to ++ * run. ++ * ++ * Note that 8sec may not be enough to detect issues if there are some. ++ * This is a best effort test. ++ * ++ * @param args the command line arguments ++ * @throws java.lang.Exception if the test fails. ++ */ ++ public static void main(String[] args) throws Exception { ++ File config = new File(System.getProperty("test.src", "."), ++ "deadlockconf.properties"); ++ if (!config.canRead()) { ++ System.err.println("Can't read config file: test cannot execute."); ++ System.err.println("Please check your test environment: "); ++ System.err.println("\t -Dtest.src=" + System.getProperty("test.src", ".")); ++ System.err.println("\t config file is: " + config.getAbsolutePath()); ++ throw new RuntimeException("Can't read config file: " ++ + config.getAbsolutePath()); ++ } ++ ++ System.setProperty("java.util.logging.config.file", ++ config.getAbsolutePath()); ++ ++ // test without security ++ System.out.println("No security"); ++ test(); ++ ++ // test with security ++ System.out.println("\nWith security"); ++ Policy.setPolicy(new Policy() { ++ @Override ++ public boolean implies(ProtectionDomain domain, Permission permission) { ++ if (super.implies(domain, permission)) return true; ++ // System.out.println("Granting " + permission); ++ return true; // all permissions ++ } ++ }); ++ System.setSecurityManager(new SecurityManager()); ++ test(); ++ } ++ ++ static Random rand = new Random(System.currentTimeMillis()); ++ private static int getBarCount() { ++ return rand.nextInt(10); ++ } ++ ++ /** ++ * Starts all threads, wait 4secs, then stops all threads. ++ * @throws Exception if a deadlock was detected or an error occurred. ++ */ ++ public static void test() throws Exception { ++ goOn = true; ++ thrown = null; ++ long sNextLogger = nextLogger.get(); ++ long sReadCount = readCount.get(); ++ long sCheckCount = checkCount.get(); ++ List threads = new ArrayList<>(); ++ for (int i = 0; i deadlocked = Collections.synchronizedSet(new HashSet()); + -+ { &_XA_AS_STYLE, "_XA_AS_STYLE" }, ++ static List asList(long... ids) { ++ final List list = new ArrayList<>(ids.length); ++ for (long id : ids) { ++ list.add(id); ++ } ++ return list; ++ } + -+ { &_XA_WINDOWMAKER_STATE, "_XA_WINDOWMAKER_STATE" } - }; - #define ATOM_LIST_LENGTH (sizeof(atom_list)/sizeof(atom_list[0])) - -@@ -942,6 +954,39 @@ - return True; - } - -+/* -+ * Window Maker. -+ */ -+static Boolean -+awt_wm_isWindowmaker() -+{ -+ if (awt_wm_atomInterned(&_XA_WINDOWMAKER_STATE, "_WINDOWMAKER_STATE")) -+ return True; -+ return False; -+} ++ @Override ++ public void run() { ++ while(goOn) { ++ try { ++ long[] ids = ManagementFactory.getThreadMXBean().findDeadlockedThreads(); ++ checkCount.incrementAndGet(); ++ ids = ids == null ? new long[0] : ids; ++ if (ids.length > 0) { ++ deadlocked.addAll(asList(ids)); ++ } ++ if (ids.length == 1) { ++ throw new RuntimeException("Found 1 deadlocked thread: "+ids[0]); ++ } else if (ids.length > 0) { ++ ThreadInfo[] infos = ManagementFactory.getThreadMXBean().getThreadInfo(ids, Integer.MAX_VALUE); ++ System.err.println("Found "+ids.length+" deadlocked threads: "); ++ for (ThreadInfo inf : infos) { ++ System.err.println(inf.toString()); ++ } ++ throw new RuntimeException("Found "+ids.length+" deadlocked threads"); ++ } ++ Thread.sleep(100); ++ } catch(InterruptedException | RuntimeException x) { ++ fail(x); ++ } ++ } ++ } ++ ++ } ++ ++ static final class Stopper extends Thread { ++ long start; ++ long time; ++ ++ static final Logger logger = Logger.getLogger("remaining"); ++ ++ Stopper(long time) { ++ start = System.currentTimeMillis(); ++ this.time = time; ++ } ++ ++ @Override ++ public void run() { ++ try { ++ long rest, previous; ++ previous = time; ++ while (goOn && (rest = start - System.currentTimeMillis() + time) > 0) { ++ if (previous == time || previous - rest >= STEP) { ++ logger.log(Level.INFO, ++ "{0}ms remaining...", String.valueOf(rest)); ++ previous = rest == time ? rest -1 : rest; ++ System.gc(); ++ } ++ if (goOn == false) break; ++ Thread.sleep(Math.min(rest, 100)); ++ } ++ System.out.println(System.currentTimeMillis() - start ++ + " ms elapsed ("+time+ " requested)"); ++ goOn = false; ++ } catch(InterruptedException | RuntimeException x) { ++ fail(x); ++ } ++ } ++ ++ } + ++ static void fail(Exception x) { ++ x.printStackTrace(); ++ if (thrown == null) { ++ thrown = x; ++ } ++ goOn = false; ++ } ++} +--- ./jdk/test/java/util/logging/TestLoggerBundleSync.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/TestLoggerBundleSync.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,535 @@ +/* -+ * Afterstep. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. + */ -+static Boolean -+awt_wm_isAfterstep() -+{ -+ if (awt_wm_atomInterned(&_XA_AS_STYLE, "_AS_STYLE")) -+ return True; -+ return False; -+} + -+/* -+ * FVWM 2. ++import java.lang.management.ManagementFactory; ++import java.lang.management.ThreadInfo; ++import java.security.Permission; ++import java.security.Policy; ++import java.security.ProtectionDomain; ++import java.util.ArrayList; ++import java.util.List; ++import java.util.ListResourceBundle; ++import java.util.Objects; ++import java.util.ResourceBundle; ++import java.util.concurrent.Callable; ++import java.util.concurrent.ExecutorService; ++import java.util.concurrent.Executors; ++import java.util.concurrent.FutureTask; ++import java.util.concurrent.atomic.AtomicLong; ++import java.util.logging.Handler; ++import java.util.logging.Level; ++import java.util.logging.LogRecord; ++import java.util.logging.Logger; ++ ++/** ++ * @test ++ * @bug 8029281 8028763 ++ * @summary Attempts to detect synchronization issues with getResourceBundle() ++ * and getResourceBundleName(). It might also detect issues in the way ++ * that the logger tree is cleaned up after a logger has been garbage ++ * collected. This test helped find the root cause of 8029092, so if ++ * this test fails one might also expect failures in ++ * java/util/logging/Logger/logrb/TestLogrbResourceBundle.java and ++ * java/util/logging/Logger/setResourceBundle/TestSetResourceBundle.java. ++ * Note that this is a best effort test. Running it in a loop to ++ * reproduce intermittent issues can be a good idea. ++ * @run main/othervm TestLoggerBundleSync ++ * @author danielfuchs + */ -+static Boolean -+awt_wm_isFvwm2() -+{ -+ if (awt_wm_atomInterned(&_XA_OL_DECOR_ADD, "_OL_DECOR_ADD") -+ && !awt_wm_atomInterned(&_XA_OL_DECOR_PIN, "_OL_DECOR_PIN")) -+ return True; -+ return False; -+} - - static Boolean - awt_wm_isNetWMName(char *name) -@@ -1280,6 +1325,12 @@ - else if (awt_wm_isKDE2()) { - awt_wmgr = KDE2_WM; - } -+ else if (awt_wm_isWindowmaker()) { -+ awt_wmgr = WINDOWMAKER_WM; ++public class TestLoggerBundleSync { ++ ++ static volatile Exception thrown = null; ++ static volatile boolean goOn = true; ++ ++ static final int READERS = 3; ++ static final long TIME = 4 * 1000; // 4 sec. ++ static final long STEP = 1 * 1000; // message every 1 sec. ++ static final int LCOUNT = 50; // change bundle 50 times... ++ static final AtomicLong setRBcount = new AtomicLong(0); ++ static final AtomicLong setRBNameCount = new AtomicLong(0); ++ static final AtomicLong getRBcount = new AtomicLong(0); ++ static final AtomicLong checkCount = new AtomicLong(0); ++ static final AtomicLong nextLong = new AtomicLong(0); ++ ++ public static class MyBundle extends ListResourceBundle { ++ @Override ++ protected Object[][] getContents() { ++ return new Object[][] { ++ {"dummy", "foo"} ++ }; ++ } + } -+ else if (awt_wm_isAfterstep()) { -+ awt_wmgr = AFTERSTEP_WM; ++ ++ public static final class MyBundle1 extends MyBundle { }; ++ public static final class MyBundle2 extends MyBundle { }; ++ public static final class MyBundle3 extends MyBundle { }; ++ ++ ++ public static final class LoggerRB { ++ public final String resourceBundleName; ++ public final ResourceBundle userBundle; ++ public LoggerRB(String name, ResourceBundle bundle) { ++ resourceBundleName = name; ++ userBundle = bundle; ++ } + } - /* - * We don't check for legacy WM when we already know that WM - * supports WIN or _NET wm spec. -@@ -1302,6 +1353,9 @@ - awt_wmgr = MOTIF_WM; - } - else if (awt_wm_isOpenLook()) { -+ awt_wmgr = OPENLOOK_WM; ++ ++ static final List> classes = new ArrayList<>(); ++ static { ++ classes.add(MyBundle1.class); ++ classes.add(MyBundle2.class); ++ classes.add(MyBundle3.class); + } -+ else if (awt_wm_isFvwm2()) { - awt_wmgr = OPENLOOK_WM; - } - else { ---- jdk/src/solaris/native/sun/awt/awt_wm.h 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/awt_wm.h 2014-04-20 12:39:22.000000000 -0700 -@@ -45,7 +45,10 @@ - KDE2_WM, - SAWFISH_WM, - ICE_WM, -- METACITY_WM -+ METACITY_WM, -+ AFTERSTEP_WM, -+ WINDOWMAKER_WM, -+ FVWM2_WM - }; - - extern void awt_wm_init(void); ---- jdk/src/solaris/native/sun/awt/extutil.h 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/extutil.h 2014-04-20 12:39:22.000000000 -0700 -@@ -58,7 +58,7 @@ - */ - /* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - - #ifndef _EXTUTIL_H_ - #define _EXTUTIL_H_ -@@ -248,4 +248,4 @@ - char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n) - #endif - --#endif /* __linux__ || MACOSX */ -+#endif /* __linux__ || _ALLBSD_SOURCE */ ---- jdk/src/solaris/native/sun/awt/fontpath.c 2013-09-06 11:29:10.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/fontpath.c 2014-04-20 12:39:22.000000000 -0700 -@@ -23,7 +23,7 @@ - * questions. - */ - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - #include - #endif /* __linux__ */ - #include -@@ -79,7 +79,7 @@ - - #define MAXFDIRS 512 /* Max number of directories that contain fonts */ - --#if !defined(__linux__) && !defined(MACOSX) -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - /* - * This can be set in the makefile to "/usr/X11" if so desired. - */ -@@ -145,6 +145,22 @@ - PACKAGE_PATH "/share/fonts/Type1", - NULL, /* terminates the list */ - }; -+#elif _ALLBSD_SOURCE -+static char *fullBSDFontPath[] = { -+ X11_PATH "/lib/X11/fonts/TrueType", -+ X11_PATH "/lib/X11/fonts/truetype", -+ X11_PATH "/lib/X11/fonts/tt", -+ X11_PATH "/lib/X11/fonts/TTF", -+ X11_PATH "/lib/X11/fonts/OTF", -+ PACKAGE_PATH "/share/fonts/TrueType", -+ PACKAGE_PATH "/share/fonts/truetype", -+ PACKAGE_PATH "/share/fonts/tt", -+ PACKAGE_PATH "/share/fonts/TTF", -+ PACKAGE_PATH "/share/fonts/OTF", -+ X11_PATH "/lib/X11/fonts/Type1", -+ PACKAGE_PATH "/share/fonts/Type1", -+ NULL, /* terminates the list */ -+}; - #else /* __linux */ - /* All the known interesting locations we have discovered on - * various flavors of Linux -@@ -401,7 +417,7 @@ - - #endif /* !HEADLESS */ - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - /* from awt_LoadLibrary.c */ - JNIEXPORT jboolean JNICALL AWTIsHeadless(); - #endif -@@ -530,6 +546,8 @@ - knowndirs = fullLinuxFontPath; - #elif defined(MACOSX) - knowndirs = full_MACOSX_X11FontPath; -+#elif defined(_ALLBSD_SOURCE) -+ knowndirs = fullBSDFontPath; - #else /* IF SOLARIS */ - knowndirs = fullSolarisFontPath; - #endif -@@ -540,7 +558,7 @@ - * be initialised. - */ - #ifndef HEADLESS --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - /* There's no headless build on linux ... */ - if (!AWTIsHeadless()) { /* .. so need to call a function to check */ - #endif -@@ -556,7 +574,7 @@ - x11dirs = getX11FontPath(); - } - AWT_UNLOCK(); --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - } - #endif - #endif /* !HEADLESS */ ---- jdk/src/solaris/native/sun/awt/robot_common.c 2013-09-06 11:29:11.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/robot_common.c 2014-04-20 12:39:22.000000000 -0700 -@@ -27,7 +27,7 @@ - #error This file should not be included in headless library - #endif - --#ifdef MACOSX -+#ifdef _ALLBSD_SOURCE - #include - #endif - ---- jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c 2013-09-06 11:29:11.000000000 -0700 -+++ jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c 2014-04-20 12:39:22.000000000 -0700 -@@ -577,8 +577,8 @@ - SplashUnlock(splash); - rc = poll(pfd, 2, timeout); - SplashLock(splash); -- if (splash->isVisible>0 && SplashTime() >= splash->time + -- splash->frames[splash->currentFrame].delay) { -+ if (splash->isVisible > 0 && splash->currentFrame >= 0 && -+ SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) { - SplashNextFrame(splash); - SplashUpdateShape(splash); - SplashRedrawWindow(splash); ---- jdk/src/solaris/native/sun/java2d/j2d_md.h 2013-09-06 11:29:11.000000000 -0700 -+++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2014-04-20 12:39:22.000000000 -0700 -@@ -28,9 +28,9 @@ - #include - - /* -- * Linux and MACOSX's version of does not define intptr_t -+ * Linux and BSD's's version of does not define intptr_t - */ --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - #include - #endif /* __linux__ || MACOSX */ - ---- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2013-09-06 11:29:11.000000000 -0700 -+++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2014-04-20 12:39:22.000000000 -0700 -@@ -804,7 +804,7 @@ - static int initialized; - static int usevis = JNI_TRUE; - --#if defined(__linux__) || defined(MACOSX) -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - # define ULTRA_CHIP "sparc64" - #else - # define ULTRA_CHIP "sun4u" ---- jdk/src/solaris/native/sun/net/portconfig.c 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/solaris/native/sun/net/portconfig.c 2014-04-28 17:39:02.000000000 -0700 -@@ -0,0 +1,140 @@ ++ ++ ++ /** ++ * This test will run both with and without a security manager. ++ * ++ * The test starts a number of threads that will attempt to concurrently ++ * set resource bundles on Logger, and verifies the consistency of the ++ * obtained results. ++ * ++ * This is a best effort test. ++ * ++ * @param args the command line arguments ++ */ ++ public static void main(String[] args) throws Exception { ++ ++ try { ++ // test without security ++ System.out.println("No security"); ++ test(); ++ ++ // test with security ++ System.out.println("\nWith security"); ++ Policy.setPolicy(new Policy() { ++ @Override ++ public boolean implies(ProtectionDomain domain, Permission permission) { ++ if (super.implies(domain, permission)) return true; ++ // System.out.println("Granting " + permission); ++ return true; // all permissions ++ } ++ }); ++ System.setSecurityManager(new SecurityManager()); ++ test(); ++ } finally { ++ SetRB.executor.shutdownNow(); ++ SetRBName.executor.shutdownNow(); ++ } ++ } ++ ++ /** ++ * Starts all threads, wait 15secs, then stops all threads. ++ * @throws Exception if a deadlock was detected or an error occurred. ++ */ ++ public static void test() throws Exception { ++ goOn = true; ++ thrown = null; ++ long sGetRBCount = getRBcount.get(); ++ long sSetRBCount = setRBcount.get(); ++ long sSetRBNameCount = setRBNameCount.get(); ++ long sCheckCount = checkCount.get(); ++ long sNextLong = nextLong.get(); ++ List threads = new ArrayList<>(); ++ for (Class type : classes) { ++ threads.add(new SetRB(type)); ++ threads.add(new SetRBName(type)); ++ } ++ for (int i =0 ; i < READERS ; i++) { ++ threads.add(new GetRB()); ++ } ++ threads.add(new DeadlockDetector()); ++ threads.add(0, new Stopper(TIME)); ++ for (Thread t : threads) { ++ t.start(); ++ } ++ for (Thread t : threads) { ++ try { ++ t.join(); ++ } catch (Exception x) { ++ fail(x); ++ } ++ } ++ if (thrown != null) { ++ throw thrown; ++ } ++ System.out.println("Passed: " + (nextLong.longValue() - sNextLong) ++ + " unique loggers created"); ++ System.out.println("\t " +(getRBcount.get() - sGetRBCount) ++ + " loggers tested by " + READERS + " Thread(s),"); ++ System.out.println("\t " + (setRBcount.get() - sSetRBCount) ++ + " resource bundles set by " + classes.size() + " Thread(s),"); ++ System.out.println("\t " + (setRBNameCount.get() - sSetRBNameCount) ++ + " resource bundle names set by " + classes.size() + " Thread(s),"); ++ System.out.println("\t ThreadMXBean.findDeadlockedThreads called " ++ + (checkCount.get() -sCheckCount) + " times by 1 Thread."); ++ ++ } ++ ++ final static class GetRB extends Thread { ++ final static class MyHandler extends Handler { ++ volatile ResourceBundle rb; ++ volatile String rbName; ++ @Override ++ public synchronized void publish(LogRecord record) { ++ rb = record.getResourceBundle(); ++ rbName = record.getResourceBundleName(); ++ } ++ ++ @Override ++ public void flush() { ++ } ++ ++ @Override ++ public void close() throws SecurityException { ++ } ++ }; ++ final MyHandler handler = new MyHandler(); ++ @Override ++ public void run() { ++ try { ++ handler.setLevel(Level.FINEST); ++ while (goOn) { ++ Logger l; ++ Logger foo = Logger.getLogger("foo"); ++ Logger bar = Logger.getLogger("foo.bar"); ++ for (long i=0; i < nextLong.longValue() + 100 ; i++) { ++ if (!goOn) break; ++ l = Logger.getLogger("foo.bar.l"+i); ++ final ResourceBundle b = l.getResourceBundle(); ++ final String name = l.getResourceBundleName(); ++ if (b != null) { ++ if (!name.equals(b.getClass().getName())) { ++ throw new RuntimeException("Unexpected bundle name: " ++ +b.getClass().getName()); ++ } ++ } ++ Logger ll = Logger.getLogger(l.getName()+".bie.bye"); ++ ResourceBundle hrb; ++ String hrbName; ++ ll.setLevel(Level.FINEST); ++ ll.addHandler(handler); ++ ll.fine("dummy"); ++ ll.removeHandler(handler); ++ hrb = handler.rb; ++ hrbName = handler.rbName; ++ if (name != null) { ++ if (!name.equals(hrbName)) { ++ throw new RuntimeException("Unexpected bundle name: " ++ +hrb.getClass().getName()); ++ } ++ if (!name.equals(hrb.getClass().getName())) { ++ throw new RuntimeException("Unexpected bundle name: " ++ +hrb.getClass().getName()); ++ } ++ } ++ ++ getRBcount.incrementAndGet(); ++ if (!goOn) break; ++ Thread.sleep(1); ++ } ++ } ++ } catch (Exception x) { ++ fail(x); ++ } ++ } ++ } ++ ++ final static class SetRB extends Thread { ++ final Class type; ++ final static ExecutorService executor = Executors.newSingleThreadExecutor(); ++ final static class CheckRBTask implements Callable { ++ final Logger logger; ++ volatile String rbName; ++ volatile ResourceBundle rb; ++ ++ public CheckRBTask(Logger logger) { ++ this.logger = logger; ++ } ++ ++ @Override ++ public Exception call() throws Exception { ++ try { ++ final String name = logger.getResourceBundleName(); ++ if (!Objects.equals(name, rbName)) { ++ throw new RuntimeException("Unexpected rbname for " ++ + logger.getName() + ": " + name); ++ } ++ final ResourceBundle b = logger.getResourceBundle(); ++ if (b != rb) { ++ throw new RuntimeException("Unexpected rb for " ++ + logger.getName() + ": " + b); ++ } ++ } catch(Exception x) { ++ return x; ++ } ++ return null; ++ } ++ ++ public void check() throws Exception { ++ final FutureTask futureTask = new FutureTask<>(this); ++ executor.submit(futureTask); ++ Exception x = futureTask.get(); ++ if ( x != null) { ++ throw new RuntimeException("Check failed: "+x,x); ++ } ++ } ++ } ++ SetRB(Class type) { ++ super("SetRB["+type.getSimpleName()+"]"); ++ this.type = type; ++ } ++ @Override ++ public void run() { ++ try { ++ while (goOn) { ++ Logger l; ++ Logger foo = Logger.getLogger("foo"); ++ Logger bar = Logger.getLogger("foo.bar"); ++ l = Logger.getLogger("foo.bar.l"+nextLong.incrementAndGet()); ++ final CheckRBTask checkTask = new CheckRBTask(l); ++ checkTask.check(); ++ Logger l1 = l; ++ ++ for (int i=0; i < LCOUNT ; i++) { ++ if (!goOn) break; ++ ++ ResourceBundle b = ResourceBundle.getBundle(type.getName()); ++ try { ++ l = Logger.getLogger(l1.getName(), type.getName()); ++ checkTask.rb = b; ++ checkTask.rbName = type.getName(); ++ checkTask.check(); ++ if (!goOn) break; ++ ++ String name = l.getResourceBundleName(); ++ ResourceBundle bb = l.getResourceBundle(); ++ if (!type.getName().equals(name)) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected name: "+name); ++ } ++ if (!b.getClass().getName().equals(name)) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected base name: " + ++ b.getClass().getName()); ++ } ++ if (b != bb) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected bundle: "+bb); ++ } ++ setRBcount.incrementAndGet(); ++ } catch (IllegalArgumentException x) { ++ final String name = l.getResourceBundleName(); ++ if (!name.startsWith(MyBundle.class.getName())) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected name: "+name, x); ++ } else if (type.getName().equals(name)) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected exception for "+name, x); ++ } ++ throw x; ++ } ++ l.fine("I'm fine"); ++ if (!goOn) break; ++ Thread.sleep(1); ++ } ++ } ++ } catch (Exception x) { ++ fail(x); ++ } ++ } ++ } ++ ++ final static class SetRBName extends Thread { ++ int nexti = 0; ++ final Class type; ++ final static ExecutorService executor = Executors.newSingleThreadExecutor(); ++ final static class CheckRBNameTask implements Callable { ++ final Logger logger; ++ volatile String rbName; ++ ++ public CheckRBNameTask(Logger logger) { ++ this.logger = logger; ++ } ++ ++ @Override ++ public Exception call() throws Exception { ++ try { ++ final String name = logger.getResourceBundleName(); ++ if (!Objects.equals(name, rbName)) { ++ throw new RuntimeException("Unexpected rbname for " ++ + logger.getName() + ": " + name); ++ } ++ final ResourceBundle b = logger.getResourceBundle(); ++ if (!Objects.equals(b == null ? null : b.getClass().getName(), rbName)) { ++ throw new RuntimeException("Unexpected base name for " ++ + logger.getName() + ": " + b.getClass().getName()); ++ } ++ } catch(Exception x) { ++ return x; ++ } ++ return null; ++ } ++ ++ public void check() throws Exception { ++ final FutureTask futureTask = new FutureTask<>(this); ++ executor.submit(futureTask); ++ Exception x = futureTask.get(); ++ if ( x != null) { ++ throw new RuntimeException("Check failed: "+x,x); ++ } ++ } ++ ++ } ++ SetRBName(Class type) { ++ super("SetRB["+type.getSimpleName()+"]"); ++ this.type = type; ++ } ++ @Override ++ public void run() { ++ try { ++ while (goOn) { ++ Logger foo = Logger.getLogger("foo"); ++ Logger bar = Logger.getLogger("foo.bar"); ++ Logger l = Logger.getLogger("foo.bar.l"+nextLong.incrementAndGet()); ++ final CheckRBNameTask checkTask = new CheckRBNameTask(l); ++ checkTask.check(); ++ ++ for (int i=0; i < LCOUNT ; i++) { ++ if (!goOn) break; ++ ++ try { ++ Logger l2 = Logger.getLogger(l.getName(), type.getName()); ++ if (l2 != l) { ++ System.err.println("**** ERROR WITH "+l.getName()); ++ throw new RuntimeException("l2 != l [" ++ + l2 + "(" + l2.getName() + ") != " ++ + l + "(" + l.getName() + ")]"); ++ } ++ checkTask.rbName = type.getName(); ++ checkTask.check(); ++ if (!goOn) break; ++ ++ String name = l.getResourceBundleName(); ++ ResourceBundle bb = l.getResourceBundle(); ++ if (!type.getName().equals(name)) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected name: "+name); ++ } ++ if (!bb.getClass().getName().equals(name)) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected base name: " ++ + bb.getClass().getName()); ++ } ++ setRBNameCount.incrementAndGet(); ++ } catch (IllegalArgumentException x) { ++ final String name = l.getResourceBundleName(); ++ if (!name.startsWith(MyBundle.class.getName())) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected name: "+name, x); ++ } else if (type.getName().equals(name)) { ++ throw new RuntimeException(this.getName() ++ + ": Unexpected exception for "+name, x); ++ } ++ throw x; ++ } ++ l.fine("I'm fine"); ++ if (!goOn) break; ++ Thread.sleep(1); ++ } ++ } ++ } catch (Exception x) { ++ fail(x); ++ } ++ } ++ } ++ ++ final static class DeadlockDetector extends Thread { ++ ++ @Override ++ public void run() { ++ while(goOn) { ++ try { ++ long[] ids = ManagementFactory.getThreadMXBean().findDeadlockedThreads(); ++ checkCount.incrementAndGet(); ++ ids = ids == null ? new long[0] : ids; ++ if (ids.length == 1) { ++ throw new RuntimeException("Found 1 deadlocked thread: "+ids[0]); ++ } else if (ids.length > 0) { ++ ThreadInfo[] infos = ManagementFactory.getThreadMXBean().getThreadInfo(ids); ++ System.err.println("Found "+ids.length+" deadlocked threads: "); ++ for (ThreadInfo inf : infos) { ++ System.err.println(inf.toString()); ++ } ++ throw new RuntimeException("Found "+ids.length+" deadlocked threads"); ++ } ++ Thread.sleep(100); ++ } catch(InterruptedException | RuntimeException x) { ++ fail(x); ++ } ++ } ++ } ++ ++ } ++ ++ static final class Stopper extends Thread { ++ long start; ++ long time; ++ ++ Stopper(long time) { ++ start = System.currentTimeMillis(); ++ this.time = time; ++ } ++ ++ @Override ++ public void run() { ++ try { ++ long rest, previous; ++ previous = time; ++ while (goOn && (rest = start - System.currentTimeMillis() + time) > 0) { ++ if (previous == time || previous - rest >= STEP) { ++ Logger.getLogger("remaining").info(String.valueOf(rest)+"ms remaining..."); ++ previous = rest == time ? rest -1 : rest; ++ System.gc(); ++ } ++ if (goOn == false) break; ++ Thread.sleep(Math.min(rest, 100)); ++ } ++ System.out.println(System.currentTimeMillis() - start ++ + " ms elapsed ("+time+ " requested)"); ++ goOn = false; ++ } catch(InterruptedException | RuntimeException x) { ++ fail(x); ++ } ++ } ++ ++ } ++ ++ static void fail(Exception x) { ++ x.printStackTrace(); ++ if (thrown == null) { ++ thrown = x; ++ } ++ goOn = false; ++ } ++} +--- ./jdk/test/java/util/logging/TestLoggingWithMainAppContext.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/TestLoggingWithMainAppContext.java 2014-04-19 01:27:14.000000000 -0700 +@@ -0,0 +1,75 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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. ++ */ ++import java.io.ByteArrayInputStream; ++import java.io.IOException; ++import java.util.logging.Logger; ++import javax.imageio.ImageIO; ++ ++/** ++ * @test ++ * @bug 8019853 8023258 ++ * @summary Test that the default user context is used when in the main ++ * application context. This test must not be run in same VM or agent ++ * VM mode: it would not test the intended behavior. ++ * @run main/othervm TestLoggingWithMainAppContext ++ */ ++public class TestLoggingWithMainAppContext { ++ ++ public static void main(String[] args) throws IOException { ++ System.out.println("Creating loggers."); ++ ++ // These loggers will be created in the default user context. ++ final Logger foo1 = Logger.getLogger( "foo" ); ++ final Logger bar1 = Logger.getLogger( "foo.bar" ); ++ if (bar1.getParent() != foo1) { ++ throw new RuntimeException("Parent logger of bar1 "+bar1+" is not "+foo1); ++ } ++ System.out.println("bar1.getParent() is the same as foo1"); ++ ++ // Set a security manager ++ System.setSecurityManager(new SecurityManager()); ++ System.out.println("Now running with security manager"); ++ ++ // Triggers the creation of the main AppContext ++ ByteArrayInputStream is = new ByteArrayInputStream(new byte[] { 0, 1 }); ++ ImageIO.read(is); // triggers calls to system loggers & creation of main AppContext ++ ++ // verify that we're still using the default user context ++ final Logger bar2 = Logger.getLogger( "foo.bar" ); ++ if (bar1 != bar2) { ++ throw new RuntimeException("bar2 "+bar2+" is not the same as bar1 "+bar1); ++ } ++ System.out.println("bar2 is the same as bar1"); ++ if (bar2.getParent() != foo1) { ++ throw new RuntimeException("Parent logger of bar2 "+bar2+" is not foo1 "+foo1); ++ } ++ System.out.println("bar2.getParent() is the same as foo1"); ++ final Logger foo2 = Logger.getLogger("foo"); ++ if (foo1 != foo2) { ++ throw new RuntimeException("foo2 "+foo2+" is not the same as foo1 "+foo1); ++ } ++ System.out.println("foo2 is the same as foo1"); ++ ++ System.out.println("Test passed."); ++ } ++} +--- ./jdk/test/java/util/logging/TestMainAppContext.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/TestMainAppContext.java 2014-04-19 01:27:14.000000000 -0700 +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 @@ -59847,529 +106985,242 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ ++import java.util.logging.Logger; ++import sun.awt.AppContext; ++import sun.awt.SunToolkit; + -+#include -+#include -+#include -+#include -+ -+#if defined(_ALLBSD_SOURCE) -+#include -+#endif -+ -+#include "jni.h" -+#include "net_util.h" -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+struct portrange { -+ int lower; -+ int higher; -+}; -+ -+static int getPortRange(struct portrange *range) -+{ -+#ifdef __linux__ -+ { -+ int ret; -+ FILE *f; -+ -+ f = fopen("/proc/sys/net/ipv4/ip_local_port_range", "r"); -+ if (f != NULL) { -+ ret = fscanf(f, "%d %d", &range->lower, &range->higher); -+ fclose(f); -+ return ret == 2 ? 0 : -1; -+ } -+ return -1; -+ } -+ -+#elif defined(__solaris__) -+ { -+ range->lower = net_getParam("/dev/tcp", "tcp_smallest_anon_port"); -+ range->higher = net_getParam("/dev/tcp", "tcp_largest_anon_port"); -+ return 0; -+ } -+#elif defined(__OpenBSD__) -+ { -+ int mib[3]; -+ mib[0] = CTL_NET; -+ mib[1] = PF_INET; -+ -+ mib[2] = IPCTL_IPPORT_HIFIRSTAUTO; -+ size_t rlen = sizeof(range->lower); -+ if (sysctl(mib, 3, &range->lower, &rlen, NULL, 0) == -1) -+ return -1; -+ -+ mib[2] = IPCTL_IPPORT_HILASTAUTO; -+ rlen = sizeof(range->higher); -+ if (sysctl(mib, 3, &range->higher, &rlen, NULL, 0) == -1) -+ return -1; -+ -+ return 0; -+ } -+#elif defined(_ALLBSD_SOURCE) -+ { -+ int ret; -+ size_t size = sizeof(range->lower); -+ ret = sysctlbyname( -+ "net.inet.ip.portrange.first", &range->lower, &size, 0, 0 -+ ); -+ if (ret == -1) { -+ return -1; -+ } -+ size = sizeof(range->higher); -+ ret = sysctlbyname( -+ "net.inet.ip.portrange.last", &range->higher, &size, 0, 0 -+ ); -+ return ret; -+ } -+#else -+ return -1; -+#endif -+} -+ -+/* -+ * Class: sun_net_PortConfig -+ * Method: getLower0 -+ * Signature: ()I -+ */ -+JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getLower0 -+ (JNIEnv *env, jclass clazz) -+{ -+ struct portrange range; -+ if (getPortRange(&range) < 0) { -+ return -1; -+ } -+ return range.lower; -+} + -+/* -+ * Class: sun_net_PortConfig -+ * Method: getUpper -+ * Signature: ()I ++/** ++ * @test ++ * @bug 8026404 ++ * @summary checks that calling getLogger() from a Thread whose ThreadGroup is ++ * a child of the main root group doesn't throw an exception. ++ * @build TestMainAppContext ++ * @run main/othervm TestMainAppContext ++ * @author danielfuchs + */ -+JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getUpper0 -+ (JNIEnv *env, jclass clazz) -+{ -+ struct portrange range; -+ if (getPortRange(&range) < 0) { -+ return -1; -+ } -+ return range.higher; -+} -+ -+#ifdef __cplusplus -+} -+#endif ---- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2013-09-06 11:29:12.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2014-04-20 12:39:22.000000000 -0700 -@@ -201,7 +201,7 @@ - return IOS_THROWN; - } - return result; --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__FreeBSD__) - off_t numBytes; - int result; - -@@ -209,6 +209,8 @@ - - #ifdef __APPLE__ - result = sendfile(srcFD, dstFD, position, &numBytes, NULL, 0); -+#elif defined(__FreeBSD__) -+ result = sendfile(srcFD, dstFD, position, count, NULL, &numBytes, 0); - #endif - - if (numBytes > 0) ---- jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2013-09-06 11:29:12.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2014-04-20 12:39:22.000000000 -0700 -@@ -227,6 +227,21 @@ - fl.l_start = (off64_t)pos; - fl.l_type = F_UNLCK; - lockResult = fcntl(fd, cmd, &fl); -+#if defined(__FreeBSD__) || defined(__OpenBSD__) -+ /* XXXFREEBSD: While doing of preClose0() we're closing actual fd which -+ was locked, so here we'll get an error which need to be ignored to -+ satisfy TCK FileLock test */ -+ if (lockResult < 0 && errno == EBADF) -+ lockResult = errno = 0; -+#endif -+#if defined(__NetBSD__) -+ /* XXXNETBSD: The dup2 in preClose0 is being done onto 1 end of a -+ socketpair which isn't a valid target for F_UNLCK. No good way to see -+ this vs. a bad lock setup so just return errno = 0 there -+ to pass JCK (lock will get removed once all fd's close anyways) */ -+ if (lockResult < 0 && errno == EINVAL) -+ lockResult = errno = 0; -+#endif - if (lockResult < 0) { - JNU_ThrowIOExceptionWithLastError(env, "Release failed"); - } ---- jdk/src/solaris/native/sun/nio/ch/Sctp.h 2013-09-06 11:29:12.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/Sctp.h 2014-04-20 12:39:22.000000000 -0700 -@@ -320,8 +320,20 @@ - typedef int sctp_peeloff_func(int sock, sctp_assoc_t id); - - -+#elif defined(__FreeBSD__) && __FreeBSD__ >= 7 -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "jni.h" -+ - #endif /* __linux__ */ - -+#if !defined(__FreeBSD__) || __FreeBSD__ < 7 -+ - sctp_getladdrs_func* nio_sctp_getladdrs; - sctp_freeladdrs_func* nio_sctp_freeladdrs; - sctp_getpaddrs_func* nio_sctp_getpaddrs; -@@ -329,6 +341,17 @@ - sctp_bindx_func* nio_sctp_bindx; - sctp_peeloff_func* nio_sctp_peeloff; - -+#else -+ -+#define nio_sctp_getladdrs sctp_getladdrs -+#define nio_sctp_freeladdrs sctp_freeladdrs -+#define nio_sctp_getpaddrs sctp_getpaddrs -+#define nio_sctp_freepaddrs sctp_freepaddrs -+#define nio_sctp_bindx sctp_bindx -+#define nio_sctp_peeloff sctp_peeloff ++public class TestMainAppContext { + -+#endif ++ static volatile Throwable thrown = null; + - jboolean loadSocketExtensionFuncs(JNIEnv* env); - - #endif /* !SUN_NIO_CH_SCTP_H */ ---- jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2013-09-06 11:29:12.000000000 -0700 -+++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2014-04-20 12:39:22.000000000 -0700 -@@ -58,6 +58,7 @@ - */ - jboolean loadSocketExtensionFuncs - (JNIEnv* env) { -+#if !defined(__FreeBSD__) || __FreeBSD__ < 7 /* On FreeBSD 7.x these functions are in libc */ - if (dlopen(nativeSctpLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) { - JNU_ThrowByName(env, "java/lang/UnsupportedOperationException", - dlerror()); -@@ -105,6 +106,7 @@ - dlerror()); - return JNI_FALSE; - } -+#endif /* __FreeBSD__ */ - - funcsLoaded = JNI_TRUE; - return JNI_TRUE; ---- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2013-09-06 11:29:12.000000000 -0700 -+++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -33,6 +33,11 @@ - - #include "j2secmod.h" - -+#ifndef RTLD_NOLOAD -+/* A gross hack that will work if the NSS library is only opened once */ -+static void *nssLibHandle = NULL; -+#endif ++ public static void main(String... args) throws Exception { ++ ThreadGroup rootTG = Thread.currentThread().getThreadGroup(); ++ while (rootTG.getParent() != null) { ++ rootTG = rootTG.getParent(); ++ } + - void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) { - void *hModule = (void*)jHandle; - void *fAddress = dlsym(hModule, functionName); -@@ -50,7 +55,11 @@ - { - const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL); - // look up existing handle only, do not load -+#ifdef RTLD_NOLOAD - void *hModule = dlopen(libName, RTLD_NOLOAD); -+#else -+ void *hModule = nssLibHandle; -+#endif - dprintf2("-handle for %s: %u\n", libName, hModule); - (*env)->ReleaseStringUTFChars(env, jLibName, libName); - return (jlong)hModule; -@@ -64,6 +73,9 @@ - - dprintf1("-lib %s\n", libName); - hModule = dlopen(libName, RTLD_LAZY); -+#ifndef RTLD_NOLOAD -+ nssLibHandle = hModule; -+#endif - (*env)->ReleaseStringUTFChars(env, jLibName, libName); - dprintf2("-handle: %u (0X%X)\n", hModule, hModule); - ---- jdk/src/solaris/native/sun/xawt/XWindow.c 2013-09-06 11:29:12.000000000 -0700 -+++ jdk/src/solaris/native/sun/xawt/XWindow.c 2014-04-20 12:39:22.000000000 -0700 -@@ -867,7 +867,7 @@ - { - KeySym originalKeysym = *keysym; - --#if !defined(__linux__) && !defined(MACOSX) -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - /* The following code on Linux will cause the keypad keys - * 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/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java 2013-09-06 11:29:13.000000000 -0700 -+++ jdk/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -41,6 +41,7 @@ - - import static sun.awt.shell.Win32ShellFolder2.*; - import sun.awt.OSInfo; -+import sun.misc.ThreadGroupUtils; - - // NOTE: This class supersedes Win32ShellFolderManager, which was removed - // from distribution after version 1.4.2. -@@ -505,23 +506,19 @@ - } - } - }; -- comThread = -- AccessController.doPrivileged( -- new PrivilegedAction() { -- public Thread run() { -+ comThread = AccessController.doPrivileged(new PrivilegedAction() { -+ @Override -+ public Thread run() { - /* The thread must be a member of a thread group - * which will not get GCed before VM exit. - * Make its parent the top-level thread group. - */ -- ThreadGroup tg = Thread.currentThread().getThreadGroup(); -- for (ThreadGroup tgn = tg; -- tgn != null; -- tg = tgn, tgn = tg.getParent()); -- Thread thread = new Thread(tg, comRun, "Swing-Shell"); -- thread.setDaemon(true); -- return thread; -- } -- } -+ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); -+ Thread thread = new Thread(rootTG, comRun, "Swing-Shell"); -+ thread.setDaemon(true); -+ return thread; -+ } -+ } - ); - return comThread; - } ---- jdk/src/windows/classes/sun/awt/windows/WClipboard.java 2013-09-06 11:29:13.000000000 -0700 -+++ jdk/src/windows/classes/sun/awt/windows/WClipboard.java 2014-04-20 12:39:22.000000000 -0700 -@@ -63,7 +63,6 @@ - } - - protected void setContentsNative(Transferable contents) { -- - // Don't use delayed Clipboard rendering for the Transferable's data. - // If we did that, we would call Transferable.getTransferData on - // the Toolkit thread, which is a security hole. -@@ -72,7 +71,7 @@ - // translated. Then, for each format, translate the data and post - // it to the Clipboard. - Map formatMap = WDataTransferer.getInstance(). -- getFormatsForTransferable(contents, flavorMap); -+ getFormatsForTransferable(contents, getDefaultFlavorTable()); - - openClipboard(this); - ---- jdk/src/windows/classes/sun/awt/windows/WToolkit.java 2013-09-06 11:29:13.000000000 -0700 -+++ jdk/src/windows/classes/sun/awt/windows/WToolkit.java 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -38,6 +38,7 @@ - import java.security.PrivilegedAction; - import sun.awt.AWTAutoShutdown; - import sun.awt.SunToolkit; -+import sun.misc.ThreadGroupUtils; - import sun.awt.Win32GraphicsDevice; - import sun.awt.Win32GraphicsEnvironment; - import sun.java2d.d3d.D3DRenderQueue; -@@ -215,7 +216,7 @@ - - private static native void postDispose(); - -- private static native boolean startToolkitThread(Runnable thread); -+ private static native boolean startToolkitThread(Runnable thread, ThreadGroup rootThreadGroup); - - public WToolkit() { - // Startup toolkit threads -@@ -232,8 +233,15 @@ - */ - AWTAutoShutdown.notifyToolkitThreadBusy(); - -- if (!startToolkitThread(this)) { -- Thread toolkitThread = new Thread(this, "AWT-Windows"); -+ // Find a root TG and attach Appkit thread to it -+ ThreadGroup rootTG = AccessController.doPrivileged(new PrivilegedAction() { -+ @Override -+ public ThreadGroup run() { -+ return ThreadGroupUtils.getRootThreadGroup(); -+ } -+ }); -+ if (!startToolkitThread(this, rootTG)) { -+ Thread toolkitThread = new Thread(rootTG, this, "AWT-Windows"); - toolkitThread.setDaemon(true); - toolkitThread.start(); - } -@@ -263,14 +271,7 @@ - private final void registerShutdownHook() { - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { -- ThreadGroup currentTG = -- Thread.currentThread().getThreadGroup(); -- ThreadGroup parentTG = currentTG.getParent(); -- while (parentTG != null) { -- currentTG = parentTG; -- parentTG = currentTG.getParent(); -- } -- Thread shutdown = new Thread(currentTG, new Runnable() { -+ Thread shutdown = new Thread(ThreadGroupUtils.getRootThreadGroup(), new Runnable() { - public void run() { - shutdown(); - } -@@ -283,7 +284,14 @@ - } - - public void run() { -- Thread.currentThread().setPriority(Thread.NORM_PRIORITY+1); -+ AccessController.doPrivileged(new PrivilegedAction() { ++ ThreadGroup tg = new ThreadGroup(rootTG, "FakeApplet"); ++ final Thread t1 = new Thread(tg, "createNewAppContext") { + @Override -+ public Void run() { -+ Thread.currentThread().setContextClassLoader(null); -+ return null; ++ public void run() { ++ try { ++ AppContext context = SunToolkit.createNewAppContext(); ++ } catch(Throwable t) { ++ thrown = t; ++ } + } -+ }); -+ Thread.currentThread().setPriority(Thread.NORM_PRIORITY + 1); - boolean startPump = init(); - - if (startPump) { ---- jdk/src/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 2013-09-06 11:29:13.000000000 -0700 -+++ jdk/src/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. - * 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,8 +36,9 @@ - import java.security.PrivilegedAction; - import java.util.ArrayList; - import java.util.HashMap; --import sun.awt.SunToolkit; ++ }; ++ t1.start(); ++ t1.join(); ++ if (thrown != null) { ++ throw new RuntimeException("Unexpected exception: " + thrown, thrown); ++ } ++ Thread t2 = new Thread(tg, "BugDetector") { + - import sun.awt.AWTAccessor; -+import sun.misc.ThreadGroupUtils; - import sun.awt.Win32GraphicsConfig; - import sun.awt.windows.WComponentPeer; - import sun.java2d.InvalidPipeException; -@@ -92,30 +93,26 @@ - public D3DScreenUpdateManager() { - done = false; - AccessController.doPrivileged( -- new PrivilegedAction() { -- public Object run() { -- ThreadGroup currentTG = -- Thread.currentThread().getThreadGroup(); -- ThreadGroup parentTG = currentTG.getParent(); -- while (parentTG != null) { -- currentTG = parentTG; -- parentTG = currentTG.getParent(); -- } -- Thread shutdown = new Thread(currentTG, new Runnable() { -+ new PrivilegedAction() { -+ @Override -+ public Void run() { -+ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); -+ Thread shutdown = new Thread(rootTG, new Runnable() { -+ @Override - public void run() { - done = true; - wakeUpUpdateThread(); - } - }); -- shutdown.setContextClassLoader(null); -- try { -- Runtime.getRuntime().addShutdownHook(shutdown); -- } catch (Exception e) { -- done = true; -+ shutdown.setContextClassLoader(null); -+ try { -+ Runtime.getRuntime().addShutdownHook(shutdown); -+ } catch (Exception e) { -+ done = true; -+ } -+ return null; - } -- return null; - } -- } - ); - } - -@@ -354,21 +351,20 @@ - */ - private synchronized void startUpdateThread() { - if (screenUpdater == null) { -- screenUpdater = (Thread)java.security.AccessController.doPrivileged( -- new java.security.PrivilegedAction() { -- public Object run() { -- ThreadGroup tg = -- Thread.currentThread().getThreadGroup(); -- for (ThreadGroup tgn = tg; -- tgn != null; tg = tgn, tgn = tg.getParent()); -- Thread t = new Thread(tg, D3DScreenUpdateManager.this, -- "D3D Screen Updater"); -- // REMIND: should it be higher? -- t.setPriority(Thread.NORM_PRIORITY + 2); -- t.setDaemon(true); -- return t; -- } -- }); -+ screenUpdater = AccessController.doPrivileged( -+ new PrivilegedAction() { -+ @Override -+ public Thread run() { -+ ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup(); -+ Thread t = new Thread(rootTG, -+ D3DScreenUpdateManager.this, -+ "D3D Screen Updater"); -+ // REMIND: should it be higher? -+ t.setPriority(Thread.NORM_PRIORITY + 2); -+ t.setDaemon(true); -+ return t; -+ } -+ }); - screenUpdater.start(); ++ @Override ++ public void run() { ++ try { ++ Logger.getLogger("foo").info("Done"); ++ } catch (Throwable x) { ++ thrown = x; ++ } ++ } ++ ++ }; ++ ++ System.setSecurityManager(new SecurityManager()); ++ t2.start(); ++ t2.join(); ++ if (thrown != null) { ++ throw new RuntimeException("Test failed: " + thrown, thrown); ++ } ++ ++ } ++ ++} +--- ./jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java 2013-09-06 11:29:51.000000000 -0700 ++++ ./jdk/test/java/util/logging/bundlesearch/ResourceBundleSearchTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -59,9 +59,32 @@ + private static int numFail = 0; + private static List msgs = new ArrayList<>(); + ++ // This test has been falling in timeout - so we're adding some ++ // time stamp here and there to help diagnose whether it's a ++ // simple system slowness or whether there's a deeper issue, ++ // like a deadlock. The timeout issue should be fixed now, ++ // but we leave the time stamps in case it reappears. ++ // ++ static final long stamp = System.currentTimeMillis(); ++ private static String getTimeStamp() { ++ long time = System.currentTimeMillis(); ++ long delta = time - stamp; ++ long min = delta/60000; ++ long sec = (delta - min * 60000) / 10000; ++ long msec = delta - min * 60000 - sec * 1000; ++ return (min == 0 ? "" : (min + " min. ")) + ++ (sec == 0 ? "" : (sec + " sec. ")) + ++ (msec == 0 ? "" : (msec + "ms.")); ++ } ++ + public static void main(String[] args) throws Throwable { ++ System.out.println("ResourceBundleSearchTest starting: "+getTimeStamp()); + ResourceBundleSearchTest test = new ResourceBundleSearchTest(); +- test.runTests(); ++ try { ++ test.runTests(); ++ } finally { ++ System.out.println("ResourceBundleSearchTest terminated: "+getTimeStamp()); ++ } + } + + private void runTests() throws Throwable { +@@ -82,7 +105,8 @@ + // Test 1 - can we find a Logger bundle from doing a stack search? + // We shouldn't be able to + // unless -Djdk.logging.allowStackWalkSearch=true is set +- ++ int testnb = 1; ++ System.out.println("ResourceBundleSearchTest starting test #"+(testnb++)+": "+getTimeStamp()); + boolean allowStackWalkSearch = Boolean.getBoolean("jdk.logging.allowStackWalkSearch"); + if (allowStackWalkSearch) { + assertTrue(testGetBundleFromStackSearch(), "1-testGetBundleFromStackSearch"); +@@ -93,6 +117,7 @@ + + // Test 2 - can we find a Logger bundle off of the Thread context class + // loader? We should be able to. ++ System.out.println("ResourceBundleSearchTest starting test #"+(testnb++)+": "+getTimeStamp()); + assertTrue(testGetBundleFromTCCL(TCCL_TEST_BUNDLE, rbClassLoader), + "2-testGetBundleFromTCCL"); + +@@ -100,6 +125,7 @@ + // able to. We'll first check to make sure the setup is correct and + // it actually is on the classpath before checking whether logging + // can see it there. ++ System.out.println("ResourceBundleSearchTest starting test #"+(testnb++)+": "+getTimeStamp()); + if (isOnClassPath(PROP_RB_NAME, myClassLoader)) { + debug("We should be able to see " + PROP_RB_NAME + " on the classpath"); + assertTrue(testGetBundleFromSystemClassLoader(PROP_RB_NAME), +@@ -111,17 +137,20 @@ + + // Test 4 - we should be able to find a bundle from the caller's + // classloader, but only one level up. ++ System.out.println("ResourceBundleSearchTest starting test #"+(testnb++)+": "+getTimeStamp()); + assertTrue(testGetBundleFromCallersClassLoader(), + "4-testGetBundleFromCallersClassLoader"); + + // Test 5 - this ensures that getAnonymousLogger(String rbName) + // can find the bundle from the caller's classloader ++ System.out.println("ResourceBundleSearchTest starting test #"+(testnb++)+": "+getTimeStamp()); + assertTrue(testGetAnonymousLogger(), "5-testGetAnonymousLogger"); + + // Test 6 - first call getLogger("myLogger"). + // Then call getLogger("myLogger","bundleName") from a different ClassLoader + // Make sure we find the bundle + if (!allowStackWalkSearch) { ++ System.out.println("ResourceBundleSearchTest starting test #"+(testnb++)+": "+getTimeStamp()); + assertTrue(testGetBundleFromSecondCallersClassLoader(), + "6-testGetBundleFromSecondCallersClassLoader"); + } +@@ -144,6 +173,7 @@ + public void assertTrue(boolean testResult, String testName) { + if (testResult) { + numPass++; ++ System.out.println("PASSED: " + testName); } else { - wakeUpUpdateThread(); ---- jdk/src/windows/classes/sun/net/PortConfig.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/windows/classes/sun/net/PortConfig.java 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,65 @@ + numFail++; + System.out.println("FAILED: " + testName +@@ -154,6 +184,7 @@ + public void assertFalse(boolean testResult, String testName) { + if (!testResult) { + numPass++; ++ System.out.println("PASSED: " + testName); + } else { + numFail++; + System.out.println("FAILED: " + testName +@@ -182,12 +213,10 @@ + debug("Looking for " + bundleName + " using TCCL"); + LoggingThread lr = new LoggingThread(bundleName, setOnTCCL); + lr.start(); +- synchronized (lr) { +- try { +- lr.wait(); +- } catch (InterruptedException ex) { +- throw ex; +- } ++ try { ++ lr.join(); ++ } catch (InterruptedException ex) { ++ throw ex; + } + msgs.add(lr.msg); + return lr.foundBundle; +--- ./jdk/test/java/util/logging/deadlockconf.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/java/util/logging/deadlockconf.properties 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,22 @@ ++# This file is used by TestLogConfigurationDeadLockWithConf ++handlers= java.util.logging.ConsoleHandler ++.level= INFO ++java.util.logging.ConsoleHandler.level = INFO ++java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter ++ ++ ++foo.bar0.level = INFO ++foo.bar1.level = INFO ++foo.bar2.level = INFO ++foo.bar3.level = INFO ++foo.bar4.level = INFO ++ ++# We leave foo.bar5 out so that we have at least ++# one logger whose parent won't be in the configuration ++# file ++#foo.bar5.level = INFO ++ ++foo.bar6.level = INFO ++foo.bar7.level = INFO ++foo.bar8.level = INFO ++foo.bar9.level = INFO +--- ./jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2013-09-06 11:29:52.000000000 -0700 ++++ ./jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -51,7 +51,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + NULL=/dev/null + PS=":" + FS="/" +--- ./jdk/test/javax/imageio/plugins/jpeg/JpegWriterLeakTest.java 2013-09-06 11:29:52.000000000 -0700 ++++ ./jdk/test/javax/imageio/plugins/jpeg/JpegWriterLeakTest.java 2013-12-01 11:14:33.000000000 -0800 +@@ -23,7 +23,7 @@ + + /** + * @test +- * @bug 8020983 ++ * @bug 8020983 8024697 + * @summary Test verifies that jpeg writer instances are collected + * even if destroy() or reset() methods is not invoked. + * +--- ./jdk/test/javax/imageio/plugins/jpeg/TruncatedImageWarningTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/imageio/plugins/jpeg/TruncatedImageWarningTest.java 2014-04-19 01:27:14.000000000 -0700 +@@ -0,0 +1,58 @@ +/* -+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -60386,391 +107237,667 @@ + * questions. + */ + -+package sun.net; ++import java.io.File; ++import java.io.IOException; ++import javax.imageio.ImageIO; ++import javax.imageio.ImageReader; ++import javax.imageio.event.IIOReadWarningListener; ++import javax.imageio.stream.ImageInputStream; + -+import java.security.AccessController; ++public class TruncatedImageWarningTest implements IIOReadWarningListener { + -+/** -+ * Determines the ephemeral port range in use on this system. -+ * If this cannot be determined, then the default settings -+ * of the OS are returned. -+ */ ++ private static String fileName = "truncated.jpg"; ++ boolean receivedWarning = false; + -+public final class PortConfig { ++ public static void main(String[] args) throws IOException { + -+ private final static int upper, lower; ++ String sep = System.getProperty("file.separator"); ++ String dir = System.getProperty("test.src", "."); ++ String filePath = dir+sep+fileName; ++ System.out.println("Test file: " + filePath); ++ File f = new File(filePath); ++ ImageInputStream in = ImageIO.createImageInputStream(f); ++ ImageReader reader = ImageIO.getImageReaders(in).next(); ++ TruncatedImageWarningTest twt = new TruncatedImageWarningTest(); ++ reader.addIIOReadWarningListener(twt); ++ reader.setInput(in); ++ reader.read(0); ++ if (!twt.receivedWarning) { ++ throw new RuntimeException("No expected warning"); ++ } ++ } + -+ private PortConfig() {} ++ public void warningOccurred(ImageReader source, String warning) { ++ System.out.println("Expected warning: " + warning); ++ receivedWarning = true; ++ } ++} +Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg differ +--- ./jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2013-09-06 11:29:52.000000000 -0700 ++++ ./jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -84,7 +84,7 @@ + TMP="/tmp" + ;; + +- Linux ) ++ Linux | *BSD | Darwin ) + VAR="A different value for Linux" + DEFAULT_JDK=/ + FILESEP="/" +@@ -92,14 +92,6 @@ + TMP="/tmp" + ;; + +- Darwin ) +- VAR="A different value for MacOSX" +- DEFAULT_JDK=/usr +- FILESEP="/" +- PATHSEP=":" +- TMP="/tmp" +- ;; +- + Windows* ) + VAR="A different value for Win32" + DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0" +--- ./jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/management/MBeanInfo/MBeanInfoEqualsNPETest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,216 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + -+ static { -+ AccessController.doPrivileged( -+ new java.security.PrivilegedAction() { -+ public Void run() { -+ System.loadLibrary("net"); -+ return null; -+ } -+ }); ++import javax.management.MBeanAttributeInfo; ++import javax.management.MBeanConstructorInfo; ++import javax.management.MBeanFeatureInfo; ++import javax.management.MBeanInfo; ++import javax.management.MBeanNotificationInfo; ++import javax.management.MBeanOperationInfo; ++import javax.management.MBeanParameterInfo; ++import javax.management.modelmbean.DescriptorSupport; ++import javax.management.openmbean.SimpleType; + -+ lower = getLower0(); -+ upper = getUpper0(); ++/* ++ * @test ++ * @bug 8023954 ++ * @summary Test that MBean*Info.equals do not throw NPE ++ * @author Shanliang JIANG ++ * @run clean MBeanInfoEqualsNPETest ++ * @run build MBeanInfoEqualsNPETest ++ * @run main MBeanInfoEqualsNPETest ++ */ ++public class MBeanInfoEqualsNPETest { ++ private static int failed = 0; ++ ++ public static void main(String[] args) throws Exception { ++ System.out.println("---MBeanInfoEqualsNPETest-main ..."); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanAttributeInfo..."); ++ MBeanAttributeInfo mbeanAttributeInfo0 = new MBeanAttributeInfo( ++ "name", SimpleType.INTEGER.getClassName(), "description", true, true, false); ++ MBeanAttributeInfo mbeanAttributeInfo = new MBeanAttributeInfo( ++ null, SimpleType.INTEGER.getClassName(), "description", true, true, false); ++ test(mbeanAttributeInfo0, mbeanAttributeInfo, "class name"); ++ ++ mbeanAttributeInfo = new MBeanAttributeInfo( ++ "name", null, "description", true, true, false); ++ test(mbeanAttributeInfo0, mbeanAttributeInfo, "type"); ++ ++ mbeanAttributeInfo = new MBeanAttributeInfo( ++ "name", SimpleType.INTEGER.getClassName(), null, true, true, false); ++ test(mbeanAttributeInfo0, mbeanAttributeInfo, "description"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanConstructorInfo..."); ++ MBeanConstructorInfo mbeanConstructorInfo0 = new MBeanConstructorInfo( ++ "", "", new MBeanParameterInfo[]{}, new DescriptorSupport()); ++ MBeanConstructorInfo mbeanConstructorInfo = new MBeanConstructorInfo( ++ null, "", new MBeanParameterInfo[]{}, new DescriptorSupport()); ++ test(mbeanConstructorInfo0, mbeanConstructorInfo, "name"); ++ ++ mbeanConstructorInfo = new MBeanConstructorInfo( ++ "", null, new MBeanParameterInfo[]{}, new DescriptorSupport()); ++ test(mbeanConstructorInfo0, mbeanConstructorInfo, "description"); ++ ++ mbeanConstructorInfo = new MBeanConstructorInfo( ++ "", "", null, new DescriptorSupport()); ++ test(mbeanConstructorInfo0, mbeanConstructorInfo, "MBeanParameterInfo"); ++ ++ mbeanConstructorInfo = new MBeanConstructorInfo( ++ "", "", new MBeanParameterInfo[]{}, null); ++ test(mbeanConstructorInfo0, mbeanConstructorInfo, "descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanOperationInfo..."); ++ MBeanOperationInfo mbeanOperationInfo0 = new MBeanOperationInfo( ++ "name", "description", new MBeanParameterInfo[]{}, "type", ++ MBeanOperationInfo.UNKNOWN, new DescriptorSupport()); ++ ++ MBeanOperationInfo mbeanOperationInfo = new MBeanOperationInfo( ++ null, "description", new MBeanParameterInfo[]{}, "type", ++ MBeanOperationInfo.UNKNOWN, new DescriptorSupport()); ++ test(mbeanOperationInfo0, mbeanOperationInfo, "name"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", null, new MBeanParameterInfo[]{}, "type", ++ MBeanOperationInfo.UNKNOWN, new DescriptorSupport()); ++ test(mbeanOperationInfo0, mbeanOperationInfo, "description"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", null, "type", 1, new DescriptorSupport()); ++ test(mbeanOperationInfo0, mbeanOperationInfo, "MBeanParameterInfo"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", new MBeanParameterInfo[]{}, null, ++ MBeanOperationInfo.UNKNOWN, new DescriptorSupport()); ++ test(mbeanOperationInfo0, mbeanOperationInfo, "type"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", new MBeanParameterInfo[]{}, null, ++ MBeanOperationInfo.UNKNOWN, null); ++ test(mbeanOperationInfo0, mbeanOperationInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanParameterInfo..."); ++ MBeanParameterInfo mbeanParameterInfo0 = new MBeanParameterInfo( ++ "name", "type", "description", new DescriptorSupport()); ++ MBeanParameterInfo mbeanParameterInfo = new MBeanParameterInfo( ++ null, "type", "description", new DescriptorSupport()); ++ test(mbeanParameterInfo0, mbeanParameterInfo, "name"); ++ ++ mbeanParameterInfo = new MBeanParameterInfo( ++ "name", null, "description", new DescriptorSupport()); ++ test(mbeanParameterInfo0, mbeanParameterInfo, "type"); ++ ++ mbeanParameterInfo = new MBeanParameterInfo( ++ "name", "type", null, new DescriptorSupport()); ++ test(mbeanParameterInfo0, mbeanParameterInfo, "description"); ++ ++ mbeanParameterInfo = new MBeanParameterInfo( ++ "name", "type", "description", null); ++ test(mbeanParameterInfo0, mbeanParameterInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanFeatureInfo ..."); ++ MBeanFeatureInfo mbeanFeatureInfo0 = new MBeanFeatureInfo( ++ "name", "description", new DescriptorSupport()); ++ MBeanFeatureInfo mbeanFeatureInfo = new MBeanFeatureInfo( ++ null, "description", new DescriptorSupport()); ++ test(mbeanFeatureInfo0, mbeanFeatureInfo, "name"); ++ ++ mbeanFeatureInfo = new MBeanFeatureInfo( ++ "name", null, new DescriptorSupport()); ++ test(mbeanParameterInfo0, mbeanParameterInfo, "description"); ++ ++ mbeanFeatureInfo = new MBeanFeatureInfo( ++ "name", "description", null); ++ test(mbeanParameterInfo0, mbeanParameterInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanInfo..."); ++ String className = "toto"; ++ String description = "titi"; ++ MBeanAttributeInfo[] attrInfos = new MBeanAttributeInfo[]{}; ++ MBeanConstructorInfo[] constrInfos = new MBeanConstructorInfo[]{}; ++ MBeanOperationInfo[] operaInfos = new MBeanOperationInfo[]{}; ++ MBeanNotificationInfo[] notifInfos = new MBeanNotificationInfo[]{}; ++ ++ MBeanInfo minfo0 = new MBeanInfo("toto", description, attrInfos, constrInfos, operaInfos, notifInfos); ++ MBeanInfo minfo = new MBeanInfo(null, description, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(minfo0, minfo, "class name"); ++ ++ minfo = new MBeanInfo(className, null, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(minfo0, minfo, "description"); ++ ++ minfo = new MBeanInfo(className, description, null, constrInfos, operaInfos, notifInfos); ++ test(minfo0, minfo, "attrInfos"); ++ ++ minfo = new MBeanInfo(className, description, attrInfos, null, operaInfos, notifInfos); ++ test(minfo0, minfo, "constrInfos"); ++ ++ minfo = new MBeanInfo(className, description, attrInfos, constrInfos, null, notifInfos); ++ test(minfo0, minfo, "operaInfos"); ++ ++ minfo = new MBeanInfo(className, description, attrInfos, constrInfos, operaInfos, null); ++ test(minfo0, minfo, "notifInfos"); ++ ++ if (failed > 0) { ++ throw new RuntimeException("Test failed: "+failed); ++ } else { ++ System.out.println("---Test: PASSED"); ++ } + } + -+ static native int getLower0(); -+ static native int getUpper0(); ++ private static void test(Object obj1, Object obj2, String param) { ++ try { ++ obj1.equals(obj2); ++ System.out.println("OK-1: "+obj1.getClass().getSimpleName()+".equals worked with a null paramer: "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-1!!! "+obj1.getClass().getSimpleName()+".equals got NPE with a null paramer: "+param); ++ npe.printStackTrace(); ++ failed++; ++ } + -+ public static int getLower() { -+ return lower; -+ } ++ try { ++ obj2.equals(obj1); ++ System.out.println("OK-2: "+obj2.getClass().getSimpleName()+".equals worked with a null paramer: "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-2!!! "+obj2.getClass().getSimpleName()+".equals got NPE with a null paramer: "+param); ++ npe.printStackTrace(); ++ failed++; ++ } + -+ public static int getUpper() { -+ return upper; -+ } -+} ---- jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java 2013-09-06 11:29:14.000000000 -0700 -+++ jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java 2014-04-20 12:39:22.000000000 -0700 -@@ -31,6 +31,9 @@ - import java.net.*; - import java.util.concurrent.*; - import java.io.IOException; -+import java.security.AccessController; -+import java.security.PrivilegedActionException; -+import java.security.PrivilegedExceptionAction; - import sun.misc.Unsafe; - - /** -@@ -300,6 +303,19 @@ - } - } - -+ private void doPrivilegedBind(final SocketAddress sa) throws IOException { + try { -+ AccessController.doPrivileged(new PrivilegedExceptionAction() { -+ public Void run() throws IOException { -+ bind(sa); -+ return null; -+ } -+ }); -+ } catch (PrivilegedActionException e) { -+ throw (IOException) e.getException(); ++ obj1.equals(null); ++ obj2.equals(null); ++ ++ System.out.println("OK-3: "+obj1.getClass().getSimpleName()+".equals worked with a null field."); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-3!!! "+obj1.getClass().getSimpleName()+".equals got NPE with a null field."); ++ npe.printStackTrace(); ++ failed++; + } + } ++} +--- ./jdk/test/javax/management/MBeanInfo/MBeanInfoHashCodeNPETest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/management/MBeanInfo/MBeanInfoHashCodeNPETest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,176 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ + - @Override -
Future implConnect(SocketAddress remote, - A attachment, -@@ -330,7 +346,12 @@ - throw new ConnectionPendingException(); - if (localAddress == null) { - try { -- bind(new InetSocketAddress(0)); -+ SocketAddress any = new InetSocketAddress(0); -+ if (sm == null) { -+ bind(any); -+ } else { -+ doPrivilegedBind(any); -+ } - } catch (IOException x) { - bindException = x; - } ---- jdk/src/windows/native/java/lang/java_props_md.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/java/lang/java_props_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it -@@ -448,6 +448,7 @@ - case 0: sprops.os_name = "Windows Vista"; break; - case 1: sprops.os_name = "Windows 7"; break; - case 2: sprops.os_name = "Windows 8"; break; -+ case 3: sprops.os_name = "Windows 8.1"; break; - default: sprops.os_name = "Windows NT (unknown)"; - } - } else { -@@ -455,6 +456,7 @@ - case 0: sprops.os_name = "Windows Server 2008"; break; - case 1: sprops.os_name = "Windows Server 2008 R2"; break; - case 2: sprops.os_name = "Windows Server 2012"; break; -+ case 3: sprops.os_name = "Windows Server 2012 R2"; break; - default: sprops.os_name = "Windows NT (unknown)"; - } - } ---- jdk/src/windows/native/java/net/Inet6AddressImpl.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/java/net/Inet6AddressImpl.c 2014-04-20 12:39:22.000000000 -0700 -@@ -77,7 +77,6 @@ - static jclass ni_ia6cls; - static jmethodID ni_ia4ctrID; - static jmethodID ni_ia6ctrID; --static jfieldID ni_ia6ipaddressID; - static int initialized = 0; - - JNIEXPORT jobjectArray JNICALL -@@ -101,7 +100,6 @@ - ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); - ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); -- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); - initialized = 1; - } - if (IS_NULL(host)) { -@@ -242,26 +240,22 @@ - (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); - inetIndex ++; - } else if (iterator->ai_family == AF_INET6) { -- jint scope = 0; -- jbyteArray ipaddress; -+ jint scope = 0, ret1; - jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } -- ipaddress = (*env)->NewByteArray(env, 16); -- if (IS_NULL(ipaddress)) { -+ ret1 = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); ++import javax.management.MBeanAttributeInfo; ++import javax.management.MBeanConstructorInfo; ++import javax.management.MBeanInfo; ++import javax.management.MBeanNotificationInfo; ++import javax.management.MBeanOperationInfo; ++import javax.management.MBeanParameterInfo; ++import javax.management.modelmbean.DescriptorSupport; ++import javax.management.openmbean.SimpleType; + -+ if (ret1 == JNI_FALSE) { - ret = NULL; - goto cleanupAndReturn; - } -- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, -- (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); - scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; - if (scope != 0) { /* zero is default value, no need to set */ -- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); -- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); -+ setInet6Address_scopeid(env, iaObj, scope); - } -- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - setInetAddress_hostName(env, iaObj, host); - (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); - inet6Index ++; ---- jdk/src/windows/native/java/net/NetworkInterface.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/java/net/NetworkInterface.c 2014-04-20 12:39:22.000000000 -0700 -@@ -72,8 +72,6 @@ - - jclass ni_ia6cls; /* Inet6Address */ - jmethodID ni_ia6ctrID; /* Inet6Address() */ --jfieldID ni_ia6ipaddressID; --jfieldID ni_ia6ipaddressID; - - jclass ni_ibcls; /* InterfaceAddress */ - jmethodID ni_ibctrID; /* InterfaceAddress() */ -@@ -482,7 +480,6 @@ - ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address"); - ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); - ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); -- ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); - - ni_ibcls = (*env)->FindClass(env, "java/net/InterfaceAddress"); - ni_ibcls = (*env)->NewGlobalRef(env, ni_ibcls); -@@ -583,19 +580,16 @@ - int scope; - iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); - if (iaObj) { -- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); -- if (ipaddress == NULL) { -+ int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); -+ if (ret == JNI_FALSE) { - return NULL; - } -- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, -- (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); ++/* ++ * @test ++ * @bug 8023669 ++ * @summary Test that hashCode()throws NullPointerException ++ * @author Shanliang JIANG ++ * @run clean MBeanInfoHashCodeNPETest ++ * @run build MBeanInfoHashCodeNPETest ++ * @run main MBeanInfoHashCodeNPETest ++ */ ++public class MBeanInfoHashCodeNPETest { ++ private static int failed = 0; + - scope = addrs->addr.him6.sin6_scope_id; - if (scope != 0) { /* zero is default value, no need to set */ -- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); -- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); -- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); -+ setInet6Address_scopeid(env, iaObj, scope); -+ setInet6Address_scopeifname(env, iaObj, netifObj); - } -- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); - if (ibObj == NULL) { - free_netaddr(netaddrP); ---- jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2014-04-20 12:39:22.000000000 -0700 -@@ -499,19 +499,15 @@ - int scope; - iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); - if (iaObj) { -- jbyteArray ipaddress = (*env)->NewByteArray(env, 16); -- if (ipaddress == NULL) { -+ int ret = setInet6Address_ipaddress(env, iaObj, (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); -+ if (ret == JNI_FALSE) { - return NULL; - } -- (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, -- (jbyte *)&(addrs->addr.him6.sin6_addr.s6_addr)); - scope = addrs->addr.him6.sin6_scope_id; - if (scope != 0) { /* zero is default value, no need to set */ -- (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); -- (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); -- (*env)->SetObjectField(env, iaObj, ia6_scopeifnameID, netifObj); -+ setInet6Address_scopeid(env, iaObj, scope); -+ setInet6Address_scopeifname(env, iaObj, netifObj); - } -- (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); - if (ibObj == NULL) { - free_netaddr(netaddrP); ---- jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c 2014-04-20 12:39:22.000000000 -0700 -@@ -728,7 +728,6 @@ - setInetAddress_family(env, socketAddressObj, IPv4); - (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj); - } else { -- jbyteArray addr; - /* AF_INET6 -> Inet6Address */ - if (inet6Cls == 0) { - jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); -@@ -751,10 +750,10 @@ - NET_SocketClose(fd); - return; - } -- addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID); -- (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr); -+ setInet6Address_ipaddress(env, socketAddressObj, (const char *)&him.him6.sin6_addr); ++ public static void main(String[] args) throws Exception { ++ System.out.println("---MBeanInfoHashCodeNPETest-main ..."); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanAttributeInfo..."); ++ MBeanAttributeInfo mbeanAttributeInfo = new MBeanAttributeInfo( ++ null, SimpleType.INTEGER.getClassName(), "description", true, true, false); ++ test(mbeanAttributeInfo, "class name"); ++ ++ mbeanAttributeInfo = new MBeanAttributeInfo( ++ "name", null, "description", true, true, false); ++ test(mbeanAttributeInfo, "type"); ++ ++ mbeanAttributeInfo = new MBeanAttributeInfo( ++ "name", SimpleType.INTEGER.getClassName(), null, true, true, false); ++ test(mbeanAttributeInfo, "description"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanConstructorInfo..."); ++ MBeanConstructorInfo mbeanConstructorInfo = new MBeanConstructorInfo( ++ null, "", new MBeanParameterInfo[]{}, new DescriptorSupport()); ++ test(mbeanConstructorInfo, "name"); ++ ++ mbeanConstructorInfo = new MBeanConstructorInfo( ++ "", null, new MBeanParameterInfo[]{}, new DescriptorSupport()); ++ test(mbeanConstructorInfo, "description"); ++ ++ mbeanConstructorInfo = new MBeanConstructorInfo( ++ "", "", null, new DescriptorSupport()); ++ test(mbeanConstructorInfo, "MBeanParameterInfo"); ++ ++ mbeanConstructorInfo = new MBeanConstructorInfo( ++ "", "", new MBeanParameterInfo[]{}, null); ++ test(mbeanConstructorInfo, "descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanOperationInfo..."); ++ MBeanOperationInfo mbeanOperationInfo = new MBeanOperationInfo( ++ null, "description", new MBeanParameterInfo[]{}, "type", 1, new DescriptorSupport()); ++ test(mbeanOperationInfo, "name"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", null, new MBeanParameterInfo[]{}, "type", 1, new DescriptorSupport()); ++ test(mbeanOperationInfo, "description"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", null, "type", 1, new DescriptorSupport()); ++ test(mbeanOperationInfo, "MBeanParameterInfo"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", new MBeanParameterInfo[]{}, null, 1, new DescriptorSupport()); ++ test(mbeanOperationInfo, "type"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", new MBeanParameterInfo[]{}, "type", -1, new DescriptorSupport()); ++ test(mbeanOperationInfo, "native impact"); ++ ++ mbeanOperationInfo = new MBeanOperationInfo( ++ "name", "description", new MBeanParameterInfo[]{}, "type", 1, null); ++ test(mbeanOperationInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanParameterInfo..."); ++ MBeanParameterInfo mbeanParameterInfo = new MBeanParameterInfo( ++ null, "type", "description", new DescriptorSupport()); ++ test(mbeanParameterInfo, "name"); ++ ++ mbeanParameterInfo = new MBeanParameterInfo( ++ "name", null, "description", new DescriptorSupport()); ++ test(mbeanParameterInfo, "description"); ++ ++ mbeanParameterInfo = new MBeanParameterInfo( ++ "name", "type", null, new DescriptorSupport()); ++ test(mbeanParameterInfo, "description"); ++ ++ mbeanParameterInfo = new MBeanParameterInfo( ++ "name", "type", "description", null); ++ test(mbeanParameterInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on MBeanInfo..."); ++ String className = "toto"; ++ String description = "titi"; ++ MBeanAttributeInfo[] attrInfos = new MBeanAttributeInfo[]{}; ++ MBeanConstructorInfo[] constrInfos = new MBeanConstructorInfo[]{}; ++ MBeanOperationInfo[] operaInfos = new MBeanOperationInfo[]{}; ++ MBeanNotificationInfo[] notifInfos = new MBeanNotificationInfo[]{}; ++ ++ MBeanInfo minfo = new MBeanInfo(null, description, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(minfo, "class name"); ++ ++ minfo = new MBeanInfo(className, description, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(minfo, "name"); ++ ++ minfo = new MBeanInfo(className, null, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(minfo, "description"); ++ ++ minfo = new MBeanInfo(className, description, null, constrInfos, operaInfos, notifInfos); ++ test(minfo, "attrInfos"); ++ ++ minfo = new MBeanInfo(className, description, attrInfos, constrInfos, null, notifInfos); ++ test(minfo, "operaInfos"); ++ ++ minfo = new MBeanInfo(className, description, attrInfos, constrInfos, operaInfos, null); ++ test(minfo, "notifInfos"); ++ ++ Thread.sleep(100); ++ if (failed > 0) { ++ throw new RuntimeException("Test failed: "+failed); ++ } else { ++ System.out.println("---Test: PASSED"); ++ } ++ } + - setInetAddress_family(env, socketAddressObj, IPv6); -- (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, him.him6.sin6_scope_id); -+ setInet6Address_scopeid(env, socketAddressObj, him.him6.sin6_scope_id); - } - /* fields common to AF_INET and AF_INET6 */ ++ private static void test(Object obj, String param) { ++ try { ++ obj.hashCode(); ++ System.out.println("OK: "+obj.getClass().getSimpleName()+".hashCode worked with a null "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO!!! "+obj.getClass().getSimpleName()+".hashCode got NPE with a null "+param); ++ failed++; ++ } ++ ++ try { ++ obj.toString(); ++ System.out.println("OK: "+obj.getClass().getSimpleName()+".toString worked with a null "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO!!! "+obj.getClass().getSimpleName()+".toString got NPE."); ++ failed++; ++ } ++ } ++} +--- ./jdk/test/javax/management/monitor/CounterMonitorThresholdTest.java 2013-09-06 11:29:53.000000000 -0700 ++++ ./jdk/test/javax/management/monitor/CounterMonitorThresholdTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -23,7 +23,7 @@ ---- jdk/src/windows/native/java/net/net_util_md.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/java/net/net_util_md.c 2014-04-20 12:39:22.000000000 -0700 -@@ -851,7 +851,6 @@ - family = (iafam == IPv4)? AF_INET : AF_INET6; - if (ipv6_available() && !(family == AF_INET && v4MappedAddress == JNI_FALSE)) { - struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him; -- jbyteArray ipaddress; - jbyte caddr[16]; - jint address, scopeid = 0; - jint cached_scope_id = 0; -@@ -872,10 +871,9 @@ - caddr[15] = (address & 0xff); + /* + * @test +- * @bug 6229368 ++ * @bug 6229368 8025207 + * @summary Wrong threshold value in CounterMonitor with offset and modulus. + * @author Luis-Miguel Alventosa + * @run clean CounterMonitorThresholdTest +@@ -144,16 +144,14 @@ + for (int i = 0; i < counter.length; i++) { + mbean.setCounter(counter[i]); + System.out.println("\nCounter = " + mbean.getCounter()); +- Thread.sleep(300); +- Integer derivedGaugeValue = (Integer) cm.getDerivedGauge(name); +- System.out.println("Derived Gauge = " + derivedGaugeValue); +- if (derivedGaugeValue.intValue() != derivedGauge[i]) { +- System.out.println("Wrong derived gauge! Current value = " + +- derivedGaugeValue + " Expected value = " + derivedGauge[i]); +- System.out.println("\nStop monitoring..."); +- cm.stop(); +- throw new IllegalArgumentException("wrong derived gauge"); +- } ++ Integer derivedGaugeValue; ++ // either pass or test timeout (killed by test harness) ++ // see 8025207 ++ do { ++ Thread.sleep(150); ++ derivedGaugeValue = (Integer) cm.getDerivedGauge(name); ++ } while (derivedGaugeValue.intValue() != derivedGauge[i]); ++ + Number thresholdValue = cm.getThreshold(name); + System.out.println("Threshold = " + thresholdValue); + if (thresholdValue.intValue() != threshold[i]) { +@@ -163,7 +161,6 @@ + cm.stop(); + throw new IllegalArgumentException("wrong threshold"); } - } else { -- ipaddress = (*env)->GetObjectField(env, iaObj, ia6_ipaddressID); -- scopeid = (jint)(*env)->GetIntField(env, iaObj, ia6_scopeidID); -+ getInet6Address_ipaddress(env, iaObj, (char *)caddr); -+ scopeid = getInet6Address_scopeid(env, iaObj); - cached_scope_id = (jint)(*env)->GetIntField(env, iaObj, ia6_cachedscopeidID); -- (*env)->GetByteArrayRegion(env, ipaddress, 0, 16, caddr); +- Thread.sleep(300); } - memset((char *)him6, 0, sizeof(struct SOCKADDR_IN6)); ---- jdk/src/windows/native/sun/font/fontpath.c 2013-09-06 11:29:15.000000000 -0700 -+++ jdk/src/windows/native/sun/font/fontpath.c 2014-04-20 12:39:22.000000000 -0700 -@@ -185,6 +185,12 @@ - return 0; - } - -+/* This HDC is initialised and released in the populate family map -+ * JNI entry point, and used within the call which would otherwise -+ * create many DCs. -+ */ -+static HDC screenDC = NULL; -+ - static int DifferentFamily(wchar_t *family, wchar_t* fullName) { - LOGFONTW lfw; - CheckFamilyInfo info; -@@ -202,7 +208,7 @@ - memset(&lfw, 0, sizeof(lfw)); - wcscpy(lfw.lfFaceName, fullName); - lfw.lfCharSet = DEFAULT_CHARSET; -- EnumFontFamiliesExW(GetDC(NULL), &lfw, -+ EnumFontFamiliesExW(screenDC, &lfw, - (FONTENUMPROCW)CheckFontFamilyProcW, - (LPARAM)(&info), 0L); - -@@ -299,7 +305,7 @@ - memset(&lfa, 0, sizeof(lfa)); - strcpy(lfa.lfFaceName, lpelfe->elfLogFont.lfFaceName); - lfa.lfCharSet = lpelfe->elfLogFont.lfCharSet; -- EnumFontFamiliesExA(GetDC(NULL), &lfa, -+ EnumFontFamiliesExA(screenDC, &lfa, - (FONTENUMPROCA)EnumFontFacesInFamilyProcA, - lParam, 0L); - return 1; -@@ -353,7 +359,7 @@ - memset(&lfw, 0, sizeof(lfw)); - wcscpy(lfw.lfFaceName, lpelfe->elfLogFont.lfFaceName); - lfw.lfCharSet = lpelfe->elfLogFont.lfCharSet; -- EnumFontFamiliesExW(GetDC(NULL), &lfw, -+ EnumFontFamiliesExW(screenDC, &lfw, - (FONTENUMPROCW)EnumFontFacesInFamilyProcW, - lParam, 0L); - return 1; -@@ -613,13 +619,17 @@ - return; - } - -+ screenDC = GetDC(NULL); -+ if (screenDC == NULL) { -+ return; -+ } - /* Enumerate fonts via GDI to build maps of fonts and families */ - if (IS_NT) { - LOGFONTW lfw; - memset(&lfw, 0, sizeof(lfw)); - lfw.lfCharSet = DEFAULT_CHARSET; /* all charsets */ - wcscpy(lfw.lfFaceName, L""); /* one face per family (CHECK) */ -- EnumFontFamiliesExW(GetDC(NULL), &lfw, -+ EnumFontFamiliesExW(screenDC, &lfw, - (FONTENUMPROCW)EnumFamilyNamesW, - (LPARAM)(&fmi), 0L); - } else { -@@ -627,7 +637,7 @@ - memset(&lfa, 0, sizeof(lfa)); - lfa.lfCharSet = DEFAULT_CHARSET; /* all charsets */ - strcpy(lfa.lfFaceName, ""); /* one face per family */ -- ret = EnumFontFamiliesExA(GetDC(NULL), &lfa, -+ ret = EnumFontFamiliesExA(screenDC, &lfa, - (FONTENUMPROCA)EnumFamilyNamesA, - (LPARAM)(&fmi), 0L); - } -@@ -637,6 +647,8 @@ - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, - fontKeyName, 0L, KEY_READ, &hkeyFonts); - if (ret != ERROR_SUCCESS) { -+ ReleaseDC(NULL, screenDC); -+ screenDC = NULL; - return; + // Stop the monitor +--- ./jdk/test/javax/management/monitor/NullAttributeValueTest.java 2013-09-06 11:29:53.000000000 -0700 ++++ ./jdk/test/javax/management/monitor/NullAttributeValueTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -23,11 +23,12 @@ + + /* + * @test +- * @bug 6200031 ++ * @bug 6200031 8025206 + * @summary Test that the counter/gauge/string monitors emit a + * jmx.monitor.error.type notification when the attribute + * being monitored returns a null value. + * @author Luis-Miguel Alventosa ++ * @author Shanliang JIANG + * @run clean NullAttributeValueTest + * @run build NullAttributeValueTest + * @run main NullAttributeValueTest +@@ -39,7 +40,7 @@ + public class NullAttributeValueTest implements NotificationListener { + + // Flag to notify that a message has been received +- private boolean messageReceived = false; ++ private volatile boolean messageReceived = false; + + // MBean class + public class ObservedObject implements ObservedObjectMBean { +@@ -83,7 +84,6 @@ + * Update the counter and check for notifications + */ + public int counterMonitorNotification() throws Exception { +- + CounterMonitor counterMonitor = null; + try { + MBeanServer server = MBeanServerFactory.newMBeanServer(); +@@ -134,31 +134,17 @@ + echo(">>> START the CounterMonitor"); + counterMonitor.start(); + +- // Wait for granularity period (multiplied by 2 for sure) +- // +- Thread.sleep(granularityperiod * 2); +- +- // Check if notification was received +- // +- if (messageReceived) { +- echo("\tOK: CounterMonitor notification received"); +- } else { +- echo("\tKO: CounterMonitor notification missed or not emitted"); +- return 1; +- } ++ return checkReceived(granularityperiod, "CounterMonitor"); + } finally { + if (counterMonitor != null) + counterMonitor.stop(); + } +- +- return 0; } -@@ -653,6 +665,8 @@ - dwMaxValueNameLen >= MAX_BUFFER || - dwMaxValueDataLen >= MAX_BUFFER) { - RegCloseKey(hkeyFonts); -+ ReleaseDC(NULL, screenDC); -+ screenDC = NULL; - return; + /** + * Update the gauge and check for notifications + */ + public int gaugeMonitorNotification() throws Exception { +- + GaugeMonitor gaugeMonitor = null; + try { + MBeanServer server = MBeanServerFactory.newMBeanServer(); +@@ -212,31 +198,17 @@ + echo(">>> START the GaugeMonitor"); + gaugeMonitor.start(); + +- // Wait for granularity period (multiplied by 2 for sure) +- // +- Thread.sleep(granularityperiod * 2); +- +- // Check if notification was received +- // +- if (messageReceived) { +- echo("\tOK: GaugeMonitor notification received"); +- } else { +- echo("\tKO: GaugeMonitor notification missed or not emitted"); +- return 1; +- } ++ return checkReceived(granularityperiod, "GaugeMonitor"); + } finally { + if (gaugeMonitor != null) + gaugeMonitor.stop(); + } +- +- return 0; } - for (nval = 0; nval < dwNumValues; nval++ ) { -@@ -692,4 +706,6 @@ + + /** + * Update the string and check for notifications + */ + public int stringMonitorNotification() throws Exception { +- + StringMonitor stringMonitor = null; + try { + MBeanServer server = MBeanServerFactory.newMBeanServer(); +@@ -289,24 +261,11 @@ + echo(">>> START the StringMonitor"); + stringMonitor.start(); + +- // Wait for granularity period (multiplied by 2 for sure) +- // +- Thread.sleep(granularityperiod * 2); +- +- // Check if notification was received +- // +- if (messageReceived) { +- echo("\tOK: StringMonitor notification received"); +- } else { +- echo("\tKO: StringMonitor notification missed or not emitted"); +- return 1; +- } ++ return checkReceived(granularityperiod, "StringMonitor"); + } finally { + if (stringMonitor != null) + stringMonitor.stop(); } +- +- return 0; } - RegCloseKey(hkeyFonts); -+ ReleaseDC(NULL, screenDC); -+ screenDC = NULL; - } ---- jdk/src/windows/native/sun/net/portconfig.c 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/src/windows/native/sun/net/portconfig.c 2014-04-20 12:39:22.000000000 -0700 -@@ -0,0 +1,106 @@ + + /** +@@ -326,6 +285,21 @@ + return error; + } + ++ private int checkReceived(long granularityperiod, String caller) throws InterruptedException { ++ int i = 100; ++ do { ++ Thread.sleep(granularityperiod); ++ } while (!messageReceived && i-- > 0); ++ ++ if (messageReceived) { ++ echo("\tOK: " + caller + " notification received"); ++ } else { ++ echo("\tKO: " + caller + " notification missed or not emitted"); ++ } ++ ++ return messageReceived ? 0 : 1; ++ } ++ + /* + * Print message + */ +--- ./jdk/test/javax/management/openmbean/OpenMBeanInfoEqualsNPETest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/management/openmbean/OpenMBeanInfoEqualsNPETest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,196 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * 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. ++ * 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 @@ -60787,185 +107914,933 @@ + * questions. + */ + -+#include -+#include "jni.h" -+#include "net_util.h" ++import javax.management.MBeanNotificationInfo; ++import javax.management.MBeanOperationInfo; ++import javax.management.modelmbean.DescriptorSupport; ++import javax.management.openmbean.OpenMBeanAttributeInfo; ++import javax.management.openmbean.OpenMBeanAttributeInfoSupport; ++import javax.management.openmbean.OpenMBeanConstructorInfo; ++import javax.management.openmbean.OpenMBeanConstructorInfoSupport; ++import javax.management.openmbean.OpenMBeanInfo; ++import javax.management.openmbean.OpenMBeanInfoSupport; ++import javax.management.openmbean.OpenMBeanOperationInfo; ++import javax.management.openmbean.OpenMBeanOperationInfoSupport; ++import javax.management.openmbean.OpenMBeanParameterInfo; ++import javax.management.openmbean.OpenMBeanParameterInfoSupport; ++import javax.management.openmbean.SimpleType; + -+#ifdef __cplusplus -+extern "C" { -+#endif ++/* ++ * @test ++ * @bug 8023529 ++ * @summary Test that OpenMBean*Info.equals do not throw NPE ++ * @author Shanliang JIANG ++ * @run clean OpenMBeanInfoEqualsNPETest ++ * @run build OpenMBeanInfoEqualsNPETest ++ * @run main OpenMBeanInfoEqualsNPETest ++ */ ++public class OpenMBeanInfoEqualsNPETest { ++ private static int failed = 0; + -+struct portrange { -+ int lower; -+ int higher; -+}; ++ public static void main(String[] args) throws Exception { ++ System.out.println("---OpenMBeanInfoEqualsNPETest-main ..."); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanAttributeInfoSupport..."); ++ OpenMBeanAttributeInfo openMBeanAttributeInfo0 = new OpenMBeanAttributeInfoSupport( ++ "name", "description", SimpleType.INTEGER, true, true, false, 1, new Integer[]{1, 2, 3}); ++ OpenMBeanAttributeInfo openMBeanAttributeInfo = new OpenMBeanAttributeInfoSupport( ++ "name", "description", SimpleType.INTEGER, true, true, false, null, new Integer[]{1, 2, 3}); ++ test(openMBeanAttributeInfo0, openMBeanAttributeInfo, "defaultValue"); ++ ++ openMBeanAttributeInfo = new OpenMBeanAttributeInfoSupport( ++ "name", "description", SimpleType.INTEGER, true, true, false, 1, null); ++ test(openMBeanAttributeInfo0, openMBeanAttributeInfo, "legalValues"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanConstructorInfoSupport..."); ++ OpenMBeanConstructorInfo openMBeanConstructorInfo0 = new OpenMBeanConstructorInfoSupport( ++ "name", "description", new OpenMBeanParameterInfo[]{}, new DescriptorSupport()); ++ OpenMBeanConstructorInfo openMBeanConstructorInfo; ++ ++ openMBeanConstructorInfo = new OpenMBeanConstructorInfoSupport( ++ "name", "description", null, new DescriptorSupport()); ++ test(openMBeanConstructorInfo0, openMBeanConstructorInfo, "sigs"); ++ ++ openMBeanConstructorInfo = new OpenMBeanConstructorInfoSupport( ++ "name", "description", new OpenMBeanParameterInfo[]{}, null); ++ test(openMBeanConstructorInfo0, openMBeanConstructorInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanOperationInfoSupport..."); ++ OpenMBeanOperationInfo openMBeanOperationInfo0 = new OpenMBeanOperationInfoSupport( ++ "name", "description", new OpenMBeanParameterInfo[]{}, SimpleType.INTEGER, 1, new DescriptorSupport()); ++ OpenMBeanOperationInfo openMBeanOperationInfo; ++ ++ openMBeanOperationInfo = new OpenMBeanOperationInfoSupport( ++ "name", "description", null, SimpleType.INTEGER, 1, new DescriptorSupport()); ++ test(openMBeanOperationInfo0, openMBeanOperationInfo, "sigs"); ++ ++ openMBeanOperationInfo = new OpenMBeanOperationInfoSupport( ++ "name", "description", new OpenMBeanParameterInfo[]{}, SimpleType.INTEGER, MBeanOperationInfo.UNKNOWN, null); ++ test(openMBeanOperationInfo0, openMBeanOperationInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanParameterInfoSupport 1..."); ++ OpenMBeanParameterInfo openMBeanParameterInfo0 = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 0, -1, 1); ++ OpenMBeanParameterInfo openMBeanParameterInfo; ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, null, -1, 1); ++ test(openMBeanParameterInfo0, openMBeanParameterInfo, "default value"); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 0, null, 1); ++ test(openMBeanParameterInfo0, openMBeanParameterInfo, "min value"); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 0, -1, null); ++ test(openMBeanParameterInfo0, openMBeanParameterInfo, "max value"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanParameterInfoSupport 2..."); ++ openMBeanParameterInfo0 = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 1, new Integer[]{-1, 1, 2}); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, null, new Integer[]{-1, 1, 2}); ++ test(openMBeanParameterInfo0, openMBeanParameterInfo, "default value"); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 1, null); ++ test(openMBeanParameterInfo0, openMBeanParameterInfo, "legal values"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanInfoSupport..."); ++ String className = "toto"; ++ String description = "titi"; ++ OpenMBeanAttributeInfo[] attrInfos = new OpenMBeanAttributeInfo[]{}; ++ OpenMBeanConstructorInfo[] constrInfos = new OpenMBeanConstructorInfo[]{}; ++ OpenMBeanOperationInfo[] operaInfos = new OpenMBeanOperationInfo[]{}; ++ MBeanNotificationInfo[] notifInfos = new MBeanNotificationInfo[]{}; ++ ++ OpenMBeanInfo ominfo0 = new OpenMBeanInfoSupport("toto", description, attrInfos, constrInfos, operaInfos, notifInfos); ++ OpenMBeanInfo ominfo = new OpenMBeanInfoSupport(null, description, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(ominfo0, ominfo, "class name"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, null, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(ominfo0, ominfo, "description"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, null, constrInfos, operaInfos, notifInfos); ++ test(ominfo0, ominfo, "attrInfos"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, attrInfos, null, operaInfos, notifInfos); ++ test(ominfo0, ominfo, "constructor infos"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, attrInfos, constrInfos, null, notifInfos); ++ test(ominfo0, ominfo, "operation infos"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, attrInfos, constrInfos, operaInfos, null); ++ test(ominfo0, ominfo, "notif infos"); ++ ++ if (failed > 0) { ++ throw new RuntimeException("Test failed: "+failed); ++ } else { ++ System.out.println("---Test: PASSED"); ++ } ++ } + -+static int getPortRange(struct portrange *range) -+{ -+ OSVERSIONINFO ver; -+ ver.dwOSVersionInfoSize = sizeof(ver); -+ GetVersionEx(&ver); ++ private static void test(Object obj1, Object obj2, String param) { ++ try { ++ obj1.equals(obj2); ++ System.out.println("OK-1: "+obj1.getClass().getSimpleName()+ ++ ".equals worked with a null field: "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-1!!! "+obj1.getClass().getSimpleName()+ ++ ".equals got NPE with a null field: "+param); ++ npe.printStackTrace(); ++ failed++; ++ } + -+ /* Check for major version 5 or less = Windows XP/2003 or older */ -+ if (ver.dwMajorVersion <= 5) { -+ LONG ret; -+ HKEY hKey; -+ range->lower = 1024; -+ range->higher = 4999; ++ try { ++ obj2.equals(obj1); ++ System.out.println("OK-2: "+obj2.getClass().getSimpleName()+ ++ ".equals worked with a null field: "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-2!!! "+obj2.getClass().getSimpleName()+ ++ ".equals got NPE with a null field: "+param); ++ npe.printStackTrace(); ++ failed++; ++ } + -+ /* check registry to see if upper limit was raised */ -+ ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, -+ "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", -+ 0, KEY_READ, (PHKEY)&hKey -+ ); -+ if (ret == ERROR_SUCCESS) { -+ DWORD maxuserport; -+ ULONG ulType; -+ DWORD dwLen = sizeof(maxuserport); -+ ret = RegQueryValueEx(hKey, "MaxUserPort", NULL, &ulType, -+ (LPBYTE)&maxuserport, &dwLen); -+ RegCloseKey(hKey); -+ if (ret == ERROR_SUCCESS) { -+ range->higher = maxuserport; -+ } ++ try { ++ obj1.equals(null); ++ obj2.equals(null); ++ ++ System.out.println("OK-3: "+obj1.getClass().getSimpleName()+ ++ ".equals worked with a null object."); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-3!!! "+obj1.getClass().getSimpleName()+ ++ ".equals got NPE with a null object."); ++ npe.printStackTrace(); ++ failed++; + } -+ } else { -+ /* There doesn't seem to be an API to access this. "MaxUserPort" -+ * is affected, but is not sufficient to determine. -+ * so we just use the defaults, which are less likely to change -+ */ -+ range->lower = 49152; -+ range->higher = 65535; + } -+ return 0; +} +--- ./jdk/test/javax/management/openmbean/OpenMBeanInfoHashCodeNPETest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/management/openmbean/OpenMBeanInfoHashCodeNPETest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,173 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import javax.management.MBeanNotificationInfo; ++import javax.management.modelmbean.DescriptorSupport; ++import javax.management.openmbean.OpenMBeanAttributeInfo; ++import javax.management.openmbean.OpenMBeanAttributeInfoSupport; ++import javax.management.openmbean.OpenMBeanConstructorInfo; ++import javax.management.openmbean.OpenMBeanConstructorInfoSupport; ++import javax.management.openmbean.OpenMBeanInfo; ++import javax.management.openmbean.OpenMBeanInfoSupport; ++import javax.management.openmbean.OpenMBeanOperationInfo; ++import javax.management.openmbean.OpenMBeanOperationInfoSupport; ++import javax.management.openmbean.OpenMBeanParameterInfo; ++import javax.management.openmbean.OpenMBeanParameterInfoSupport; ++import javax.management.openmbean.SimpleType; + +/* -+ * Class: sun_net_PortConfig -+ * Method: getLower0 -+ * Signature: ()I ++ * @test ++ * @bug 8023529 ++ * @summary Test that OpenMBean*Info.hashCode do not throw NPE ++ * @author Shanliang JIANG ++ * @run clean OpenMBeanInfoHashCodeNPETest ++ * @run build OpenMBeanInfoHashCodeNPETest ++ * @run main OpenMBeanInfoHashCodeNPETest + */ -+JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getLower0 -+ (JNIEnv *env, jclass clazz) -+{ -+ struct portrange range; -+ getPortRange(&range); -+ return range.lower; ++public class OpenMBeanInfoHashCodeNPETest { ++ private static int failed = 0; ++ ++ public static void main(String[] args) throws Exception { ++ System.out.println("---OpenMBeanInfoHashCodeNPETest-main ..."); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanInfohashCodeTest..."); ++ OpenMBeanAttributeInfo openMBeanAttributeInfo = new OpenMBeanAttributeInfoSupport( ++ "name", "description", SimpleType.INTEGER, true, true, false, null, new Integer[]{1, 2, 3}); ++ test(openMBeanAttributeInfo, "defaultValue"); ++ ++ openMBeanAttributeInfo = new OpenMBeanAttributeInfoSupport( ++ "name", "description", SimpleType.INTEGER, true, true, false, 1, null); ++ test(openMBeanAttributeInfo, "legalValues"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanConstructorInfoSupport..."); ++ OpenMBeanConstructorInfo openMBeanConstructorInfo; ++ ++ openMBeanConstructorInfo = new OpenMBeanConstructorInfoSupport( ++ "name", "description", null, new DescriptorSupport()); ++ test(openMBeanConstructorInfo, "sigs"); ++ ++ openMBeanConstructorInfo = new OpenMBeanConstructorInfoSupport( ++ "name", "description", new OpenMBeanParameterInfo[]{}, null); ++ test(openMBeanConstructorInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanOperationInfoSupport..."); ++ OpenMBeanOperationInfo openMBeanOperationInfo; ++ ++ openMBeanOperationInfo = new OpenMBeanOperationInfoSupport( ++ "name", "description", null, SimpleType.INTEGER, 1, new DescriptorSupport()); ++ test(openMBeanOperationInfo, "sigs"); ++ ++ openMBeanOperationInfo = new OpenMBeanOperationInfoSupport( ++ "name", "description", new OpenMBeanParameterInfo[]{}, SimpleType.INTEGER, 1, null); ++ test(openMBeanOperationInfo, "Descriptor"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanParameterInfoSupport 1..."); ++ OpenMBeanParameterInfo openMBeanParameterInfo; ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, null, -1, 1); ++ test(openMBeanParameterInfo, "default value"); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 0, null, 1); ++ test(openMBeanParameterInfo, "min value"); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 0, -1, null); ++ test(openMBeanParameterInfo, "max value"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanParameterInfoSupport 2..."); ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 1, new Integer[]{-1, 1, 2}); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, null, new Integer[]{-1, 1, 2}); ++ test(openMBeanParameterInfo, "default value"); ++ ++ openMBeanParameterInfo = new OpenMBeanParameterInfoSupport( ++ "name", "description", SimpleType.INTEGER, 1, null); ++ test(openMBeanParameterInfo, "legal values"); ++ ++ // ---- ++ System.out.println("\n---Testing on OpenMBeanInfoSupport..."); ++ String className = "toto"; ++ String description = "titi"; ++ OpenMBeanAttributeInfo[] attrInfos = new OpenMBeanAttributeInfo[]{}; ++ OpenMBeanConstructorInfo[] constrInfos = new OpenMBeanConstructorInfo[]{}; ++ OpenMBeanOperationInfo[] operaInfos = new OpenMBeanOperationInfo[]{}; ++ MBeanNotificationInfo[] notifInfos = new MBeanNotificationInfo[]{}; ++ ++ OpenMBeanInfo ominfo = new OpenMBeanInfoSupport(null, description, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(ominfo, "class name"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, null, attrInfos, constrInfos, operaInfos, notifInfos); ++ test(ominfo, "description"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, null, constrInfos, operaInfos, notifInfos); ++ test(ominfo, "attrInfos"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, attrInfos, null, operaInfos, notifInfos); ++ test(ominfo, "constructor infos"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, attrInfos, constrInfos, null, notifInfos); ++ test(ominfo, "operation infos"); ++ ++ ominfo = new OpenMBeanInfoSupport(className, description, attrInfos, constrInfos, operaInfos, null); ++ test(ominfo, "notif infos"); ++ ++ if (failed > 0) { ++ throw new RuntimeException("Test failed: "+failed); ++ } else { ++ System.out.println("---Test: PASSED"); ++ } ++ } ++ ++ private static void test(Object obj, String param) { ++ try { ++ obj.hashCode(); ++ System.out.println("OK-1: "+obj.getClass().getSimpleName()+ ++ ".hashCode worked with a null paramer: "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-1!!! "+obj.getClass().getSimpleName()+ ++ ".hashCode got NPE with null paramer: "+param); ++ npe.printStackTrace(); ++ failed++; ++ } ++ ++ try { ++ obj.toString(); ++ System.out.println("OK-1: "+obj.getClass().getSimpleName()+ ++ ".toString worked with a null paramer: "+param); ++ } catch (NullPointerException npe) { ++ System.out.println("--->KO-1!!! "+obj.getClass().getSimpleName()+ ++ ".toString got NPE with null paramer: "+param); ++ npe.printStackTrace(); ++ failed++; ++ } ++ } +} +--- ./jdk/test/javax/management/remote/mandatory/URLTest.java 2013-09-06 11:29:54.000000000 -0700 ++++ ./jdk/test/javax/management/remote/mandatory/URLTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -24,8 +24,6 @@ + /* + * @test + * @bug 5057532 +- * @ignore Test will fail until 6338951 is resolved (java.net.URI now +- * accepts "http://-a"). + * @summary Tests that host names are parsed correctly in URLs + * @author Eamonn McManus + * @run clean URLTest +--- ./jdk/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java 2013-09-06 11:29:54.000000000 -0700 ++++ ./jdk/test/javax/management/remote/mandatory/connection/BrokenConnectionTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -23,7 +23,7 @@ + + /* + * @test +- * @bug 4940957 ++ * @bug 4940957 8025205 + * @summary Tests behaviour when connections break + * @author Eamonn McManus + * @run clean BrokenConnectionTest +@@ -485,14 +485,13 @@ + } + if (thisok) { + System.out.println("Waiting for failure notif"); +- long deadline = System.currentTimeMillis() + 5000; +- while (failureListener.count < 1 +- && System.currentTimeMillis() < deadline) +- Thread.sleep(500); +- if (failureListener.count < 1) { +- System.out.println("Did not get failure notif!"); +- thisok = false; +- } else if (failureListener.count > 1) { ++ // pass or test timeout. see 8025205 ++ do { ++ Thread.sleep(100); ++ } while (failureListener.count < 1); ++ ++ Thread.sleep(1000); // if more notif coming ... ++ if (failureListener.count > 1) { + System.out.println("Got too many failure notifs: " + + failureListener.count); + thisok = false; +--- ./jdk/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java 2013-09-06 11:29:54.000000000 -0700 ++++ ./jdk/test/javax/management/remote/mandatory/connection/IdleTimeoutTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -23,7 +23,7 @@ + + /* + * @test +- * @bug 4886838 4886830 ++ * @bug 4886838 4886830 8025204 + * @summary Tests that idle timeouts happen at appropriate times + * @author Eamonn McManus + * @run clean IdleTimeoutTest +@@ -272,19 +272,11 @@ + } + + System.out.println("Waiting for id list to drop ours"); +- deadline = System.currentTimeMillis() + timeout*2 + 10000; +- while (true) { +- ids = Arrays.asList(server.getConnectionIds()); +- if (!ids.contains(connId) +- || System.currentTimeMillis() >= deadline) +- break; +- Thread.sleep(500); +- } +- if (ids.contains(connId)) { +- System.out.println("Client id still in list after " + +- "deadline: " + ids); +- return false; +- } ++ // pass or timed out by test harness - see 8025204 ++ do { ++ Thread.sleep(100); ++ ids = Arrays.asList(server.getConnectionIds()); ++ } while (ids.contains(connId)); + + conn.getDefaultDomain(); + if (connId.equals(client.getConnectionId())) { +--- ./jdk/test/javax/management/remote/mandatory/connection/RMIConnectorInternalMapTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/management/remote/mandatory/connection/RMIConnectorInternalMapTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,122 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import java.lang.management.ManagementFactory; ++import java.lang.ref.WeakReference; ++import java.lang.reflect.Field; ++import java.util.Collections; ++import java.util.Map; ++import javax.management.MBeanServer; ++import javax.management.MBeanServerConnection; ++import javax.management.remote.JMXConnector; ++import javax.management.remote.JMXConnectorFactory; ++import javax.management.remote.JMXConnectorServer; ++import javax.management.remote.JMXConnectorServerFactory; ++import javax.management.remote.JMXPrincipal; ++import javax.management.remote.JMXServiceURL; ++import javax.management.remote.rmi.RMIConnector; ++import javax.security.auth.Subject; + +/* -+ * Class: sun_net_PortConfig -+ * Method: getUpper0 -+ * Signature: ()I ++ * @test ++ * @bug 6566891 ++ * @summary Check no memory leak on RMIConnector's rmbscMap ++ * @author Shanliang JIANG ++ * @run clean RMIConnectorInternalMapTest ++ * @run build RMIConnectorInternalMapTest ++ * @run main RMIConnectorInternalMapTest + */ -+JNIEXPORT jint JNICALL Java_sun_net_PortConfig_getUpper0 -+ (JNIEnv *env, jclass clazz) -+{ -+ struct portrange range; -+ getPortRange(&range); -+ return range.higher; ++ ++public class RMIConnectorInternalMapTest { ++ public static void main(String[] args) throws Exception { ++ System.out.println("---RMIConnectorInternalMapTest starting..."); ++ ++ JMXConnectorServer connectorServer = null; ++ JMXConnector connectorClient = null; ++ ++ try { ++ MBeanServer mserver = ManagementFactory.getPlatformMBeanServer(); ++ JMXServiceURL serverURL = new JMXServiceURL("rmi", "localhost", 0); ++ connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(serverURL, null, mserver); ++ connectorServer.start(); ++ ++ JMXServiceURL serverAddr = connectorServer.getAddress(); ++ connectorClient = JMXConnectorFactory.connect(serverAddr, null); ++ connectorClient.connect(); ++ ++ Field rmbscMapField = RMIConnector.class.getDeclaredField("rmbscMap"); ++ rmbscMapField.setAccessible(true); ++ Map> map = ++ (Map>) rmbscMapField.get(connectorClient); ++ if (map != null && !map.isEmpty()) { // failed ++ throw new RuntimeException("RMIConnector's rmbscMap must be empty at the initial time."); ++ } ++ ++ Subject delegationSubject = ++ new Subject(true, ++ Collections.singleton(new JMXPrincipal("delegate")), ++ Collections.EMPTY_SET, ++ Collections.EMPTY_SET); ++ MBeanServerConnection mbsc1 = ++ connectorClient.getMBeanServerConnection(delegationSubject); ++ MBeanServerConnection mbsc2 = ++ connectorClient.getMBeanServerConnection(delegationSubject); ++ ++ if (mbsc1 == null) { ++ throw new RuntimeException("Got null connection."); ++ } ++ if (mbsc1 != mbsc2) { ++ throw new RuntimeException("Not got same connection with a same subject."); ++ } ++ ++ map = (Map>) rmbscMapField.get(connectorClient); ++ if (map == null || map.isEmpty()) { // failed ++ throw new RuntimeException("RMIConnector's rmbscMap has wrong size " ++ + "after creating a delegated connection."); ++ } ++ ++ delegationSubject = null; ++ mbsc1 = null; ++ mbsc2 = null; ++ ++ int i = 0; ++ while (!map.isEmpty() && i++ < 60) { ++ System.gc(); ++ Thread.sleep(100); ++ } ++ System.out.println("---GC times: " + i); ++ ++ if (!map.isEmpty()) { ++ throw new RuntimeException("Failed to clean RMIConnector's rmbscMap"); ++ } else { ++ System.out.println("---RMIConnectorInternalMapTest: PASSED!"); ++ } ++ } finally { ++ try { ++ connectorClient.close(); ++ connectorServer.stop(); ++ } catch (Exception e) { ++ } ++ } ++ } +} -+#ifdef __cplusplus +--- ./jdk/test/javax/management/remote/mandatory/connection/RMIConnectorNullSubjectConnTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/management/remote/mandatory/connection/RMIConnectorNullSubjectConnTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,105 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import java.lang.management.ManagementFactory; ++import java.lang.ref.WeakReference; ++import java.lang.reflect.Field; ++import javax.management.MBeanServer; ++import javax.management.MBeanServerConnection; ++import javax.management.remote.JMXConnector; ++import javax.management.remote.JMXConnectorFactory; ++import javax.management.remote.JMXConnectorServer; ++import javax.management.remote.JMXConnectorServerFactory; ++import javax.management.remote.JMXServiceURL; ++import javax.management.remote.rmi.RMIConnector; ++ ++/* ++ * @test ++ * @bug 6566891 ++ * @summary Check no memory leak on RMIConnector's nullSubjectConn ++ * @author Shanliang JIANG ++ * @run clean RMIConnectorNullSubjectConnTest ++ * @run build RMIConnectorNullSubjectConnTest ++ * @run main RMIConnectorNullSubjectConnTest ++ */ ++ ++public class RMIConnectorNullSubjectConnTest { ++ public static void main(String[] args) throws Exception { ++ System.out.println("---RMIConnectorNullSubjectConnTest starting..."); ++ ++ JMXConnectorServer connectorServer = null; ++ JMXConnector connectorClient = null; ++ ++ try { ++ MBeanServer mserver = ManagementFactory.getPlatformMBeanServer(); ++ JMXServiceURL serverURL = new JMXServiceURL("rmi", "localhost", 0); ++ connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(serverURL, null, mserver); ++ connectorServer.start(); ++ ++ JMXServiceURL serverAddr = connectorServer.getAddress(); ++ connectorClient = JMXConnectorFactory.connect(serverAddr, null); ++ connectorClient.connect(); ++ ++ Field nullSubjectConnField = RMIConnector.class.getDeclaredField("nullSubjectConnRef"); ++ nullSubjectConnField.setAccessible(true); ++ ++ WeakReference weak = ++ (WeakReference)nullSubjectConnField.get(connectorClient); ++ ++ if (weak != null && weak.get() != null) { ++ throw new RuntimeException("nullSubjectConnRef must be null at initial time."); ++ } ++ ++ MBeanServerConnection conn1 = connectorClient.getMBeanServerConnection(null); ++ MBeanServerConnection conn2 = connectorClient.getMBeanServerConnection(null); ++ if (conn1 == null) { ++ throw new RuntimeException("A connection with null subject should not be null."); ++ } else if (conn1 != conn2) { ++ throw new RuntimeException("The 2 connections with null subject are not equal."); ++ } ++ ++ conn1 = null; ++ conn2 = null; ++ int i = 1; ++ do { ++ System.gc(); ++ Thread.sleep(100); ++ weak = (WeakReference)nullSubjectConnField.get(connectorClient); ++ } while ((weak != null && weak.get() != null) && i++ < 60); ++ ++ System.out.println("---GC times: " + i); ++ ++ if (weak != null && weak.get() != null) { ++ throw new RuntimeException("Failed to clean RMIConnector's nullSubjectConn"); ++ } else { ++ System.out.println("---RMIConnectorNullSubjectConnTest: PASSED!"); ++ } ++ } finally { ++ try { ++ connectorClient.close(); ++ connectorServer.stop(); ++ } catch (Exception e) { ++ } ++ } ++ } +} -+#endif ---- jdk/src/windows/native/sun/windows/awt_Toolkit.cpp 2013-09-06 11:29:17.000000000 -0700 -+++ jdk/src/windows/native/sun/windows/awt_Toolkit.cpp 2014-04-20 12:39:22.000000000 -0700 -@@ -365,6 +365,7 @@ - HANDLE hCompleted; - - jobject thread; -+ jobject threadGroup; - }; - - void ToolkitThreadProc(void *param) -@@ -377,7 +378,7 @@ - JavaVMAttachArgs attachArgs; - attachArgs.version = JNI_VERSION_1_2; - attachArgs.name = "AWT-Windows"; -- attachArgs.group = NULL; -+ attachArgs.group = data->threadGroup; +--- ./jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java 2013-09-06 11:29:54.000000000 -0700 ++++ ./jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java 2013-12-01 11:14:33.000000000 -0800 +@@ -23,7 +23,7 @@ - jint res = jvm->AttachCurrentThreadAsDaemon((void **)&env, &attachArgs); - if (res < 0) { -@@ -416,17 +417,18 @@ /* - * Class: sun_awt_windows_WToolkit - * Method: startToolkitThread -- * Signature: (Ljava/lang/Runnable;)Z -+ * Signature: (Ljava/lang/Runnable;Ljava/lang/ThreadGroup)Z - */ - JNIEXPORT jboolean JNICALL --Java_sun_awt_windows_WToolkit_startToolkitThread(JNIEnv *env, jclass cls, jobject thread) -+Java_sun_awt_windows_WToolkit_startToolkitThread(JNIEnv *env, jclass cls, jobject thread, jobject threadGroup) - { - AwtToolkit& tk = AwtToolkit::GetInstance(); + * @test +- * @bug 4915825 4921009 4934965 4977469 ++ * @bug 4915825 4921009 4934965 4977469 8019584 + * @summary Tests behavior when client or server gets object of unknown class + * @author Eamonn McManus + * @run clean MissingClassTest SingleClassLoader +--- ./jdk/test/javax/script/CommonSetup.sh 2013-09-06 11:29:55.000000000 -0700 ++++ ./jdk/test/javax/script/CommonSetup.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -36,7 +36,7 @@ - ToolkitThreadProc_Data data; - data.result = false; - data.thread = env->NewGlobalRef(thread); -- if (data.thread == NULL) { -+ data.threadGroup = env->NewGlobalRef(threadGroup); -+ if (data.thread == NULL || data.threadGroup == NULL) { - return JNI_FALSE; + OS=`uname -s` + case "$OS" in +- SunOS | Linux | Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + ;; +--- ./jdk/test/javax/script/GetInterfaceTest.java 2013-09-06 11:29:55.000000000 -0700 ++++ ./jdk/test/javax/script/GetInterfaceTest.java 2014-01-18 12:16:29.000000000 -0800 +@@ -67,11 +67,11 @@ + foo2.bar2(); } - data.hCompleted = ::CreateEvent(NULL, FALSE, FALSE, NULL); -@@ -444,6 +446,7 @@ - ::CloseHandle(data.hCompleted); - env->DeleteGlobalRef(data.thread); -+ env->DeleteGlobalRef(data.threadGroup); +- interface Foo { ++ public interface Foo { + public void bar(); + } - return result ? JNI_TRUE : JNI_FALSE; +- interface Foo2 extends Foo { ++ public interface Foo2 extends Foo { + public void bar2(); + } } ---- jdk/src/windows/resource/java.manifest 2013-09-06 11:29:17.000000000 -0700 -+++ jdk/src/windows/resource/java.manifest 2014-04-20 12:39:22.000000000 -0700 -@@ -44,9 +44,15 @@ - - - -- -+ - -+ -+ -+ -+ -+ -+ - -- -+ - - ---- jdk/test/Makefile 2013-09-06 11:29:17.000000000 -0700 -+++ jdk/test/Makefile 2014-04-20 12:39:16.000000000 -0700 -@@ -79,6 +79,11 @@ - endif - OS_VERSION := $(shell $(UNAME) -r) - endif -+ifeq ($(findstring BSD,$(UNAME_S)), BSD) -+ OS_NAME = bsd -+ OS_ARCH := $(shell $(UNAME) -m) -+ OS_VERSION := $(shell $(UNAME) -r) -+endif - ifeq ($(UNAME_S), Darwin) - OS_NAME = macosx - OS_ARCH := $(shell $(UNAME) -m) ---- jdk/test/ProblemList.txt 2013-09-06 11:29:17.000000000 -0700 -+++ jdk/test/ProblemList.txt 2014-04-20 12:39:16.000000000 -0700 -@@ -456,6 +456,9 @@ - # 7041639, Solaris DSA keypair generation bug - java/util/TimeZone/TimeZoneDatePermissionCheck.sh solaris-all - -+# 8026772: test/sun/util/resources/TimeZone/Bug6317929.java failing -+sun/util/resources/TimeZone/Bug6317929.java generic-all +--- ./jdk/test/javax/security/auth/Subject/doAs/Test.sh 2013-09-06 11:29:55.000000000 -0700 ++++ ./jdk/test/javax/security/auth/Subject/doAs/Test.sh 2014-06-06 19:56:34.000000000 -0700 +@@ -33,17 +33,7 @@ + # set platform-dependent variables + OS=`uname -s` + case "$OS" in +- SunOS ) +- PS=":" +- FS="/" +- RM="/bin/rm -f" +- ;; +- Linux ) +- PS=":" +- FS="/" +- RM="/bin/rm -f" +- ;; +- Darwin ) ++ SunOS | Linux | *BSD | Darwin ) + PS=":" + FS="/" + RM="/bin/rm -f" +--- ./jdk/test/javax/swing/JComboBox/6236162/bug6236162.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JComboBox/6236162/bug6236162.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,119 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 6236162 ++ @summary Checks that there is no an inconsistence in combo box ++ behavior when user points an item in combo popup ++ by mouse and then uses UP/DOWN keys. ++ @library ../../regtesthelpers ++ @build Util ++ @author Mikhail Lapshin ++ @run main bug6236162 ++*/ ++ ++import sun.awt.SunToolkit; ++ ++import javax.swing.*; ++import javax.swing.plaf.basic.*; ++import javax.swing.plaf.metal.MetalComboBoxUI; ++import java.awt.*; ++import java.awt.event.KeyEvent; ++ ++public class bug6236162 { ++ private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ private static JFrame frame; ++ private static JComboBox combo; ++ private static MyComboUI comboUI; ++ ++ public static void main(String[] args) throws Exception { ++ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); ++ } ++ }); ++ toolkit.realSync(); ++ test(); ++ System.out.println("Test passed"); ++ } ++ ++ private static void createAndShowGUI() { ++ frame = new JFrame("bug6236162"); ++ ++ combo = new JComboBox(new String[]{"one", "two", "three", "four", "five"}); ++ combo.setEditable(true); ++ comboUI = new MyComboUI(); ++ combo.setUI(comboUI); ++ combo.setSelectedIndex(3); ++ frame.getContentPane().add(combo); ++ ++ frame.pack(); ++ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ frame.setLocationRelativeTo(null); ++ frame.setVisible(true); ++ } ++ ++ private static void test() throws AWTException { ++ Robot robot = new Robot(); ++ robot.setAutoDelay(50); ++ ++ // Open popup menu ++ realSync(); ++ Util.hitKeys(robot, KeyEvent.VK_DOWN); ++ ++ // Move mouse to the first popup menu item ++ realSync(); ++ Point p = combo.getLocationOnScreen(); ++ Dimension size = combo.getSize(); ++ p.x += size.width / 2; ++ p.y += size.height; ++ float dy = 1; ++ robot.mouseMove(p.x, p.y - 5); ++ for (int i=1; i <= 10; i++) { ++ robot.mouseMove((int)(p.x), (int)(p.y - 5 + dy*i)); ++ } ++ ++ // Select the second popup menu item ++ realSync(); ++ Util.hitKeys(robot, KeyEvent.VK_DOWN); ++ ++ realSync(); ++ JList list = comboUI.getComboPopup().getList(); ++ if (list.getSelectedIndex() != 1) { ++ throw new RuntimeException("There is an inconsistence in combo box " + ++ "behavior when user points an item in combo popup " + ++ "by mouse and then uses UP/DOWN keys."); ++ } ++ } ++ ++ private static void realSync() { ++ ((SunToolkit)Toolkit.getDefaultToolkit()).realSync(); ++ } ++ ++ // Gives access to BasicComboBoxUI.popup field ++ private static class MyComboUI extends MetalComboBoxUI { ++ public ComboPopup getComboPopup() { ++ return popup; ++ } ++ } ++} +--- ./jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html 2013-09-06 11:29:58.000000000 -0700 ++++ ./jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html 2014-06-06 19:56:30.000000000 -0700 +@@ -1,6 +1,38 @@ + ++ ++ ++ + - ############################################################################ + + ++Follow the instructions below. + 1.Go into 'subDir' folder. + 2.Press BACKSPACE key. + 3.Push OPEN button. +--- ./jdk/test/javax/swing/JFileChooser/4150029/bug4150029.java 2013-09-06 11:29:58.000000000 -0700 ++++ ./jdk/test/javax/swing/JFileChooser/4150029/bug4150029.java 2014-06-06 19:56:30.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -21,11 +21,10 @@ + * questions. + */ +-/* @test +- @bug 4150029 +- @summary BackSpace keyboard button does not lead to parent directory +- @author Oleg Mokhovikov +- @run applet/manual=done bug4150029.html ++/* ++ bug 4150029 8006087 ++ summary BackSpace keyboard button does not lead to parent directory ++ author Oleg Mokhovikov + */ ---- jdk/test/com/sun/corba/se/impl/orb/SetDefaultORBTest.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/com/sun/corba/se/impl/orb/SetDefaultORBTest.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,61 @@ + import javax.swing.*; +@@ -36,6 +35,14 @@ + private boolean res; + + public void init() { ++ if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) { ++ try { ++ UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } ++ } ++ + String tmpDir = System.getProperty("java.io.tmpdir"); + + if (tmpDir.length() == 0) {//'java.io.tmpdir' isn't guaranteed to be defined +--- ./jdk/test/javax/swing/JInternalFrame/4193219/IconCoord.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JInternalFrame/4193219/IconCoord.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,161 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60988,48 +108863,148 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ ++/* ++ @test ++ @bug 4193219 ++ @summary ++ @author Your Name: Hania Gajewska area=swing ++ @run main/manual IconCoord ++*/ + -+/** -+ * @test -+ * @bug 8028215 -+ * @summary SetDefaultORBTest setting ORB impl via properties test -+ * @run main/othervm SetDefaultORBTest -+ * -+ */ -+ -+import java.util.Properties; ++import java.awt.*; ++import java.awt.event.*; ++import javax.swing.*; + -+import org.omg.CORBA.ORB; ++public class IconCoord { ++ static Test test = new Test(); + ++ public static void main(String[] args) throws Exception { ++ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ new IconCoord().createAndShowGUI(); ++ } ++ }); ++ test.waitTestResult(); ++ } + -+public class SetDefaultORBTest { ++ private void createAndShowGUI() { ++ StringBuilder instrText = new StringBuilder(); ++ instrText.append("First, iconify internal frame \"Frame 1\" by clicking on its iconify button.\n"); ++ instrText.append("Now, maximize the top-level window \"IconCoord\".\n"); ++ instrText.append("The \"Frame 1\" icon should stay in the lower left corner of the desktop; "); ++ instrText.append("if it doesn't, press \"Fail\".\n"); ++ instrText.append("Now move the icon to the middle of the desktop by dragging it by its "); ++ instrText.append("bumpy left side. Then iconify \"Frame 2\" by clicking on its iconify button.\n"); ++ instrText.append("If the icon for frame two gets placed in the lower left corner of the "); ++ instrText.append("desktop (where the icon for \"Frame 1\" used to be before you moved it), "); ++ instrText.append("press \"Pass\". Otherwise, press \"Fail\".\n"); ++ ++ JDesktopPane dt = new JDesktopPane(); ++ ++ JButton tf; ++ JInternalFrame if1 = new JInternalFrame("Frame 1", false, false, false, true); ++ JComponent c = (JComponent) if1.getContentPane(); ++ c.setLayout(new BorderLayout()); ++ ++ tf = new JButton ("ignore"); ++ c.add (tf, BorderLayout.NORTH); ++ ++ tf = new JButton ("ignore"); ++ c.add (tf, BorderLayout.CENTER); ++ ++ JInternalFrame if2 = new JInternalFrame("Frame 2", false, false, false, true); ++ c = (JComponent) if2.getContentPane(); ++ c.setLayout(new BorderLayout()); ++ ++ tf = new JButton ("ignore"); ++ c.add (tf, BorderLayout.NORTH); ++ ++ tf = new JButton ("ignore"); ++ c.add (tf, BorderLayout.CENTER); ++ ++ if1.pack(); ++ if1.setBounds(300, 0, 300, 80); ++ if2.pack(); ++ if2.setBounds(0, 0, 300, 80); ++ dt.add(if1); ++ dt.add(if2); ++ ++ if1.setVisible(true); ++ if2.setVisible(true); ++ ++ int frameHeight = 500; ++ ++ JScrollPane dtScrollPane = new JScrollPane(dt); ++ JFrame frame = test.createTestFrame("IconCoord", dtScrollPane, instrText.toString(), 250); ++ dt.setPreferredSize(new Dimension(650, frameHeight - 250)); ++ frame.setSize (600,500); ++ frame.setVisible(true); ++ } + -+ public static void main(String[] args) { -+ Properties systemProperties = System.getProperties(); -+ systemProperties.setProperty("org.omg.CORBA.ORBSingletonClass", -+ "com.sun.corba.se.impl.orb.ORBSingleton"); -+ System.setSecurityManager(new SecurityManager()); -+ Properties props = new Properties(); -+ props.put("org.omg.CORBA.ORBClass", "com.sun.corba.se.impl.orb.ORBImpl"); -+ ORB orb = ORB.init(args, props); -+ Class orbClass = orb.getClass(); -+ if (orbClass.getName().equals("com.sun.corba.se.impl.orb.ORBImpl")) { -+ System.out.println("orbClass is com.sun.corba.se.impl.orb.ORBimpl as expected"); -+ } else { -+ throw new RuntimeException("com.sun.corba.se.impl.orb.ORBimpl class expected for ORBImpl"); ++ static class Test { ++ private boolean pass; ++ JFrame createTestFrame(String name, Component topComponent, String instructions, int instrHeight) { ++ final String PASS = "Pass"; ++ final String FAIL = "Fail"; ++ JFrame frame = new JFrame(name); ++ frame.setLayout(new BorderLayout()); ++ ++ JPanel testButtonsPanel = new JPanel(); ++ testButtonsPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 20)); ++ ++ ActionListener btnAL = new ActionListener() { ++ public void actionPerformed(ActionEvent event) { ++ switch (event.getActionCommand()) { ++ case PASS: ++ pass(); ++ break; ++ default: ++ throw new RuntimeException("Test failed."); ++ } ++ } ++ }; ++ JButton passBtn = new JButton(PASS); ++ passBtn.addActionListener(btnAL); ++ passBtn.setActionCommand(PASS); ++ ++ JButton failBtn = new JButton(FAIL); ++ failBtn.addActionListener(btnAL); ++ failBtn.setActionCommand(FAIL); ++ ++ testButtonsPanel.add(BorderLayout.WEST, passBtn); ++ testButtonsPanel.add(BorderLayout.EAST, failBtn); ++ ++ JTextArea instrText = new JTextArea(); ++ instrText.setLineWrap(true); ++ instrText.setEditable(false); ++ JScrollPane instrScrollPane = new JScrollPane(instrText); ++ instrScrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, instrHeight)); ++ instrText.append(instructions); ++ ++ JPanel servicePanel = new JPanel(); ++ servicePanel.setLayout(new BorderLayout()); ++ servicePanel.add(BorderLayout.CENTER, instrScrollPane); ++ servicePanel.add(BorderLayout.SOUTH, testButtonsPanel); ++ ++ frame.add(BorderLayout.SOUTH, servicePanel); ++ frame.add(BorderLayout.CENTER, topComponent); ++ return frame; + } -+ ORB singletonORB = ORB.init(); -+ Class singletoneOrbClass = singletonORB.getClass(); -+ if (singletoneOrbClass.getName().equals("com.sun.corba.se.impl.orb.ORBSingleton")) { -+ System.out.println("singeletonOrbClass is com.sun.corba.se.impl.orb.ORBSingleton as expected"); -+ } else { -+ throw new RuntimeException("com.sun.corba.se.impl.orb.ORBSingleton class expected for ORBSingleton"); ++ synchronized void pass() { ++ pass = true; ++ notifyAll(); ++ } ++ synchronized void waitTestResult() throws InterruptedException { ++ while (!pass) { ++ wait(); ++ } + } + } +} ---- jdk/test/com/sun/crypto/provider/TLS/TestLeadingZeroes.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/com/sun/crypto/provider/TLS/TestLeadingZeroes.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,420 @@ +--- ./jdk/test/javax/swing/JInternalFrame/4251301/bug4251301.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JInternalFrame/4251301/bug4251301.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,139 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61052,582 +109027,188 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ ++/* @test ++ @bug 4251301 ++ @summary Keybinding for show/hide the system menu. ++ @author Andrey Pikalev ++ @run main/manual bug4251301 ++*/ + -+/* -+ * @test -+ * @bug 8014618 -+ * @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement -+ * @author Pasi Eronen -+ */ -+ -+import java.io.*; -+import java.security.*; -+import java.security.spec.*; -+import java.security.interfaces.*; -+import javax.crypto.*; -+import javax.crypto.spec.*; -+import javax.crypto.interfaces.*; -+import com.sun.crypto.provider.SunJCE; -+ -+/** -+ * Test that leading zeroes are stripped in TlsPremasterSecret case, -+ * but are left as-is in other cases. -+ * -+ * We use pre-generated keypairs, since with randomly generated keypairs, -+ * a leading zero happens only (roughly) 1 out of 256 cases. -+ */ -+ -+public class TestLeadingZeroes { -+ -+ private static final String SUNJCE = "SunJCE"; -+ -+ private TestLeadingZeroes() {} -+ -+ public static void main(String argv[]) throws Exception { -+ // Add JCE to the list of providers -+ SunJCE jce = new SunJCE(); -+ Security.addProvider(jce); -+ -+ TestLeadingZeroes keyAgree = new TestLeadingZeroes(); -+ keyAgree.run(); -+ System.out.println("Test Passed"); -+ } -+ -+ private void run() throws Exception { -+ -+ // decode pre-generated keypairs -+ KeyFactory kfac = KeyFactory.getInstance("DH"); -+ PublicKey alicePubKey = -+ kfac.generatePublic(new X509EncodedKeySpec(alicePubKeyEnc)); -+ PublicKey bobPubKey = -+ kfac.generatePublic(new X509EncodedKeySpec(bobPubKeyEnc)); -+ PrivateKey alicePrivKey = -+ kfac.generatePrivate(new PKCS8EncodedKeySpec(alicePrivKeyEnc)); -+ PrivateKey bobPrivKey = -+ kfac.generatePrivate(new PKCS8EncodedKeySpec(bobPrivKeyEnc)); -+ -+ // generate normal shared secret -+ KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", SUNJCE); -+ aliceKeyAgree.init(alicePrivKey); -+ aliceKeyAgree.doPhase(bobPubKey, true); -+ byte[] sharedSecret = aliceKeyAgree.generateSecret(); -+ System.out.println("shared secret:\n" + toHexString(sharedSecret)); -+ -+ // verify that leading zero is present -+ if (sharedSecret.length != 128) { -+ throw new Exception("Unexpected shared secret length"); -+ } -+ if (sharedSecret[0] != 0) { -+ throw new Exception("First byte is not zero as expected"); -+ } -+ -+ // now, test TLS premaster secret -+ aliceKeyAgree.init(alicePrivKey); -+ aliceKeyAgree.doPhase(bobPubKey, true); -+ byte[] tlsPremasterSecret = -+ aliceKeyAgree.generateSecret("TlsPremasterSecret").getEncoded(); -+ System.out.println( -+ "tls premaster secret:\n" + toHexString(tlsPremasterSecret)); -+ -+ // check that leading zero has been stripped -+ if (tlsPremasterSecret.length != 127) { -+ throw new Exception("Unexpected TLS premaster secret length"); -+ } -+ if (tlsPremasterSecret[0] == 0) { -+ throw new Exception("First byte is zero"); -+ } -+ for (int i = 0; i < tlsPremasterSecret.length; i++) { -+ if (tlsPremasterSecret[i] != sharedSecret[i+1]) { -+ throw new Exception("Shared secrets differ"); -+ } -+ } -+ -+ } -+ -+ /* -+ * Converts a byte to hex digit and writes to the supplied buffer -+ */ -+ private void byte2hex(byte b, StringBuffer buf) { -+ char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8', -+ '9', 'A', 'B', 'C', 'D', 'E', 'F' }; -+ int high = ((b & 0xf0) >> 4); -+ int low = (b & 0x0f); -+ buf.append(hexChars[high]); -+ buf.append(hexChars[low]); -+ } -+ -+ /* -+ * Converts a byte array to hex string -+ */ -+ private String toHexString(byte[] block) { -+ StringBuffer buf = new StringBuffer(); -+ -+ int len = block.length; -+ -+ for (int i = 0; i < len; i++) { -+ byte2hex(block[i], buf); -+ if (i < len-1) { -+ buf.append(":"); -+ } -+ } -+ return buf.toString(); -+ } -+ -+ private static final byte alicePubKeyEnc[] = { -+ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x24, -+ (byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06, -+ (byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48, -+ (byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01, -+ (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81, -+ (byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81, -+ (byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD, -+ (byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB, -+ (byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D, -+ (byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36, -+ (byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38, -+ (byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F, -+ (byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C, -+ (byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E, -+ (byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23, -+ (byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5, -+ (byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E, -+ (byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8, -+ (byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34, -+ (byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57, -+ (byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18, -+ (byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21, -+ (byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF, -+ (byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29, -+ (byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D, -+ (byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A, -+ (byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4, -+ (byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07, -+ (byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95, -+ (byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F, -+ (byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50, -+ (byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3, -+ (byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4, -+ (byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C, -+ (byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B, -+ (byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA, -+ (byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3, -+ (byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78, -+ (byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02, -+ (byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00, -+ (byte)0x03, (byte)0x81, (byte)0x85, (byte)0x00, -+ (byte)0x02, (byte)0x81, (byte)0x81, (byte)0x00, -+ (byte)0xEE, (byte)0xD6, (byte)0xB1, (byte)0xA3, -+ (byte)0xB4, (byte)0x78, (byte)0x2B, (byte)0x35, -+ (byte)0xEF, (byte)0xCD, (byte)0x17, (byte)0x86, -+ (byte)0x63, (byte)0x2B, (byte)0x97, (byte)0x0E, -+ (byte)0x7A, (byte)0xD1, (byte)0xFF, (byte)0x7A, -+ (byte)0xEB, (byte)0x57, (byte)0x61, (byte)0xA1, -+ (byte)0xF7, (byte)0x90, (byte)0x11, (byte)0xA7, -+ (byte)0x79, (byte)0x28, (byte)0x69, (byte)0xBA, -+ (byte)0xA7, (byte)0xB2, (byte)0x37, (byte)0x17, -+ (byte)0xAE, (byte)0x3C, (byte)0x92, (byte)0x89, -+ (byte)0x88, (byte)0xE5, (byte)0x7E, (byte)0x8E, -+ (byte)0xF0, (byte)0x24, (byte)0xD0, (byte)0xE1, -+ (byte)0xC4, (byte)0xB0, (byte)0x26, (byte)0x5A, -+ (byte)0x1E, (byte)0xBD, (byte)0xA0, (byte)0xCF, -+ (byte)0x3E, (byte)0x97, (byte)0x2A, (byte)0x13, -+ (byte)0x92, (byte)0x3B, (byte)0x39, (byte)0xD0, -+ (byte)0x1D, (byte)0xA3, (byte)0x6B, (byte)0x3E, -+ (byte)0xC2, (byte)0xBB, (byte)0x14, (byte)0xB6, -+ (byte)0xE2, (byte)0x4C, (byte)0x0E, (byte)0x5B, -+ (byte)0x4B, (byte)0xA4, (byte)0x9D, (byte)0xA6, -+ (byte)0x21, (byte)0xB0, (byte)0xF9, (byte)0xDE, -+ (byte)0x55, (byte)0xAE, (byte)0x5C, (byte)0x29, -+ (byte)0x0E, (byte)0xC1, (byte)0xFC, (byte)0xBA, -+ (byte)0x51, (byte)0xD3, (byte)0xB6, (byte)0x6D, -+ (byte)0x75, (byte)0x72, (byte)0xDF, (byte)0x43, -+ (byte)0xAB, (byte)0x94, (byte)0x21, (byte)0x6E, -+ (byte)0x0C, (byte)0xD1, (byte)0x93, (byte)0x54, -+ (byte)0x56, (byte)0x7D, (byte)0x4B, (byte)0x90, -+ (byte)0xF1, (byte)0x94, (byte)0x45, (byte)0xD4, -+ (byte)0x2A, (byte)0x71, (byte)0xA1, (byte)0xB8, -+ (byte)0xDD, (byte)0xAA, (byte)0x05, (byte)0xF0, -+ (byte)0x27, (byte)0x37, (byte)0xBD, (byte)0x44 -+ }; -+ -+ private static final byte alicePrivKeyEnc[] = { -+ (byte)0x30, (byte)0x81, (byte)0xE3, (byte)0x02, -+ (byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81, -+ (byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A, -+ (byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7, -+ (byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01, -+ (byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02, -+ (byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4, -+ (byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E, -+ (byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20, -+ (byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91, -+ (byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33, -+ (byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45, -+ (byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88, -+ (byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B, -+ (byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3, -+ (byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43, -+ (byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18, -+ (byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55, -+ (byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38, -+ (byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C, -+ (byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3, -+ (byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE, -+ (byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5, -+ (byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1, -+ (byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18, -+ (byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84, -+ (byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6, -+ (byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19, -+ (byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A, -+ (byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9, -+ (byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0, -+ (byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02, -+ (byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D, -+ (byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41, -+ (byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD, -+ (byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19, -+ (byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2, -+ (byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9, -+ (byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02, -+ (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02, -+ (byte)0x02, (byte)0x00, (byte)0x04, (byte)0x42, -+ (byte)0x02, (byte)0x40, (byte)0x36, (byte)0x4D, -+ (byte)0xD0, (byte)0x58, (byte)0x64, (byte)0x91, -+ (byte)0x78, (byte)0xA2, (byte)0x4B, (byte)0x79, -+ (byte)0x46, (byte)0xFE, (byte)0xC9, (byte)0xD9, -+ (byte)0xCA, (byte)0x5C, (byte)0xF9, (byte)0xFD, -+ (byte)0x6C, (byte)0x5D, (byte)0x76, (byte)0x3A, -+ (byte)0x41, (byte)0x6D, (byte)0x44, (byte)0x62, -+ (byte)0x75, (byte)0x93, (byte)0x81, (byte)0x93, -+ (byte)0x00, (byte)0x4C, (byte)0xB1, (byte)0xD8, -+ (byte)0x7D, (byte)0x9D, (byte)0xF3, (byte)0x16, -+ (byte)0x2C, (byte)0x6C, (byte)0x9F, (byte)0x7A, -+ (byte)0x84, (byte)0xA3, (byte)0x7A, (byte)0xC1, -+ (byte)0x4F, (byte)0x60, (byte)0xE3, (byte)0xB5, -+ (byte)0x86, (byte)0x28, (byte)0x08, (byte)0x4D, -+ (byte)0x94, (byte)0xB6, (byte)0x04, (byte)0x0D, -+ (byte)0xAC, (byte)0xBD, (byte)0x1F, (byte)0x42, -+ (byte)0x8F, (byte)0x1B -+ }; -+ -+ private static final byte bobPubKeyEnc[] = { -+ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x23, -+ (byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06, -+ (byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48, -+ (byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01, -+ (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81, -+ (byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81, -+ (byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD, -+ (byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB, -+ (byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D, -+ (byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36, -+ (byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38, -+ (byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F, -+ (byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C, -+ (byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E, -+ (byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23, -+ (byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5, -+ (byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E, -+ (byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8, -+ (byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34, -+ (byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57, -+ (byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18, -+ (byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21, -+ (byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF, -+ (byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29, -+ (byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D, -+ (byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A, -+ (byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4, -+ (byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07, -+ (byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95, -+ (byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F, -+ (byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50, -+ (byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3, -+ (byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4, -+ (byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C, -+ (byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B, -+ (byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA, -+ (byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3, -+ (byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78, -+ (byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02, -+ (byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00, -+ (byte)0x03, (byte)0x81, (byte)0x84, (byte)0x00, -+ (byte)0x02, (byte)0x81, (byte)0x80, (byte)0x2C, -+ (byte)0x40, (byte)0xFA, (byte)0xF6, (byte)0xA6, -+ (byte)0xF8, (byte)0xAC, (byte)0xC2, (byte)0x4F, -+ (byte)0xCD, (byte)0xC7, (byte)0x37, (byte)0x93, -+ (byte)0xE5, (byte)0xE4, (byte)0x5E, (byte)0x18, -+ (byte)0x14, (byte)0xE6, (byte)0x50, (byte)0xDA, -+ (byte)0x55, (byte)0x38, (byte)0x5D, (byte)0x24, -+ (byte)0xF5, (byte)0x42, (byte)0x68, (byte)0x5F, -+ (byte)0xF5, (byte)0x15, (byte)0xC8, (byte)0x9B, -+ (byte)0x5D, (byte)0x06, (byte)0x3D, (byte)0xE1, -+ (byte)0x52, (byte)0x2F, (byte)0x98, (byte)0xFF, -+ (byte)0x37, (byte)0xBB, (byte)0x75, (byte)0x48, -+ (byte)0x48, (byte)0xE9, (byte)0x65, (byte)0x84, -+ (byte)0x37, (byte)0xBB, (byte)0xB3, (byte)0xE9, -+ (byte)0x36, (byte)0x01, (byte)0xB4, (byte)0x6A, -+ (byte)0x1C, (byte)0xB2, (byte)0x11, (byte)0x82, -+ (byte)0xCE, (byte)0x3D, (byte)0x65, (byte)0xE5, -+ (byte)0x3C, (byte)0x89, (byte)0xE9, (byte)0x52, -+ (byte)0x19, (byte)0xBD, (byte)0x58, (byte)0xF6, -+ (byte)0xA2, (byte)0x03, (byte)0xA8, (byte)0xB2, -+ (byte)0xA5, (byte)0xDB, (byte)0xEB, (byte)0xF5, -+ (byte)0x94, (byte)0xF9, (byte)0x46, (byte)0xBE, -+ (byte)0x45, (byte)0x4C, (byte)0x65, (byte)0xD2, -+ (byte)0xD1, (byte)0xCF, (byte)0xFF, (byte)0xFF, -+ (byte)0xFA, (byte)0x38, (byte)0xF1, (byte)0x72, -+ (byte)0xAB, (byte)0xB9, (byte)0x14, (byte)0x4E, -+ (byte)0xF5, (byte)0xF0, (byte)0x7A, (byte)0x8E, -+ (byte)0x45, (byte)0xFD, (byte)0x5B, (byte)0xF9, -+ (byte)0xA2, (byte)0x97, (byte)0x1B, (byte)0xAE, -+ (byte)0x2C, (byte)0x7B, (byte)0x6B, (byte)0x7C, -+ (byte)0x98, (byte)0xFE, (byte)0x58, (byte)0xDD, -+ (byte)0xBE, (byte)0xF6, (byte)0x1C, (byte)0x8E, -+ (byte)0xD0, (byte)0xA1, (byte)0x72 -+ }; -+ -+ private static final byte bobPrivKeyEnc[] = { -+ (byte)0x30, (byte)0x81, (byte)0xE4, (byte)0x02, -+ (byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81, -+ (byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A, -+ (byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7, -+ (byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01, -+ (byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02, -+ (byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4, -+ (byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E, -+ (byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20, -+ (byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91, -+ (byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33, -+ (byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45, -+ (byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88, -+ (byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B, -+ (byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3, -+ (byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43, -+ (byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18, -+ (byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55, -+ (byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38, -+ (byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C, -+ (byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3, -+ (byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE, -+ (byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5, -+ (byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1, -+ (byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18, -+ (byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84, -+ (byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6, -+ (byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19, -+ (byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A, -+ (byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9, -+ (byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0, -+ (byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02, -+ (byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D, -+ (byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41, -+ (byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD, -+ (byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19, -+ (byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2, -+ (byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9, -+ (byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02, -+ (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02, -+ (byte)0x02, (byte)0x00, (byte)0x04, (byte)0x43, -+ (byte)0x02, (byte)0x41, (byte)0x00, (byte)0xE0, -+ (byte)0x31, (byte)0xE7, (byte)0x77, (byte)0xB8, -+ (byte)0xD0, (byte)0x7E, (byte)0x0A, (byte)0x9B, -+ (byte)0x94, (byte)0xD5, (byte)0x3D, (byte)0x33, -+ (byte)0x62, (byte)0x32, (byte)0x51, (byte)0xCE, -+ (byte)0x74, (byte)0x5C, (byte)0xA5, (byte)0x72, -+ (byte)0xD9, (byte)0x36, (byte)0xF3, (byte)0x8A, -+ (byte)0x3F, (byte)0x8B, (byte)0xC6, (byte)0xFE, -+ (byte)0xEF, (byte)0x94, (byte)0x8B, (byte)0x50, -+ (byte)0x41, (byte)0x9B, (byte)0x14, (byte)0xC8, -+ (byte)0xE9, (byte)0x1F, (byte)0x24, (byte)0x1F, -+ (byte)0x65, (byte)0x8E, (byte)0xD3, (byte)0x85, -+ (byte)0xD0, (byte)0x68, (byte)0x6C, (byte)0xF1, -+ (byte)0x79, (byte)0x45, (byte)0xD0, (byte)0x06, -+ (byte)0xA4, (byte)0xB8, (byte)0xE0, (byte)0x64, -+ (byte)0xF5, (byte)0x38, (byte)0x72, (byte)0x97, -+ (byte)0x00, (byte)0x23, (byte)0x5F -+ }; -+} -+ ---- jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2013-09-06 11:29:18.000000000 -0700 -+++ jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -56,7 +56,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - ;; - ---- jdk/test/com/sun/jdi/JITDebug.sh 2013-09-06 11:29:18.000000000 -0700 -+++ jdk/test/com/sun/jdi/JITDebug.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -63,7 +63,7 @@ - OS=`uname -s` - export TRANSPORT_METHOD - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - TRANSPORT_METHOD=dt_socket - ;; ---- jdk/test/com/sun/jdi/PrivateTransportTest.sh 2013-09-06 11:29:18.000000000 -0700 -+++ jdk/test/com/sun/jdi/PrivateTransportTest.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -123,7 +123,7 @@ - esac - libloc=${jreloc}/lib/${libarch} - ;; -- Linux) -+ Linux | *BSD) - xx=`find ${jreloc}/lib -name libdt_socket.so` - libloc=`dirname ${xx}` - ;; ---- jdk/test/com/sun/jdi/ShellScaffold.sh 2013-09-06 11:29:19.000000000 -0700 -+++ jdk/test/com/sun/jdi/ShellScaffold.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -293,7 +293,7 @@ - psCmd=ps - jstack=jstack.exe - ;; -- SunOS | Linux | Darwin) -+ SunOS | Linux | *BSD | Darwin) - transport=dt_socket - address= - devnull=/dev/null ---- jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2013-09-06 11:29:19.000000000 -0700 -+++ jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -112,7 +112,7 @@ - fi - ;; ++import javax.swing.*; ++import java.awt.*; ++import java.awt.event.ActionEvent; ++import java.awt.event.ActionListener; ++import java.beans.*; ++import sun.awt.OSInfo; ++import sun.awt.SunToolkit; ++ ++ ++public class bug4251301 { ++ private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ static Test test = new Test(); ++ public static void main(String[] args) throws Exception { ++ if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) { ++ System.out.println("This test is not applicable for MacOS. Passed."); ++ return; ++ } ++ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); ++ } ++ }); ++ toolkit.realSync(); ++ test.waitTestResult(); ++ } ++ ++ public static void createAndShowGUI() { ++ final StringBuilder instructions = new StringBuilder(); ++ instructions.append("Click with your mouse the content area of the internal frame with the title \"IFrame\" "); ++ instructions.append("and press Ctrl+Space. \n"); ++ instructions.append("If the system menu shows up, press Esc. Then system menu should hide. \n"); ++ instructions.append("If you success then press \"Pass\", else press \"Fail\".\n"); ++ ++ JDesktopPane dp = new JDesktopPane(); ++ JInternalFrame jif = new JInternalFrame("IFrame",true,true,true,true); ++ dp.add(jif); ++ jif.setBounds(20, 20, 220, 100); ++ jif.setVisible(true); ++ try { ++ jif.setSelected(true); ++ } catch(PropertyVetoException pve) { ++ pve.printStackTrace(); ++ throw new Error("Occures PropertyVetoException while set selection..."); ++ } ++ JScrollPane dtScrollPane = new JScrollPane(dp); ++ JFrame testFrame = test.createTestFrame("Instructions", dtScrollPane, instructions.toString(), 500); ++ testFrame.setSize(500, 400); ++ testFrame.setVisible(true); ++ } ++ static class Test { ++ private boolean pass; ++ JFrame createTestFrame(String name, Component topComponent, String instructions, int instrHeight) { ++ final String PASS = "Pass"; ++ final String FAIL = "Fail"; ++ JFrame frame = new JFrame(name); ++ frame.setLayout(new BorderLayout()); ++ ++ JPanel testButtonsPanel = new JPanel(); ++ testButtonsPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 20)); ++ ++ ActionListener btnAL = new ActionListener() { ++ public void actionPerformed(ActionEvent event) { ++ switch (event.getActionCommand()) { ++ case PASS: ++ pass(); ++ break; ++ default: ++ throw new RuntimeException("Test failed."); ++ } ++ } ++ }; ++ JButton passBtn = new JButton(PASS); ++ passBtn.addActionListener(btnAL); ++ passBtn.setActionCommand(PASS); ++ ++ JButton failBtn = new JButton(FAIL); ++ failBtn.addActionListener(btnAL); ++ failBtn.setActionCommand(FAIL); ++ ++ testButtonsPanel.add(BorderLayout.WEST, passBtn); ++ testButtonsPanel.add(BorderLayout.EAST, failBtn); ++ ++ JTextArea instrText = new JTextArea(); ++ instrText.setLineWrap(true); ++ instrText.setEditable(false); ++ JScrollPane instrScrollPane = new JScrollPane(instrText); ++ instrScrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, instrHeight)); ++ instrText.append(instructions); ++ ++ JPanel servicePanel = new JPanel(); ++ servicePanel.setLayout(new BorderLayout()); ++ servicePanel.add(BorderLayout.CENTER, instrScrollPane); ++ servicePanel.add(BorderLayout.SOUTH, testButtonsPanel); ++ ++ frame.add(BorderLayout.SOUTH, servicePanel); ++ frame.add(BorderLayout.CENTER, topComponent); ++ return frame; ++ } ++ synchronized void pass() { ++ pass = true; ++ notifyAll(); ++ } ++ synchronized void waitTestResult() throws InterruptedException { ++ while (!pass) { ++ wait(); ++ } ++ } ++ } ++} +--- ./jdk/test/javax/swing/JInternalFrame/InternalFrameIsNotCollectedTest.java 2013-09-06 11:29:58.000000000 -0700 ++++ ./jdk/test/javax/swing/JInternalFrame/InternalFrameIsNotCollectedTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -27,19 +27,19 @@ + @author mcherkas + @run main InternalFrameIsNotCollectedTest + */ +- + import sun.awt.SunToolkit; -- Linux | Darwin ) -+ Linux | *BSD | Darwin ) - pass "This test always passes on $OS" - ;; + import javax.swing.*; + import java.awt.*; +-import java.awt.event.KeyEvent; + import java.beans.PropertyVetoException; + import java.util.Date; ---- jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2013-09-06 11:29:19.000000000 -0700 -+++ jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -45,7 +45,7 @@ + public class InternalFrameIsNotCollectedTest { - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - ;; - Windows* | CYGWIN*) ---- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2013-09-06 11:29:19.000000000 -0700 -+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -72,6 +72,16 @@ - done - } +- public static final int waitTime = 10000; ++ public static final int maxWaitTime = 100000; ++ public static final int waitTime = 5000; + private static Robot robot; ++ private static CustomInternalFrame iFrame; -+bsd_swap_size() -+{ -+ total_swap=0 -+ for i in `/usr/sbin/swapinfo -k | awk '{print $2}' | grep -v blocks` -+ do -+ # swapinfo -k returns size in kilobytes. -+ total_swap=`expr $i \* 1024 + $total_swap` -+ done -+} -+ - # Test GetTotalSwapSpaceSize if we are running on Unix - total_swap=0 - case `uname -s` in -@@ -83,6 +93,9 @@ - total_swap=`free -b | grep -i swap | awk '{print $2}'` - runOne GetTotalSwapSpaceSize $total_swap - ;; -+ *BSD ) -+ bsd_swap_size -+ runOne GetTotalSwapSpaceSize $total_swap - Darwin ) - # $ sysctl -n vm.swapusage - # total = 8192.00M used = 7471.11M free = 720.89M (encrypted) ---- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2013-09-06 11:29:19.000000000 -0700 -+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -48,7 +48,7 @@ + public static void sync() { - # Test GetMaxFileDescriptorCount if we are running on Unix - case `uname -s` in -- SunOS | Linux ) -+ SunOS | Linux | *BSD | Darwin ) - runOne GetMaxFileDescriptorCount - ;; - * ) ---- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2013-09-06 11:29:19.000000000 -0700 -+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -48,7 +48,7 @@ +@@ -62,12 +62,13 @@ + }); + sync(); + invokeGC(); ++ System.runFinalization(); + Thread.sleep(1000); // it's better to wait 1 sec now then 10 sec later + Date startWaiting = new Date(); + synchronized (CustomInternalFrame.waiter) { + // Sync with finalization thread. + Date now = new Date(); +- while (now.getTime() - startWaiting.getTime() < waitTime && !CustomInternalFrame.finalized) { ++ while (now.getTime() - startWaiting.getTime() < maxWaitTime && !CustomInternalFrame.finalized) { + CustomInternalFrame.waiter.wait(waitTime); + now = new Date(); + } +@@ -83,10 +84,8 @@ + } - # Test GetOpenFileDescriptorCount if we are running on Unix - case `uname -s` in -- SunOS | Linux ) -+ SunOS | Linux | *BSD | Darwin ) - runOne GetOpenFileDescriptorCount - ;; - * ) ---- jdk/test/com/sun/tools/attach/CommonSetup.sh 2013-09-06 11:29:21.000000000 -0700 -+++ jdk/test/com/sun/tools/attach/CommonSetup.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -36,7 +36,7 @@ + private static void closeInternalFrame() throws PropertyVetoException { +- robot.keyPress(KeyEvent.VK_CONTROL); +- robot.keyPress(KeyEvent.VK_F4); +- robot.keyRelease(KeyEvent.VK_F4); +- robot.keyRelease(KeyEvent.VK_CONTROL); ++ iFrame.setClosed(true); ++ iFrame = null; + } - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html 2013-09-06 11:29:21.000000000 -0700 -+++ jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html 2014-04-20 12:39:16.000000000 -0700 -@@ -1,6 +1,5 @@ - -- -+ - - Java 7 on mac os x only provides text clipboard formats - ---- jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java 2013-09-06 11:29:21.000000000 -0700 -+++ jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java 2014-04-20 12:39:16.000000000 -0700 -@@ -22,17 +22,10 @@ - */ + private static void initUI() { +@@ -96,7 +95,7 @@ + desktopPane.setDesktopManager(new DefaultDesktopManager()); + frame.getContentPane().add(desktopPane, BorderLayout.CENTER); - /* -- @test -- @bug 8005932 -- @summary Java 7 on mac os x only provides text clipboard formats -- @author mikhail.cherkasov@oracle.com -- @library ../../regtesthelpers -- @library ../../regtesthelpers/process -- @build Util -- @build ProcessResults ProcessCommunicator -- -- -- @run applet/othervm MissedHtmlAndRtfBug.html -+ This is a part of MissedHtmlAndRtfBug.html test. Do not add any JTREG tags here -+ bug 8005932 -+ summary Java 7 on mac os x only provides text clipboard formats -+ author mikhail.cherkasov@oracle.com - */ - import java.awt.*; - import java.awt.datatransfer.DataFlavor; ---- jdk/test/java/awt/Graphics2D/DrawString/DrawRotatedString.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/awt/Graphics2D/DrawString/DrawRotatedString.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,81 @@ +- CustomInternalFrame iFrame = new CustomInternalFrame("Dummy Frame"); ++ iFrame = new CustomInternalFrame("Dummy Frame"); + + iFrame.setSize(200, 200); + iFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); +--- ./jdk/test/javax/swing/JMenuBar/4750590/bug4750590.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JMenuBar/4750590/bug4750590.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,98 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61651,67 +109232,84 @@ + * questions. + */ + -+import java.awt.Color; -+import java.awt.Graphics2D; -+import java.awt.RenderingHints; -+import java.awt.image.BufferedImage; -+import java.io.File; -+import java.io.IOException; ++/* @test ++ @library ../../regtesthelpers ++ @build Util ++ @bug 4750590 8015597 ++ @summary SwingSet: Cannot change Themes using menu accelerators ++ @author Alexander Zuev ++ @run main bug4750590 ++ */ + -+import javax.imageio.ImageIO; ++import javax.swing.*; ++import java.awt.event.*; ++import java.awt.*; + -+/** -+ * @test -+ * @bug 7190349 -+ * @summary Verifies that we get correct direction, when draw rotated string. -+ * @author Sergey Bylokhov -+ * @run main/othervm DrawRotatedString -+ */ -+public final class DrawRotatedString { ++public class bug4750590 { + -+ private static final int SIZE = 500; ++ public static PassedListener pass = new PassedListener(); ++ public static volatile boolean passed = false; + -+ public static void main(final String[] args) throws IOException { -+ BufferedImage bi = createBufferedImage(true); -+ verify(bi); -+ bi = createBufferedImage(false); -+ verify(bi); -+ System.out.println("Passed"); -+ } ++ public static void main(String args[]) throws Throwable { + -+ private static void verify(BufferedImage bi) throws IOException { -+ for (int i = 0; i < SIZE; ++i) { -+ for (int j = 0; j < 99; ++j) { -+ //Text should not appear before 100 -+ if (bi.getRGB(i, j) != Color.RED.getRGB()) { -+ ImageIO.write(bi, "png", new File("image.png")); -+ throw new RuntimeException("Failed: wrong text location"); -+ } ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ createAndShowGUI(); + } ++ }); ++ ++ sun.awt.SunToolkit toolkit = (sun.awt.SunToolkit) Toolkit.getDefaultToolkit(); ++ toolkit.realSync(); ++ ++ Robot robo = new Robot(); ++ robo.setAutoDelay(500); ++ Util.hitMnemonics(robo, KeyEvent.VK_F); ++ robo.keyPress(KeyEvent.VK_M); ++ robo.keyRelease(KeyEvent.VK_M); ++ ++ toolkit.realSync(); ++ ++ if (passed) { ++ System.out.println("Test passed!"); ++ } else { ++ throw new RuntimeException("Test FAILED!"); + } + } + -+ private static BufferedImage createBufferedImage(final boolean aa) { -+ final BufferedImage bi = new BufferedImage(SIZE, SIZE, -+ BufferedImage.TYPE_INT_RGB); -+ final Graphics2D bg = bi.createGraphics(); -+ bg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, -+ aa ? RenderingHints.VALUE_ANTIALIAS_ON -+ : RenderingHints.VALUE_ANTIALIAS_OFF); -+ bg.setColor(Color.RED); -+ bg.fillRect(0, 0, SIZE, SIZE); -+ bg.translate(100, 100); -+ bg.rotate(Math.toRadians(90)); -+ bg.setColor(Color.BLACK); -+ bg.setFont(bg.getFont().deriveFont(20.0f)); -+ bg.drawString("MMMMMMMMMMMMMMMM", 0, 0); -+ bg.dispose(); -+ return bi; ++ private static void createAndShowGUI() { ++ JFrame mainFrame = new JFrame("Bug 4750590"); ++ JMenuBar mbar = new JMenuBar(); ++ JMenu menu = new JMenu("File"); ++ menu.setMnemonic('F'); ++ JMenu submenu = new JMenu("Submenu"); ++ submenu.add(new JMenuItem("SubMenu Item 1")).setMnemonic('S'); ++ submenu.add(new JMenuItem("SubMenu Item 2")); ++ menu.add(submenu); ++ ++ menu.add(new JMenuItem("Menu Item 1")); ++ JMenuItem menuItem = menu.add(new JMenuItem("Menu Item 2")); ++ menuItem.setMnemonic('M'); ++ menuItem.addActionListener(pass); ++ mbar.add(menu); ++ mainFrame.setJMenuBar(mbar); ++ ++ mainFrame.setSize(200, 200); ++ mainFrame.setLocation(200, 200); ++ mainFrame.setVisible(true); ++ mainFrame.toFront(); ++ } ++ ++ public static class PassedListener implements ActionListener { ++ public void actionPerformed(ActionEvent ev) { ++ passed = true; ++ } + } ++ +} ---- jdk/test/java/awt/Graphics2D/IncorrectTextSize/IncorrectTextSize.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/awt/Graphics2D/IncorrectTextSize/IncorrectTextSize.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,77 @@ +--- ./jdk/test/javax/swing/JMenuItem/4171437/bug4171437.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JMenuItem/4171437/bug4171437.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,108 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61734,84 +109332,450 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ ++/* @test ++ @bug 4171437 ++ @library ../../regtesthelpers ++ @build Util ++ @author Georges Saab ++ @run main bug4171437 ++*/ ++import java.awt.*; ++import java.awt.event.*; ++import java.util.ArrayList; ++import javax.swing.*; ++import javax.swing.event.*; ++import sun.awt.SunToolkit; + -+import java.awt.Color; -+import java.awt.Font; -+import java.awt.Graphics2D; -+import java.awt.image.BufferedImage; -+import java.io.File; -+import java.io.IOException; ++public class bug4171437 { ++ static volatile boolean closeActivated = false; ++ static volatile boolean customActivated = false; + -+import javax.imageio.ImageIO; ++ public static void main(String[] args) throws Exception { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); ++ } ++ }); + -+/** -+ * @test -+ * @bug 8013569 -+ * @author Sergey Bylokhov ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ toolkit.realSync(); ++ ++ Robot robot = new Robot(); ++ robot.setAutoDelay(50); ++ ++ Util.hitMnemonics(robot, KeyEvent.VK_F); ++ Util.hitKeys(robot, KeyEvent.VK_C); ++ ++ toolkit.realSync(); ++ Thread.sleep(1000); ++ ++ if (!closeActivated || customActivated) { ++ throw new RuntimeException("Didn't pass the muster"); ++ } ++ } ++ public static void createAndShowGUI() { ++ JMenuBar menubar = new JMenuBar(); ++ ++ JMenu fileMenu = new JMenu("File"); ++ fileMenu.setMnemonic('f'); ++ ++ JMenuItem fmi1 = new JMenuItem(); ++ fmi1 = new JMenuItem("Open"); ++ JMenuItem fmi2 = new JMenuItem(); ++ fmi2 = new JMenuItem("Close"); ++ fmi2.setMnemonic('c'); ++ fmi2.addActionListener(new ActionListener() { ++ public void actionPerformed(ActionEvent e) { ++ closeActivated = true; ++ } ++ }); ++ ++ fileMenu.add( fmi1); ++ fileMenu.add( fmi2); ++ ++ menubar.add( fileMenu); ++ ++ JMenu custom = new JMenu("Custom"); ++ custom.setMnemonic('c'); ++ JMenuItem cmi = new JMenuItem(); ++ cmi = new JMenuItem("Properties"); ++ cmi.setMnemonic('p'); ++ custom.add( cmi); ++ custom.addMenuListener(new MenuListener() { ++ public void menuSelected(MenuEvent e) { ++ customActivated = true; ++ } ++ public void menuDeselected(MenuEvent e) {} ++ public void menuCanceled(MenuEvent e) {} ++ }); ++ menubar.add( custom); ++ ++ JFrame frame = new JFrame(); ++ frame.setJMenuBar( menubar); ++ frame.setSize(300, 300); ++ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ frame.pack(); ++ frame.setVisible(true); ++ } ++} +--- ./jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 2013-09-06 11:29:58.000000000 -0700 ++++ ./jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java 2014-06-06 19:56:30.000000000 -0700 +@@ -35,11 +35,12 @@ + import javax.swing.*; + + public class ActionListenerCalledTwiceTest { +- static String menuItems[] = { "Item1", "Item2", "Item3" }; ++ static String menuItems[] = { "Item1", "Item2", "Item3", "Item4" }; + static KeyStroke keyStrokes[] = { + KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.META_MASK), + KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), + KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.SHIFT_MASK), ++ KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.META_MASK) + }; + + static volatile int listenerCallCounter = 0; +--- ./jdk/test/javax/swing/JPopupMenu/4458079/bug4458079.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JPopupMenu/4458079/bug4458079.java 2014-06-06 19:56:30.000000000 -0700 +@@ -0,0 +1,110 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. + */ -+public final class IncorrectTextSize { ++/* @test ++ @bug 4458079 ++ @library ../../regtesthelpers ++ @build Util ++ @summary Tests calling removeAll() from PopupMenuListener ++ @author Peter Zhelezniakov ++ @run main bug4458079 ++*/ ++import java.awt.Robot; ++import java.awt.Toolkit; ++import java.awt.event.*; ++import javax.swing.*; ++import javax.swing.event.*; ++import java.awt.event.KeyEvent; ++import java.util.ArrayList; ++import sun.awt.SunToolkit; + -+ static final int scale = 2; -+ static final int width = 1200; -+ static final int height = 100; -+ static BufferedImage bi = new BufferedImage(width, height, -+ BufferedImage.TYPE_INT_ARGB); -+ static final String TEXT = "The quick brown fox jumps over the lazy dog" -+ + "The quick brown fox jumps over the lazy dog"; ++public class bug4458079 extends JFrame implements PopupMenuListener { ++ public JMenu menu; + -+ public static void main(final String[] args) throws IOException { -+ for (int point = 5; point < 11; ++point) { -+ Graphics2D g2d = bi.createGraphics(); -+ g2d.setFont(new Font(Font.DIALOG, Font.PLAIN, point)); -+ g2d.scale(scale, scale); -+ g2d.setColor(Color.WHITE); -+ g2d.fillRect(0, 0, width, height); -+ g2d.setColor(Color.green); -+ g2d.drawString(TEXT, 0, 20); -+ int length = g2d.getFontMetrics().stringWidth(TEXT); -+ if (length < 0) { -+ throw new RuntimeException("Negative length"); ++ static volatile boolean itemASelected = false; ++ public static void main(String[] args) throws Exception { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ new bug4458079().createAndShowGUI(); + } -+ for (int i = (length + 1) * scale; i < width; ++i) { -+ for (int j = 0; j < height; ++j) { -+ if (bi.getRGB(i, j) != Color.white.getRGB()) { -+ g2d.drawLine(length, 0, length, height); -+ ImageIO.write(bi, "png", new File("image.png")); -+ System.out.println("length = " + length); -+ System.err.println("Wrong color at x=" + i + ",y=" + j); -+ System.err.println("Color is:" + new Color(bi.getRGB(i, -+ j))); -+ throw new RuntimeException("Test failed."); -+ } ++ }); ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ toolkit.realSync(); ++ ++ Robot robot = new Robot(); ++ robot.setAutoDelay(50); ++ ++ Util.hitMnemonics(robot, KeyEvent.VK_M); ++ ++ toolkit.realSync(); ++ Thread.sleep(1000); ++ ++ Util.hitKeys(robot, KeyEvent.VK_DOWN); ++ Util.hitKeys(robot, KeyEvent.VK_ENTER); ++ ++ toolkit.realSync(); ++ Thread.sleep(1000); ++ ++ if (!itemASelected) { ++ throw new RuntimeException("Test failed: arrow key traversal in JMenu broken!"); ++ } ++ } ++ public void createAndShowGUI() { ++ JMenuBar bar = new JMenuBar(); ++ menu = new JMenu("Menu"); ++ menu.add(new JMenuItem("1")); ++ menu.add(new JMenuItem("2")); ++ menu.setMnemonic(KeyEvent.VK_M); ++ menu.getPopupMenu().addPopupMenuListener(this); ++ bar.add(menu); ++ ++ setJMenuBar(bar); ++ getContentPane().add(new JButton("")); ++ setSize(300, 300); ++ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ pack(); ++ setVisible(true); ++ } ++ ++ public void rebuildMenu() { ++ menu.removeAll(); ++ final String itemCommand = "A"; ++ JMenuItem item = new JMenuItem(itemCommand); ++ item.addActionListener(new ActionListener() { ++ public void actionPerformed(ActionEvent e) { ++ JMenuItem item = ((JMenuItem)e.getSource()); ++ if (e.getActionCommand() == itemCommand) { ++ itemASelected = true; + } + } -+ g2d.dispose(); ++ }); ++ menu.add(item); ++ menu.add(new JMenuItem("B")); ++ } ++ ++ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { ++ rebuildMenu(); ++ } ++ ++ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {} ++ public void popupMenuCanceled(PopupMenuEvent e) {} ++} +--- ./jdk/test/javax/swing/JSplitPane/4816114/bug4816114.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JSplitPane/4816114/bug4816114.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,151 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 4816114 ++ @summary REGRESSION: Regression in divider location behavior when JSplitPane is resized ++ @author Andrey Pikalev ++ @run main bug4816114 ++*/ ++ ++import javax.swing.*; ++import java.awt.*; ++import java.lang.reflect.*; ++import sun.awt.SunToolkit; ++ ++ ++public class bug4816114 { ++ ++ JFrame fr; ++ JSplitPane splitPane; ++ ++ boolean[] resized = new boolean[] { false, false, false, ++ false, false, false }; ++ static int step = 0; ++ boolean h_passed = false; ++ boolean v_passed = false; ++ ++ static bug4816114 test = new bug4816114(); ++ ++ public static void main(String[] args) throws InterruptedException, InvocationTargetException { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ test.createAndShowGUI(); ++ } ++ }); ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ toolkit.realSync(); ++ Thread.sleep(1000); ++ ++ step++; ++ test.doTest(150, 300); ++ ++ step++; ++ test.doTest(650, 300); ++ ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ test.splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); ++ } ++ }); ++ ++ step++; ++ test.doTest(300, 650); ++ ++ step++; ++ test.doTest(300, 150); ++ ++ step++; ++ test.doTest(300, 650); ++ ++ if ( !test.isPassed() ) { ++ throw new Error("The divider location is wrong."); ++ } ++ } ++ public void createAndShowGUI() { ++ fr = new JFrame("Test"); ++ ++ splitPane = new TestSplitPane(); ++ splitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT); ++ splitPane.setResizeWeight(0); ++ splitPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); ++ ++ JButton leftButton = new JButton("LEFT"); ++ leftButton.setPreferredSize(new Dimension(300, 300)); ++ leftButton.setMinimumSize(new Dimension(150, 150)); ++ splitPane.setLeftComponent(leftButton); ++ ++ JButton rightButton = new JButton("RIGHT"); ++ rightButton.setPreferredSize(new Dimension(300, 300)); ++ rightButton.setMinimumSize(new Dimension(150, 150)); ++ splitPane.setRightComponent(rightButton); ++ ++ fr.getContentPane().add(splitPane, BorderLayout.CENTER); ++ ++ fr.pack(); ++ fr.setVisible(true); ++ } ++ ++ void doTest(final int width, final int height) throws InterruptedException, InvocationTargetException { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ splitPane.setPreferredSize(new Dimension(width, height)); ++ fr.pack(); ++ } ++ }); ++ ++ synchronized (bug4816114.this) { ++ while (!resized[step]) { ++ bug4816114.this.wait(); ++ } ++ } ++ } ++ ++ synchronized void setPassed(int orientation, boolean passed) { ++ if (orientation == JSplitPane.HORIZONTAL_SPLIT) { ++ this.h_passed = passed; ++ } ++ else { ++ this.v_passed = passed; ++ } ++ } ++ ++ synchronized boolean isPassed() { ++ return h_passed && v_passed; ++ } ++ ++ ++ class TestSplitPane extends JSplitPane { ++ public void setDividerLocation(int location) { ++ super.setDividerLocation(location); ++ ++ if ( splitPane.getDividerLocation() == 151 ) { ++ setPassed(getOrientation(), true); ++ } ++ ++ synchronized (bug4816114.this) { ++ resized[step] = true; ++ bug4816114.this.notifyAll(); ++ } + } + } +} ---- jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2013-09-06 11:29:24.000000000 -0700 -+++ jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -25,10 +25,11 @@ - fi +--- ./jdk/test/javax/swing/JTable/7068740/bug7068740.java 2013-09-06 11:29:59.000000000 -0700 ++++ ./jdk/test/javax/swing/JTable/7068740/bug7068740.java 2014-06-06 19:56:31.000000000 -0700 +@@ -37,6 +37,7 @@ + import java.awt.*; + import java.awt.event.KeyEvent; + import java.lang.reflect.InvocationTargetException; ++import java.util.concurrent.atomic.AtomicInteger; + public class bug7068740 extends JFrame { --if [ $OS = SunOS -o $OS = Linux ] --then -- exit 0 --fi -+case "${OS}" in -+ SunOS | Linux | *BSD | Darwin ) -+ exit 0 -+ ;; -+esac - # Windows +@@ -66,6 +67,7 @@ + }; - if [ -z "${TESTJAVA}" ] ; then ---- jdk/test/java/awt/Toolkit/LoadAWTCrashTest/LoadAWTCrashTest.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/awt/Toolkit/LoadAWTCrashTest/LoadAWTCrashTest.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,37 @@ + table = new JTable(model); ++ table.setRowSelectionInterval(0, 0); + LayerUI layerUI = new LayerUI<>(); + JLayer layer = new JLayer<>(table, layerUI); + JScrollPane scrollPane = new JScrollPane(layer); +@@ -78,7 +80,7 @@ + try { + if (robot == null) { + robot = new Robot(); +- robot.setAutoDelay(20); ++ robot.setAutoDelay(50); + } + + if (toolkit == null) { +@@ -104,24 +106,37 @@ + } + } + +- private static void doTest() { ++ private static int getSelectedRow() throws Exception { ++ final AtomicInteger row = new AtomicInteger(-1); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ row.set(table.getSelectedRow()); ++ } ++ }); ++ return row.intValue(); ++ } ++ ++ private static void doTest() throws Exception { + toolkit.realSync(); +- table.setRowSelectionInterval(0, 0); + + robot.keyPress(KeyEvent.VK_PAGE_DOWN); ++ robot.keyRelease(KeyEvent.VK_PAGE_DOWN); + toolkit.realSync(); +- if (table.getSelectedRow() != 19) { ++ ++ if (getSelectedRow() != 19) { + throw new RuntimeException("Test failed"); + } + + robot.keyPress(KeyEvent.VK_PAGE_UP); ++ robot.keyRelease(KeyEvent.VK_PAGE_UP); + toolkit.realSync(); +- if (table.getSelectedRow() != 0) { ++ if (getSelectedRow() != 0) { + throw new RuntimeException("Test failed"); + } + } + +- public static void main(String[] args) { ++ public static void main(String[] args) throws Exception { + try { + UIManager.setLookAndFeel(new MetalLookAndFeel()); + setUp(); +--- ./jdk/test/javax/swing/JTree/4927934/bug4927934.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/JTree/4927934/bug4927934.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,247 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it @@ -61832,46 +109796,236 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ -+ -+/* -+ @test -+ @bug 8031477 -+ @summary Crash while awt starting -+ @author Petr Pchelko -+ @run main/othervm LoadAWTCrashTest ++/* @test ++ @bug 4927934 ++ @summary JTree traversal is unlike Native windows tree traversal ++ @author Andrey Pikalev ++ @run main bug4927934 +*/ + -+public class LoadAWTCrashTest { -+ public static void main(String[] args) { -+ System.loadLibrary("awt"); -+ // If the bug is present JVM would crash or deadlock ++import javax.swing.*; ++import javax.swing.event.*; ++import javax.swing.tree.*; ++import java.awt.*; ++import java.awt.event.*; ++import java.lang.reflect.InvocationTargetException; ++import sun.awt.*; ++ ++public class bug4927934 implements TreeSelectionListener, TreeExpansionListener, FocusListener { ++ ++ final static Object listener = new bug4927934(); ++ ++ static boolean focusGained = false; ++ public static boolean selectionChanged = false; ++ public static boolean treeExpanded = false; ++ public static boolean treeCollapsed = false; ++ ++ static JFrame frame; ++ static JTree tree; ++ static Robot robot; ++ ++ public static void main(String args[]) throws Exception { ++ UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel()); ++ ++ robot = new Robot(); ++ robot.setAutoDelay(50); ++ ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ frame = new JFrame(); ++ ++ DefaultMutableTreeNode root = new DefaultMutableTreeNode("root"); ++ createNodes(root); ++ tree = new JTree(root); ++ JScrollPane scrollPane = new JScrollPane(tree); ++ frame.getContentPane().add(scrollPane); ++ ++ tree.addFocusListener((FocusListener)listener); ++ tree.addTreeSelectionListener((TreeSelectionListener)listener); ++ tree.addTreeExpansionListener((TreeExpansionListener)listener); ++ ++ frame.setSize(300, 300); ++ frame.setVisible(true); ++ } ++ }); ++ ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ toolkit.realSync(); ++ Thread.sleep(1000); ++ ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ tree.requestFocus(); ++ } ++ }); ++ ++ synchronized(listener) { ++ if (!focusGained) { ++ System.out.println("waiting focusGained..."); ++ try { ++ listener.wait(10000); ++ } catch (InterruptedException e) { ++ e.printStackTrace(); ++ } ++ } ++ } ++ ++ // GO TO RIGHT ++ selectionChanged = false; ++ hitKey(KeyEvent.VK_RIGHT); ++ toolkit.realSync(); ++ if (!checkSelectionChanged(tree, 0)) { ++ throw new RuntimeException("Root should be selected"); ++ } ++ ++ selectionChanged = false; ++ hitKey(KeyEvent.VK_RIGHT); ++ toolkit.realSync(); ++ if (!checkSelectionChanged(tree, 1)) { ++ throw new RuntimeException("Node should be selected"); ++ } ++ ++ treeExpanded = false; ++ hitKey(KeyEvent.VK_RIGHT); ++ toolkit.realSync(); ++ if (!isTreeExpanded()) { ++ throw new RuntimeException("Node should be expanded"); ++ } ++ ++ selectionChanged = false; ++ hitKey(KeyEvent.VK_RIGHT); ++ toolkit.realSync(); ++ if (!checkSelectionChanged(tree, 2)) { ++ throw new RuntimeException("Leaf1 should be selected"); ++ } ++ ++ selectionChanged = false; ++ hitKey(KeyEvent.VK_RIGHT); ++ toolkit.realSync(); ++ if (!checkSelectionChanged(tree, 2)) { ++ throw new RuntimeException("Leaf1 should be selected"); ++ } ++ ++ // GO TO LEFT ++ selectionChanged = false; ++ hitKey(KeyEvent.VK_LEFT); ++ toolkit.realSync(); ++ if (!checkSelectionChanged(tree, 1)) { ++ throw new RuntimeException("Node should be selected"); ++ } ++ ++ treeCollapsed = false; ++ hitKey(KeyEvent.VK_LEFT); ++ if (!isTreeCollapsed()) { ++ throw new RuntimeException("Node should be collapsed"); ++ } ++ ++ selectionChanged = false; ++ hitKey(KeyEvent.VK_LEFT); ++ toolkit.realSync(); ++ if (!checkSelectionChanged(tree, 0)) { ++ throw new RuntimeException("Root should be selected"); ++ } ++ ++ treeCollapsed = false; ++ hitKey(KeyEvent.VK_LEFT); ++ toolkit.realSync(); ++ if (!isTreeCollapsed()) { ++ throw new RuntimeException("Root should be collapsed"); ++ } ++ } ++ ++ ++ synchronized public void focusLost(FocusEvent e) { ++ } ++ ++ synchronized public void focusGained(FocusEvent e) { ++ focusGained = true; ++ System.out.println("focusGained"); ++ listener.notifyAll(); ++ } ++ ++ private static void createNodes(DefaultMutableTreeNode root) { ++ DefaultMutableTreeNode node = new DefaultMutableTreeNode("Node"); ++ node.add(new DefaultMutableTreeNode("Leaf1")); ++ node.add(new DefaultMutableTreeNode("Leaf2")); ++ root.add(node); ++ root.add(new DefaultMutableTreeNode("Leaf3")); ++ } ++ ++ synchronized public void valueChanged(TreeSelectionEvent e) { ++ selectionChanged = true; ++ System.out.println("selectionChanged"); ++ notifyAll(); ++ } ++ ++ synchronized public void treeCollapsed(TreeExpansionEvent e) { ++ System.out.println("treeCollapsed"); ++ treeCollapsed = true; ++ notifyAll(); ++ } ++ ++ synchronized public void treeExpanded(TreeExpansionEvent e) { ++ System.out.println("treeExpanded"); ++ treeExpanded = true; ++ notifyAll(); ++ } ++ ++ private static void hitKey(int key) { ++ System.out.println("key " + key + " pressed"); ++ robot.keyPress(key); ++ robot.keyRelease(key); ++ } ++ ++ private static boolean checkSelectionChanged(JTree tree, int shouldBeSel) { ++ synchronized(listener) { ++ if (!selectionChanged) { ++ System.out.println("waiting for selectionChanged..."); ++ try { ++ listener.wait(5000); ++ } catch (InterruptedException e) { ++ e.printStackTrace(); ++ } ++ } ++ } ++ int selRow = tree.getLeadSelectionRow(); ++ System.out.println("Selected row: " + selRow); ++ return selRow == shouldBeSel; ++ } ++ ++ private static boolean isTreeExpanded() { ++ synchronized(listener) { ++ if (!treeExpanded) { ++ System.out.println("waiting for treeExpanded..."); ++ try { ++ listener.wait(5000); ++ } catch (InterruptedException e) { ++ e.printStackTrace(); ++ } ++ } ++ } ++ return treeExpanded; ++ } ++ ++ private static boolean isTreeCollapsed() { ++ synchronized(listener) { ++ if (!treeCollapsed) { ++ System.out.println("waiting for treeCollapsed..."); ++ try { ++ listener.wait(5000); ++ } catch (InterruptedException e) { ++ e.printStackTrace(); ++ } ++ } ++ } ++ return treeCollapsed; + } +} ---- jdk/test/java/awt/event/KeyEvent/KeyReleasedInAppletTest/KeyReleasedInAppletTest.java 2013-09-06 11:29:24.000000000 -0700 -+++ jdk/test/java/awt/event/KeyEvent/KeyReleasedInAppletTest/KeyReleasedInAppletTest.java 2014-04-20 12:39:16.000000000 -0700 -@@ -39,13 +39,10 @@ - import java.util.Hashtable; - - /* --@test --@bug 8010009 --@summary [macosx] Unable type into online word games on MacOSX --@author petr.pchelko : area=awt.keyboard --@run clean * --@run build TestApplet --@run applet/manual=yesno KeyReleasedInAppletTest.html -+ This is a part of test KeyReleasedInAppletTest.html. Do not add any JTREG tags here -+ bug 8010009 -+ summary [macosx] Unable type into online word games on MacOSX -+ author petr.pchelko : area=awt.keyboard - */ - - public class KeyReleasedInAppletTest extends JApplet { ---- jdk/test/java/awt/font/TextLayout/TestAATMorxFont.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/awt/font/TextLayout/TestAATMorxFont.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,86 @@ +--- ./jdk/test/javax/swing/Popup/TaskbarPositionTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/Popup/TaskbarPositionTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,340 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it @@ -61891,304 +110045,328 @@ + * 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 verify rendering of MORX fonts on OS X. -+ * @bug 8031462 ++import java.awt.*; ++import java.awt.event.*; ++import javax.swing.*; ++import javax.swing.event.*; ++ ++/** ++ * @test @bug 4245587 4474813 4425878 4767478 8015599 ++ * @author Mark Davidson ++ * @summary Tests the location of the heavy weight popup portion of JComboBox, ++ * JMenu and JPopupMenu. ++ * @library ../regtesthelpers ++ * @build Util ++ * @run main TaskbarPositionTest + */ ++public class TaskbarPositionTest extends JFrame implements ActionListener { ++ ++ private boolean done; ++ private Throwable error; ++ private static TaskbarPositionTest test; ++ private static JPopupMenu popupMenu; ++ private static JPanel panel; ++ private static JComboBox combo1; ++ private static JComboBox combo2; ++ private static JMenuBar menubar; ++ private static JMenu menu1; ++ private static JMenu menu2; ++ private static Rectangle fullScreenBounds; ++ // The usable desktop space: screen size - screen insets. ++ private static Rectangle screenBounds; ++ private static String[] numData = { ++ "One", "Two", "Three", "Four", "Five", "Six", "Seven" ++ }; ++ private static String[] dayData = { ++ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ++ }; ++ private static char[] mnDayData = { ++ 'M', 'T', 'W', 'R', 'F', 'S', 'U' ++ }; + -+import javax.swing.*; -+import javax.swing.border.LineBorder; -+import java.awt.*; -+import java.awt.event.ActionEvent; ++ public TaskbarPositionTest() { ++ super("Use CTRL-down to show a JPopupMenu"); ++ setContentPane(panel = createContentPane()); ++ setJMenuBar(createMenuBar("1 - First Menu", true)); ++ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ ++ // CTRL-down will show the popup. ++ panel.getInputMap().put(KeyStroke.getKeyStroke( ++ KeyEvent.VK_DOWN, InputEvent.CTRL_MASK), "OPEN_POPUP"); ++ panel.getActionMap().put("OPEN_POPUP", new PopupHandler()); ++ ++ pack(); ++ ++ Toolkit toolkit = Toolkit.getDefaultToolkit(); ++ fullScreenBounds = new Rectangle(new Point(), toolkit.getScreenSize()); ++ screenBounds = new Rectangle(new Point(), toolkit.getScreenSize()); ++ ++ // Place the frame near the bottom. This is a pretty wild guess. ++ this.setLocation(0, (int) screenBounds.getHeight() - 2 * this.getHeight()); ++ ++ // Reduce the screen bounds by the insets. ++ GraphicsConfiguration gc = this.getGraphicsConfiguration(); ++ if (gc != null) { ++ Insets screenInsets = toolkit.getScreenInsets(gc); ++ screenBounds = gc.getBounds(); ++ screenBounds.width -= (screenInsets.left + screenInsets.right); ++ screenBounds.height -= (screenInsets.top + screenInsets.bottom); ++ screenBounds.x += screenInsets.left; ++ screenBounds.y += screenInsets.top; ++ } + -+public class TestAATMorxFont extends JComponent { -+ public static void main(String[] args) { -+ String osName = System.getProperty("os.name"); -+ System.out.println("OS is " + osName); -+ osName = osName.toLowerCase(); -+ if (!osName.startsWith("mac")) { -+ return; ++ setVisible(true); ++ } ++ ++ public static class ComboPopupCheckListener implements PopupMenuListener { ++ ++ public void popupMenuCanceled(PopupMenuEvent ev) { + } -+ SwingUtilities.invokeLater(new Runnable() { -+ public void run() { -+ JFrame frame = new JFrame("Test Morx"); -+ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); -+ TestAATMorxFont panel = new TestAATMorxFont(); -+ frame.add(panel); -+ frame.pack(); -+ frame.setVisible(true); ++ ++ public void popupMenuWillBecomeVisible(PopupMenuEvent ev) { ++ } ++ ++ public void popupMenuWillBecomeInvisible(PopupMenuEvent ev) { ++ Point cpos = combo1.getLocation(); ++ SwingUtilities.convertPointToScreen(cpos, panel); ++ ++ JPopupMenu pm = (JPopupMenu) combo1.getUI().getAccessibleChild(combo1, 0); ++ ++ if (pm != null) { ++ Point p = pm.getLocation(); ++ SwingUtilities.convertPointToScreen(p, pm); ++ if (p.y < cpos.y) { ++ throw new RuntimeException("ComboBox popup is wrongly aligned"); ++ } // check that popup was opened down + } -+ }); ++ } + } + -+ public Dimension getPreferredSize() { -+ return new Dimension(1200, 400); ++ private class PopupHandler extends AbstractAction { ++ ++ public void actionPerformed(ActionEvent e) { ++ if (!popupMenu.isVisible()) { ++ popupMenu.show((Component) e.getSource(), 40, 40); ++ } ++ isPopupOnScreen(popupMenu, fullScreenBounds); ++ } + } + -+ public void paintComponent(Graphics g) { -+ Graphics2D g2d = (Graphics2D)g; -+ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, -+ RenderingHints.VALUE_TEXT_ANTIALIAS_ON); -+ int y = 50; -+ g.setFont(new Font("Gujarati MT", Font.PLAIN, 40)); -+ System.out.println(g.getFont()); -+ g.drawString("\u0A95\u0ACD \u0A95\u0A95\u0A95 \u0A95\u0ACD\u0A95\u0ACD\u0A95", 20, y); -+ y += 50; -+ g.setFont(new Font("Tamil Sangam MN", Font.PLAIN, 40)); -+ System.out.println(g.getFont()); -+ g.drawString("\u0b95\u0bCD \u0b95\u0b95\u0b95 \u0b95\u0bCD\u0b95\u0bCD\u0b95", 20, y); -+ y += 50; -+ g.setFont(new Font("Telugu Sangam MN", Font.PLAIN, 40)); -+ System.out.println(g.getFont()); -+ g.drawString("\u0c15\u0c4D \u0c15\u0c15\u0c15 \u0c15\u0c4D\u0c15\u0c4D\u0c15", 20, y); -+ y += 50; -+ g.setFont(new Font("Devanagari Sangam MN", Font.PLAIN, 40)); -+ System.out.println(g.getFont()); -+ g.drawString("\u0915\u0940 \u0915\u0947 \u0915\u0942", 20, y); -+ y += 50; -+ g.drawString("\u0907\u0930\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915", 20, y); -+ y += 50; -+ g.drawString("\u0930\u093F\u0935\u094D\u092F\u0942 \u0915\u0947 \u092C\u093E\u0926 \u0935\u093F\u0915\u093E\u0938 \u0913\u0932\u0902\u092A\u093F\u0915 \u0938\u0947 \u092C\u093E\u0939\u0930 (\u0926\u0947\u0935\u0928\u093E\u0917\u0930\u0940) (\u0939\u093F\u0928\u094D\u0926\u0940) \u0907\u0930\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915\u094D\u0915", 20, y); ++ class PopupListener extends MouseAdapter { ++ ++ private JPopupMenu popup; ++ ++ public PopupListener(JPopupMenu popup) { ++ this.popup = popup; ++ } ++ ++ public void mousePressed(MouseEvent e) { ++ maybeShowPopup(e); ++ } ++ ++ public void mouseReleased(MouseEvent e) { ++ maybeShowPopup(e); ++ } + ++ private void maybeShowPopup(MouseEvent e) { ++ if (e.isPopupTrigger()) { ++ popup.show(e.getComponent(), e.getX(), e.getY()); ++ isPopupOnScreen(popup, fullScreenBounds); ++ } ++ } + } -+} + ---- jdk/test/java/beans/Introspector/TestTypeResolver.java 2013-09-06 11:29:26.000000000 -0700 -+++ jdk/test/java/beans/Introspector/TestTypeResolver.java 2014-04-20 12:39:16.000000000 -0700 -@@ -113,6 +113,8 @@ - // by private implementations of the various Type interfaces - if (expect.equals(t) && t.equals(expect)) - System.out.println(", as expected"); -+ else if ((expect.equals(t) || t.equals(expect)) && expect.toString().equals(t.toString())) -+ System.out.println(", as workaround of the 8023301 bug"); - else { - System.out.println(" BUT SHOULD BE " + expect); - failedCases.add(c); ---- jdk/test/java/io/File/GetXSpace.sh 2013-09-06 11:29:29.000000000 -0700 -+++ jdk/test/java/io/File/GetXSpace.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -26,7 +26,7 @@ - # set platform-dependent variable - OS=`uname -s` - case "$OS" in -- SunOS | Linux ) TMP=/tmp ;; -+ SunOS | Linux | *BSD | Darwin ) TMP=/tmp ;; - Windows_98 ) return ;; - Windows* ) SID=`sid`; TMP="c:/temp" ;; - * ) ---- jdk/test/java/io/File/createTempFile/SpecialTempFile.java 2013-09-06 11:29:29.000000000 -0700 -+++ jdk/test/java/io/File/createTempFile/SpecialTempFile.java 2014-04-20 12:39:16.000000000 -0700 -@@ -23,7 +23,7 @@ - - /* - * @test -- * @bug 8013827 8011950 -+ * @bug 8013827 8011950 8025128 - * @summary Check whether File.createTempFile can handle special parameters - * on Windows platforms - * @author Dan Xu -@@ -34,7 +34,9 @@ - - public class SpecialTempFile { - -- private static void test(String name, String[] prefix, String[] suffix) { -+ private static void test(String name, String[] prefix, String[] suffix, -+ boolean expectedException) throws IOException -+ { - if (prefix == null || suffix == null - || prefix.length != suffix.length) - { -@@ -42,39 +44,59 @@ - } - - final String exceptionMsg = "Unable to create temporary file"; -- final String errMsg = "IOException is expected"; - - for (int i = 0; i < prefix.length; i++) { - boolean exceptionThrown = false; - File f = null; -- System.out.println("In test " + name -- + ", creating temp file with prefix, " -- + prefix[i] + ", suffix, " + suffix[i]); -- try { -- f = File.createTempFile(prefix[i], suffix[i]); -- } catch (IOException e) { -- if (exceptionMsg.equals(e.getMessage())) -- exceptionThrown = true; -- else -- System.out.println("Wrong error message:" + e.getMessage()); ++ /** ++ * Tests if the popup is on the screen. ++ */ ++ public static void isPopupOnScreen(JPopupMenu popup, Rectangle checkBounds) { ++ Dimension dim = popup.getSize(); ++ Point pt = new Point(); ++ SwingUtilities.convertPointToScreen(pt, popup); ++ Rectangle bounds = new Rectangle(pt, dim); ++ ++ if (!SwingUtilities.isRectangleContainingRectangle(checkBounds, bounds)) { ++ throw new RuntimeException("We do not match! " + checkBounds + " / " + bounds); ++ } + -+ String[] dirs = { null, "." }; ++ } + -+ for (String dir : dirs ) { -+ System.out.println("In test " + name + -+ ", creating temp file with prefix, " + -+ prefix[i] + ", suffix, " + suffix[i] + -+ ", in dir, " + dir); ++ private JPanel createContentPane() { ++ JPanel panel = new JPanel(); ++ ++ combo1 = new JComboBox<>(numData); ++ panel.add(combo1); ++ combo2 = new JComboBox<>(dayData); ++ combo2.setEditable(true); ++ panel.add(combo2); ++ panel.setSize(300, 200); ++ ++ popupMenu = new JPopupMenu(); ++ JMenuItem item; ++ for (int i = 0; i < dayData.length; i++) { ++ item = popupMenu.add(new JMenuItem(dayData[i], mnDayData[i])); ++ item.addActionListener(this); ++ } ++ panel.addMouseListener(new PopupListener(popupMenu)); + -+ try { -+ if (dir == null || dir.isEmpty()) -+ f = File.createTempFile(prefix[i], suffix[i]); -+ else -+ f = File.createTempFile(prefix[i], suffix[i], new File(dir)); -+ } catch (IOException e) { -+ if (expectedException) { -+ if (e.getMessage().startsWith(exceptionMsg)) -+ exceptionThrown = true; -+ else -+ System.out.println("Wrong error message:" + -+ e.getMessage()); -+ } else { -+ throw e; -+ } -+ } ++ JTextField field = new JTextField("CTRL+down for Popup"); ++ // CTRL-down will show the popup. ++ field.getInputMap().put(KeyStroke.getKeyStroke( ++ KeyEvent.VK_DOWN, InputEvent.CTRL_MASK), "OPEN_POPUP"); ++ field.getActionMap().put("OPEN_POPUP", new PopupHandler()); + -+ if (expectedException && (!exceptionThrown || f != null)) -+ throw new RuntimeException("IOException is expected"); - } -- if (!exceptionThrown || f != null) -- throw new RuntimeException(errMsg); - } - } - - public static void main(String[] args) throws Exception { -+ // Test JDK-8025128 -+ String[] goodPre = { "///..///", "/foo" }; -+ String[] goodSuf = { ".temp", ".tmp" }; -+ test("goodName", goodPre, goodSuf, false); ++ panel.add(field); + -+ // Test JDK-8011950 -+ String[] slashPre = { "temp", "///..///", "/foo" }; -+ String[] slashSuf = { "///..///..", "///..///..", "///..///.." }; -+ test("SlashedName", slashPre, slashSuf, true); ++ return panel; ++ } + - if (!System.getProperty("os.name").startsWith("Windows")) - return; - - // Test JDK-8013827 - String[] resvPre = { "LPT1.package.zip", "com7.4.package.zip" }; - String[] resvSuf = { ".temp", ".temp" }; -- test("ReservedName", resvPre, resvSuf); -- -- // Test JDK-8011950 -- String[] slashPre = { "///..///", "temp", "///..///" }; -- String[] slashSuf = { ".temp", "///..///..", "///..///.." }; -- test("SlashedName", slashPre, slashSuf); -+ test("ReservedName", resvPre, resvSuf, true); - } - } ---- jdk/test/java/io/FileOutputStream/ManyFiles.java 2013-09-06 11:29:29.000000000 -0700 -+++ jdk/test/java/io/FileOutputStream/ManyFiles.java 2014-04-20 12:39:16.000000000 -0700 -@@ -43,7 +43,7 @@ - // Windows capability it is much simpler to only run it - // on that platform. - String osName = System.getProperty("os.name"); -- if (osName.startsWith("Linux")||osName.startsWith("SunOS")) -+ if (osName.startsWith("Linux")||osName.startsWith("SunOS")||osName.endsWith("BSD")||osName.contains("OS X")) - return; - - for (int n = 0; n < NUM_FILES; n++) { ---- jdk/test/java/io/IOException/LastErrorString.java 2013-09-06 11:29:29.000000000 -0700 -+++ jdk/test/java/io/IOException/LastErrorString.java 2014-04-20 12:39:16.000000000 -0700 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. - * 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,8 @@ - */ - - /* @test -- @bug 4167937 -+ @bug 4167937 8023964 -+ @ignore Test truncates system files when run as root, see 7042603 - @summary Test code paths that use the JVM_LastErrorString procedure - */ - ---- jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2013-09-06 11:29:30.000000000 -0700 -+++ jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -41,7 +41,7 @@ - # Need to determine the classpath separator and filepath separator based on the - # operating system. - case "$OS" in --SunOS | Linux | Darwin ) -+SunOS | Linux | *BSD | Darwin ) - PS=":" ;; - Windows* | CYGWIN* ) - PS=";" ;; ---- jdk/test/java/io/Serializable/serialver/classpath/run.sh 2013-09-06 11:29:31.000000000 -0700 -+++ jdk/test/java/io/Serializable/serialver/classpath/run.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -47,7 +47,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" ;; - Windows* | CYGWIN* ) - PS=";" ;; ---- jdk/test/java/io/Serializable/serialver/nested/run.sh 2013-09-06 11:29:31.000000000 -0700 -+++ jdk/test/java/io/Serializable/serialver/nested/run.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -47,7 +47,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" ;; - Windows* | CYGWIN* ) - PS=";" ;; ---- jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2013-09-06 11:29:32.000000000 -0700 -+++ jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -45,13 +45,7 @@ - # set platform-specific variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- FS="/" -- ;; -- Linux ) -- FS="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - FS="/" - ;; - Windows*) ---- jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2013-09-06 11:29:32.000000000 -0700 -+++ jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -49,13 +49,7 @@ - # set platform-specific variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- FS="/" -- ;; -- Linux ) -- FS="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - FS="/" - ;; - Windows* | CYGWIN* ) ---- jdk/test/java/lang/ProcessBuilder/Basic.java 2013-09-06 11:29:33.000000000 -0700 -+++ jdk/test/java/lang/ProcessBuilder/Basic.java 2014-04-20 12:39:15.000000000 -0700 -@@ -29,6 +29,7 @@ - * 4947220 7018606 7034570 - * @summary Basic tests for Process and Environment Variable code - * @run main/othervm/timeout=300 Basic -+ * @run main/othervm/timeout=300 -Djdk.lang.Process.launchMechanism=fork Basic - * @author Martin Buchholz - */ - ---- jdk/test/java/lang/ProcessBuilder/BasicLauncher.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/lang/ProcessBuilder/BasicLauncher.java 2014-04-20 12:39:15.000000000 -0700 -@@ -0,0 +1,99 @@ ++ /** ++ * @param str name of Menu ++ * @param bFlag set mnemonics on menu items ++ */ ++ private JMenuBar createMenuBar(String str, boolean bFlag) { ++ menubar = new JMenuBar(); ++ ++ menu1 = new JMenu(str); ++ menu1.setMnemonic(str.charAt(0)); ++ menu1.addActionListener(this); ++ ++ menubar.add(menu1); ++ for (int i = 0; i < 8; i++) { ++ JMenuItem menuitem = new JMenuItem("1 JMenuItem" + i); ++ menuitem.addActionListener(this); ++ if (bFlag) { ++ menuitem.setMnemonic('0' + i); ++ } ++ menu1.add(menuitem); ++ } ++ ++ // second menu ++ menu2 = new JMenu("2 - Second Menu"); ++ menu2.addActionListener(this); ++ menu2.setMnemonic('2'); ++ ++ menubar.add(menu2); ++ for (int i = 0; i < 5; i++) { ++ JMenuItem menuitem = new JMenuItem("2 JMenuItem" + i); ++ menuitem.addActionListener(this); ++ ++ if (bFlag) { ++ menuitem.setMnemonic('0' + i); ++ } ++ menu2.add(menuitem); ++ } ++ JMenu submenu = new JMenu("Sub Menu"); ++ submenu.setMnemonic('S'); ++ submenu.addActionListener(this); ++ for (int i = 0; i < 5; i++) { ++ JMenuItem menuitem = new JMenuItem("S JMenuItem" + i); ++ menuitem.addActionListener(this); ++ if (bFlag) { ++ menuitem.setMnemonic('0' + i); ++ } ++ submenu.add(menuitem); ++ } ++ menu2.add(new JSeparator()); ++ menu2.add(submenu); ++ ++ return menubar; ++ } ++ ++ public void actionPerformed(ActionEvent evt) { ++ Object obj = evt.getSource(); ++ if (obj instanceof JMenuItem) { ++ // put the focus on the noneditable combo. ++ combo1.requestFocus(); ++ } ++ } ++ ++ public static void main(String[] args) throws Throwable { ++ ++ sun.awt.SunToolkit toolkit = (sun.awt.SunToolkit) Toolkit.getDefaultToolkit(); ++ ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ test = new TaskbarPositionTest(); ++ } ++ }); ++ ++ // Use Robot to automate the test ++ Robot robot; ++ robot = new Robot(); ++ robot.setAutoDelay(125); ++ ++ // 1 - menu ++ Util.hitMnemonics(robot, KeyEvent.VK_1); ++ ++ toolkit.realSync(); ++ isPopupOnScreen(menu1.getPopupMenu(), screenBounds); ++ ++ // 2 menu with sub menu ++ robot.keyPress(KeyEvent.VK_RIGHT); ++ robot.keyRelease(KeyEvent.VK_RIGHT); ++ Util.hitMnemonics(robot, KeyEvent.VK_S); ++ ++ toolkit.realSync(); ++ isPopupOnScreen(menu2.getPopupMenu(), screenBounds); ++ ++ robot.keyPress(KeyEvent.VK_ENTER); ++ robot.keyRelease(KeyEvent.VK_ENTER); ++ ++ // Focus should go to non editable combo box ++ toolkit.realSync(); ++ Thread.sleep(500); ++ ++ robot.keyPress(KeyEvent.VK_DOWN); ++ ++ // How do we check combo boxes? ++ ++ // Editable combo box ++ robot.keyPress(KeyEvent.VK_TAB); ++ robot.keyRelease(KeyEvent.VK_TAB); ++ robot.keyPress(KeyEvent.VK_DOWN); ++ robot.keyRelease(KeyEvent.VK_DOWN); ++ ++ // combo1.getUI(); ++ ++ // Popup from Text field ++ robot.keyPress(KeyEvent.VK_TAB); ++ robot.keyRelease(KeyEvent.VK_TAB); ++ robot.keyPress(KeyEvent.VK_CONTROL); ++ robot.keyPress(KeyEvent.VK_DOWN); ++ robot.keyRelease(KeyEvent.VK_DOWN); ++ robot.keyRelease(KeyEvent.VK_CONTROL); ++ ++ // Popup from a mouse click. ++ Point pt = new Point(2, 2); ++ SwingUtilities.convertPointToScreen(pt, panel); ++ robot.mouseMove((int) pt.getX(), (int) pt.getY()); ++ robot.mousePress(InputEvent.BUTTON3_MASK); ++ robot.mouseRelease(InputEvent.BUTTON3_MASK); ++ ++ toolkit.realSync(); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ test.setLocation(-30, 100); ++ combo1.addPopupMenuListener(new ComboPopupCheckListener()); ++ combo1.requestFocus(); ++ } ++ }); ++ ++ robot.keyPress(KeyEvent.VK_DOWN); ++ robot.keyRelease(KeyEvent.VK_DOWN); ++ robot.keyPress(KeyEvent.VK_ESCAPE); ++ robot.keyRelease(KeyEvent.VK_ESCAPE); ++ ++ toolkit.realSync(); ++ Thread.sleep(500); ++ } ++} +--- ./jdk/test/javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,89 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62212,168 +110390,77 @@ + * questions. + */ + -+/* -+ * @test -+ * @bug 5049299 -+ * @summary (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion -+ * @compile BasicLauncher.java Basic.java -+ * @run main BasicLauncher -+ */ -+ -+import java.io.*; -+import java.nio.file.*; -+ -+public class BasicLauncher { -+ -+ private static boolean passed = false; ++/* @test ++ @bug 4983388 8015600 ++ @summary shortcuts on menus do not work on JDS ++ @author Oleg Mokhovikov ++ @library ../../../../regtesthelpers ++ @build Util ++ @run main bug4983388 ++*/ + -+ public static void main(String args[]) throws Exception { -+ String osName = System.getProperty("os.name"); -+ if (osName.startsWith("SunOS")) { -+ BasicLauncher l = new BasicLauncher(); -+ l.start(); ++import sun.awt.*; ++import java.awt.*; ++import javax.swing.*; ++import javax.swing.event.MenuListener; ++import javax.swing.event.MenuEvent; ++import java.awt.event.KeyEvent; ++ ++public class bug4983388 { ++ static volatile boolean bMenuSelected = false; ++ ++ private static class TestMenuListener implements MenuListener { ++ public void menuCanceled(MenuEvent e) {} ++ public void menuDeselected(MenuEvent e) {} ++ public void menuSelected(MenuEvent e) { ++ System.out.println("menuSelected"); ++ bMenuSelected = true; + } + } + -+ private void start() throws Exception { -+ String separator = System.getProperty("file.separator"); -+ String jdkpath = System.getProperty("test.jdk") + separator + "bin" + separator; -+ String srcpath = System.getProperty("test.src", ".") + separator; -+ String testClasses = System.getProperty("test.classes", "."); -+ -+ ProcessBuilder builder = new ProcessBuilder( -+ jdkpath + "java", -+ "-cp", -+ testClasses, -+ "-Djdk.lang.Process.launchMechanism=posix_spawn", -+ "Basic"); -+ builder.redirectErrorStream(true); -+ Process testProc = builder.start(); -+ printProcessThread ppt = -+ new printProcessThread(testProc, "testproc"); -+ ppt.start(); -+ testProc.waitFor(); -+ System.out.println("testproc done"); -+ -+ if (!passed) -+ throw new RuntimeException("Test Failed: "); ++ private static void createAndShowGUI() { ++ JMenuBar menuBar = new JMenuBar(); ++ JMenu menu = new JMenu("File"); ++ menu.setMnemonic('F'); ++ menuBar.add(menu); ++ JFrame frame = new JFrame(); ++ frame.setJMenuBar(menuBar); ++ frame.pack(); ++ frame.setVisible(true); ++ MenuListener listener = new TestMenuListener(); ++ menu.addMenuListener(listener); + } + ++ public static void main(String[] args) throws Exception { + -+ class printProcessThread extends Thread { -+ Process p; -+ String pName; -+ -+ public printProcessThread(Process p, String pName) { -+ this.p = p; -+ this.pName = pName; ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ try { ++ UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); ++ } catch (UnsupportedLookAndFeelException | ClassNotFoundException ex) { ++ System.err.println("GTKLookAndFeel is not supported on this platform. Using defailt LaF for this platform."); + } + -+ @Override -+ public void run() { -+ try (BufferedReader reader = -+ new BufferedReader(new InputStreamReader(p.getInputStream()))) { -+ String line; -+ while ((line = reader.readLine()) != null) { -+ System.out.println("[Output: " + pName + "]" + line); -+ if (line.contains("failed = 0")) { -+ passed = true; -+ } -+ } -+ -+ } catch (Exception e) { -+ System.out.println("Exception encountered in " + pName -+ + " thread\n" + e); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); + } ++ }); ++ ++ Robot robot = new Robot(); ++ Util.hitMnemonics(robot, KeyEvent.VK_F); ++ ++ toolkit.realSync(); ++ ++ if (!bMenuSelected) { ++ throw new RuntimeException("shortcuts on menus do not work"); + } + } +} ---- jdk/test/java/lang/SecurityManager/CheckPackageAccess.java 2013-09-06 11:29:33.000000000 -0700 -+++ jdk/test/java/lang/SecurityManager/CheckPackageAccess.java 2014-04-20 12:39:15.000000000 -0700 -@@ -23,7 +23,7 @@ - - /* - * @test -- * @bug 6741606 7146431 8000450 -+ * @bug 6741606 7146431 8000450 8022945 - * @summary Make sure all restricted packages listed in the package.access - * property in the java.security file are blocked - * @run main/othervm CheckPackageAccess -@@ -54,7 +54,9 @@ - "com.sun.imageio.", - "com.sun.istack.internal.", - "com.sun.jmx.", -+ "com.sun.naming.internal.", - "com.sun.proxy.", -+ "com.sun.corba.se.", - "com.sun.org.apache.bcel.internal.", - "com.sun.org.apache.regexp.internal.", - "com.sun.org.apache.xerces.internal.", -@@ -74,6 +76,7 @@ - "com.sun.org.apache.xml.internal.serializer.utils.", - "com.sun.org.apache.xml.internal.utils.", - "com.sun.org.glassfish.", -+ "com.sun.script.", - "oracle.jrockit.jfr.", - "org.jcp.xml.dsig.internal.", - }; ---- jdk/test/java/lang/StringCoding/CheckEncodings.sh 2013-09-06 11:29:33.000000000 -0700 -+++ jdk/test/java/lang/StringCoding/CheckEncodings.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -30,7 +30,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin) ;; -+ SunOS | Linux | *BSD | Darwin) ;; - Windows* | CYGWIN* ) - echo "Passed"; exit 0 ;; - * ) echo "Unrecognized system!" ; exit 1 ;; ---- jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2013-09-06 11:29:34.000000000 -0700 -+++ jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -44,7 +44,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin) -+ SunOS | Linux | *BSD | Darwin) - NULL=/dev/null - PS=":" - FS="/" ---- jdk/test/java/lang/instrument/MakeJAR2.sh 2013-09-06 11:29:34.000000000 -0700 -+++ jdk/test/java/lang/instrument/MakeJAR2.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -49,7 +49,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - ;; - ---- jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2013-09-06 11:29:35.000000000 -0700 -+++ jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -35,15 +35,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS ) -- PS=":" -- FS="/" -- ;; -- Linux ) -- PS=":" -- FS="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/lang/invoke/MethodHandleConstants.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/lang/invoke/MethodHandleConstants.java 2014-04-20 12:39:15.000000000 -0700 -@@ -0,0 +1,188 @@ +--- ./jdk/test/javax/swing/plaf/basic/BasicTreeUI/8023474/bug8023474.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/plaf/basic/BasicTreeUI/8023474/bug8023474.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,174 @@ +/* -+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it @@ -62395,1077 +110482,1766 @@ + * questions. + */ + -+/* @test -+ * @bug 8022066 -+ * @summary smoke test for method handle constants -+ * @build indify.Indify -+ * @compile MethodHandleConstants.java -+ * @run main/othervm -+ * indify.Indify -+ * --verify-specifier-count=0 -+ * --expand-properties --classpath ${test.classes} -+ * --java test.java.lang.invoke.MethodHandleConstants --check-output -+ * @run main/othervm -+ * indify.Indify -+ * --expand-properties --classpath ${test.classes} -+ * --java test.java.lang.invoke.MethodHandleConstants --security-manager ++/* ++ * @test ++ * @bug 8023474 ++ * @summary Tests that the first mouse press starts editing in JTree ++ * @author Dmitry Markov ++ * @run main bug8023474 + */ + -+package test.java.lang.invoke; -+ -+import java.util.*; -+import java.io.*; -+import java.lang.invoke.*; -+import java.security.*; ++import sun.awt.SunToolkit; + -+import static java.lang.invoke.MethodHandles.*; -+import static java.lang.invoke.MethodType.*; ++import javax.swing.*; ++import javax.swing.event.CellEditorListener; ++import javax.swing.tree.DefaultMutableTreeNode; ++import javax.swing.tree.DefaultTreeModel; ++import javax.swing.tree.TreeCellEditor; ++import javax.swing.tree.TreeCellRenderer; ++import java.awt.*; ++import java.awt.event.InputEvent; ++import java.util.EventObject; + -+public class MethodHandleConstants { -+ public static void main(String... av) throws Throwable { -+ if (av.length > 0 && av[0].equals("--check-output")) openBuf(); -+ if (av.length > 0 && av[0].equals("--security-manager")) setSM(); -+ System.out.println("Obtaining method handle constants:"); -+ testCase(MH_String_replace_C2(), String.class, "replace", String.class, String.class, char.class, char.class); -+ testCase(MH_MethodHandle_invokeExact_SC2(), MethodHandle.class, "invokeExact", String.class, MethodHandle.class, String.class, char.class, char.class); -+ testCase(MH_MethodHandle_invoke_SC2(), MethodHandle.class, "invoke", String.class, MethodHandle.class, String.class, char.class, char.class); -+ testCase(MH_Class_forName_S(), Class.class, "forName", Class.class, String.class); -+ testCase(MH_Class_forName_SbCL(), Class.class, "forName", Class.class, String.class, boolean.class, ClassLoader.class); -+ System.out.println("Done."); -+ closeBuf(); -+ } ++public class bug8023474 { ++ private static JTree tree; + -+ private static void testCase(MethodHandle mh, Class defc, String name, Class rtype, Class... ptypes) throws Throwable { -+ System.out.println(mh); -+ // we include defc, because we assume it is a non-static MH: -+ MethodType mt = methodType(rtype, ptypes); -+ assertEquals(mh.type(), mt); -+ // FIXME: Use revealDirect to find out more -+ } -+ private static void assertEquals(Object exp, Object act) { -+ if (exp == act || (exp != null && exp.equals(act))) return; -+ throw new AssertionError("not equal: "+exp+", "+act); -+ } ++ public static void main(String[] args) throws Exception { ++ SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); ++ Robot robot = new Robot(); ++ robot.setAutoDelay(50); + -+ private static void setSM() { -+ Policy.setPolicy(new TestPolicy()); -+ System.setSecurityManager(new SecurityManager()); -+ } ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ createAndShowGUI(); ++ } ++ }); + -+ private static PrintStream oldOut; -+ private static ByteArrayOutputStream buf; -+ private static void openBuf() { -+ oldOut = System.out; -+ buf = new ByteArrayOutputStream(); -+ System.setOut(new PrintStream(buf)); -+ } -+ private static void closeBuf() { -+ if (buf == null) return; -+ System.out.flush(); -+ System.setOut(oldOut); -+ String[] haveLines = new String(buf.toByteArray()).split("[\n\r]+"); -+ for (String line : haveLines) System.out.println(line); -+ Iterator iter = Arrays.asList(haveLines).iterator(); -+ for (String want : EXPECT_OUTPUT) { -+ String have = iter.hasNext() ? iter.next() : "[EOF]"; -+ if (want.equals(have)) continue; -+ System.err.println("want line: "+want); -+ System.err.println("have line: "+have); -+ throw new AssertionError("unexpected output: "+have); -+ } -+ if (iter.hasNext()) -+ throw new AssertionError("unexpected output: "+iter.next()); -+ } -+ private static final String[] EXPECT_OUTPUT = { -+ "Obtaining method handle constants:", -+ "MethodHandle(String,char,char)String", -+ "MethodHandle(MethodHandle,String,char,char)String", -+ "MethodHandle(MethodHandle,String,char,char)String", -+ "MethodHandle(String)Class", -+ "MethodHandle(String,boolean,ClassLoader)Class", -+ "Done." -+ }; ++ toolkit.realSync(); + -+ // String.replace(String, char, char) -+ private static MethodType MT_String_replace_C2() { -+ shouldNotCallThis(); -+ return methodType(String.class, char.class, char.class); -+ } -+ private static MethodHandle MH_String_replace_C2() throws ReflectiveOperationException { -+ shouldNotCallThis(); -+ return lookup().findVirtual(String.class, "replace", MT_String_replace_C2()); -+ } ++ Point point = getRowPointToClick(1); ++ robot.mouseMove(point.x, point.y); ++ robot.mousePress(InputEvent.BUTTON1_MASK); ++ robot.mouseRelease(InputEvent.BUTTON1_MASK); + -+ // MethodHandle.invokeExact(...) -+ private static MethodType MT_MethodHandle_invokeExact_SC2() { -+ shouldNotCallThis(); -+ return methodType(String.class, String.class, char.class, char.class); -+ } -+ private static MethodHandle MH_MethodHandle_invokeExact_SC2() throws ReflectiveOperationException { -+ shouldNotCallThis(); -+ return lookup().findVirtual(MethodHandle.class, "invokeExact", MT_MethodHandle_invokeExact_SC2()); -+ } ++ toolkit.realSync(); + -+ // MethodHandle.invoke(...) -+ private static MethodType MT_MethodHandle_invoke_SC2() { -+ shouldNotCallThis(); -+ return methodType(String.class, String.class, char.class, char.class); -+ } -+ private static MethodHandle MH_MethodHandle_invoke_SC2() throws ReflectiveOperationException { -+ shouldNotCallThis(); -+ return lookup().findVirtual(MethodHandle.class, "invoke", MT_MethodHandle_invoke_SC2()); ++ Boolean result = (Boolean)tree.getCellEditor().getCellEditorValue(); ++ if (!result) { ++ throw new RuntimeException("Test Failed!"); ++ } + } + -+ // Class.forName(String) -+ private static MethodType MT_Class_forName_S() { -+ shouldNotCallThis(); -+ return methodType(Class.class, String.class); -+ } -+ private static MethodHandle MH_Class_forName_S() throws ReflectiveOperationException { -+ shouldNotCallThis(); -+ return lookup().findStatic(Class.class, "forName", MT_Class_forName_S()); -+ } ++ private static void createAndShowGUI() { ++ try { ++ UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); ++ } catch (Exception e) { ++ throw new RuntimeException(e); ++ } + -+ // Class.forName(String, boolean, ClassLoader) -+ private static MethodType MT_Class_forName_SbCL() { -+ shouldNotCallThis(); -+ return methodType(Class.class, String.class, boolean.class, ClassLoader.class); -+ } -+ private static MethodHandle MH_Class_forName_SbCL() throws ReflectiveOperationException { -+ shouldNotCallThis(); -+ return lookup().findStatic(Class.class, "forName", MT_Class_forName_SbCL()); -+ } ++ DefaultMutableTreeNode root = new DefaultMutableTreeNode("root"); ++ DefaultMutableTreeNode item = new DefaultMutableTreeNode("item"); ++ DefaultMutableTreeNode subItem = new DefaultMutableTreeNode("subItem"); + -+ private static void shouldNotCallThis() { -+ // if this gets called, the transformation has not taken place -+ if (System.getProperty("MethodHandleConstants.allow-untransformed") != null) return; -+ throw new AssertionError("this code should be statically transformed away by Indify"); -+ } ++ root.add(item); ++ item.add(subItem); + -+ static class TestPolicy extends Policy { -+ final PermissionCollection permissions = new Permissions(); -+ TestPolicy() { -+ permissions.add(new java.io.FilePermission("<>", "read")); -+ } -+ public PermissionCollection getPermissions(ProtectionDomain domain) { -+ return permissions; -+ } ++ DefaultTreeModel model = new DefaultTreeModel(root); ++ tree = new JTree(model); + -+ public PermissionCollection getPermissions(CodeSource codesource) { -+ return permissions; -+ } ++ tree.setCellEditor(new Editor()); ++ tree.setEditable(true); ++ tree.setRowHeight(30); ++ tree.setCellRenderer(new CheckboxCellRenderer()); + -+ public boolean implies(ProtectionDomain domain, Permission perm) { -+ return permissions.implies(perm); -+ } ++ JFrame frame = new JFrame("bug8023474"); ++ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ++ frame.add(new JScrollPane(tree)); ++ frame.setSize(400, 300); ++ frame.setVisible(true); + } -+} ---- jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2013-09-06 11:29:35.000000000 -0700 -+++ jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -61,7 +61,7 @@ - while true; do - echo "Run $i: TestSystemLoadAvg" - case `uname -s` in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - runOne GetSystemLoadAverage - ;; - * ) ---- jdk/test/java/net/Authenticator/B4933582.sh 2013-09-06 11:29:36.000000000 -0700 -+++ jdk/test/java/net/Authenticator/B4933582.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -26,7 +26,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2013-09-06 11:29:36.000000000 -0700 -+++ jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2014-04-20 12:39:15.000000000 -0700 -@@ -45,6 +45,8 @@ - return (true); - if (p.getProperty ("os.name").equals ("Linux")) - return (true); -+ if (p.getProperty ("os.name").endsWith ("BSD")) -+ return (true); - if (p.getProperty ("os.name").startsWith ("Mac OS")) - return (true); - // Check for specific Solaris version from here ---- jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2013-09-06 11:29:36.000000000 -0700 -+++ jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -27,11 +27,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Darwin ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Linux ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/net/Inet6Address/serialize/Serialize.java 2013-09-06 11:29:37.000000000 -0700 -+++ jdk/test/java/net/Inet6Address/serialize/Serialize.java 2014-04-20 12:39:15.000000000 -0700 -@@ -94,7 +94,26 @@ - } finally { - ois.close(); - } -- System.out.println(nobj); + -+ nobj = (Inet6Address)InetAddress.getByAddress("foo.com", new byte[] { -+ (byte)0xfe,(byte)0x80,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0, -+ (byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)1 -+ }); -+ if (!test1(nobj, addr1)) { -+ throw new RuntimeException("failed with " + nobj.toString()); -+ } -+ nobj = (Inet6Address)InetAddress.getByAddress("x.bar.com", new byte[] { -+ (byte)0xfe,(byte)0xC0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0, -+ (byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)1 -+ }); -+ if (!test1(nobj, addr2)) { -+ throw new RuntimeException("failed with " + nobj.toString()); -+ } -+ nobj = (Inet6Address)InetAddress.getByName("::1"); -+ if (!test1(nobj, addr3)) { -+ throw new RuntimeException("failed with " + nobj.toString()); -+ } ++ private static Point getRowPointToClick(final int row) throws Exception { ++ final Point[] result = new Point[1]; + - System.out.println("All tests passed"); - } - -@@ -113,4 +132,162 @@ - return false; - } - } -- } ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ Rectangle rect = tree.getRowBounds(row); ++ Point point = new Point(rect.x + 10, rect.y + rect.height / 2); ++ SwingUtilities.convertPointToScreen(point, tree); ++ result[0] = point; ++ } ++ }); ++ return result[0]; ++ } + -+ static boolean test1 (Inet6Address obj, byte[] buf) throws Exception { -+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(buf)); -+ Inet6Address nobj = (Inet6Address) ois.readObject(); -+ ois.close(); ++ private static class Editor extends JPanel implements TreeCellEditor { ++ private JCheckBox checkbox; + -+ if (nobj.equals(obj)) { -+ return true; -+ } else { -+ return false; -+ } -+ } ++ public Editor() { ++ setOpaque(false); ++ checkbox = new JCheckBox(); ++ add(checkbox); ++ } + -+ // Inet6Address instances serialized with JDK 6 ++ public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, ++ boolean expanded, boolean leaf, int row) { ++ checkbox.setText(value.toString()); ++ checkbox.setSelected(false); ++ return this; ++ } + -+ static byte[] addr1 = { -+ (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72, -+ (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, -+ (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49, -+ (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64, -+ (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f, -+ (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80, -+ (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00, -+ (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65, -+ (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c, -+ (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f, -+ (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74, -+ (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f, -+ (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e, -+ (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65, -+ (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66, -+ (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00, -+ (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, -+ (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f, -+ (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67, -+ (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70, -+ (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73, -+ (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42, -+ (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61, -+ (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74, -+ (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41, -+ (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73, -+ (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3, -+ (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49, -+ (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72, -+ (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06, -+ (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79, -+ (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73, -+ (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71, -+ (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x02,(byte)0x74,(byte)0x00,(byte)0x07,(byte)0x66, -+ (byte)0x6f,(byte)0x6f,(byte)0x2e,(byte)0x63,(byte)0x6f,(byte)0x6d, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x70,(byte)0x75,(byte)0x72,(byte)0x00,(byte)0x02,(byte)0x5b, -+ (byte)0x42,(byte)0xac,(byte)0xf3,(byte)0x17,(byte)0xf8,(byte)0x06, -+ (byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02,(byte)0x00,(byte)0x00, -+ (byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x10, -+ (byte)0xfe,(byte)0x80,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x78 -+ }; ++ public Object getCellEditorValue() { ++ return checkbox.isSelected(); ++ } + -+ static byte[] addr2 = { -+ (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72, -+ (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, -+ (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49, -+ (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64, -+ (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f, -+ (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80, -+ (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00, -+ (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65, -+ (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c, -+ (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f, -+ (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74, -+ (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f, -+ (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e, -+ (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65, -+ (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66, -+ (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00, -+ (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, -+ (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f, -+ (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67, -+ (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70, -+ (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73, -+ (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42, -+ (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61, -+ (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74, -+ (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41, -+ (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73, -+ (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3, -+ (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49, -+ (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72, -+ (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06, -+ (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79, -+ (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73, -+ (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71, -+ (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x02,(byte)0x74,(byte)0x00,(byte)0x09,(byte)0x78, -+ (byte)0x2e,(byte)0x62,(byte)0x61,(byte)0x72,(byte)0x2e,(byte)0x63, -+ (byte)0x6f,(byte)0x6d,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x70,(byte)0x75,(byte)0x72,(byte)0x00, -+ (byte)0x02,(byte)0x5b,(byte)0x42,(byte)0xac,(byte)0xf3,(byte)0x17, -+ (byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02, -+ (byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x10,(byte)0xfe,(byte)0xc0,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01, -+ (byte)0x78 -+ }; ++ public boolean isCellEditable(EventObject anEvent) { ++ return true; ++ } + -+ static byte[] addr3 = { -+ (byte)0xac,(byte)0xed,(byte)0x00,(byte)0x05,(byte)0x73,(byte)0x72, -+ (byte)0x00,(byte)0x15,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, -+ (byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x2e,(byte)0x49, -+ (byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x36,(byte)0x41,(byte)0x64, -+ (byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73,(byte)0x5f, -+ (byte)0x7c,(byte)0x20,(byte)0x81,(byte)0x52,(byte)0x2c,(byte)0x80, -+ (byte)0x21,(byte)0x03,(byte)0x00,(byte)0x05,(byte)0x49,(byte)0x00, -+ (byte)0x08,(byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65, -+ (byte)0x5f,(byte)0x69,(byte)0x64,(byte)0x5a,(byte)0x00,(byte)0x0c, -+ (byte)0x73,(byte)0x63,(byte)0x6f,(byte)0x70,(byte)0x65,(byte)0x5f, -+ (byte)0x69,(byte)0x64,(byte)0x5f,(byte)0x73,(byte)0x65,(byte)0x74, -+ (byte)0x5a,(byte)0x00,(byte)0x10,(byte)0x73,(byte)0x63,(byte)0x6f, -+ (byte)0x70,(byte)0x65,(byte)0x5f,(byte)0x69,(byte)0x66,(byte)0x6e, -+ (byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x5f,(byte)0x73,(byte)0x65, -+ (byte)0x74,(byte)0x4c,(byte)0x00,(byte)0x06,(byte)0x69,(byte)0x66, -+ (byte)0x6e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x74,(byte)0x00, -+ (byte)0x12,(byte)0x4c,(byte)0x6a,(byte)0x61,(byte)0x76,(byte)0x61, -+ (byte)0x2f,(byte)0x6c,(byte)0x61,(byte)0x6e,(byte)0x67,(byte)0x2f, -+ (byte)0x53,(byte)0x74,(byte)0x72,(byte)0x69,(byte)0x6e,(byte)0x67, -+ (byte)0x3b,(byte)0x5b,(byte)0x00,(byte)0x09,(byte)0x69,(byte)0x70, -+ (byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73, -+ (byte)0x73,(byte)0x74,(byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42, -+ (byte)0x78,(byte)0x72,(byte)0x00,(byte)0x14,(byte)0x6a,(byte)0x61, -+ (byte)0x76,(byte)0x61,(byte)0x2e,(byte)0x6e,(byte)0x65,(byte)0x74, -+ (byte)0x2e,(byte)0x49,(byte)0x6e,(byte)0x65,(byte)0x74,(byte)0x41, -+ (byte)0x64,(byte)0x64,(byte)0x72,(byte)0x65,(byte)0x73,(byte)0x73, -+ (byte)0x2d,(byte)0x9b,(byte)0x57,(byte)0xaf,(byte)0x9f,(byte)0xe3, -+ (byte)0xeb,(byte)0xdb,(byte)0x02,(byte)0x00,(byte)0x03,(byte)0x49, -+ (byte)0x00,(byte)0x07,(byte)0x61,(byte)0x64,(byte)0x64,(byte)0x72, -+ (byte)0x65,(byte)0x73,(byte)0x73,(byte)0x49,(byte)0x00,(byte)0x06, -+ (byte)0x66,(byte)0x61,(byte)0x6d,(byte)0x69,(byte)0x6c,(byte)0x79, -+ (byte)0x4c,(byte)0x00,(byte)0x08,(byte)0x68,(byte)0x6f,(byte)0x73, -+ (byte)0x74,(byte)0x4e,(byte)0x61,(byte)0x6d,(byte)0x65,(byte)0x71, -+ (byte)0x00,(byte)0x7e,(byte)0x00,(byte)0x01,(byte)0x78,(byte)0x70, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x02,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x70,(byte)0x75,(byte)0x72, -+ (byte)0x00,(byte)0x02,(byte)0x5b,(byte)0x42,(byte)0xac,(byte)0xf3, -+ (byte)0x17,(byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0, -+ (byte)0x02,(byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x10,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, -+ (byte)0x01,(byte)0x78 -+ }; -+} ---- jdk/test/java/net/Socket/OldSocketImpl.sh 2013-09-06 11:29:37.000000000 -0700 -+++ jdk/test/java/net/Socket/OldSocketImpl.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -28,7 +28,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/net/URL/B5086147.sh 2013-09-06 11:29:38.000000000 -0700 -+++ jdk/test/java/net/URL/B5086147.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -26,7 +26,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - exit 0 - ;; - CYGWIN* ) ---- jdk/test/java/net/URL/runconstructor.sh 2013-09-06 11:29:38.000000000 -0700 -+++ jdk/test/java/net/URL/runconstructor.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -27,7 +27,7 @@ - # - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/net/URLClassLoader/B5077773.sh 2013-09-06 11:29:38.000000000 -0700 -+++ jdk/test/java/net/URLClassLoader/B5077773.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -34,11 +34,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Darwin ) -- PS=":" -- FS="/" -- ;; -- Linux ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2013-09-06 11:29:38.000000000 -0700 -+++ jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -27,11 +27,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Darwin ) -- PS=":" -- FS="/" -- ;; -- Linux ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/net/URLConnection/6212146/test.sh 2013-09-06 11:29:38.000000000 -0700 -+++ jdk/test/java/net/URLConnection/6212146/test.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -33,11 +33,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Darwin ) -- PS=":" -- FS="/" -- ;; -- Linux ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/nio/channels/Selector/LotsOfChannels.java 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/channels/Selector/LotsOfChannels.java 2014-04-20 12:39:15.000000000 -0700 -@@ -22,9 +22,10 @@ - */ - - /* @test -- * @bug 4503092 -+ * @bug 4503092 8024883 - * @summary Tests that Windows Selector can use more than 63 channels -- * @run main/timeout=300 LotsOfChannels -+ * @run main LotsOfChannels -+ * @run main/othervm -Dsun.nio.ch.maxUpdateArraySize=64 LotsOfChannels - * @author kladko - */ - ---- jdk/test/java/nio/channels/Selector/SelectorLimit.java 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/channels/Selector/SelectorLimit.java 2014-04-20 12:39:15.000000000 -0700 -@@ -22,12 +22,13 @@ - */ - - /* @test -- * @bug 4777504 -+ * @bug 4777504 8024883 - * @summary Ensure that a Selector can return at least 100 selected keys - * @author Mark Reinhold - * @library .. - * @build SelectorLimit - * @run main/othervm SelectorLimit -+ * @run main/othervm -Dsun.nio.ch.maxUpdateArraySize=128 SelectorLimit - */ - - import java.io.*; ---- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2014-04-20 12:39:15.000000000 -0700 -@@ -71,6 +71,48 @@ - EXTRA_LIBS = -lc - endif - -+ifeq ($(uname), Darwin) -+ PLATFORM = bsd -+ archExpr = case "`$(UNAME) -m`" in \ -+ i[3-6]86) \ -+ $(ECHO) i586 \ -+ ;; \ -+ sparc*) \ -+ $(ECHO) sparc \ -+ ;; \ -+ *) \ -+ $(UNAME) -m \ -+ ;; \ -+ esac -+ ARCH := $(shell $(archExpr) ) -+ CC = gcc -+ CFLAGS = -fno-strict-aliasing -fPIC -W -Wall -+ LD = ld -+ LDFLAGS_COMMON = -shared -+ EXTRA_LIBS = -lc -+endif ++ public boolean shouldSelectCell(EventObject anEvent) { ++ return true; ++ } + -+ifeq ($(findstring BSD,$(uname)), BSD) -+ PLATFORM = bsd -+ archExpr = case "`$(UNAME) -m`" in \ -+ i[3-6]86) \ -+ $(ECHO) i586 \ -+ ;; \ -+ sparc*) \ -+ $(ECHO) sparc \ -+ ;; \ -+ *) \ -+ $(UNAME) -m \ -+ ;; \ -+ esac -+ ARCH := $(shell $(archExpr) ) -+ CC = gcc -+ CFLAGS = -fno-strict-aliasing -fPIC -W -Wall -+ LD = ld -+ LDFLAGS_COMMON = -shared -+ EXTRA_LIBS = -lc -+endif ++ public boolean stopCellEditing() { ++ return true; ++ } + - LIBDIR=lib/$(PLATFORM)-$(ARCH) - LAUNCHERLIB=$(LIBDIR)/libLauncher.so - ---- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -33,11 +33,14 @@ - # @run shell run_tests.sh - - os=`uname -s` -- --if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then -- echo "Test not designed to run on this operating system, skipping..." -- exit 0 --fi -+case "${os}" in -+ SunOS | Linux | *BSD | Darwin ) -+ ;; -+ * ) -+ echo "Test not designed to run on this operating system, skipping..." -+ exit 0 -+ ;; -+esac - - - # if TESTJAVA isn't set then we assume an interactive run. So that it's -@@ -67,7 +70,8 @@ - # On Solaris we assume 64-bit if java -d64 works. - - DFLAG= --if [ "$os" = "SunOS" ]; then -+case "${os}" in -+ SunOS ) - PLATFORM=solaris - case "`uname -p`" in - i[3-9]86) -@@ -84,9 +88,9 @@ - fi - ;; - esac --fi -+ ;; - --if [ "$os" = "Linux" ]; then -+ Linux ) - PLATFORM=linux - ARCH=unknown - case "`uname -m`" in -@@ -100,7 +104,24 @@ - ARCH=amd64 - ;; - esac --fi -+ ;; ++ public void cancelCellEditing() { ++ } + -+ *BSD | Darwin ) -+ PLATFORM=bsd -+ ARCH=unknown -+ case "`uname -m`" in -+ i[3-6]86) -+ ARCH=i586 -+ ;; -+ ia64) -+ ARCH=ia64 -+ ;; -+ x86_64) -+ ARCH=amd64 -+ ;; -+ esac -+ ;; -+esac - - LIBDIR=lib/${PLATFORM}-${ARCH} - LAUNCHERLIB=${LIBDIR}/libLauncher.so ---- jdk/test/java/nio/charset/Charset/default.sh 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/charset/Charset/default.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -41,10 +41,14 @@ - fi - - s="`uname -s`" --if [ "$s" != Linux -a "$s" != SunOS ]; then -- echo "$s: locale command not supported on this system, skipping..." -- exit 0 --fi -+case "$s" in -+ Linux|SunOS|*BSD|Darwin) -+ ;; -+ *) -+ echo "$s: locale command not supported on this system, skipping..." -+ exit 0 -+ ;; -+esac - - JAVA=$TESTJAVA/bin/java - ---- jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -34,7 +34,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) ;; -+ SunOS | Linux | *BSD | Darwin ) ;; - # Skip locale test for Windows - Windows* ) - echo "Passed"; exit 0 ;; ---- jdk/test/java/nio/charset/spi/basic.sh 2013-09-06 11:29:40.000000000 -0700 -+++ jdk/test/java/nio/charset/spi/basic.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -70,10 +70,14 @@ - L="$1" - shift - s=`uname -s` -- if [ $s != Linux -a $s != SunOS -a $s != Darwin ]; then -- echo "$L: Locales not supported on this system, skipping..." -- exit 0 -- fi -+ case "$s" in -+ Linux|SunOS|*BSD|Darwin) -+ ;; -+ *) -+ echo "$L: Locales not supported on this system, skipping..." -+ exit 0 -+ ;; -+ esac - if [ "x`locale -a | grep $L`" != "x$L" ]; then - echo "$L: Locale not supported, skipping..." - exit 0 -@@ -85,7 +89,7 @@ - cd $TMP - - case `uname` in -- SunOS | Linux | Darwin ) CPS=':' ;; -+ SunOS | Linux | *BSD | Darwin ) CPS=':' ;; - Windows* ) CPS=';' ;; - *) echo "Unknown platform: `uname`"; exit 1 ;; - esac ---- jdk/test/java/nio/file/FileSystem/Basic.java 2013-09-06 11:29:41.000000000 -0700 -+++ jdk/test/java/nio/file/FileSystem/Basic.java 2014-04-20 12:39:15.000000000 -0700 -@@ -76,6 +76,8 @@ - checkSupported(fs, "posix", "unix", "owner", "acl", "user"); - if (os.equals("Linux")) - checkSupported(fs, "posix", "unix", "owner", "dos", "user"); -+ if (os.endsWith("BSD")) -+ checkSupported(fs, "posix", "unix", "owner"); - if (os.contains("OS X")) - checkSupported(fs, "posix", "unix", "owner"); - if (os.equals("Windows")) ---- jdk/test/java/nio/file/Files/CopyAndMove.java 2013-09-06 11:29:41.000000000 -0700 -+++ jdk/test/java/nio/file/Files/CopyAndMove.java 2014-04-20 12:39:15.000000000 -0700 -@@ -634,7 +634,7 @@ - - // check POSIX attributes are copied - String os = System.getProperty("os.name"); -- if (os.equals("SunOS") || os.equals("Linux")) { -+ if (os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD")) { - checkPosixAttributes( - readAttributes(source, PosixFileAttributes.class, linkOptions), - readAttributes(target, PosixFileAttributes.class, linkOptions)); -@@ -1136,7 +1136,7 @@ - static void randomizeAttributes(Path file) throws IOException { - String os = System.getProperty("os.name"); - boolean isWindows = os.startsWith("Windows"); -- boolean isUnix = os.equals("SunOS") || os.equals("Linux"); -+ boolean isUnix = os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD"); - boolean isDirectory = isDirectory(file, NOFOLLOW_LINKS); - - if (isUnix) { ---- jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java 2013-09-06 11:29:42.000000000 -0700 -+++ jdk/test/java/rmi/activation/rmidViaInheritedChannel/RmidViaInheritedChannel.java 2014-04-20 12:39:15.000000000 -0700 -@@ -88,6 +88,17 @@ - TestLibrary.RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT); - rmid.addOptions(new String[]{ - "-Djava.nio.channels.spi.SelectorProvider=RmidViaInheritedChannel$RmidSelectorProvider"}); -+ if (System.getProperty("os.name").startsWith("Windows") && -+ System.getProperty("os.version").startsWith("5.")) -+ { -+ /* Windows XP/2003 or older -+ * Need to expand ephemeral range to include RMI test ports -+ */ -+ rmid.addOptions(new String[]{ -+ "-Djdk.net.ephemeralPortRange.low=1024", -+ "-Djdk.net.ephemeralPortRange.high=64000" -+ }); ++ public void addCellEditorListener(CellEditorListener l) { ++ } ++ ++ public void removeCellEditorListener(CellEditorListener l) { ++ } ++ } ++ ++ private static class CheckboxCellRenderer extends JPanel implements TreeCellRenderer { ++ private JCheckBox checkbox; ++ ++ public CheckboxCellRenderer() { ++ setOpaque(false); ++ checkbox = new JCheckBox(); ++ add(checkbox); ++ } ++ ++ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, ++ boolean leaf, int row, boolean hasFocus) { ++ checkbox.setText(value.toString()); ++ checkbox.setSelected(false); ++ return this; ++ } ++ } ++} +--- ./jdk/test/javax/swing/text/StyledEditorKit/8016833/bug8016833.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/swing/text/StyledEditorKit/8016833/bug8016833.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,270 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8016833 ++ @summary underlines and strikethroughs should be painted at the correct ++ positions for different kind of text styles: normal, superscript and subscript ++ @author Anton Nashatyrev ++ @run main bug8016833 ++*/ ++import javax.swing.*; ++import javax.swing.text.BadLocationException; ++import javax.swing.text.Style; ++import javax.swing.text.StyleConstants; ++import javax.swing.text.StyledDocument; ++import java.awt.*; ++import java.awt.image.BufferedImage; ++import java.lang.reflect.InvocationTargetException; ++ ++public class bug8016833 { ++ ++ void drawText(final Graphics g, final boolean underline, final boolean strikethrough, final boolean background) { ++ drawText(g, "mama", underline, strikethrough, background); ++ } ++ ++ void drawText(final Graphics g, final String text, final boolean underline, final boolean strikethrough, final boolean background) { ++ try { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ final JTextPane comp = new JTextPane(); ++ final StyledDocument doc = comp.getStyledDocument(); ++ ++ Style style = comp.addStyle("superscript", null); ++ setNormalStyle(style); ++ ++ if (underline) { ++ StyleConstants.setUnderline(style, true); ++ } ++ if (strikethrough) { ++ StyleConstants.setStrikeThrough(style, true); ++ } ++ if (background) { ++ StyleConstants.setBackground(style, Color.BLUE); ++ } ++ try { ++ doc.insertString(doc.getLength(), "mama", style); ++ } catch (BadLocationException e) { ++ throw new RuntimeException(e); ++ } ++ ++ comp.setSize(200, 100); ++ comp.paint(g); ++ } ++ }); ++ } catch (InterruptedException e) { ++ throw new RuntimeException(e); ++ } catch (InvocationTargetException e) { ++ throw new RuntimeException(e); ++ } ++ } ++ ++ void setNormalStyle(Style style) { ++ StyleConstants.setSuperscript(style, true); ++ } ++ ++ int getEmptyPixel() { ++ return 0xFFFFFFFF; ++ } ++ ++ boolean isPixelEmpty(int argb) { ++ return (argb & 0x00FFFFFF) == (getEmptyPixel() & 0x00FFFFFF); ++ } ++ ++ boolean isLineEmpty(BufferedImage img, int coord, boolean isHorizontal) { ++ int len = isHorizontal ? img.getWidth() : img.getHeight(); ++ for (int i = 0; i < len; i++) { ++ int pixel = isHorizontal ? img.getRGB(i, coord) : img.getRGB(coord, i); ++ if (!isPixelEmpty(pixel)) { ++ return false; + } - rmid.start(); - - /* ---- jdk/test/java/rmi/registry/readTest/readTest.sh 2013-09-06 11:29:43.000000000 -0700 -+++ jdk/test/java/rmi/registry/readTest/readTest.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -29,8 +29,12 @@ - # @run shell readTest.sh - - OS=`uname -s` -+VER=`uname -r` -+ARGS="" -+REGARGS="" ++ } ++ return true; ++ } + - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - FILEURL="file:" -@@ -39,11 +43,19 @@ - PS=";" - FS="\\" - FILEURL="file:/" -+ if [ "$VER" -eq "5" ]; then -+ ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000" -+ REGARGS="-J-Djdk.net.ephemeralPortRange.low=1024 -J-Djdk.net.ephemeralPortRange.high=65000" -+ fi - ;; - CYGWIN* ) - PS=";" - FS="/" - FILEURL="file:/" -+ if [ "${VER}" -eq "5" ]; then -+ ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000" -+ REGARGS="-J-Djdk.net.ephemeralPortRange.low=1024 -J-Djdk.net.ephemeralPortRange.high=65000" -+ fi - ;; - * ) - echo "Unrecognized system!" -@@ -61,8 +73,8 @@ - #start rmiregistry without any local classes on classpath - cd rmi_tmp - # NOTE: This RMI Registry port must match TestLibrary.READTEST_REGISTRY_PORT --${TESTJAVA}${FS}bin${FS}rmiregistry -J-Djava.rmi.server.useCodebaseOnly=false \ -- ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 & -+${TESTJAVA}${FS}bin${FS}rmiregistry ${REGARGS} -J-Djava.rmi.server.useCodebaseOnly=false \ -+ ${TESTTOOLVMOPTS} 60005 > ..${FS}${RMIREG_OUT} 2>&1 & - RMIREG_PID=$! - # allow some time to start - sleep 3 -@@ -74,10 +86,10 @@ - ;; - * ) - CODEBASE=`pwd` -- ;; -+ ;; - esac - # trailing / after code base is important for rmi codebase property. --${TESTJAVA}${FS}bin${FS}java -cp $TEST_CLASSPATH -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & -+${TESTJAVA}${FS}bin${FS}java -cp $TEST_CLASSPATH ${ARGS} -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 & - TEST_PID=$! - #bulk of testcase - let it run for a while - sleep 5 -@@ -100,7 +112,7 @@ - result2=$? - - if [ $result1 -eq 0 -a $result2 -eq 0 ] --then -+then - echo "Passed" - exitCode=0; - else -@@ -108,6 +120,6 @@ - exitCode=1 - fi - rm -rf OUT.TXT ${RMIREG_OUT} rmi_tmp --exit ${exitCode} -+exit ${exitCode} - - ---- jdk/test/java/rmi/reliability/launch_reliability.ksh 2013-09-06 11:29:43.000000000 -0700 -+++ jdk/test/java/rmi/reliability/launch_reliability.ksh 2014-04-20 12:39:15.000000000 -0700 -@@ -84,14 +84,12 @@ - - - # set platform-dependent variables --if [ `uname` = "SunOS" ] ; then -+case `uname` in -+ SunOS | Linux | *BSD | Darwin ) - PATH_SEP=":" -- --elif [ `uname` = "Linux" ] ; then -- PATH_SEP=":" --else -+ * ) - PATH_SEP=";" --fi -+esac - - export PATH_SEP - mainpid=$$ ---- jdk/test/java/rmi/testlibrary/TestLibrary.java 2013-09-06 11:29:44.000000000 -0700 -+++ jdk/test/java/rmi/testlibrary/TestLibrary.java 2014-04-20 12:39:15.000000000 -0700 -@@ -86,13 +86,13 @@ - * FIXED_PORT_MIN or above FIXED_PORT_MAX, then adjust - * FIXED_PORT_MIN/MAX appropriately. - */ -- public final static int FIXED_PORT_MIN = 64001; -- public final static int FIXED_PORT_MAX = 64010; -- public final static int RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT = 64001; -- public final static int RMIDVIAINHERITEDCHANNEL_REGISTRY_PORT = 64002; -- public final static int INHERITEDCHANNELNOTSERVERSOCKET_ACTIVATION_PORT = 64003; -- public final static int INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT = 64004; -- public final static int READTEST_REGISTRY_PORT = 64005; -+ public final static int FIXED_PORT_MIN = 60001; -+ public final static int FIXED_PORT_MAX = 60010; -+ public final static int RMIDVIAINHERITEDCHANNEL_ACTIVATION_PORT = 60001; -+ public final static int RMIDVIAINHERITEDCHANNEL_REGISTRY_PORT = 60002; -+ public final static int INHERITEDCHANNELNOTSERVERSOCKET_ACTIVATION_PORT = 60003; -+ public final static int INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT = 60004; -+ public final static int READTEST_REGISTRY_PORT = 60005; - private final static int MAX_SERVER_SOCKET_TRIES = 2*(FIXED_PORT_MAX-FIXED_PORT_MIN+1); - - static void mesg(Object mesg) { ---- jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2013-09-06 11:29:45.000000000 -0700 -+++ jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -46,15 +46,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Linux ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2013-09-06 11:29:46.000000000 -0700 -+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -34,15 +34,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Linux ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2013-09-06 11:29:46.000000000 -0700 -+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -50,19 +50,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Linux ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- CYGWIN* ) -- PATHSEP=";" -- FILESEP="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/security/Security/signedfirst/Dyn.sh 2013-09-06 11:29:46.000000000 -0700 -+++ jdk/test/java/security/Security/signedfirst/Dyn.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -46,15 +46,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Linux ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/security/Security/signedfirst/Static.sh 2013-09-06 11:29:46.000000000 -0700 -+++ jdk/test/java/security/Security/signedfirst/Static.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -46,15 +46,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Linux ) -- PATHSEP=":" -- FILESEP="/" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/util/Currency/PropertiesTest.sh 2013-09-06 11:29:47.000000000 -0700 -+++ jdk/test/java/util/Currency/PropertiesTest.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -30,7 +30,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/util/PluggableLocale/ExecTest.sh 2013-09-06 11:29:48.000000000 -0700 -+++ jdk/test/java/util/PluggableLocale/ExecTest.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -58,7 +58,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2013-09-06 11:29:49.000000000 -0700 -+++ jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -31,7 +31,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PATHSEP=":" - FILESEP="/" - ;; ---- jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2013-09-06 11:29:49.000000000 -0700 -+++ jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -72,10 +72,10 @@ - Windows* | CYGWIN* ) - DEL=";" - ;; --SunOS | Darwin) -+SunOS | Darwin ) - DEL=":" - ;; --Linux) -+Linux | *BSD ) - DEL=":" - HAS_S=YES - ;; ---- jdk/test/java/util/ServiceLoader/basic.sh 2013-09-06 11:29:50.000000000 -0700 -+++ jdk/test/java/util/ServiceLoader/basic.sh 2014-04-20 12:39:16.000000000 -0700 -@@ -42,9 +42,7 @@ ++ Rectangle getPixelsOutline(BufferedImage img) { ++ int x1 = 0; ++ while (x1 < img.getWidth() && isLineEmpty(img, x1, false)) { ++ x1++; ++ } ++ int x2 = img.getWidth() - 1; ++ while (x2 >= 0 && isLineEmpty(img, x2, false)) { ++ x2--; ++ } ++ int y1 = 0; ++ while (y1 < img.getHeight() && isLineEmpty(img, y1, true)) { ++ y1++; ++ } ++ int y2 = img.getHeight() - 1; ++ while (y2 >= 0 && isLineEmpty(img, y2, true)) { ++ y2--; ++ } ++ ++ return new Rectangle(x1, y1, x2 - x1 + 1, y2 - y1 + 1); ++ } ++ ++ BufferedImage createImage() { ++ final BufferedImage img = new BufferedImage(200, 100, BufferedImage.TYPE_INT_ARGB); ++ try { ++ SwingUtilities.invokeAndWait(new Runnable() { ++ @Override ++ public void run() { ++ Graphics g = img.getGraphics(); ++ g.setColor(new Color(getEmptyPixel())); ++ g.fillRect(0, 0, 10000, 10000); ++ } ++ }); ++ } catch (InterruptedException e) { ++ throw new RuntimeException(e); ++ } catch (InvocationTargetException e) { ++ throw new RuntimeException(e); ++ } ++ return img; ++ } ++ ++ int subPixels(int pix1, int pix2) { ++ if (pix1 == pix2) { ++ return getEmptyPixel(); ++ } ++ return pix1; ++ } ++ ++ /** ++ * Subtracts img2 from img1 ++ */ ++ BufferedImage subImages(BufferedImage img1, BufferedImage img2) { ++ if (img1.getHeight() != img2.getHeight() || ++ img1.getWidth() != img2.getWidth()) { ++ throw new RuntimeException("Different sizes"); ++ } ++ BufferedImage ret = new BufferedImage(img1.getWidth(), img1.getHeight(), img1.getType()); ++ ++ for (int x = 0; x < ret.getWidth(); x++) { ++ for (int y = 0; y < ret.getHeight(); y++) { ++ ret.setRGB(x, y, subPixels(img1.getRGB(x, y), img2.getRGB(x, y))); ++ } ++ } ++ return ret; ++ } ++ ++ void testUnderline() { ++ System.out.println(" testUnderline()"); ++ ++ final BufferedImage img1 = createImage(); ++ drawText(img1.getGraphics(), true, false, false); ++ final Rectangle out1 = getPixelsOutline(img1); ++ System.out.println(" Underlined: " + out1); ++ ++ final BufferedImage img2 = createImage(); ++ drawText(img2.getGraphics(), false, false, false); ++ final Rectangle out2 = getPixelsOutline(img2); ++ System.out.println(" Normal: " + out2); ++ ++ final BufferedImage img3 = subImages(img1, img2); ++ final Rectangle out3 = getPixelsOutline(img3); ++ System.out.println(" Sub: " + out3); ++ ++ // underline is not too thick ++ assertTrue(out3.getHeight() <= 2); ++ // not too wide ++ assertTrue(out3.getWidth() * 0.8 < out2.getWidth()); ++ // not too low ++ assertTrue(out3.getY() - (out1.getY() + out2.getHeight()) < 3); ++ // not too high ++ assertTrue(out3.getY() - (out1.getY() + out2.getHeight()) > 0); ++ } ++ ++ void testStrikthrough() { ++ System.out.println(" testStrikthrough()"); ++ ++ final BufferedImage img1 = createImage(); ++ drawText(img1.getGraphics(), false, true, false); ++ final Rectangle out1 = getPixelsOutline(img1); ++ System.out.println(" Striked: " + out1); ++ ++ final BufferedImage img2 = createImage(); ++ drawText(img2.getGraphics(), false, false, false); ++ final Rectangle out2 = getPixelsOutline(img2); ++ System.out.println(" Normal: " + out2); ++ ++ final BufferedImage img3 = subImages(img1, img2); ++ final Rectangle out3 = getPixelsOutline(img3); ++ System.out.println(" Sub: " + out3); ++ ++ // strikethrough is not too thick ++ assertTrue(out3.getHeight() <= 2); ++ // not too wide ++ assertTrue(out3.getWidth() * 0.8 < out2.getWidth()); ++ // not too low ++ assertTrue(out3.getY() - (out1.getY() + out2.getHeight()) < 0); ++ // not too high ++ assertTrue(out3.getY() - out1.getY() > 1); ++ } ++ void assertTrue(boolean b) { ++ if (!b) { ++ throw new RuntimeException("Assertion failed"); ++ } ++ } ++ ++ static void testSuperScript() { ++ System.out.println("testSuperScript()"); ++ bug8016833 b = new bug8016833() { ++ @Override ++ void setNormalStyle(Style style) { ++ StyleConstants.setSuperscript(style, true); ++ } ++ }; ++ b.testUnderline(); ++ b.testStrikthrough(); ++ } ++ ++ static void testSubScript() { ++ System.out.println("testSubScript()"); ++ bug8016833 b = new bug8016833() { ++ @Override ++ void setNormalStyle(Style style) { ++ StyleConstants.setSubscript(style, true); ++ } ++ }; ++ b.testUnderline(); ++ b.testStrikthrough(); ++ } ++ ++ static void testNormalScript() { ++ System.out.println("testNormalScript()"); ++ bug8016833 b = new bug8016833() { ++ @Override ++ void setNormalStyle(Style style) { ++ } ++ }; ++ b.testUnderline(); ++ b.testStrikthrough(); ++ } ++ ++ public static void main(String[] args) { ++ testSubScript(); ++ testSuperScript(); ++ testNormalScript(); ++ } ++} +--- ./jdk/test/javax/swing/text/View/8014863/bug8014863.java 2013-09-06 11:30:00.000000000 -0700 ++++ ./jdk/test/javax/swing/text/View/8014863/bug8014863.java 2014-06-06 19:56:31.000000000 -0700 +@@ -24,6 +24,7 @@ + /* + * @test + * @bug 8014863 ++ * @bug 8024395 + * @summary Tests the calculation of the line breaks when a text is inserted + * @author Dmitry Markov + * @library ../../../regtesthelpers +@@ -34,91 +35,107 @@ + import sun.awt.SunToolkit; - OS=`uname -s` - case "$OS" in -- SunOS | Darwin ) -- SEP=':' ;; -- Linux ) -+ SunOS | Linux | *BSD | Darwin ) - SEP=':' ;; - * ) - SEP='\;' ;; ---- jdk/test/java/util/logging/TestAppletLoggerContext.java 2013-09-06 11:29:51.000000000 -0700 -+++ jdk/test/java/util/logging/TestAppletLoggerContext.java 2014-04-20 12:39:16.000000000 -0700 -@@ -110,28 +110,19 @@ + import javax.swing.*; ++import javax.swing.text.GlyphView; ++import javax.swing.text.View; + import javax.swing.text.html.HTMLEditorKit; + import java.awt.*; + import java.awt.event.KeyEvent; ++import java.lang.reflect.Field; ++import java.util.ArrayList; ++import java.util.Arrays; + + public class bug8014863 { + + private static JEditorPane editorPane; ++ private static JFrame frame; + private static Robot robot; + private static SunToolkit toolkit; + ++ private static String text1 = "

one two qqqq this is a test sentence qqqq pp qqqq pp " + ++ "qqqq pp qqqq pp qqqq pp qqqq pp qqqq pp qqqq pp qqqq

"; ++ private static String text2 = "

qqqq this is a test sentence qqqq pp qqqq pp " + ++ "qqqq pp qqqq pp qqqq pp qqqq pp qqqq pp qqqq pp qqqq

"; ++ ++ private static ArrayList glyphViews; ++ + public static void main(String[] args) throws Exception { + toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); + robot = new Robot(); ++ robot.setAutoDelay(50); ++ glyphViews = new ArrayList(); + +- createAndShowGUI(); ++ createAndShowGUI(text1); + + toolkit.realSync(); + +- Util.hitKeys(robot, KeyEvent.VK_HOME); +- Util.hitKeys(robot, KeyEvent.VK_O); ++ SwingUtilities.invokeAndWait(new Runnable() { ++ public void run() { ++ retrieveGlyphViews(editorPane.getUI().getRootView(editorPane)); ++ } ++ }); ++ GlyphView [] arr1 = glyphViews.toArray(new GlyphView[glyphViews.size()]); + +- toolkit.realSync(); ++ frame.dispose(); ++ glyphViews.clear(); + +- if (3 != getNumberOfTextLines()) { +- throw new RuntimeException("The number of texts lines does not meet the expectation"); +- } +- +- Util.hitKeys(robot, KeyEvent.VK_N); ++ createAndShowGUI(text2); + + toolkit.realSync(); + +- if (3 != getNumberOfTextLines()) { +- throw new RuntimeException("The number of texts lines does not meet the expectation"); +- } ++ Util.hitKeys(robot, KeyEvent.VK_HOME); ++ toolkit.realSync(); + ++ Util.hitKeys(robot, KeyEvent.VK_O); ++ Util.hitKeys(robot, KeyEvent.VK_N); + Util.hitKeys(robot, KeyEvent.VK_E); + Util.hitKeys(robot, KeyEvent.VK_SPACE); + Util.hitKeys(robot, KeyEvent.VK_T); + Util.hitKeys(robot, KeyEvent.VK_W); ++ Util.hitKeys(robot, KeyEvent.VK_O); ++ Util.hitKeys(robot, KeyEvent.VK_SPACE); + + toolkit.realSync(); + +- if (3 != getNumberOfTextLines()) { +- throw new RuntimeException("The number of texts lines does not meet the expectation"); +- } +- } +- +- private static int getNumberOfTextLines() throws Exception { +- int numberOfLines = 0; +- int caretPosition = getCaretPosition(); +- int current = 1; +- int previous; +- +- setCaretPosition(current); +- do { +- previous = current; +- Util.hitKeys(robot, KeyEvent.VK_DOWN); +- toolkit.realSync(); +- current = getCaretPosition(); +- numberOfLines++; +- } while (current != previous); +- +- setCaretPosition(caretPosition); +- return numberOfLines; +- } +- +- private static int getCaretPosition() throws Exception { +- final int[] result = new int[1]; + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { +- result[0] = editorPane.getCaretPosition(); ++ retrieveGlyphViews(editorPane.getUI().getRootView(editorPane)); } + }); +- return result[0]; ++ GlyphView [] arr2 = glyphViews.toArray(new GlyphView[glyphViews.size()]); ++ ++ if (arr1.length != arr2.length) { ++ throw new RuntimeException("Test Failed!"); ++ } ++ ++ for (int i=0; iqqqq pp qqqq pp " + +- "qqqq pp qqqq pp qqqq pp qqqq pp" + +- " qqqq pp qqqq pp qqqq pp qqqq

"); ++ editorPane.setText(text); + editorPane.setCaretPosition(1); +- + frame.add(editorPane); + frame.setSize(200, 200); + frame.setVisible(true); +--- ./jdk/test/javax/xml/jaxp/XPath/8009579/XPathExceptionInitCause.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/XPath/8009579/XPathExceptionInitCause.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,220 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8009579 ++ * @summary The initCause() incorrectly initialise the cause in ++ * XPathException class when used with XPathException(String) ++ * constructor. ++ * @run main XPathExceptionInitCause ++ * @author aleksej.efimov@oracle.com ++ */ ++ ++import javax.xml.xpath.XPathException; ++import java.io.ByteArrayOutputStream; ++import java.io.ByteArrayInputStream; ++import java.io.ObjectOutputStream; ++import java.io.ObjectInputStream; ++import java.io.IOException; ++import java.io.InvalidClassException; ++ ++ ++public class XPathExceptionInitCause { ++ ++ /* This is a serial form of XPathException with two causes serialized ++ * by JDK7 code: ++ * ++ * ByteArrayOutputStream fser = new ByteArrayOutputStream(); ++ * ObjectOutputStream oos = new ObjectOutputStream(fser); ++ * oos.writeObject(new XPathException(new Exception()).initCause(null)); ++ * oos.close(); ++ */ ++ static final byte [] TWOCAUSES = {-84,-19,0,5,115,114,0,30,106,97,118,97,120,46,120, ++ 109,108,46,120,112,97,116,104,46,88,80,97,116,104,69,120,99,101,112,116, ++ 105,111,110,-26,-127,97,60,-120,119,127,28,2,0,1,76,0,5,99,97,117,115,101, ++ 116,0,21,76,106,97,118,97,47,108,97,110,103,47,84,104,114,111,119,97,98, ++ 108,101,59,120,114,0,19,106,97,118,97,46,108,97,110,103,46,69,120,99,101, ++ 112,116,105,111,110,-48,-3,31,62,26,59,28,-60,2,0,0,120,114,0,19,106,97, ++ 118,97,46,108,97,110,103,46,84,104,114,111,119,97,98,108,101,-43,-58,53, ++ 39,57,119,-72,-53,3,0,4,76,0,5,99,97,117,115,101,113,0,126,0,1,76,0,13, ++ 100,101,116,97,105,108,77,101,115,115,97,103,101,116,0,18,76,106,97,118, ++ 97,47,108,97,110,103,47,83,116,114,105,110,103,59,91,0,10,115,116,97,99, ++ 107,84,114,97,99,101,116,0,30,91,76,106,97,118,97,47,108,97,110,103,47,83, ++ 116,97,99,107,84,114,97,99,101,69,108,101,109,101,110,116,59,76,0,20,115, ++ 117,112,112,114,101,115,115,101,100,69,120,99,101,112,116,105,111,110,115, ++ 116,0,16,76,106,97,118,97,47,117,116,105,108,47,76,105,115,116,59,120,112, ++ 112,112,117,114,0,30,91,76,106,97,118,97,46,108,97,110,103,46,83,116,97,99, ++ 107,84,114,97,99,101,69,108,101,109,101,110,116,59,2,70,42,60,60,-3,34,57, ++ 2,0,0,120,112,0,0,0,1,115,114,0,27,106,97,118,97,46,108,97,110,103,46,83, ++ 116,97,99,107,84,114,97,99,101,69,108,101,109,101,110,116,97,9,-59,-102, ++ 38,54,-35,-123,2,0,4,73,0,10,108,105,110,101,78,117,109,98,101,114,76,0, ++ 14,100,101,99,108,97,114,105,110,103,67,108,97,115,115,113,0,126,0,4,76, ++ 0,8,102,105,108,101,78,97,109,101,113,0,126,0,4,76,0,10,109,101,116,104, ++ 111,100,78,97,109,101,113,0,126,0,4,120,112,0,0,0,31,116,0,23,88,80,97,116, ++ 104,69,120,99,101,112,116,105,111,110,83,101,114,105,97,108,105,122,101, ++ 116,0,28,88,80,97,116,104,69,120,99,101,112,116,105,111,110,83,101,114,105, ++ 97,108,105,122,101,46,106,97,118,97,116,0,4,109,97,105,110,115,114,0,38, ++ 106,97,118,97,46,117,116,105,108,46,67,111,108,108,101,99,116,105,111,110, ++ 115,36,85,110,109,111,100,105,102,105,97,98,108,101,76,105,115,116,-4,15, ++ 37,49,-75,-20,-114,16,2,0,1,76,0,4,108,105,115,116,113,0,126,0,6,120,114, ++ 0,44,106,97,118,97,46,117,116,105,108,46,67,111,108,108,101,99,116,105,111, ++ 110,115,36,85,110,109,111,100,105,102,105,97,98,108,101,67,111,108,108,101, ++ 99,116,105,111,110,25,66,0,-128,-53,94,-9,30,2,0,1,76,0,1,99,116,0,22,76, ++ 106,97,118,97,47,117,116,105,108,47,67,111,108,108,101,99,116,105,111,110, ++ 59,120,112,115,114,0,19,106,97,118,97,46,117,116,105,108,46,65,114,114,97, ++ 121,76,105,115,116,120,-127,-46,29,-103,-57,97,-99,3,0,1,73,0,4,115,105, ++ 122,101,120,112,0,0,0,0,119,4,0,0,0,0,120,113,0,126,0,20,120,115,113,0,126, ++ 0,2,113,0,126,0,21,112,117,113,0,126,0,8,0,0,0,1,115,113,0,126,0,10,0,0,0, ++ 31,113,0,126,0,12,113,0,126,0,13,113,0,126,0,14,113,0,126,0,18,120 ++ }; ++ ++ /* This is a serial form of ordinary XPathException serialized by JDK7 code: ++ * ++ * Throwable cause = new Throwable( "message 1" ); ++ * XPathException xpathexcep = new XPathException( "message 2" ); ++ * xpathexcep.initCause( cause ); ++ * ByteArrayOutputStream fser = new ByteArrayOutputStream(); ++ * ObjectOutputStream oos = new ObjectOutputStream(fser); ++ * oos.writeObject(xpathexcep); ++ * oos.close(); ++ */ ++ static final byte [] NORMALJDK7SER = {-84,-19,0,5,115,114,0,30,106,97,118,97,120, ++ 46,120,109,108,46,120,112,97,116,104,46,88,80,97,116,104,69,120,99,101,112, ++ 116,105,111,110,-26,-127,97,60,-120,119,127,28,2,0,1,76,0,5,99,97,117,115, ++ 101,116,0,21,76,106,97,118,97,47,108,97,110,103,47,84,104,114,111,119,97, ++ 98,108,101,59,120,114,0,19,106,97,118,97,46,108,97,110,103,46,69,120,99, ++ 101,112,116,105,111,110,-48,-3,31,62,26,59,28,-60,2,0,0,120,114,0,19,106, ++ 97,118,97,46,108,97,110,103,46,84,104,114,111,119,97,98,108,101,-43,-58, ++ 53,39,57,119,-72,-53,3,0,4,76,0,5,99,97,117,115,101,113,0,126,0,1,76,0,13, ++ 100,101,116,97,105,108,77,101,115,115,97,103,101,116,0,18,76,106,97,118, ++ 97,47,108,97,110,103,47,83,116,114,105,110,103,59,91,0,10,115,116,97,99, ++ 107,84,114,97,99,101,116,0,30,91,76,106,97,118,97,47,108,97,110,103,47,83, ++ 116,97,99,107,84,114,97,99,101,69,108,101,109,101,110,116,59,76,0,20,115, ++ 117,112,112,114,101,115,115,101,100,69,120,99,101,112,116,105,111,110,115, ++ 116,0,16,76,106,97,118,97,47,117,116,105,108,47,76,105,115,116,59,120,112, ++ 115,113,0,126,0,3,113,0,126,0,8,116,0,9,109,101,115,115,97,103,101,32,49, ++ 117,114,0,30,91,76,106,97,118,97,46,108,97,110,103,46,83,116,97,99,107,84, ++ 114,97,99,101,69,108,101,109,101,110,116,59,2,70,42,60,60,-3,34,57,2,0,0, ++ 120,112,0,0,0,1,115,114,0,27,106,97,118,97,46,108,97,110,103,46,83,116,97, ++ 99,107,84,114,97,99,101,69,108,101,109,101,110,116,97,9,-59,-102,38,54,-35, ++ -123,2,0,4,73,0,10,108,105,110,101,78,117,109,98,101,114,76,0,14,100,101, ++ 99,108,97,114,105,110,103,67,108,97,115,115,113,0,126,0,4,76,0,8,102,105, ++ 108,101,78,97,109,101,113,0,126,0,4,76,0,10,109,101,116,104,111,100,78,97, ++ 109,101,113,0,126,0,4,120,112,0,0,0,19,116,0,23,88,80,97,116,104,69,120, ++ 99,101,112,116,105,111,110,83,101,114,105,97,108,105,122,101,116,0,28,88, ++ 80,97,116,104,69,120,99,101,112,116,105,111,110,83,101,114,105,97,108,105, ++ 122,101,46,106,97,118,97,116,0,4,109,97,105,110,115,114,0,38,106,97,118, ++ 97,46,117,116,105,108,46,67,111,108,108,101,99,116,105,111,110,115,36,85, ++ 110,109,111,100,105,102,105,97,98,108,101,76,105,115,116,-4,15,37,49,-75, ++ -20,-114,16,2,0,1,76,0,4,108,105,115,116,113,0,126,0,6,120,114,0,44,106, ++ 97,118,97,46,117,116,105,108,46,67,111,108,108,101,99,116,105,111,110,115, ++ 36,85,110,109,111,100,105,102,105,97,98,108,101,67,111,108,108,101,99,116, ++ 105,111,110,25,66,0,-128,-53,94,-9,30,2,0,1,76,0,1,99,116,0,22,76,106,97, ++ 118,97,47,117,116,105,108,47,67,111,108,108,101,99,116,105,111,110,59,120, ++ 112,115,114,0,19,106,97,118,97,46,117,116,105,108,46,65,114,114,97,121,76, ++ 105,115,116,120,-127,-46,29,-103,-57,97,-99,3,0,1,73,0,4,115,105,122,101, ++ 120,112,0,0,0,0,119,4,0,0,0,0,120,113,0,126,0,22,120,116,0,9,109,101,115, ++ 115,97,103,101,32,50,117,113,0,126,0,10,0,0,0,1,115,113,0,126,0,12,0,0,0, ++ 20,113,0,126,0,14,113,0,126,0,15,113,0,126,0,16,113,0,126,0,20,120,112 ++ }; ++ ++ //Serialize XPathException ++ static byte [] pickleXPE(XPathException xpe) throws IOException { ++ ByteArrayOutputStream bos = new ByteArrayOutputStream(); ++ ObjectOutputStream xpeos = new ObjectOutputStream(bos); ++ xpeos.writeObject(xpe); ++ xpeos.close(); ++ return bos.toByteArray(); ++ } ++ ++ //Deserialize XPathException with byte array as serial data source ++ static XPathException unpickleXPE(byte [] ser) ++ throws IOException, ClassNotFoundException { ++ XPathException xpe; ++ ByteArrayInputStream bis = new ByteArrayInputStream(ser); ++ ObjectInputStream xpeis = new ObjectInputStream(bis); ++ xpe = (XPathException) xpeis.readObject(); ++ xpeis.close(); ++ return xpe; ++ } ++ ++ public static void main(String[] args) throws Exception { ++ Throwable cause = new Throwable("message 1"); ++ XPathException xpathexcep = new XPathException("message 2"); ++ ++ //Test XPE initCause() method ++ xpathexcep.initCause(cause); ++ System.out.println("getCause() result: '" + xpathexcep.getCause() ++ + "' Cause itself: '" + cause + "'"); ++ if (!xpathexcep.getCause().toString().equals(cause.toString())) { ++ throw new Exception("Incorrect cause is set by initCause()"); ++ } ++ ++ //Test serialization/deserialization of initialized XPE ++ byte [] xpeserial; ++ XPathException xpedeser; ++ xpeserial = pickleXPE(xpathexcep); ++ xpedeser = unpickleXPE(xpeserial); ++ System.out.println("Serialized XPE: message='" + xpathexcep.getMessage() ++ + "' cause='" + xpathexcep.getCause().toString() + "'"); ++ System.out.println("Deserialized XPE: message='" + xpedeser.getMessage() ++ + "' cause='" + xpedeser.getCause().toString()+"'"); ++ if(xpedeser.getCause() == null || ++ !xpedeser.getCause().toString().equals(cause.toString()) || ++ !xpedeser.getMessage().toString().equals("message 2") ) ++ throw new Exception("XPathException incorrectly serialized/deserialized"); ++ ++ //Test serialization/deserialization of uninitialized cause in XPE ++ XPathException xpeuninit = new XPathException("uninitialized cause"); ++ xpeserial = pickleXPE(xpeuninit); ++ xpedeser = unpickleXPE(xpeserial); ++ System.out.println("Serialized XPE: message='" + xpeuninit.getMessage() ++ + "' cause='" + xpeuninit.getCause()+"'"); ++ System.out.println("Deserialized XPE: message='" + xpedeser.getMessage() ++ + "' cause='" + xpedeser.getCause()+"'"); ++ if(xpedeser.getCause() != null || ++ !xpedeser.getMessage().toString().equals("uninitialized cause") ) ++ throw new Exception("XPathException incorrectly serialized/deserialized"); ++ ++ //Test deserialization of normal XPathException serialized by JDK7 ++ XPathException xpejdk7 = unpickleXPE(NORMALJDK7SER); ++ if(xpejdk7 == null || xpejdk7.getCause() == null || ++ !xpejdk7.getMessage().equals("message 2") || ++ !xpejdk7.getCause().getMessage().equals("message 1")) ++ throw new Exception("XpathException serialized by JDK7 was " ++ + "incorrectly deserialized."); ++ ++ //Test deserialization of XPathException with two causes from JDK7. ++ //The serialization are done for the following XPathException object: ++ // new XPathException(new Exception()).initCause(null) ++ try { ++ xpejdk7 = unpickleXPE(TWOCAUSES); ++ throw new Exception("Expected InvalidClassException but it wasn't" ++ + " observed"); ++ } catch(InvalidClassException e) { ++ System.out.println("InvalidClassException caught as expected."); ++ } ++ ++ } ++} +--- ./jdk/test/javax/xml/jaxp/XPath/8015978/XPathNegativeZero.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/XPath/8015978/XPathNegativeZero.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,72 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8015978 ++ * @summary Incorrect transformation of XPath expression "string(-0)" ++ * @run main XPathNegativeZero ++ * @author aleksej.efimov@oracle.com ++ */ ++ ++import java.io.File; ++import java.io.StringWriter; ++import javax.xml.transform.TransformerFactory; ++import javax.xml.transform.Templates; ++import javax.xml.transform.Transformer; ++import javax.xml.transform.Source; ++import javax.xml.transform.Result; ++import javax.xml.transform.stream.StreamSource; ++import javax.xml.transform.stream.StreamResult; ++ ++ ++public class XPathNegativeZero { ++ ++ static final String EXPECTEDXML = "\"0\""; ++ ++ public static void main(final String[] args) throws Exception { ++ //file name of XML file to transform ++ final String xml = System.getProperty("test.src", ".")+"/dummy.xml"; ++ //file name of XSL file w/ transformation ++ final String xsl = System.getProperty("test.src", ".")+"/negativezero.xsl"; ++ final String result = xform(xml, xsl).trim(); ++ ++ System.out.println("transformed XML: '"+result+ "' expected XML: '"+EXPECTEDXML+"'"); ++ if (!result.equals(EXPECTEDXML)) ++ throw new Exception("Negative zero was incorrectly transformed"); ++ } ++ ++ private static String xform(final String xml, final String xsl) throws Exception { ++ final TransformerFactory tf = TransformerFactory.newInstance(); ++ final Source xslsrc = new StreamSource(new File(xsl)); ++ final Templates tmpl = tf.newTemplates(xslsrc); ++ final Transformer t = tmpl.newTransformer(); ++ ++ StringWriter writer = new StringWriter(); ++ final Source src = new StreamSource(new File(xml)); ++ final Result res = new StreamResult(writer); ++ ++ t.transform(src, res); ++ return writer.toString(); ++ } ++} +--- ./jdk/test/javax/xml/jaxp/XPath/8015978/dummy.xml 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/XPath/8015978/dummy.xml 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1 @@ ++ +--- ./jdk/test/javax/xml/jaxp/XPath/8015978/negativezero.xsl 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/XPath/8015978/negativezero.xsl 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,4 @@ ++ ++ ++ "" ++ +--- ./jdk/test/javax/xml/jaxp/parsers/8022548/XOMParserTest.java 2013-09-06 11:30:01.000000000 -0700 ++++ ./jdk/test/javax/xml/jaxp/parsers/8022548/XOMParserTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -22,7 +22,8 @@ + */ - final static JavaAWTAccessStub javaAwtAccess = new JavaAWTAccessStub(); ---- jdk/test/java/util/logging/TestLoggingWithMainAppContext.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/util/logging/TestLoggingWithMainAppContext.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,75 @@ + /** +- * @test @bug 8022548 ++ * @test ++ * @bug 8022548 + * @summary test that a parser can use DTDConfiguration + * @run main XOMParserTest + */ +@@ -60,30 +61,27 @@ + } + + public final void testTransform() { ++ String inFilename = filePath + "/JDK8022548.xml"; ++ String xslFilename = filePath + "/JDK8022548.xsl"; ++ String outFilename = "JDK8022548.out"; ++ ++ try (InputStream xslInput = new FileInputStream(xslFilename); ++ InputStream xmlInput = new FileInputStream(inFilename); ++ OutputStream out = new FileOutputStream(outFilename); ++ ) { + +- try { +- +- String inFilename = filePath + "/JDK8022548.xml"; +- String xslFilename = filePath + "/JDK8022548.xsl"; +- String outFilename = filePath + "/JDK8022548.out"; + + StringWriter sw = new StringWriter(); + // Create transformer factory + TransformerFactory factory = TransformerFactory.newInstance(); +- // set the translet name +-// factory.setAttribute("translet-name", "myTranslet"); +- +- // set the destination directory +-// factory.setAttribute("destination-directory", "c:\\temp"); +-// factory.setAttribute("generate-translet", Boolean.TRUE); + + // Use the factory to create a template containing the xsl file +- Templates template = factory.newTemplates(new StreamSource(new FileInputStream(xslFilename))); ++ Templates template = factory.newTemplates(new StreamSource(xslInput)); + // Use the template to create a transformer + Transformer xformer = template.newTransformer(); + // Prepare the input and output files +- Source source = new StreamSource(new FileInputStream(inFilename)); +- Result result = new StreamResult(new FileOutputStream(outFilename)); ++ Source source = new StreamSource(xmlInput); ++ Result result = new StreamResult(outFilename); + //Result result = new StreamResult(sw); + // Apply the xsl file to the source file and write the result to the output file + xformer.transform(source, result); +--- ./jdk/test/javax/xml/jaxp/parsers/8024707/TestFunc.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/parsers/8024707/TestFunc.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,35 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import org.w3c.dom.Node; ++import org.w3c.dom.NodeList; ++ ++/** ++ * bug 8024707 ++ */ ++ ++public class TestFunc { ++ public static Node test( NodeList list ) { ++ return list.item(0); ++ } ++} +--- ./jdk/test/javax/xml/jaxp/parsers/8024707/XSLT.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/parsers/8024707/XSLT.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,51 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8024707 ++ * @summary Test for XSLT extension function with 1 element sized nodelist ++ * @compile TestFunc.java XSLT.java ++ * @run main/othervm XSLT ++ * @author aleksej.efimov@oracle.com ++ */ ++ ++import javax.xml.transform.*; ++import javax.xml.transform.stream.*; ++import java.io.ByteArrayOutputStream; ++ ++public class XSLT { ++ static final String XMLTOTRANSFORM = "/in.xml"; ++ static final String XSLTRANSFORMER = "/test.xsl"; ++ static final String EXPECTEDRESULT = "inp1_1"; ++ ++ public static void main(String[] args) throws Exception { ++ ByteArrayOutputStream resStream = new ByteArrayOutputStream(); ++ TransformerFactory trf = TransformerFactory.newInstance(); ++ Transformer tr = trf.newTransformer( new StreamSource(System.getProperty("test.src", ".")+XSLTRANSFORMER)); ++ tr.transform( new StreamSource(System.getProperty("test.src", ".")+XMLTOTRANSFORM), new StreamResult(resStream)); ++ System.out.println("Transformation completed. Result:"+resStream.toString()); ++ if (!resStream.toString().equals(EXPECTEDRESULT)) ++ throw new RuntimeException("Incorrect transformation result"); ++ } ++} +--- ./jdk/test/javax/xml/jaxp/parsers/8024707/in.xml 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/parsers/8024707/in.xml 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,4 @@ ++ ++ ++inp1_1 ++ +--- ./jdk/test/javax/xml/jaxp/parsers/8024707/test.xsl 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/parsers/8024707/test.xsl 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,10 @@ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/jaxp/transform/8004476/SecureProcessingTest.xml 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/transform/8004476/SecureProcessingTest.xml 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,2 @@ ++ ++ +--- ./jdk/test/javax/xml/jaxp/transform/8004476/TestBase.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/transform/8004476/TestBase.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,82 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. ++ */ ++import java.security.Policy; ++ ++/** ++ * ++ * ++ * @author huizhe.wang@oracle.com ++ */ ++public class TestBase { ++ public static boolean isWindows = false; ++ static { ++ if (System.getProperty("os.name").indexOf("Windows")>-1) { ++ isWindows = true; ++ } ++ }; ++ ++ String filepath; ++ boolean hasSM; ++ String curDir; ++ Policy origPolicy; ++ String testName; ++ static String errMessage; ++ ++ int passed = 0, failed = 0; ++ ++ /** ++ * Creates a new instance of StreamReader ++ */ ++ public TestBase(String name) { ++ testName = name; ++ } ++ ++ //junit @Override ++ protected void setUp() { ++ if (System.getSecurityManager() != null) { ++ hasSM = true; ++ System.setSecurityManager(null); ++ } ++ ++ filepath = System.getProperty("test.src"); ++ if (filepath == null) { ++ //current directory ++ filepath = System.getProperty("user.dir"); ++ } ++ origPolicy = Policy.getPolicy(); ++ ++ } ++ ++ //junit @Override ++ public void tearDown() { ++ // turn off security manager and restore policy ++ System.setSecurityManager(null); ++ Policy.setPolicy(origPolicy); ++ if (hasSM) { ++ System.setSecurityManager(new SecurityManager()); ++ } ++ System.out.println("\nNumber of tests passed: " + passed); ++ System.out.println("Number of tests failed: " + failed + "\n"); ++ ++ if (errMessage != null ) { ++ throw new RuntimeException(errMessage); ++ } ++ } ++ ++ void fail(String errMsg) { ++ if (errMessage == null) { ++ errMessage = errMsg; ++ } else { ++ errMessage = errMessage + "\n" + errMsg; ++ } ++ failed++; ++ } ++ ++ void success(String msg) { ++ passed++; ++ System.out.println(msg); ++ } ++ ++} +--- ./jdk/test/javax/xml/jaxp/transform/8004476/XPathExFuncTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/transform/8004476/XPathExFuncTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,287 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8004476 ++ * @summary test XPath extension functions ++ * @run main/othervm XPathExFuncTest ++ */ ++import java.io.FileInputStream; ++import java.io.InputStream; ++import java.security.AllPermission; ++import java.security.CodeSource; ++import java.security.Permission; ++import java.security.PermissionCollection; ++import java.security.Permissions; ++import java.security.Policy; ++import java.security.ProtectionDomain; ++import java.util.Iterator; ++import java.util.List; ++import javax.xml.XMLConstants; ++import javax.xml.namespace.NamespaceContext; ++import javax.xml.namespace.QName; ++import javax.xml.parsers.DocumentBuilder; ++import javax.xml.parsers.DocumentBuilderFactory; ++import javax.xml.xpath.XPath; ++import javax.xml.xpath.XPathExpressionException; ++import javax.xml.xpath.XPathFactory; ++import javax.xml.xpath.XPathFactoryConfigurationException; ++import javax.xml.xpath.XPathFunction; ++import javax.xml.xpath.XPathFunctionException; ++import javax.xml.xpath.XPathFunctionResolver; ++import org.w3c.dom.Document; ++ ++/** ++ * test XPath extension functions ++ * ++ * @author huizhe.wang@oracle.com ++ */ ++public class XPathExFuncTest extends TestBase { ++ ++ final static String ENABLE_EXTENSION_FUNCTIONS = "http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions"; ++ final static String CLASSNAME = "DocumentBuilderFactoryImpl"; ++ final String XPATH_EXPRESSION = "ext:helloWorld()"; ++ ++ /** ++ * Creates a new instance of StreamReader ++ */ ++ public XPathExFuncTest(String name) { ++ super(name); ++ } ++ boolean hasSM; ++ String xslFile, xslFileId; ++ String xmlFile, xmlFileId; ++ ++ protected void setUp() { ++ super.setUp(); ++ xmlFile = filepath + "/SecureProcessingTest.xml"; ++ ++ } ++ ++ /** ++ * @param args the command line arguments ++ */ ++ public static void main(String[] args) { ++ XPathExFuncTest test = new XPathExFuncTest("OneTest"); ++ test.setUp(); ++ ++ test.testExtFunc(); ++ test.testExtFuncNotAllowed(); ++ test.testEnableExtFunc(); ++ test.tearDown(); ++ ++ } ++ ++ /** ++ * by default, extension function is enabled ++ */ ++ public void testExtFunc() { ++ ++ try { ++ evaluate(false); ++ System.out.println("testExtFunc: OK"); ++ } catch (XPathFactoryConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (XPathExpressionException e) { ++ fail(e.getMessage()); ++ } ++ } ++ ++ /** ++ * Security is enabled, extension function not allowed ++ */ ++ public void testExtFuncNotAllowed() { ++ Policy p = new SimplePolicy(new AllPermission()); ++ Policy.setPolicy(p); ++ System.setSecurityManager(new SecurityManager()); ++ ++ try { ++ evaluate(false); ++ } catch (XPathFactoryConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (XPathExpressionException ex) { ++ //expected since extension function is disallowed ++ System.out.println("testExtFuncNotAllowed: OK"); ++ } finally { ++ System.setSecurityManager(null); ++ } ++ } ++ ++ /** ++ * Security is enabled, use new feature: enableExtensionFunctions ++ */ ++ public void testEnableExtFunc() { ++ Policy p = new SimplePolicy(new AllPermission()); ++ Policy.setPolicy(p); ++ System.setSecurityManager(new SecurityManager()); ++ ++ ++ try { ++ evaluate(true); ++ System.out.println("testEnableExt: OK"); ++ } catch (XPathFactoryConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (XPathExpressionException e) { ++ fail(e.getMessage()); ++ } finally { ++ System.setSecurityManager(null); ++ } ++ } ++ ++ Document getDocument() { ++ // the xml source ++ DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); ++ DocumentBuilder documentBuilder = null; ++ Document document = null; ++ ++ try { ++ documentBuilder = documentBuilderFactory.newDocumentBuilder(); ++ InputStream xmlStream = new FileInputStream(xmlFile); ++ document = documentBuilder.parse(xmlStream); ++ } catch (Exception e) { ++ fail(e.toString()); ++ } ++ return document; ++ } ++ ++ void evaluate(boolean enableExt) throws XPathFactoryConfigurationException, XPathExpressionException { ++ Document document = getDocument(); ++ ++ XPathFactory xPathFactory = XPathFactory.newInstance(); ++ /** ++ * Use of the extension function 'http://exslt.org/strings:tokenize' is ++ * not allowed when the secure processing feature is set to true. ++ * Attempt to use the new property to enable extension function ++ */ ++ if (enableExt) { ++ boolean isExtensionSupported = enableExtensionFunction(xPathFactory); ++ } ++ ++ xPathFactory.setXPathFunctionResolver(new MyXPathFunctionResolver()); ++ if (System.getSecurityManager() == null) { ++ xPathFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); ++ } ++ ++ XPath xPath = xPathFactory.newXPath(); ++ xPath.setNamespaceContext(new MyNamespaceContext()); ++ ++ String xPathResult = xPath.evaluate(XPATH_EXPRESSION, document); ++ System.out.println( ++ "XPath result (enableExtensionFunction == " + enableExt + ") = \"" ++ + xPathResult ++ + "\""); ++ } ++ ++ public class MyXPathFunctionResolver ++ implements XPathFunctionResolver { ++ ++ public XPathFunction resolveFunction(QName functionName, int arity) { ++ ++ // not a real ewsolver, always return a default XPathFunction ++ return new MyXPathFunction(); ++ } ++ } ++ ++ public class MyXPathFunction ++ implements XPathFunction { ++ ++ public Object evaluate(List list) throws XPathFunctionException { ++ ++ return "Hello World"; ++ } ++ } ++ ++ public class MyNamespaceContext implements NamespaceContext { ++ ++ public String getNamespaceURI(String prefix) { ++ if (prefix == null) { ++ throw new IllegalArgumentException("The prefix cannot be null."); ++ } ++ ++ if (prefix.equals("ext")) { ++ return "http://ext.com"; ++ } else { ++ return null; ++ } ++ } ++ ++ public String getPrefix(String namespace) { ++ ++ if (namespace == null) { ++ throw new IllegalArgumentException("The namespace uri cannot be null."); ++ } ++ ++ if (namespace.equals("http://ext.com")) { ++ return "ext"; ++ } else { ++ return null; ++ } ++ } ++ ++ public Iterator getPrefixes(String namespace) { ++ return null; ++ } ++ } ++ ++ boolean enableExtensionFunction(XPathFactory factory) { ++ boolean isSupported = true; ++ try { ++ factory.setFeature(ENABLE_EXTENSION_FUNCTIONS, true); ++ } catch (XPathFactoryConfigurationException ex) { ++ isSupported = false; ++ } ++ return isSupported; ++ } ++ ++ class SimplePolicy extends Policy { ++ ++ private final Permissions perms; ++ ++ public SimplePolicy(Permission... permissions) { ++ perms = new Permissions(); ++ for (Permission permission : permissions) { ++ perms.add(permission); ++ } ++ } ++ ++ @Override ++ public PermissionCollection getPermissions(CodeSource cs) { ++ return perms; ++ } ++ ++ @Override ++ public PermissionCollection getPermissions(ProtectionDomain pd) { ++ return perms; ++ } ++ ++ @Override ++ public boolean implies(ProtectionDomain pd, Permission p) { ++ return perms.implies(p); ++ } ++ ++ //for older jdk ++ @Override ++ public void refresh() { ++ } ++ } ++} +--- ./jdk/test/javax/xml/jaxp/transform/8004476/XSLTExFuncTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/transform/8004476/XSLTExFuncTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,248 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8004476 ++ * @summary test XSLT extension functions ++ * @run main/othervm XSLTExFuncTest ++ */ ++ ++import java.io.StringWriter; ++import java.security.AllPermission; ++import java.security.CodeSource; ++import java.security.Permission; ++import java.security.PermissionCollection; ++import java.security.Permissions; ++import java.security.Policy; ++import java.security.ProtectionDomain; ++import javax.xml.transform.*; ++import javax.xml.transform.sax.SAXSource; ++import javax.xml.transform.stream.StreamResult; ++import org.xml.sax.InputSource; ++ ++/** ++ * test XSLT extension functions ++ * ++ * @author huizhe.wang@oracle.com ++ */ ++public class XSLTExFuncTest extends TestBase { ++ ++ final static String ENABLE_EXTENSION_FUNCTIONS = "http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions"; ++ final static String CLASSNAME = "DocumentBuilderFactoryImpl"; ++ ++ /** ++ * Creates a new instance of StreamReader ++ */ ++ public XSLTExFuncTest(String name) { ++ super(name); ++ } ++ boolean hasSM; ++ String xslFile, xslFileId; ++ String xmlFile, xmlFileId; ++ ++ protected void setUp() { ++ super.setUp(); ++ xmlFile = filepath + "/tokenize.xml"; ++ xslFile = filepath + "/tokenize.xsl"; ++ ++ /** ++ * On Windows platform it needs triple '/' for valid URL while double '/' is enough on Linux or Solaris. ++ * Here use file:/// directly to make it work on Windows and it will not impact other platforms. ++ */ ++ xslFileId = "file:///" + xslFile; ++ } ++ ++ /** ++ * @param args the command line arguments ++ */ ++ public static void main(String[] args) { ++ XSLTExFuncTest test = new XSLTExFuncTest("OneTest"); ++ test.setUp(); ++ ++ test.testExtFunc(); ++ test.testExtFuncNotAllowed(); ++ test.testEnableExtFunc(); ++ test.testTemplatesEnableExtFunc(); ++ test.tearDown(); ++ ++ } ++ ++ /** ++ * by default, extension function is enabled ++ */ ++ public void testExtFunc() { ++ TransformerFactory factory = TransformerFactory.newInstance(); ++ ++ try { ++ transform(factory); ++ System.out.println("testExtFunc: OK"); ++ } catch (TransformerConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (TransformerException ex) { ++ fail(ex.getMessage()); ++ } ++ } ++ ++ /** ++ * Security is enabled, extension function not allowed ++ */ ++ public void testExtFuncNotAllowed() { ++ Policy p = new SimplePolicy(new AllPermission()); ++ Policy.setPolicy(p); ++ System.setSecurityManager(new SecurityManager()); ++ TransformerFactory factory = TransformerFactory.newInstance(); ++ ++ try { ++ transform(factory); ++ } catch (TransformerConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (TransformerException ex) { ++ //expected since extension function is disallowed ++ System.out.println("testExtFuncNotAllowed: OK"); ++ } finally { ++ System.setSecurityManager(null); ++ } ++ } ++ ++ /** ++ * Security is enabled, use new feature: enableExtensionFunctions ++ */ ++ public void testEnableExtFunc() { ++ Policy p = new SimplePolicy(new AllPermission()); ++ Policy.setPolicy(p); ++ System.setSecurityManager(new SecurityManager()); ++ TransformerFactory factory = TransformerFactory.newInstance(); ++ ++ /** ++ * Use of the extension function 'http://exslt.org/strings:tokenize' is ++ * not allowed when the secure processing feature is set to true. ++ * Attempt to use the new property to enable extension function ++ */ ++ boolean isExtensionSupported = enableExtensionFunction(factory); ++ ++ try { ++ transform(factory); ++ System.out.println("testEnableExt: OK"); ++ } catch (TransformerConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (TransformerException e) { ++ fail(e.getMessage()); ++ } finally { ++ System.setSecurityManager(null); ++ } ++ } ++ ++ /** ++ * use Templates template = factory.newTemplates(new StreamSource( new ++ * FileInputStream(xslFilename))); // Use the template to create a ++ * transformer Transformer xformer = template.newTransformer(); ++ * ++ * @param factory ++ * @return ++ */ ++ /** ++ * Security is enabled, use new feature: enableExtensionFunctions Use the ++ * template to create a transformer ++ */ ++ public void testTemplatesEnableExtFunc() { ++ Policy p = new SimplePolicy(new AllPermission()); ++ Policy.setPolicy(p); ++ System.setSecurityManager(new SecurityManager()); ++ TransformerFactory factory = TransformerFactory.newInstance(); ++ ++ /** ++ * Use of the extension function 'http://exslt.org/strings:tokenize' is ++ * not allowed when the secure processing feature is set to true. ++ * Attempt to use the new property to enable extension function ++ */ ++ boolean isExtensionSupported = enableExtensionFunction(factory); ++ ++ try { ++ SAXSource xslSource = new SAXSource(new InputSource(xslFile)); ++ xslSource.setSystemId(xslFileId); ++ Templates template = factory.newTemplates(xslSource); ++ Transformer transformer = template.newTransformer(); ++ StringWriter stringResult = new StringWriter(); ++ Result result = new StreamResult(stringResult); ++ transformer.transform(new SAXSource(new InputSource(xmlFile)), result); ++ System.out.println("testTemplatesEnableExtFunc: OK"); ++ } catch (TransformerConfigurationException e) { ++ fail(e.getMessage()); ++ } catch (TransformerException e) { ++ fail(e.getMessage()); ++ } finally { ++ System.setSecurityManager(null); ++ } ++ } ++ ++ boolean enableExtensionFunction(TransformerFactory factory) { ++ boolean isSupported = true; ++ try { ++ factory.setFeature(ENABLE_EXTENSION_FUNCTIONS, true); ++ } catch (TransformerConfigurationException ex) { ++ isSupported = false; ++ } ++ return isSupported; ++ } ++ ++ void transform(TransformerFactory factory) throws TransformerConfigurationException, TransformerException { ++ SAXSource xslSource = new SAXSource(new InputSource(xslFile)); ++ xslSource.setSystemId(xslFileId); ++ Transformer transformer = factory.newTransformer(xslSource); ++ StringWriter stringResult = new StringWriter(); ++ Result result = new StreamResult(stringResult); ++ transformer.transform(new SAXSource(new InputSource(xmlFile)), result); ++ } ++ ++ class SimplePolicy extends Policy { ++ ++ private final Permissions perms; ++ ++ public SimplePolicy(Permission... permissions) { ++ perms = new Permissions(); ++ for (Permission permission : permissions) { ++ perms.add(permission); ++ } ++ } ++ ++ @Override ++ public PermissionCollection getPermissions(CodeSource cs) { ++ return perms; ++ } ++ ++ @Override ++ public PermissionCollection getPermissions(ProtectionDomain pd) { ++ return perms; ++ } ++ ++ @Override ++ public boolean implies(ProtectionDomain pd, Permission p) { ++ return perms.implies(p); ++ } ++ ++ //for older jdk ++ @Override ++ public void refresh() { ++ } ++ } ++} +--- ./jdk/test/javax/xml/jaxp/transform/8004476/tokenize.xml 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/transform/8004476/tokenize.xml 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,7 @@ ++ ++ ++
++ Is this EXSLT? No. no ++ Is this EXSLT? No. no ++ ++ +--- ./jdk/test/javax/xml/jaxp/transform/8004476/tokenize.xsl 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/transform/8004476/tokenize.xsl 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,30 @@ ++ ++ ++ ++ ++ ++ ++ ++ - ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ - ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/jaxp/validation/8015092/XPathWhiteSpaceTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015092/XPathWhiteSpaceTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63488,62 +112264,115 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ -+import java.io.ByteArrayInputStream; -+import java.io.IOException; -+import java.util.logging.Logger; -+import javax.imageio.ImageIO; ++ + +/** + * @test -+ * @bug 8019853 8023258 -+ * @summary Test that the default user context is used when in the main -+ * application context. This test must not be run in same VM or agent -+ * VM mode: it would not test the intended behavior. -+ * @run main/othervm TestLoggingWithMainAppContext ++ * @bug 8015092 ++ * @summary whitespace within patterns in Selector XPath expression is accepted ++ * @run main/othervm XPathWhiteSpaceTest + */ -+public class TestLoggingWithMainAppContext { -+ -+ public static void main(String[] args) throws IOException { -+ System.out.println("Creating loggers."); -+ -+ // These loggers will be created in the default user context. -+ final Logger foo1 = Logger.getLogger( "foo" ); -+ final Logger bar1 = Logger.getLogger( "foo.bar" ); -+ if (bar1.getParent() != foo1) { -+ throw new RuntimeException("Parent logger of bar1 "+bar1+" is not "+foo1); -+ } -+ System.out.println("bar1.getParent() is the same as foo1"); + -+ // Set a security manager -+ System.setSecurityManager(new SecurityManager()); -+ System.out.println("Now running with security manager"); ++import java.io.*; ++import javax.xml.XMLConstants; ++import javax.xml.validation.Schema; ++import javax.xml.validation.SchemaFactory; ++import org.xml.sax.SAXException; + -+ // Triggers the creation of the main AppContext -+ ByteArrayInputStream is = new ByteArrayInputStream(new byte[] { 0, 1 }); -+ ImageIO.read(is); // triggers calls to system loggers & creation of main AppContext ++/** ++ * http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint ++ * For readability, whitespace may be used in selector XPath expressions even though ++ * not explicitly allowed by the grammar: ++ * whitespace may be freely added within patterns before or after any token. ++ * ++ * @author huizhe.wang@oracle.com ++ */ ++public class XPathWhiteSpaceTest { ++ static final String XSDFILE = "/idJ029.xsd"; + -+ // verify that we're still using the default user context -+ final Logger bar2 = Logger.getLogger( "foo.bar" ); -+ if (bar1 != bar2) { -+ throw new RuntimeException("bar2 "+bar2+" is not the same as bar1 "+bar1); -+ } -+ System.out.println("bar2 is the same as bar1"); -+ if (bar2.getParent() != foo1) { -+ throw new RuntimeException("Parent logger of bar2 "+bar2+" is not foo1 "+foo1); -+ } -+ System.out.println("bar2.getParent() is the same as foo1"); -+ final Logger foo2 = Logger.getLogger("foo"); -+ if (foo1 != foo2) { -+ throw new RuntimeException("foo2 "+foo2+" is not the same as foo1 "+foo1); ++ public static void main(String[] args) throws Exception { ++ try{ ++ SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); ++ Schema schema = schemaFactory.newSchema(new File(System.getProperty("test.src", ".")+XSDFILE)); ++ } catch (SAXException e) { ++ throw new RuntimeException(e.getMessage()); + } -+ System.out.println("foo2 is the same as foo1"); + -+ System.out.println("Test passed."); ++ + } ++ +} ---- jdk/test/java/util/logging/TestMainAppContext.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/java/util/logging/TestMainAppContext.java 2014-04-20 12:39:16.000000000 -0700 -@@ -0,0 +1,85 @@ +--- ./jdk/test/javax/xml/jaxp/validation/8015092/idIxpns.xsd 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015092/idIxpns.xsd 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,12 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/jaxp/validation/8015092/idIxpns1.xsd 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015092/idIxpns1.xsd 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,12 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/jaxp/validation/8015092/idJ029.xsd 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015092/idJ029.xsd 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,21 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/jaxp/validation/8015092/idJimp.xsd 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015092/idJimp.xsd 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,11 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/jaxp/validation/8015243/AnyURITest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015243/AnyURITest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63566,96 +112395,126 @@ + * or visit www.oracle.com if you need additional information or have any + * questions. + */ -+import java.util.logging.Logger; -+import sun.awt.AppContext; -+import sun.awt.SunToolkit; + + +/** + * @test -+ * @bug 8026404 -+ * @summary checks that calling getLogger() from a Thread whose ThreadGroup is -+ * a child of the main root group doesn't throw an exception. -+ * @build TestMainAppContext -+ * @run main/othervm TestMainAppContext -+ * @author danielfuchs ++ * @bug 8015243 ++ * @summary verifies that illegal URI such as // is rejected ++ * @run main/othervm AnyURITest + */ -+public class TestMainAppContext { + -+ static volatile Throwable thrown = null; ++import java.io.*; ++import javax.xml.XMLConstants; ++import javax.xml.validation.Schema; ++import javax.xml.validation.SchemaFactory; ++import org.xml.sax.SAXException; + -+ public static void main(String... args) throws Exception { -+ ThreadGroup rootTG = Thread.currentThread().getThreadGroup(); -+ while (rootTG.getParent() != null) { -+ rootTG = rootTG.getParent(); -+ } ++/** ++ * Similar to java.net.URI, allow empty authority prior to non-empty ++ * path, query component or fragment identifier ++ * ++ * @author huizhe.wang@oracle.com ++ */ ++public class AnyURITest { ++ static final String XSDFILE = "anyURI_b006.xsd"; + -+ ThreadGroup tg = new ThreadGroup(rootTG, "FakeApplet"); -+ final Thread t1 = new Thread(tg, "createNewAppContext") { -+ @Override -+ public void run() { -+ try { -+ AppContext context = SunToolkit.createNewAppContext(); -+ } catch(Throwable t) { -+ thrown = t; -+ } -+ } -+ }; -+ t1.start(); -+ t1.join(); -+ if (thrown != null) { -+ throw new RuntimeException("Unexpected exception: " + thrown, thrown); ++ public static void main(String[] args) throws Exception { ++ try{ ++ SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); ++ Schema schema = schemaFactory.newSchema(new File(System.getProperty("test.src", "."), XSDFILE)); ++ throw new RuntimeException("Illegal URI // should be rejected."); ++ } catch (SAXException e) { ++ //expected: ++ //Enumeration value '//' is not in the value space of the base type, anyURI. + } -+ Thread t2 = new Thread(tg, "BugDetector") { + -+ @Override -+ public void run() { -+ try { -+ Logger.getLogger("foo").info("Done"); -+ } catch (Throwable x) { -+ thrown = x; -+ } -+ } + -+ }; ++ } + -+ System.setSecurityManager(new SecurityManager()); -+ t2.start(); -+ t2.join(); -+ if (thrown != null) { -+ throw new RuntimeException("Test failed: " + thrown, thrown); -+ } ++} +--- ./jdk/test/javax/xml/jaxp/validation/8015243/anyURI_b006.xsd 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/jaxp/validation/8015243/anyURI_b006.xsd 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,32 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +--- ./jdk/test/javax/xml/ws/clientjar/TestService.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/ws/clientjar/TestService.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++import javax.jws.WebService; + ++@WebService(serviceName ="TestService", targetNamespace = "http://test/jaxws/sample/") ++public class TestService { ++ public void foo() { ++ try { ++ bar(); ++ } catch (Exception e) { ++ throw new AssertionError(e); ++ } + } + ++ private void bar() { ++ // nothing done ++ } +} ---- jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2013-09-06 11:29:52.000000000 -0700 -+++ jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -51,7 +51,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - NULL=/dev/null - PS=":" - FS="/" ---- jdk/test/javax/imageio/plugins/jpeg/JpegWriterLeakTest.java 2013-09-06 11:29:52.000000000 -0700 -+++ jdk/test/javax/imageio/plugins/jpeg/JpegWriterLeakTest.java 2014-04-20 12:39:15.000000000 -0700 -@@ -23,7 +23,7 @@ - - /** - * @test -- * @bug 8020983 -+ * @bug 8020983 8024697 - * @summary Test verifies that jpeg writer instances are collected - * even if destroy() or reset() methods is not invoked. - * ---- jdk/test/javax/imageio/plugins/jpeg/TruncatedImageWarningTest.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/javax/imageio/plugins/jpeg/TruncatedImageWarningTest.java 2014-04-20 12:39:15.000000000 -0700 -@@ -0,0 +1,58 @@ +--- ./jdk/test/javax/xml/ws/clientjar/TestWsImport.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/javax/xml/ws/clientjar/TestWsImport.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,151 @@ +/* -+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it @@ -63677,129 +112536,136 @@ + * questions. + */ + -+import java.io.File; ++/* ++ * @test ++ * @bug 8016271 8026405 ++ * @summary wsimport -clientjar does not create portable jar on windows due to hardcoded '\' ++ * @run main/othervm TestWsImport ++ */ ++ ++import javax.xml.namespace.QName; ++import javax.xml.ws.Endpoint; ++import javax.xml.ws.Service; ++import java.io.InputStreamReader; +import java.io.IOException; -+import javax.imageio.ImageIO; -+import javax.imageio.ImageReader; -+import javax.imageio.event.IIOReadWarningListener; -+import javax.imageio.stream.ImageInputStream; ++import java.io.BufferedReader; ++import java.io.File; ++import java.net.InetSocketAddress; ++import java.net.URL; ++import java.nio.file.Files; ++import java.nio.file.FileVisitResult; ++import java.nio.file.Path; ++import java.nio.file.Paths; ++import java.nio.file.SimpleFileVisitor; ++import java.nio.file.attribute.BasicFileAttributes; ++import static java.nio.file.FileVisitResult.*; ++import java.util.Enumeration; ++import java.util.jar.JarFile; + -+public class TruncatedImageWarningTest implements IIOReadWarningListener { ++import com.sun.net.httpserver.HttpContext; ++import com.sun.net.httpserver.HttpServer; + -+ private static String fileName = "truncated.jpg"; -+ boolean receivedWarning = false; ++public class TestWsImport { + + public static void main(String[] args) throws IOException { + -+ String sep = System.getProperty("file.separator"); -+ String dir = System.getProperty("test.src", "."); -+ String filePath = dir+sep+fileName; -+ System.out.println("Test file: " + filePath); -+ File f = new File(filePath); -+ ImageInputStream in = ImageIO.createImageInputStream(f); -+ ImageReader reader = ImageIO.getImageReaders(in).next(); -+ TruncatedImageWarningTest twt = new TruncatedImageWarningTest(); -+ reader.addIIOReadWarningListener(twt); -+ reader.setInput(in); -+ reader.read(0); -+ if (!twt.receivedWarning) { -+ throw new RuntimeException("No expected warning"); ++ String javaHome = System.getProperty("java.home"); ++ if (javaHome.endsWith("jre")) { ++ javaHome = new File(javaHome).getParent(); ++ } ++ String wsimport = javaHome + File.separator + "bin" + File.separator + "wsimport"; ++ if (System.getProperty("os.name").startsWith("Windows")) { ++ wsimport = wsimport.concat(".exe"); + } -+ } + -+ public void warningOccurred(ImageReader source, String warning) { -+ System.out.println("Expected warning: " + warning); -+ receivedWarning = true; ++ Endpoint endpoint = Endpoint.create(new TestService()); ++ HttpServer httpServer = null; ++ try { ++ // Manually create HttpServer here using ephemeral address for port ++ // so as to not end up with attempt to bind to an in-use port ++ httpServer = HttpServer.create(new InetSocketAddress(0), 0); ++ HttpContext httpContext = httpServer.createContext("/hello"); ++ int port = httpServer.getAddress().getPort(); ++ System.out.println("port = " + port); ++ httpServer.start(); ++ endpoint.publish(httpContext); ++ String address = "http://localhost:" + port + "/hello"; ++ ++ Service service = Service.create(new URL(address + "?wsdl"), ++ new QName("http://test/jaxws/sample/", "TestService")); ++ ++ String[] wsargs = { ++ wsimport, ++ "-p", ++ "wstest", ++ "-J-Djavax.xml.accessExternalSchema=all", ++ "-J-Dcom.sun.tools.internal.ws.Invoker.noSystemProxies=true", ++ address + "?wsdl", ++ "-clientjar", ++ "wsjar.jar" ++ }; ++ ProcessBuilder pb = new ProcessBuilder(wsargs); ++ pb.redirectErrorStream(true); ++ Process p = pb.start(); ++ BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream())); ++ String s = r.readLine(); ++ while (s != null) { ++ System.out.println(s.trim()); ++ s = r.readLine(); ++ } ++ p.waitFor(); ++ p.destroy(); ++ ++ try (JarFile jarFile = new JarFile("wsjar.jar")) { ++ for (Enumeration em = jarFile.entries(); em.hasMoreElements();) { ++ String fileName = em.nextElement().toString(); ++ if (fileName.contains("\\")) { ++ throw new RuntimeException("\"\\\" character detected in jar file: " + fileName); ++ } ++ } ++ } ++ } catch (Exception e) { ++ e.printStackTrace(); ++ throw new RuntimeException(e.getMessage()); ++ } finally { ++ endpoint.stop(); ++ if (httpServer != null) { ++ httpServer.stop(0); ++ } ++ Path p = Paths.get("wsjar.jar"); ++ Files.deleteIfExists(p); ++ p = Paths.get("wstest"); ++ if (Files.exists(p)) { ++ try { ++ Files.walkFileTree(p, new SimpleFileVisitor() { ++ @Override ++ public FileVisitResult visitFile(Path file, ++ BasicFileAttributes attrs) throws IOException { ++ ++ Files.delete(file); ++ return CONTINUE; ++ } ++ @Override ++ public FileVisitResult postVisitDirectory(Path dir, ++ IOException exc) throws IOException { ++ ++ if (exc == null) { ++ Files.delete(dir); ++ return CONTINUE; ++ } else { ++ throw exc; ++ } ++ } ++ }); ++ } catch (IOException ioe) { ++ ioe.printStackTrace(); ++ } ++ } ++ } + } +} -Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg differ ---- jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2013-09-06 11:29:52.000000000 -0700 -+++ jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -84,7 +84,7 @@ - TMP="/tmp" - ;; - -- Linux ) -+ Linux | *BSD | Darwin ) - VAR="A different value for Linux" - DEFAULT_JDK=/ - FILESEP="/" -@@ -92,14 +92,6 @@ - TMP="/tmp" - ;; - -- Darwin ) -- VAR="A different value for MacOSX" -- DEFAULT_JDK=/usr -- FILESEP="/" -- PATHSEP=":" -- TMP="/tmp" -- ;; -- - Windows* ) - VAR="A different value for Win32" - DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0" ---- jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java 2013-09-06 11:29:54.000000000 -0700 -+++ jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java 2014-04-20 12:39:15.000000000 -0700 -@@ -23,7 +23,7 @@ - - /* - * @test -- * @bug 4915825 4921009 4934965 4977469 -+ * @bug 4915825 4921009 4934965 4977469 8019584 - * @summary Tests behavior when client or server gets object of unknown class - * @author Eamonn McManus - * @run clean MissingClassTest SingleClassLoader ---- jdk/test/javax/script/CommonSetup.sh 2013-09-06 11:29:55.000000000 -0700 -+++ jdk/test/javax/script/CommonSetup.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -36,7 +36,7 @@ - - OS=`uname -s` - case "$OS" in -- SunOS | Linux | Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - ;; ---- jdk/test/javax/script/GetInterfaceTest.java 2013-09-06 11:29:55.000000000 -0700 -+++ jdk/test/javax/script/GetInterfaceTest.java 2014-04-20 12:39:15.000000000 -0700 -@@ -67,11 +67,11 @@ - foo2.bar2(); - } - -- interface Foo { -+ public interface Foo { - public void bar(); - } - -- interface Foo2 extends Foo { -+ public interface Foo2 extends Foo { - public void bar2(); - } - } ---- jdk/test/javax/security/auth/Subject/doAs/Test.sh 2013-09-06 11:29:55.000000000 -0700 -+++ jdk/test/javax/security/auth/Subject/doAs/Test.sh 2014-04-20 12:39:15.000000000 -0700 -@@ -33,17 +33,7 @@ - # set platform-dependent variables - OS=`uname -s` - case "$OS" in -- SunOS ) -- PS=":" -- FS="/" -- RM="/bin/rm -f" -- ;; -- Linux ) -- PS=":" -- FS="/" -- RM="/bin/rm -f" -- ;; -- Darwin ) -+ SunOS | Linux | *BSD | Darwin ) - PS=":" - FS="/" - RM="/bin/rm -f" ---- jdk/test/jprt.config 2013-09-06 11:30:01.000000000 -0700 -+++ jdk/test/jprt.config 2014-04-20 12:39:16.000000000 -0700 +--- ./jdk/test/jprt.config 2013-09-06 11:30:01.000000000 -0700 ++++ ./jdk/test/jprt.config 2014-06-06 19:56:34.000000000 -0700 @@ -71,8 +71,8 @@ # Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise. @@ -63867,8 +112733,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk # Export PATH setting PATH="${path4sdk}" ---- jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2013-09-06 11:30:01.000000000 -0700 -+++ jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2014-04-20 12:39:16.000000000 -0700 +--- ./jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2013-09-06 11:30:01.000000000 -0700 ++++ ./jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2014-06-06 19:56:34.000000000 -0700 @@ -50,7 +50,7 @@ # set platform-dependent variables OS=`uname -s` @@ -63878,8 +112744,295 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2013-09-06 11:30:02.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,194 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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. ++ */ ++ ++package jdk.testlibrary; ++ ++import java.io.IOException; ++import java.nio.file.DirectoryNotEmptyException; ++import java.nio.file.FileVisitResult; ++import java.nio.file.Files; ++import java.nio.file.NoSuchFileException; ++import java.nio.file.Path; ++import java.nio.file.SimpleFileVisitor; ++import java.nio.file.attribute.BasicFileAttributes; ++import java.util.ArrayList; ++import java.util.List; ++ ++ ++/** ++ * Common library for various test file utility functions. ++ */ ++public final class FileUtils { ++ ++ private static final boolean isWindows = ++ System.getProperty("os.name").startsWith("Windows"); ++ private static final int RETRY_DELETE_MILLIS = isWindows ? 500 : 0; ++ private static final int MAX_RETRY_DELETE_TIMES = isWindows ? 15 : 0; ++ ++ /** ++ * Deletes a file, retrying if necessary. ++ * ++ * @param path the file to delete ++ * ++ * @throws NoSuchFileException ++ * if the file does not exist (optional specific exception) ++ * @throws DirectoryNotEmptyException ++ * if the file is a directory and could not otherwise be deleted ++ * because the directory is not empty (optional specific exception) ++ * @throws IOException ++ * if an I/O error occurs ++ */ ++ public static void deleteFileWithRetry(Path path) ++ throws IOException ++ { ++ try { ++ deleteFileWithRetry0(path); ++ } catch (InterruptedException x) { ++ throw new IOException("Interrupted while deleting.", x); ++ } ++ } ++ ++ /** ++ * Deletes a file, retrying if necessary. ++ * No exception thrown if file doesn't exist. ++ * ++ * @param path the file to delete ++ * ++ * @throws NoSuchFileException ++ * if the file does not exist (optional specific exception) ++ * @throws DirectoryNotEmptyException ++ * if the file is a directory and could not otherwise be deleted ++ * because the directory is not empty (optional specific exception) ++ * @throws IOException ++ * if an I/O error occurs ++ */ ++ public static void deleteFileIfExistsWithRetry(Path path) ++ throws IOException ++ { ++ try { ++ if(Files.exists(path)) ++ deleteFileWithRetry0(path); ++ } catch (InterruptedException x) { ++ throw new IOException("Interrupted while deleting.", x); ++ } ++ } ++ ++ private static void deleteFileWithRetry0(Path path) ++ throws IOException, InterruptedException ++ { ++ int times = 0; ++ IOException ioe = null; ++ while (true) { ++ try { ++ Files.delete(path); ++ while (Files.exists(path)) { ++ times++; ++ if (times > MAX_RETRY_DELETE_TIMES) ++ throw new IOException("File still exists after " + times + " waits."); ++ Thread.sleep(RETRY_DELETE_MILLIS); ++ } ++ break; ++ } catch (NoSuchFileException | DirectoryNotEmptyException x) { ++ throw x; ++ } catch (IOException x) { ++ // Backoff/retry in case another process is accessing the file ++ times++; ++ if (ioe == null) ++ ioe = x; ++ else ++ ioe.addSuppressed(x); ++ ++ if (times > MAX_RETRY_DELETE_TIMES) ++ throw ioe; ++ Thread.sleep(RETRY_DELETE_MILLIS); ++ } ++ } ++ } ++ ++ /** ++ * Deletes a directory and its subdirectories, retrying if necessary. ++ * ++ * @param dir the directory to delete ++ * ++ * @throws IOException ++ * If an I/O error occurs. Any such exceptions are caught ++ * internally. If only one is caught, then it is re-thrown. ++ * If more than one exception is caught, then the second and ++ * following exceptions are added as suppressed exceptions of the ++ * first one caught, which is then re-thrown. ++ */ ++ public static void deleteFileTreeWithRetry(Path dir) ++ throws IOException ++ { ++ IOException ioe = null; ++ final List excs = deleteFileTreeUnchecked(dir); ++ if (!excs.isEmpty()) { ++ ioe = excs.remove(0); ++ for (IOException x : excs) ++ ioe.addSuppressed(x); ++ } ++ if (ioe != null) ++ throw ioe; ++ } ++ ++ public static List deleteFileTreeUnchecked(Path dir) { ++ final List excs = new ArrayList<>(); ++ try { ++ java.nio.file.Files.walkFileTree(dir, new SimpleFileVisitor() { ++ @Override ++ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { ++ try { ++ deleteFileWithRetry0(file); ++ } catch (IOException x) { ++ excs.add(x); ++ } catch (InterruptedException x) { ++ excs.add(new IOException("Interrupted while deleting.", x)); ++ return FileVisitResult.TERMINATE; ++ } ++ return FileVisitResult.CONTINUE; ++ } ++ @Override ++ public FileVisitResult postVisitDirectory(Path dir, IOException exc) { ++ try { ++ deleteFileWithRetry0(dir); ++ } catch (IOException x) { ++ excs.add(x); ++ } catch (InterruptedException x) { ++ excs.add(new IOException("Interrupted while deleting.", x)); ++ return FileVisitResult.TERMINATE; ++ } ++ return FileVisitResult.CONTINUE; ++ } ++ @Override ++ public FileVisitResult visitFileFailed(Path file, IOException exc) { ++ excs.add(exc); ++ return FileVisitResult.CONTINUE; ++ } ++ }); ++ } catch (IOException x) { ++ excs.add(x); ++ } ++ return excs; ++ } ++} ++ +--- ./jdk/test/sun/awt/datatransfer/DataFlavorComparatorTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/awt/datatransfer/DataFlavorComparatorTest.java 2014-06-06 19:56:31.000000000 -0700 +@@ -0,0 +1,46 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 7173464 ++ @summary Clipboard.getAvailableDataFlavors: Comparison method violates contract ++ @author Petr Pchelko ++ @run main DataFlavorComparatorTest ++*/ ++ ++import sun.awt.datatransfer.DataTransferer; ++ ++import java.awt.datatransfer.DataFlavor; ++ ++public class DataFlavorComparatorTest { ++ ++ public static void main(String[] args) { ++ DataTransferer.DataFlavorComparator comparator = new DataTransferer.DataFlavorComparator(); ++ DataFlavor flavor1 = new DataFlavor("application/image", "Image"); ++ DataFlavor flavor2 = new DataFlavor("application/html", "HTML"); ++ if (comparator.compare(flavor1, flavor2) == 0) { ++ throw new RuntimeException(flavor1.getMimeType() + " and " + flavor2.getMimeType() + ++ " should not be equal"); ++ } ++ } ++} +--- ./jdk/test/sun/management/jdp/JdpTest.sh 2013-09-06 11:30:02.000000000 -0700 ++++ ./jdk/test/sun/management/jdp/JdpTest.sh 2014-06-06 19:56:31.000000000 -0700 +@@ -84,15 +84,29 @@ + ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} ${testappname} >> ${_logname} 2>&1 & + _last_pid=$! + +- npid=`_get_pid` +- if [ "${npid}" = "" ] +- then +- echo "ERROR: Test app not started. Please check machine resources before filing a bug." +- if [ "${_jtreg}" = "yes" ] +- then +- exit 255 +- fi +- fi ++# wait until VM is actually starts. ++# please note, if vm doesn't start for some reason ++# jtreg kills the test by timeout. Don't file a bug. ++ cnt=1 ++ while true ++ do ++ npid=`_get_pid` ++ if [ "${npid}" != "" ] ++ then ++ break ++ fi ++ if [ "${cnt}" = "10" ] ++ then ++ echo "ERROR: Test app not started. Please check machine resources before filing a bug." ++ if [ "${_jtreg}" = "yes" ] ++ then ++ exit 255 ++ fi ++ break ++ fi ++ cnt=`expr $cnt + 1` ++ sleep 1 ++ done + } + + _get_pid(){ +--- ./jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2013-09-06 11:30:02.000000000 -0700 ++++ ./jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -45,37 +45,53 @@ # has to locate libjvm.so. Also $! is not reliable on some releases of MKS. #{ @@ -63959,8 +113112,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk # ---- jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2013-09-06 11:30:02.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2013-09-06 11:30:02.000000000 -0700 ++++ ./jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2014-06-06 19:56:34.000000000 -0700 @@ -35,7 +35,7 @@ UMASK=`umask` @@ -63970,8 +113123,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PATHSEP=":" FILESEP="/" DFILESEP=$FILESEP ---- jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2013-09-06 11:30:02.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2013-09-06 11:30:02.000000000 -0700 ++++ ./jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -86,10 +86,12 @@ # on Windows 98. @@ -63989,8 +113142,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk JAVA=${TESTJAVA}/bin/java CLASSPATH=${TESTCLASSES} ---- jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2013-09-06 11:30:02.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2013-09-06 11:30:02.000000000 -0700 ++++ ./jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -70,10 +70,12 @@ # security the password file. @@ -64008,8 +113161,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk # Create configuration file and dummy password file ---- jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2013-09-06 11:30:02.000000000 -0700 -+++ jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2013-09-06 11:30:02.000000000 -0700 ++++ ./jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -69,10 +69,12 @@ # security the password file. @@ -64027,8 +113180,45 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk # Create management and SSL configuration files ---- jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2013-09-06 11:30:03.000000000 -0700 -+++ jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/misc/IoTrace/IoTraceAgent.java 2013-09-06 11:30:03.000000000 -0700 ++++ ./jdk/test/sun/misc/IoTrace/IoTraceAgent.java 2014-06-06 19:56:31.000000000 -0700 +@@ -27,6 +27,7 @@ + import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_STATIC; + import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_SUPER; + import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ILOAD; ++import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ALOAD; + import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.INVOKESPECIAL; + import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.INVOKESTATIC; + import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.IRETURN; +@@ -165,6 +166,7 @@ + + // return the value from the called method + mv.visitInsn(retType.getOpcode(IRETURN)); ++ mv.visitMaxs(0, 0); + mv.visitEnd(); + } + +@@ -172,8 +174,10 @@ + MethodVisitor mv = cw.visitMethod(ACC_PRIVATE, "", "()V", null, + null); + mv.visitCode(); ++ mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "", "()V"); + mv.visitInsn(RETURN); ++ mv.visitMaxs(0, 0); + mv.visitEnd(); + + cw.visitEnd(); +--- ./jdk/test/sun/misc/IoTrace/ioTraceTest.sh 2013-09-06 11:30:03.000000000 -0700 ++++ ./jdk/test/sun/misc/IoTrace/ioTraceTest.sh 2014-06-06 19:56:31.000000000 -0700 +@@ -31,4 +31,4 @@ + ${TESTJAVA}/bin/jar cfm iotraceagent.jar ${TESTSRC}/iotraceagent.mf IoTraceAgent.class IoTraceListener.class + + cd ${PWD} +-${TESTJAVA}/bin/java ${TESTVMOPTS} -javaagent:${TESTCLASSES}/iotraceagent.jar -cp ${TESTCLASSES} $* ++${TESTJAVA}/bin/java -Xverify:all ${TESTVMOPTS} -javaagent:${TESTCLASSES}/iotraceagent.jar -cp ${TESTCLASSES} $* +--- ./jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2013-09-06 11:30:03.000000000 -0700 ++++ ./jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -36,7 +36,7 @@ OS=`uname -s` @@ -64038,8 +113228,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/net/www/MarkResetTest.sh 2013-09-06 11:30:03.000000000 -0700 -+++ jdk/test/sun/net/www/MarkResetTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/net/www/MarkResetTest.sh 2013-09-06 11:30:03.000000000 -0700 ++++ ./jdk/test/sun/net/www/MarkResetTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -28,7 +28,7 @@ OS=`uname -s` @@ -64049,8 +113239,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2013-09-06 11:30:04.000000000 -0700 -+++ jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2013-09-06 11:30:04.000000000 -0700 ++++ ./jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2014-06-06 19:56:34.000000000 -0700 @@ -28,7 +28,7 @@ OS=`uname -s` @@ -64060,8 +113250,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/net/www/protocol/jar/B5105410.sh 2013-09-06 11:30:04.000000000 -0700 -+++ jdk/test/sun/net/www/protocol/jar/B5105410.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/net/www/protocol/jar/B5105410.sh 2013-09-06 11:30:04.000000000 -0700 ++++ ./jdk/test/sun/net/www/protocol/jar/B5105410.sh 2014-06-06 19:56:34.000000000 -0700 @@ -31,7 +31,7 @@ OS=`uname -s` @@ -64071,8 +113261,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2013-09-06 11:30:04.000000000 -0700 -+++ jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2013-09-06 11:30:04.000000000 -0700 ++++ ./jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2014-06-06 19:56:34.000000000 -0700 @@ -31,7 +31,7 @@ OS=`uname -s` @@ -64082,8 +113272,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/nio/ch/SelProvider.java 2013-09-06 11:30:04.000000000 -0700 -+++ jdk/test/sun/nio/ch/SelProvider.java 2014-04-20 12:39:14.000000000 -0700 +--- ./jdk/test/sun/nio/ch/SelProvider.java 2013-09-06 11:30:04.000000000 -0700 ++++ ./jdk/test/sun/nio/ch/SelProvider.java 2014-06-06 19:56:34.000000000 -0700 @@ -39,7 +39,7 @@ expected = "sun.nio.ch.DevPollSelectorProvider"; } else if ("Linux".equals(osname)) { @@ -64093,8 +113283,825 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk expected = "sun.nio.ch.KQueueSelectorProvider"; } else { return; ---- jdk/test/sun/security/krb5/runNameEquals.sh 2013-09-06 11:30:07.000000000 -0700 -+++ jdk/test/sun/security/krb5/runNameEquals.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/jgss/spnego/MechTokenMissing.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/security/jgss/spnego/MechTokenMissing.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,53 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8024861 ++ * @summary Incomplete token triggers GSS-API NullPointerException ++ */ ++ ++import org.ietf.jgss.GSSContext; ++import org.ietf.jgss.GSSCredential; ++import org.ietf.jgss.GSSException; ++import org.ietf.jgss.GSSManager; ++ ++public class MechTokenMissing { ++ public static void main(String[] args) throws Exception { ++ GSSCredential cred = null; ++ GSSContext ctx = GSSManager.getInstance().createContext(cred); ++ ++ String var = ++ /*0000*/ "60 1C 06 06 2B 06 01 05 05 02 A0 12 30 10 A0 0E " + ++ /*0010*/ "30 0C 06 0A 2B 06 01 04 01 82 37 02 02 0A "; ++ byte[] token = new byte[var.length()/3]; ++ for (int i=0; i " + to); + System.out.println(" expected: " + Arrays.toString(paths)); + String[] result = Realm.getRealmsList(from, to); +- System.out.println(" result: " + Arrays.toString(result)); +- if (result == null) { +- if (paths.length == 0) { +- // OK +- } else { +- throw new Exception("Shouldn't have a valid path."); +- } ++ System.out.println(" result: " + Arrays.toString(result)); ++ if (result == null || result.length == 0) { ++ throw new Exception("There is always a valid path."); + } else if(result.length != paths.length) { + throw new Exception("Length of path not correct"); + } else { + for (int i=0; i>> KDCCommunication: kdc=kdc.rabbit.hole UDP:(\\d)...., " + +- "timeout=(\\d)000,"); ++ "timeout=(\\d+),"); ++ ++ // Ratio for timeout values of all timeout tests. Not final so that ++ // each test can choose their own. ++ static float ratio = 2f; ++ ++ static void setRatio(float ratio) { ++ BadKdc.ratio = ratio; ++ } ++ ++ static float getRatio() { ++ return ratio; ++ } ++ ++ // Gets real timeout value. This method is called when writing krb5.conf ++ static int toReal(int from) { ++ return (int)(from * ratio + .5); ++ } ++ ++ // De-ratio a millisecond value to second ++ static int toSymbolicSec(int from) { ++ return (int)(from / ratio / 1000f + 0.5); ++ } + + /* + * There are several cases this test fails: +@@ -97,7 +119,7 @@ + + fw.write("[libdefaults]\n" + + "default_realm = " + OneKDC.REALM + "\n" + +- "kdc_timeout = 2000\n"); ++ "kdc_timeout = " + toReal(2000) + "\n"); + fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + + "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + + "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + +@@ -171,7 +193,8 @@ + Matcher m = re.matcher(line); + if (m.find()) { + System.out.println(line); +- sb.append(m.group(1)).append(m.group(2)); ++ sb.append(m.group(1)) ++ .append(toSymbolicSec(Integer.parseInt(m.group(2)))); + } + } + if (failed) sb.append('-'); +--- ./jdk/test/sun/security/krb5/auto/BadKdc1.java 2013-09-06 11:30:06.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/auto/BadKdc1.java 2014-06-06 19:56:32.000000000 -0700 +@@ -28,14 +28,21 @@ + * @summary krb5 should not try to access unavailable kdc too often + */ + +-import java.io.*; + import java.security.Security; + + public class BadKdc1 { + + public static void main(String[] args) + throws Exception { +- Security.setProperty("krb5.kdc.bad.policy", "tryLess"); ++ ++ // 5 sec is default timeout for tryLess ++ if (BadKdc.getRatio() > 2.5) { ++ Security.setProperty("krb5.kdc.bad.policy", ++ "tryLess:1," + BadKdc.toReal(2000)); ++ } else { ++ Security.setProperty("krb5.kdc.bad.policy", "tryLess"); ++ } ++ + BadKdc.go( + "121212222222(32){1,2}1222(32){1,2}", // 1 2 + // The above line means try kdc1 for 2 seconds then kdc1 +--- ./jdk/test/sun/security/krb5/auto/BadKdc2.java 2013-09-06 11:30:06.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/auto/BadKdc2.java 2014-06-06 19:56:32.000000000 -0700 +@@ -35,7 +35,12 @@ + + public static void main(String[] args) + throws Exception { +- Security.setProperty("krb5.kdc.bad.policy", "tryLess:2,1000"); ++ ++ // 1 sec is too short. ++ BadKdc.setRatio(3.0f); ++ ++ Security.setProperty( ++ "krb5.kdc.bad.policy", "tryLess:2," + BadKdc.toReal(1000)); + BadKdc.go( + "121212222222(32){1,2}11112121(32){1,2}", // 1 2 + "11112121(32){1,2}11112121(32){1,2}", // 1 2 +--- ./jdk/test/sun/security/krb5/auto/KDC.java 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/auto/KDC.java 2014-06-06 19:56:32.000000000 -0700 +@@ -630,7 +630,7 @@ + * @return the response + * @throws java.lang.Exception for various errors + */ +- private byte[] processMessage(byte[] in) throws Exception { ++ protected byte[] processMessage(byte[] in) throws Exception { + if ((in[0] & 0x1f) == Krb5.KRB_AS_REQ) + return processAsReq(in); + else +@@ -643,7 +643,7 @@ + * @return the response + * @throws java.lang.Exception for various errors + */ +- private byte[] processTgsReq(byte[] in) throws Exception { ++ protected byte[] processTgsReq(byte[] in) throws Exception { + TGSReq tgsReq = new TGSReq(in); + PrincipalName service = tgsReq.reqBody.sname; + if (options.containsKey(KDC.Option.RESP_NT)) { +@@ -809,7 +809,7 @@ + * @return the response + * @throws java.lang.Exception for various errors + */ +- private byte[] processAsReq(byte[] in) throws Exception { ++ protected byte[] processAsReq(byte[] in) throws Exception { + ASReq asReq = new ASReq(in); + int[] eTypes = null; + List outPAs = new ArrayList<>(); +--- ./jdk/test/sun/security/krb5/auto/LoginNoPass.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/security/krb5/auto/LoginNoPass.java 2014-06-06 19:56:32.000000000 -0700 +@@ -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 8028351 ++ * @summary JWS doesn't get authenticated when using kerberos auth proxy ++ * @compile -XDignore.symbol.file LoginNoPass.java ++ * @run main/othervm LoginNoPass ++ */ ++ ++import sun.security.jgss.GSSUtil; ++ ++import javax.security.auth.callback.Callback; ++import javax.security.auth.callback.CallbackHandler; ++import javax.security.auth.callback.NameCallback; ++import javax.security.auth.callback.PasswordCallback; ++import java.security.Security; ++ ++public class LoginNoPass { ++ ++ static boolean kdcTouched = false; ++ public static void main(String[] args) throws Exception { ++ ++ new OneKDC(null) { ++ protected byte[] processAsReq(byte[] in) throws Exception { ++ kdcTouched = true; ++ return super.processAsReq(in); ++ } ++ }.writeJAASConf(); ++ Security.setProperty("auth.login.defaultCallbackHandler", ++ "LoginNoPass$CallbackForClient"); ++ System.setProperty("javax.security.auth.useSubjectCredsOnly", "false"); ++ ++ try { ++ Context c; ++ c = Context.fromJAAS("client"); ++ c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID); ++ c.take(new byte[0]); ++ } catch (Exception e) { ++ e.printStackTrace(System.out); ++ // OK ++ } ++ if (kdcTouched) { ++ throw new Exception("Failed"); ++ } ++ } ++ public static class CallbackForClient implements CallbackHandler { ++ public void handle(Callback[] callbacks) { ++ // Do nothing ++ } ++ } ++} +--- ./jdk/test/sun/security/krb5/auto/MaxRetries.java 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/auto/MaxRetries.java 2014-06-06 19:56:32.000000000 -0700 +@@ -54,7 +54,7 @@ + test1(5000, 2); // 2 2 + + // For tryLess +- Security.setProperty("krb5.kdc.bad.policy", "tryless"); ++ Security.setProperty("krb5.kdc.bad.policy", "tryless:1," + BadKdc.toReal(5000)); + rewriteMaxRetries(4); + test1(4000, 7); // 1 1 1 1 2 1 2 + test1(4000, 4); // 1 2 1 2 +@@ -86,7 +86,7 @@ + * @param count the expected total try + */ + private static void test1(int timeout, int count) throws Exception { +- String timeoutTag = "timeout=" + timeout; ++ String timeoutTag = "timeout=" + BadKdc.toReal(timeout); + ByteArrayOutputStream bo = new ByteArrayOutputStream(); + PrintStream oldout = System.out; + System.setOut(new PrintStream(bo)); +@@ -184,12 +184,12 @@ + if (s.startsWith("[realms]")) { + // Reconfig global setting + fw.write("max_retries = 2\n"); +- fw.write("kdc_timeout = 5000\n"); ++ fw.write("kdc_timeout = " + BadKdc.toReal(5000) + "\n"); + } else if (s.trim().startsWith("kdc = ")) { + if (value != -1) { + // Reconfig for realm + fw.write(" max_retries = " + value + "\n"); +- fw.write(" kdc_timeout = " + (value*1000) + "\n"); ++ fw.write(" kdc_timeout = " + BadKdc.toReal(value*1000) + "\n"); + } + // Add a bad KDC as the first candidate + fw.write(" kdc = localhost:33333\n"); +--- ./jdk/test/sun/security/krb5/auto/SaslGSS.java 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/auto/SaslGSS.java 2014-06-06 19:56:32.000000000 -0700 +@@ -23,7 +23,7 @@ + + /* + * @test +- * @bug 8012082 ++ * @bug 8012082 8019267 + * @summary SASL: auth-conf negotiated, but unencrypted data is accepted, + * reset to unencrypt + * @compile -XDignore.symbol.file SaslGSS.java +@@ -37,9 +37,16 @@ + import javax.security.sasl.RealmCallback; + import javax.security.sasl.Sasl; + import javax.security.sasl.SaslServer; ++import java.io.ByteArrayOutputStream; + import java.io.IOException; ++import java.io.PrintStream; + import java.util.HashMap; + import java.util.Locale; ++import java.util.logging.ConsoleHandler; ++import java.util.logging.Handler; ++import java.util.logging.Level; ++import java.util.logging.Logger; ++ + import org.ietf.jgss.*; + import sun.security.jgss.GSSUtil; + +@@ -79,14 +86,28 @@ + } + }); + +- // Handshake ++ ByteArrayOutputStream bout = new ByteArrayOutputStream(); ++ PrintStream oldErr = System.err; ++ System.setErr(new PrintStream(bout)); ++ ++ Logger.getLogger("javax.security.sasl").setLevel(Level.ALL); ++ Handler h = new ConsoleHandler(); ++ h.setLevel(Level.ALL); ++ Logger.getLogger("javax.security.sasl").addHandler(h); ++ + byte[] token = new byte[0]; +- token = sc.initSecContext(token, 0, token.length); +- token = ss.evaluateResponse(token); +- token = sc.unwrap(token, 0, token.length, new MessageProp(0, false)); +- token[0] = (byte)(((token[0] & 4) != 0) ? 4 : 2); +- token = sc.wrap(token, 0, token.length, new MessageProp(0, false)); +- ss.evaluateResponse(token); ++ ++ try { ++ // Handshake ++ token = sc.initSecContext(token, 0, token.length); ++ token = ss.evaluateResponse(token); ++ token = sc.unwrap(token, 0, token.length, new MessageProp(0, false)); ++ token[0] = (byte)(((token[0] & 4) != 0) ? 4 : 2); ++ token = sc.wrap(token, 0, token.length, new MessageProp(0, false)); ++ ss.evaluateResponse(token); ++ } finally { ++ System.setErr(oldErr); ++ } + + // Talk + // 1. Client sends a auth-int message +@@ -102,5 +123,15 @@ + if (!qop.getPrivacy()) { + throw new Exception(); + } ++ ++ for (String s: bout.toString().split("\\n")) { ++ if (s.contains("KRB5SRV04") && s.contains("NULL")) { ++ return; ++ } ++ } ++ System.out.println("======================="); ++ System.out.println(bout.toString()); ++ System.out.println("======================="); ++ throw new Exception("Haven't seen KRB5SRV04 with NULL"); + } + } +--- ./jdk/test/sun/security/krb5/auto/TcpTimeout.java 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/auto/TcpTimeout.java 2014-06-06 19:56:32.000000000 -0700 +@@ -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 +@@ -24,7 +24,8 @@ + /* + * @test + * @bug 6952519 +- * @run main/timeout=40/othervm TcpTimeout ++ * @compile -XDignore.symbol.file TcpTimeout.java ++ * @run main/othervm TcpTimeout + * @summary kdc_timeout is not being honoured when using TCP + */ + +@@ -36,103 +37,71 @@ + public static void main(String[] args) + throws Exception { + ++ // Set debug to grab debug output like ">>> KDCCommunication" + System.setProperty("sun.security.krb5.debug", "true"); +- final int p1 = 10000 + new java.util.Random().nextInt(10000); +- final int p2 = 20000 + new java.util.Random().nextInt(10000); +- final int p3 = 30000 + new java.util.Random().nextInt(10000); + +- KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, p3, true); ++ // Called before new ServerSocket on p1 and p2 to make sure ++ // customized nameservice is used ++ KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, 0, true); ++ int p3 = k.getPort(); + k.addPrincipal(OneKDC.USER, OneKDC.PASS); + k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM); + + // Start two listener that does not communicate, simulate timeout +- new Thread() { +- public void run() { +- try { +- new ServerSocket(p1).accept(); +- } catch (Exception e) { +- }} +- }.start(); +- new Thread() { +- public void run() { +- try { +- new ServerSocket(p2).accept(); +- } catch (Exception e) { +- }} +- }.start(); +- +- FileWriter fw = new FileWriter("alternative-krb5.conf"); +- +- fw.write("[libdefaults]\n" + +- "udp_preference_limit = 1\n" + +- "max_retries = 2\n" + +- "default_realm = " + OneKDC.REALM + "\n" + +- "kdc_timeout = 5000\n"); +- fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + +- "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + +- "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + +- "kdc = " + OneKDC.KDCHOST + ":" + p3 + "\n" + +- "}\n"); +- +- fw.close(); +- System.setProperty("java.security.krb5.conf", "alternative-krb5.conf"); +- Config.refresh(); +- +- // The correct behavior should be: +- // 5 sec on p1, 5 sec on p1, fail +- // 5 sec on p2, 5 sec on p2, fail +- // p3 ok, p3 ok again for preauth. +- // The total time should be 20sec + 2x. x is processing time for AS-REQ. +- int count = 6; +- long start = System.nanoTime(); +- +- ByteArrayOutputStream bo = new ByteArrayOutputStream(); +- PrintStream oldout = System.out; +- System.setOut(new PrintStream(bo)); +- Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); +- System.setOut(oldout); +- +- String[] lines = new String(bo.toByteArray()).split("\n"); +- for (String line: lines) { +- if (line.startsWith(">>> KDCCommunication")) { +- System.out.println(line); +- count--; +- } +- } +- if (count != 0) { +- throw new Exception("Retry count is " + count + " less"); +- } +- +- long end = System.nanoTime(); +- if ((end - start)/1000000000L < 20) { +- throw new Exception("Too fast? " + (end - start)/1000000000L); +- } +- } ++ ServerSocket ss1 = null; ++ ServerSocket ss2 = null; + +- private static KDC on(int p) throws Exception { +- KDC k = new KDC(OneKDC.REALM, OneKDC.KDCHOST, p, true); +- k.addPrincipal(OneKDC.USER, OneKDC.PASS); +- k.addPrincipalRandKey("krbtgt/" + OneKDC.REALM); +- return k; +- } +- +- private static void addFakeKDCs() +- throws Exception { +- BufferedReader fr = new BufferedReader(new FileReader(OneKDC.KRB5_CONF)); +- FileWriter fw = new FileWriter("alternative-krb5.conf"); +- while (true) { +- String s = fr.readLine(); +- if (s == null) { +- break; ++ try { ++ ss1 = new ServerSocket(0); ++ ss2 = new ServerSocket(0); ++ int p1 = ss1.getLocalPort(); ++ int p2 = ss2.getLocalPort(); ++ ++ FileWriter fw = new FileWriter("alternative-krb5.conf"); ++ ++ fw.write("[libdefaults]\n" + ++ "udp_preference_limit = 1\n" + ++ "max_retries = 2\n" + ++ "default_realm = " + OneKDC.REALM + "\n" + ++ "kdc_timeout = " + BadKdc.toReal(5000) + "\n"); ++ fw.write("[realms]\n" + OneKDC.REALM + " = {\n" + ++ "kdc = " + OneKDC.KDCHOST + ":" + p1 + "\n" + ++ "kdc = " + OneKDC.KDCHOST + ":" + p2 + "\n" + ++ "kdc = " + OneKDC.KDCHOST + ":" + p3 + "\n" + ++ "}\n"); ++ ++ fw.close(); ++ System.setProperty("java.security.krb5.conf", ++ "alternative-krb5.conf"); ++ Config.refresh(); ++ ++ System.out.println("Ports opened on " + p1 + ", " + p2 + ", " + p3); ++ ++ // The correct behavior should be: ++ // 5 sec on p1, 5 sec on p1, fail ++ // 5 sec on p2, 5 sec on p2, fail ++ // p3 ok, p3 ok again for preauth. ++ int count = 6; ++ ++ ByteArrayOutputStream bo = new ByteArrayOutputStream(); ++ PrintStream oldout = System.out; ++ System.setOut(new PrintStream(bo)); ++ Context c = Context.fromUserPass(OneKDC.USER, OneKDC.PASS, false); ++ System.setOut(oldout); ++ ++ String[] lines = new String(bo.toByteArray()).split("\n"); ++ for (String line: lines) { ++ if (line.startsWith(">>> KDCCommunication")) { ++ System.out.println(line); ++ count--; ++ } + } +- if (s.trim().startsWith("kdc = ")) { +- fw.write(" kdc = localhost:33333\n"); +- fw.write(" kdc = localhost:22222\n"); ++ if (count != 0) { ++ throw new Exception("Retry count is " + count + " less"); + } +- fw.write(s + "\n"); ++ } finally { ++ if (ss1 != null) ss1.close(); ++ if (ss2 != null) ss2.close(); + } +- fr.close(); +- fw.close(); +- sun.security.krb5.Config.refresh(); + } + } +--- ./jdk/test/sun/security/krb5/krb5-capaths.conf 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/krb5-capaths.conf 2014-06-06 19:56:32.000000000 -0700 +@@ -1,6 +1,6 @@ + [capaths] + +-# Standard ++# http://web.mit.edu/kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-admin/capaths.html + + ANL.GOV = { + TEST.ANL.GOV = . +@@ -14,81 +14,86 @@ + PNL.GOV = { + ANL.GOV = ES.NET + } ++#NERSC.GOV = { ++# ANL.GOV = ES.NET ++#} ++ES.NET = { ++ ANL.GOV = . ++} + NERSC.GOV = { + ANL.GOV = ES.NET ++ TEST.ANL.GOV = ES.NET ++ TEST.ANL.GOV = ANL.GOV ++ PNL.GOV = ES.NET ++ ES.NET = . + } +-ES.NET = { +- ANL.GOV = . ++ ++# The original JDK example ++ ++TIVOLI.COM = { ++ IBM.COM = IBM_LDAPCENTRAL.COM MOONLITE.ORG ++ IBM_LDAPCENTRAL.COM = LDAPCENTRAL.NET ++ LDAPCENTRAL.NET = . ++} ++ ++# https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Smart_Cards/Setting_Up_Cross_Realm_Authentication.html ++ ++A.EXAMPLE.COM = { ++ B.EXAMPLE.COM = . ++ C.EXAMPLE.COM = B.EXAMPLE.COM ++ D.EXAMPLE.COM = B.EXAMPLE.COM ++ D.EXAMPLE.COM = C.EXAMPLE.COM + } + +-# Extra garbages ++# Full path + + A1.COM = { + A2.COM = . +- A4.COM = A2.COM +- A3.COM = A4.COM + A3.COM = A2.COM ++ A4.COM = A2.COM ++ A4.COM = A3.COM + } + ++# Shortest path ++ + B1.COM = { + B2.COM = . + B3.COM = B2.COM +- B3.COM = B4.COM ++ B4.COM = B3.COM + } + +-# Missing is "." ++# If no sRealm key, fallback to hierarchy + + C1.COM = { + C3.COM = C2.COM + } + +-# Multiple paths ++# cRealm is "." + + D1.COM = { +- D2.COM = . +- D3.COM = . +- D4.COM = D2.COM +- D4.COM = D3.COM ++ D2.COM=D1.COM + } + ++# Bad cases ++ + E1.COM = { +- E2.COM = . ++ E2.COM = E2.COM ++ E3.COM = E4.COM + E3.COM = . +- E4.COM = E2.COM E3.COM E2.COM + } + +-# Shortest or First? +- +-F1.COM = { +- F2.COM = . +- F3.COM = F2.COM +- F4.COM = F9.COM +- F4.COM = F3.COM +- F4.COM = F2.COM +-} +- +-# Infinite loop +- + G1.COM = { + G2.COM = G3.COM + G3.COM = G2.COM + } + +-H1.COM = { +- H2.COM = H3.COM +- H3.COM = H2.COM +- H3.COM = . +-} +- + I1.COM = { + I2.COM = I3.COM + I3.COM = I2.COM +- I4.COM = I2.COM I5.COM ++ I4.COM = I5.COM + } + +-J1.COM = { +- J2.COM=J1.COM +-} ++# 7019384 + + A9.PRAGUE.XXX.CZ = { + PRAGUE.XXX.CZ = . +--- ./jdk/test/sun/security/krb5/runNameEquals.sh 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/krb5/runNameEquals.sh 2014-06-06 19:56:34.000000000 -0700 @@ -48,15 +48,11 @@ # set platform-dependent variables OS=`uname -s` @@ -64112,8 +114119,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk CYGWIN* ) PATHSEP=";" FILESEP="/" ---- jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2013-09-06 11:30:07.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2014-06-06 19:56:34.000000000 -0700 @@ -131,6 +131,27 @@ ;; esac @@ -64142,8 +114149,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk Windows* ) FS="\\" PS=";" ---- jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2013-09-06 11:30:07.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2013-09-06 11:30:07.000000000 -0700 ++++ ./jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2014-06-06 19:56:34.000000000 -0700 @@ -93,6 +93,27 @@ ;; esac @@ -64172,8 +114179,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk Windows* ) FS="\\" PS=";" ---- jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2013-09-06 11:30:08.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2013-09-06 11:30:08.000000000 -0700 ++++ ./jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2014-06-06 19:56:34.000000000 -0700 @@ -50,19 +50,7 @@ OS=`uname -s` @@ -64195,8 +114202,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" PS=":" CP="${FS}bin${FS}cp" ---- jdk/test/sun/security/pkcs11/Provider/Login.sh 2013-09-06 11:30:08.000000000 -0700 -+++ jdk/test/sun/security/pkcs11/Provider/Login.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/pkcs11/Provider/Login.sh 2013-09-06 11:30:08.000000000 -0700 ++++ ./jdk/test/sun/security/pkcs11/Provider/Login.sh 2014-06-06 19:56:34.000000000 -0700 @@ -51,19 +51,7 @@ OS=`uname -s` @@ -64218,8 +114225,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" PS=":" CP="${FS}bin${FS}cp" ---- jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java 2014-01-18 12:16:31.000000000 -0800 @@ -0,0 +1,410 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -64631,8 +114638,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + }; +} + ---- jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2013-09-06 11:30:09.000000000 -0700 -+++ jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2013-09-06 11:30:09.000000000 -0700 ++++ ./jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2014-06-06 19:56:34.000000000 -0700 @@ -44,11 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64646,8 +114653,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PATHSEP=":" FILESEP="/" ;; ---- jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2013-09-06 11:30:09.000000000 -0700 -+++ jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2013-09-06 11:30:09.000000000 -0700 ++++ ./jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2014-06-06 19:56:34.000000000 -0700 @@ -47,15 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64665,8 +114672,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2013-09-06 11:30:10.000000000 -0700 -+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2013-09-06 11:30:10.000000000 -0700 ++++ ./jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2014-06-06 19:56:34.000000000 -0700 @@ -33,7 +33,7 @@ OS=`uname -s` @@ -64676,8 +114683,57 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2013-09-06 11:30:11.000000000 -0700 -+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineDeadlock.java 2013-09-06 11:30:10.000000000 -0700 ++++ ./jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/SSLEngineDeadlock.java 2014-06-06 19:56:32.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -75,6 +75,7 @@ + import java.io.*; + import java.security.*; + import java.nio.*; ++import java.lang.management.*; + + public class SSLEngineDeadlock { + +@@ -145,6 +146,8 @@ + } + SSLEngineDeadlock test = new SSLEngineDeadlock(); + test.runTest(); ++ ++ detectDeadLock(); + } + System.out.println("Test Passed."); + } +@@ -362,6 +365,22 @@ + } + + /* ++ * Detect dead lock ++ */ ++ private static void detectDeadLock() throws Exception { ++ ThreadMXBean threadBean = ManagementFactory.getThreadMXBean(); ++ long[] threadIds = threadBean.findDeadlockedThreads(); ++ if (threadIds != null && threadIds.length != 0) { ++ for (long id : threadIds) { ++ ThreadInfo info = ++ threadBean.getThreadInfo(id, Integer.MAX_VALUE); ++ System.out.println("Deadlocked ThreadInfo: " + info); ++ } ++ throw new Exception("Found Deadlock!"); ++ } ++ } ++ ++ /* + * Logging code + */ + private static boolean resultOnce = true; +--- ./jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2013-09-06 11:30:11.000000000 -0700 ++++ ./jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -42,7 +42,7 @@ OS=`uname -s` @@ -64687,8 +114743,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FILESEP="/" PATHSEP=":" ;; ---- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2014-06-06 19:56:34.000000000 -0700 @@ -32,7 +32,7 @@ HOSTNAME=`uname -n` OS=`uname -s` @@ -64698,8 +114754,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2014-06-06 19:56:34.000000000 -0700 @@ -32,7 +32,7 @@ HOSTNAME=`uname -n` OS=`uname -s` @@ -64709,8 +114765,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64720,8 +114776,215 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/EntriesOrder.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/security/tools/jarsigner/EntriesOrder.java 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,204 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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 8031572 ++ * @summary jarsigner -verify exits with 0 when a jar file is not properly signed ++ */ ++ ++import java.io.FileInputStream; ++import java.io.FileOutputStream; ++import java.nio.file.Files; ++import java.nio.file.Paths; ++import java.security.cert.Certificate; ++import java.util.*; ++import java.util.jar.JarEntry; ++import java.util.jar.JarFile; ++import java.util.jar.JarInputStream; ++import java.util.zip.ZipEntry; ++import java.util.zip.ZipOutputStream; ++ ++public class EntriesOrder { ++ ++ public static void main(String[] args) throws Exception { ++ ++ String[] entries = { ++ "META-INF/", ++ "META-INF/MANIFEST.MF", ++ "META-INF/A.RSA", ++ "META-INF/A.SF", ++ "META-INF/inf", ++ "a"}; ++ ++ Map content = new HashMap<>(); ++ ++ // We will create a jar containing entries above. Try all permutations ++ // and confirm 1) When opened as a JarFile, we can always get 3 signed ++ // ones (MANIFEST, inf, a), and 2) When opened as a JarInputStream, ++ // when the order is correct (MANIFEST at beginning, followed by RSA/SF, ++ // directory ignored), we can get 2 signed ones (inf, a). ++ ++ // Prepares raw files ++ Files.write(Paths.get("a"), "a".getBytes()); ++ Files.createDirectory(Paths.get("META-INF/")); ++ Files.write(Paths.get("META-INF/inf"), "inf".getBytes()); ++ ++ // Pack, sign, and extract to get all files ++ sun.tools.jar.Main m = ++ new sun.tools.jar.Main(System.out, System.err, "jar"); ++ if (!m.run("cvf a.jar a META-INF/inf".split(" "))) { ++ throw new Exception("jar creation failed"); ++ } ++ sun.security.tools.KeyTool.main( ++ ("-keystore jks -storepass changeit -keypass changeit -dname" + ++ " CN=A -alias a -genkeypair -keyalg rsa").split(" ")); ++ sun.security.tools.JarSigner.main( ++ "-keystore jks -storepass changeit a.jar a".split(" ")); ++ m = new sun.tools.jar.Main(System.out, System.err, "jar"); ++ if (!m.run("xvf a.jar".split(" "))) { ++ throw new Exception("jar extraction failed"); ++ } ++ ++ // Data ++ for (String s: entries) { ++ if (!s.endsWith("/")) { ++ content.put(s, Files.readAllBytes(Paths.get(s))); ++ } ++ } ++ ++ // Test ++ for (List perm: Permute(entries)) { ++ ++ // Recreate a jar ++ try (ZipOutputStream zos ++ = new ZipOutputStream(new FileOutputStream("x.jar"))) { ++ for (String e: perm) { ++ zos.putNextEntry(new ZipEntry(e)); ++ if (Paths.get(e).toFile().isDirectory()) continue; ++ zos.write(content.get(e)); ++ } ++ } ++ ++ // Open with JarFile, number of signed entries should be 3. ++ int cc = 0; ++ try (JarFile jf = new JarFile("x.jar")) { ++ Enumeration jes = jf.entries(); ++ while (jes.hasMoreElements()) { ++ JarEntry je = jes.nextElement(); ++ sun.misc.IOUtils.readFully(jf.getInputStream(je), -1, true); ++ Certificate[] certs = je.getCertificates(); ++ if (certs != null && certs.length > 0) { ++ cc++; ++ } ++ } ++ } ++ ++ if (cc != 3) { ++ System.out.println(perm + " - jf - " + cc); ++ throw new Exception(); ++ } ++ ++ // Open with JarInputStream ++ int signed; ++ ++ perm.remove("META-INF/"); ++ if (perm.get(0).equals("META-INF/MANIFEST.MF") && ++ perm.get(1).contains("/A.") && ++ perm.get(2).contains("/A.")) { ++ signed = 2; // Good order ++ } else { ++ signed = 0; // Bad order. In this case, the number of signed ++ // entries is not documented. Just test impl. ++ } ++ ++ cc = 0; ++ try (JarInputStream jis ++ = new JarInputStream(new FileInputStream("x.jar"))) { ++ while (true) { ++ JarEntry je = jis.getNextJarEntry(); ++ if (je == null) break; ++ sun.misc.IOUtils.readFully(jis, -1, true); ++ Certificate[] certs = je.getCertificates(); ++ if (certs != null && certs.length > 0) { ++ cc++; ++ } ++ } ++ } ++ ++ if (cc != signed) { ++ System.out.println(perm + " - jis - " + cc + " " + signed); ++ throw new Exception(); ++ } ++ } ++ } ++ ++ // Helper method to return all permutations of an array. Each output can ++ // be altered without damaging the iteration process. ++ static Iterable> Permute(final String[] entries) { ++ return new Iterable>() { ++ ++ int s = entries.length; ++ long c = factorial(s) - 1; // number of permutations ++ ++ private long factorial(int n) { ++ return (n == 1) ? 1: (n * factorial(n-1)); ++ } ++ ++ @Override ++ public Iterator> iterator() { ++ return new Iterator>() { ++ @Override ++ public boolean hasNext() { ++ return c >= 0; ++ } ++ ++ @Override ++ public void remove() { ++ throw new UnsupportedOperationException("remove"); ++ } ++ ++ @Override ++ public List next() { ++ if (c < 0) return null; ++ List result = new ArrayList<>(s); ++ LinkedList source = new LinkedList<>( ++ Arrays.asList(entries)); ++ // Treat c as a integer with different radixes at ++ // different digits, i.e. at digit 0, radix is s; ++ // at digit 1, radix is s-1. Thus a s-digit number ++ // is able to represent s! different values. ++ long n = c; ++ for (int i=s; i>=1; i--) { ++ int x = (int)(n % i); ++ result.add(source.remove(x)); ++ n = n / i; ++ } ++ c--; ++ return result; ++ } ++ }; ++ } ++ }; ++ } ++} +--- ./jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64731,8 +114994,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/jarsigner/TimestampCheck.java 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/TimestampCheck.java 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/TimestampCheck.java 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/TimestampCheck.java 2014-01-18 12:16:31.000000000 -0800 @@ -242,13 +242,13 @@ " -J-Djava.security.egd=file:/dev/./urandom" + " -debug -keystore " + TSKS + " -storepass changeit" + @@ -64784,8 +115047,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + } } } ---- jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/concise_jarsigner.sh 2014-01-18 12:16:31.000000000 -0800 @@ -136,7 +136,6 @@ # 16 and 32 already covered in the first part # ========================================================== @@ -64804,8 +115067,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk $JARSIGNER -strict -keystore js.jks -storepass changeit a.jar expired [ $? = 4 ] || exit $LINENO ---- jdk/test/sun/security/tools/jarsigner/diffend.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/diffend.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/diffend.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/diffend.sh 2014-06-06 19:56:34.000000000 -0700 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64815,8 +115078,87 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/jarsigner/oldsig.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/oldsig.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/jvindex.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/security/tools/jarsigner/jvindex.sh 2014-06-06 19:56:32.000000000 -0700 +@@ -0,0 +1,76 @@ ++# ++# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++# 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 8022761 ++# @summary regression: SecurityException is NOT thrown while trying to pack a wrongly signed Indexed Jar file ++# ++ ++if [ "${TESTJAVA}" = "" ] ; then ++ JAVAC_CMD=`which javac` ++ TESTJAVA=`dirname $JAVAC_CMD`/.. ++fi ++ ++# set platform-dependent variables ++OS=`uname -s` ++case "$OS" in ++ Windows_* ) ++ FS="\\" ++ ;; ++ * ) ++ FS="/" ++ ;; ++esac ++ ++F=abcde ++KS=jvindex.jks ++JFILE=jvindex.jar ++ ++KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \ ++ -keystore $KS" ++JAR=$TESTJAVA${FS}bin${FS}jar ++JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit" ++ ++rm $F $KS $JFILE 2> /dev/null ++ ++echo 12345 > $F ++$JAR cvf $JFILE $F ++ ++ERR="" ++ ++$KT -alias a -dname CN=a -genkey -validity 300 || ERR="$ERR 1" ++ ++$JARSIGNER $JFILE a || ERR="$ERR 2" ++$JAR i $JFILE ++ ++# Make sure the $F line has "sm" (signed and in manifest) ++$JARSIGNER -verify -verbose $JFILE | grep $F | grep sm || ERR="$ERR 3" ++ ++if [ "$ERR" = "" ]; then ++ exit 0 ++else ++ echo "ERR is $ERR" ++ exit 1 ++fi ++ ++ +--- ./jdk/test/sun/security/tools/jarsigner/oldsig.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/oldsig.sh 2014-06-06 19:56:34.000000000 -0700 @@ -42,7 +42,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64826,8 +115168,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/jarsigner/ts.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/jarsigner/ts.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/ts.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/jarsigner/ts.sh 2014-01-18 12:16:31.000000000 -0800 @@ -22,7 +22,7 @@ # @@ -64846,8 +115188,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk rm tsks echo Nothing > A ---- jdk/test/sun/security/tools/jarsigner/warnings.sh 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/sun/security/tools/jarsigner/warnings.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/jarsigner/warnings.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/security/tools/jarsigner/warnings.sh 2014-01-18 12:16:31.000000000 -0800 @@ -0,0 +1,119 @@ +# +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -64968,8 +115310,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk +fi + + ---- jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64979,8 +115321,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2014-06-06 19:56:34.000000000 -0700 @@ -47,15 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -64998,8 +115340,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PATHSEP=":" FILESEP="/" ;; ---- jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2014-06-06 19:56:34.000000000 -0700 @@ -42,13 +42,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65015,8 +115357,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FILESEP="/" ;; CYGWIN* ) ---- jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2014-06-06 19:56:34.000000000 -0700 @@ -45,7 +45,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65026,8 +115368,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65037,8 +115379,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/keytool/autotest.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/autotest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/autotest.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/autotest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -72,6 +72,27 @@ ;; esac @@ -65067,8 +115409,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk * ) echo "Will not run test on: ${OS}" exit 0; ---- jdk/test/sun/security/tools/keytool/i18n.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/i18n.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/i18n.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/i18n.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65078,8 +115420,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/keytool/printssl.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/printssl.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/printssl.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/printssl.sh 2014-06-06 19:56:34.000000000 -0700 @@ -37,7 +37,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65089,8 +115431,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; CYGWIN* ) ---- jdk/test/sun/security/tools/keytool/resource.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/resource.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/resource.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/resource.sh 2014-06-06 19:56:34.000000000 -0700 @@ -43,7 +43,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65100,8 +115442,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null FS="/" ;; ---- jdk/test/sun/security/tools/keytool/standard.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/keytool/standard.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/keytool/standard.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/keytool/standard.sh 2014-06-06 19:56:34.000000000 -0700 @@ -44,7 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65111,8 +115453,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows_* ) ---- jdk/test/sun/security/tools/policytool/Alias.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/Alias.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/Alias.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/Alias.sh 2014-06-06 19:56:34.000000000 -0700 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65122,8 +115464,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/policytool/ChangeUI.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/ChangeUI.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/ChangeUI.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/ChangeUI.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65133,8 +115475,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65144,8 +115486,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/policytool/SaveAs.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/SaveAs.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/SaveAs.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/SaveAs.sh 2014-06-06 19:56:34.000000000 -0700 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65155,8 +115497,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65166,8 +115508,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/policytool/UsePolicy.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/UsePolicy.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/UsePolicy.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/UsePolicy.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65177,8 +115519,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/security/tools/policytool/i18n.sh 2013-09-06 11:30:12.000000000 -0700 -+++ jdk/test/sun/security/tools/policytool/i18n.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/security/tools/policytool/i18n.sh 2013-09-06 11:30:12.000000000 -0700 ++++ ./jdk/test/sun/security/tools/policytool/i18n.sh 2014-06-06 19:56:34.000000000 -0700 @@ -46,7 +46,7 @@ # set platform-dependent variables OS=`uname -s` @@ -65188,8 +115530,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 1969-12-31 16:00:00.000000000 -0800 -+++ jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -0,0 +1,111 @@ +# +# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. @@ -65302,8 +115644,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + + else fail "unspecified test failure" +fi ---- jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2013-09-06 11:30:13.000000000 -0700 -+++ jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2013-09-06 11:30:13.000000000 -0700 ++++ ./jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -54,7 +54,7 @@ OS=`uname -s` @@ -65313,8 +115655,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PATHSEP=":" ;; ---- jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2013-09-06 11:30:14.000000000 -0700 -+++ jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2013-09-06 11:30:14.000000000 -0700 ++++ ./jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2014-06-06 19:56:34.000000000 -0700 @@ -33,7 +33,7 @@ case `uname -s` in @@ -65324,8 +115666,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk esac N2A=$TESTJAVA/bin/native2ascii ---- jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2013-09-06 11:30:14.000000000 -0700 -+++ jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2013-09-06 11:30:14.000000000 -0700 ++++ ./jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2014-06-06 19:56:34.000000000 -0700 @@ -56,7 +56,7 @@ OS=`uname -s` @@ -65335,8 +115677,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PATHSEP=":" ;; ---- jdk/test/sun/util/resources/TimeZone/Bug6317929.java 2013-09-06 11:30:14.000000000 -0700 -+++ jdk/test/sun/util/resources/TimeZone/Bug6317929.java 2014-04-20 12:39:15.000000000 -0700 +--- ./jdk/test/sun/util/resources/TimeZone/Bug6317929.java 2013-09-06 11:30:14.000000000 -0700 ++++ ./jdk/test/sun/util/resources/TimeZone/Bug6317929.java 2014-01-18 12:16:32.000000000 -0800 @@ -130,12 +130,12 @@ "(New South Wales)\""); tzLocale = locales2Test[1]; @@ -65426,8 +115768,122 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + "(\u65B0\u5357\u5A01\u723E\u65AF)\""); } } ---- langtools/.hgtags 2013-09-06 11:31:03.000000000 -0700 -+++ langtools/.hgtags 2014-04-20 12:39:14.000000000 -0700 +--- ./jdk/test/tools/launcher/I18NArgTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./jdk/test/tools/launcher/I18NArgTest.java 2014-06-06 19:56:33.000000000 -0700 +@@ -0,0 +1,111 @@ ++/* ++ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. ++ * 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 8016110 ++ * @summary verify Japanese character in an argument are treated correctly ++ * @compile -XDignore.symbol.file I18NArgTest.java ++ * @run main I18NArgTest ++ */ ++import java.io.IOException; ++ ++public class I18NArgTest extends TestHelper { ++ public static void main(String... args) throws IOException { ++ if (!isWindows) { ++ return; ++ } ++ if (!"MS932".equals(System.getProperty("sun.jnu.encoding"))) { ++ System.err.println("MS932 encoding not set, test skipped"); ++ return; ++ } ++ if (args.length == 0) { ++ execTest(0x30bd); // MS932 Katakana SO, 0x835C ++ } else { ++ testCharacters(args); ++ } ++ } ++ static void execTest(int unicodeValue) { ++ String hexValue = Integer.toHexString(unicodeValue); ++ String unicodeStr = Character.toString((char)unicodeValue); ++ execTest("\"" + unicodeStr + "\"", hexValue); ++ execTest("\\" + unicodeStr + "\\", hexValue); ++ execTest(" " + unicodeStr + " ", hexValue); ++ execTest("'" + unicodeStr + "'", hexValue); ++ execTest("\t" + unicodeStr + "\t", hexValue); ++ execTest("*" + unicodeStr + "*", hexValue); ++ execTest("?" + unicodeStr + "?", hexValue); ++ ++ execTest("\"" + unicodeStr + unicodeStr + "\"", hexValue + hexValue); ++ execTest("\\" + unicodeStr + unicodeStr + "\\", hexValue + hexValue); ++ execTest(" " + unicodeStr + unicodeStr + " ", hexValue + hexValue); ++ execTest("'" + unicodeStr + unicodeStr + "'", hexValue + hexValue); ++ execTest("\t" + unicodeStr + unicodeStr + "\t", hexValue + hexValue); ++ execTest("*" + unicodeStr + unicodeStr + "*", hexValue + hexValue); ++ execTest("?" + unicodeStr + unicodeStr + "?", hexValue + hexValue); ++ ++ execTest("\"" + unicodeStr + "a" + unicodeStr + "\"", hexValue + "61" + hexValue); ++ execTest("\\" + unicodeStr + "a" + unicodeStr + "\\", hexValue + "61" + hexValue); ++ execTest(" " + unicodeStr + "a" + unicodeStr + " ", hexValue + "61"+ hexValue); ++ execTest("'" + unicodeStr + "a" + unicodeStr + "'", hexValue + "61"+ hexValue); ++ execTest("\t" + unicodeStr + "a" + unicodeStr + "\t", hexValue + "61"+ hexValue); ++ execTest("*" + unicodeStr + "a" + unicodeStr + "*", hexValue + "61"+ hexValue); ++ execTest("?" + unicodeStr + "a" + unicodeStr + "?", hexValue + "61"+ hexValue); ++ ++ execTest("\"" + unicodeStr + "\u00b1" + unicodeStr + "\"", hexValue + "b1" + hexValue); ++ execTest("\\" + unicodeStr + "\u00b1" + unicodeStr + "\\", hexValue + "b1" + hexValue); ++ execTest(" " + unicodeStr + "\u00b1" + unicodeStr + " ", hexValue + "b1"+ hexValue); ++ execTest("'" + unicodeStr + "\u00b1" + unicodeStr + "'", hexValue + "b1"+ hexValue); ++ execTest("\t" + unicodeStr + "\u00b1" + unicodeStr + "\t", hexValue + "b1"+ hexValue); ++ execTest("*" + unicodeStr + "\u00b1" + unicodeStr + "*", hexValue + "b1"+ hexValue); ++ execTest("?" + unicodeStr + "\u00b1" + unicodeStr + "?", hexValue + "b1"+ hexValue); ++ } ++ static void execTest(String unicodeStr, String hexValue) { ++ TestResult tr = doExec(javaCmd, ++ "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath(), ++ "-Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath(), ++ "-cp", TEST_CLASSES_DIR.getAbsolutePath(), ++ "I18NArgTest", unicodeStr, hexValue); ++ System.out.println(tr.testOutput); ++ if (!tr.isOK()) { ++ System.err.println(tr); ++ throw new RuntimeException("test fails"); ++ } ++ } ++ static void testCharacters(String... args) { ++ String input = args[0]; ++ String expected = args[1]; ++ String hexValue = ""; ++ for (int i = 0; i < input.length(); i++) { ++ hexValue = hexValue.concat(Integer.toHexString((int)input.charAt(i))); ++ } ++ System.out.println("input:" + input); ++ System.out.println("expected:" + expected); ++ System.out.println("obtained:" + hexValue); ++ if (!hexValue.contains(expected)) { ++ String message = "Error: output does not contain expected value" + ++ "expected:" + expected + " obtained:" + hexValue; ++ throw new RuntimeException(message); ++ } ++ } ++} +--- ./langtools/.hgtags 2013-09-06 11:31:03.000000000 -0700 ++++ ./langtools/.hgtags 2014-06-06 19:56:17.000000000 -0700 @@ -123,6 +123,7 @@ 9425dd4f53d5bfcd992d9aecea0eb7d8b2d4f62b jdk7-b146 d34578643d1c6c752d4a6b5e79c6ab1b60850b4a jdk7u1-b01 @@ -65459,10 +115915,11 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk 28358b2489b2ca29c1a6b79f643204da8924a3d7 jdk7u25-b12 5ed8c453480063838b632c74f528924f529361a2 jdk7u25-b13 c6342ec6a12f7283e2a73a80a44dcdd3683e2e8b jdk7u25-b14 -@@ -343,3 +360,59 @@ +@@ -343,3 +360,83 @@ 765bea9bfcfc8c472df0a2daced5e576095f46ac jdk7u40-b42 988ece7b686564084770e99ca26746c45ffb933f jdk7u40-b43 a67dbf96bf86989d0392cc5b66e5d4139cbceec7 jdk7u40-b60 ++849b17bc6e9a08fa41e0ef631e51366a09842e64 jdk7u60-b00 +b2e29b79e54e58349c1dbcf5449f67fc5d5a235a jdk7u40-b61 +94ea3d062a3c28c64a837fa8f999c6b6956ff7c4 jdk7u40-b62 +9bbfba4981e1db5016bbfbc23025763966021c26 jdk7u45-b01 @@ -65504,6 +115961,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk +4d0807934c302f2e35e6a5acc6cdc720c82b5671 jdk7u51-b13 +ada23e55d76a378cb2fc2cd7ffae8c147aaf0055 jdk7u51-b30 +e3d4896d52ab4ad0fc0b7a45d60340dbdcb8826d jdk7u51-b31 ++fb3ff30ecd8ea1637551461bfaf09fc8204b536c jdk7u51-b33 ++4adc6c094545774b324d2e5511723ada2b32e6c4 jdk7u51-b34 +5b44df2114e466da85c3816627bfcd1b59c6499d jdk7u55-b00 +3e64e49131b88c839733c9869ff8aebcd15cf828 jdk7u55-b01 +2a9f5c00ba46f895bc9d16a584bf7d80c1822268 jdk7u55-b02 @@ -65519,8 +115978,29 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk +a3cdca5d3773f67a49091f9131a4d073bc6b83d9 jdk7u55-b12 +81bf1ca3a3a71c628b7d952ba47c6f200a223f27 jdk7u55-b13 +96d55b4d88fea1d9f8227e70003210a6c10a1dba jdk7u55-b30 ---- langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java 2013-09-06 11:31:06.000000000 -0700 -+++ langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java 2014-04-20 12:39:08.000000000 -0700 ++c1964a222000b4884b992fdbaf8f62a45fb893c9 jdk7u55-b14 ++4f6115ba266e5489b5e1968a28304f82be1f5641 jdk7u55-b31 ++849b17bc6e9a08fa41e0ef631e51366a09842e64 jdk7u60-b00 ++b19e375d9829daf207b1bdc7f908a3e1d548462c jdk7u60-b01 ++954e1616449af74f68aed57261cbeb62403377f1 jdk7u60-b02 ++4170784840d510b4e8ae7ae250b92279aaf5eb25 jdk7u60-b03 ++772aad4e9681828b8ee193b9ed971cbfe6c7f347 jdk7u60-b04 ++744287fccf3b2c4fba2abf105863f0a44c3bd4da jdk7u60-b05 ++8f6db72756f3e4c3cca8731d20e978fb741846d2 jdk7u60-b06 ++02f050bc5569fb058ace44ed705bbb0f9022a6fe jdk7u60-b07 ++be8e34e4920ebd1cfb89739d636e363c7881a548 jdk7u60-b08 ++3f8b585403e596b7eadc231484f5480361c52c4b jdk7u60-b09 ++3ee98cd07065dfa9a982e6692a3e875684a7e820 jdk7u60-b10 ++3cc64ba8cf85942929b15c5ef21360f96db3b99c jdk7u60-b11 ++b79b8b1dc88faa73229b2bce04e979ff5ec854f5 jdk7u60-b12 ++3dc3e59e9580dfdf95dac57c54fe1a4209401125 jdk7u60-b13 ++a8b9c1929e50a9f3ae9ae1a23c06fa73a57afce3 jdk7u60-b14 ++7568ebdada118da1d1a6addcf6316ffda21801fd jdk7u60-b15 ++057caf9e0774e7c530c5710127f70c8d5f46deab jdk7u60-b16 ++b7cc00c573c294b144317d44803758a291b3deda jdk7u60-b18 ++b7cc00c573c294b144317d44803758a291b3deda jdk7u60-b17 +--- ./langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java 2013-09-06 11:31:06.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java 2014-04-19 01:27:04.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. @@ -65537,8 +116017,108 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk } else if (opt.equals("-top")) { top = os[1]; } else if (opt.equals("-bottom")) { ---- langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java 2013-09-06 11:31:06.000000000 -0700 -+++ langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java 2014-04-20 12:39:08.000000000 -0700 +--- ./langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java 2013-09-06 11:31:06.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java 2014-06-06 19:56:17.000000000 -0700 +@@ -181,12 +181,14 @@ + String label, boolean strong, + String stylename, String title, String target) { + StringBuffer retlink = new StringBuffer(); ++ StringBuilder lnk = new StringBuilder(); + retlink.append(" 127) {" + DocletConstants.NL + + " allowNumber = true;" + DocletConstants.NL + + " allowSep = true;" + DocletConstants.NL + + " } else if ('0' <= ch && ch <= '9'" + DocletConstants.NL + +--- ./langtools/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties 2013-09-06 11:31:06.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -25,7 +25,7 @@ + doclet.Href_Enum_Title={0}\u5185\u306E\u5217\u6319\u578B + doclet.Href_Type_Param_Title={0}\u5185\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF + doclet.Href_Class_Or_Interface_Title={0}\u5185\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 +-doclet.Summary=\u6982\u8981: ++doclet.Summary=\u30B5\u30DE\u30EA\u30FC: + doclet.Detail=\u8A73\u7D30: + doclet.navNested=\u30CD\u30B9\u30C8 + doclet.navAnnotationTypeOptionalMember=\u30AA\u30D7\u30B7\u30E7\u30F3 +@@ -68,7 +68,7 @@ + doclet.see.class_or_package_not_found=\u30BF\u30B0{0}: \u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {1} + doclet.see.class_or_package_not_accessible=\u30BF\u30B0{0}: \u53C2\u7167\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {1} + doclet.see.malformed_tag={0}\u30BF\u30B0: \u4E0D\u6B63\u306A{1}\u30BF\u30B0 +-doclet.Inherited_API_Summary=\u7D99\u627F\u3055\u308C\u305FAPI\u306E\u6982\u8981 ++doclet.Inherited_API_Summary=\u7D99\u627F\u3055\u308C\u305FAPI\u306E\u30B5\u30DE\u30EA\u30FC + doclet.Deprecated_API=\u975E\u63A8\u5968\u306EAPI + doclet.Deprecated_Packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 + doclet.Deprecated_Classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9 +@@ -135,18 +135,18 @@ + doclet.Help_title=API\u30D8\u30EB\u30D7 + doclet.Window_Help_title=API\u30D8\u30EB\u30D7 + doclet.Help_line_1=API\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u69CB\u6210 +-doclet.Help_line_2=\u3053\u306EAPI(Application Programming Interface)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u6B21\u306B\u8AAC\u660E\u3059\u308B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u3042\u308B\u9805\u76EE\u306B\u5BFE\u5FDC\u3059\u308B\u30DA\u30FC\u30B8\u304C\u542B\u307E\u308C\u307E\u3059\u3002 +-doclet.Help_line_3={0}\u30DA\u30FC\u30B8\u306FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30ED\u30F3\u30C8\u30FB\u30DA\u30FC\u30B8\u3067\u3001\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u3092\u542B\u3080\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30EA\u30B9\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4E00\u9023\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u8AAC\u660E\u3082\u8868\u793A\u3055\u308C\u307E\u3059\u3002 +-doclet.Help_line_4=\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u6982\u8981\u3092\u542B\u3080\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306F6\u3064\u306E\u30AB\u30C6\u30B4\u30EA\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002 ++doclet.Help_line_2=\u3053\u306EAPI (Application Programming Interface)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u6B21\u306B\u8AAC\u660E\u3059\u308B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u3042\u308B\u9805\u76EE\u306B\u5BFE\u5FDC\u3059\u308B\u30DA\u30FC\u30B8\u304C\u542B\u307E\u308C\u307E\u3059\u3002 ++doclet.Help_line_3={0}\u30DA\u30FC\u30B8\u306FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30ED\u30F3\u30C8\u30FB\u30DA\u30FC\u30B8\u3067\u3001\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30B5\u30DE\u30EA\u30FC\u3092\u542B\u3080\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30EA\u30B9\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4E00\u9023\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u5168\u4F53\u7684\u306A\u8AAC\u660E\u3082\u8868\u793A\u3055\u308C\u307E\u3059\u3002 ++doclet.Help_line_4=\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u30B5\u30DE\u30EA\u30FC\u3092\u542B\u3080\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306F6\u3064\u306E\u30AB\u30C6\u30B4\u30EA\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002 + doclet.Help_line_5=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 +-doclet.Help_line_6=\u5404\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u500B\u5225\u306E\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u30DA\u30FC\u30B8\u306B\u306F\u6B21\u306E\u3088\u3046\u306B\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E\u3068\u3001\u6982\u8981\u8868\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u8A73\u7D30\u8AAC\u660E\u304C\u542B\u307E\u308C\u307E\u3059\u3002 ++doclet.Help_line_6=\u5404\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u500B\u5225\u306E\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u30DA\u30FC\u30B8\u306B\u306F\u6B21\u306E\u3088\u3046\u306B\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E\u3068\u3001\u30B5\u30DE\u30EA\u30FC\u8868\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u8A73\u7D30\u8AAC\u660E\u304C\u542B\u307E\u308C\u307E\u3059\u3002 + doclet.Help_line_7=\u30AF\u30E9\u30B9\u968E\u5C64\u8868\u793A + doclet.Help_line_8=\u76F4\u7CFB\u306E\u30B5\u30D6\u30AF\u30E9\u30B9 + doclet.Help_line_9=\u65E2\u77E5\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8 + doclet.Help_line_10=\u65E2\u77E5\u306E\u5B9F\u88C5\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8 + doclet.Help_line_11=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u5BA3\u8A00 + doclet.Help_line_12=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E +-doclet.Help_line_13=\u5404\u6982\u8981\u30A8\u30F3\u30C8\u30EA\u306B\u306F\u3001\u305D\u306E\u9805\u76EE\u306E\u8A73\u7D30\u306A\u8AAC\u660E\u306E\u4E2D\u304B\u30891\u884C\u76EE\u306E\u6587\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u8A73\u7D30\u306A\u8AAC\u660E\u306F\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306B\u73FE\u308C\u308B\u9806\u306B\u4E26\u3079\u3089\u308C\u307E\u3059\u304C\u3001\u6982\u8981\u30A8\u30F3\u30C8\u30EA\u306F\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u306B\u4E26\u3079\u3089\u308C\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u3063\u3066\u3001\u30D7\u30ED\u30B0\u30E9\u30DE\u304C\u8A2D\u5B9A\u3057\u305F\u8AD6\u7406\u7684\u306A\u30B0\u30EB\u30FC\u30D7\u5206\u3051\u304C\u4FDD\u6301\u3055\u308C\u307E\u3059\u3002 ++doclet.Help_line_13=\u5404\u30B5\u30DE\u30EA\u30FC\u30FB\u30A8\u30F3\u30C8\u30EA\u306B\u306F\u3001\u305D\u306E\u9805\u76EE\u306E\u8A73\u7D30\u8AAC\u660E\u306E\u4E2D\u304B\u30891\u884C\u76EE\u306E\u6587\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u30B5\u30DE\u30EA\u30FC\u30FB\u30A8\u30F3\u30C8\u30EA\u306F\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u3067\u3059\u304C\u3001\u8A73\u7D30\u8AAC\u660E\u306F\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306B\u73FE\u308C\u308B\u9806\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u3063\u3066\u3001\u30D7\u30ED\u30B0\u30E9\u30DE\u304C\u8A2D\u5B9A\u3057\u305F\u8AD6\u7406\u7684\u306A\u30B0\u30EB\u30FC\u30D7\u5206\u3051\u304C\u4FDD\u6301\u3055\u308C\u307E\u3059\u3002 + doclet.Help_line_14=\u4F7F\u7528 + doclet.Help_line_15=\u5404\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u305D\u308C\u305E\u308C\u300C\u4F7F\u7528\u300D\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306B\u306F\u3001\u3069\u306E\u3088\u3046\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u3001\u30E1\u30BD\u30C3\u30C9\u3001\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3001\u7279\u5B9A\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4E00\u90E8\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u304B\u304C\u8A18\u8FF0\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30AF\u30E9\u30B9A\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9A\u306E\u5834\u5408\u3001\u305D\u306E\u300C\u4F7F\u7528\u300D\u30DA\u30FC\u30B8\u306B\u306F\u3001A\u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3001A\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u3001A\u3092\u8FD4\u3059\u30E1\u30BD\u30C3\u30C9\u3068\u3001\u578BA\u3092\u6301\u3064\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u306B\u306F\u3001\u307E\u305A\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u79FB\u52D5\u3057\u3001\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306E\u300C\u4F7F\u7528\u300D\u30EA\u30F3\u30AF\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + doclet.Help_line_16=\u968E\u5C64\u30C4\u30EA\u30FC(\u30AF\u30E9\u30B9\u968E\u5C64) +--- ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties 2013-09-06 11:31:06.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -182,25 +182,32 @@ + doclet.0_and_1={0} and {1} + + #Documentation for Enums +-doclet.enum_values_doc=\n\ ++doclet.enum_values_doc.main=\n\ + Returns an array containing the constants of this enum type, in\n\ + the order they are declared. This method may be used to iterate\n\ + over the constants as follows:\n\ +
\n\
+  for ({0} c : {0}.values())\n\
+      System.out.println(c);\n\
+- 
\n\ +- @return an array containing the constants of this enum type, in\n\ +- the order they are declared ++ + +-doclet.enum_valueof_doc=\n\ ++doclet.enum_values_doc.return=\n\ ++ an array containing the constants of this enum type, in the order they are declared ++ ++doclet.enum_valueof_doc.main=\n\ + Returns the enum constant of this type with the specified name.\n\ + The string must match exactly an identifier used to declare an\n\ + enum constant in this type. (Extraneous whitespace characters are \n\ +- not permitted.)\n\ +- \n\ +- @param name the name of the enum constant to be returned.\n\ +- @return the enum constant with the specified name\n\ +- @throws IllegalArgumentException if this enum type has no constant\n\ +- with the specified name\n\ +- @throws NullPointerException if the argument is null ++ not permitted.) ++ ++doclet.enum_valueof_doc.param_name=\ ++ the name of the enum constant to be returned. ++ ++doclet.enum_valueof_doc.return=\ ++ the enum constant with the specified name ++ ++doclet.enum_valueof_doc.throws_ila=\ ++ if this enum type has no constant with the specified name ++ ++doclet.enum_valueof_doc.throws_npe=\ ++ if the argument is null +--- ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties 2013-09-06 11:31:06.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -66,22 +66,22 @@ + doclet.malformed_html_link_tag=
\u30BF\u30B0\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63:\n"{0}" + doclet.tag_misuse={0}\u30BF\u30B0\u306F{1}\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u4F7F\u7528\u3067\u304D\u308B\u306E\u306F\u6B21\u306E\u30BF\u30A4\u30D7\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306E\u307F\u3067\u3059: {2}\u3002 + doclet.javafx_tag_misuse=\u30BF\u30B0@propertyGetter\u3001@propertySetter\u304A\u3088\u3073@propertyDescription\u306F\u3001JavaFX\u306E\u30D7\u30ED\u30D1\u30C6\u30A3getter\u3068setter\u306E\u307F\u3067\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 +-doclet.Package_Summary=\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981 +-doclet.Interface_Summary=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u6982\u8981 +-doclet.Annotation_Types_Summary=\u6CE8\u91C8\u578B\u306E\u6982\u8981 +-doclet.Enum_Summary=\u5217\u6319\u578B\u306E\u6982\u8981 +-doclet.Exception_Summary=\u4F8B\u5916\u306E\u6982\u8981 +-doclet.Error_Summary=\u30A8\u30E9\u30FC\u306E\u6982\u8981 +-doclet.Class_Summary=\u30AF\u30E9\u30B9\u306E\u6982\u8981 +-doclet.Nested_Class_Summary=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306E\u6982\u8981 +-doclet.Annotation_Type_Optional_Member_Summary=\u4EFB\u610F\u8981\u7D20\u306E\u6982\u8981 +-doclet.Annotation_Type_Required_Member_Summary=\u5FC5\u9808\u8981\u7D20\u306E\u6982\u8981 +-doclet.Field_Summary=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u6982\u8981 +-doclet.Property_Summary=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u6982\u8981 +-doclet.Enum_Constant_Summary=\u5217\u6319\u578B\u5B9A\u6570\u306E\u6982\u8981 +-doclet.Constructor_Summary=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u6982\u8981 +-doclet.Method_Summary=\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981 +-doclet.Factory_Method_Summary=static\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981 ++doclet.Package_Summary=\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Interface_Summary=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Annotation_Types_Summary=\u6CE8\u91C8\u578B\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Enum_Summary=\u5217\u6319\u578B\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Exception_Summary=\u4F8B\u5916\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Error_Summary=\u30A8\u30E9\u30FC\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Class_Summary=\u30AF\u30E9\u30B9\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Nested_Class_Summary=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Annotation_Type_Optional_Member_Summary=\u4EFB\u610F\u8981\u7D20\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Annotation_Type_Required_Member_Summary=\u5FC5\u9808\u8981\u7D20\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Field_Summary=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Property_Summary=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Enum_Constant_Summary=\u5217\u6319\u578B\u5B9A\u6570\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Constructor_Summary=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Method_Summary=\u30E1\u30BD\u30C3\u30C9\u306E\u30B5\u30DE\u30EA\u30FC ++doclet.Factory_Method_Summary=static\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u30B5\u30DE\u30EA\u30FC + doclet.Interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 + doclet.Enums=\u5217\u6319\u578B + doclet.AnnotationTypes=\u6CE8\u91C8\u578B +@@ -180,6 +180,16 @@ doclet.0_and_1={0}\u3068{1} #Documentation for Enums -doclet.enum_values_doc=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n
\nfor({0} c: {0}.values())\n  System.out.println(c);\n
\n@return\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\n\u542B\u3080\u914D\u5217 -+doclet.enum_values_doc=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n
\nfor({0} c: {0}.values())\n  System.out.println(c);\n
\n@return \u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\n\u542B\u3080\u914D\u5217 ++doclet.enum_values_doc.main=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n
\nfor({0} c: {0}.values())\n  System.out.println(c);\n
\n -doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068\u6B63\u78BA\u306B\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException\u5F15\u6570\u304Cnull\u306E\u5834\u5408 -+doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068\u6B63\u78BA\u306B\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name \u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException \u5F15\u6570\u304Cnull\u306E\u5834\u5408 ---- langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties 2013-09-06 11:31:06.000000000 -0700 -+++ langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties 2014-04-20 12:39:08.000000000 -0700 -@@ -182,4 +182,4 @@ ++doclet.enum_values_doc.return=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u306E\u914D\u5217 ++ ++doclet.enum_valueof_doc.main=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068\u6B63\u78BA\u306B\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n ++ ++doclet.enum_valueof_doc.param_name=\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\u3002 ++ ++doclet.enum_valueof_doc.return=\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u5217\u6319\u578B\u5B9A\u6570 ++ ++doclet.enum_valueof_doc.throws_ila=\u3053\u306E\u5217\u6319\u578B\u306B\u3001\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u5B9A\u6570\u304C\u306A\u3044\u5834\u5408 ++ ++doclet.enum_valueof_doc.throws_npe=\u5F15\u6570\u304Cnull\u306E\u5834\u5408 +--- ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties 2013-09-06 11:31:06.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -180,6 +180,16 @@ + doclet.0_and_1={0}\u548C{1} + #Documentation for Enums - doclet.enum_values_doc=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n
\nfor ({0} c : {0}.values())\n    System.out.println(c);\n
\n@return \u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4 +-doclet.enum_values_doc=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n
\nfor ({0} c : {0}.values())\n    System.out.println(c);\n
\n@return \u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4 ++doclet.enum_values_doc.main=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n
\nfor ({0} c : {0}.values())\n    System.out.println(c);\n
-doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26\u5B8C\u5168\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@return \u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@throws \u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@throws \u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException -+doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26\u5B8C\u5168\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@return \u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@throws IllegalArgumentException \u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@throws NullPointerException \u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException ---- langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java 2013-09-06 11:31:07.000000000 -0700 -+++ langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java 2014-04-20 12:39:08.000000000 -0700 ++doclet.enum_values_doc.return=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F\u8FD4\u56DE\u7684\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4 ++ ++doclet.enum_valueof_doc.main=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26\u5B8C\u5168\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002) ++ ++doclet.enum_valueof_doc.param_name=\u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002 ++ ++doclet.enum_valueof_doc.return=\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF ++ ++doclet.enum_valueof_doc.throws_ila=\u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF ++ ++doclet.enum_valueof_doc.throws_npe=\u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C +--- ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java 2013-09-06 11:31:07.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java 2014-06-06 19:56:17.000000000 -0700 +@@ -852,16 +852,28 @@ + for (int j = 0; j < methods.length; j++) { + MethodDoc currentMethod = methods[j]; + if (currentMethod.name().equals("values") && +- currentMethod.parameters().length == 0) { +- currentMethod.setRawCommentText( +- configuration.getText("doclet.enum_values_doc", classDoc.name())); ++ currentMethod.parameters().length == 0) { ++ StringBuilder sb = new StringBuilder(); ++ sb.append(configuration.getText("doclet.enum_values_doc.main", classDoc.name())); ++ sb.append("\n@return "); ++ sb.append(configuration.getText("doclet.enum_values_doc.return")); ++ currentMethod.setRawCommentText(sb.toString()); + } else if (currentMethod.name().equals("valueOf") && +- currentMethod.parameters().length == 1) { ++ currentMethod.parameters().length == 1) { + Type paramType = currentMethod.parameters()[0].type(); + if (paramType != null && +- paramType.qualifiedTypeName().equals(String.class.getName())) { +- currentMethod.setRawCommentText( +- configuration.getText("doclet.enum_valueof_doc")); ++ paramType.qualifiedTypeName().equals(String.class.getName())) { ++ StringBuilder sb = new StringBuilder(); ++ sb.append(configuration.getText("doclet.enum_valueof_doc.main", classDoc.name())); ++ sb.append("\n@param name "); ++ sb.append(configuration.getText("doclet.enum_valueof_doc.param_name")); ++ sb.append("\n@return "); ++ sb.append(configuration.getText("doclet.enum_valueof_doc.return")); ++ sb.append("\n@throws IllegalArgumentException "); ++ sb.append(configuration.getText("doclet.enum_valueof_doc.throws_ila")); ++ sb.append("\n@throws NullPointerException "); ++ sb.append(configuration.getText("doclet.enum_valueof_doc.throws_npe")); ++ currentMethod.setRawCommentText(sb.toString()); + } + } + } +--- ./langtools/src/share/classes/com/sun/tools/javac/code/Type.java 2013-09-06 11:31:07.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/javac/code/Type.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -597,6 +597,10 @@ + }; + } + ++ public List getComponents() { ++ return interfaces_field.prepend(supertype_field); ++ } ++ + /** The Java source which this type represents. + */ + public String toString() { +--- ./langtools/src/share/classes/com/sun/tools/javac/code/Types.java 2013-09-06 11:31:07.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/javac/code/Types.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -1012,23 +1012,10 @@ + } + } + +- if (t.isCompound()) { +- Warner oldWarner = warnStack.head; +- warnStack.head = Warner.noWarnings; +- if (!visit(supertype(t), s)) +- return false; +- for (Type intf : interfaces(t)) { +- if (!visit(intf, s)) +- return false; +- } +- if (warnStack.head.hasLint(LintCategory.UNCHECKED)) +- oldWarner.warn(LintCategory.UNCHECKED); +- return true; +- } +- +- if (s.isCompound()) { +- // call recursively to reuse the above code +- return visitClassType((ClassType)s, t); ++ if (t.isCompound() || s.isCompound()) { ++ return !t.isCompound() ? ++ visitIntersectionType((ClassType)s, t, true) : ++ visitIntersectionType(t, s, false); + } + + if (s.tag == CLASS || s.tag == ARRAY) { +@@ -1106,6 +1093,18 @@ + return false; + } + ++ boolean visitIntersectionType(ClassType ict, Type s, boolean reverse) { ++ Warner warn = Warner.noWarnings; ++ for (Type c : ict.getComponents()) { ++ warn.clear(); ++ if (reverse ? !isCastable(s, c, warn) : !isCastable(c, s, warn)) ++ return false; ++ } ++ if (warn.hasLint(LintCategory.UNCHECKED)) ++ warnStack.head.warn(LintCategory.UNCHECKED); ++ return true; ++ } ++ + @Override + public Boolean visitArrayType(ArrayType t, Type s) { + switch (s.tag) { +@@ -3369,11 +3368,18 @@ + } + + private boolean giveWarning(Type from, Type to) { +- Type subFrom = asSub(from, to.tsym); +- return to.isParameterized() && +- (!(isUnbounded(to) || +- isSubtype(from, to) || +- ((subFrom != null) && containsType(to.allparams(), subFrom.allparams())))); ++ List bounds = to.isCompound() ? ++ ((ClassType)to).getComponents() : List.of(to); ++ for (Type b : bounds) { ++ Type subFrom = asSub(from, b.tsym); ++ if (b.isParameterized() && ++ (!(isUnbounded(b) || ++ isSubtype(from, b) || ++ ((subFrom != null) && containsType(b.allparams(), subFrom.allparams()))))) { ++ return true; ++ } ++ } ++ return false; + } + + private List superClosure(Type t, Type s) { +--- ./langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java 2013-09-06 11:31:07.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java 2013-12-01 11:13:46.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. @@ -65712,8 +116606,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk } while (true); } ---- langtools/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties 2013-09-06 11:31:07.000000000 -0700 -+++ langtools/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties 2014-04-20 12:39:08.000000000 -0700 +--- ./langtools/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties 2013-09-06 11:31:07.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties 2014-01-18 12:16:11.000000000 -0800 @@ -555,19 +555,19 @@ # 0: name compiler.err.undef.label=\u30E9\u30D9\u30EB{0}\u306F\u672A\u5B9A\u7FA9\u3067\u3059 @@ -65747,8 +116641,49 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk # 0: symbol compiler.misc.diamond={0}<> ---- langtools/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties 2013-09-06 11:31:08.000000000 -0700 -+++ langtools/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties 2014-04-20 12:39:08.000000000 -0700 +--- ./langtools/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties 2013-09-06 11:31:07.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -30,14 +30,14 @@ + javac.opt.g.lines.vars.source=\u3044\u304F\u3064\u304B\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u306E\u307F\u3092\u751F\u6210\u3059\u308B + javac.opt.nowarn=\u8B66\u544A\u3092\u767A\u751F\u3055\u305B\u306A\u3044 + javac.opt.verbose=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B +-javac.opt.deprecation=\u975E\u63A8\u5968\u306EAPI\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B ++javac.opt.deprecation=\u975E\u63A8\u5968\u306EAPI\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u5834\u6240\u3092\u51FA\u529B\u3059\u308B + javac.opt.classpath=\u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304A\u3088\u3073\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B + javac.opt.sourcepath=\u5165\u529B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B +-javac.opt.bootclasspath=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B ++javac.opt.bootclasspath=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B + javac.opt.Xbootclasspath.p=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306B\u4ED8\u52A0\u3059\u308B + javac.opt.Xbootclasspath.a=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306B\u8FFD\u52A0\u3059\u308B +-javac.opt.endorseddirs=\u63A8\u5968\u898F\u683C\u30D1\u30B9\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B +-javac.opt.extdirs=\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u62E1\u5F35\u6A5F\u80FD\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B ++javac.opt.endorseddirs=\u63A8\u5968\u898F\u683C\u30D1\u30B9\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B ++javac.opt.extdirs=\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u62E1\u5F35\u6A5F\u80FD\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B + javac.opt.processorpath=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B + javac.opt.processor=\u5B9F\u884C\u3059\u308B\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306E\u540D\u524D\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u691C\u51FA\u51E6\u7406\u3092\u30D0\u30A4\u30D1\u30B9 + javac.opt.proc.none.only=\u6CE8\u91C8\u51E6\u7406\u3084\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002 +@@ -115,7 +115,7 @@ + + javac.msg.usage.nonstandard.footer=\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002 + +-javac.msg.bug=\u30B3\u30F3\u30D1\u30A4\u30E9\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002Bug Parade\u306B\u540C\u3058\u30D0\u30B0\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u306A\u3044\u3053\u3068\u3092\u3054\u78BA\u8A8D\u306E\u4E0A\u3001Java Developer Connection(http://java.sun.com/webapps/bugreport)\u3067\u30D0\u30B0\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u4E0B\u8A18\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002 ++javac.msg.bug=\u30B3\u30F3\u30D1\u30A4\u30E9\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002Bug Parade\u306B\u540C\u3058\u30D0\u30B0\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u306A\u3044\u3053\u3068\u3092\u3054\u78BA\u8A8D\u306E\u4E0A\u3001Java Developer Connection (http://java.sun.com/webapps/bugreport)\u3067\u30D0\u30B0\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u4E0B\u8A18\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002 + + javac.msg.io=\n\n\u5165\u51FA\u529B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n + +--- ./langtools/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties 2013-09-06 11:31:08.000000000 -0700 ++++ ./langtools/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -55,8 +55,8 @@ + main.opt.o=\ -o \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B) + main.opt.d=\ -d
\u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA + main.opt.v=\ -v -verbose \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046 +-main.opt.h=\ -h --help -? \u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B +-main.opt.version=\ -version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3059\u308B ++main.opt.h=\ -h --help -? \u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B ++main.opt.version=\ -version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u51FA\u529B\u3059\u308B + main.opt.jni=\ -jni JNI\u5F62\u5F0F\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8) + main.opt.force=\ -force \u5E38\u306B\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080 + main.opt.classpath=\ -classpath \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9 @@ -90,7 +90,7 @@ err.prefix=\u30A8\u30E9\u30FC: err.cant.use.option.for.fm=\u6307\u5B9A\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u3067{0}\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 @@ -65758,8 +116693,140 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk err.missing.arg={0}\u306E\u5024\u304C\u3042\u308A\u307E\u305B\u3093 err.no.classes.specified=\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} ---- langtools/test/Makefile 2013-09-06 11:31:11.000000000 -0700 -+++ langtools/test/Makefile 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/src/share/classes/com/sun/tools/javap/resources/javap_ja.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/src/share/classes/com/sun/tools/javap/resources/javap_ja.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -0,0 +1,63 @@ ++ ++err.prefix=\u30A8\u30E9\u30FC: ++ ++err.bad.constant.pool={0}\u306E\u5B9A\u6570\u30D7\u30FC\u30EB\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {1} ++err.class.not.found=\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} ++err.crash=\u91CD\u5927\u306A\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}\n\u6B21\u306E\u60C5\u5831\u3092\u542B\u3080\u30D0\u30B0\u30FB\u30EC\u30DD\u30FC\u30C8\u3092\u30D5\u30A1\u30A4\u30EB\u3057\u3066\u304F\u3060\u3055\u3044:\n{1} ++err.end.of.file={0}\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u4E88\u671F\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u7D42\u308F\u308A\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F ++err.file.not.found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} ++err.h.not.supported=-h\u306F\u4F7F\u7528\u53EF\u80FD\u3067\u306A\u304F\u306A\u308A\u307E\u3057\u305F - 'javah'\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044 ++err.incompatible.options=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u7D44\u5408\u305B\u304C\u4E0D\u6B63\u3067\u3059: {0} ++err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0} {1} {2} ++err.invalid.arg.for.option=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059: {0} ++err.ioerror={0}\u306E\u8AAD\u53D6\u308A\u4E2D\u306BIO\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {1} ++err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 ++err.no.classes.specified=\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 ++err.not.standard.file.manager=\u6A19\u6E96\u30D5\u30A1\u30A4\u30EB\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u307F\u6307\u5B9A\u3067\u304D\u307E\u3059 ++err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0} ++err.verify.not.supported=-verify\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 ++err.no.SourceFile.attribute=SourceFile\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093 ++err.source.file.not.found=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 ++err.bad.innerclasses.attribute={0}\u306EInnerClasses\u5C5E\u6027\u304C\u4E0D\u6B63\u3067\u3059 ++warn.Xold.not.supported=-Xold\u306F\u4F7F\u7528\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3057\u305F ++ ++main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001-help\u3092\u4F7F\u7528\u3057\u307E\u3059 ++ ++warn.prefix=\u8B66\u544A: ++warn.unexpected.class=\u30D0\u30A4\u30CA\u30EA\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u306B{1}\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 ++ ++note.prefix=\u6CE8: ++ ++main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001-help\u3092\u4F7F\u7528\u3057\u307E\u3059 ++ ++main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059: ++ ++ ++main.opt.help=\ -help --help -? \u3053\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B ++ ++main.opt.version=\ -version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831 ++ ++main.opt.v=\ -v -verbose \u8FFD\u52A0\u60C5\u5831\u3092\u51FA\u529B\u3059\u308B ++ ++main.opt.l=\ -l \u884C\u756A\u53F7\u3068\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u8868\u3092\u51FA\u529B\u3059\u308B ++ ++main.opt.public=\ -public public\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u307F\u3092\u8868\u793A\u3059\u308B ++ ++main.opt.protected=\ -protected protected/public\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u307F\u3092\u8868\u793A\u3059\u308B ++ ++main.opt.package=\ -package package/protected/public\u30AF\u30E9\u30B9\u304A\u3088\u3073\n \u30E1\u30F3\u30D0\u30FC\u306E\u307F\u3092\u8868\u793A\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8) ++ ++main.opt.p=\ -p -private \u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u8868\u793A\u3059\u308B ++ ++main.opt.c=\ -c \u30B3\u30FC\u30C9\u3092\u9006\u30A2\u30BB\u30F3\u30D6\u30EB\u3059\u308B ++ ++main.opt.s=\ -s \u5185\u90E8\u30BF\u30A4\u30D7\u7F72\u540D\u3092\u51FA\u529B\u3059\u308B ++ ++main.opt.classpath=\ -classpath \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B ++ ++main.opt.bootclasspath=\ -bootclasspath \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B ++ ++main.opt.constants=\ -constants \u9759\u7684final\u5B9A\u6570\u3092\u8868\u793A\u3059\u308B ++ ++ ++main.opt.sysinfo=\ -sysinfo \u51E6\u7406\u3057\u3066\u3044\u308B\u30AF\u30E9\u30B9\u306E\u30B7\u30B9\u30C6\u30E0\u60C5\u5831(\u30D1\u30B9\u3001\u30B5\u30A4\u30BA\u3001\u65E5\u4ED8\u3001MD5\u30CF\u30C3\u30B7\u30E5)\n \u3092\u8868\u793A\u3059\u308B +--- ./langtools/src/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/src/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties 2014-06-06 19:56:17.000000000 -0700 +@@ -0,0 +1,63 @@ ++ ++err.prefix=\u9519\u8BEF: ++ ++err.bad.constant.pool=\u8BFB\u53D6{0}\u7684\u5E38\u91CF\u6C60\u65F6\u51FA\u9519: {1} ++err.class.not.found=\u627E\u4E0D\u5230\u7C7B: {0} ++err.crash=\u51FA\u73B0\u4E25\u91CD\u7684\u5185\u90E8\u9519\u8BEF: {0}\n\u8BF7\u5EFA\u7ACB Bug \u62A5\u544A, \u5E76\u5305\u62EC\u4EE5\u4E0B\u4FE1\u606F:\n{1} ++err.end.of.file=\u8BFB\u53D6{0}\u65F6\u51FA\u73B0\u610F\u5916\u7684\u6587\u4EF6\u7ED3\u5C3E ++err.file.not.found=\u627E\u4E0D\u5230\u6587\u4EF6: {0} ++err.h.not.supported=-h \u4E0D\u518D\u53EF\u7528 - \u8BF7\u4F7F\u7528 'javah' \u7A0B\u5E8F ++err.incompatible.options=\u9009\u9879\u7EC4\u5408\u9519\u8BEF: {0} ++err.internal.error=\u5185\u90E8\u9519\u8BEF: {0} {1} {2} ++err.invalid.arg.for.option=\u9009\u9879\u7684\u53C2\u6570\u65E0\u6548: {0} ++err.ioerror=\u8BFB\u53D6{0}\u65F6\u51FA\u73B0 IO \u9519\u8BEF: {1} ++err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C ++err.no.classes.specified=\u672A\u6307\u5B9A\u7C7B ++err.not.standard.file.manager=\u4F7F\u7528\u6807\u51C6\u6587\u4EF6\u7BA1\u7406\u5668\u65F6\u53EA\u80FD\u6307\u5B9A\u7C7B\u6587\u4EF6 ++err.unknown.option=\u672A\u77E5\u9009\u9879: {0} ++err.verify.not.supported=\u4E0D\u652F\u6301 -verify ++err.no.SourceFile.attribute=\u6CA1\u6709 SourceFile \u5C5E\u6027 ++err.source.file.not.found=\u627E\u4E0D\u5230\u6E90\u6587\u4EF6 ++err.bad.innerclasses.attribute={0}\u7684 InnerClasses \u5C5E\u6027\u9519\u8BEF ++warn.Xold.not.supported=-Xold \u4E0D\u518D\u53EF\u7528 ++ ++main.usage.summary=\u7528\u6CD5: {0} \n\u4F7F\u7528 -help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 ++ ++warn.prefix=\u8B66\u544A: ++warn.unexpected.class=\u4E8C\u8FDB\u5236\u6587\u4EF6{0}\u5305\u542B{1} ++ ++note.prefix=\u6CE8: ++ ++main.usage.summary=\u7528\u6CD5: {0} \n\u4F7F\u7528 -help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879 ++ ++main.usage=\u7528\u6CD5: {0} \n\u5176\u4E2D, \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC: ++ ++ ++main.opt.help=\ -help --help -? \u8F93\u51FA\u6B64\u7528\u6CD5\u6D88\u606F ++ ++main.opt.version=\ -version \u7248\u672C\u4FE1\u606F ++ ++main.opt.v=\ -v -verbose \u8F93\u51FA\u9644\u52A0\u4FE1\u606F ++ ++main.opt.l=\ -l \u8F93\u51FA\u884C\u53F7\u548C\u672C\u5730\u53D8\u91CF\u8868 ++ ++main.opt.public=\ -public \u4EC5\u663E\u793A\u516C\u5171\u7C7B\u548C\u6210\u5458 ++ ++main.opt.protected=\ -protected \u663E\u793A\u53D7\u4FDD\u62A4\u7684/\u516C\u5171\u7C7B\u548C\u6210\u5458 ++ ++main.opt.package=\ -package \u663E\u793A\u7A0B\u5E8F\u5305/\u53D7\u4FDD\u62A4\u7684/\u516C\u5171\u7C7B\n \u548C\u6210\u5458 (\u9ED8\u8BA4) ++ ++main.opt.p=\ -p -private \u663E\u793A\u6240\u6709\u7C7B\u548C\u6210\u5458 ++ ++main.opt.c=\ -c \u5BF9\u4EE3\u7801\u8FDB\u884C\u53CD\u6C47\u7F16 ++ ++main.opt.s=\ -s \u8F93\u51FA\u5185\u90E8\u7C7B\u578B\u7B7E\u540D ++ ++main.opt.classpath=\ -classpath \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E ++ ++main.opt.bootclasspath=\ -bootclasspath \u8986\u76D6\u5F15\u5BFC\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E ++ ++main.opt.constants=\ -constants \u663E\u793A\u9759\u6001\u6700\u7EC8\u5E38\u91CF ++ ++ ++main.opt.sysinfo=\ -sysinfo \u663E\u793A\u6B63\u5728\u5904\u7406\u7684\u7C7B\u7684\n \u7CFB\u7EDF\u4FE1\u606F (\u8DEF\u5F84, \u5927\u5C0F, \u65E5\u671F, MD5 \u6563\u5217) +--- ./langtools/test/Makefile 2013-09-06 11:31:11.000000000 -0700 ++++ ./langtools/test/Makefile 2014-06-06 19:56:17.000000000 -0700 @@ -42,6 +42,14 @@ ARCH=i586 endif @@ -65795,8 +116862,153 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk # Root of all test results TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools ---- langtools/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java 1969-12-31 16:00:00.000000000 -0800 -+++ langtools/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/com/sun/javadoc/testHref/TestHref.java 2013-09-06 11:31:12.000000000 -0700 ++++ ./langtools/test/com/sun/javadoc/testHref/TestHref.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 +23,7 @@ + + /* + * @test +- * @bug 4663254 ++ * @bug 4663254 8016328 + * @summary Verify that spaces do not appear in hrefs and anchors. + * @author jamieh + * @library ../lib/ +@@ -46,11 +46,11 @@ + private static final String[][] TEST = { + //External link. + {BUG_ID + FS + "pkg" + FS + "C1.html", +- "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)\"" ++ "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\"" + }, + //Member summary table link. + {BUG_ID + FS + "pkg" + FS + "C1.html", +- "href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\"" ++ "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\"" + }, + //Anchor test. + {BUG_ID + FS + "pkg" + FS + "C1.html", +@@ -66,11 +66,11 @@ + }, + //{@link} test. + {BUG_ID + FS + "pkg" + FS + "C2.html", +- "Link: " ++ "Link: " + }, + //@see test. + {BUG_ID + FS + "pkg" + FS + "C2.html", +- "See Also:
" ++ "See Also:
" + }, + + //Header does not link to the page itself. +--- ./langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java 2013-09-06 11:31:13.000000000 -0700 ++++ ./langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 +23,7 @@ + + /* + * @test +- * @bug 4665566 4855876 7025314 8012375 8015998 ++ * @bug 4665566 4855876 7025314 8012375 8015998 8016328 + * @summary Verify that the output has the right javascript. + * @author jamieh + * @library ../lib/ +@@ -56,6 +56,12 @@ + " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + NL + + " targetPage = \"undefined\";" + NL + + " function validURL(url) {" + NL + ++ " try {" + NL + ++ " url = decodeURIComponent(url);" + NL + ++ " }" + NL + ++ " catch (error) {" + NL + ++ " return false;" + NL + ++ " }" + NL + + " var pos = url.indexOf(\".html\");" + NL + + " if (pos == -1 || pos != url.length - 5)" + NL + + " return false;" + NL + +@@ -67,7 +73,8 @@ + " if ('a' <= ch && ch <= 'z' ||" + NL + + " 'A' <= ch && ch <= 'Z' ||" + NL + + " ch == '$' ||" + NL + +- " ch == '_') {" + NL + ++ " ch == '_' ||" + NL + ++ " ch.charCodeAt(0) > 127) {" + NL + + " allowNumber = true;" + NL + + " allowSep = true;" + NL + + " } else if ('0' <= ch && ch <= '9'" + NL + +--- ./langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java 2013-09-06 11:31:13.000000000 -0700 ++++ ./langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 +23,7 @@ + + /* + * @test +- * @bug 4732864 6280605 7064544 ++ * @bug 4732864 6280605 7064544 8016328 + * @summary Make sure that you can link from one member to another using + * non-qualified name, furthermore, ensure the right one is linked. + * @author jamieh +@@ -49,9 +49,9 @@ + "Qualified Link: C.InnerC.
\n" + + " Unqualified Link1: C.InnerC.
\n" + + " Unqualified Link2: C.InnerC.
\n" + +- " Qualified Link: method(pkg.C.InnerC, pkg.C.InnerC2).
\n" + +- " Unqualified Link: method(C.InnerC, C.InnerC2).
\n" + +- " Unqualified Link: method(InnerC, InnerC2).
" ++ " Qualified Link: method(pkg.C.InnerC, pkg.C.InnerC2).
\n" + ++ " Unqualified Link: method(C.InnerC, C.InnerC2).
\n" + ++ " Unqualified Link: method(InnerC, InnerC2).
" + }, + {BUG_ID + FS + "pkg" + FS + "C.InnerC.html", + "Link to member in outer class: C.MEMBER
\n" + +--- ./langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java 2013-09-06 11:31:14.000000000 -0700 ++++ ./langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. + * 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,7 +23,7 @@ + + /* + * @test +- * @bug 4780441 4874845 4978816 ++ * @bug 4780441 4874845 4978816 8016328 + * @summary Make sure that when the -private flag is not used, members + * inherited from package private class are documented in the child. + * +@@ -175,7 +175,7 @@ + // Should document that a method overrides method from private class. + {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", + "
Overrides:
" + NL + +- "
" + ++ "
" + + "methodOverridenFromParent in class " + + "" + + "PrivateParent
"}, +--- ./langtools/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java 2014-04-19 01:27:04.000000000 -0700 @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. @@ -66014,8 +117226,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + return getClass().getName(); + } +} ---- langtools/test/com/sun/javadoc/testWindowTitle/p1/C1.java 1969-12-31 16:00:00.000000000 -0800 -+++ langtools/test/com/sun/javadoc/testWindowTitle/p1/C1.java 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/com/sun/javadoc/testWindowTitle/p1/C1.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/test/com/sun/javadoc/testWindowTitle/p1/C1.java 2013-12-01 11:13:46.000000000 -0800 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -66044,8 +117256,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + +public class C1 { +} ---- langtools/test/com/sun/javadoc/testWindowTitle/p2/C2.java 1969-12-31 16:00:00.000000000 -0800 -+++ langtools/test/com/sun/javadoc/testWindowTitle/p2/C2.java 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/com/sun/javadoc/testWindowTitle/p2/C2.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/test/com/sun/javadoc/testWindowTitle/p2/C2.java 2013-12-01 11:13:46.000000000 -0800 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. @@ -66074,8 +117286,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + +public class C2 { +} ---- langtools/test/tools/javac/4846262/Test.sh 2013-09-06 11:31:16.000000000 -0700 -+++ langtools/test/tools/javac/4846262/Test.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/4846262/Test.sh 2013-09-06 11:31:16.000000000 -0700 ++++ ./langtools/test/tools/javac/4846262/Test.sh 2014-06-06 19:56:17.000000000 -0700 @@ -44,7 +44,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66085,8 +117297,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; CYGWIN* ) ---- langtools/test/tools/javac/6302184/T6302184.sh 2013-09-06 11:31:16.000000000 -0700 -+++ langtools/test/tools/javac/6302184/T6302184.sh 2014-04-20 12:39:10.000000000 -0700 +--- ./langtools/test/tools/javac/6302184/T6302184.sh 2013-09-06 11:31:16.000000000 -0700 ++++ ./langtools/test/tools/javac/6302184/T6302184.sh 2014-06-06 19:56:17.000000000 -0700 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66096,8 +117308,26 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; CYGWIN* ) ---- langtools/test/tools/javac/7144981/IgnoreIgnorableCharactersInInput.java 1969-12-31 16:00:00.000000000 -0800 -+++ langtools/test/tools/javac/7144981/IgnoreIgnorableCharactersInInput.java 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/6567415/T6567415.java 2013-09-06 11:31:16.000000000 -0700 ++++ ./langtools/test/tools/javac/6567415/T6567415.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -137,7 +137,7 @@ + } + }; + t.start(); +- t.join(1000*10); ++ t.join(1000*60); + System.out.println(t.getState()); + if (t.isAlive()) { + throw new RuntimeException("Error: compilation is looping"); +--- ./langtools/test/tools/javac/7144981/IgnoreIgnorableCharactersInInput.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/test/tools/javac/7144981/IgnoreIgnorableCharactersInInput.java 2013-12-01 11:13:46.000000000 -0800 @@ -0,0 +1,92 @@ + +/* @@ -66191,8 +117421,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk + } + } +} ---- langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2013-09-06 11:31:17.000000000 -0700 -+++ langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2014-04-20 12:39:10.000000000 -0700 +--- ./langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2013-09-06 11:31:17.000000000 -0700 ++++ ./langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2014-06-06 19:56:17.000000000 -0700 @@ -56,7 +56,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66202,8 +117432,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows* ) ---- langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2013-09-06 11:31:18.000000000 -0700 -+++ langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2013-09-06 11:31:18.000000000 -0700 ++++ ./langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2014-06-06 19:56:17.000000000 -0700 @@ -54,7 +54,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66213,8 +117443,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javac/MissingInclude.sh 2013-09-06 11:31:19.000000000 -0700 -+++ langtools/test/tools/javac/MissingInclude.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javac/MissingInclude.sh 2013-09-06 11:31:19.000000000 -0700 ++++ ./langtools/test/tools/javac/MissingInclude.sh 2014-06-06 19:56:17.000000000 -0700 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66224,8 +117454,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows* ) ---- langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2013-09-06 11:31:20.000000000 -0700 -+++ langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2013-09-06 11:31:20.000000000 -0700 ++++ ./langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2014-06-06 19:56:17.000000000 -0700 @@ -52,7 +52,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66235,8 +117465,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javac/T5090006/compiler.sh 2013-09-06 11:31:20.000000000 -0700 -+++ langtools/test/tools/javac/T5090006/compiler.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/T5090006/compiler.sh 2013-09-06 11:31:20.000000000 -0700 ++++ ./langtools/test/tools/javac/T5090006/compiler.sh 2014-06-06 19:56:17.000000000 -0700 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66246,8 +117476,518 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows* ) ---- langtools/test/tools/javac/apt.sh 2013-09-06 11:31:23.000000000 -0700 -+++ langtools/test/tools/javac/apt.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javac/T8033294/RedundantWarningInIntersectionTest.java 1969-12-31 16:00:00.000000000 -0800 ++++ ./langtools/test/tools/javac/T8033294/RedundantWarningInIntersectionTest.java 2014-06-06 19:56:17.000000000 -0700 +@@ -0,0 +1,58 @@ ++/* ++ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ++ * 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 8033294 ++ * @summary javac, spurious warning for instanceof operator ++ * @compile -Werror -Xlint:unchecked RedundantWarningInIntersectionTest.java ++ */ ++ ++import java.math.BigDecimal; ++ ++public class RedundantWarningInIntersectionTest { ++ ++ class A, T> { ++ ++ protected T p; ++ ++ A(T p) {} ++ ++ public S m(T parameter) { ++ @SuppressWarnings("unchecked") ++ S self = (S) new A<>(parameter); ++ return self; ++ } ++ } ++ ++ class B> extends A, K> { ++ ++ B(K parameter) { ++ super(parameter); ++ } ++ ++ public boolean m2() { ++ return (p instanceof BigDecimal); ++ } ++ } ++} +--- ./langtools/test/tools/javac/api/6406133/T6406133.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6406133/T6406133.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary Compiler API ignores locale settings + * @author Maurizio Cimadamore + * @library ../lib ++ * @build ToolTester ++ * @run main T6406133 + */ + + import javax.tools.*; +--- ./langtools/test/tools/javac/api/6410643/T6410643.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6410643/T6410643.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary JSR 199: The method JavaCompilerTool.run fails to handle null arguments + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester ++ * @run main T6410643 + */ + + import javax.tools.JavaFileObject; +--- ./langtools/test/tools/javac/api/6411310/T6411310.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6411310/T6411310.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary JSR 199: FileObject should support user-friendly names via getName() + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6411310.java + * @run main T6411310 + */ +--- ./langtools/test/tools/javac/api/6411333/T6411333.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6411333/T6411333.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary Ensure 6400208, 6400225, and 6400267 are tested + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6411333.java + * @run main T6411333 + */ +--- ./langtools/test/tools/javac/api/6412656/T6412656.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6412656/T6412656.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary JSR 199: pass annotation processor instances to compiler + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester ++ * @run main T6412656 + */ + + import java.util.Set; +--- ./langtools/test/tools/javac/api/6415780/T6415780.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6415780/T6415780.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @author igor.tseytin@... + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester ++ * @run main T6415780 + */ + + import static javax.tools.StandardLocation.CLASS_PATH; +--- ./langtools/test/tools/javac/api/6418694/T6418694.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6418694/T6418694.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary JSR 199: JavaFileManager.hasLocation(Location) + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6418694.java + * @run main T6418694 + */ +--- ./langtools/test/tools/javac/api/6421111/T6421111.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6421111/T6421111.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary NullPointerException thrown when retrieving bounds for the type parameter + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile -Xlint:all T6421111.java + * @run main T6421111 + */ +--- ./langtools/test/tools/javac/api/6421756/T6421756.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6421756/T6421756.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary 6421756 JSR 199: In the method JavaCompilerTool.getTask 'options' can be supplied in the place of 'classes' + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6421756.java + * @run main T6421756 + */ +--- ./langtools/test/tools/javac/api/6422215/T6422215.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6422215/T6422215.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary JSR 199: What happens if a directory is missing + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester ++ * @run main T6422215 + */ + + import java.io.File; +--- ./langtools/test/tools/javac/api/6422327/T6422327.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6422327/T6422327.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary JSR 199: JavaCompilerTool can compile and generate '.class' of non '.java' files + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester ++ * @run main T6422327 + */ + + import java.io.File; +--- ./langtools/test/tools/javac/api/6423003/T6423003.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6423003/T6423003.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary JSR 199: confusing help message with compiler API + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6423003.java + * @run main T6423003 + */ +--- ./langtools/test/tools/javac/api/6431257/T6431257.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6431257/T6431257.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary JSR 199: Changes to JavaFileManager to support JSR 269 Filer API + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6431257.java package-info.java + * @run main T6431257 foo.bar.baz foo/bar/baz + */ +--- ./langtools/test/tools/javac/api/6437349/T6437349.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6437349/T6437349.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -26,6 +26,7 @@ + * @bug 6437349 + * @summary JSR 199: JavaFileObject.isNameCompatible() will give true with some incompatible kinds + * @library ../lib ++ * @build ToolTester + * @compile T6437349.java + * @run main T6437349 + */ +--- ./langtools/test/tools/javac/api/6437999/T6437999.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6437999/T6437999.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary Unit test for encoding argument to standard file manager + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6437999.java + * @run main T6437999 + */ +--- ./langtools/test/tools/javac/api/6440333/T6440333.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6440333/T6440333.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary SimpleJavaFileObject.toString() generates URI with some extra message + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6440333.java + * @run main T6440333 + */ +--- ./langtools/test/tools/javac/api/6440528/T6440528.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6440528/T6440528.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary javac deposits package-info.class in bogus directory + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6440528.java + * @run main T6440528 + */ +--- ./langtools/test/tools/javac/api/6468404/T6468404.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6468404/T6468404.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 @@ + * @author jesse.glick@... + * @author Peter von der Ah\u00e9 + * @library ../lib ++ * @build ToolTester + * @compile T6468404.java + * @run main T6468404 + */ +--- ./langtools/test/tools/javac/api/6731573/T6731573.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6731573/T6731573.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary diagnostic output should optionally include source line + * @author Maurizio Cimadamore + * @library ../lib ++ * @build ToolTester ++ * @run main T6731573 + */ + + import java.io.*; +--- ./langtools/test/tools/javac/api/6733837/T6733837.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/6733837/T6733837.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * 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 @@ + * @summary Compiler API ignores locale settings + * @author Maurizio Cimadamore + * @library ../lib ++ * @build ToolTester ++ * @run main T6733837 + */ + + import java.io.StringWriter; +--- ./langtools/test/tools/javac/api/TestJavacTaskScanner.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/TestJavacTaskScanner.java 2014-06-06 19:56:17.000000000 -0700 +@@ -27,6 +27,7 @@ + * @summary Additional functionality test of task and JSR 269 + * @author Peter von der Ah\u00e9 + * @library ./lib ++ * @build ToolTester + * @run main TestJavacTaskScanner TestJavacTaskScanner.java + */ + +@@ -159,7 +160,7 @@ + StandardJavaFileManager fm = tool.getStandardFileManager(dl, null, encoding); + try { + fm.setLocation(SOURCE_PATH, Arrays.asList(test_src)); +- fm.setLocation(CLASS_PATH, Arrays.asList(test_classes, javac_classes)); ++ fm.setLocation(CLASS_PATH, join(test_class_path, Arrays.asList(javac_classes))); + fm.setLocation(CLASS_OUTPUT, Arrays.asList(test_classes)); + } catch (IOException e) { + throw new AssertionError(e); +--- ./langtools/test/tools/javac/api/guide/Test.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/guide/Test.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -27,6 +27,7 @@ + * @summary Various bugs fixed while writing Compiler API Guide + * @author Peter von der Ah\u0081 + * @library ../lib ++ * @build ToolTester + * @compile Test.java + * @run main Test + */ +--- ./langtools/test/tools/javac/api/lib/ToolTester.java 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/api/lib/ToolTester.java 2014-06-06 19:56:17.000000000 -0700 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * 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,7 +24,7 @@ + import java.io.File; + import java.io.IOException; + import java.nio.charset.Charset; +-import java.util.Arrays; ++import java.util.*; + import javax.tools.*; + + import static javax.tools.StandardLocation.CLASS_PATH; +@@ -34,6 +34,8 @@ + public class ToolTester { + public final File test_src = new File(System.getProperty("test.src", ".")); + public final File test_classes = new File(System.getProperty("test.classes", ".")); ++ public final List test_class_path = pathToFiles(System.getProperty("test.class.path"), ++ Arrays.asList(test_classes)); + public final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); + public final StandardJavaFileManager fm = getFileManager(tool, null, null); + public JavaCompiler.CompilationTask task = null; +@@ -43,11 +45,36 @@ + StandardJavaFileManager fm = tool.getStandardFileManager(dl, null, encoding); + try { + fm.setLocation(SOURCE_PATH, Arrays.asList(test_src)); +- fm.setLocation(CLASS_PATH, Arrays.asList(test_classes)); ++ fm.setLocation(CLASS_PATH, test_class_path); + fm.setLocation(CLASS_OUTPUT, Arrays.asList(test_classes)); + } catch (IOException e) { + throw new AssertionError(e); + } + return fm; + } ++ ++ protected List pathToFiles(String path, List defaultPath) { ++ List files = new ArrayList<>(); ++ for (String f: path.split(File.pathSeparator)) { ++ if (f.isEmpty()) ++ continue; ++ File file = new File(f); ++ if (file.exists()) ++ files.add(file); ++ } ++ if (files.isEmpty()) ++ files.addAll(defaultPath); ++ return files; ++ } ++ ++ protected List join(List a, List b) { ++ if (a.isEmpty()) ++ return b; ++ if (b.isEmpty()) ++ return a; ++ List result = new ArrayList<>(); ++ result.addAll(a); ++ result.addAll(b); ++ return result; ++ } + } +--- ./langtools/test/tools/javac/apt.sh 2013-09-06 11:31:23.000000000 -0700 ++++ ./langtools/test/tools/javac/apt.sh 2014-06-06 19:56:17.000000000 -0700 @@ -38,7 +38,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66257,8 +117997,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- langtools/test/tools/javac/constDebug/ConstDebug.sh 2013-09-06 11:31:24.000000000 -0700 -+++ langtools/test/tools/javac/constDebug/ConstDebug.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/constDebug/ConstDebug.sh 2013-09-06 11:31:24.000000000 -0700 ++++ ./langtools/test/tools/javac/constDebug/ConstDebug.sh 2014-06-06 19:56:17.000000000 -0700 @@ -47,7 +47,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66268,8 +118008,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2013-09-06 11:31:28.000000000 -0700 -+++ langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2014-04-20 12:39:10.000000000 -0700 +--- ./langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2013-09-06 11:31:28.000000000 -0700 ++++ ./langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2014-06-06 19:56:17.000000000 -0700 @@ -48,7 +48,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66279,8 +118019,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; CYGWIN* ) ---- langtools/test/tools/javac/innerClassFile/Driver.sh 2013-09-06 11:31:33.000000000 -0700 -+++ langtools/test/tools/javac/innerClassFile/Driver.sh 2014-04-20 12:39:10.000000000 -0700 +--- ./langtools/test/tools/javac/innerClassFile/Driver.sh 2013-09-06 11:31:33.000000000 -0700 ++++ ./langtools/test/tools/javac/innerClassFile/Driver.sh 2014-06-06 19:56:17.000000000 -0700 @@ -53,7 +53,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66290,8 +118030,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows* ) ---- langtools/test/tools/javac/javazip/Test.sh 2013-09-06 11:31:33.000000000 -0700 -+++ langtools/test/tools/javac/javazip/Test.sh 2014-04-20 12:39:10.000000000 -0700 +--- ./langtools/test/tools/javac/javazip/Test.sh 2013-09-06 11:31:33.000000000 -0700 ++++ ./langtools/test/tools/javac/javazip/Test.sh 2014-06-06 19:56:17.000000000 -0700 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66301,8 +118041,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" SCR=`pwd` ;; ---- langtools/test/tools/javac/links/links.sh 2013-09-06 11:31:33.000000000 -0700 -+++ langtools/test/tools/javac/links/links.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/links/links.sh 2013-09-06 11:31:33.000000000 -0700 ++++ ./langtools/test/tools/javac/links/links.sh 2014-06-06 19:56:17.000000000 -0700 @@ -53,7 +53,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66312,8 +118052,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk NULL=/dev/null PS=":" FS="/" ---- langtools/test/tools/javac/newlines/Newlines.sh 2013-09-06 11:31:34.000000000 -0700 -+++ langtools/test/tools/javac/newlines/Newlines.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/newlines/Newlines.sh 2013-09-06 11:31:34.000000000 -0700 ++++ ./langtools/test/tools/javac/newlines/Newlines.sh 2014-06-06 19:56:17.000000000 -0700 @@ -50,7 +50,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66323,8 +118063,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows* ) ---- langtools/test/tools/javac/stackmap/T4955930.sh 2013-09-06 11:31:36.000000000 -0700 -+++ langtools/test/tools/javac/stackmap/T4955930.sh 2014-04-20 12:39:10.000000000 -0700 +--- ./langtools/test/tools/javac/stackmap/T4955930.sh 2013-09-06 11:31:36.000000000 -0700 ++++ ./langtools/test/tools/javac/stackmap/T4955930.sh 2014-06-06 19:56:17.000000000 -0700 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66334,8 +118074,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows_95 | Windows_98 | Windows_NT ) ---- langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2013-09-06 11:31:36.000000000 -0700 -+++ langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2014-04-20 12:39:09.000000000 -0700 +--- ./langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2013-09-06 11:31:36.000000000 -0700 ++++ ./langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2014-06-06 19:56:17.000000000 -0700 @@ -55,7 +55,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66345,8 +118085,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ] then ENV="env LANG=en_US.UTF-8" ---- langtools/test/tools/javah/6257087/foo.sh 2013-09-06 11:31:38.000000000 -0700 -+++ langtools/test/tools/javah/6257087/foo.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javah/6257087/foo.sh 2013-09-06 11:31:38.000000000 -0700 ++++ ./langtools/test/tools/javah/6257087/foo.sh 2014-06-06 19:56:17.000000000 -0700 @@ -41,7 +41,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66356,8 +118096,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javah/ConstMacroTest.sh 2013-09-06 11:31:38.000000000 -0700 -+++ langtools/test/tools/javah/ConstMacroTest.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javah/ConstMacroTest.sh 2013-09-06 11:31:38.000000000 -0700 ++++ ./langtools/test/tools/javah/ConstMacroTest.sh 2014-06-06 19:56:17.000000000 -0700 @@ -56,7 +56,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66367,8 +118107,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javah/MissingParamClassTest.sh 2013-09-06 11:31:38.000000000 -0700 -+++ langtools/test/tools/javah/MissingParamClassTest.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javah/MissingParamClassTest.sh 2013-09-06 11:31:38.000000000 -0700 ++++ ./langtools/test/tools/javah/MissingParamClassTest.sh 2014-06-06 19:56:17.000000000 -0700 @@ -58,7 +58,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66378,8 +118118,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javah/ReadOldClass.sh 2013-09-06 11:31:38.000000000 -0700 -+++ langtools/test/tools/javah/ReadOldClass.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javah/ReadOldClass.sh 2013-09-06 11:31:38.000000000 -0700 ++++ ./langtools/test/tools/javah/ReadOldClass.sh 2014-06-06 19:56:17.000000000 -0700 @@ -43,7 +43,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66389,8 +118129,8 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk PS=":" FS="/" ;; ---- langtools/test/tools/javap/pathsep.sh 2013-09-06 11:31:39.000000000 -0700 -+++ langtools/test/tools/javap/pathsep.sh 2014-04-20 12:39:11.000000000 -0700 +--- ./langtools/test/tools/javap/pathsep.sh 2013-09-06 11:31:39.000000000 -0700 ++++ ./langtools/test/tools/javap/pathsep.sh 2014-06-06 19:56:17.000000000 -0700 @@ -40,7 +40,7 @@ # set platform-dependent variables OS=`uname -s` @@ -66400,3 +118140,20 @@ Files openjdk/jdk/test/javax/imageio/plugins/jpeg/truncated.jpg and bsd-port/jdk FS="/" ;; Windows* ) +--- ./make/scripts/webrev.ksh 2013-09-06 11:20:33.000000000 -0700 ++++ ./make/scripts/webrev.ksh 2014-06-06 19:56:10.000000000 -0700 +@@ -2695,11 +2695,11 @@ + rm -f $WDIR/$DIR/$F.html + + its_a_jar= +- if expr $F : '.*\.jar' >/dev/null; then ++ if expr $F : '.*\.jar' \| $F : '.*\.zip' >/dev/null; then + its_a_jar=1 +- # It's a JAR file, let's do it differntly ++ # It's a JAR or ZIP file, let's do it differently + if [[ -z $JAR ]]; then +- print "No access to jar, so can't produce diffs for jar files" ++ print "No access to jar, so can't produce diffs for jar or zip files" + else + if [ -f $ofile ]; then + $JAR -tvf $ofile >"$ofile".lst -- cgit v1.2.3