Skip to content

Commit

Permalink
Merge pull request #6298 from headius/non_exported_9.2
Browse files Browse the repository at this point in the history
Do not bind methods from classes that are not exported
  • Loading branch information
headius committed Jun 25, 2020
2 parents 48f444c + 4d3dc98 commit 03dea6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

jar 'me.qmx.jitescript:jitescript:0.4.1', :exclusions => ['org.ow2.asm:asm-all']

jar 'com.headius:backport9:1.7'
jar 'com.headius:backport9:1.8'

jar 'javax.annotation:javax.annotation-api:1.3.1', scope: 'compile'

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.headius</groupId>
<artifactId>backport9</artifactId>
<version>1.7</version>
<version>1.8</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jruby.javasupport.binding;

import com.headius.backport9.modules.Modules;
import org.jruby.Ruby;
import org.jruby.RubyModule;
import org.jruby.internal.runtime.methods.JavaMethod;
Expand Down Expand Up @@ -166,7 +167,7 @@ public static void eachAccessibleMethod(final Class<?> javaClass, Predicate<Meth
// same name+signature as subclass methods (see JRUBY-3130)
for ( Class<?> klass = javaClass; klass != null; klass = klass.getSuperclass() ) {
// only add class's methods if it's public (JIRA issue JRUBY-4799)
if (Modifier.isPublic(klass.getModifiers())) {
if (Modifier.isPublic(klass.getModifiers()) && Modules.isExported(klass, Java.class)) {
// for each class, scan declared methods for new signatures
try {
// add methods, including static if this is the actual class,
Expand Down

0 comments on commit 03dea6f

Please sign in to comment.