Skip to content

Commit 853fb80

Browse files
committed
fix Jackson trying to deserialize the new ScaledBigDecimal is\w+ methods
1 parent f315fbe commit 853fb80

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/main/java/it/aboutbits/springboot/toolbox/type/ScaledBigDecimal.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package it.aboutbits.springboot.toolbox.type;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnore;
34
import org.jspecify.annotations.NullMarked;
45

56
import java.math.BigDecimal;
@@ -275,42 +276,52 @@ public short shortValue() {
275276
return (short) intValue();
276277
}
277278

279+
@JsonIgnore
278280
public boolean isZero() {
279281
return this.value().compareTo(BigDecimal.ZERO) == 0;
280282
}
281283

284+
@JsonIgnore
282285
public boolean isNegative() {
283286
return this.value().compareTo(BigDecimal.ZERO) < 0;
284287
}
285288

289+
@JsonIgnore
286290
public boolean isPositive() {
287291
return this.value().compareTo(BigDecimal.ZERO) > 0;
288292
}
289293

294+
@JsonIgnore
290295
public boolean isPositiveOrZero() {
291296
return this.value().compareTo(BigDecimal.ZERO) >= 0;
292297
}
293298

299+
@JsonIgnore
294300
public boolean isNegativeOrZero() {
295301
return this.value().compareTo(BigDecimal.ZERO) <= 0;
296302
}
297303

304+
@JsonIgnore
298305
public boolean isEqual(ScaledBigDecimal other) {
299306
return this.compareTo(other) == 0;
300307
}
301308

309+
@JsonIgnore
302310
public boolean isBiggerThan(ScaledBigDecimal other) {
303311
return this.compareTo(other) > 0;
304312
}
305313

314+
@JsonIgnore
306315
public boolean isEqualOrBiggerThan(ScaledBigDecimal other) {
307316
return this.compareTo(other) >= 0;
308317
}
309318

319+
@JsonIgnore
310320
public boolean isSmallerThan(ScaledBigDecimal other) {
311321
return this.compareTo(other) < 0;
312322
}
313323

324+
@JsonIgnore
314325
public boolean isEqualOrSmallerThan(ScaledBigDecimal other) {
315326
return this.compareTo(other) <= 0;
316327
}

0 commit comments

Comments
 (0)