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] Updated: (HARMONY-1970) [classlib][rmi] Could not get proxy ActivationSystem via ActivationGroup.getSystem() method
Date Mon, 30 Oct 2006 16:34:17 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1970?page=all ]

Mikhail Markov updated HARMONY-1970:
------------------------------------

    Attachment: ActivationGroupTest.patch

Patch for the test.

> [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
>         Attachments: ActivationGroup.patch, ActivationGroupTest.patch
>
>
> 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