You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Markov (JIRA)" <ji...@apache.org> on 2006/10/26 09:43:17 UTC

[jira] Updated: (HARMONY-1970) [classlib][rmi] Could not get proxy ActivationSystem via ActivationGroup.getSystem() method

     [ http://issues.apache.org/jira/browse/HARMONY-1970?page=all ]

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

    Attachment: ActivationGroup.patch

Here is the patch for java.rmi.activation.ActivationGroup class.

> [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
>
>
> 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