Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,7 @@ fn get_xml_attribute<R: BufRead>(
return Ok(a.decode_and_unescape_value(reader.decoder())?.into_owned());
}
}
Err(ParserError::InvalidRecord(format!(
"Attribute {} not found",
name
)))
return Ok(String::new());
}

fn parse_jacoco_report_sourcefile<T: BufRead>(
Expand Down Expand Up @@ -716,7 +713,11 @@ fn parse_jacoco_report_class<T: BufRead>(
let name = get_xml_attribute(parser, e, "name")?;
let full_name = format!("{}#{}", class_name, name);

let start_line = get_xml_attribute(parser, e, "line")?.parse::<u32>()?;
let line = get_xml_attribute(parser, e, "line")?;
if line.is_empty() {
break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should throw an error if we're Java?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And continue instead of break?

}
let start_line = line.parse::<u32>()?;
let function = parse_jacoco_report_method(parser, buf, start_line)?;
functions.insert(full_name, function);
}
Expand Down
Loading