Add Checkstyle rule to disallow toLowerCase() and toUpperCase() without Locale (#2606)

This commit is contained in:
ljacqu 2022-08-21 01:12:57 +02:00 committed by GitHub
parent 0f24197323
commit 63780e3f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,6 +192,12 @@
<module name="MissingOverride"/>
<module name="EqualsHashCode"/>
<module name="EqualsAvoidNull"/>
<module name="Regexp">
<property name="format" value="\.to(Lower|Upper)Case\(\)"/>
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
<property name="message" value="Use toLowerCase/toUpperCase with Locale"/>
</module>
</module>
<module name="FileTabCharacter"/>
</module>