Jazoon 2010 is history. What remains is the surprise in the eyes of the speakers of the two testing related talks: Full house, one talk had all the seats occupied and the other almost, just a few seats remained empty. Seems like testing gets more attention.
After having learned that equals() is not equal enough (my other post) I just replaced equals by compareTo. After studying the Javadoc for BigDecimal.compareTo I did not expect any problems… until some Boundary-value analysis occurred and there the NPE-issue was raised… What a NPE in a simple comparision?
A quick look into the compareTo code showed, what research into the Javadoc confirmed, even though not at the expected place.
The Javadoc for BigDecimal.compareTo(java.math.BigDecimal) did not reveal any pitfalls or precoonditions. Neither did the Javadoc for Comparable.compareTo(T). Nothing about preconditions…
Only in the class-javadoc for Comparable an innocent sentence revealed the source of the problem. Whereas in other places null is just a special case of an Object, Comparable follows this credo:
Note that null is not an instance of any class, and e.compareTo(null) should throw a NullPointerException even though e.equals(null) returns false.
So another lesson learned. A pity that this precondition is not documented somewhere. NullPointerException obviously is a RuntimeExcpetion and as such does not need to be documented. But when a method should repsond with such a runtime expcetion to a precondition, this behaviour should be documented as a precondition to the method.
At this years Jazoon I presented an introduction to JSFUnit. The presentation is now online.
Jazoon turned out to be, once more, a great conference. The presentations are held in movie-theaters with comfy seats and good acoustics. All over the place a free WLan is available. In the exhibition the speakers and other esperts from the sponsors are easily approachable. Those that were there, I think, will agree to this opinion. And those that were not there surely missed a nice conference and definitely should note the already published date of next years Jazoon.
See you next year in Zurich at Jazoon 2009