What is an AssertionError? In which case should I throw it from my own code?
Of course the “You shall not instantiate an item of this class” statement has been violated, but if this is the logic behind that, then we should all throw AssertionErrors everywhere, and that is obviously not what happens. The code isn’t saying the user shouldn’t call the zero-args constructor. The assertion is there to say that as far as … Read more