It is common for methods to check the value of their parameters or the state of their associated object and throw an exception when one of them
does not match a given condition. Those conditions are usually mentioned in the javadoc of the method.
This rule raises an issue when it detects that a method call will trigger one of the following exceptions:
-
java.lang.IllegalArgumentException
-
java.lang.IllegalStateException
What is the potential impact?
Issues of this type interrupt the normal execution of a program, causing it to crash or putting it into an inconsistent state. Therefore, this
issue might impact the availability and reliability of your application, or even result in data loss.