Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.2.0
-
None
Description
Inspired by a recent Java code touch-up, I wanted to fix in one pass several lingering non-trivial issues with the Java code that a static analyzer turns up. Only a few of these have material effects, but some do, and figured we could avoid taking N PRs over time to address these.
- Some int*int multiplications that widen to long maybe could overflow
- Unnecessarily non-static inner classes
- Some tests "catch (AssertionError)" and do nothing
- Manual array iteration vs very slightly faster/simpler foreach
- Incorrect generic types that just happen to not cause a runtime error
- Missed opportunities for try-close
- Mutable enums which shouldn't be
- .. and a few other minor things