Description of problem: If I try to convert instance of java.lang.Boolean class to javascript Boolean type I am getting invalid value, see example: var my = java.lang.Boolean.FALSE; var myjs = Boolean(my); myjs; // is TRUE!!! Version-Release number of selected component (if applicable): 4.5.0-master
This is a consequence of javascript's rules of Boolean conversion - http://www.w3schools.com/js/js_obj_boolean.asp. Because the variable "my" is an object (not a raw boolean value) and it is not null, javascript initializes the myjs variable to true, just as it should according to the rules outlined in the above link. I think this works as expected, even though it is confusing. If you had: var my = java.lang.Boolean.FALSE.booleanValue(); the rest of the code would have worked as expected.