--- sebb <[EMAIL PROTECTED]> wrote: > On 17/04/2008, Matt Benson <[EMAIL PROTECTED]> > wrote: > > > > --- Siegfried Goeschl <[EMAIL PROTECTED]> wrote: > > > > > Hi sebb, > > > > > > thanks for your input and I'm sorry for my late > > > response - I will look > > > at the stuff during the weekend > > > > > > Siegfried Goeschl > > > > > > sebb wrote: > > > > VMS testing has revealed that the > > > DefaultExecutorTest class assumes > > > > that 0 = success, and 1 = failure. > > > > > > > > This is not the case for all OSes - VMS > regards > > > odd numbers as > > > > successful and even ones as failures. > > > > > > > > So I think the test needs to use a more > versatile > > > means of checking statuses. > > > > > > > > There is a method in DefaultExecutor > > > > public static boolean isFailure(final int > > > exitValue) > > > > However, it is static, so cannot be added to > the > > > Executor interface. > > > > > > > > Any objections if I make it non-static and > add it > > > to the interface? > > > > This will allow the test suite to correctly > check > > > for success/failure. > > > > > > > > I suspect the private boolean isSuccess(final > int > > > exitValue) method > > > > may need updating for VMS. And I don't > understand > > > why it returns true > > > > if there is no exitValues array - perhaps it > > > should return ! > > > > isFailure(exitValue) ? Or throw an error of > some > > > kind? > > > > > > If the test case exists simply to test > > DefaultExecutor, why not explicitly refer to > > DefaultExecutor.isFailure()? > > Yes, that's also possible. > > > Or move the static > > method into an abstract BaseExecutor superclass > that > > hypothetical other Executor implementations could > use > > for the same purpose, and refer to the method > there? > > Likewise. > > However, I think any Executor implementation is > going to need to > provide an isFailure() - or perhaps better an > isSuccess() - method for > callers to be able to check if the execute has > succeeded or not.
Okay, so compromise = add isSuccess() to the interface and implement in an abstract base class that encapsulates the VMS exception to the common 0 -> success rule? :) -Matt > > > -Matt > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]