Skip to content

Commit f83c244

Browse files
committed
[refactor] don't work-around for JRuby 1.6 with setting byte-list shared
1 parent ec307fa commit f83c244

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,8 @@ static RubyString newString(final Ruby runtime, final byte[] bytes, final int co
6262
}
6363

6464
static ByteList setByteListShared(final RubyString str) {
65-
try {
66-
str.setByteListShared();
67-
return str.getByteList();
68-
}
69-
catch (NoSuchMethodError err) { // JRuby 1.6
70-
RubyString dup = (RubyString) str.dup();
71-
return dup.getByteList();
72-
}
65+
str.setByteListShared();
66+
return str.getByteList();
7367
}
7468

7569
static RubyString newUTF8String(final Ruby runtime, final ByteList bytes) {

0 commit comments

Comments
 (0)