src/share/vm/services/diagnosticFramework.cpp
Print this page
rev 3087 : 7141252: Diagnostic Framework Default parser fixes
*** 59,69 ****
}
bool DCmdArgIter::next(TRAPS) {
if (_len == 0) return false;
// skipping spaces
! while (_cursor < _len - 1 && isspace(_buffer[_cursor])) {
_cursor++;
}
// handling end of command line
if (_cursor >= _len - 1) {
_cursor = _len - 1;
--- 59,69 ----
}
bool DCmdArgIter::next(TRAPS) {
if (_len == 0) return false;
// skipping spaces
! while (_cursor < _len - 1 && _buffer[_cursor] == _delim) {
_cursor++;
}
// handling end of command line
if (_cursor >= _len - 1) {
_cursor = _len - 1;
*** 71,82 ****
--- 71,88 ----
_key_len = 0;
_value_addr = &_buffer[_len - 1];
_value_len = 0;
return false;
}
+
+ if (_buffer[_cursor] == _delim) {
+ _cursor++;
+ }
+
// extracting first item, argument or option name
_key_addr = &_buffer[_cursor];
+
while (_cursor <= _len - 1 && _buffer[_cursor] != '=' && _buffer[_cursor] != _delim) {
// argument can be surrounded by single or double quotes
if (_buffer[_cursor] == '\"' || _buffer[_cursor] == '\'') {
_key_addr++;
char quote = _buffer[_cursor];