Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ public ScriptSql build() {
}
}

if (tables.size() != 0) {
if (!tables.isEmpty()) {
ret.add("table");
ret.add(String.join(",", tables));
}
if (schemas.size() != 0) {
if (!schemas.isEmpty()) {
ret.add("schema");
ret.add(String.join(",", schemas));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public LogContextImpl(
Supplier<SormLogger> loggerSupplier, Set<LogContext.Category> enabledCategories) {
this.loggerSupplier = loggerSupplier != null ? loggerSupplier : getDefaultLoggerSupplier();
this.enabledCategories =
enabledCategories.size() == 0 ? Collections.emptySet() : EnumSet.copyOf(enabledCategories);
enabledCategories.isEmpty() ? Collections.emptySet() : EnumSet.copyOf(enabledCategories);
}

public static Supplier<SormLogger> getDefaultLoggerSupplier() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ private static String createPrimaryKeyConstraint(String[] primaryKeys) {
}

private static String createUniqueConstraint(List<String[]> uniqueColumnPairs) {
return (uniqueColumnPairs == null || uniqueColumnPairs.size() == 0)
return (uniqueColumnPairs == null || uniqueColumnPairs.isEmpty())
? ""
: ", "
+ String.join(
Expand All @@ -324,7 +324,7 @@ private static String createUniqueConstraint(List<String[]> uniqueColumnPairs) {
}

private static String createCheckConstraint(List<String> checkConditions) {
return (checkConditions == null || checkConditions.size() == 0)
return (checkConditions == null || checkConditions.isEmpty())
? ""
: ", "
+ String.join(
Expand Down