In NetworkDerbyControlImpl.shutdown() there is code that logs the
message "DRDA_ShutdownError.S", which is:
Unable to shutdown server on port {0} on host {1}.
The position of the code looks wrong, it is in a catch block for an
exception with an if statement to check that the server has looped
through SHUTDOWN_CHECK_ATTEMPTS.
It seems that really the intention of the code would mean it should be
logged outside the loop. See the following extracted code, it seems to
me the code between the MOVE and END-MOVE comments should be moved to
the end, where the TO-HERE comment is?
Dan.
int ntry;
for (ntry = 0; ntry < SHUTDOWN_CHECK_ATTEMPTS; ntry++)
{
Thread.sleep(SHUTDOWN_CHECK_INTERVAL);
try {
ping();
} catch (Exception e)
{
// as soon as we can't ping return
// MOVE
if (ntry == SHUTDOWN_CHECK_ATTEMPTS)
consolePropertyMessage("DRDA_ShutdownError.S", new String [] {
Integer.toString(portNumber), hostArg});
// END-MOVE
break;
}
}
// TO-HERE