Skip to content

First try#1247

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

First try#1247
obvly wants to merge 2 commits into
mate-academy:masterfrom
obvly:master

Conversation

@obvly
Copy link
Copy Markdown

@obvly obvly commented May 13, 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 logger implementation is correct and functional across all files, but TODO comments must be removed before submission as required by [CHECKLIST ITEM #1]. Specifically, TODO comments remain in: Main.java, AuthenticationServiceImpl.java (lines 12-14), and OrderServiceImpl.java (lines 15 and 32). Even though the corresponding log messages have already been added in each case, the TODO comment annotations themselves still need to be deleted. Once these comments are removed, your solution will be complete and ready for 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

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class Main {
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 TODO comment violates checklist item #1: 'Let's remove all TODO comments before submitting solution'. The TODO has been addressed with a log message on line 14, but the comment itself should be removed.


@Override
public User login(String login, String password) throws AuthenticationException {
//TODO: add corresponding log message about method login was called
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TODO comment found: 'TODO: add corresponding log message about method login was called' - but logger.info is already added on line 14. Checklist requires removing all TODO comments before submitting.


@Override
public User login(String login, String password) throws AuthenticationException {
//TODO: add corresponding log message about method login was called
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TODO comment found: 'TODO: add log message about method completeOrder was called' - but logger.info is already added on line 14. Remove this TODO.


@Override
public Order completeOrder(Long userId) {
// TODO: add log message about method completeOrder was called
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist item #1 violation: TODO comments should be removed before submitting the solution. The log message has already been added on line 16, but the TODO comment remains.

@@ -25,6 +30,7 @@ private List<Product> getAllProductsFromShoppingCart(Long userId) {
Product xiaomi = new Product("Xiaomi 12", BigDecimal.valueOf(499));
List<Product> products = List.of(iphone, macBook, xiaomi);
// TODO: add log message about successful fetched data from DB
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist item #1 violation: TODO comments should be removed before submitting the solution. The log message has already been added on line 33, but the TODO comment remains.

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 logger implementation is complete and meets all functional requirements. All System.out.println() and e.printStackTrace() statements have been successfully replaced with appropriate logger methods, log messages include parameter values, the .gitignore excludes log files, and no TODO comments remain in the codebase. The minor empty line formatting concern mentioned in the file comment is a cosmetic issue that does not impact functionality or task completion. These style concerns are typically handled by linters and do not constitute a blocking issue for approval. I am approving your solution. Your implementation demonstrates proper understanding of logging best practices, and all core requirements have been satisfied.


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

Footnotes

  1. Rate AI review example

logger.info("Successfully fetched products from DB for userId: {}", userId);
return products;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Extra empty line at end of file - remove line 30 for compliance with checklist requirement about empty lines at the end of files

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