Skip to content

Commit

Permalink
Fix empty statements in database
Browse files Browse the repository at this point in the history
  • Loading branch information
solaluset committed Dec 29, 2024
1 parent 9475e49 commit 7eec392
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ protected Database(@NotNull HuskSync plugin) {
@SuppressWarnings("SameParameterValue")
@NotNull
protected final String[] getSchemaStatements(@NotNull String schemaFileName) throws IOException {
return formatStatementTables(new String(Objects.requireNonNull(plugin.getResource(schemaFileName))
.readAllBytes(), StandardCharsets.UTF_8)).split(";");
return Arrays.stream(formatStatementTables(new String(Objects.requireNonNull(plugin.getResource(schemaFileName))
.readAllBytes(), StandardCharsets.UTF_8)).split(";")).filter(s -> !s.isBlank()).toArray(String[]::new);
}

/**
Expand Down

0 comments on commit 7eec392

Please sign in to comment.