/** * Compare the request conditions held by the two RequestConditionHolder * instances after making sure the conditions are of the same type. * Or if one holder is empty, the other holder is preferred. */ @Override public int compareTo(RequestConditionHolder other, ServerWebExchange exchange) { if (this.condition == null && other.condition == null) { return 0; } else if (this.condition == null) { return 1; } else if (other.condition == null) { return -1; } else { assertEqualConditionTypes(this.condition, other.condition); return this.condition.compareTo(other.condition, exchange); } }
/** * Compare the request conditions held by the two RequestConditionHolder * instances after making sure the conditions are of the same type. * Or if one holder is empty, the other holder is preferred. */ @Override public int compareTo(RequestConditionHolder other, ServerWebExchange exchange) { if (this.condition == null && other.condition == null) { return 0; } else if (this.condition == null) { return 1; } else if (other.condition == null) { return -1; } else { assertEqualConditionTypes(other); return this.condition.compareTo(other.condition, exchange); } }