As I stated in a previous post, I'm not convinced that throwing an NPE is the best choice. At the very least (IMO) this should be configurable (and again IMO, it should default to WARN instead of ERROR).

Web Maestro Clay

On Apr 7, 2005, at 9:07 AM, Glen Mazza wrote:

I do not fully understand the business logic for
tables--so what I am saying here may not be relevant.

But if cell should *never* be null (i.e., the caller
of this method is very sloppily written), please let
the methods NPE, raise IndexOutOfBoundsError,
InvalidStateException, etc., so we can immediately be
informed of the caller's incompetence at the point of
error and work on that right away.

Make sure we don't quietly return null so that the
problem will resurface several classes further
downstream where it presumably would be much harder to
track.  If we have to put a temporary band-aid in,
best to put it with caller (i.e., have it not call the
method if "cell" is null), not the callee.


--- [EMAIL PROTECTED] wrote:
  +    public BorderInfo
getOriginalBorderInfoForCell(int side) {
  +        if (cell != null) {
  +            return

  +        } else {
  +            return null;
  +        }
  +    }

Web Maestro Clay -- <[EMAIL PROTECTED]> - <> My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet

Reply via email to