Merge jdk7-b118

Tue, 09 Nov 2010 22:48:22 -0800

author
lana
date
Tue, 09 Nov 2010 22:48:22 -0800
changeset 210
42e77836fded
parent 204
16adbe677ef8
parent 209
e5819cb9b15e
child 211
39829414ae31
child 221
88ac4daf5d0e

Merge

     1.1 --- a/make/com/sun/corba/minclude/com_sun_corba_se_impl_io.jmk	Thu Nov 04 15:54:15 2010 -0700
     1.2 +++ b/make/com/sun/corba/minclude/com_sun_corba_se_impl_io.jmk	Tue Nov 09 22:48:22 2010 -0800
     1.3 @@ -34,7 +34,7 @@
     1.4  	com/sun/corba/se/impl/io/ObjectStreamField.java \
     1.5  	com/sun/corba/se/impl/io/OptionalDataException.java \
     1.6  	com/sun/corba/se/impl/io/ValueHandlerImpl.java \
     1.7 -	com/sun/corba/se/impl/io/IIOPInputStream.java \
     1.8 +        com/sun/corba/se/impl/io/IIOPInputStream.java \
     1.9  	com/sun/corba/se/impl/io/IIOPOutputStream.java \
    1.10  	com/sun/corba/se/impl/io/TypeMismatchException.java \
    1.11  	com/sun/corba/se/impl/io/InputStreamHook.java \
     2.1 --- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Thu Nov 04 15:54:15 2010 -0700
     2.2 +++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Tue Nov 09 22:48:22 2010 -0800
     2.3 @@ -2553,8 +2553,8 @@
     2.4              bridge.putObject( o, key, v ) ;
     2.5          } catch (Exception e) {
     2.6              throw utilWrapper.errorSetObjectField( e, fieldName,
     2.7 -                ObjectUtility.compactObjectToString( o ),
     2.8 -                ObjectUtility.compactObjectToString( v )) ;
     2.9 +                o.toString(),
    2.10 +                v.toString() ) ;
    2.11          }
    2.12      }
    2.13  
    2.14 @@ -2566,7 +2566,7 @@
    2.15              bridge.putBoolean( o, key, v ) ;
    2.16          } catch (Exception e) {
    2.17              throw utilWrapper.errorSetBooleanField( e, fieldName,
    2.18 -                ObjectUtility.compactObjectToString( o ),
    2.19 +                o.toString(),
    2.20                  new Boolean(v) ) ;
    2.21          }
    2.22      }
    2.23 @@ -2579,7 +2579,7 @@
    2.24              bridge.putByte( o, key, v ) ;
    2.25          } catch (Exception e) {
    2.26              throw utilWrapper.errorSetByteField( e, fieldName,
    2.27 -                ObjectUtility.compactObjectToString( o ),
    2.28 +                o.toString(),
    2.29                  new Byte(v) ) ;
    2.30          }
    2.31      }
    2.32 @@ -2592,7 +2592,7 @@
    2.33              bridge.putChar( o, key, v ) ;
    2.34          } catch (Exception e) {
    2.35              throw utilWrapper.errorSetCharField( e, fieldName,
    2.36 -                ObjectUtility.compactObjectToString( o ),
    2.37 +                o.toString(),
    2.38                  new Character(v) ) ;
    2.39          }
    2.40      }
    2.41 @@ -2605,7 +2605,7 @@
    2.42              bridge.putShort( o, key, v ) ;
    2.43          } catch (Exception e) {
    2.44              throw utilWrapper.errorSetShortField( e, fieldName,
    2.45 -                ObjectUtility.compactObjectToString( o ),
    2.46 +                o.toString(),
    2.47                  new Short(v) ) ;
    2.48          }
    2.49      }
    2.50 @@ -2618,7 +2618,7 @@
    2.51              bridge.putInt( o, key, v ) ;
    2.52          } catch (Exception e) {
    2.53              throw utilWrapper.errorSetIntField( e, fieldName,
    2.54 -                ObjectUtility.compactObjectToString( o ),
    2.55 +                o.toString(),
    2.56                  new Integer(v) ) ;
    2.57          }
    2.58      }
    2.59 @@ -2631,7 +2631,7 @@
    2.60              bridge.putLong( o, key, v ) ;
    2.61          } catch (Exception e) {
    2.62              throw utilWrapper.errorSetLongField( e, fieldName,
    2.63 -                ObjectUtility.compactObjectToString( o ),
    2.64 +                o.toString(),
    2.65                  new Long(v) ) ;
    2.66          }
    2.67      }
    2.68 @@ -2644,7 +2644,7 @@
    2.69              bridge.putFloat( o, key, v ) ;
    2.70          } catch (Exception e) {
    2.71              throw utilWrapper.errorSetFloatField( e, fieldName,
    2.72 -                ObjectUtility.compactObjectToString( o ),
    2.73 +                o.toString(),
    2.74                  new Float(v) ) ;
    2.75          }
    2.76      }
    2.77 @@ -2657,7 +2657,7 @@
    2.78              bridge.putDouble( o, key, v ) ;
    2.79          } catch (Exception e) {
    2.80              throw utilWrapper.errorSetDoubleField( e, fieldName,
    2.81 -                ObjectUtility.compactObjectToString( o ),
    2.82 +                o.toString(),
    2.83                  new Double(v) ) ;
    2.84          }
    2.85      }
     3.1 --- a/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java	Thu Nov 04 15:54:15 2010 -0700
     3.2 +++ b/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java	Tue Nov 09 22:48:22 2010 -0800
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1998, 2010, 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 @@ -32,32 +32,22 @@
    3.11  package com.sun.corba.se.impl.io;
    3.12  
    3.13  import javax.rmi.CORBA.Util;
    3.14 -import javax.rmi.PortableRemoteObject;
    3.15  
    3.16  import java.util.Hashtable;
    3.17 -import java.util.Stack;
    3.18  import java.io.IOException;
    3.19 -import java.util.EmptyStackException;
    3.20  
    3.21 -import com.sun.corba.se.impl.util.Utility;
    3.22 -import com.sun.corba.se.impl.io.IIOPInputStream;
    3.23 -import com.sun.corba.se.impl.io.IIOPOutputStream;
    3.24  import com.sun.corba.se.impl.util.RepositoryId;
    3.25  import com.sun.corba.se.impl.util.Utility;
    3.26  
    3.27  import org.omg.CORBA.TCKind;
    3.28  
    3.29 -import org.omg.CORBA.MARSHAL;
    3.30 -import org.omg.CORBA.BAD_PARAM;
    3.31 -import org.omg.CORBA.CompletionStatus;
    3.32  import org.omg.CORBA.portable.IndirectionException;
    3.33  import com.sun.org.omg.SendingContext.CodeBase;
    3.34  import com.sun.org.omg.SendingContext.CodeBaseHelper;
    3.35  
    3.36  import java.security.AccessController;
    3.37  import java.security.PrivilegedAction;
    3.38 -
    3.39 -import com.sun.corba.se.impl.io.IIOPInputStream.ActiveRecursionManager;
    3.40 +import java.security.PrivilegedExceptionAction;
    3.41  
    3.42  import com.sun.corba.se.spi.logging.CORBALogDomains;
    3.43  import com.sun.corba.se.impl.logging.OMGSystemException;
    3.44 @@ -809,65 +799,163 @@
    3.45          return "com.sun.corba.se.impl.io.IIOPOutputStream";
    3.46      }
    3.47  
    3.48 -    private com.sun.corba.se.impl.io.IIOPOutputStream createOutputStream() {
    3.49 -        return (com.sun.corba.se.impl.io.IIOPOutputStream)AccessController.doPrivileged(
    3.50 -            new StreamFactory(getOutputStreamClassName()));
    3.51 +   private IIOPOutputStream createOutputStream() {
    3.52 +        final String name = getOutputStreamClassName();
    3.53 +        try {
    3.54 +             IIOPOutputStream stream = createOutputStreamBuiltIn(name);
    3.55 +             if (stream != null) {
    3.56 +                 return stream;
    3.57 +             }
    3.58 +             return createCustom(IIOPOutputStream.class, name);
    3.59 +        } catch (Throwable t) {
    3.60 +            // Throw exception under the carpet.
    3.61 +            InternalError ie = new InternalError(
    3.62 +                "Error loading " + name
    3.63 +            );
    3.64 +                ie.initCause(t);
    3.65 +                throw ie;
    3.66 +        }
    3.67 +    }
    3.68 +
    3.69 +    /**
    3.70 +     * Construct a built in implementation with priveleges.
    3.71 +     * Returning null indicates a non-built is specified.
    3.72 +     */
    3.73 +    private IIOPOutputStream createOutputStreamBuiltIn(
    3.74 +        final String name
    3.75 +    ) throws Throwable {
    3.76 +        try {
    3.77 +            return AccessController.doPrivileged(
    3.78 +                new PrivilegedExceptionAction<IIOPOutputStream>() {
    3.79 +                    public IIOPOutputStream run() throws IOException {
    3.80 +                        return createOutputStreamBuiltInNoPriv(name);
    3.81 +                    }
    3.82 +                }
    3.83 +            );
    3.84 +        } catch (java.security.PrivilegedActionException exc) {
    3.85 +            throw exc.getCause();
    3.86 +        }
    3.87 +    }
    3.88 +
    3.89 +    /**
    3.90 +     * Returning null indicates a non-built is specified.
    3.91 +     */
    3.92 +    private IIOPOutputStream createOutputStreamBuiltInNoPriv(
    3.93 +        final String name
    3.94 +    ) throws IOException {
    3.95 +        return
    3.96 +            name.equals(
    3.97 +                IIOPOutputStream
    3.98 +                    .class.getName()
    3.99 +            ) ?
   3.100 +            new IIOPOutputStream() :
   3.101 +
   3.102 +            name.equals(
   3.103 +                com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3
   3.104 +                    .class.getName()
   3.105 +            ) ?
   3.106 +            new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3() :
   3.107 +
   3.108 +            name.equals(
   3.109 +                com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1
   3.110 +                    .class.getName()
   3.111 +            ) ?
   3.112 +            new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1() :
   3.113 +
   3.114 +            null;
   3.115      }
   3.116  
   3.117      protected String getInputStreamClassName() {
   3.118          return "com.sun.corba.se.impl.io.IIOPInputStream";
   3.119      }
   3.120  
   3.121 -    private com.sun.corba.se.impl.io.IIOPInputStream createInputStream() {
   3.122 -        return (com.sun.corba.se.impl.io.IIOPInputStream)AccessController.doPrivileged(
   3.123 -            new StreamFactory(getInputStreamClassName()));
   3.124 +    private IIOPInputStream createInputStream() {
   3.125 +        final String name = getInputStreamClassName();
   3.126 +        try {
   3.127 +             IIOPInputStream stream = createInputStreamBuiltIn(name);
   3.128 +             if (stream != null) {
   3.129 +                 return stream;
   3.130 +             }
   3.131 +             return createCustom(IIOPInputStream.class, name);
   3.132 +        } catch (Throwable t) {
   3.133 +            // Throw exception under the carpet.
   3.134 +            InternalError ie = new InternalError(
   3.135 +                "Error loading " + name
   3.136 +            );
   3.137 +                ie.initCause(t);
   3.138 +                throw ie;
   3.139 +        }
   3.140      }
   3.141  
   3.142      /**
   3.143 -     * Instantiates a class of the given name using the system ClassLoader
   3.144 -     * as part of a PrivilegedAction.
   3.145 -     *
   3.146 -     * It's private final so hopefully people can't grab it outside of
   3.147 -     * this class.
   3.148 -     *
   3.149 -     * If you're worried that someone could subclass ValueHandlerImpl,
   3.150 -     * install his own streams, and snoop what's on the wire:
   3.151 -     * Someone can do that only if he's allowed to use the feature
   3.152 -     * of installing his own javax.rmi.CORBA.Util delegate (via a
   3.153 -     * JVM property or orb.properties file, read the first time the
   3.154 -     * Util class is used).  If he can do that, he can snoop
   3.155 -     * anything on the wire, anyway, without abusing the
   3.156 -     * StreamFactory class.
   3.157 +     * Construct a built in implementation with priveleges.
   3.158 +     * Returning null indicates a non-built is specified.
   3.159       */
   3.160 -    private static final class StreamFactory implements PrivilegedAction {
   3.161 -        private String className;
   3.162 +     private IIOPInputStream createInputStreamBuiltIn(
   3.163 +         final String name
   3.164 +     ) throws Throwable {
   3.165 +         try {
   3.166 +             return AccessController.doPrivileged(
   3.167 +                 new PrivilegedExceptionAction<IIOPInputStream>() {
   3.168 +                     public IIOPInputStream run() throws IOException {
   3.169 +                         return createInputStreamBuiltInNoPriv(name);
   3.170 +                     }
   3.171 +                 }
   3.172 +             );
   3.173 +         } catch (java.security.PrivilegedActionException exc) {
   3.174 +             throw exc.getCause();
   3.175 +         }
   3.176 +     }
   3.177  
   3.178 -        public StreamFactory (String _className) {
   3.179 -            className = _className;
   3.180 -        }
   3.181 +     /**
   3.182 +      * Returning null indicates a non-built is specified.
   3.183 +      */
   3.184 +     private IIOPInputStream createInputStreamBuiltInNoPriv(
   3.185 +         final String name
   3.186 +     ) throws IOException {
   3.187 +         return
   3.188 +             name.equals(
   3.189 +                 IIOPInputStream
   3.190 +                     .class.getName()
   3.191 +             ) ?
   3.192 +             new IIOPInputStream() :
   3.193  
   3.194 -        public Object run() {
   3.195 -            try {
   3.196 -                // Note: We must use the system ClassLoader here
   3.197 -                // since we want to load classes outside of the
   3.198 -                // core JDK when running J2EE Pure ORB and
   3.199 -                // talking to Kestrel.
   3.200 +             name.equals(
   3.201 +                 com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3
   3.202 +                     .class.getName()
   3.203 +             ) ?
   3.204 +             new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() :
   3.205 +
   3.206 +             name.equals(
   3.207 +                 com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1
   3.208 +                     .class.getName()
   3.209 +             ) ?
   3.210 +             new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1() :
   3.211 +
   3.212 +             null;
   3.213 +     }
   3.214 +
   3.215 +     /**
   3.216 +      * Create a custom implementation without privileges.
   3.217 +      */
   3.218 +     private <T> T createCustom(
   3.219 +         final Class<T> type, final String className
   3.220 +     ) throws Throwable {
   3.221 +           // Note: We use the thread context or system ClassLoader here
   3.222 +           // since we want to load classes outside of the
   3.223 +           // core JDK when running J2EE Pure ORB and
   3.224 +           // talking to Kestrel.
   3.225                  ClassLoader cl = Thread.currentThread().getContextClassLoader();
   3.226                  if (cl == null)
   3.227                      cl = ClassLoader.getSystemClassLoader();
   3.228  
   3.229 -                Class streamClass = cl.loadClass(className);
   3.230 +                Class<?> clazz = cl.loadClass(className);
   3.231 +                Class<? extends T> streamClass = clazz.asSubclass(type);
   3.232  
   3.233                  // Since the ClassLoader should cache the class, this isn't
   3.234                  // as expensive as it looks.
   3.235                  return streamClass.newInstance();
   3.236  
   3.237 -            } catch(Throwable t) {
   3.238 -                InternalError ie = new InternalError( "Error loading " + className ) ;
   3.239 -                ie.initCause( t ) ;
   3.240 -                throw ie ;
   3.241 -            }
   3.242 -        }
   3.243      }
   3.244  
   3.245      /**
     4.1 --- a/src/share/classes/com/sun/corba/se/impl/orb/PrefixParserAction.java	Thu Nov 04 15:54:15 2010 -0700
     4.2 +++ b/src/share/classes/com/sun/corba/se/impl/orb/PrefixParserAction.java	Tue Nov 09 22:48:22 2010 -0800
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2002, 2010, 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 @@ -110,7 +110,7 @@
    4.11                      throw wrapper.couldNotSetArray( thr,
    4.12                          getPropertyName(), new Integer(ctr),
    4.13                          componentType, new Integer(size),
    4.14 -                        ObjectUtility.compactObjectToString( obj )) ;
    4.15 +                        obj.toString() ) ;
    4.16                  }
    4.17                  ctr++ ;
    4.18              }
     5.1 --- a/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java	Thu Nov 04 15:54:15 2010 -0700
     5.2 +++ b/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectUtility.java	Tue Nov 09 22:48:22 2010 -0800
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 2002, 2010, 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 @@ -50,103 +50,8 @@
    5.11  import java.math.BigDecimal ;
    5.12  
    5.13  public final class ObjectUtility {
    5.14 -    private boolean useToString ;
    5.15 -    private boolean isIndenting ;
    5.16 -    private int initialLevel ;
    5.17 -    private int increment ;
    5.18 -    private ClassMap classToPrinter = new ClassMap() ;
    5.19 +    private ObjectUtility() {}
    5.20  
    5.21 -    private static ObjectUtility standard = new ObjectUtility( false, true,
    5.22 -        0, 4 ) ;
    5.23 -    private static ObjectUtility compact = new ObjectUtility( true, false,
    5.24 -        0, 4 ) ;
    5.25 -
    5.26 -    private ObjectUtility( boolean useToString, boolean isIndenting,
    5.27 -        int initialLevel, int increment )
    5.28 -    {
    5.29 -        this.useToString = useToString ;
    5.30 -        this.isIndenting = isIndenting ;
    5.31 -        this.initialLevel = initialLevel ;
    5.32 -        this.increment = increment ;
    5.33 -        classToPrinter.put( Properties.class, propertiesPrinter ) ;
    5.34 -        classToPrinter.put( Collection.class, collectionPrinter ) ;
    5.35 -        classToPrinter.put( Map.class, mapPrinter ) ;
    5.36 -    }
    5.37 -
    5.38 -    /** Construct an Utility instance with the desired objectToString
    5.39 -    * behavior.
    5.40 -    */
    5.41 -    public static ObjectUtility make( boolean useToString, boolean isIndenting,
    5.42 -        int initialLevel, int increment )
    5.43 -    {
    5.44 -        return new ObjectUtility( useToString, isIndenting, initialLevel,
    5.45 -            increment ) ;
    5.46 -    }
    5.47 -
    5.48 -    /** Construct an Utility instance with the desired objectToString
    5.49 -    * behavior.
    5.50 -    */
    5.51 -    public static ObjectUtility make( boolean useToString, boolean isIndenting )
    5.52 -    {
    5.53 -        return new ObjectUtility( useToString, isIndenting, 0, 4 ) ;
    5.54 -    }
    5.55 -
    5.56 -    /** Get the standard Utility object that supports objectToString with
    5.57 -    * indented display and no use of toString() methods.
    5.58 -    */
    5.59 -    public static ObjectUtility make()
    5.60 -    {
    5.61 -        return standard ;
    5.62 -    }
    5.63 -
    5.64 -    /** A convenience method that gives the default behavior: use indenting
    5.65 -    * to display the object's structure and do not use built-in toString
    5.66 -    * methods.
    5.67 -    */
    5.68 -    public static String defaultObjectToString( java.lang.Object object )
    5.69 -    {
    5.70 -        return standard.objectToString( object ) ;
    5.71 -    }
    5.72 -
    5.73 -    public static String compactObjectToString( java.lang.Object object )
    5.74 -    {
    5.75 -        return compact.objectToString( object ) ;
    5.76 -    }
    5.77 -
    5.78 -    /** objectToString handles display of arbitrary objects.  It correctly
    5.79 -    * handles objects whose elements form an arbitrary graph.  It uses
    5.80 -    * reflection to display the contents of any kind of object.
    5.81 -    * An object's toString() method may optionally be used, but the default
    5.82 -    * is to ignore all toString() methods except for those defined for
    5.83 -    * primitive types, primitive type wrappers, and strings.
    5.84 -    */
    5.85 -    public String objectToString(java.lang.Object obj)
    5.86 -    {
    5.87 -        IdentityHashMap printed = new IdentityHashMap() ;
    5.88 -        ObjectWriter result = ObjectWriter.make( isIndenting, initialLevel,
    5.89 -            increment ) ;
    5.90 -        objectToStringHelper( printed, result, obj ) ;
    5.91 -        return result.toString() ;
    5.92 -    }
    5.93 -
    5.94 -    // Perform a deep structural equality comparison of the two objects.
    5.95 -    // This handles all arrays, maps, and sets specially, otherwise
    5.96 -    // it just calls the object's equals() method.
    5.97 -    public static boolean equals( java.lang.Object obj1, java.lang.Object obj2 )
    5.98 -    {
    5.99 -        // Set of pairs of objects that have been (or are being) considered for
   5.100 -        // equality.  Such pairs are presumed to be equals.  If they are not,
   5.101 -        // this will be detected eventually and the equals method will return
   5.102 -        // false.
   5.103 -        Set considered = new HashSet() ;
   5.104 -
   5.105 -        // Map that gives the corresponding component of obj2 for a component
   5.106 -        // of obj1.  This is used to check for the same aliasing and use of
   5.107 -        // equal objects in both objects.
   5.108 -        Map counterpart = new IdentityHashMap() ;
   5.109 -
   5.110 -        return equalsHelper( counterpart, considered, obj1, obj2 ) ;
   5.111 -    }
   5.112  
   5.113      /** If arr1 and arr2 are both arrays of the same component type,
   5.114       * return an array of that component type that consists of the
   5.115 @@ -179,544 +84,4 @@
   5.116          return result ;
   5.117      }
   5.118  
   5.119 -//===========================================================================
   5.120 -//  Implementation
   5.121 -//===========================================================================
   5.122 -
   5.123 -    private void objectToStringHelper( IdentityHashMap printed,
   5.124 -        ObjectWriter result, java.lang.Object obj)
   5.125 -    {
   5.126 -        if (obj==null) {
   5.127 -            result.append( "null" ) ;
   5.128 -            result.endElement() ;
   5.129 -        } else {
   5.130 -            Class cls = obj.getClass() ;
   5.131 -            result.startObject( obj ) ;
   5.132 -
   5.133 -            if (printed.keySet().contains( obj )) {
   5.134 -                result.endObject( "*VISITED*" ) ;
   5.135 -            } else {
   5.136 -                printed.put( obj, null ) ;
   5.137 -
   5.138 -                if (mustUseToString(cls)) {
   5.139 -                    result.endObject( obj.toString() ) ;
   5.140 -                } else {
   5.141 -                    // First, handle any classes that have special printer
   5.142 -                    // methods defined.  This is useful when the class
   5.143 -                    // overrides toString with something that
   5.144 -                    // is not sufficiently detailed.
   5.145 -                    ObjectPrinter printer = (ObjectPrinter)(classToPrinter.get(
   5.146 -                        cls )) ;
   5.147 -                    if (printer != null) {
   5.148 -                        printer.print( printed, result, obj ) ;
   5.149 -                        result.endObject() ;
   5.150 -                    } else {
   5.151 -                        Class compClass = cls.getComponentType() ;
   5.152 -
   5.153 -                        if (compClass == null)
   5.154 -                            // handleObject always calls endObject
   5.155 -                            handleObject( printed, result, obj ) ;
   5.156 -                        else {
   5.157 -                            handleArray( printed, result, obj ) ;
   5.158 -                            result.endObject() ;
   5.159 -                        }
   5.160 -                    }
   5.161 -                }
   5.162 -            }
   5.163 -        }
   5.164 -    }
   5.165 -
   5.166 -    private static interface ObjectPrinter {
   5.167 -        void print( IdentityHashMap printed, ObjectWriter buff,
   5.168 -            java.lang.Object obj ) ;
   5.169 -    }
   5.170 -
   5.171 -    private ObjectPrinter propertiesPrinter = new ObjectPrinter() {
   5.172 -        public void print( IdentityHashMap printed, ObjectWriter buff,
   5.173 -            java.lang.Object obj )
   5.174 -        {
   5.175 -            if (!(obj instanceof Properties))
   5.176 -                throw new Error() ;
   5.177 -
   5.178 -            Properties props = (Properties)obj ;
   5.179 -            Enumeration keys = props.propertyNames() ;
   5.180 -            while (keys.hasMoreElements()) {
   5.181 -                String key = (String)(keys.nextElement()) ;
   5.182 -                String value = props.getProperty( key ) ;
   5.183 -                buff.startElement() ;
   5.184 -                buff.append( key ) ;
   5.185 -                buff.append( "=" ) ;
   5.186 -                buff.append( value ) ;
   5.187 -                buff.endElement() ;
   5.188 -            }
   5.189 -        }
   5.190 -    } ;
   5.191 -
   5.192 -    private ObjectPrinter collectionPrinter = new ObjectPrinter() {
   5.193 -        public void print( IdentityHashMap printed, ObjectWriter buff,
   5.194 -            java.lang.Object obj )
   5.195 -        {
   5.196 -            if (!(obj instanceof Collection))
   5.197 -                throw new Error() ;
   5.198 -
   5.199 -            Collection coll = (Collection)obj ;
   5.200 -            Iterator iter = coll.iterator() ;
   5.201 -            while (iter.hasNext()) {
   5.202 -                java.lang.Object element = iter.next() ;
   5.203 -                buff.startElement() ;
   5.204 -                objectToStringHelper( printed, buff, element ) ;
   5.205 -                buff.endElement() ;
   5.206 -            }
   5.207 -        }
   5.208 -    } ;
   5.209 -
   5.210 -    private ObjectPrinter mapPrinter = new ObjectPrinter() {
   5.211 -        public void print( IdentityHashMap printed, ObjectWriter buff,
   5.212 -            java.lang.Object obj )
   5.213 -        {
   5.214 -            if (!(obj instanceof Map))
   5.215 -                throw new Error() ;
   5.216 -
   5.217 -            Map map = (Map)obj ;
   5.218 -            Iterator iter = map.entrySet().iterator() ;
   5.219 -            while (iter.hasNext()) {
   5.220 -                Entry entry = (Entry)(iter.next()) ;
   5.221 -                buff.startElement() ;
   5.222 -                objectToStringHelper( printed, buff, entry.getKey() ) ;
   5.223 -                buff.append( "=>" ) ;
   5.224 -                objectToStringHelper( printed, buff, entry.getValue() ) ;
   5.225 -                buff.endElement() ;
   5.226 -            }
   5.227 -        }
   5.228 -    } ;
   5.229 -
   5.230 -    private static class ClassMap {
   5.231 -        ArrayList data ;
   5.232 -
   5.233 -        public ClassMap()
   5.234 -        {
   5.235 -            data = new ArrayList() ;
   5.236 -        }
   5.237 -
   5.238 -        /** Return the first element of the ClassMap that is assignable to cls.
   5.239 -        * The order is determined by the order in which the put method was
   5.240 -        * called.  Returns null if there is no match.
   5.241 -        */
   5.242 -        public java.lang.Object get( Class cls )
   5.243 -        {
   5.244 -            Iterator iter = data.iterator() ;
   5.245 -            while (iter.hasNext()) {
   5.246 -                java.lang.Object[] arr = (java.lang.Object[])(iter.next()) ;
   5.247 -                Class key = (Class)(arr[0]) ;
   5.248 -                if (key.isAssignableFrom( cls ))
   5.249 -                    return arr[1] ;
   5.250 -            }
   5.251 -
   5.252 -            return null ;
   5.253 -        }
   5.254 -
   5.255 -        /** Add obj to the map with key cls.  Note that order matters,
   5.256 -         * as the first match is returned.
   5.257 -         */
   5.258 -        public void put( Class cls, java.lang.Object obj )
   5.259 -        {
   5.260 -            java.lang.Object[] pair = { cls, obj } ;
   5.261 -            data.add( pair ) ;
   5.262 -        }
   5.263 -    }
   5.264 -
   5.265 -    private boolean mustUseToString( Class cls )
   5.266 -    {
   5.267 -        // These probably never occur
   5.268 -        if (cls.isPrimitive())
   5.269 -            return true ;
   5.270 -
   5.271 -        // We must use toString for all primitive wrappers, since
   5.272 -        // otherwise the code recurses endlessly (access value field
   5.273 -        // inside Integer, returns another Integer through reflection).
   5.274 -        if ((cls == Integer.class) ||
   5.275 -            (cls == BigInteger.class) ||
   5.276 -            (cls == BigDecimal.class) ||
   5.277 -            (cls == String.class) ||
   5.278 -            (cls == StringBuffer.class) ||
   5.279 -            (cls == Long.class) ||
   5.280 -            (cls == Short.class) ||
   5.281 -            (cls == Byte.class) ||
   5.282 -            (cls == Character.class) ||
   5.283 -            (cls == Float.class) ||
   5.284 -            (cls == Double.class) ||
   5.285 -            (cls == Boolean.class))
   5.286 -            return true ;
   5.287 -
   5.288 -        if (useToString) {
   5.289 -            try {
   5.290 -                cls.getDeclaredMethod( "toString", (Class[])null ) ;
   5.291 -                return true ;
   5.292 -            } catch (Exception exc) {
   5.293 -                return false ;
   5.294 -            }
   5.295 -        }
   5.296 -
   5.297 -        return false ;
   5.298 -    }
   5.299 -
   5.300 -    private void handleObject( IdentityHashMap printed, ObjectWriter result,
   5.301 -        java.lang.Object obj )
   5.302 -    {
   5.303 -        Class cls = obj.getClass() ;
   5.304 -
   5.305 -        try {
   5.306 -            Field[] fields;
   5.307 -            SecurityManager security = System.getSecurityManager();
   5.308 -            if (security != null && !Modifier.isPublic(cls.getModifiers())) {
   5.309 -                fields = new Field[0];
   5.310 -            } else {
   5.311 -                fields = cls.getDeclaredFields();
   5.312 -            }
   5.313 -
   5.314 -            for (int ctr=0; ctr<fields.length; ctr++ ) {
   5.315 -                final Field fld = fields[ctr] ;
   5.316 -                int modifiers = fld.getModifiers() ;
   5.317 -
   5.318 -                // Do not display field if it is static, since these fields
   5.319 -                // are always the same for every instances.  This could
   5.320 -                // be made configurable, but I don't think it is
   5.321 -                // useful to do so.
   5.322 -                if (!Modifier.isStatic( modifiers )) {
   5.323 -                    if (security != null) {
   5.324 -                        if (!Modifier.isPublic(modifiers))
   5.325 -                            continue;
   5.326 -                    }
   5.327 -                    result.startElement() ;
   5.328 -                    result.append( fld.getName() ) ;
   5.329 -                    result.append( ":" ) ;
   5.330 -
   5.331 -                    try {
   5.332 -                        // Make sure that we can read the field if it is
   5.333 -                        // not public
   5.334 -                        AccessController.doPrivileged( new PrivilegedAction() {
   5.335 -                            public Object run() {
   5.336 -                                fld.setAccessible( true ) ;
   5.337 -                                return null ;
   5.338 -                            }
   5.339 -                        } ) ;
   5.340 -
   5.341 -                        java.lang.Object value = fld.get( obj ) ;
   5.342 -                        objectToStringHelper( printed, result, value ) ;
   5.343 -                    } catch (Exception exc2) {
   5.344 -                        result.append( "???" ) ;
   5.345 -                    }
   5.346 -
   5.347 -                    result.endElement() ;
   5.348 -                }
   5.349 -            }
   5.350 -
   5.351 -            result.endObject() ;
   5.352 -        } catch (Exception exc2) {
   5.353 -            result.endObject( obj.toString() ) ;
   5.354 -        }
   5.355 -    }
   5.356 -
   5.357 -    private void handleArray( IdentityHashMap printed, ObjectWriter result,
   5.358 -        java.lang.Object obj )
   5.359 -    {
   5.360 -        Class compClass = obj.getClass().getComponentType() ;
   5.361 -        if (compClass == boolean.class) {
   5.362 -            boolean[] arr = (boolean[])obj ;
   5.363 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.364 -                result.startElement() ;
   5.365 -                result.append( arr[ctr] ) ;
   5.366 -                result.endElement() ;
   5.367 -            }
   5.368 -        } else if (compClass == byte.class) {
   5.369 -            byte[] arr = (byte[])obj ;
   5.370 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.371 -                result.startElement() ;
   5.372 -                result.append( arr[ctr] ) ;
   5.373 -                result.endElement() ;
   5.374 -            }
   5.375 -        } else if (compClass == short.class) {
   5.376 -            short[] arr = (short[])obj ;
   5.377 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.378 -                result.startElement() ;
   5.379 -                result.append( arr[ctr] ) ;
   5.380 -                result.endElement() ;
   5.381 -            }
   5.382 -        } else if (compClass == int.class) {
   5.383 -            int[] arr = (int[])obj ;
   5.384 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.385 -                result.startElement() ;
   5.386 -                result.append( arr[ctr] ) ;
   5.387 -                result.endElement() ;
   5.388 -            }
   5.389 -        } else if (compClass == long.class) {
   5.390 -            long[] arr = (long[])obj ;
   5.391 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.392 -                result.startElement() ;
   5.393 -                result.append( arr[ctr] ) ;
   5.394 -                result.endElement() ;
   5.395 -            }
   5.396 -        } else if (compClass == char.class) {
   5.397 -            char[] arr = (char[])obj ;
   5.398 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.399 -                result.startElement() ;
   5.400 -                result.append( arr[ctr] ) ;
   5.401 -                result.endElement() ;
   5.402 -            }
   5.403 -        } else if (compClass == float.class) {
   5.404 -            float[] arr = (float[])obj ;
   5.405 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.406 -                result.startElement() ;
   5.407 -                result.append( arr[ctr] ) ;
   5.408 -                result.endElement() ;
   5.409 -            }
   5.410 -        } else if (compClass == double.class) {
   5.411 -            double[] arr = (double[])obj ;
   5.412 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.413 -                result.startElement() ;
   5.414 -                result.append( arr[ctr] ) ;
   5.415 -                result.endElement() ;
   5.416 -            }
   5.417 -        } else { // array of object
   5.418 -            java.lang.Object[] arr = (java.lang.Object[])obj ;
   5.419 -            for (int ctr=0; ctr<arr.length; ctr++) {
   5.420 -                result.startElement() ;
   5.421 -                objectToStringHelper( printed, result, arr[ctr] ) ;
   5.422 -                result.endElement() ;
   5.423 -            }
   5.424 -        }
   5.425 -    }
   5.426 -
   5.427 -    private static class Pair
   5.428 -    {
   5.429 -        private java.lang.Object obj1 ;
   5.430 -        private java.lang.Object obj2 ;
   5.431 -
   5.432 -        Pair( java.lang.Object obj1, java.lang.Object obj2 )
   5.433 -        {
   5.434 -            this.obj1 = obj1 ;
   5.435 -            this.obj2 = obj2 ;
   5.436 -        }
   5.437 -
   5.438 -        public boolean equals( java.lang.Object obj )
   5.439 -        {
   5.440 -            if (!(obj instanceof Pair))
   5.441 -                return false ;
   5.442 -
   5.443 -            Pair other = (Pair)obj ;
   5.444 -            return other.obj1 == obj1 && other.obj2 == obj2 ;
   5.445 -        }
   5.446 -
   5.447 -        public int hashCode()
   5.448 -        {
   5.449 -            return System.identityHashCode( obj1 ) ^
   5.450 -                System.identityHashCode( obj2 ) ;
   5.451 -        }
   5.452 -    }
   5.453 -
   5.454 -    private static boolean equalsHelper( Map counterpart, Set considered,
   5.455 -        java.lang.Object obj1, java.lang.Object obj2 )
   5.456 -    {
   5.457 -        if ((obj1 == null) || (obj2 == null))
   5.458 -            return obj1 == obj2 ;
   5.459 -
   5.460 -        java.lang.Object other2 = counterpart.get( obj1 ) ;
   5.461 -        if (other2 == null) {
   5.462 -            other2 = obj2 ;
   5.463 -            counterpart.put( obj1, other2 ) ;
   5.464 -        }
   5.465 -
   5.466 -        if (obj1 == other2)
   5.467 -            return true ;
   5.468 -
   5.469 -        if (obj2 != other2)
   5.470 -            return false ;
   5.471 -
   5.472 -        Pair pair = new Pair( obj1, obj2 ) ;
   5.473 -        if (considered.contains( pair ))
   5.474 -            return true ;
   5.475 -        else
   5.476 -            considered.add( pair ) ;
   5.477 -
   5.478 -        if (obj1 instanceof java.lang.Object[] &&
   5.479 -            obj2 instanceof java.lang.Object[])
   5.480 -            return equalArrays( counterpart, considered,
   5.481 -                (java.lang.Object[])obj1, (java.lang.Object[])obj2 ) ;
   5.482 -        else if (obj1 instanceof Map && obj2 instanceof Map)
   5.483 -            return equalMaps( counterpart, considered,
   5.484 -                (Map)obj1, (Map)obj2 ) ;
   5.485 -        else if (obj1 instanceof Set && obj2 instanceof Set)
   5.486 -            return equalSets( counterpart, considered,
   5.487 -                (Set)obj1, (Set)obj2 ) ;
   5.488 -        else if (obj1 instanceof List && obj2 instanceof List)
   5.489 -            return equalLists( counterpart, considered,
   5.490 -                (List)obj1, (List)obj2 ) ;
   5.491 -        else if (obj1 instanceof boolean[] && obj2 instanceof boolean[])
   5.492 -            return Arrays.equals( (boolean[])obj1, (boolean[])obj2 ) ;
   5.493 -        else if (obj1 instanceof byte[] && obj2 instanceof byte[])
   5.494 -            return Arrays.equals( (byte[])obj1, (byte[])obj2 ) ;
   5.495 -        else if (obj1 instanceof char[] && obj2 instanceof char[])
   5.496 -            return Arrays.equals( (char[])obj1, (char[])obj2 ) ;
   5.497 -        else if (obj1 instanceof double[] && obj2 instanceof double[])
   5.498 -            return Arrays.equals( (double[])obj1, (double[])obj2 ) ;
   5.499 -        else if (obj1 instanceof float[] && obj2 instanceof float[])
   5.500 -            return Arrays.equals( (float[])obj1, (float[])obj2 ) ;
   5.501 -        else if (obj1 instanceof int[] && obj2 instanceof int[])
   5.502 -            return Arrays.equals( (int[])obj1, (int[])obj2 ) ;
   5.503 -        else if (obj1 instanceof long[] && obj2 instanceof long[])
   5.504 -            return Arrays.equals( (long[])obj1, (long[])obj2 ) ;
   5.505 -        else {
   5.506 -            Class cls = obj1.getClass() ;
   5.507 -            if (cls != obj2.getClass())
   5.508 -                return obj1.equals( obj2 ) ;
   5.509 -            else
   5.510 -                return equalsObject( counterpart, considered, cls, obj1, obj2 ) ;
   5.511 -        }
   5.512 -    }
   5.513 -
   5.514 -    private static boolean equalsObject( Map counterpart, Set considered,
   5.515 -        Class cls, java.lang.Object obj1, java.lang.Object obj2 )
   5.516 -    {
   5.517 -        Class objectClass = java.lang.Object.class ;
   5.518 -        if (cls == objectClass)
   5.519 -            return true ;
   5.520 -
   5.521 -        Class[] equalsTypes = { objectClass } ;
   5.522 -        try {
   5.523 -            Method equalsMethod = cls.getDeclaredMethod( "equals",
   5.524 -                equalsTypes ) ;
   5.525 -            return obj1.equals( obj2 ) ;
   5.526 -        } catch (Exception exc) {
   5.527 -            if (equalsObjectFields( counterpart, considered,
   5.528 -                    cls, obj1, obj2 ))
   5.529 -                return equalsObject( counterpart, considered,
   5.530 -                    cls.getSuperclass(), obj1, obj2 ) ;
   5.531 -            else
   5.532 -                return false ;
   5.533 -        }
   5.534 -    }
   5.535 -
   5.536 -    private static boolean equalsObjectFields( Map counterpart, Set considered,
   5.537 -        Class cls, java.lang.Object obj1, java.lang.Object obj2 )
   5.538 -    {
   5.539 -        Field[] fields = cls.getDeclaredFields() ;
   5.540 -        for (int ctr=0; ctr<fields.length; ctr++) {
   5.541 -            try {
   5.542 -                final Field field = fields[ctr] ;
   5.543 -                // Ignore static fields
   5.544 -                if (!Modifier.isStatic( field.getModifiers())) {
   5.545 -                    AccessController.doPrivileged(new PrivilegedAction() {
   5.546 -                        public Object run() {
   5.547 -                            field.setAccessible( true ) ;
   5.548 -                            return null ;
   5.549 -                        }
   5.550 -                    } ) ;
   5.551 -
   5.552 -                    java.lang.Object value1 = field.get( obj1 ) ;
   5.553 -                    java.lang.Object value2 = field.get( obj2 ) ;
   5.554 -                    if (!equalsHelper( counterpart, considered, value1,
   5.555 -                        value2 ))
   5.556 -                        return false ;
   5.557 -                }
   5.558 -            } catch (IllegalAccessException exc) {
   5.559 -                return false ;
   5.560 -            }
   5.561 -        }
   5.562 -
   5.563 -        return true ;
   5.564 -    }
   5.565 -
   5.566 -    private static boolean equalArrays( Map counterpart, Set considered,
   5.567 -        java.lang.Object[] arr1, java.lang.Object[] arr2 )
   5.568 -    {
   5.569 -        int len = arr1.length ;
   5.570 -        if (len != arr2.length)
   5.571 -            return false ;
   5.572 -
   5.573 -        for (int ctr = 0; ctr<len; ctr++ )
   5.574 -            if (!equalsHelper( counterpart, considered, arr1[ctr], arr2[ctr] ))
   5.575 -                return false ;
   5.576 -
   5.577 -        return true ;
   5.578 -    }
   5.579 -
   5.580 -    private static boolean equalMaps( Map counterpart, Set considered,
   5.581 -        Map map1, Map map2 )
   5.582 -    {
   5.583 -        if (map2.size() != map1.size())
   5.584 -            return false;
   5.585 -
   5.586 -        try {
   5.587 -            Iterator i = map1.entrySet().iterator();
   5.588 -            while (i.hasNext()) {
   5.589 -                Entry e = (Entry) i.next();
   5.590 -                java.lang.Object key = e.getKey();
   5.591 -                java.lang.Object value = e.getValue();
   5.592 -                if (value == null) {
   5.593 -                    if (!(map2.get(key)==null && map2.containsKey(key)))
   5.594 -                        return false;
   5.595 -                } else {
   5.596 -                    if (!equalsHelper( counterpart, considered,
   5.597 -                        value, map2.get(key)))
   5.598 -                        return false;
   5.599 -                }
   5.600 -            }
   5.601 -        } catch(ClassCastException unused)   {
   5.602 -            return false;
   5.603 -        } catch(NullPointerException unused) {
   5.604 -            return false;
   5.605 -        }
   5.606 -
   5.607 -        return true;
   5.608 -    }
   5.609 -
   5.610 -    // Obviously this is an inefficient quadratic algorithm.
   5.611 -    // This is taken pretty directly from AbstractSet and AbstractCollection
   5.612 -    // in the JDK.
   5.613 -    // For HashSet, an O(n) (with a good hash function) algorithm
   5.614 -    // is possible, and likewise TreeSet, since it is
   5.615 -    // ordered, is O(n).  But this is not worth the effort here.
   5.616 -    // Note that the inner loop uses equals, not equalsHelper.
   5.617 -    // This is needed because of the searching behavior of this test.
   5.618 -    // However, note that this will NOT correctly handle sets that
   5.619 -    // contain themselves as members, or that have members that reference
   5.620 -    // themselves.  These cases will cause infinite regress!
   5.621 -    private static boolean equalSets( Map counterpart, Set considered,
   5.622 -        Set set1, Set set2 )
   5.623 -    {
   5.624 -        if (set1.size() != set2.size())
   5.625 -            return false ;
   5.626 -
   5.627 -        Iterator e1 = set1.iterator() ;
   5.628 -        while (e1.hasNext()) {
   5.629 -            java.lang.Object obj1 = e1.next() ;
   5.630 -
   5.631 -            boolean found = false ;
   5.632 -            Iterator e2 = set2.iterator() ;
   5.633 -            while (e2.hasNext() && !found) {
   5.634 -                java.lang.Object obj2 = e2.next() ;
   5.635 -                found = equals( obj1, obj2 ) ;
   5.636 -            }
   5.637 -
   5.638 -            if (!found)
   5.639 -                return false ;
   5.640 -        }
   5.641 -
   5.642 -        return true ;
   5.643 -    }
   5.644 -
   5.645 -    private static boolean equalLists( Map counterpart, Set considered,
   5.646 -        List list1, List list2 )
   5.647 -    {
   5.648 -        ListIterator e1 = list1.listIterator();
   5.649 -        ListIterator e2 = list2.listIterator();
   5.650 -        while(e1.hasNext() && e2.hasNext()) {
   5.651 -            java.lang.Object o1 = e1.next();
   5.652 -            java.lang.Object o2 = e2.next();
   5.653 -            if (!(o1==null ? o2==null : equalsHelper(
   5.654 -                counterpart, considered, o1, o2)))
   5.655 -                return false;
   5.656 -        }
   5.657 -        return !(e1.hasNext() || e2.hasNext());
   5.658 -    }
   5.659  }
     6.1 --- a/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Thu Nov 04 15:54:15 2010 -0700
     6.2 +++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Tue Nov 09 22:48:22 2010 -0800
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2001, 2010, 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 @@ -33,14 +33,7 @@
    6.11  import java.nio.channels.SelectionKey;
    6.12  import java.nio.channels.ServerSocketChannel;
    6.13  import java.nio.channels.SocketChannel;
    6.14 -import java.security.AccessController;
    6.15 -import java.security.PrivilegedAction;
    6.16 -import java.util.Collection;
    6.17  import java.util.Iterator;
    6.18 -import java.util.LinkedList;
    6.19 -
    6.20 -import org.omg.CORBA.CompletionStatus;
    6.21 -import org.omg.CORBA.INTERNAL;
    6.22  
    6.23  import com.sun.corba.se.pept.broker.Broker;
    6.24  import com.sun.corba.se.pept.encoding.InputObject;
    6.25 @@ -61,18 +54,12 @@
    6.26  import com.sun.corba.se.spi.ior.iiop.IIOPProfileTemplate ;
    6.27  import com.sun.corba.se.spi.ior.iiop.GIOPVersion ;
    6.28  import com.sun.corba.se.spi.ior.iiop.AlternateIIOPAddressComponent;
    6.29 -import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
    6.30  import com.sun.corba.se.spi.logging.CORBALogDomains;
    6.31 -import com.sun.corba.se.spi.monitoring.LongMonitoredAttributeBase;
    6.32 -import com.sun.corba.se.spi.monitoring.MonitoringConstants;
    6.33 -import com.sun.corba.se.spi.monitoring.MonitoringFactories;
    6.34 -import com.sun.corba.se.spi.monitoring.MonitoredObject;
    6.35  import com.sun.corba.se.spi.orb.ORB;
    6.36  import com.sun.corba.se.spi.orbutil.threadpool.Work;
    6.37  import com.sun.corba.se.spi.protocol.CorbaMessageMediator;
    6.38  import com.sun.corba.se.spi.transport.CorbaAcceptor;
    6.39  import com.sun.corba.se.spi.transport.CorbaConnection;
    6.40 -import com.sun.corba.se.spi.transport.CorbaContactInfo;
    6.41  import com.sun.corba.se.spi.transport.SocketInfo;
    6.42  import com.sun.corba.se.spi.transport.SocketOrChannelAcceptor;
    6.43  
    6.44 @@ -82,7 +69,6 @@
    6.45  import com.sun.corba.se.impl.oa.poa.Policies; // REVISIT impl/poa specific
    6.46  import com.sun.corba.se.impl.orbutil.ORBConstants;
    6.47  import com.sun.corba.se.impl.orbutil.ORBUtility;
    6.48 -import com.sun.corba.se.impl.ior.iiop.JavaSerializationComponent;
    6.49  
    6.50  // BEGIN Legacy support.
    6.51  import com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo;
    6.52 @@ -442,12 +428,7 @@
    6.53                  dprint(".doWork->: " + this);
    6.54              }
    6.55              if (selectionKey.isAcceptable()) {
    6.56 -                AccessController.doPrivileged(new PrivilegedAction() {
    6.57 -                    public java.lang.Object run() {
    6.58                          accept();
    6.59 -                        return null;
    6.60 -                    }
    6.61 -                });
    6.62              } else {
    6.63                  if (orb.transportDebugFlag) {
    6.64                      dprint(".doWork: ! selectionKey.isAcceptable: " + this);
     7.1 --- a/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java	Thu Nov 04 15:54:15 2010 -0700
     7.2 +++ b/src/share/classes/com/sun/corba/se/spi/orb/OperationFactory.java	Tue Nov 09 22:48:22 2010 -0800
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
    7.10 @@ -25,6 +25,7 @@
    7.11  package com.sun.corba.se.spi.orb ;
    7.12  
    7.13  import java.util.StringTokenizer ;
    7.14 +import java.util.Arrays ;
    7.15  
    7.16  import java.lang.reflect.Array ;
    7.17  
    7.18 @@ -446,7 +447,7 @@
    7.19          public String toString() {
    7.20              return "sequenceAction(separator=\"" + sep +
    7.21                  "\",actions=" +
    7.22 -                ObjectUtility.compactObjectToString(actions) + ")" ;
    7.23 +                Arrays.toString(actions) + ")" ;
    7.24          }
    7.25      }
    7.26  
    7.27 @@ -533,7 +534,7 @@
    7.28  
    7.29          public String toString() {
    7.30              return "mapSequenceAction(" +
    7.31 -                ObjectUtility.compactObjectToString(op) + ")" ;
    7.32 +                Arrays.toString(op) + ")" ;
    7.33          }
    7.34      }
    7.35  
     8.1 --- a/src/share/classes/com/sun/corba/se/spi/orb/ParserImplBase.java	Thu Nov 04 15:54:15 2010 -0700
     8.2 +++ b/src/share/classes/com/sun/corba/se/spi/orb/ParserImplBase.java	Tue Nov 09 22:48:22 2010 -0800
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
     8.6 + * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
     8.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.8   *
     8.9   * This code is free software; you can redistribute it and/or modify it
    8.10 @@ -125,7 +125,7 @@
    8.11                  // Since exc wraps the actual exception, use exc.getCause()
    8.12                  // instead of exc.
    8.13                  throw wrapper.errorSettingField( exc.getCause(), name,
    8.14 -                    ObjectUtility.compactObjectToString(value) ) ;
    8.15 +                    value.toString() ) ;
    8.16              }
    8.17          }
    8.18  

mercurial