You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments