int (int line, @NotNull List<? extends StripTrailingSpacesFilter> filters) { for (StripTrailingSpacesFilter filter : filters) { if (filter instanceof SmartStripTrailingSpacesFilter) { return ((SmartStripTrailingSpacesFilter)filter).getTrailingSpacesToLeave(line); } else if (!filter.isStripSpacesAllowedForLine(line)) { return -1; } } return 0; }