Merge

Fri, 14 Mar 2014 16:12:12 -0700

author
asaha
date
Fri, 14 Mar 2014 16:12:12 -0700
changeset 636
ab3582f8624e
parent 594
bcdc679d86aa
parent 635
897088ef059f
child 637
55ef2bca092e

Merge

.hgtags file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Wed Mar 12 14:10:21 2014 -0700
     1.2 +++ b/.hgtags	Fri Mar 14 16:12:12 2014 -0700
     1.3 @@ -253,6 +253,21 @@
     1.4  b8c71dae05574f8eca7ca6d703b16b450850b033 jdk8-b127
     1.5  113e7569b49bca18846e5e5b74e644580b805902 jdk8-b128
     1.6  5c72d74c6805d1b4f6192f7a3550d126acf37005 jdk8-b129
     1.7 +0683ee308085785d0455f4153e764e062843f178 jdk8-b130
     1.8 +5e5c8f0c45dd75a08089586ca50835393f00c2cb jdk8-b131
     1.9 +84fed37bbe640666bfc022c2e8b9fde468de35d2 jdk8-b132
    1.10 +5de8d42f9eb7ddcdc741445f3c21a63887d694b6 jdk8u5-b01
    1.11 +c750098a3ef18de28a6d739666559f0333c76c78 jdk8u5-b02
    1.12 +3d9b40a53134aa33031bf13581dff9fccade9048 jdk8u5-b03
    1.13 +596f4e4c5587c29767345555c4e48a5be0a58b83 jdk8u5-b04
    1.14 +1f95c888e5efe010550d95ef59020ddb15876463 jdk8u5-b05
    1.15 +edfa8bc86fda1b2fd064abbafb4506c80a47587e jdk8u5-b06
    1.16 +0a25d1c162bc046aa230577736429935716a2243 jdk8u5-b07
    1.17 +df6e5fc3b585a6829c98bb91546b81dc28f8e2b4 jdk8u5-b08
    1.18 +f5058197fa91153b7702214154d37b00f9714aaa jdk8u5-b09
    1.19 +d9031b5525f777299554080d6beb8b077df0a614 jdk8u5-b10
    1.20 +a2f7b36bfc1bc8df033fe5721b48fac1c3928a5b jdk8u5-b11
    1.21 +475b96f6d8cecf720ca9fd6d332dd4bafb0f654c jdk8u5-b12
    1.22  bfafb13aac1c8b2d9184d59ec510b45d965b7667 jdk8u20-b02
    1.23  9059a1c857044ad5ce7564ddb71a064364f8fcf5 jdk8u20-b03
    1.24  abe5b0157c367a72f9059269ca633ecfe15732d2 jdk8u20-b04
     2.1 --- a/THIRD_PARTY_README	Wed Mar 12 14:10:21 2014 -0700
     2.2 +++ b/THIRD_PARTY_README	Fri Mar 14 16:12:12 2014 -0700
     2.3 @@ -1399,13 +1399,13 @@
     2.4  
     2.5  -------------------------------------------------------------------------------
     2.6  
     2.7 -%% This notice is provided with respect to Little CMS 2.4, which may be 
     2.8 +%% This notice is provided with respect to Little CMS 2.5, which may be 
     2.9  included with JRE 8, JDK 8, and OpenJDK 8.
    2.10  
    2.11  --- begin of LICENSE ---
    2.12  
    2.13  Little CMS
    2.14 -Copyright (c) 1998-2010 Marti Maria Saguer
    2.15 +Copyright (c) 1998-2011 Marti Maria Saguer
    2.16  
    2.17  Permission is hereby granted, free of charge, to any person obtaining a copy
    2.18  of this software and associated documentation files (the "Software"), to deal
     3.1 --- a/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Wed Mar 12 14:10:21 2014 -0700
     3.2 +++ b/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Fri Mar 14 16:12:12 2014 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -52,6 +52,7 @@
    3.11  import java.io.DataOutputStream;
    3.12  import java.io.ByteArrayOutputStream;
    3.13  import java.io.InvalidClassException;
    3.14 +import java.io.Externalizable;
    3.15  import java.io.Serializable;
    3.16  
    3.17  import java.util.Arrays;
    3.18 @@ -80,15 +81,15 @@
    3.19      public static final long kDefaultUID = -1;
    3.20  
    3.21      private static Object noArgsList[] = {};
    3.22 -    private static Class noTypesList[] = {};
    3.23 +    private static Class<?> noTypesList[] = {};
    3.24  
    3.25      /** true if represents enum type */
    3.26      private boolean isEnum;
    3.27  
    3.28      private static final Bridge bridge =
    3.29 -        (Bridge)AccessController.doPrivileged(
    3.30 -            new PrivilegedAction() {
    3.31 -                public Object run() {
    3.32 +        AccessController.doPrivileged(
    3.33 +            new PrivilegedAction<Bridge>() {
    3.34 +                public Bridge run() {
    3.35                      return Bridge.get() ;
    3.36                  }
    3.37              }
    3.38 @@ -98,7 +99,7 @@
    3.39       * is returned if the specified class does not implement
    3.40       * java.io.Serializable or java.io.Externalizable.
    3.41       */
    3.42 -    static final ObjectStreamClass lookup(Class cl)
    3.43 +    static final ObjectStreamClass lookup(Class<?> cl)
    3.44      {
    3.45          ObjectStreamClass desc = lookupInternal(cl);
    3.46          if (desc.isSerializable() || desc.isExternalizable())
    3.47 @@ -110,7 +111,7 @@
    3.48       * Find the class descriptor for the specified class.
    3.49       * Package access only so it can be called from ObjectIn/OutStream.
    3.50       */
    3.51 -    static ObjectStreamClass lookupInternal(Class cl)
    3.52 +    static ObjectStreamClass lookupInternal(Class<?> cl)
    3.53      {
    3.54          /* Synchronize on the hashtable so no two threads will do
    3.55           * this at the same time.
    3.56 @@ -121,14 +122,14 @@
    3.57              desc = findDescriptorFor(cl);
    3.58              if (desc == null) {
    3.59                  /* Check if it's serializable */
    3.60 -                boolean serializable = classSerializable.isAssignableFrom(cl);
    3.61 +                boolean serializable = Serializable.class.isAssignableFrom(cl);
    3.62  
    3.63                  /* If the class is only Serializable,
    3.64                   * lookup the descriptor for the superclass.
    3.65                   */
    3.66                  ObjectStreamClass superdesc = null;
    3.67                  if (serializable) {
    3.68 -                    Class superclass = cl.getSuperclass();
    3.69 +                    Class<?> superclass = cl.getSuperclass();
    3.70                      if (superclass != null)
    3.71                          superdesc = lookup(superclass);
    3.72                  }
    3.73 @@ -141,7 +142,7 @@
    3.74                  if (serializable) {
    3.75                      externalizable =
    3.76                          ((superdesc != null) && superdesc.isExternalizable()) ||
    3.77 -                        classExternalizable.isAssignableFrom(cl);
    3.78 +                        Externalizable.class.isAssignableFrom(cl);
    3.79                      if (externalizable) {
    3.80                          serializable = false;
    3.81                      }
    3.82 @@ -185,7 +186,7 @@
    3.83       * that have evolved from a common root class and agree to be serialized
    3.84       * and deserialized using a common format.
    3.85       */
    3.86 -    public static final long getSerialVersionUID( java.lang.Class clazz) {
    3.87 +    public static final long getSerialVersionUID( java.lang.Class<?> clazz) {
    3.88          ObjectStreamClass theosc = ObjectStreamClass.lookup( clazz );
    3.89          if( theosc != null )
    3.90          {
    3.91 @@ -219,7 +220,7 @@
    3.92      /**
    3.93       * Return the actual (computed) serialVersionUID for this class.
    3.94       */
    3.95 -    public static final long getActualSerialVersionUID( java.lang.Class clazz )
    3.96 +    public static final long getActualSerialVersionUID( java.lang.Class<?> clazz )
    3.97      {
    3.98          ObjectStreamClass theosc = ObjectStreamClass.lookup( clazz );
    3.99          if( theosc != null )
   3.100 @@ -249,7 +250,7 @@
   3.101       * Return the class in the local VM that this version is mapped to.
   3.102       * Null is returned if there is no corresponding local class.
   3.103       */
   3.104 -    public final Class forClass() {
   3.105 +    public final Class<?> forClass() {
   3.106          return ofClass;
   3.107      }
   3.108  
   3.109 @@ -349,7 +350,7 @@
   3.110       * Create a new ObjectStreamClass from a loaded class.
   3.111       * Don't call this directly, call lookup instead.
   3.112       */
   3.113 -    private ObjectStreamClass(java.lang.Class cl, ObjectStreamClass superdesc,
   3.114 +    private ObjectStreamClass(java.lang.Class<?> cl, ObjectStreamClass superdesc,
   3.115                                boolean serial, boolean extern)
   3.116      {
   3.117          ofClass = cl;           /* created from this class */
   3.118 @@ -433,7 +434,7 @@
   3.119          if (initialized)
   3.120              return;
   3.121  
   3.122 -        final Class cl = ofClass;
   3.123 +        final Class<?> cl = ofClass;
   3.124  
   3.125          if (!serializable ||
   3.126              externalizable ||
   3.127 @@ -561,9 +562,9 @@
   3.128                       * will call it as necessary.
   3.129                       */
   3.130                      writeObjectMethod = getPrivateMethod( cl, "writeObject",
   3.131 -                        new Class[] { java.io.ObjectOutputStream.class }, Void.TYPE ) ;
   3.132 +                        new Class<?>[] { java.io.ObjectOutputStream.class }, Void.TYPE ) ;
   3.133                      readObjectMethod = getPrivateMethod( cl, "readObject",
   3.134 -                        new Class[] { java.io.ObjectInputStream.class }, Void.TYPE ) ;
   3.135 +                        new Class<?>[] { java.io.ObjectInputStream.class }, Void.TYPE ) ;
   3.136                  }
   3.137                  return null;
   3.138              }
   3.139 @@ -589,9 +590,9 @@
   3.140       * class, or null if none found.  Access checks are disabled on the
   3.141       * returned method (if any).
   3.142       */
   3.143 -    private static Method getPrivateMethod(Class cl, String name,
   3.144 -                                           Class[] argTypes,
   3.145 -                                           Class returnType)
   3.146 +    private static Method getPrivateMethod(Class<?> cl, String name,
   3.147 +                                           Class<?>[] argTypes,
   3.148 +                                           Class<?> returnType)
   3.149      {
   3.150          try {
   3.151              Method meth = cl.getDeclaredMethod(name, argTypes);
   3.152 @@ -653,7 +654,7 @@
   3.153       * Fill in the reflected Fields that will be used
   3.154       * for reading.
   3.155       */
   3.156 -    final void setClass(Class cl) throws InvalidClassException {
   3.157 +    final void setClass(Class<?> cl) throws InvalidClassException {
   3.158  
   3.159          if (cl == null) {
   3.160              localClassDesc = null;
   3.161 @@ -920,9 +921,9 @@
   3.162       * Access checks are disabled on the returned constructor (if any), since
   3.163       * the defining class may still be non-public.
   3.164       */
   3.165 -    private static Constructor getExternalizableConstructor(Class cl) {
   3.166 +    private static Constructor getExternalizableConstructor(Class<?> cl) {
   3.167          try {
   3.168 -            Constructor cons = cl.getDeclaredConstructor(new Class[0]);
   3.169 +            Constructor cons = cl.getDeclaredConstructor(new Class<?>[0]);
   3.170              cons.setAccessible(true);
   3.171              return ((cons.getModifiers() & Modifier.PUBLIC) != 0) ?
   3.172                  cons : null;
   3.173 @@ -936,15 +937,15 @@
   3.174       * superclass, or null if none found.  Access checks are disabled on the
   3.175       * returned constructor (if any).
   3.176       */
   3.177 -    private static Constructor getSerializableConstructor(Class cl) {
   3.178 -        Class initCl = cl;
   3.179 +    private static Constructor getSerializableConstructor(Class<?> cl) {
   3.180 +        Class<?> initCl = cl;
   3.181          while (Serializable.class.isAssignableFrom(initCl)) {
   3.182              if ((initCl = initCl.getSuperclass()) == null) {
   3.183                  return null;
   3.184              }
   3.185          }
   3.186          try {
   3.187 -            Constructor cons = initCl.getDeclaredConstructor(new Class[0]);
   3.188 +            Constructor cons = initCl.getDeclaredConstructor(new Class<?>[0]);
   3.189              int mods = cons.getModifiers();
   3.190              if ((mods & Modifier.PRIVATE) != 0 ||
   3.191                  ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 &&
   3.192 @@ -1049,7 +1050,7 @@
   3.193       * items to the hash accumulating in the digest stream.
   3.194       * Fold the hash into a long.  Use the SHA secure hash function.
   3.195       */
   3.196 -    private static long _computeSerialVersionUID(Class cl) {
   3.197 +    private static long _computeSerialVersionUID(Class<?> cl) {
   3.198          if (DEBUG_SVUID)
   3.199              msg( "Computing SerialVersionUID for " + cl ) ;
   3.200          ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
   3.201 @@ -1103,7 +1104,7 @@
   3.202                   * them from its computation.
   3.203                   */
   3.204  
   3.205 -                Class interfaces[] = cl.getInterfaces();
   3.206 +                Class<?> interfaces[] = cl.getInterfaces();
   3.207                  Arrays.sort(interfaces, compareClassByName);
   3.208  
   3.209                  for (int i = 0; i < interfaces.length; i++) {
   3.210 @@ -1233,7 +1234,7 @@
   3.211          return h;
   3.212      }
   3.213  
   3.214 -    private static long computeStructuralUID(com.sun.corba.se.impl.io.ObjectStreamClass osc, Class cl) {
   3.215 +    private static long computeStructuralUID(com.sun.corba.se.impl.io.ObjectStreamClass osc, Class<?> cl) {
   3.216          ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
   3.217  
   3.218          long h = 0;
   3.219 @@ -1253,7 +1254,7 @@
   3.220              DataOutputStream data = new DataOutputStream(mdo);
   3.221  
   3.222              // Get SUID of parent
   3.223 -            Class parent = cl.getSuperclass();
   3.224 +            Class<?> parent = cl.getSuperclass();
   3.225              if ((parent != null))
   3.226              // SerialBug 1; acc. to spec the one for
   3.227              // java.lang.object
   3.228 @@ -1309,10 +1310,10 @@
   3.229      /**
   3.230       * Compute the JVM signature for the class.
   3.231       */
   3.232 -    static String getSignature(Class clazz) {
   3.233 +    static String getSignature(Class<?> clazz) {
   3.234          String type = null;
   3.235          if (clazz.isArray()) {
   3.236 -            Class cl = clazz;
   3.237 +            Class<?> cl = clazz;
   3.238              int dimensions = 0;
   3.239              while (cl.isArray()) {
   3.240                  dimensions++;
   3.241 @@ -1358,7 +1359,7 @@
   3.242  
   3.243          sb.append("(");
   3.244  
   3.245 -        Class[] params = meth.getParameterTypes(); // avoid clone
   3.246 +        Class<?>[] params = meth.getParameterTypes(); // avoid clone
   3.247          for (int j = 0; j < params.length; j++) {
   3.248              sb.append(getSignature(params[j]));
   3.249          }
   3.250 @@ -1375,7 +1376,7 @@
   3.251  
   3.252          sb.append("(");
   3.253  
   3.254 -        Class[] params = cons.getParameterTypes(); // avoid clone
   3.255 +        Class<?>[] params = cons.getParameterTypes(); // avoid clone
   3.256          for (int j = 0; j < params.length; j++) {
   3.257              sb.append(getSignature(params[j]));
   3.258          }
   3.259 @@ -1395,7 +1396,7 @@
   3.260       * The entries are extended from java.lang.ref.SoftReference so the
   3.261       * gc will be able to free them if needed.
   3.262       */
   3.263 -    private static ObjectStreamClass findDescriptorFor(Class cl) {
   3.264 +    private static ObjectStreamClass findDescriptorFor(Class<?> cl) {
   3.265  
   3.266          int hash = cl.hashCode();
   3.267          int index = (hash & 0x7FFFFFFF) % descriptorFor.length;
   3.268 @@ -1442,7 +1443,7 @@
   3.269          descriptorFor[index] = e;
   3.270      }
   3.271  
   3.272 -    private static Field[] getDeclaredFields(final Class clz) {
   3.273 +    private static Field[] getDeclaredFields(final Class<?> clz) {
   3.274          return (Field[]) AccessController.doPrivileged(new PrivilegedAction() {
   3.275              public Object run() {
   3.276                  return clz.getDeclaredFields();
   3.277 @@ -1476,7 +1477,7 @@
   3.278      /*
   3.279       * Class that is a descriptor for in this virtual machine.
   3.280       */
   3.281 -    private Class ofClass;
   3.282 +    private Class<?> ofClass;
   3.283  
   3.284      /*
   3.285       * True if descriptor for a proxy class.
   3.286 @@ -1548,30 +1549,17 @@
   3.287       * Returns true if the given class defines a static initializer method,
   3.288       * false otherwise.
   3.289       */
   3.290 -    private static boolean hasStaticInitializer(Class cl) {
   3.291 +    private static boolean hasStaticInitializer(Class<?> cl) {
   3.292          if (hasStaticInitializerMethod == null) {
   3.293 -            Class classWithThisMethod = null;
   3.294 +            Class<?> classWithThisMethod = null;
   3.295  
   3.296              try {
   3.297 -                try {
   3.298 -                    // When using rip-int with Merlin or when this is a Merlin
   3.299 -                    // workspace, the method we want is in sun.misc.ClassReflector
   3.300 -                    // and absent from java.io.ObjectStreamClass.
   3.301 -                    //
   3.302 -                    // When compiling rip-int with JDK 1.3.x, we have to get it
   3.303 -                    // from java.io.ObjectStreamClass.
   3.304 -                    classWithThisMethod = Class.forName("sun.misc.ClassReflector");
   3.305 -                } catch (ClassNotFoundException cnfe) {
   3.306 -                    // Do nothing.  This is either not a Merlin workspace,
   3.307 -                    // or rip-int is being compiled with something other than
   3.308 -                    // Merlin, probably JDK 1.3.  Fall back on java.io.ObjectStreaClass.
   3.309 -                }
   3.310                  if (classWithThisMethod == null)
   3.311                      classWithThisMethod = java.io.ObjectStreamClass.class;
   3.312  
   3.313                  hasStaticInitializerMethod =
   3.314                      classWithThisMethod.getDeclaredMethod("hasStaticInitializer",
   3.315 -                                                          new Class[] { Class.class });
   3.316 +                                                          new Class<?>[] { Class.class });
   3.317              } catch (NoSuchMethodException ex) {
   3.318              }
   3.319  
   3.320 @@ -1596,22 +1584,6 @@
   3.321      }
   3.322  
   3.323  
   3.324 -    /* The Class Object for java.io.Serializable */
   3.325 -    private static Class classSerializable = null;
   3.326 -    private static Class classExternalizable = null;
   3.327 -
   3.328 -    /*
   3.329 -     * Resolve java.io.Serializable at load time.
   3.330 -     */
   3.331 -    static {
   3.332 -        try {
   3.333 -            classSerializable = Class.forName("java.io.Serializable");
   3.334 -            classExternalizable = Class.forName("java.io.Externalizable");
   3.335 -        } catch (Throwable e) {
   3.336 -            System.err.println("Could not load java.io.Serializable or java.io.Externalizable.");
   3.337 -        }
   3.338 -    }
   3.339 -
   3.340      /** use serialVersionUID from JDK 1.1. for interoperability */
   3.341      private static final long serialVersionUID = -6120832682080437368L;
   3.342  
   3.343 @@ -1649,8 +1621,8 @@
   3.344  
   3.345      private static class CompareClassByName implements Comparator {
   3.346          public int compare(Object o1, Object o2) {
   3.347 -            Class c1 = (Class)o1;
   3.348 -            Class c2 = (Class)o2;
   3.349 +            Class<?> c1 = (Class)o1;
   3.350 +            Class<?> c2 = (Class)o2;
   3.351              return (c1.getName()).compareTo(c2.getName());
   3.352          }
   3.353      }
   3.354 @@ -1764,12 +1736,12 @@
   3.355       *
   3.356       * Copied from the Merlin java.io.ObjectStreamClass.
   3.357       */
   3.358 -    private static Method getInheritableMethod(Class cl, String name,
   3.359 -                                               Class[] argTypes,
   3.360 -                                               Class returnType)
   3.361 +    private static Method getInheritableMethod(Class<?> cl, String name,
   3.362 +                                               Class<?>[] argTypes,
   3.363 +                                               Class<?> returnType)
   3.364      {
   3.365          Method meth = null;
   3.366 -        Class defCl = cl;
   3.367 +        Class<?> defCl = cl;
   3.368          while (defCl != null) {
   3.369              try {
   3.370                  meth = defCl.getDeclaredMethod(name, argTypes);
   3.371 @@ -1801,7 +1773,7 @@
   3.372       *
   3.373       * Copied from the Merlin java.io.ObjectStreamClass.
   3.374       */
   3.375 -    private static boolean packageEquals(Class cl1, Class cl2) {
   3.376 +    private static boolean packageEquals(Class<?> cl1, Class<?> cl2) {
   3.377          Package pkg1 = cl1.getPackage(), pkg2 = cl2.getPackage();
   3.378          return ((pkg1 == pkg2) || ((pkg1 != null) && (pkg1.equals(pkg2))));
   3.379      }
     4.1 --- a/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClassUtil_1_3.java	Wed Mar 12 14:10:21 2014 -0700
     4.2 +++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClassUtil_1_3.java	Fri Mar 14 16:12:12 2014 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -94,7 +94,7 @@
    4.11          });
    4.12      }
    4.13  
    4.14 -    public static long computeStructuralUID(boolean hasWriteObject, Class cl) {
    4.15 +    public static long computeStructuralUID(boolean hasWriteObject, Class<?> cl) {
    4.16          ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
    4.17  
    4.18          long h = 0;
    4.19 @@ -119,7 +119,7 @@
    4.20              // Object method in there
    4.21  
    4.22              // Get SUID of parent
    4.23 -            Class parent = cl.getSuperclass();
    4.24 +            Class<?> parent = cl.getSuperclass();
    4.25              if ((parent != null) && (parent != java.lang.Object.class)) {
    4.26                  boolean hasWriteObjectFlag = false;
    4.27                  Class [] args = {java.io.ObjectOutputStream.class};
    4.28 @@ -503,19 +503,6 @@
    4.29              Class classWithThisMethod = null;
    4.30  
    4.31              try {
    4.32 -                try {
    4.33 -                    // When using rip-int with Merlin or when this is a Merlin
    4.34 -                    // workspace, the method we want is in sun.misc.ClassReflector
    4.35 -                    // and absent from java.io.ObjectStreamClass.
    4.36 -                    //
    4.37 -                    // When compiling rip-int with JDK 1.3.x, we have to get it
    4.38 -                    // from java.io.ObjectStreamClass.
    4.39 -                    classWithThisMethod = Class.forName("sun.misc.ClassReflector");
    4.40 -                } catch (ClassNotFoundException cnfe) {
    4.41 -                    // Do nothing.  This is either not a Merlin workspace,
    4.42 -                    // or rip-int is being compiled with something other than
    4.43 -                    // Merlin, probably JDK 1.3.  Fall back on java.io.ObjectStreaClass.
    4.44 -                }
    4.45                  if (classWithThisMethod == null)
    4.46                      classWithThisMethod = java.io.ObjectStreamClass.class;
    4.47  
     5.1 --- a/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java	Wed Mar 12 14:10:21 2014 -0700
     5.2 +++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java	Fri Mar 14 16:12:12 2014 -0700
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
    5.10 @@ -53,6 +53,7 @@
    5.11  import java.io.ByteArrayOutputStream;
    5.12  import java.io.InvalidClassException;
    5.13  import java.io.Serializable;
    5.14 +import java.io.Externalizable;
    5.15  
    5.16  import java.util.Arrays;
    5.17  import java.util.Comparator;
    5.18 @@ -88,7 +89,7 @@
    5.19      public static final long kDefaultUID = -1;
    5.20  
    5.21      private static Object noArgsList[] = {};
    5.22 -    private static Class noTypesList[] = {};
    5.23 +    private static Class<?> noTypesList[] = {};
    5.24  
    5.25      private static Hashtable translatedFields;
    5.26  
    5.27 @@ -96,7 +97,7 @@
    5.28       * is returned if the specified class does not implement
    5.29       * java.io.Serializable or java.io.Externalizable.
    5.30       */
    5.31 -    static final ObjectStreamClass_1_3_1 lookup(Class cl)
    5.32 +    static final ObjectStreamClass_1_3_1 lookup(Class<?> cl)
    5.33      {
    5.34          ObjectStreamClass_1_3_1 desc = lookupInternal(cl);
    5.35          if (desc.isSerializable() || desc.isExternalizable())
    5.36 @@ -108,7 +109,7 @@
    5.37       * Find the class descriptor for the specified class.
    5.38       * Package access only so it can be called from ObjectIn/OutStream.
    5.39       */
    5.40 -    static ObjectStreamClass_1_3_1 lookupInternal(Class cl)
    5.41 +    static ObjectStreamClass_1_3_1 lookupInternal(Class<?> cl)
    5.42      {
    5.43          /* Synchronize on the hashtable so no two threads will do
    5.44           * this at the same time.
    5.45 @@ -122,13 +123,13 @@
    5.46              }
    5.47  
    5.48                  /* Check if it's serializable */
    5.49 -                boolean serializable = classSerializable.isAssignableFrom(cl);
    5.50 +                boolean serializable = Serializable.class.isAssignableFrom(cl);
    5.51                  /* If the class is only Serializable,
    5.52                   * lookup the descriptor for the superclass.
    5.53                   */
    5.54                  ObjectStreamClass_1_3_1 superdesc = null;
    5.55                  if (serializable) {
    5.56 -                    Class superclass = cl.getSuperclass();
    5.57 +                    Class<?> superclass = cl.getSuperclass();
    5.58                      if (superclass != null)
    5.59                          superdesc = lookup(superclass);
    5.60                  }
    5.61 @@ -141,7 +142,7 @@
    5.62                  if (serializable) {
    5.63                      externalizable =
    5.64                          ((superdesc != null) && superdesc.isExternalizable()) ||
    5.65 -                        classExternalizable.isAssignableFrom(cl);
    5.66 +                        Externalizable.class.isAssignableFrom(cl);
    5.67                      if (externalizable) {
    5.68                          serializable = false;
    5.69                      }
    5.70 @@ -170,7 +171,7 @@
    5.71       * that have evolved from a common root class and agree to be serialized
    5.72       * and deserialized using a common format.
    5.73       */
    5.74 -    public static final long getSerialVersionUID( java.lang.Class clazz) {
    5.75 +    public static final long getSerialVersionUID( java.lang.Class<?> clazz) {
    5.76          ObjectStreamClass_1_3_1 theosc = ObjectStreamClass_1_3_1.lookup( clazz );
    5.77          if( theosc != null )
    5.78          {
    5.79 @@ -204,7 +205,7 @@
    5.80      /**
    5.81       * Return the actual (computed) serialVersionUID for this class.
    5.82       */
    5.83 -    public static final long getActualSerialVersionUID( java.lang.Class clazz )
    5.84 +    public static final long getActualSerialVersionUID( java.lang.Class<?> clazz )
    5.85      {
    5.86          ObjectStreamClass_1_3_1 theosc = ObjectStreamClass_1_3_1.lookup( clazz );
    5.87          if( theosc != null )
    5.88 @@ -234,7 +235,7 @@
    5.89       * Return the class in the local VM that this version is mapped to.
    5.90       * Null is returned if there is no corresponding local class.
    5.91       */
    5.92 -    public final Class forClass() {
    5.93 +    public final Class<?> forClass() {
    5.94          return ofClass;
    5.95      }
    5.96  
    5.97 @@ -333,7 +334,7 @@
    5.98       * Create a new ObjectStreamClass_1_3_1 from a loaded class.
    5.99       * Don't call this directly, call lookup instead.
   5.100       */
   5.101 -    private ObjectStreamClass_1_3_1(java.lang.Class cl, ObjectStreamClass_1_3_1 superdesc,
   5.102 +    private ObjectStreamClass_1_3_1(java.lang.Class<?> cl, ObjectStreamClass_1_3_1 superdesc,
   5.103                                boolean serial, boolean extern)
   5.104      {
   5.105          ofClass = cl;           /* created from this class */
   5.106 @@ -376,7 +377,7 @@
   5.107      private void init() {
   5.108        synchronized (lock) {
   5.109  
   5.110 -        final Class cl = ofClass;
   5.111 +        final Class<?> cl = ofClass;
   5.112  
   5.113          if (fields != null) // already initialized
   5.114                  return;
   5.115 @@ -558,7 +559,7 @@
   5.116                       * will call it as necessary.
   5.117                       */
   5.118                      try {
   5.119 -                      Class[] args = {java.io.ObjectOutputStream.class};
   5.120 +                      Class<?>[] args = {java.io.ObjectOutputStream.class};
   5.121                        writeObjectMethod = cl.getDeclaredMethod("writeObject", args);
   5.122                        hasWriteObjectMethod = true;
   5.123                        int mods = writeObjectMethod.getModifiers();
   5.124 @@ -578,7 +579,7 @@
   5.125                       * ObjectInputStream so it can all the method directly.
   5.126                       */
   5.127                      try {
   5.128 -                      Class[] args = {java.io.ObjectInputStream.class};
   5.129 +                      Class<?>[] args = {java.io.ObjectInputStream.class};
   5.130                        readObjectMethod = cl.getDeclaredMethod("readObject", args);
   5.131                        int mods = readObjectMethod.getModifiers();
   5.132  
   5.133 @@ -629,11 +630,11 @@
   5.134              if (translation != null)
   5.135                  return translation;
   5.136              else {
   5.137 -                Class osfClass = com.sun.corba.se.impl.orbutil.ObjectStreamField.class;
   5.138 +                Class<?> osfClass = com.sun.corba.se.impl.orbutil.ObjectStreamField.class;
   5.139  
   5.140                  translation = (Object[])java.lang.reflect.Array.newInstance(osfClass, objs.length);
   5.141                  Object arg[] = new Object[2];
   5.142 -                Class types[] = {String.class, Class.class};
   5.143 +                Class<?> types[] = {String.class, Class.class};
   5.144                  Constructor constructor = osfClass.getDeclaredConstructor(types);
   5.145                  for (int i = fields.length -1; i >= 0; i--){
   5.146                      arg[0] = fields[i].getName();
   5.147 @@ -804,7 +805,7 @@
   5.148          }
   5.149      }
   5.150  
   5.151 -    private static long computeStructuralUID(ObjectStreamClass_1_3_1 osc, Class cl) {
   5.152 +    private static long computeStructuralUID(ObjectStreamClass_1_3_1 osc, Class<?> cl) {
   5.153          ByteArrayOutputStream devnull = new ByteArrayOutputStream(512);
   5.154  
   5.155          long h = 0;
   5.156 @@ -824,7 +825,7 @@
   5.157              DataOutputStream data = new DataOutputStream(mdo);
   5.158  
   5.159              // Get SUID of parent
   5.160 -            Class parent = cl.getSuperclass();
   5.161 +            Class<?> parent = cl.getSuperclass();
   5.162              if ((parent != null))
   5.163              // SerialBug 1; acc. to spec the one for
   5.164              // java.lang.object
   5.165 @@ -910,10 +911,10 @@
   5.166      /**
   5.167       * Compute the JVM signature for the class.
   5.168       */
   5.169 -    static String getSignature(Class clazz) {
   5.170 +    static String getSignature(Class<?> clazz) {
   5.171          String type = null;
   5.172          if (clazz.isArray()) {
   5.173 -            Class cl = clazz;
   5.174 +            Class<?> cl = clazz;
   5.175              int dimensions = 0;
   5.176              while (cl.isArray()) {
   5.177                  dimensions++;
   5.178 @@ -959,7 +960,7 @@
   5.179  
   5.180          sb.append("(");
   5.181  
   5.182 -        Class[] params = meth.getParameterTypes(); // avoid clone
   5.183 +        Class<?>[] params = meth.getParameterTypes(); // avoid clone
   5.184          for (int j = 0; j < params.length; j++) {
   5.185              sb.append(getSignature(params[j]));
   5.186          }
   5.187 @@ -976,7 +977,7 @@
   5.188  
   5.189          sb.append("(");
   5.190  
   5.191 -        Class[] params = cons.getParameterTypes(); // avoid clone
   5.192 +        Class<?>[] params = cons.getParameterTypes(); // avoid clone
   5.193          for (int j = 0; j < params.length; j++) {
   5.194              sb.append(getSignature(params[j]));
   5.195          }
   5.196 @@ -996,7 +997,7 @@
   5.197       * The entries are extended from java.lang.ref.SoftReference so the
   5.198       * gc will be able to free them if needed.
   5.199       */
   5.200 -    private static ObjectStreamClass_1_3_1 findDescriptorFor(Class cl) {
   5.201 +    private static ObjectStreamClass_1_3_1 findDescriptorFor(Class<?> cl) {
   5.202  
   5.203          int hash = cl.hashCode();
   5.204          int index = (hash & 0x7FFFFFFF) % descriptorFor.length;
   5.205 @@ -1077,7 +1078,7 @@
   5.206      /*
   5.207       * Class that is a descriptor for in this virtual machine.
   5.208       */
   5.209 -    private Class ofClass;
   5.210 +    private Class<?> ofClass;
   5.211  
   5.212      /*
   5.213       * True if descriptor for a proxy class.
   5.214 @@ -1130,22 +1131,6 @@
   5.215      /* Get the private static final field for serial version UID */
   5.216      // private static native long getSerialVersionUIDField(Class cl);
   5.217  
   5.218 -    /* The Class Object for java.io.Serializable */
   5.219 -    private static Class classSerializable = null;
   5.220 -    private static Class classExternalizable = null;
   5.221 -
   5.222 -    /*
   5.223 -     * Resolve java.io.Serializable at load time.
   5.224 -     */
   5.225 -    static {
   5.226 -        try {
   5.227 -            classSerializable = Class.forName("java.io.Serializable");
   5.228 -            classExternalizable = Class.forName("java.io.Externalizable");
   5.229 -        } catch (Throwable e) {
   5.230 -            System.err.println("Could not load java.io.Serializable or java.io.Externalizable.");
   5.231 -        }
   5.232 -    }
   5.233 -
   5.234      /** use serialVersionUID from JDK 1.1. for interoperability */
   5.235      private static final long serialVersionUID = -6120832682080437368L;
   5.236  
   5.237 @@ -1183,8 +1168,8 @@
   5.238  
   5.239      private static class CompareClassByName implements Comparator {
   5.240          public int compare(Object o1, Object o2) {
   5.241 -            Class c1 = (Class)o1;
   5.242 -            Class c2 = (Class)o2;
   5.243 +            Class<?> c1 = (Class)o1;
   5.244 +            Class<?> c2 = (Class)o2;
   5.245              return (c1.getName()).compareTo(c2.getName());
   5.246          }
   5.247      }
     6.1 --- a/src/share/classes/org/omg/CORBA/ORB.java	Wed Mar 12 14:10:21 2014 -0700
     6.2 +++ b/src/share/classes/org/omg/CORBA/ORB.java	Fri Mar 14 16:12:12 2014 -0700
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
    6.10 @@ -36,6 +36,8 @@
    6.11  import java.security.AccessController;
    6.12  import java.security.PrivilegedAction;
    6.13  
    6.14 +import sun.reflect.misc.ReflectUtil;
    6.15 +
    6.16  /**
    6.17   * A class providing APIs for the CORBA Object Request Broker
    6.18   * features.  The <code>ORB</code> class also provides
    6.19 @@ -289,20 +291,38 @@
    6.20                      (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) {
    6.21                  singleton = new com.sun.corba.se.impl.orb.ORBSingleton();
    6.22              } else {
    6.23 -                singleton = create_impl(className);
    6.24 +                singleton = create_impl_with_systemclassloader(className);
    6.25              }
    6.26          }
    6.27          return singleton;
    6.28      }
    6.29  
    6.30 +   private static ORB create_impl_with_systemclassloader(String className) {
    6.31 +
    6.32 +        try {
    6.33 +            ReflectUtil.checkPackageAccess(className);
    6.34 +            ClassLoader cl = ClassLoader.getSystemClassLoader();
    6.35 +            Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
    6.36 +            Class<?> singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
    6.37 +            return (ORB)singletonOrbClass.newInstance();
    6.38 +        } catch (Throwable ex) {
    6.39 +            SystemException systemException = new INITIALIZE(
    6.40 +                "can't instantiate default ORB implementation " + className);
    6.41 +            systemException.initCause(ex);
    6.42 +            throw systemException;
    6.43 +        }
    6.44 +    }
    6.45 +
    6.46      private static ORB create_impl(String className) {
    6.47 -
    6.48          ClassLoader cl = Thread.currentThread().getContextClassLoader();
    6.49          if (cl == null)
    6.50              cl = ClassLoader.getSystemClassLoader();
    6.51  
    6.52          try {
    6.53 -            return (ORB) Class.forName(className, true, cl).newInstance();
    6.54 +            ReflectUtil.checkPackageAccess(className);
    6.55 +            Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
    6.56 +            Class<?> orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
    6.57 +            return (ORB)orbClass.newInstance();
    6.58          } catch (Throwable ex) {
    6.59              SystemException systemException = new INITIALIZE(
    6.60                 "can't instantiate default ORB implementation " + className);
    6.61 @@ -346,7 +366,6 @@
    6.62          } else {
    6.63              orb = create_impl(className);
    6.64          }
    6.65 -
    6.66          orb.set_parameters(args, props);
    6.67          return orb;
    6.68      }
    6.69 @@ -377,7 +396,6 @@
    6.70          } else {
    6.71              orb = create_impl(className);
    6.72          }
    6.73 -
    6.74          orb.set_parameters(app, props);
    6.75          return orb;
    6.76      }
    6.77 @@ -573,7 +591,7 @@
    6.78          try {
    6.79              // First try to load the OperationDef class
    6.80              String opDefClassName = "org.omg.CORBA.OperationDef";
    6.81 -            Class opDefClass = null;
    6.82 +            Class<?> opDefClass = null;
    6.83  
    6.84              ClassLoader cl = Thread.currentThread().getContextClassLoader();
    6.85              if ( cl == null )
    6.86 @@ -583,7 +601,7 @@
    6.87  
    6.88              // OK, we loaded OperationDef. Now try to get the
    6.89              // create_operation_list(OperationDef oper) method.
    6.90 -            Class[] argc = { opDefClass };
    6.91 +            Class<?>[] argc = { opDefClass };
    6.92              java.lang.reflect.Method meth =
    6.93                  this.getClass().getMethod("create_operation_list", argc);
    6.94  

mercurial