Skip to content

Commit 59fecb2

Browse files
committed
Merge pull request #81 from donv/patch-1
Recognize Android java.version
2 parents 3c3250a + 00dbb23 commit 59fecb2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,13 @@ static void warn(final ThreadContext context, final IRubyObject msg) {
234234
}
235235

236236
private static String javaVersion(final String def) {
237-
return SafePropertyAccessor.getProperty("java.version", def);
237+
final String javaVersionProperty =
238+
SafePropertyAccessor.getProperty("java.version", def);
239+
if (javaVersionProperty == "0") { // Android
240+
return "1.7.0";
241+
} else {
242+
return javaVersionProperty;
243+
}
238244
}
239245

240246
static boolean javaVersion7(final boolean atLeast) {

0 commit comments

Comments
 (0)