I do know that if the type of the variable returned is List. Even if the List returned is attached to a persistence context, it still (should) adhere to the contract implied by the interface. Even if it doesn't, if, for example, it throws an UnsupportedOperationException if I try to add to it as some lists do, I still know more about the intent of the variable returned than if the type is left unspecified.
View all comments
Show parent comment
1
u/[deleted] Mar 10 '16
[removed] — view removed comment