commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bugs #10646] java.lang.reflect.Method.toString() and array


From: Michael Koch
Subject: [commit-cp] [bugs #10646] java.lang.reflect.Method.toString() and array parameters, etc
Date: Sat, 16 Oct 2004 04:46:59 -0400
User-agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)

This mail is an automated notification from the bugs tracker
 of the project: classpath.

/**************************************************************************/
[bugs #10646] Latest Modifications:

Changes by: 
                Michael Koch <address@hidden>
'Date: 
                Sam 16.10.2004 at 08:39 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
I commited the patch. Thanks for your report and help with this.






/**************************************************************************/
[bugs #10646] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10646>
Project: classpath
Submitted by: Stephen Crawley
On: Die 12.10.2004 at 14:31

Category:  None
Severity:  5 - Average
Resolution:  Fixed
Privacy:  Public
Assigned to:  mkoch
Status:  Closed
Platform Version:  None


Summary:  java.lang.reflect.Method.toString() and array parameters, etc

Original Submission:  The toString() method in the reference implementation of
the Method class gives the wrong answer when called on a
method with a parameter or a result type that is an array
type.  You get "void foo([I)" instead of "void foo(int[])"
for example.

The bug is due to the use of 'getName()' on the respective
Class objects to get the type strings.  Unfortunately, 
getName() is specified to return a "[..." string for
an array type.

Follow-up Comments
------------------


-------------------------------------------------------
Date: Sam 16.10.2004 at 08:39       By: Michael Koch <mkoch>
I commited the patch. Thanks for your report and help with this.

-------------------------------------------------------
Date: Fre 15.10.2004 at 15:24       By: Stephen Crawley <crawley>
Michael: the patch now looks correct and passes your revised
Mauve test cases (apart from one which is failing due to a
bug in Kissme's implementation of java.lang.Class.getMethod)

I recommend checking it in.

Thanks,

-- Steve


-------------------------------------------------------
Date: Don 14.10.2004 at 15:48       By: Michael Koch <mkoch>
Damn, that happens when the JVM version is partly different and you cant test 
the actual patch directly. I have updated the patch. Does it look otherwise 
corret to you ? If yes I will apply it and write a mail to the mailing list to 
make all JVM implementers aware of it.

-------------------------------------------------------
Date: Don 14.10.2004 at 15:26       By: Stephen Crawley <crawley>
Michael:  unfortunately your patch is not quite correct.
It applies getUserTypeName to the method's exception 
types rather than its parameter types.

I'm also seeing an unexpected NullPointerException at
line 125 of toString.java, but I think that's probably
a Kissme bug.


-------------------------------------------------------
Date: Mit 13.10.2004 at 10:48       By: Michael Koch <mkoch>
Hi,


I wrote the attached patch which fixes the problem when applied into jamvm. 
Unfortunately this is VM specific code ... We will have to chanhge this perhaps 
in the future.

Can you please test this patch with your testcase and report any results ? I 
have extended your testcase a bit to check for more cases too. With jamvm+patch 
this passes them all.






File Attachments
-------------------

-------------------------------------------------------
Date: Don 14.10.2004 at 16:00  Name: method.diff  Size: 2,19KB   By: mkoch
Fix for java.lang.reflect.Method.toString
http://savannah.gnu.org/bugs/download.php?item_id=10646&amp;item_file_id=1755

-------------------------------------------------------
Date: Mit 13.10.2004 at 10:48  Name: method.diff  Size: 2,21KB   By: mkoch
Fix for java.lang.reflect.Method.toString
http://savannah.gnu.org/bugs/download.php?item_id=10646&amp;item_file_id=1753






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10646>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]