protected void validateRange()

in sources/src/main/java/com/google/solutions/jitaccess/catalog/policy/AbstractProperty.java [240:252]


  protected void validateRange(@Nullable Long value) {
    super.validateRange(value);

    if (value != null && this.minInclusive != null && value < this.minInclusive) {
      throw new IllegalArgumentException(
        String.format("The value for '%s' is too small", this.name()));
    }

    if (value != null && this.maxInclusive != null && value > this.maxInclusive) {
      throw new IllegalArgumentException(
        String.format("The value for '%s' is too large", this.name()));
    }
  }