...
- A valid object or
null
- An integer indicating a positive value, or -1 to indicate that an error occurred
- An array of valid objects or
null
indicating the absence of valid objects. (This is further addressed in MET55-JG. For methods that return an array or collection prefer returning an empty array or collection over a null value.)
In-band-error indicators require checking for the error; however this checking is often overlooked. Failure to check for such error conditions not only violates EXP00-J. Do not ignore values returned by methods, but also has the unfortunate effect of propagating invalid values that may subsequently be treated as valid in later computations.
...