Closed batiati closed 2 years ago
Thank you @eatonphil for the comments.
Yes, signed types in Java are restrictive, in some places I had to use an int
to represent a u16
validating the correct range. I'm not sure about the ergonomics of using BigInteger for debit/credit/amount, but it avoids footguns dealing with negative values and follows the same JDBC standard for DECIMAL.
Another point is the lack of a u128 type in Java. The UUID class was the closest thing that can be created and reinterpreted as a pair of long values, but I agree the name UUID is a bit misleading. As an alternative, we could create our own UInt128 class, something like that: https://github.com/PlatformLab/TorcDB/blob/master/src/main/java/net/ellitron/torc/util/UInt128.java
@eatonphil I'm going to submit another PR updating the javadocs once you merge your work on docs. I haven't copied any material from there yet.
I configured GHA to fail if below 95% of test coverage.
Ok, go for it!
We achieved 96% of test coverage, only a few paths cannot be tested without tampering with the implementation itself.
The main purpose of adding Javadocs now is to document parameters and exceptions. I will revisit them once the official docs are released.