harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Lee <littlee1...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-6331) [classlib][beans] remove XMLDecoderTest from the exclude list
Date Fri, 04 Sep 2009 07:26:09 GMT
Thanks Regis.

The testcase will *pass* on ri and harmony+vme. But failed on harmony+drlvm.
The reason cause this difference is due to differenct order returned by the
Class.getMethods.
It seems findMethod in XMLDecoder shoud fix this problem, because it should
be order free.

Also I use "*" around the word "pass" when I mentioned result using harmony
+ vme. It is a fake pass. The exception it throw is "Cannot decide which
method to call to match get" due to the specific method order it get. The
senario as follows:

Class A has four method:
1. test(int, String)
2. test(Integer, Object)
3. test(Object, String)
4. test(String, Object)

I want to invoke the test with arg null and "aaa", that is
method.invoke(null, "aaa"). Which method should be invoked?
RI: NoSuchMethodException
vme: (mothed order is 4, 1, 2, 3), "Cannot decide which method to call to
match get", because method 4 and method 2 has the same distance.
drlvm: (mothd order is 1, 2, 3, 4), method 3 is invoked because it has the
smallest distance.

My question is: which method should be invoked?



On Thu, Sep 3, 2009 at 6:15 PM, Regis Xu (JIRA) <jira@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/HARMONY-6331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750953#action_12750953]
>
> Regis Xu commented on HARMONY-6331:
> -----------------------------------
>
> After applying second patch, testReadObject_Owner_Specific is faild, but
> it's much better than before!
>
> junit.framework.AssertionFailedError: null
>        at junit.framework.Assert.fail(Assert.java:47)
>        at junit.framework.Assert.assertTrue(Assert.java:20)
>        at junit.framework.Assert.assertNull(Assert.java:227)
>        at junit.framework.Assert.assertNull(Assert.java:220)
>        at
> org.apache.harmony.beans.tests.java.beans.XMLDecoderTest.testReadObject_Owner_Specific(XMLDecoderTest.java:457)
>        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>
> looking forward your new patch :)
>
> > [classlib][beans] remove XMLDecoderTest from the exclude list
> > -------------------------------------------------------------
> >
> >                 Key: HARMONY-6331
> >                 URL: https://issues.apache.org/jira/browse/HARMONY-6331
> >             Project: Harmony
> >          Issue Type: Bug
> >            Reporter: Li Jing Qin
> >         Attachments: HARMONY-6331.diff, HARMONY-6331.diff.v2
> >
> >
> > Remove the XMLDecoderTest form the exclude list.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
Yours sincerely,
Charles Lee

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message