changeset 9771:2ff83324fd00

8144601: Premature assert in directive inline parsing Summary: Break after first fail Reviewed-by: roland
author neliasso
date Wed, 09 Dec 2015 13:41:04 +0100
parents ad7980cca539
children a6eb7b850dbd
files src/share/vm/compiler/directivesParser.cpp
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/compiler/directivesParser.cpp	Wed Dec 09 22:57:52 2015 +0100
+++ b/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);
         }