Skip to content

Conversation

@starroli
Copy link
Owner

No description provided.

}
if (args.length > 0) {
System.out.println("Hello " + String.join(",", args) + "!");
System.out.println("How are you?");
Copy link
Owner Author

Choose a reason for hiding this comment

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

MAJOR Replace this usage of System.out or System.err by a logger. rule

public static void main(String[] args) {
String alternativeName = "Max";
try {
BigDecimal youShouldNotDoThis = new BigDecimal(1.5d);
Copy link
Owner Author

Choose a reason for hiding this comment

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

MAJOR Remove this unused "youShouldNotDoThis" local variable. rule

String alternativeName = "Max";
try {
BigDecimal youShouldNotDoThis = new BigDecimal(1.5d);
} catch (Throwable throwable) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

BLOCKER Catch Exception instead of Throwable. rule

try {
BigDecimal youShouldNotDoThis = new BigDecimal(1.5d);
} catch (Throwable throwable) {
System.err.println(throwable);
Copy link
Owner Author

Choose a reason for hiding this comment

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

MAJOR Replace this usage of System.out or System.err by a logger. rule

@starroli
Copy link
Owner Author

SonarQube analysis reported 4 issues

  • BLOCKER 1 blocker
  • MAJOR 3 major

Watch the comments in this conversation to review them.

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