Why do stuff like this?  Null params are almost never valid unless
documented... I dislike cluttering up code with validity checks,
slightly penalizing users who use the APIs correctly.  I recognize
that I may be in the minority though.

But in this specific instance, the caller will get an immediate NPE if
they pass a null anyway.

-Yonik
http://www.lucidimagination.com

>   public AttributeSource(AttributeSource input) {
> +    if (input == null) {
> +      throw new IllegalArgumentException("input AttributeSource must not be 
> null");
> +    }
>     this.attributes = input.attributes;
>   }

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to