Java: how to avoid NPE in ternary operator, in general how to perform null-checks elegantly?

前端 未结 0 1763
挽巷
挽巷 2021-01-21 14:02

Yesterday I had to write an ugly piece of code, in order to perform many null-checks on the fields of an object, in order to avoid NPE from ternary operator construct.

Th

相关标签:
回答
  • 消灭零回复
提交回复
热议问题