Skip to content

Commit

Permalink
Make lazily computed numbers in ClampedNumber transient
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderscoreTud committed May 17, 2024
1 parent 79301b7 commit 7481758
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ private static boolean isInteger(String string) {
public static class ClampedNumber extends Number {

private final Number number;
private Byte clampedByte;
private Short clampedShort;
private Integer clampedInt;
private Long clampedLong;
private transient Byte clampedByte;
private transient Short clampedShort;
private transient Integer clampedInt;
private transient Long clampedLong;

@Contract("null -> fail")
public ClampedNumber(Number number) {
Expand Down

0 comments on commit 7481758

Please sign in to comment.