Skip to content

Commit

Permalink
using stream rather removeIf
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexuany committed Aug 22, 2019
1 parent fdb938e commit f8c7bfe
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public List<TiTableInfo> listTables(TiDBInfo db) {
tableMap = loadTables(db);
}
Collection<TiTableInfo> tables = tableMap.values();
tables.removeIf(TiTableInfo::isView);
return ImmutableList.copyOf(tables);
return tables.stream().filter(TiTableInfo::isView).collect(Collectors.toList());
}

public TiTableInfo getTable(TiDBInfo db, String tableName) {
Expand Down

0 comments on commit f8c7bfe

Please sign in to comment.