The following code snippet fails. When providing a (Class[])null, an error will be reported:
java.lang.NullPointerException:TypeError: Cannot read property 'length' of null
When passing an empty Class array, it works.
@Compare
public boolean emptyArrayClass() {
Class[] empty = new Class[0];
Class klass = DummyClass.class;
int a = 0;
try {
klass.getMethod("getInstance", (Class[])null);
// klass.getMethod("getInstance", empty); // uncomment to make it work
a = 1;
} catch (NoSuchMethodException ex) {
Logger.getLogger(JFXIssuesTest.class.getName()).log(Level.SEVERE, null, ex);
} catch (SecurityException ex) {
Logger.getLogger(JFXIssuesTest.class.getName()).log(Level.SEVERE, null, ex);
}
return (a == 0);
}
The following code snippet fails. When providing a (Class[])null, an error will be reported:
java.lang.NullPointerException:TypeError: Cannot read property 'length' of null
When passing an empty Class array, it works.