Replies: 1 comment
-
Passing a null value forward can lead to NullPointerExceptions, which can be hard to troubleshoot. Having null checks is a best practice and there are several ways to do them, but implementation details are not in the scope of this channel. I recommend you search for Java programming best practices regarding nulls. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So we have APIRequest has a, b, c, but c could be potential
null
we are thinking about write like this:instead of
Are those two the same? which one is better? (option 2 looks def cleaner) but if C is null, will the second option send more data via network? or it depends on the implementation of client?
Beta Was this translation helpful? Give feedback.
All reactions