#2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve chec…#2464
Conversation
remove FileSelectorJFrame.java to resolve checkstyle issue
add refactored file with correct filename to resolve checkstyle issue
| this.eventListener = listener; | ||
| } | ||
|
|
||
| public final void removeListener(final ThreadCompleteListener listener) { |
There was a problem hiding this comment.
Var: Unnecessary 'final' modifier.
| public final void removeListener(final ThreadCompleteListener listener) { | |
| public final void removeListener(ThreadCompleteListener listener) { |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| completed(); | ||
| } | ||
|
|
||
| public final void addListener(final ThreadCompleteListener listener) { |
There was a problem hiding this comment.
Var: Unnecessary 'final' modifier.
| public final void addListener(final ThreadCompleteListener listener) { | |
| public final void addListener(ThreadCompleteListener listener) { |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| @Override | ||
| public void run() { | ||
| var currentTime = System.currentTimeMillis(); | ||
| var endTime = currentTime + (eventTime * 1000); |
There was a problem hiding this comment.
NarrowCalculation: This product of integers could overflow before being implicitly cast to a long.
| var endTime = currentTime + (eventTime * 1000); | |
| var endTime = currentTime + (eventTime * 1000L); |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| this.eventListener = listener; | ||
| } | ||
|
|
||
| public final void removeListener(final ThreadCompleteListener listener) { |
There was a problem hiding this comment.
UnnecessaryFinal: Since Java 8, it's been unnecessary to make local variables and parameters final for use in lambdas or anonymous classes. Marking them as final is weakly discouraged, as it adds a fair amount of noise for minimal benefit.
| public final void removeListener(final ThreadCompleteListener listener) { | |
| public final void removeListener( ThreadCompleteListener listener) { |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| completed(); | ||
| } | ||
|
|
||
| public final void addListener(final ThreadCompleteListener listener) { |
There was a problem hiding this comment.
UnnecessaryFinal: Since Java 8, it's been unnecessary to make local variables and parameters final for use in lambdas or anonymous classes. Marking them as final is weakly discouraged, as it adds a fair amount of noise for minimal benefit.
| public final void addListener(final ThreadCompleteListener listener) { | |
| public final void addListener( ThreadCompleteListener listener) { |
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| this.touches(allBubbles.get(otherId))) { //the bubbles touch | ||
| if (allBubbles.get(otherId) != null //the bubble hasn't been popped yet | ||
| && this.id != otherId //the two bubbles are not the same | ||
| && this.touches(allBubbles.get(otherId))) { //the bubbles touch |
There was a problem hiding this comment.
NULL_DEREFERENCE: object returned by allBubbles.get(valueOf(otherId)) could be null and is dereferenced by call to touches(...) at line 73.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| @@ -31,10 +31,10 @@ | |||
| * GHobbits. | |||
| */ | |||
| @Slf4j | |||
There was a problem hiding this comment.
💬 19 similar findings have been found in this PR
UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.
| @Slf4j | |
| LoggerFactory |
🔎 Expand here to view all instances of this finding
| File Path | Line Number |
|---|---|
| observer/src/main/java/com/iluwatar/observer/generic/GenWeather.java | 33 |
| observer/src/main/java/com/iluwatar/observer/generic/GenOrcs.java | 33 |
| event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/AsyncEvent.java | 34 |
| observer/src/main/java/com/iluwatar/observer/generic/GenWeather.java | 33 |
| observer/src/main/java/com/iluwatar/observer/generic/GenHobbits.java | 33 |
| event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/AsyncEvent.java | 34 |
| observer/src/main/java/com/iluwatar/observer/generic/GenOrcs.java | 33 |
| observer/src/main/java/com/iluwatar/observer/generic/GenOrcs.java | 33 |
| event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/AsyncEvent.java | 34 |
| event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/AsyncEvent.java | 40 |
Showing 10 of 19 findings. Visit the Lift Web Console to see all.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/iluwatar/java-design-patterns/2464.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diffWant it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/iluwatar/java-design-patterns/2464.diff | git applyOnce you're satisfied commit and push your changes in your project. Footnotes |
Build issue hotfixes
fix code smell from sonar report
add new testcases to improve the test coverage
| @@ -162,15 +161,15 @@ public void mouseClicked(final MouseEvent e) { | |||
| apply.addMouseListener(new MouseAdapter() { | |||
| @Override | |||
| public void mouseClicked(final MouseEvent e) { | |||
There was a problem hiding this comment.
💬 2 similar findings have been found in this PR
UnnecessaryFinal: Since Java 8, it's been unnecessary to make local variables and parameters final for use in lambdas or anonymous classes. Marking them as final is weakly discouraged, as it adds a fair amount of noise for minimal benefit.
| public void mouseClicked(final MouseEvent e) { | |
| public void mouseClicked( MouseEvent e) { |
🔎 Expand here to view all instances of this finding
| File Path | Line Number |
|---|---|
| presentation-model/src/main/java/com/iluwatar/presentationmodel/View.java | 171 |
| presentation-model/src/main/java/com/iluwatar/presentationmodel/View.java | 133 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
| @@ -133,7 +132,7 @@ public void createView() { | |||
| @Override | |||
| public void mouseClicked(final MouseEvent e) { | |||
There was a problem hiding this comment.
💬 2 similar findings have been found in this PR
Var: Unnecessary 'final' modifier.
| public void mouseClicked(final MouseEvent e) { | |
| public void mouseClicked(MouseEvent e) { |
🔎 Expand here to view all instances of this finding
| File Path | Line Number |
|---|---|
| presentation-model/src/main/java/com/iluwatar/presentationmodel/View.java | 163 |
| presentation-model/src/main/java/com/iluwatar/presentationmodel/View.java | 171 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
| Command | Usage |
|---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
…terns into build-issue-hotfixes
Build issue hotfixes
|
Kudos, SonarCloud Quality Gate passed! |
|
Looks good! Thank you for the contribution 🎉 @all-contributors please add @rahul-raj for code |
|
I couldn't determine any contributions to add, did you specify any contributions? I've put up a pull request to add @rahul-raj! 🎉 |








The intent of this PR is tp upgrade the checkstyle version from 3.1.0 to 3.2.0 and resolve all checkstyle issues.
Checkstyle issues resolved ->
Note ->
Added
<suppress checks="RequireEmptyLineBeforeBlockTagGroup" files=".*\.java"/>in the suppressions.This is to ignore line space requirement on the JavaDoc section.
There are two reasons behind this new suppression rule:
For me, this is not super important and unnecessary . But, if you think, it is required, then let me know. I will then go ahead and make those changes.
Sorry about the multiple commits as there was an existing
etc/directory which was removed in the checkin and I added it back. Also, there was a fileFileSelectorJFrame.javathat was renamed toFileSelectorJframe.javain favor of checkstyle. But it wasn't checked-in for some strange reason. I fixed that as well.