Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 37651

This tag should be used for questions where you are handling null variables or values.

13 votes

Duplication with nested null checks

how to avoid null checks? … If it's something which shouldn't be null, when you set it check if it's null, if yes throw a IllegalArgumentException. (i like null) …
Marco Acierno's user avatar
14 votes
Accepted

Returning null or what?

write in the documentation it could return null if if (x <= xCount && y <= xCount) So who use your code could just write Point point = GetSprite(x, y); if (point == null) { /* something went wrong, … */ } I found this syntax very useful, and could not lead to bugs if the programmer is alerted about the null. …
Marco Acierno's user avatar