-
-
Notifications
You must be signed in to change notification settings - Fork 942
Description
.: Environment :.
jruby 9.2.11.1
.: Overview :.
It prevents access to the inherited methods of ObservableMapWrapper in the jrubyfx DSL. Hence, the method add_change_listener throws an Exception :
TypeError: illegal access on 'addListener': class org.jruby.javasupport.JavaMethod cannot access class com.sun.javafx.collections.ObservableMapWrapper (in module javafx.base) because module javafx.base does not export com.sun.javafx.collections to unnamed module @ABC0923
add_change_listener at uri:classloader:/jrubyfx/core_ext/observable_value.rb:121
.: Reproduction :.
x =Java::javafx.collections.FXCollections.observable_map({})
x.addListener Java::javafx.collections.MapChangeListener.impl{|a,b| puts "z"}
.: Small patch by Headius :.
In run configurations, add the line :
--add-exports javafx.base/com.sun.javafx.collections=ALL-UNNAMED
.: Note :.
observable_array_list.add_change_listener runs just fine, as it doesn't inherit from collections.