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

Shigeru Chiba chiba at is.titech.ac.jp
Mon Aug 14 10:48:47 EDT 2006


  User: chiba   
  Date: 06/08/14 10:48:47

  Modified:    src/main/javassist   ClassPool.java CtClass.java
  Log:
  deprecated ClassPool#toClass(CtClass,ClassLoader).
  
  Revision  Changes    Path
  1.56      +7 -6      javassist/src/main/javassist/ClassPool.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ClassPool.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/ClassPool.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -b -r1.55 -r1.56
  --- ClassPool.java	8 Aug 2006 10:28:48 -0000	1.55
  +++ ClassPool.java	14 Aug 2006 14:48:47 -0000	1.56
  @@ -791,7 +791,9 @@
        * @see #getClassLoader()
        */
       public Class toClass(CtClass clazz) throws CannotCompileException {
  -        return toClass(clazz, getClassLoader(), null); 
  +        // Some subclasses of ClassPool may override toClass(CtClass,ClassLoader).
  +        // So we should call that method instead of toClass(.., ProtectionDomain).
  +        return toClass(clazz, getClassLoader()); 
       }
   
       /**
  @@ -825,13 +827,12 @@
        * work with a security manager or a signed jar file because a
        * protection domain is not specified.
        *
  -     * <p><b>Note:</b> A subclass of <code>ClassPool</code> that has been
  -     * overriding this method must be modified.  It must override
  +     * @deprecated      Replaced by {@link #toClass(CtClass,ClassLoader,ProtectionDomain)}.
  +     * A subclass of <code>ClassPool</code> that has been
  +     * overriding this method should be modified.  It should override
        * {@link #toClass(CtClass,ClassLoader,ProtectionDomain)}.
  -     *
  -     * @deprecated      Replaced by {@link #toClass(CtClass,ClassLoader,ProtectionDomain)}
        */
  -    public final Class toClass(CtClass ct, ClassLoader loader)
  +    public Class toClass(CtClass ct, ClassLoader loader)
           throws CannotCompileException
       {
           return toClass(ct, loader, null);
  
  
  
  1.77      +2 -1      javassist/src/main/javassist/CtClass.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CtClass.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtClass.java,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -b -r1.76 -r1.77
  --- CtClass.java	7 Aug 2006 15:48:31 -0000	1.76
  +++ CtClass.java	14 Aug 2006 14:48:47 -0000	1.77
  @@ -1030,7 +1030,7 @@
        * work with a security manager or a signed jar file because a
        * protection domain is not specified.
        *
  -     * @see #toClass(java.lang.ClassLoader)
  +     * @see #toClass(java.lang.ClassLoader,ProtectionDomain)
        * @see ClassPool#toClass(CtClass)
        */
       public Class toClass() throws CannotCompileException {
  @@ -1066,6 +1066,7 @@
        *                      If it is null, the default domain created
        *                      by <code>java.lang.ClassLoader</code> is used.
        * @see ClassPool#toClass(CtClass,java.lang.ClassLoader)
  +     * @since 3.3
        */
       public Class toClass(ClassLoader loader, ProtectionDomain domain)
           throws CannotCompileException
  
  
  



More information about the jboss-cvs-commits mailing list