Skip to content

Commit ac505ea

Browse files
committed
Remove null check
1 parent c431a70 commit ac505ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/main/java/com/diffplug/spotless/rome/RomeStep.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,14 @@ private String format(ProcessRunner runner, String input, File file) throws IOEx
431431
}
432432
var runnerResult = runner.exec(stdin, args);
433433
var stdErr = runnerResult.stdErrUtf8();
434-
if (stdErr != null && !stdErr.isEmpty()) {
434+
if (!stdErr.isEmpty()) {
435435
logger.warn("Biome stderr ouptut for file '{}'\n{}", file, stdErr.trim());
436436
}
437437
var formatted = runnerResult.assertExitZero(StandardCharsets.UTF_8);
438438
// When biome encounters an ignored file, it does not output any formatted code
439439
// Ignored files come from (a) the biome.json configuration file and (b) from
440440
// a list of hard-coded file names, such as package.json or tsconfig.json.
441-
if (formatted == null || formatted.isEmpty()) {
441+
if (formatted.isEmpty()) {
442442
return input;
443443
} else {
444444
return formatted;

0 commit comments

Comments
 (0)