Update pmd-java/src/main/resources/category/java/errorprone.xml

Add reference to Effective Java
This commit is contained in:
Juan Martín Sotuyo Dodero
2021-07-10 16:41:20 -03:00
committed by GitHub
parent e9e31c6f92
commit 9b9ce19975

View File

@ -2862,6 +2862,8 @@ public class Foo {
For any method that returns an collection (such as an array, Collection or Map), it is a better to return an empty one rather than a
null reference. This removes the need for null checking all results and avoids inadvertent
NullPointerExceptions.
See Effective Java, 3rd Edition, Item 54: Return empty collections or arrays instead of null
</description>
<priority>1</priority>
<properties>