aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-19 19:07:43 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-19 19:07:43 +0200
commite0beca715b293357d2907977f90e310731353f80 (patch)
tree16b00d37679afe3c3611095e76f1c1c8a0730ff2 /subprojects
parentrefactor(logic): non-null aggregators (diff)
downloadrefinery-e0beca715b293357d2907977f90e310731353f80.tar.gz
refinery-e0beca715b293357d2907977f90e310731353f80.tar.zst
refinery-e0beca715b293357d2907977f90e310731353f80.zip
refactor(logic): fix Sonar error
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java
index d2cc23f9..50030e9e 100644
--- a/subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java
+++ b/subprojects/logic/src/main/java/tools/refinery/logic/literal/AggregationLiteral.java
@@ -78,8 +78,7 @@ public class AggregationLiteral<R, T> extends AbstractCallLiteral {
78 return switch (reduction) { 78 return switch (reduction) {
79 case ALWAYS_FALSE -> { 79 case ALWAYS_FALSE -> {
80 var emptyValue = aggregator.getEmptyResult(); 80 var emptyValue = aggregator.getEmptyResult();
81 yield emptyValue == null ? BooleanLiteral.FALSE : 81 yield resultVariable.assign(new ConstantTerm<>(resultVariable.getType(), emptyValue));
82 resultVariable.assign(new ConstantTerm<>(resultVariable.getType(), emptyValue));
83 } 82 }
84 case ALWAYS_TRUE -> throw new InvalidQueryException("Trying to aggregate over an infinite set"); 83 case ALWAYS_TRUE -> throw new InvalidQueryException("Trying to aggregate over an infinite set");
85 case NOT_REDUCIBLE -> this; 84 case NOT_REDUCIBLE -> this;