Why auto-boxing marked as a warning?

后端 未结 3 2306
误落风尘
误落风尘 2021-02-19 11:54

I understand that auto un-boxing should be done with care because the reference that is being un-boxed can be null. Why is auto-boxing marked as warning as well? Are there some

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-19 12:41

    If you don't expect performance issues (in terms of micro-optimization) you can safely disable this warning. It is just an indication in case you're not aware that auto-boxing happends here. In business-logic code where you have I/O overhead (due to DB transactions or disc access) auto-boxing hardly becomes a performance issue.

提交回复
热议问题