diff --git a/analyzer-comments/java/need-for-speed/avoid_conditional_logic.md b/analyzer-comments/java/need-for-speed/avoid_conditional_logic.md new file mode 100644 index 000000000..16e4dd0db --- /dev/null +++ b/analyzer-comments/java/need-for-speed/avoid_conditional_logic.md @@ -0,0 +1,3 @@ +# avoid conditional logic + +Consider converting the `if`-statement(s) and/or ternary expressions into a single expression using the `<` operator. diff --git a/analyzer-comments/java/need-for-speed/avoid_loops.md b/analyzer-comments/java/need-for-speed/avoid_loops.md new file mode 100644 index 000000000..ebc9fa6d0 --- /dev/null +++ b/analyzer-comments/java/need-for-speed/avoid_loops.md @@ -0,0 +1,4 @@ +# avoid loops + +Instead of using a loop, consider returning a single expression using the `<=` operator. +You can re-use the other methods already implemented in the class.