-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b82
-
generic
-
generic
The following scripts result in crash:
var cl = new java.lang.ClassLoader(null); // -> NPE
var cl = new java.lang.ClassLoader(undefined); //-> ClassCastException
var r = new java.lang.Runnable(null); // RuntimeException that tells can't find correct constructor!
var r = new java.lang.Runnable(undefined); // same as above.
It'd be better if we uniformly throw TypeError for these cases - that tells the passed object is not a script "Object".
var cl = new java.lang.ClassLoader(null); // -> NPE
var cl = new java.lang.ClassLoader(undefined); //-> ClassCastException
var r = new java.lang.Runnable(null); // RuntimeException that tells can't find correct constructor!
var r = new java.lang.Runnable(undefined); // same as above.
It'd be better if we uniformly throw TypeError for these cases - that tells the passed object is not a script "Object".