J
jan V
I have zillions of methods which perform very simple "garbage in?" checks
and which throw IllegalArgumentExceptions if method parameters have illegal
values.
Apart from the "if it ain't broke, don't fix it" rule, what do you think
about me combing through my codebase to morf these simple if (..) throw new
IllegalArgumentExceptions(..) into assert statements?
Am I right in thinking that my simple ifs are logically equivalent to
asserts?
Would writing a tool to automate the upgrading of such tests to true asserts
be useful?
and which throw IllegalArgumentExceptions if method parameters have illegal
values.
Apart from the "if it ain't broke, don't fix it" rule, what do you think
about me combing through my codebase to morf these simple if (..) throw new
IllegalArgumentExceptions(..) into assert statements?
Am I right in thinking that my simple ifs are logically equivalent to
asserts?
Would writing a tool to automate the upgrading of such tests to true asserts
be useful?