Rule-ID: jdk.no-generic-exceptions
Do not throw generic exceptions like java.lang.Exception
or java.lang.RuntimeException
.
Create your own exception types instead or use more concrete exceptions like IllegalArgumentException
.
This leads to more readable code and enables better exception handling.
Rule-ID: jdk.no-jodatime
Do not use JodaTime, instead use the Date API of Java 8.
Rule-ID: jdk.bigdecimal-do-not-call-constructor-with-double-parameter
Do not use the double constructor for class BigDecimal
. The results of this constructor can be somewhat unpredictable.
Instead, use kotlin-stdlib's extension function Double.toBigDecimal()
or the String constructor.