| <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 < 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> |