static boolean valuesAreEqual(String value1, String value2) { // exposed for unit test
    if (NumberUtils.isNumber(value1) && NumberUtils.isNumber(value2)) {
      try {
        Number number1 = NumberUtils.createNumber(value1);
        Number number2 = NumberUtils.createNumber(value2);
        return Objects.equal(number1, number2) ||
          number1.doubleValue() == number2.doubleValue();
      } catch (NumberFormatException e) {
        // fall back to regular equality
      }
    }

    return Objects.equal(value1, value2);
  }
Checks for equality of parsed numbers if both values are numeric,
otherwise using regular equality.
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java