Update pmd-java/src/main/resources/category/java/errorprone.xml
Add reference to Effective Java
This commit is contained in:

committed by
GitHub

parent
e9e31c6f92
commit
9b9ce19975
@ -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
|
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
|
null reference. This removes the need for null checking all results and avoids inadvertent
|
||||||
NullPointerExceptions.
|
NullPointerExceptions.
|
||||||
|
|
||||||
|
See Effective Java, 3rd Edition, Item 54: Return empty collections or arrays instead of null
|
||||||
</description>
|
</description>
|
||||||
<priority>1</priority>
|
<priority>1</priority>
|
||||||
<properties>
|
<properties>
|
||||||
|
Reference in New Issue
Block a user