Skip to content

Commit a8dcdb6

Browse files
committed
Minor fixup.
1 parent ffc7919 commit a8dcdb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/main/java/com/diffplug/spotless/Formatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void legacyErrorBehavior(Formatter formatter, File file, ValuePerStep<Thr
141141
for (int i = 0; i < formatter.getSteps().size(); ++i) {
142142
Throwable exception = exceptionPerStep.get(i);
143143
if (exception != null && exception != LintState.formatStepCausedNoChange()) {
144-
logger.error("Step '{}' found problem in '{}':\n{}", formatter.getSteps().get(i), file.getName(), exception.getMessage(), exception);
144+
logger.error("Step '{}' found problem in '{}':\n{}", formatter.getSteps().get(i).getName(), file.getName(), exception.getMessage(), exception);
145145
throw ThrowingEx.asRuntimeRethrowError(exception);
146146
}
147147
}

lib/src/main/java/com/diffplug/spotless/LintState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public LinkedHashMap<String, List<Lint>> getLintsByStep(Formatter formatter) {
5555
}
5656
LinkedHashMap<String, List<Lint>> result = new LinkedHashMap<>();
5757
for (int i = 0; i < lintsPerStep.size(); i++) {
58-
FormatterStep step = formatter.getSteps().get(i);
5958
List<Lint> lints = lintsPerStep.get(i);
6059
if (lints != null) {
60+
FormatterStep step = formatter.getSteps().get(i);
6161
result.put(step.getName(), lints);
6262
}
6363
}

0 commit comments

Comments
 (0)