Reports cases where the minimum or the maximum of two numbers can be calculated by means of Math.max() or Math.min() instead of doing it manually.

Example:

  public int getMinWeight(int typeDiffWeight, int rawTypeDiffWeight) {
    return (rawTypeDiffWeight < typeDiffWeight ? rawTypeDiffWeight : typeDiffWeight);
  }

Will be replaced with:

  public int getMinWeight(int typeDiffWeight, int rawTypeDiffWeight) {
    return Math.min(rawTypeDiffWeight, typeDiffWeight);
  }

New in 2019.2