JDK-4023101 : Class.getMethod()/getDeclaredMethod() doesn't find non-ASCII method name
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 1.1
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1996-12-20
  • Updated: 2012-09-28
  • Resolved: 1997-10-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.1 1.1fcsFixed
Related Reports
Relates :  
Relates :  
Description
masayoshi.okutsu@Eng 1996-12-20
A method name in non-ASCII characters cannot be found using
Class.getMethod() or Class.getDeclaredMethod().

To reproduce, run the following:

Source program:

	import java.lang.reflect.*;

	public class methodmini{
	//
	    public static void main(String[] args){
	        Method      method;
	        testMethod  testmethod = new testMethod();
	        Class       c = testmethod.getClass();
	        String      methodName = "\u30c6\u30b9\u30c8";
	        Class[]     parameterList = null;
	//
	//  getMethod()
	//
	        try{
	            method = c.getMethod(methodName,parameterList);
	        }
	        catch(NoSuchMethodException e){ e.printStackTrace(); }
	        catch(SecurityException e){ e.printStackTrace(); }
	//
	//  getDeclaredMethod()
	//
	        try{
	            method = c.getDeclaredMethod(methodName,parameterList);
	        }
	        catch(NoSuchMethodException e){ e.printStackTrace(); }
	        catch(SecurityException e){ e.printStackTrace(); }
	    }
	}

	//
	//  class testMethod
	//
	class testMethod{
	    public testMethod(){}
	    public static void \u30c6\u30b9\u30c8(){}
	}

Execution:

	% java methodmini
	java.lang.NoSuchMethodException
	        at java.lang.Class.getMethod(Class.java)
	        at methodmini.main(methodmini.java:15)
	java.lang.NoSuchMethodException
	        at java.lang.Class.getDeclaredMethod(Class.java)
	        at methodmini.main(methodmini.java:23)

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.1fcs INTEGRATED IN: 1.1fcs
14-06-2004

EVALUATION [saraiya 1/21/97] Fixed along with 4023100 -- see that bug report for more information.
11-06-2004

WORK AROUND
11-06-2004

SUGGESTED FIX
11-06-2004

PUBLIC COMMENTS Class.getMethod()/getDeclaredMethod() doesn't find a non-ASCII method name.
10-06-2004