public void check() throws ErlangVersionException {
  String erlangVersion;
  try {
    erlangVersion=erlangShell.getErlangVersion();
    LOGGER.debug("Erlang version installed in this system: {}",erlangVersion);
  }
 catch (  ErlangShellException e) {
    throw new ErlangVersionException("Could not determine Erlang version. Ensure Erlang is correctly installed.",e);
  }
  if (minErlangVersion == null) {
    LOGGER.debug("RabbitMQ version to execute doesn't specify a minimum Erlang version. Will skip this check.");
    return;
  }
 else {
    LOGGER.debug("RabbitMQ version to execute requires Erlang version {} or above.",minErlangVersion);
  }
  double expected;
  double actual;
  try {
    expected=parse(minErlangVersion);
    actual=parse(erlangVersion);
  }
 catch (  RuntimeException e) {
    LOGGER.warn("Error parsing Erlang version: " + minErlangVersion + " or "+ erlangVersion+ ". Ignoring check...");
    return;
  }
  if (actual < expected) {
    throw new ErlangVersionException(String.format("Minimum required Erlang version not found. Expected '%s' or higher. Actual is: '%s'",minErlangVersion,erlangVersion));
  }
}

public void check ( ) throws ErlangVersionException { String erlangVersion ; try { erlangVersion = erlangShell . getErlangVersion ( ) ; LOGGER . debug ( "Erlang version installed in this system: {}" , erlangVersion ) ; } catch ( ErlangShellException e ) { throw new ErlangVersionException ( "Could not determine Erlang version. Ensure Erlang is correctly installed." , e ) ; } if ( minErlangVersion == null ) { LOGGER . debug ( "RabbitMQ version to execute doesn't specify a minimum Erlang version. Will skip this check." ) ; return ; } else { LOGGER . debug ( "RabbitMQ version to execute requires Erlang version {} or above." , minErlangVersion ) ; } double expected ; double actual ; try { expected = parse ( minErlangVersion ) ; actual = parse ( erlangVersion ) ; } catch ( RuntimeException e ) { LOGGER . warn ( "Error parsing Erlang version: " + minErlangVersion + " or " + erlangVersion + ". Ignoring check..." ) ; return ; } if ( actual < expected ) { throw new ErlangVersionException ( String . format ( "Minimum required Erlang version not found. Expected '%s' or higher. Actual is: '%s'" , minErlangVersion , erlangVersion ) ) ; } }
retrieves the current system ' s erlang version to compare it to the minimum required version . < p > the system ' s erlang version is always retrieved , but the comparison might be skipped if the rabbitmq version doesn ' t specify a minimum required version .
