Page 2 of 2

Re: Warnings

Posted: Fri Aug 07, 2009 10:36 am
by ConvertFromOldNGs
by Craig Shearer >> Wed, 7 Jun 2000 21:00:52 GMT

One warning that I would like to see would be for JADE to analyse execution paths in my methods and provide warnings where a path doesn't return a result. This sort of thing has caught me out several times!

Perhaps there could be an option in JADE where if a method that has a return type doesn't actually return anything, then an exception is raised, rather than just returning null.

Craig.

Re: Warnings

Posted: Fri Aug 07, 2009 10:36 am
by ConvertFromOldNGs
by Robert Barr >> Mon, 17 Jul 2000 22:02:05 GMT

How about warning you when you use global.isValidObject() that you are probably treating the symptoms. A recent attempt at code reuse showed that my early JADE code was peppered with these calls - now my understanding of JADE's integrity management features has improved, I no longer need this method.

Re: Warnings

Posted: Fri Aug 07, 2009 10:36 am
by ConvertFromOldNGs
by Craig Shearer >> Mon, 17 Jul 2000 22:34:56 GMT

What's this Robert... confession time? :-)

I agree though, and it could also be extended to resynch (pointing out that resynchObject is usually more efficient). and also warning about beginLock, endLock instruction pairs, and maybe methods like deleteAllInstances etc.

Of course, the developer could always turn the warnings off.

Craig.