eye-gu opened a new issue, #5921:
URL: https://github.com/apache/shenyu/issues/5921

   ### Question
   
   I have seen many recently pr change ==null to Objects.isNull. Can we 
consider using checkstyle to avoid? I tried it locally and found that there are 
quite a few areas that need to be modified.
   
   checkstyle config as follows:
   
   ```xml
   <module name="RegexpSinglelineJava">
     <property name="format" value="==\s*null"/>
     <property name="message" value="Use Objects.isNull() instead of == null"/>
   </module>
   
   <module name="RegexpSinglelineJava">
     <property name="format" value="null\s*=="/>
     <property name="message" value="Use Objects.isNull() instead of null =="/>
   </module>
   
   <module name="RegexpSinglelineJava">
     <property name="format" value="!=\s*null"/>
     <property name="message" value="Use Objects.nonNull() instead of != null"/>
   </module>
   
   <module name="RegexpSinglelineJava">
     <property name="format" value="null\s*!="/>
     <property name="message" value="Use Objects.nonNull() instead of null !="/>
   </module>
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to