3 ms·
That's so weird to me. It means that somewhere someone is matching the string "null" and converting it into an actual null value.
by wtetzner 4y ago
That's so weird to me. It means that somewhere someone is matching the string "null" and converting it into an actual null value.
- remexre 4y agoIt's pretty believable to me that _some_ Java deserialization library from the early oughts totally does this as a default behavior.
- DangitBobby 4y agoI suspect some batch processing job with a CSV dump is the culprit behind a lot of bad treatment of strings.
- jsmith45 4y agoWhat is generally happening in these cases is that data is getting stringified, with `null` becoming the string "null" (which is a common output for string formatting a null in various languages). This output is is then later re-parsed, and to try to restore null inputs back to being null, the code matches on the string "null", ignoring the fact that that could have been a valid string itself.
- GoblinSlayer 4y agoNot all data structures are nullable or null reference is undesirable. In this case you can use the null object pattern https://en.wikipedia.org/wiki/Null_object_pattern#Description https://en.wikipedia.org/wiki/Null_object_pattern#Descriptio...