DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17704>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17704

Incorrect error msg for Dynamic Proxy objects

           Summary: Incorrect error msg for Dynamic Proxy objects
           Product: Axis
           Version: 1.1RC1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Basic Architecture
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The bug is this: Under some circumstances, AXIS wants to look at the Java class 
file of the deployed object.  If the class is a "Java 1.3 Dynamic Proxy" it 
won't have a class file.  The current AXIS prints an error message incorrectly 
when such a class is deployed.

-Ed
IBM Watson

Bug fix:
add the following lines to ParamNameExtractor.java, below where it says "c = 
method.getDeclaringClass()"
        // Don't worry about it if the class is a Java dynamic proxy
        if (c.getSuperclass() == java.lang.reflect.Proxy.class)
                return null;

Test program, to demonstrate the bug:
public class TestDynamicDeploy {
        public static void main(String[] args) throws Exception {
                InvocationHandler h = new I12Handler();
                Object dyn = Proxy.newProxyInstance(h.getClass().getClassLoader
(), 
                        new Class[] { I1.class, I2.class }, 
                        h);

                Method m = dyn.getClass().getDeclaredMethod(
                        "equals", new Class[] { Object.class });
                Object dummy = ParamNameExtractor.getParameterNamesFromDebugInfo
(m);
                System.out.println(dummy);
        }
        
}

interface I1 {
}

interface I2 {
}

class I12Handler implements InvocationHandler {
        public Object invoke(Object o, Method m, Object[] a) {
                throw new IllegalStateException("unimplemented");
        }
}

Reply via email to