Skip to content

Commit

Permalink
Add test for protected base methods getting called on Java 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Apr 19, 2018
1 parent 7d7081c commit 86b956b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/java_integration/methods/dispatch_spec.rb
Expand Up @@ -293,3 +293,15 @@
end.not_to raise_error
end
end

if TestHelper::JAVA_9
describe "An overridden Java method" do
describe "with a non-public base implementation" do
it "is called using a public override" do
expect do
java.util.Properties.new.clone
end.not_to raise_error
end
end
end
end
1 change: 1 addition & 0 deletions test/jruby/test_helper.rb
Expand Up @@ -47,6 +47,7 @@ module TestHelper
IBM_JVM = RbConfig::CONFIG['host_vendor'] =~ /IBM Corporation/

JAVA_8 = ENV_JAVA['java.specification.version'] >= '1.8'
JAVA_9 = ENV_JAVA['java.specification.version'] > '1.8'

def q
WINDOWS ? '"' : '\''
Expand Down

0 comments on commit 86b956b

Please sign in to comment.