Skip to content

Commit

Permalink
refactor(schema): declarative operations
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperolsson-se committed May 7, 2024
1 parent 12ab64a commit 4f875eb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/main/java/org/schemaspy/DbAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
package org.schemaspy;

import java.util.stream.StreamSupport;
import org.schemaspy.model.*;
import org.schemaspy.util.Filtered;
import org.schemaspy.util.Inflection;
Expand Down Expand Up @@ -309,13 +310,10 @@ public static List<String> getPopulatedSchemas(
)
);

final Set<String> schemas = new TreeSet<>(); // alpha sorted

for (String schema : populated) {
schemas.add(schema);
}

return new ArrayList<>(schemas);
return StreamSupport.stream(populated.spliterator(), false)
.distinct()
.sorted()
.toList();
}

public static boolean hasTables(
Expand Down

0 comments on commit 4f875eb

Please sign in to comment.