[jboss-cvs] javassist/src/main/javassist/util/proxy ...

Shigeru Chiba chiba at is.titech.ac.jp
Thu Mar 26 08:20:43 EDT 2009


  User: chiba   
  Date: 09/03/26 08:20:43

  Modified:    src/main/javassist/util/proxy  SerializedProxy.java
  Log:
  JASSIST-75
  
  Revision  Changes    Path
  1.3       +14 -2     javassist/src/main/javassist/util/proxy/SerializedProxy.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SerializedProxy.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/util/proxy/SerializedProxy.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- SerializedProxy.java	4 Jun 2007 03:11:10 -0000	1.2
  +++ SerializedProxy.java	26 Mar 2009 12:20:43 -0000	1.3
  @@ -45,15 +45,27 @@
           }
       }
   
  +    /**
  +     * Load class.
  +     *
  +     * @param className the class name
  +     * @return loaded class
  +     * @throws ClassNotFoundException for any error
  +     */
  +    protected Class loadClass(String className) throws ClassNotFoundException {
  +        ClassLoader cl = Thread.currentThread().getContextClassLoader();
  +        return cl.loadClass(className);
  +    }
  +
       Object readResolve() throws ObjectStreamException {
           try {
               int n = interfaces.length;
               Class[] infs = new Class[n];
               for (int i = 0; i < n; i++)
  -                infs[i] = Class.forName(interfaces[i]);
  +                infs[i] = loadClass(interfaces[i]);
   
               ProxyFactory f = new ProxyFactory();
  -            f.setSuperclass(Class.forName(superClass));
  +            f.setSuperclass(loadClass(superClass));
               f.setInterfaces(infs);
               f.setFilter(filter);
               f.setHandler(handler);
  
  
  



More information about the jboss-cvs-commits mailing list