Skip to content

Commit

Permalink
style: spotless code format
Browse files Browse the repository at this point in the history
  • Loading branch information
FearfulTomcat27 committed Sep 4, 2024
1 parent b131eb8 commit 8e89974
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ private static void addCondition(Type condition1, Type condition2, Type result)
}

public static Optional<Type> checkConditions(List<? extends Type> argumentTypes) {
return Optional.ofNullable(CONDITION_MAP
return Optional.ofNullable(
CONDITION_MAP
.getOrDefault(argumentTypes.get(0), Collections.emptyMap())
.getOrDefault(argumentTypes.get(1), null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ private static void addCondition(Type condition1, Type condition2, Type result)
}

public static Optional<Type> checkConditions(List<? extends Type> argumentTypes) {
return Optional.ofNullable(CONDITION_MAP
return Optional.ofNullable(
CONDITION_MAP
.getOrDefault(argumentTypes.get(0), Collections.emptyMap())
.getOrDefault(argumentTypes.get(1), null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ private static void addCondition(Type condition1, Type condition2, Type result)
}

public static Optional<Type> checkConditions(List<? extends Type> argumentTypes) {
return Optional.ofNullable(CONDITION_MAP
return Optional.ofNullable(
CONDITION_MAP
.getOrDefault(argumentTypes.get(0), Collections.emptyMap())
.getOrDefault(argumentTypes.get(1), null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ private static void addCondition(Type condition1, Type condition2, Type result)
}

public static Optional<Type> checkConditions(List<? extends Type> argumentTypes) {
return Optional.ofNullable(CONDITION_MAP
return Optional.ofNullable(
CONDITION_MAP
.getOrDefault(argumentTypes.get(0), Collections.emptyMap())
.getOrDefault(argumentTypes.get(1), null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public Type getOperatorReturnType(OperatorType operatorType, List<? extends Type
switch (operatorType) {
case ADD:
if (!isTwoTypeCalculable(argumentTypes)
|| AdditionResolver.checkConditions(argumentTypes).isPresent()) {
|| !AdditionResolver.checkConditions(argumentTypes).isPresent()) {
throw new OperatorNotFoundException(
operatorType,
argumentTypes,
Expand Down

0 comments on commit 8e89974

Please sign in to comment.