8144601: Premature assert in directive inline parsing
authorneliasso
Wed, 09 Dec 2015 13:41:04 +0100
changeset 35105 dd35f17e611d
parent 35104 8c21f17b63e0
child 35106 79f25c397652
8144601: Premature assert in directive inline parsing Summary: Break after first fail Reviewed-by: roland
hotspot/src/share/vm/compiler/directivesParser.cpp
--- a/hotspot/src/share/vm/compiler/directivesParser.cpp	Wed Dec 09 22:57:52 2015 +0100
+++ b/hotspot/src/share/vm/compiler/directivesParser.cpp	Wed Dec 09 13:41:04 2015 +0100
@@ -379,11 +379,12 @@
 
       const char* error_msg = NULL;
       if (current_directiveset == NULL) {
-        if (!current_directive->_c1_store->parse_and_add_inline(s, error_msg)) {
-          assert (error_msg != NULL, "Must have valid error message");
-          error(VALUE_ERROR, "Method pattern error: %s", error_msg);
-        }
-        if (!current_directive->_c2_store->parse_and_add_inline(s, error_msg)) {
+        if (current_directive->_c1_store->parse_and_add_inline(s, error_msg)) {
+          if (!current_directive->_c2_store->parse_and_add_inline(s, error_msg)) {
+            assert (error_msg != NULL, "Must have valid error message");
+            error(VALUE_ERROR, "Method pattern error: %s", error_msg);
+          }
+        } else {
           assert (error_msg != NULL, "Must have valid error message");
           error(VALUE_ERROR, "Method pattern error: %s", error_msg);
         }