Permalink
Browse files

Turn off InvokeDynamic on HotSpot 1.7 if < u14. Fixes #532.

  • Loading branch information...
BanzaiMan committed Feb 13, 2013
1 parent 330fef3 commit 3294b22763334969bc1cb536f376d13ba6ee5254
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/org/jruby/util/cli/Options.java
@@ -66,9 +66,9 @@ public static String dump() {
boolean hotspot24 = false;
String vmName = SafePropertyAccessor.getProperty("java.vm.name", "").toLowerCase();
- if (!vmName.equals("") &&
- (vmName.contains("hotspot") || vmName.toLowerCase().contains("openjdk"))) {
-
+ boolean isHotSpot = !vmName.equals("") &&
+ (vmName.contains("hotspot") || vmName.toLowerCase().contains("openjdk"));
+ if (isHotSpot) {
String vmVersionString = SafePropertyAccessor.getProperty("java.vm.version", "");
if (vmVersionString.equals("")) {
// can't get VM version for whatever reason, assume LCD.
@@ -94,6 +94,8 @@ public static String dump() {
if (hotspot24) {
INVOKEDYNAMIC_DEFAULT = true;
+ } else if (isHotSpot) {
+ INVOKEDYNAMIC_DEFAULT = false;
} else {
String javaVersion = SafePropertyAccessor.getProperty("java.specification.version", "");
if (!javaVersion.equals("") && new BigDecimal(javaVersion).compareTo(new BigDecimal("1.7")) >= 0){

0 comments on commit 3294b22

Please sign in to comment.