-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
8u40
-
b04
-
generic
-
generic
When running the avatar.js test test/simple/test-pump-file2tcp.js with 8u40 b04, this error is reported -
Exception in thread "main" java.lang.IllegalArgumentException: Argument is not an array
at java.lang.reflect.Array.getLength(Native Method)
at jdk.nashorn.internal.runtime.RewriteException.toObjectArray(RewriteException.java:246)
at jdk.nashorn.internal.scripts.Script$Recompilation$833$6AAA$util$cu2$restOf.L:1$deprecate$deprecated(jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/util.js:0)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
at jdk.nashorn.internal.scripts.Script$Recompilation$822$3A$test_pump_file2tcp$cu2$restOf.L:1$server(file:/home/akhil/ws/avatar-js/test/simple/test-pump-file2tcp.js:34)
One error is that the line number in util.js is reported as zero. The actual line number in util.js where this occurs is 77 -
return fn.apply(this, arguments);
Adding the following diagnostic statement just before apply prints an unexpected error -
print('applying '+fn+' args '+JSON.stringify(arguments));
Exception in thread "main" TypeError: JSON.stringify got a cyclic data structure
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/util.js:77)
at <anonymous> (file:/home/akhil/ws/avatar-js/test/simple/test-pump-file2tcp.js:34)
Adding this statement, however, causes the test to pass
print('applying args '+(typeof arguments));
Merely calling typeof on arguments causes this test to pass.
Exception in thread "main" java.lang.IllegalArgumentException: Argument is not an array
at java.lang.reflect.Array.getLength(Native Method)
at jdk.nashorn.internal.runtime.RewriteException.toObjectArray(RewriteException.java:246)
at jdk.nashorn.internal.scripts.Script$Recompilation$833$6AAA$util$cu2$restOf.L:1$deprecate$deprecated(jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/util.js:0)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:636)
at jdk.nashorn.internal.scripts.Script$Recompilation$822$3A$test_pump_file2tcp$cu2$restOf.L:1$server(file:/home/akhil/ws/avatar-js/test/simple/test-pump-file2tcp.js:34)
One error is that the line number in util.js is reported as zero. The actual line number in util.js where this occurs is 77 -
return fn.apply(this, arguments);
Adding the following diagnostic statement just before apply prints an unexpected error -
print('applying '+fn+' args '+JSON.stringify(arguments));
Exception in thread "main" TypeError: JSON.stringify got a cyclic data structure
at <anonymous> (jar:file:/home/akhil/ws/avatar-js/dist/avatar-js.jar!/lib/util.js:77)
at <anonymous> (file:/home/akhil/ws/avatar-js/test/simple/test-pump-file2tcp.js:34)
Adding this statement, however, causes the test to pass
print('applying args '+(typeof arguments));
Merely calling typeof on arguments causes this test to pass.