Javax @NotNull annotation usage

后端 未结 4 381
隐瞒了意图╮
隐瞒了意图╮ 2021-01-17 12:49

I have a simple method to get a list of documents for a given companyId. Here is the method:

@Override
public List getDocumentL         


        
4条回答
  •  说谎
    说谎 (楼主)
    2021-01-17 13:17

    @NotNull Annotation,

    1. A method should not return null.
    2. A variable (like fields, local variables, and parameters) cannot hold null value.

提交回复
热议问题