Why this matters
Improves type safety and prevents accidental misuse.
Prefer precise types (long, BigDecimal, LocalDate) over Number/Object when the domain is known.
Improves type safety and prevents accidental misuse.
Side-by-side examples engineers can pattern-match during review.
Number total;BigDecimal total;Object payloadMap<String, Object> -> record/DTOFrom the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.