Questions tagged [null]

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

Filter by
Sorted by
Tagged with
4
votes
4answers
281 views

Simplify Oracle SQL: Treat null date as 'N' and non-null date as 'Y'

This works, but nvl AND case seem redundant. Basically, if null then 'N' else 'Y. CHICKEN_HATCH_DATE is a DATE data type. ...
8
votes
4answers
23k views

null/undefined checking for checking seats

This looks pretty messy (need to reduce nesting I feel). I need a check an input for a seat, but I can't guarantee it has a value (one may not be chosen for example). If the seats aren't in a certain ...
1
vote
6answers
15k views

Which Java string value is preferred to return: blank or null?

I came across this snippet and am wondering if I should return blank in this case. Which is more practical to return: blank or ...
11
votes
2answers
1k views

Nullable<T> Implementation for VB6/VBA

Because I was spoiled with C# and the .NET framework, whenever I have to work with VB6 I feel like something's missing in the language. A little while ago I implemented a ...
3
votes
2answers
583 views

Null Object pattern with simple class hierarchy

I have a simple two-class hierarchy to represent U.S. ZIP (12345) and ZIP+4 (12345-1234) codes. To allow clients to allow both types for a field/parameter or restrict it to one type or the other, the ...
1
vote
2answers
240 views

A custom Java collection which doesn't support nulls

I am making a GWT application and have to prevent client code from using null values in collections. I found an answer but GWT doesn't support Queue and its ...
1
vote
2answers
170 views

Reducing cyclomatic complexity in a simple string concatenation

I have written the following function that takes an address object and builds a string using the object properties. It will later be used to display a tooltip <...

1 2 3
4