The corresponding issue in upstream is: ISPN-6408
ISPN-6408 ClassCastException while executed javascript returns Integer to js-client