@@ -1119,18 +1119,7 @@ bool Arguments::process_argument(const char* arg,
1119
1119
if (found_flag != nullptr ) {
1120
1120
char locked_message_buf[BUFLEN];
1121
1121
JVMFlag::MsgType msg_type = found_flag->get_locked_message (locked_message_buf, BUFLEN);
1122
- if (strlen (locked_message_buf) == 0 ) {
1123
- if (found_flag->is_bool () && !has_plus_minus) {
1124
- jio_fprintf (defaultStream::error_stream (),
1125
- " Missing +/- setting for VM option '%s'\n " , argname);
1126
- } else if (!found_flag->is_bool () && has_plus_minus) {
1127
- jio_fprintf (defaultStream::error_stream (),
1128
- " Unexpected +/- setting in VM option '%s'\n " , argname);
1129
- } else {
1130
- jio_fprintf (defaultStream::error_stream (),
1131
- " Improperly specified VM option '%s'\n " , argname);
1132
- }
1133
- } else {
1122
+ if (strlen (locked_message_buf) != 0 ) {
1134
1123
#ifdef PRODUCT
1135
1124
bool mismatched = ((msg_type == JVMFlag::NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD) ||
1136
1125
(msg_type == JVMFlag::DEVELOPER_FLAG_BUT_PRODUCT_BUILD));
@@ -1140,6 +1129,16 @@ bool Arguments::process_argument(const char* arg,
1140
1129
#endif
1141
1130
jio_fprintf (defaultStream::error_stream (), " %s" , locked_message_buf);
1142
1131
}
1132
+ if (found_flag->is_bool () && !has_plus_minus) {
1133
+ jio_fprintf (defaultStream::error_stream (),
1134
+ " Missing +/- setting for VM option '%s'\n " , argname);
1135
+ } else if (!found_flag->is_bool () && has_plus_minus) {
1136
+ jio_fprintf (defaultStream::error_stream (),
1137
+ " Unexpected +/- setting in VM option '%s'\n " , argname);
1138
+ } else {
1139
+ jio_fprintf (defaultStream::error_stream (),
1140
+ " Improperly specified VM option '%s'\n " , argname);
1141
+ }
1143
1142
} else {
1144
1143
if (ignore_unrecognized) {
1145
1144
return true ;
0 commit comments