/hg/release/icedtea7-forest-2.1/corba: 3 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Feb 11 15:02:53 PST 2013


changeset e28f1929a4aa in /hg/release/icedtea7-forest-2.1/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/corba?cmd=changeset;node=e28f1929a4aa
author: coffeys
date: Wed Oct 31 20:31:52 2012 +0000

	8002068: Build broken: corba code changes unable to use new JDK 7 classes
	Reviewed-by: alanb, ahgross


changeset 1c355d31ca6a in /hg/release/icedtea7-forest-2.1/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/corba?cmd=changeset;node=1c355d31ca6a
author: andrew
date: Mon Feb 11 23:02:26 2013 +0000

	Removed tag icedtea-2.1.5


changeset 30fd65efd06e in /hg/release/icedtea7-forest-2.1/corba
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/corba?cmd=changeset;node=30fd65efd06e
author: andrew
date: Mon Feb 11 23:02:29 2013 +0000

	Added tag icedtea-2.1.5 for changeset 1c355d31ca6a


diffstat:

 .hgtags                                                           |   4 +
 src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java |  34 +++++++--
 2 files changed, 28 insertions(+), 10 deletions(-)

diffs (88 lines):

diff -r 104afef69da6 -r 30fd65efd06e .hgtags
--- a/.hgtags	Tue Feb 05 11:08:12 2013 +0000
+++ b/.hgtags	Mon Feb 11 23:02:29 2013 +0000
@@ -152,3 +152,7 @@
 5fb07c08e9e8c7b62395b0dc5f5a95086a7bb718 icedtea-2.1.3
 79ee8535bc518acf1156438967170004cc1eaab4 icedtea-2.1.4
 50f1d640ea27ea178b679d5ed67f19ecef698796 icedtea-2.1.5
+50f1d640ea27ea178b679d5ed67f19ecef698796 icedtea-2.1.5
+0000000000000000000000000000000000000000 icedtea-2.1.5
+0000000000000000000000000000000000000000 icedtea-2.1.5
+1c355d31ca6a06929c6fe67792ce4f506f7b5db9 icedtea-2.1.5
diff -r 104afef69da6 -r 30fd65efd06e src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java
--- a/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Tue Feb 05 11:08:12 2013 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Mon Feb 11 23:02:29 2013 +0000
@@ -56,6 +56,8 @@
 
 import java.util.Arrays;
 import java.util.Comparator;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
 
 import com.sun.corba.se.impl.util.RepositoryId;
 
@@ -381,11 +383,23 @@
          */
     }
 
-    private static final class PersistentFieldsValue
-            extends ClassValue<ObjectStreamField[]> {
+    private static final class PersistentFieldsValue {
+        private final ConcurrentMap map = new ConcurrentHashMap();
+        private static final Object NULL_VALUE =
+            (PersistentFieldsValue.class.getName() + ".NULL_VALUE");
+
         PersistentFieldsValue() { }
 
-        protected ObjectStreamField[] computeValue(Class<?> type) {
+        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();
@@ -396,14 +410,15 @@
                         (java.io.ObjectStreamField[])pf.get(type);
                     return translateFields(fields);
                 }
-            } catch (NoSuchFieldException | IllegalAccessException |
-                    IllegalArgumentException | ClassCastException e) {
-            }
-            return null;
+            } catch (NoSuchFieldException e1) {
+            } catch (IllegalAccessException e2) {
+            } catch (IllegalArgumentException e3) {
+            } catch (ClassCastException e4) { }
+            return NULL_VALUE;
         }
 
         private static ObjectStreamField[] translateFields(
-            java.io.ObjectStreamField[] fields) {
+                java.io.ObjectStreamField[] fields) {
             ObjectStreamField[] translation =
                 new ObjectStreamField[fields.length];
             for (int i = 0; i < fields.length; i++) {
@@ -449,7 +464,7 @@
                  * If it is declared, use the declared serialPersistentFields.
                  * Otherwise, extract the fields from the class itself.
                  */
-                    fields = persistentFieldsValue.get(cl);
+                fields = persistentFieldsValue.get(cl);
 
                 if (fields == null) {
                     /* Get all of the declared fields for this
@@ -646,7 +661,6 @@
         superclass = null;
     }
 
-
     /*
      * Set the class this version descriptor matches.
      * The base class name and serializable hash must match.



More information about the distro-pkg-dev mailing list