-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Description
There's a (minor) Java integration regression since 9.4.7.0 caused by 31f1ed6 (fix for #8156)
Environment Information
- JRuby version 9.4.8.0
Consider the sample script trying to utilize the "duck-typing" Java auto-interface impl feature:
class Run1
class << self
def run; puts self end
end
end
class Run2 < Run1; end
class Run3 < Run1; end
#java.lang.Thread.new(Run1).start
java.lang.Thread.new(Run2).start
java.lang.Thread.new(Run3).startThe script will print a Ruby constant initialization warning (will get printed the amount of times there are sub-classes since the impl proxy will be cached once per RubyClass):
impl_repro.rb:12: warning: already initialized constant org.jruby.gen::InterfaceImpl1353309827
The internal (interface implementation) proxy class ends up being stored in Ruby land, this did not happen previously.
p.s. There might be other Java proxy path worth checking, whether they end up eagerly setting their class proxy wrappers in Ruby land, effectively preventing garbage collection of such classes...
Reactions are currently unavailable