mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull
This commit is contained in:
@@ -41,7 +41,7 @@ public class CompositeInputFilter implements InputFilter {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull final String text, final ConsoleViewContentType contentType) {
|
||||
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull final String text, @NotNull final ConsoleViewContentType contentType) {
|
||||
boolean dumb = myDumbService.isDumb();
|
||||
for (Pair<InputFilter, Boolean> pair : myFilters) {
|
||||
if (!dumb || pair.second == Boolean.TRUE) {
|
||||
@@ -66,7 +66,7 @@ public class CompositeInputFilter implements InputFilter {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, ConsoleViewContentType contentType) {
|
||||
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, @NotNull ConsoleViewContentType contentType) {
|
||||
if (!isBroken) {
|
||||
try {
|
||||
return filter.applyFilter(text, contentType);
|
||||
|
||||
@@ -30,6 +30,6 @@ public interface InputFilter {
|
||||
* @return <tt>null</tt>, if there was no match, otherwise, a list of pairs like ('string to use', 'content type to use')
|
||||
*/
|
||||
@Nullable
|
||||
List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, ConsoleViewContentType contentType);
|
||||
List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, @NotNull ConsoleViewContentType contentType);
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ public class PyEduConsoleInputFilterProvider implements ConsoleInputFilterProvid
|
||||
public InputFilter[] getDefaultFilters(@NotNull Project project) {
|
||||
return new InputFilter[]{new InputFilter() {
|
||||
@Override
|
||||
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, ConsoleViewContentType outputType) {
|
||||
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, @NotNull ConsoleViewContentType outputType) {
|
||||
if (outputType.equals(ConsoleViewContentType.SYSTEM_OUTPUT) && !text.contains("exit code")) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user