posted 18 years ago
In the following code, where BOLDED, I do not understand why this is UNREACHABLE CODE:
public class EndTransactionSOAPImpl implements org.tempuri.EndTransaction_PortType{
public org.texashealth.www.SCM.DataTier.GenericResponse.GenericResponse
endTransaction(org.texashealth.www.SCM.DataTier.ETRequest.EndTransactionRequest endTransaction
) throws java.rmi.RemoteException {
// Create the "GenericResponse" and "Header" objects.
GenericResponse response = new GenericResponse();
Header responseheader = new Header();
// Stuff the responseheader with the hardcoded VERSION and STATUS.
responseheader.setVersion(BigInteger.valueOf(1));
responseheader.setStatus(Status.fromString("OK"));
// Stuff the "response" object variable by passing
// in the header object.
response.setHeader(responseheader);
// Delete or keep the transaction by verifying the transaction exists in the hash table.
Transaction transaction = new Transaction();
if (endTransaction.getHeader().getVersion().intValue() != 1)
responseheader.setStatus(Status.fromString("VersionNotSupported"));
return response;
int transID = endTransaction.getTransactionID().intValue();
if (Transaction.get(transID) == null)
responseheader.setStatus(Status.fromString("InvalidTransactionID"));
return response;
Transaction.remove(endTransaction.getTransactionID().intValue());
responseheader.setStatus(Status.fromString("OK"));
return response;
}
}
Any help or direction would be appreciated.
Thanks.