Support #2416 Enable HMCL to analyze crash reasons from latest.log (#2433)

* Support analyze crash reasons from latest.log

* Fix
This commit is contained in:
Burning_TNT
2023-08-11 15:14:20 +08:00
committed by GitHub
parent edcdeaf018
commit fe622579cf
3 changed files with 63 additions and 21 deletions

View File

@@ -38,7 +38,7 @@ public class CrashReportAnalyzerTest {
return IOUtils.readFullyAsString(is);
}
private CrashReportAnalyzer.Result findResultByRule(List<CrashReportAnalyzer.Result> results, CrashReportAnalyzer.Rule rule) {
private CrashReportAnalyzer.Result findResultByRule(Set<CrashReportAnalyzer.Result> results, CrashReportAnalyzer.Rule rule) {
CrashReportAnalyzer.Result r = results.stream().filter(result -> result.getRule() == rule).findFirst().orElse(null);
assertNotNull(r);
return r;