Re: How should parameters be validate for methods on the core-SPI? - Document in JavaDoc and: Throw IllegalArgumentException? Do nothing? Use Asserts?

2008-04-06 Thread Vamsavardhana Reddy
I would go with throwing an IllegalArgumentException. ++Vamsi On Sun, Apr 6, 2008 at 12:51 AM, Mark Combellack [EMAIL PROTECTED] wrote: Hi, I was using the core-spi project and ran into a NullPointerException because I passed a null into a method. Reading the JavaDoc for the method, it

Re: How should parameters be validate for methods on the core-SPI? - Document in JavaDoc and: Throw IllegalArgumentException? Do nothing? Use Asserts?

2008-04-06 Thread Mike Edwards
Mark Combellack wrote: Hi, I was using the core-spi project and ran into a NullPointerException because I passed a null into a method. Reading the JavaDoc for the method, it did not say that I was not allowed to pass a null into the method. The case that I ran into of the

How should parameters be validate for methods on the core-SPI? - Document in JavaDoc and: Throw IllegalArgumentException? Do nothing? Use Asserts?

2008-04-05 Thread Mark Combellack
Hi, I was using the core-spi project and ran into a NullPointerException because I passed a null into a method. Reading the JavaDoc for the method, it did not say that I was not allowed to pass a null into the method. The case that I ran into of the

Re: How should parameters be validate for methods on the core-SPI? - Document in JavaDoc and: Throw IllegalArgumentException? Do nothing? Use Asserts?

2008-04-05 Thread Adriano Crestani
+1 for update javadoc and throw an IllegalArgumentException I'm not familiar with this method, but I suppose a null object should not be accepted as argument at all. Otherwise, the method should not be throwing a NullPointerException and it should be fixed. So, assuming this method should not