Ban ObjectMapper#findAndRegisterModules
<property name="format" value="CoreMatchers\.equalTo"/>
<property name="message" value="Use Assert.assertEquals()."/>
</module>
+ <module name="RegexpSinglelineJava">
+ <property name="id" value="BanJacksonFindAndRegisterModulesMethod"/>
+ <property name="format" value="findAndRegisterModules"/>
+ <property name="message" value="Use ObjectMapper#registerModule(<yourModule>) explicitly. ObjectMapper#findAndRegisterModules() is dangerous because it will change behaviour depending on which modules are on your classpath (including transitive dependencies)."/>
+ </module>
<module name="RegexpSinglelineJava"> <!-- Java Coding Guidelines: Use appropriate assertion methods -->
<property name="format" value="CoreMatchers\.notNull"/>
<property name="message" value="Use better assertion method(s): Assert.assertEquals(), assertNull(), assertSame(), etc."/>
