Skip to content

done#1255

Open
acidcor wants to merge 2 commits into
mate-academy:masterfrom
acidcor:master
Open

done#1255
acidcor wants to merge 2 commits into
mate-academy:masterfrom
acidcor:master

Conversation

@acidcor
Copy link
Copy Markdown

@acidcor acidcor commented May 29, 2026

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The code has critical issues that must be fixed. First, there's a syntax error in Main.java line 21 with a double semicolon (logger.error(...); ;) that will prevent compilation. Second, OrderServiceImpl.java line 32 uses logger.error() for a successful data fetch operation - this should be logger.info() or logger.debug() as per best practices for log levels. Third, log messages in AuthenticationServiceImpl.java line 13 and OrderServiceImpl.java line 15 are missing required parameters - the checklist explicitly requires informative messages that include actual values (e.g., Params: userId={}). Once the double semicolon is fixed, the code will compile, but these logging quality issues should be addressed before final approval.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

//TODO: add corresponding log message about method login was called
logger.info("Method login was called. Params = {}", login);
User user = findByLogin(login);
if (!user.getPassword().equals(password)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log message doesn't include the userId parameter. According to the checklist, log messages must be informative and include parameter values (see good example: Params: login={}). The method takes userId as a parameter, so it should be logged like: logger.info("Method completeOrder was called. Params: userId={}", userId);

public class Main {
private static final Logger logger = LogManager.getLogger(Main.class);

public static void main(String[] args) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log message is generic. According to checklist item #4, include the userId parameter to make it informative: logger.info("Method completeOrder was called. userId={}", userId);

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Your implementation successfully meets all core requirements. All System.out.println() and e.printStackTrace() statements have been properly replaced with logger methods using Log4j2, log messages include actual parameter values as required, and the .gitignore correctly excludes the logs/ directory. There is one minor issue worth fixing: in Main.java line 21, there's a typo in the log message - "Can't aunthificate user" should be "Can't authenticate user". This is a minor cosmetic issue that doesn't block approval, but fixing it will improve code quality.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants