Skip to content

Commit c154eab

Browse files
committed
Remove unnecessary if statements
1 parent 8ce5b5b commit c154eab

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/org/mybatis/dynamic/sql/SqlBuilder.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ static <T> IsInWithSubselect<T> isIn(Buildable<SelectModel> selectModelBuilder)
769769

770770
@SafeVarargs
771771
static <T> IsInWhenPresent<T> isInWhenPresent(T... values) {
772-
return values == null ? IsInWhenPresent.empty() : IsInWhenPresent.of(values);
772+
return IsInWhenPresent.of(values);
773773
}
774774

775775
static <T> IsInWhenPresent<T> isInWhenPresent(Collection<T> values) {
@@ -791,7 +791,7 @@ static <T> IsNotInWithSubselect<T> isNotIn(Buildable<SelectModel> selectModelBui
791791

792792
@SafeVarargs
793793
static <T> IsNotInWhenPresent<T> isNotInWhenPresent(T... values) {
794-
return values == null ? IsNotInWhenPresent.empty() : IsNotInWhenPresent.of(values);
794+
return IsNotInWhenPresent.of(values);
795795
}
796796

797797
static <T> IsNotInWhenPresent<T> isNotInWhenPresent(Collection<T> values) {
@@ -914,7 +914,7 @@ static IsInCaseInsensitive isInCaseInsensitive(Collection<String> values) {
914914
}
915915

916916
static IsInCaseInsensitiveWhenPresent isInCaseInsensitiveWhenPresent(String... values) {
917-
return values == null ? IsInCaseInsensitiveWhenPresent.empty() : IsInCaseInsensitiveWhenPresent.of(values);
917+
return IsInCaseInsensitiveWhenPresent.of(values);
918918
}
919919

920920
static IsInCaseInsensitiveWhenPresent isInCaseInsensitiveWhenPresent(Collection<String> values) {
@@ -930,8 +930,7 @@ static IsNotInCaseInsensitive isNotInCaseInsensitive(Collection<String> values)
930930
}
931931

932932
static IsNotInCaseInsensitiveWhenPresent isNotInCaseInsensitiveWhenPresent(String... values) {
933-
return values == null ? IsNotInCaseInsensitiveWhenPresent.empty() :
934-
IsNotInCaseInsensitiveWhenPresent.of(values);
933+
return IsNotInCaseInsensitiveWhenPresent.of(values);
935934
}
936935

937936
static IsNotInCaseInsensitiveWhenPresent isNotInCaseInsensitiveWhenPresent(Collection<String> values) {

0 commit comments

Comments
 (0)