harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1970) [classlib][rmi] Could not get proxy ActivationSystem via ActivationGroup.getSystem() method
Date Thu, 26 Oct 2006 07:35:16 GMT
[classlib][rmi] Could not get proxy ActivationSystem via ActivationGroup.getSystem() method
-------------------------------------------------------------------------------------------

                 Key: HARMONY-1970
                 URL: http://issues.apache.org/jira/browse/HARMONY-1970
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: IA32, WinXP
            Reporter: Mikhail Markov


The following test emulates the situation when the ActivationSystem is a proxy class (which
is possible when dynamic remote stub is created for it). It passes silently on RI but fails
on Harmny.

Output on Harmony:

java.lang.ClassCastException
        at java.rmi.activation.ActivationGroup.getSystem(ActivationGroup.java:218)
        at Test.main(Test.java:11)

-------------Test.java----------------
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.rmi.activation.ActivationGroup;
import java.rmi.activation.ActivationSystem;

public class Test {
    public static void main(String[] args) throws Exception {
        ActivationSystem system = (ActivationSystem) Proxy.newProxyInstance(null,
                new Class[] { ActivationSystem.class }, new TestInvocationHandler());
        ActivationGroup.setSystem(system);
        ActivationGroup.getSystem();
    }

    static class TestInvocationHandler implements InvocationHandler {
        public Object invoke(Object proxy, Method method, Object[] args) {
            return null;
        }
    }
}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message