8144601: Premature assert in directive inline parsing
Summary: Break after first fail
Reviewed-by: roland
--- 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);
}