Skip to content

Commit d61f1dc

Browse files
committed
improved SSLSession to-java unwrapping -> allow provider class
... here mostly since we're not really exposing that much
1 parent 4a31659 commit d61f1dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/jruby/ext/openssl/SSLSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public IRubyObject set_timeout(final ThreadContext context, IRubyObject timeout)
170170

171171
@Override
172172
public Object toJava(Class target) {
173-
if ( javax.net.ssl.SSLSession.class.isAssignableFrom(target) ) {
174-
return sslSession();
173+
if ( javax.net.ssl.SSLSession.class == target || target.isInstance(sslSession) ) {
174+
return sslSession;
175175
}
176176
return super.toJava(target);
177177
}

0 commit comments

Comments
 (0)