[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unimplemented methods

From: Per Bothner
Subject: Re: unimplemented methods
Date: Sat, 01 Mar 2003 16:27:57 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210

A possible refinement:

throw new UnsupportedOperationException ("not implemented");

This makes it clear that it's an unimplemented feature,
rather than the usual collections invalid call.

The string "not implemented" also makes it easy for
our tools to search for, so we can generate more useful summaries.
And it's boilerplate - you can paste the same string into
every method.  We can allow extra information:

"not implemented - needs javax.xx.YY first"

So my suggested coding standard:

throw new UnsupportedOperationException (REASON);
where REASON is a string literal that includes "not implemented"
and all on a single line (to make it easy to grep for).
        --Per Bothner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]