Archive
Michael MULLER
-
The code contains too many switch cases with missing ending breaks
Ending switch branches with βbreaksβ helps the code be more consistent, functional, and easier to debug. This allows developers in different teams navigate the…
-
The code contains modifications of buildtins objects : Object, Array or Function
Modifying builtins like Object.prototype and Array.prototype are strictly forbidden. Modifying other builtins like Function.prototype is less dangerous but still leads to hard to debug…
-
Avoid using ellipsis in functions
Functions should not be defined with a variable number of arguments. Varargs methods are a convenient way to define methods that require a variable…
-
Avoid protected member in final classes
The difference between private and protected visibility is that child classes can see and use protected members, but they cannot see private ones. Since…
-
Avoid loop counter modification
Loop counters shall not be modified in the body of the loop. However other loop control variables representing logical values may be modified in…
-
Avoid Equals methods not testing their parameters
Because the equals method takes a generic Object as a parameter, any type of object may be passed to it. The method should not…
-
Avoid catches that only rethrow
catch clause that only rethrows the caught exception has the same effect as omitting the catch altogether and letting it bubble up automatically, but…
-
Avoid nested try-catch blocks
Although this is sometimes unavailable, nesting try/catch blocks severely impacts the readability of the source code as it makes it difficult to understand which…
-
Avoid long case statements
The switch statement should be used only to clearly define some new branches in the control flow. As soon as a case clause contains…
-
The code contains non-wrapped immediate function calls
When a function is to be invoked immediately, the entire invocation expression should be wrapped in parents. Wrapping an immediate function invocation in parentheses…