commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <brit...@apache.org>
Subject [IO] Input parameter checking
Date Fri, 22 May 2015 06:52:08 GMT
Hi,

I've noticed that there are some classes that do not validate input
parameters. For example the constructor

o.a.c.io.output.XmlStreamWriter(final OutputStream out, final String
defaultEncoding)

does not check whether out is null, which will lead to late failure
in detectEncoding(final char[] cbuf, final int off, final int len).
Shouldn't we check for illegal null inputs in such situations?

Benedikt

-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message