-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b112
-
generic
-
generic
Nashorn converts JS functions to SAM types automatically when passing to Java methods. SAM adapter converters normally use adapters defined in the protection domain of the scripts calling them. The calling script's class is available as internal Dynalink information in context of a linking operation. In certain circumstances, when conversion operations are executed at invocation time instead of link time however, the calling script information is not available, and such SAM adapters are then conservatively created with a no-permission domain.
These circumstances include:
- explicit invocation of Java.to with a target array type that has a SAM type as its component
- invocation of Java methods with invocation time (instead of link time) dispatch: setters with dynamic name and some overloaded methods.
These circumstances include:
- explicit invocation of Java.to with a target array type that has a SAM type as its component
- invocation of Java methods with invocation time (instead of link time) dispatch: setters with dynamic name and some overloaded methods.