Skip to main content
3 events
when toggle format what by license comment
Aug 23, 2022 at 19:29 comment added Flater @GregBurghardt: Proper null checking should be done on any nullable type. The issue isn't so much that a null might slip in in the future, but rather that one would have failed to account for possible nulls on a nullable type to begin with. So you're right, but I'm already advocating null checks regardless.
Aug 23, 2022 at 14:57 comment added Greg Burghardt "It's not wrong to use an empty string if that's what the form text field automatically returns when no comment was added." -- this works as long as the data is consistent. As soon as you get a NULL value, things get dicey. In that case, check for "is null or empty" before an OO language attempts to call an instance method on the resulting string pulled from the database. Then again, some database vendors treat an empty string as a NULL value (Oracle).
Aug 22, 2022 at 6:34 history answered Flater CC BY-SA 4.0