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: Stephen Crawley
Subject: [commit-cp] [bugs #10646] java.lang.reflect.Method.toString() and array parameters, etc
Date: Thu, 14 Oct 2004 11:33:52 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

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

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

Changes by: 
                Stephen Crawley <address@hidden>
'Date: 
                Thu 10/14/2004 at 15:26 (Australia/Queensland)

------------------ Additional Follow-up Comments ----------------------------
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.







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

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

Category:  None
Severity:  5 - Average
Resolution:  None
Privacy:  Public
Assigned to:  mkoch
Status:  Open
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: Thu 10/14/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: Wed 10/13/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: Wed 10/13/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]