Hi Vincent
On 07.01.2009 11:47:16 Vincent Hennebert wrote:
> Hi Jeremias,
>
> > Author: jeremias
> > Date: Sun Jan 4 04:59:29 2009
> > New Revision: 731248
> <snip/>
> > + /**
> > + * Sets the requested encoding mode for this font.
> > + * @param mode the new encoding mode
> > + */
> > + public void setEncodingMode(EncodingMode mode) {
> > + if (mode == null) {
> > + throw new NullPointerException("mode must not be null");
> > + }
> > + this.encodingMode = mode;
> > + }
> <snip/>
> > if (type1) {
> > + if (encodingMode == EncodingMode.CID) {
> > + throw new IllegalArgumentException(
> > + "CID encoding mode not supported for Type 1
> > fonts");
> > + }
>
> I’d rather use assert statements instead. Anything wrong with that?
Nothing, it's a matter of taste. For these cases here, I prefer
exceptions.
Jeremias Maerki