/[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.54 by bryce, Tue Feb 22 03:39:43 2005 UTC revision 1.55 by mkoch, Sat Apr 16 11:05:07 2005 UTC
# Line 796  public class ObjectInputStream extends I Line 796  public class ObjectInputStream extends I
796      if (sm == null)      if (sm == null)
797        sm = new SecurityManager () {};        sm = new SecurityManager () {};
798            
799      return currentClassLoader(sm);      return VMObjectInputStream.currentClassLoader(sm);
800    }    }
801    
802    /**    /**
# Line 888  public class ObjectInputStream extends I Line 888  public class ObjectInputStream extends I
888      if (sm == null)      if (sm == null)
889        sm = new SecurityManager() {};        sm = new SecurityManager() {};
890            
891      ClassLoader cl = currentClassLoader(sm);      ClassLoader cl = VMObjectInputStream.currentClassLoader(sm);
892            
893      Class[] clss = new Class[intfs.length];      Class[] clss = new Class[intfs.length];
894      if(cl == null)      if(cl == null)
# Line 1838  public class ObjectInputStream extends I Line 1838  public class ObjectInputStream extends I
1838          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());
1839      try      try
1840        {        {
1841          return allocateObject(real_class, constructor.getDeclaringClass(), constructor);          return VMObjectInputStream.allocateObject(real_class, constructor.getDeclaringClass(), constructor);
1842        }        }
1843      catch (InstantiationException e)      catch (InstantiationException e)
1844        {        {
# Line 1866  public class ObjectInputStream extends I Line 1866  public class ObjectInputStream extends I
1866        }        }
1867    }    }
1868    
   /**  
    * 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);  
   
1869    private void callReadMethod (Method readObject, Class klass, Object obj)    private void callReadMethod (Method readObject, Class klass, Object obj)
1870      throws ClassNotFoundException, IOException      throws ClassNotFoundException, IOException
1871    {    {
# Line 1906  public class ObjectInputStream extends I Line 1897  public class ObjectInputStream extends I
1897      prereadFields = null;      prereadFields = null;
1898    }    }
1899            
   private native Object allocateObject(Class clazz, Class constr_clazz, Constructor constructor)  
     throws InstantiationException;  
   
1900    private static final int BUFFER_SIZE = 1024;    private static final int BUFFER_SIZE = 1024;
1901    
1902    private DataInputStream realInputStream;    private DataInputStream realInputStream;

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

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