Skip to content

Coding Guidelines

Stefan Ludwig edited this page Oct 26, 2016 · 2 revisions

Here are some guidelines you should adhere to, if you are contributing to WebTester.

Do not pass NULL as an argument if the method doesn't explicitly allows for it!

No method should be forced to compensate for NULL arguments (defensive programming). We consider it bad practice to pass NULL as an argument. It is the callers responsibility to handle NULL values, not the callees!

There are of course exception to the rule. These cases must be explicitly documented in the method's JavaDoc! If the documentation does not state "...can be null" the method can't!