mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
check text not-null (IDEA-CR-32979)
This commit is contained in:
+4
-2
@@ -351,7 +351,9 @@ public class CompositePrintable extends UserDataHolderBase implements Printable,
|
||||
else {
|
||||
ConsoleViewContentType contentType = contentTypeByNameMap.getOrDefault(firstToken, ConsoleViewContentType.NORMAL_OUTPUT);
|
||||
String text = IOUtil.readString(reader);
|
||||
printText(printer, text, contentType);
|
||||
if (text != null) {
|
||||
printText(printer, text, contentType);
|
||||
}
|
||||
}
|
||||
lineNum++;
|
||||
}
|
||||
@@ -373,7 +375,7 @@ public class CompositePrintable extends UserDataHolderBase implements Printable,
|
||||
}
|
||||
}
|
||||
|
||||
private void printText(Printer printer, String text, ConsoleViewContentType contentType) {
|
||||
private void printText(@NotNull Printer printer, @NotNull String text, @NotNull ConsoleViewContentType contentType) {
|
||||
if (ConsoleViewContentType.NORMAL_OUTPUT.equals(contentType)) {
|
||||
printer.printWithAnsiColoring(text, ProcessOutputTypes.STDOUT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user