This commit introduces a globally applied Checkstyle rule which enforces 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. |
||
---|---|---|
.. | ||
checkstyle | ||
eclipse | ||
idea | ||
nohttp |