The NotImplementedExceptions are to both indicate at runtime this stuff won't work and were a marker for the JAPI tools [1] to point out that even though the method signature matches, it's not complete.
If the code is being implemented, then it can be removed. [1] http://sab39.netreach.com/Software/Japitools/42/ On Sat, May 8, 2010 at 7:08 PM, Lang Yang <yangl...@gmail.com> wrote: > Hello guys, > > I have seen some constructors throws a NotImplementedExpcetion when JDOC > says these constructors are supposed to just construct a blank class. I > thought for this case we just leave that constructor blank is good enough. > Is there any specific reason why we are throwing NotImplementedExceptions? > > e.g.: > protected ImageInputStreamSpi() - Constructs a blank ImageInputStreamSpi. It > is up to the subclass to initialize instance variables and/or override > method implementations in order to provide working versions of all methods. > [0] > > protected ImageInputStreamSpi() throws NotImplementedException { > // TODO: implement > throw new NotImplementedException(); > } > > Thanks, > > Lang > > [0] - > http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/spi/ImageInputStreamSpi.html#ImageInputStreamSpi() >