suneet-s commented on a change in pull request #9690: IntelliJ inspection and
checkstyle rule for "Collection.EMPTY_* field accesses replaceable with
Collections.empty*()"
URL: https://github.com/apache/druid/pull/9690#discussion_r409850520
##########
File path: codestyle/checkstyle.xml
##########
@@ -325,5 +325,11 @@ codestyle/checkstyle.xml. "/>
<module name="StringLiteralEquality"/>
+ <module name="Regexp">
+ <property name="format"
value="Collections\.(EMPTY_LIST|EMPTY_MAP|EMPTY_SET)"/>
+ <property name="message" value="Use Collections.empty*() method instead
of Collection.EMPTY_* field"/>
+ <property name="illegalPattern" value="true"/>
+ </module>
Review comment:
yeah I like the checkstyle rule too, because I almost never run intelliJ
inspections locally. But since they added an explicit test that verifies that
style is allowed, it made me think they must have a reason to do so 🤷♂️
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]