File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1737,6 +1737,29 @@ def test_indexed_bean_style_accessors_are_not_aliased
17371737 end
17381738 end
17391739
1740+ def test_no_warnings_on_interface_impls_being_set_as_constants
1741+ runner_base = Class . new do
1742+ class << self
1743+ def run ; self != self end
1744+ end
1745+ end
1746+
1747+ runner_impl1 = Class . new ( runner_base )
1748+ runner_impl2 = Class . new ( runner_base )
1749+ runner_impl3 = Class . new ( runner_base )
1750+
1751+ output = with_stderr_captured do
1752+ threads = [ ]
1753+ threads << java . lang . Thread . new ( runner_impl1 )
1754+ threads << java . lang . Thread . new ( runner_impl2 )
1755+ threads << java . lang . Thread . new ( runner_impl3 )
1756+ threads . each ( &:start )
1757+ threads . each ( &:join )
1758+ end
1759+ # expect no warning: already initialized constant org.jruby.gen::InterfaceImpl1353309827
1760+ refute output . index ( 'already initialized constant' ) , output
1761+ end
1762+
17401763 def test_no_warnings_on_concurrent_package_const_initialization
17411764 output = with_stderr_captured do
17421765 threads = ( 0 ..10 ) . map do # smt not yet initialized :
You can’t perform that action at this time.
0 commit comments