/[classpath]/classpath/java/io/ObjectInputStream.java
ViewVC logotype

Diff of /classpath/java/io/ObjectInputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43.2.9 by gnu_andrew, Sun Mar 13 14:38:40 2005 UTC revision 1.43.2.10 by gnu_andrew, Mon Apr 18 01:37:37 2005 UTC
# Line 803  public class ObjectInputStream extends I Line 803  public class ObjectInputStream extends I
803      if (sm == null)      if (sm == null)
804        sm = new SecurityManager () {};        sm = new SecurityManager () {};
805            
806      return currentClassLoader(sm);      return VMObjectInputStream.currentClassLoader(sm);
807    }    }
808    
809    /**    /**
# Line 895  public class ObjectInputStream extends I Line 895  public class ObjectInputStream extends I
895      if (sm == null)      if (sm == null)
896        sm = new SecurityManager() {};        sm = new SecurityManager() {};
897            
898      ClassLoader cl = currentClassLoader(sm);      ClassLoader cl = VMObjectInputStream.currentClassLoader(sm);
899            
900      Class<?>[] clss = new Class<?>[intfs.length];      Class<?>[] clss = new Class<?>[intfs.length];
901      if(cl == null)      if(cl == null)
# Line 1845  public class ObjectInputStream extends I Line 1845  public class ObjectInputStream extends I
1845          throw new InvalidClassException("Missing accessible no-arg base class constructor for " + real_class.getName());          throw new InvalidClassException("Missing accessible no-arg base class constructor for " + real_class.getName());
1846      try      try
1847        {        {
1848          return allocateObject(real_class, constructor.getDeclaringClass(), constructor);          return VMObjectInputStream.allocateObject(real_class, constructor.getDeclaringClass(), constructor);
1849        }        }
1850      catch (InstantiationException e)      catch (InstantiationException e)
1851        {        {
# Line 1873  public class ObjectInputStream extends I Line 1873  public class ObjectInputStream extends I
1873        }        }
1874    }    }
1875    
   /**  
    * This native method is used to get access to the protected method  
    * of the same name in SecurityManger.  
    *  
    * @param sm SecurityManager instance which should be called.  
    * @return The current class loader in the calling stack.  
    */  
   private static native ClassLoader currentClassLoader (SecurityManager sm);  
   
1876    private void callReadMethod (Method readObject, Class klass, Object obj)    private void callReadMethod (Method readObject, Class klass, Object obj)
1877      throws ClassNotFoundException, IOException      throws ClassNotFoundException, IOException
1878    {    {
# Line 1913  public class ObjectInputStream extends I Line 1904  public class ObjectInputStream extends I
1904      prereadFields = null;      prereadFields = null;
1905    }    }
1906            
   private native Object allocateObject(Class clazz, Class constr_clazz, Constructor constructor)  
     throws InstantiationException;  
   
1907    private static final int BUFFER_SIZE = 1024;    private static final int BUFFER_SIZE = 1024;
1908    
1909    private DataInputStream realInputStream;    private DataInputStream realInputStream;

Legend:
Removed from v.1.43.2.9  
changed lines
  Added in v.1.43.2.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26