Skip to content

Commit

Permalink
Run spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
d3jawu committed Jul 10, 2024
1 parent ad59738 commit 8defa4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static Object intersect(Object left, Object right, State state) {
Boolean leftEndLtRightEnd = LessEvaluator.less(leftEnd, rightEnd, state);

Object max;
if(leftStart == null || rightStart == null) {
if (leftStart == null || rightStart == null) {
// If either of the start points is null, the start point of the intersection is null because the
// boundary is unknown.
max = null;
Expand All @@ -72,7 +72,7 @@ public static Object intersect(Object left, Object right, State state) {
}

Object min;
if(leftEnd == null || rightEnd == null) {
if (leftEnd == null || rightEnd == null) {
min = null;
} else if (leftEndLtRightEnd == null && precision != null) {
min = ((BaseTemporal) leftEnd).getPrecision().toString().equals(precision) ? leftEnd : rightEnd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class Value {
* Set to (10<sup>28</sup> - 1) / 10<sup>8</sup>.
*/
public static final BigDecimal MAX_DECIMAL = new BigDecimal("99999999999999999999.99999999");

public static final Integer MIN_INT = Integer.MIN_VALUE;
public static final Long MIN_LONG = Long.MIN_VALUE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,19 @@ void all_value_literals_and_selectors() {
// define QuantityMax: 99999999999999999999.99999999 'mg'
value = results.forExpression("QuantityMax").value();
assertThat(value, instanceOf(Quantity.class));
assertThat(
((Quantity) value).getValue(),
comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getValue(), comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getUnit(), is("mg"));

// define QuantityPosMax: +99999999999999999999.99999999 'mg'
value = results.forExpression("QuantityPosMax").value();
assertThat(value, instanceOf(Quantity.class));
assertThat(
((Quantity) value).getValue(),
comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getValue(), comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getUnit(), is("mg"));

// define QuantityMin: -99999999999999999999.99999999 'mg'
value = results.forExpression("QuantityMin").value();
assertThat(value, instanceOf(Quantity.class));
assertThat(
((Quantity) value).getValue(),
comparesEqualTo(new BigDecimal("-99999999999999999999.99999999")));
assertThat(((Quantity) value).getValue(), comparesEqualTo(new BigDecimal("-99999999999999999999.99999999")));
assertThat(((Quantity) value).getUnit(), is("mg"));

value = results.forExpression("DecimalZero").value();
Expand Down

0 comments on commit 8defa4b

Please sign in to comment.