Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final #1061

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Nikolya777777777777
Copy link

No description provided.

Copy link

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

Thank you for your hard work on this pull request! 😊 While most of the code is well-structured and meets the task requirements, there is a critical issue that needs to be addressed before we can approve it. The login method in the AuthenticationServiceImpl class should throw an AuthenticationException when the password is incorrect, as indicated by the method signature. This is crucial for the functionality and security of the authentication process. Once this is resolved, your solution will be ready for approval. Keep up the great work, and I look forward to your updated submission! 🚀

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

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

Comment on lines 15 to 17
if (!user.getPassword().equals(password)) {
throw new AuthenticationException("Username or password are incorrect");
logger.error("Username or password are incorrect");
}

Choose a reason for hiding this comment

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

The login method should throw an AuthenticationException when the password is incorrect, as indicated by the method signature. Consider adding a throw statement here.

Copy link

@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

Great job on addressing the previous issues and aligning your code with the task requirements! 🎉

Your implementation of the logging mechanism using Log4j in both Main.java and OrderServiceImpl.java is well-structured and meets the guidelines. The .gitignore file is correctly set up to ignore log files, ensuring that unnecessary files are not pushed to GitHub. It's also commendable that you've replaced System.out.println() and e.printStackTrace() with logger methods, which is a best practice for maintaining clean and professional code.

The AuthenticationServiceImpl.java file now correctly throws an AuthenticationException when the password is incorrect, which was a critical issue in the previous review. This change is crucial for the functionality of your authentication system.

While there are no critical issues that need immediate attention, always remember to review any comments for potential improvements. This will help you refine your skills and produce even better code in the future. Keep up the great work, and continue learning from each experience! 🚀

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

Copy link

@okuzan okuzan left a comment

Choose a reason for hiding this comment

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

?? You deployed bookshop project in jv-logger PR?

@Nikolya777777777777
Copy link
Author

I answered to your question in jv-chat, please check, I didn't import anything, all these files were there at once, I changed pom.xml, added the log4j2.xml file and created loggers in the classes, added logger.debug, error and info. If I understood your question right)

Copy link

@Elena-Bruyako Elena-Bruyako left a comment

Choose a reason for hiding this comment

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

Task implemented correctly, but why there are so many files? revert changes in gitignore file

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.

4 participants