Example | |
|
Solution |
Reconsider the conditions in the if/else statement to ensure that a null-pointer exception will not be generated. Note: This rule also flags cases where an object, known to be null, is passed as a parameter. As the behaviour of the receiving method is not always predictable, this practice is discouraged. |