code: public static int compareSpecifications(String spec1, String spec2) {
          String[] parts1 = StringUtils.split(spec1, '.');
          Integer major1 = Integer.valueOf(parts1[0]);
          Integer minor1 = Integer.valueOf(parts1[1]);
  
          String[] parts2 = StringUtils.split(spec2, '.');
          Integer major2 = Integer.valueOf(parts2[0]);
          Integer minor2 = Integer.valueOf(parts2[1]);
  
          if (major1.equals(major2))
              return minor1.compareTo(minor2);
          return major1.compareTo(major2);
      }
docs: Compare the two provided specifications. Result is undefined if any of them is not supported.
  @param spec1 first version to compare
  @param spec2 second version to compare
  @return negative integer if first version is smaller, 0 if they are the same, positive integer otherwise