The TransportContext.fatal() always throw exception. The code that use the method looks a little bit unusual:
shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE, "...");
return null; // make the complier happy
The return statement is never get executed. However, if remove the return statement, the compiler may not happy with it, or the code reader will continue read more of the code and lead to confusing logic.
Maybe, using throw statement directly could be an alternative improvement:
- shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE, "...");
- return null; // make the complier happy
+ throw shc.conContext.fatal(Alert.UNEXPECTED_MESSAGE, "...");