fix: monitor pattern is not being built#1956
Merged
Merged
Conversation
86b1a2d to
e8c743a
Compare
e8c743a to
0a0b470
Compare
7394cb5 to
3e62424
Compare
97a8e9f to
779e007
Compare
Contributor
Author
Contributor
Author
|
@iluwatar The code coverage is 61% and SonarCloud requires > 80% of coverage. Can you guide me to improve the code coverage? |
Contributor
|
@arnabsen1729 Hi, you have to write tests that will pass througt the for loop and another test, that check if the exception is rised |
6890e2d to
db8f1a9
Compare
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
Author
|
Thanks @HattoriHenzo the code coverage increased to 85.7%. @iluwatar the PR is passing all the checks now ✔️ |
iluwatar
approved these changes
Apr 16, 2022
Owner
|
Many thanks for the monitor pattern fix! |
Contributor
|
I've put up a pull request to add @arnabsen1729! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Description
This PR is a continuation to #1873. The build was failing after the monitor module was added to the
pom.xmlfile because of checkstyle violations.Fixes #1871
Changes
File Structure
Previously the file structure for the
monitorwas: (thetestwas nested insidemain)For the other patterns, I noticed both the
testandmainwere insidesrc.So this PR updates it to :
Replaced the logger library
Replaced the
java.util.logging.Loggerwithlombok.extern.slf4j.Slf4j. With this change, we don't need theLoggermember variable anymore.Also, this statement is flagged as a Minor Codesmell by Sonarcloud.
java-design-patterns/monitor/src/main/java/com/iluwatar/monitor/Bank.java
Line 22 in c87689b
But with the
Slf4jlogger usage, it didn't show any error.Fix CheckStyle errors
There were a few checkstyle error fixes like:
Local Build Success Log