mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
slowCheck: don't print the same trace twice in a row while shrinking
This commit is contained in:
@@ -45,6 +45,7 @@ class StatusNotifier {
|
||||
}
|
||||
|
||||
private int lastReportedStage = -1;
|
||||
private String lastReportedTrace = null;
|
||||
void shrinkAttempt(PropertyFailure<?> failure) {
|
||||
if (shouldPrint()) {
|
||||
int stage = failure.getMinimizationStageCount();
|
||||
@@ -58,7 +59,11 @@ class StatusNotifier {
|
||||
|
||||
Throwable exceptionCause = failure.getMinimalCounterexample().getExceptionCause();
|
||||
if (exceptionCause != null) {
|
||||
System.err.println(" Reason: " + shortenStackTrace(exceptionCause));
|
||||
String trace = shortenStackTrace(exceptionCause);
|
||||
if (!trace.equals(lastReportedTrace)) {
|
||||
lastReportedTrace = trace;
|
||||
System.err.println(" Reason: " + trace);
|
||||
}
|
||||
}
|
||||
System.err.println();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user