blob: 027f28b3eb28aa2254d33af99943a28392d2aedf [file]
<html>
<body>
Reports cases where the minimum or the maximum of two numbers can be calculated by means of
<code>Math.max()</code> or <code>Math.min()</code> instead of doing it manually.
<p>Example:</p>
<pre>
public int getMinWeight(int typeDiffWeight, int rawTypeDiffWeight) {
return (rawTypeDiffWeight &lt; typeDiffWeight ? rawTypeDiffWeight : typeDiffWeight);
}
</pre>
<p>Will be replaced with:</p>
<pre>
public int getMinWeight(int typeDiffWeight, int rawTypeDiffWeight) {
return Math.min(rawTypeDiffWeight, typeDiffWeight);
}
</pre>
<!-- tooltip end -->
<p><small>New in 2019.2</small></p>
</body>
</html>