ADDITIONAL SYSTEM INFORMATION :
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
A DESCRIPTION OF THE PROBLEM :
The following program presents a null exception message after invoking 17 times a method with wrong number of arguments.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the program
2. Run it using Oracle HotSpot java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Always print "wrong number of arguments" message.
ACTUAL -
wrong number of arguments (x16)
null
---------- BEGIN SOURCE ----------
import java.lang.reflect.Method;
public class A {
public static void main(String[] args) throws NoSuchMethodException {
A a = new A();
for (int i = 0; i < 17; i++) {
Method method = A.class.getMethod("wait", long.class);
try {
method.invoke(a, 0, 1);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
}
---------- END SOURCE ----------
FREQUENCY : always