src/main/java/io/arivera/oss/embedded/rabbitmq/helpers/ErlangVersionChecker.java
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);
    }

    int[] expected;
    int[] actual;
    try {
      expected = parse(minErlangVersion);
      actual = parse(erlangVersion);
    } catch (RuntimeException e) {
      LOGGER.warn("Error parsing Erlang version: " + minErlangVersion + " or " + erlangVersion + ". Ignoring check...");
      return;
    }

    for (int i = 0; i < actual.length; i++) {
      if (actual[i] > expected[i]) {
        break;
      }
      if (actual[i] < expected[i]) {
        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);
    }

    int[] expected;
    int[] actual;
    try {
      expected = parse(minErlangVersion);
      actual = parse(erlangVersion);
    } catch (RuntimeException e) {
      LOGGER.warn("Error parsing Erlang version: " + minErlangVersion + " or " + erlangVersion + ". Ignoring check...");
      return;
    }

    for (int i = 0; i < actual.length; i++) {
      if (actual[i] > expected[i]) {
        break;
      }
      if (actual[i] < expected[i]) {
        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 ) ; } int [ ] expected ; int [ ] actual ; try { expected = parse ( minErlangVersion ) ; actual = parse ( erlangVersion ) ; } catch ( RuntimeException e ) { LOGGER . warn ( "Error parsing Erlang version: " + minErlangVersion + " or " + erlangVersion + ". Ignoring check..." ) ; return ; } for ( int i = 0 ; i < actual . length ; i ++ ) { if ( actual [ i ] > expected [ i ] ) { break ; } if ( actual [ i ] < expected [ i ] ) { 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.

@throws ErlangVersionException if the minimum required version is not met or if it can't be determined.
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 .