Blocks :
|
|
Duplicate :
|
|
Duplicate :
|
JVMS says: "If the value of the name_index item is zero, then this parameters element indicates a formal parameter with no name. " But j.l.r.Executable.getParameters() throw MalformedParameterExeption: Invalid parameter name "". This looks as if parameter had empty-string name. It is reproduced on Solaris with 8, 8u26, 9 and 9.0 and on Windows 7 with 8u20. Minimized test: ------------------------------------------------------------ public class Second { public static String method(int i){ return "in"; } public static void main(String[] args) throws NoSuchMethodException { Second.class.getMethod("method", int.class).getParameters(); } } ------------------------------------------------------------ After compilation (javac -parameters Second.java) MethodParameters attribute of "method" was changed from "0x0100110000;" to "0x0100000000;". Modified version is attached. The following JCK test will fail due to this bug: vm/classfmt/atr/atrmtp003/atrmtp00303m1/atrmtp00303m1.
|