When implementing a Java interface in JavaScript, this can no longer be used to reference the associated JavaScript object.
Example:
var supplier = new java.util.function.Supplier({
value: "Test",
supply: function() {
return this.value;
}
});
supplier.supply();
Rhino versions before 1.9.0 would return the string Test, but since 1.9.0, undefined is returned.
When implementing a Java interface in JavaScript,
thiscan no longer be used to reference the associated JavaScript object.Example:
Rhino versions before 1.9.0 would return the string
Test, but since 1.9.0,undefinedis returned.