code: private void assignPort(String portString, String listenPortString) throws ChannelFrameworkException, NumberFormatException {
          if (portString != null) {
              // Found a port string. Convert it to an int.
              port = Integer.parseInt(portString);
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Port set from regular tcp port: " + port);
              }
          } else {
              // Port String not found so try the backup listening port.
              if (listenPortString != null) {
                  // Found a listening port string. Convert it to an int.
                  port = Integer.parseInt(listenPortString);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Port set from tcp listening port: " + port);
                  }
              } else {
                  // Listening port not found either.
                  throw new ChannelFrameworkException("Port not available in TCP channel properties.");
              }
          }
      }
docs: Assign the value of port based on the parameters. If the first parameter is
  null, the second/backup
  will be used.
  
  @param portString
  @param listenPortString
  @throws ChannelFrameworkException
  @throws NumberFormatException
  - format of port string is not valid