private String checkTrainId(){
  String msg=null;
  if (_warrant.getRunMode() != Warrant.MODE_NONE) {
    msg=_warrant.getRunModeMessage();
    return msg;
  }
  List<BlockOrder> orders=getOrders();
  if (orders.size() == 0) {
    msg=Bundle.getMessage("NoRouteSet",_origin.getBlockName(),_destination.getBlockName());
    return msg;
  }
  msg=_warrant.setRoute(0,orders);
  if (msg != null) {
    return msg;
  }
  msg=checkLocoAddress();
  return msg;
}

private String checkTrainId ( ) { String msg = null ; if ( _warrant . getRunMode ( ) != Warrant . MODE_NONE ) { msg = _warrant . getRunModeMessage ( ) ; return msg ; } List < BlockOrder > orders = getOrders ( ) ; if ( orders . size ( ) == 0 ) { msg = Bundle . getMessage ( "NoRouteSet" , _origin . getBlockName ( ) , _destination . getBlockName ( ) ) ; return msg ; } msg = _warrant . setRoute ( 0 , orders ) ; if ( msg != null ) { return msg ; } msg = checkLocoAddress ( ) ; return msg ; }
all non - null returns are fatal
