Collections.emptyList()
does not need to create a new object for each call; it’s typical, as in OpenJDK, to just return the singleton EMPTY_LIST
object. Additionally, it’s clearer that you intend to mean an empty list rather than having forgotten to fill in a placeholder.
Use emptyList()
; it’s both faster (up to Java target level 1.9) and more readable.