You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "paultanay (via GitHub)" <gi...@apache.org> on 2026/01/24 12:16:18 UTC

[PR] [ISSUE-3397] Fix checkstyle violations in quickstart examples [rocketmq]

paultanay opened a new pull request, #10045:
URL: https://github.com/apache/rocketmq/pull/10045

   This PR addresses part of Issue #3397 by fixing checkstyle violations in the quickstart example module. I'm starting with the most visible files (Producer.java and Consumer.java) to establish a pattern for fixing the remaining ~1315 violations across all example files.
   
   Changes made:
   
   Producer.java:
   
   Extracted magic numbers to named constants with Javadoc (SEND_TIMEOUT_MILLIS, ERROR_SLEEP_MILLIS)
   Added private constructor to prevent instantiation
   Fixed line length violations (80 character max)
   Simplified message creation code for better readability
   Consumer.java:
   
   Extracted hardcoded strings to constants (TAG_FILTER)
   Added private constructor
   Made method parameters final
   Replaced lambda with explicit anonymous class for educational clarity
   Added missing imports and comprehensive Javadoc
   Fixed line length violations
   This fixes approximately 30-40 checkstyle violations in these two files.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org