diff src/share/vm/jvmci/jvmciCompiler.cpp @ 22779:b41377216cf9

JVMCICompiler.compileMethod should always return non-null
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 19 Jan 2016 13:32:31 -0800
parents 1fbfcc0334d3
children f41d4011035d
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciCompiler.cpp	Tue Jan 19 11:07:20 2016 -0800
+++ b/src/share/vm/jvmci/jvmciCompiler.cpp	Tue Jan 19 13:32:31 2016 -0800
@@ -166,7 +166,7 @@
     if (result_object != NULL) {
       oop failure_message = CompilationRequestResult::failureMessage(result_object);
       if (failure_message != NULL) {
-        const char* failure_reason = failure_message != NULL ? java_lang_String::as_utf8_string(failure_message) : "unknown reason";
+        const char* failure_reason = java_lang_String::as_utf8_string(failure_message);
         env->set_failure(failure_reason, CompilationRequestResult::retry(result_object));
       } else {
         if (env->task()->code() == NULL) {
@@ -176,6 +176,8 @@
           _methodsCompiled++;
         }
       }
+    } else {
+      assert(false, "JVMCICompiler.compileMethod should always return non-null");
     }
   }
 }