Date: Sun, 10 Mar 2013 01:41:07 +0000 (UTC) From: Greg Lewis <glewis@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r313788 - in head/java/openjdk7: . files Message-ID: <201303100141.r2A1f782094892@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glewis Date: Sun Mar 10 01:41:07 2013 New Revision: 313788 URL: http://svnweb.freebsd.org/changeset/ports/313788 Log: . Update to 7u17. Deleted: head/java/openjdk7/files/patch-PlainDatagramSocketImpl.c head/java/openjdk7/files/patch-bsd_close.c head/java/openjdk7/files/patch-zzz-7u11 Modified: head/java/openjdk7/Makefile head/java/openjdk7/files/patch-set Modified: head/java/openjdk7/Makefile ============================================================================== --- head/java/openjdk7/Makefile Sun Mar 10 00:59:11 2013 (r313787) +++ head/java/openjdk7/Makefile Sun Mar 10 01:41:07 2013 (r313788) @@ -7,7 +7,6 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${PORT_MINOR_VERSION}.${PORT_BUILD_NUMBER} -PORTREVISION= 2 CATEGORIES= java devel MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/ \ http://download.java.net/jaxp/1.4.5/:jaxp \ @@ -41,8 +40,8 @@ DEBUG_DESC= Enable extra debugging info POLICY_DESC= Install the Unlimited Strength Policy Files TZUPDATE_DESC= Update the time zone data -PORT_MINOR_VERSION= 11 -PORT_BUILD_NUMBER= 21 +PORT_MINOR_VERSION= 17 +PORT_BUILD_NUMBER= 02 JDK_MAJOR_VERSION= 7 JDK_MINOR_VERSION= 6 JDK_BUILD_NUMBER= 24 @@ -96,7 +95,7 @@ MAKE_ENV+= LANG="C" \ ENABLE_FULL_DEBUG_SYMBOLS=0 \ PTHREAD_LIBS="${PTHREAD_LIBS}" \ MILESTONE="fcs" \ - JDK_MICRO_VERSION="0_0${PORT_MINOR_VERSION}" \ + JDK_MICRO_VERSION="0_${PORT_MINOR_VERSION}" \ BUILD_NUMBER="b${PORT_BUILD_NUMBER}" .if !defined(DISABLE_MAKE_JOBS) Modified: head/java/openjdk7/files/patch-set ============================================================================== --- head/java/openjdk7/files/patch-set Sun Mar 10 00:59:11 2013 (r313787) +++ head/java/openjdk7/files/patch-set Sun Mar 10 01:41:07 2013 (r313788) @@ -1,5 +1,5 @@ --- .hgtags 2012-08-10 09:07:00.000000000 -0700 -+++ .hgtags 2013-01-16 08:57:46.000000000 -0800 ++++ .hgtags 2013-03-09 08:44:35.000000000 -0800 @@ -123,6 +123,7 @@ 2d38c2a79c144c30cd04d143d83ee7ec6af40771 jdk7-b146 3ac30b3852876ccad6bd61697b5f9efa91ca7bc6 jdk7u1-b01 @@ -8,7 +8,7 @@ 34451dc0580d5c95d97b95a564e6198f36545d68 jdk7u1-b02 bf735d852f79bdbb3373c777eec3ff27e035e7ba jdk7u1-b03 f66a2bada589f4157789e6f66472954d2f1c114e jdk7u1-b04 -@@ -197,5 +198,27 @@ +@@ -197,5 +198,46 @@ 29f6fb1833eb2a696b95e8985126f2d70f511a82 jdk7u6-b21 31cdab09d719fe60876c7f3a472386c1455d93e2 jdk7u6-b22 d1c709f1196a73d1df10d04a221b10e30fd2eb48 jdk7u6-b23 @@ -38,8 +38,27 @@ +c8a37a49fc90ae31b864544d6d4a9f6137d4995d jdk7u10-b16 +494e838439db7f0f4e36f7dcfeba06d2bef78c8d jdk7u10-b17 +dce9058d2151e6b5c84898c13cfd1521a627a296 jdk7u10-b18 ++b5fb925394331313dbe3859fdc408bfd37193476 jdk7u10-b30 ++c2d5141baeda6c9b5bbc83c21eff9c3940fefae4 jdk7u11-b20 ++168aa0f1417b3651a955ae66068dc148b660f829 jdk7u11-b21 ++c8a37a49fc90ae31b864544d6d4a9f6137d4995d jdk7u11-b03 ++0b418e2ccf9093718609144689d1a8b316ad951f jdk7u11-b04 ++e127e6c94b56f7348df67d9672c16a7dc9c5ec5e jdk7u11-b05 ++f6abff072aabfee866342d9f7f4aac7d13450ddf jdk7u11-b06 ++80a3d0bcd3d4c9e83b75416178bdd60a2d23ebbc jdk7u11-b07 ++e7c55def6796d3c426631b5717084ef122908847 jdk7u11-b08 ++2412f7b8551ede5296cb6e1d6189f40aad9eeffe jdk7u13-b09 ++3b7815df113f8044039739276237b964ee8fa015 jdk7u13-b10 ++527d3cf769ec073d7348e4c31f97c47c943c96b6 jdk7u13-b30 ++3b7815df113f8044039739276237b964ee8fa015 jdk7u13-b20 ++0e52db2d9bb8bc789f6c66f2cfb7cd2d3b0b16c6 jdk7u15-b01 ++0324fca94d073b3aad77658224f17679f25c18b1 jdk7u15-b02 ++25a9d44cebf2a7ac6dd1748c94e00b242403acb1 jdk7u15-b30 ++f37a75bd39595ba38bdc53ee957c63bbb3cbb12d jdk7u15-b03 ++2412f7b8551ede5296cb6e1d6189f40aad9eeffe jdk7u15-b32 ++0c2b2dae93e7a720bbcc2e13a1913a2264335554 jdk7u17-b01 --- corba/.hgtags 2012-08-10 09:09:50.000000000 -0700 -+++ corba/.hgtags 2013-01-16 08:57:47.000000000 -0800 ++++ corba/.hgtags 2013-03-09 08:44:37.000000000 -0800 @@ -123,6 +123,7 @@ 770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146 36f0efbc66ef8ace3cca8aa8d0c88f3334080f8a jdk7u1-b01 @@ -48,7 +67,7 @@ 9515a2d034b4727c11aeea36354a549fbc469c4f jdk7u1-b02 dd71cb354c573c1addcda269a7dd9144bfce9587 jdk7u1-b03 eaee830124aa453627591d8f9eccb39d7e040876 jdk7u1-b04 -@@ -197,5 +198,27 @@ +@@ -197,5 +198,46 @@ 353c15c4bc371f2f8258344c988d1403477cc140 jdk7u6-b21 793b80c0316fcafa18668bced26acb41af3be07d jdk7u6-b22 2a8376123fbb81bc4b2f643ff7cfaf7f87b21c35 jdk7u6-b23 @@ -78,6 +97,4261 @@ +64f09d7549d304fbfd3c29b4f148bf44e8e3e979 jdk7u10-b16 +57c3355153d1624fd98618097c1a82ab3ffc66f8 jdk7u10-b17 +f2a347637a55fa4de9542a8dcab72ad6fac44d2b jdk7u10-b18 ++22cf8bc2ec47498fe548b308a81be0486dd7e3d0 jdk7u10-b30 ++e7952daece16b27d69cb78f6912407c3bbaf8e83 jdk7u11-b20 ++dff0f0272891b1d53497d9525567959b73476ff9 jdk7u11-b21 ++96a3c68e5741dc9ab5cb0da426511eb15fd29ede jdk7u11-b03 ++1413b173730f4796fca42c89eeb804a5935b0264 jdk7u11-b04 ++5c49a17bc15f4fd4722746788f5130df132cd038 jdk7u11-b05 ++30057c20fbb3caa61857656d05421e56731184f2 jdk7u11-b06 ++9d9440d1fa2dd872c2a2b564fc5fa4d3555afab6 jdk7u11-b07 ++983fac5b27376839142ac5a8770461e4e48c2dc8 jdk7u11-b08 ++b192d148731916e4b1b47b7a3e6b0a1d7ddf3f14 jdk7u13-b09 ++b9ab9b203a41469a274419d26be2c04558b57ce8 jdk7u13-b10 ++f5ef46204dba19679edd7492b221110fd1a0bd33 jdk7u13-b30 ++b9ab9b203a41469a274419d26be2c04558b57ce8 jdk7u13-b20 ++622e370c2d1e8c5f48d8f520f486dc6fcc1239c5 jdk7u15-b01 ++30188388048333e213a839363329ac2cb0cf0e0d jdk7u15-b02 ++7f0e7ce088ff554f64e2c102ae3718ae4d580c34 jdk7u15-b30 ++e5b996dabec6ac6aa12705ce678642605ea9d476 jdk7u15-b03 ++b192d148731916e4b1b47b7a3e6b0a1d7ddf3f14 jdk7u15-b32 ++94e8b9b0e0ef1685e2f2fcc886e08a42a85c8e03 jdk7u17-b01 +--- corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk 2012-08-10 09:09:53.000000000 -0700 ++++ corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -29,10 +29,6 @@ + com/sun/corba/se/impl/orbutil/DenseIntMapImpl.java \ + com/sun/corba/se/impl/orbutil/GetPropertyAction.java \ + com/sun/corba/se/impl/orbutil/HexOutputStream.java \ +- com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java \ +- com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java \ +- com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java \ +- com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java \ + com/sun/corba/se/impl/orbutil/LegacyHookGetFields.java \ + com/sun/corba/se/impl/orbutil/LegacyHookPutFields.java \ + com/sun/corba/se/impl/orbutil/LogKeywords.java \ +@@ -45,19 +41,11 @@ + com/sun/corba/se/impl/orbutil/ORBUtility.java \ + com/sun/corba/se/impl/orbutil/ORBClassLoader.java \ + com/sun/corba/se/impl/orbutil/RepIdDelegator.java \ +- com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java \ +- com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java \ +- com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java \ +- com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java \ + com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java \ + com/sun/corba/se/impl/orbutil/RepositoryIdStrings.java \ + com/sun/corba/se/impl/orbutil/RepositoryIdUtility.java \ + com/sun/corba/se/impl/orbutil/RepositoryIdInterface.java \ +- com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java \ +- com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java \ + com/sun/corba/se/impl/orbutil/StackImpl.java \ +- com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java \ +- com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java \ + com/sun/corba/se/impl/orbutil/closure/Future.java \ + com/sun/corba/se/impl/orbutil/closure/Constant.java \ + com/sun/corba/se/impl/orbutil/concurrent/Sync.java \ +--- corba/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java 2012-08-10 09:10:11.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2002, 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 +@@ -322,9 +322,9 @@ + com.sun.corba.se.spi.activation._ServerImplBase + { + private ORB orb; +- private Method installMethod ; +- private Method uninstallMethod ; +- private Method shutdownMethod ; ++ private transient Method installMethod ; ++ private transient Method uninstallMethod ; ++ private transient Method shutdownMethod ; + private Object methodArgs[] ; + + ServerCallback(ORB orb, Method installMethod, Method uninstallMethod, +--- corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java 2012-08-10 09:10:12.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2004, 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 +@@ -1218,7 +1218,7 @@ + // See bug 4391648 for more info about the tcORB in this + // case. + RepositoryIdStrings repStrs +- = RepositoryIdFactory.getRepIdStringsFactory(tcORB); ++ = RepositoryIdFactory.getRepIdStringsFactory(); + + + // Assertion: c instanceof Serializable? +@@ -1251,7 +1251,7 @@ + // Anything else + // We know that this is a TypeCodeImpl since it is our ORB + classTC = (TypeCodeImpl)ValueUtility.createTypeCodeForClass( +- tcORB, c, ORBUtility.createValueHandler(tcORB)); ++ tcORB, c, ORBUtility.createValueHandler()); + // Intruct classTC to store its buffer + classTC.setCaching(true); + // Update the cache +--- corba/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java 2012-08-10 09:10:15.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, 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 +@@ -269,8 +269,8 @@ + + private final void createRepositoryIdHandlers() + { +- repIdUtil = RepositoryIdFactory.getRepIdUtility(orb); +- repIdStrs = RepositoryIdFactory.getRepIdStringsFactory(orb); ++ repIdUtil = RepositoryIdFactory.getRepIdUtility(); ++ repIdStrs = RepositoryIdFactory.getRepIdStringsFactory(); + } + + public GIOPVersion getGIOPVersion() { +@@ -564,10 +564,7 @@ + + checkForNegativeLength(len); + +- if (orb != null && ORBUtility.isLegacyORB((ORB)orb)) +- return legacyReadString(len); +- else +- return internalReadString(len); ++ return internalReadString(len); + } + + private final String internalReadString(int len) { +@@ -588,54 +585,6 @@ + return new String(result, 0, getCharConverter().getNumChars()); + } + +- private final String legacyReadString(int len) { +- +- // +- // Workaround for ORBs which send string lengths of +- // zero to mean empty string. +- // +- // +- // IMPORTANT: Do not replace 'new String("")' with "", it may result +- // in a Serialization bug (See serialization.zerolengthstring) and +- // bug id: 4728756 for details +- if (len == 0) +- return new String(""); +- +- len--; +- char[] c = new char[len]; +- +- int n = 0; +- while (n < len) { +- int avail; +- int bytes; +- int wanted; +- +- avail = bbwi.buflen - bbwi.position(); +- if (avail <= 0) { +- grow(1, 1); +- avail = bbwi.buflen - bbwi.position(); +- } +- wanted = len - n; +- bytes = (wanted < avail) ? wanted : avail; +- // Microbenchmarks are showing a loop of ByteBuffer.get(int) being +- // faster than ByteBuffer.get(byte[], int, int). +- for (int i=0; i<bytes; i++) { +- c[n+i] = (char) (bbwi.byteBuffer.get(bbwi.position()+i) & 0xFF); +- } +- bbwi.position(bbwi.position() + bytes); +- n += bytes; +- } +- +- // +- // Skip past terminating null byte +- // +- if (bbwi.position() + 1 > bbwi.buflen) +- alignAndCheck(1, 1); +- bbwi.position(bbwi.position() + 1); +- +- return new String(c); +- } +- + public final String read_string() { + return readStringOrIndirection(false); + } +@@ -1045,7 +994,7 @@ + + try { + if (valueHandler == null) +- valueHandler = ORBUtility.createValueHandler(orb); ++ valueHandler = ORBUtility.createValueHandler(); + + value = valueHandler.readValue(parent, + indirection, +--- corba/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java 2012-08-10 09:10:15.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1997, 2011, 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 +@@ -189,18 +189,8 @@ + + private final void createRepositoryIdHandlers() + { +- if (orb != null) { +- // Get the appropriate versions based on the ORB version. The +- // ORB versioning info is only in the core ORB. +- repIdUtil +- = RepositoryIdFactory.getRepIdUtility(orb); +- repIdStrs +- = RepositoryIdFactory.getRepIdStringsFactory(orb); +- } else { +- // Get the latest versions +- repIdUtil = RepositoryIdFactory.getRepIdUtility(); +- repIdStrs = RepositoryIdFactory.getRepIdStringsFactory(); +- } ++ repIdUtil = RepositoryIdFactory.getRepIdUtility(); ++ repIdStrs = RepositoryIdFactory.getRepIdStringsFactory(); + } + + public BufferManagerWrite getBufferManager() +@@ -705,7 +695,7 @@ + private void writeArray(Serializable array, Class clazz) { + + if (valueHandler == null) +- valueHandler = ORBUtility.createValueHandler(orb); //d11638 ++ valueHandler = ORBUtility.createValueHandler(); //d11638 + + // Write value_tag + int indirection = writeValueTag(mustChunk, true, +@@ -768,7 +758,7 @@ + + private void writeRMIIIOPValueType(Serializable object, Class clazz) { + if (valueHandler == null) +- valueHandler = ORBUtility.createValueHandler(orb); //d11638 ++ valueHandler = ORBUtility.createValueHandler(); //d11638 + + Serializable key = object; + +--- corba/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java 2012-08-10 09:10:18.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 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 +@@ -86,7 +86,7 @@ + // default to using the current ORB version in case the + // vhandler is not set + if (vhandler == null) { +- vhandler = new ValueHandlerImpl(false); ++ vhandler = ValueHandlerImpl.getInstance(false); + } + + // Util.getCodebase may return null which would +@@ -120,7 +120,7 @@ + // default to using the current ORB version in case the + // vhandler is not set + if (vhandler == null) { +- vhandler = new ValueHandlerImpl(false); ++ vhandler = ValueHandlerImpl.getInstance(false); + } + + try{ +@@ -161,7 +161,7 @@ + // default to using the current ORB version in case the + // vhandler is not set + if (vhandler == null) { +- vhandler = new ValueHandlerImpl(false); ++ vhandler = ValueHandlerImpl.getInstance(false); + } + + Stack repIds = new Stack(); +--- corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java 2012-08-10 09:10:18.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -25,7 +25,7 @@ + /* + * Licensed Materials - Property of IBM + * RMI-IIOP v1.0 +- * Copyright IBM Corp. 1998 1999 All Rights Reserved ++ * Copyright IBM Corp. 1998 2012 All Rights Reserved + * + */ + +@@ -56,7 +56,8 @@ + + import java.util.Arrays; + import java.util.Comparator; +-import java.util.Hashtable; ++import java.util.concurrent.ConcurrentHashMap; ++import java.util.concurrent.ConcurrentMap; + + import com.sun.corba.se.impl.util.RepositoryId; + +@@ -83,8 +84,6 @@ + private static Object noArgsList[] = {}; + private static Class noTypesList[] = {}; + +- private static Hashtable translatedFields; +- + /** true if represents enum type */ + private boolean isEnum; + +@@ -384,6 +383,55 @@ + */ + } + ++ private static final class PersistentFieldsValue { ++ private final ConcurrentMap map = new ConcurrentHashMap(); ++ private static final Object NULL_VALUE = ++ (PersistentFieldsValue.class.getName() + ".NULL_VALUE"); ++ ++ PersistentFieldsValue() { } ++ ++ ObjectStreamField[] get(Class type) { ++ Object value = map.get(type); ++ if (value == null) { ++ value = computeValue(type); ++ map.putIfAbsent(type, value); ++ } ++ return ((value == NULL_VALUE) ? null : (ObjectStreamField[])value); ++ } ++ ++ private static Object computeValue(Class<?> type) { ++ try { ++ Field pf = type.getDeclaredField("serialPersistentFields"); ++ int mods = pf.getModifiers(); ++ if (Modifier.isPrivate(mods) && Modifier.isStatic(mods) && ++ Modifier.isFinal(mods)) { ++ pf.setAccessible(true); ++ java.io.ObjectStreamField[] fields = ++ (java.io.ObjectStreamField[])pf.get(type); ++ return translateFields(fields); ++ } ++ } catch (NoSuchFieldException e1) { ++ } catch (IllegalAccessException e2) { ++ } catch (IllegalArgumentException e3) { ++ } catch (ClassCastException e4) { } ++ return NULL_VALUE; ++ } ++ ++ private static ObjectStreamField[] translateFields( ++ java.io.ObjectStreamField[] fields) { ++ ObjectStreamField[] translation = ++ new ObjectStreamField[fields.length]; ++ for (int i = 0; i < fields.length; i++) { ++ translation[i] = new ObjectStreamField(fields[i].getName(), ++ fields[i].getType()); ++ } ++ return translation; ++ } ++ } ++ ++ private static final PersistentFieldsValue persistentFieldsValue = ++ new PersistentFieldsValue(); ++ + /* + * Initialize class descriptor. This method is only invoked on class + * descriptors created via calls to lookupInternal(). This method is kept +@@ -416,35 +464,7 @@ + * If it is declared, use the declared serialPersistentFields. + * Otherwise, extract the fields from the class itself. + */ +- try { +- Field pf = cl.getDeclaredField("serialPersistentFields"); +- // serial bug 7; the serialPersistentFields were not +- // being read and stored as Accessible bit was not set +- pf.setAccessible(true); +- // serial bug 7; need to find if the field is of type +- // java.io.ObjectStreamField +- java.io.ObjectStreamField[] f = +- (java.io.ObjectStreamField[])pf.get(cl); +- int mods = pf.getModifiers(); +- if ((Modifier.isPrivate(mods)) && +- (Modifier.isStatic(mods)) && +- (Modifier.isFinal(mods))) +- { +- fields = (ObjectStreamField[])translateFields((Object[])pf.get(cl)); +- } +- } catch (NoSuchFieldException e) { +- fields = null; +- } catch (IllegalAccessException e) { +- fields = null; +- } catch (IllegalArgumentException e) { +- fields = null; +- } catch (ClassCastException e) { +- /* Thrown if a field serialPersistentField exists +- * but it is not of type ObjectStreamField. +- */ +- fields = null; +- } +- ++ fields = persistentFieldsValue.get(cl); + + if (fields == null) { + /* Get all of the declared fields for this +@@ -641,44 +661,6 @@ + superclass = null; + } + +- private static Object[] translateFields(Object objs[]) +- throws NoSuchFieldException { +- try{ +- java.io.ObjectStreamField fields[] = (java.io.ObjectStreamField[])objs; +- Object translation[] = null; +- +- if (translatedFields == null) +- translatedFields = new Hashtable(); +- +- translation = (Object[])translatedFields.get(fields); +- +- if (translation != null) +- return translation; +- else { +- Class osfClass = Class.forName("com.sun.corba.se.impl.io.ObjectStreamField"); +- translation = (Object[])java.lang.reflect.Array.newInstance(osfClass, objs.length); +- Object arg[] = new Object[2]; +- Class types[] = {String.class, Class.class}; +- Constructor constructor = osfClass.getDeclaredConstructor(types); +- for (int i = fields.length -1; i >= 0; i--){ +- arg[0] = fields[i].getName(); +- arg[1] = fields[i].getType(); +- +- translation[i] = constructor.newInstance(arg); +- } +- translatedFields.put(fields, translation); +- +- } +- +- return (Object[])translation; +- } +- catch(Throwable t){ +- NoSuchFieldException nsfe = new NoSuchFieldException(); +- nsfe.initCause( t ) ; +- throw nsfe ; +- } +- } +- + /* + * Set the class this version descriptor matches. + * The base class name and serializable hash must match. +@@ -1555,8 +1537,8 @@ + private boolean hasExternalizableBlockData; + Method writeObjectMethod; + Method readObjectMethod; +- private Method writeReplaceObjectMethod; +- private Method readResolveObjectMethod; ++ private transient Method writeReplaceObjectMethod; ++ private transient Method readResolveObjectMethod; + private Constructor cons ; + + /** +--- corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java 2012-08-10 09:10:19.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -53,7 +53,7 @@ + import com.sun.corba.se.impl.logging.OMGSystemException; + import com.sun.corba.se.impl.logging.UtilSystemException; + +-public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat { ++public final class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat { + + // Property to override our maximum stream format version + public static final String FORMAT_VERSION_PROPERTY +@@ -150,14 +150,22 @@ + writeValueWithVersion(out, value, streamFormatVersion); + } + +- public ValueHandlerImpl(){} ++ private ValueHandlerImpl(){} + +- public ValueHandlerImpl(boolean isInputStream) { ++ private ValueHandlerImpl(boolean isInputStream) { + this(); + useHashtables = false; + this.isInputStream = isInputStream; + } + ++ static ValueHandlerImpl getInstance() { ++ return new ValueHandlerImpl(); ++ } ++ ++ static ValueHandlerImpl getInstance(boolean isInputStream) { ++ return new ValueHandlerImpl(isInputStream); ++ } ++ + /** + * Writes the value to the stream using java semantics. + * @param out The stream to write the value to +@@ -458,12 +466,7 @@ + return ObjectStreamClass.lookup(value.getClass()).writeReplace(value); + } + +- /** +- * Encapsulates writing of Java char arrays so that the 1.3 subclass +- * can override it without exposing internals across packages. This +- * is a fix for bug 4367783. +- */ +- protected void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out, ++ private void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out, + char[] array, + int offset, + int length) +@@ -576,12 +579,7 @@ + } + } + +- /** +- * Encapsulates reading of Java char arrays so that the 1.3 subclass +- * can override it without exposing internals across packages. This +- * is a fix for bug 4367783. +- */ +- protected void readCharArray(org.omg.CORBA_2_3.portable.InputStream in, ++ private void readCharArray(org.omg.CORBA_2_3.portable.InputStream in, + char[] array, + int offset, + int length) +@@ -795,7 +793,7 @@ + return RepositoryId.cache.getId(repId).isSequence(); + } + +- protected String getOutputStreamClassName() { ++ private String getOutputStreamClassName() { + return "com.sun.corba.se.impl.io.IIOPOutputStream"; + } + +@@ -843,29 +841,11 @@ + private IIOPOutputStream createOutputStreamBuiltInNoPriv( + final String name + ) throws IOException { +- return +- name.equals( +- IIOPOutputStream +- .class.getName() +- ) ? +- new IIOPOutputStream() : +- +- name.equals( +- com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3 +- .class.getName() +- ) ? +- new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3() : +- +- name.equals( +- com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1 +- .class.getName() +- ) ? +- new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1() : +- +- null; ++ return name.equals(IIOPOutputStream.class.getName()) ? ++ new IIOPOutputStream() : null; + } + +- protected String getInputStreamClassName() { ++ private String getInputStreamClassName() { + return "com.sun.corba.se.impl.io.IIOPInputStream"; + } + +@@ -913,26 +893,8 @@ + private IIOPInputStream createInputStreamBuiltInNoPriv( + final String name + ) throws IOException { +- return +- name.equals( +- IIOPInputStream +- .class.getName() +- ) ? +- new IIOPInputStream() : +- +- name.equals( +- com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3 +- .class.getName() +- ) ? +- new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() : +- +- name.equals( +- com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1 +- .class.getName() +- ) ? +- new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1() : +- +- null; ++ return name.equals(IIOPInputStream.class.getName()) ? ++ new IIOPInputStream() : null; + } + + /** +@@ -958,12 +920,7 @@ + + } + +- /** +- * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this. +- * The correct behavior is for a Java char to map to a CORBA wchar, +- * but our older code mapped it to a CORBA char. +- */ +- protected TCKind getJavaCharTCKind() { ++ TCKind getJavaCharTCKind() { + return TCKind.tk_wchar; + } + } +--- corba/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java 2012-08-10 09:10:19.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java 2013-03-09 08:44:36.000000000 -0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -93,6 +93,14 @@ + null, // tk_abstract_interface 32 + }; + ++ static { ++ sun.corba.SharedSecrets.setJavaCorbaAccess(new sun.corba.JavaCorbaAccess() { ++ public ValueHandlerImpl newValueHandlerImpl() { ++ return ValueHandlerImpl.getInstance(); ++ } ++ }); ++ } ++ + public static String getSignature(ValueMember member) + throws ClassNotFoundException { + +--- corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2012-08-10 09:10:23.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java 2013-03-09 08:44:36.000000000 -0800 +@@ -112,6 +112,9 @@ + import com.sun.corba.se.impl.orbutil.ORBClassLoader; + import com.sun.corba.se.impl.logging.UtilSystemException; + import com.sun.corba.se.spi.logging.CORBALogDomains; ++import sun.corba.SharedSecrets; ++import sun.corba.JavaCorbaAccess; ++ + + /** + * Provides utility methods that can be used by stubs and ties to +@@ -125,7 +128,8 @@ + // Maps targets to ties. + private static IdentityHashtable exportedServants = new IdentityHashtable(); + +- private static ValueHandlerImpl valueHandlerSingleton = new ValueHandlerImpl(); ++ private static final ValueHandlerImpl valueHandlerSingleton = ++ SharedSecrets.getJavaCorbaAccess().newValueHandlerImpl(); + + private UtilSystemException utilWrapper = UtilSystemException.get( + CORBALogDomains.RPC_ENCODING); +--- corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java 2012-08-10 09:10:31.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java 2013-03-09 08:44:36.000000000 -0800 +@@ -840,7 +840,7 @@ + // backward compatability 4365188 + CodeBase cb; + +- ValueHandler vh = ORBUtility.createValueHandler(this); ++ ValueHandler vh = ORBUtility.createValueHandler(); + + cb = (CodeBase)vh.getRunTimeCodeBase(); + return ORBUtility.connectAndGetIOR( this, cb ) ; +--- corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java 2012-08-10 09:10:32.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,57 +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.orbutil; +- +-import java.io.*; +-import java.util.Hashtable; +- +-/** +- * Implements legacy behavior from before Ladybird to maintain +- * backwards compatibility. +- */ +-public class IIOPInputStream_1_3 extends com.sun.corba.se.impl.io.IIOPInputStream +-{ +- // The newer version in the io package correctly reads a wstring instead. +- // This concerns bug 4379597. +- protected String internalReadUTF(org.omg.CORBA.portable.InputStream stream) +- { +- return stream.read_string(); +- } +- +- /** +- * Before JDK 1.3.1_01, the PutField/GetField implementation +- * actually sent a Hashtable. +- */ +- public ObjectInputStream.GetField readFields() +- throws IOException, ClassNotFoundException, NotActiveException { +- Hashtable fields = (Hashtable)readObject(); +- return new LegacyHookGetFields(fields); +- } +- +- public IIOPInputStream_1_3() +- throws java.io.IOException { +- super(); +- } +-} +--- corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java 2012-08-10 09:10:32.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,54 +0,0 @@ +-/* +- * Copyright (c) 2001, 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.orbutil; +- +-import java.io.*; +-import java.util.Hashtable; +- +-/** +- * Implements legacy behavior from Ladybird to maintain +- * backwards compatibility. +- */ +-public class IIOPInputStream_1_3_1 extends com.sun.corba.se.impl.io.IIOPInputStream +-{ +- public IIOPInputStream_1_3_1() +- throws java.io.IOException { +- super(); +- } +- +- /** +- * Before JDK 1.3.1_01, the PutField/GetField implementation +- * actually sent a Hashtable. +- */ +- public ObjectInputStream.GetField readFields() +- throws IOException, ClassNotFoundException, NotActiveException { +- +- Hashtable fields = (Hashtable)readObject(); +- return new LegacyHookGetFields(fields); +- } +-} +--- corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java 2012-08-10 09:10:32.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,68 +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.orbutil; +- +-import java.io.*; +- +-/** +- * Implements legacy behavior from before Ladybird to maintain +- * backwards compatibility. +- */ +-public class IIOPOutputStream_1_3 extends com.sun.corba.se.impl.io.IIOPOutputStream +-{ +- // We can't assume that the superclass's putFields +- // member will be non-private. We must allow +- // the RI to run on JDK 1.3.1 FCS as well as +- // the JDK 1.3.1_01 patch. +- private ObjectOutputStream.PutField putFields_1_3; +- +- // The newer version in the io package correctly writes a wstring instead. +- // This concerns bug 4379597. +- protected void internalWriteUTF(org.omg.CORBA.portable.OutputStream stream, +- String data) +- { +- stream.write_string(data); +- } +- +- public IIOPOutputStream_1_3() +- throws java.io.IOException { +- super(); +- } +- +- /** +- * Before JDK 1.3.1_01, the PutField/GetField implementation +- * actually sent a Hashtable. +- */ +- public ObjectOutputStream.PutField putFields() +- throws IOException { +- putFields_1_3 = new LegacyHookPutFields(); +- return putFields_1_3; +- } +- +- public void writeFields() +- throws IOException { +- putFields_1_3.write(this); +- } +-} +--- corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java 2012-08-10 09:10:32.000000000 -0700 ++++ corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java 1969-12-31 16:00:00.000000000 -0800 +@@ -1,66 +0,0 @@ +-/* +- * Copyright (c) 2001, 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.orbutil; +- +-import java.io.*; +-import java.util.Hashtable; +- *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303100141.r2A1f782094892>