Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit95f2c19

Browse files
committed
Sonar bug fixes using Yoda condition in equals expression when comparing String literal with String object.
Using try-with-resources if we use Scanner to close the underlying stream is a good practice to handle resources.Minimal refactor.
1 parent120033b commit95f2c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static void main(String[] args) {
6767
addFundsToLotteryAccount(bank,scanner);
6868
}elseif ("3".equals(cmd)) {
6969
submitTicket(service,scanner);
70-
}elseif (cmd.equals("4")) {
70+
}elseif ("4".equals(cmd)) {
7171
checkTicket(service,scanner);
7272
}elseif ("5".equals(cmd)) {
7373
exit =true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp