Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Checkstyle rule to enforce use of class literals for primitives &…
… void This commit introduces Checkstyle rules for `main` and `test` which enforce the use of class literals for primitive types and void by forbidding the use of the TYPE constants in Boolean, Character, Byte, Short, Integer, Long, Float, Double, and Void. For example, if MyClass uses one of the TYPE constants, the build will now fail with a message similar to the following. [ERROR] <...>/MyClass.java:39: Please use class literals for primitives and void -- for example, int.class instead of Integer.TYPE.
- Loading branch information