Observation on usage of "assert":

It is okay (and good practice) to use "assert" for argument-check in private
methods, since if we violate those assertions, it is our own fault (purpose of
"assert" is to catch such mistakes).

It if a deprecated practice to use assertion for checking parameters in public
API. We need to write explicit "if ... throws" code in those cases.

Reference:

http://java.sun.com/javase/6/docs/technotes/guides/language/assert.html#usage-conditions

(In bold characters in the above page: "Do not use assertions to check the
parameters of a public method").

I'm cleaning on my local copy of ImageWorker...

        Martin

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to