harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karan Malhi" <karan.ma...@gmail.com>
Subject NullPointerException
Date Fri, 17 Mar 2006 01:33:09 GMT

Some of the methods/constructors in the API throw a NullPointerException
when a null is passed in as an argument. The spec doesnt say anything that
the method/constructor should throw a NullPointerException, neither does it
say anything about how the method/constructor should behave when a null is
passed in.
What should be the approach in that case?
1. Could we check for null within a method and handle it so that the method
does not unneccessarily throw an NPE (this would differ from how the spec
would behave) or
2. should we allow the method to throw an NPE if the spec method also throws
Karan Malhi

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