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

Commit36c6ce1

Browse files
authored
sonar fix: Update App.java (iluwatar#1896)
* Update App.javaSonar issue fix* Update App.java
1 parent22ddd57 commit36c6ce1

File tree

1 file changed

+6
-4
lines changed
  • factory-method/src/main/java/com/iluwatar/factory/method

1 file changed

+6
-4
lines changed

‎factory-method/src/main/java/com/iluwatar/factory/method/App.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
@Slf4j
4242
publicclassApp {
4343

44+
privatestaticfinalStringMANUFACTURED ="{} manufactured {}";
45+
4446
/**
4547
* Program entry point.
4648
* @param args command line args
@@ -49,14 +51,14 @@ public static void main(String[] args) {
4951

5052
Blacksmithblacksmith =newOrcBlacksmith();
5153
Weaponweapon =blacksmith.manufactureWeapon(WeaponType.SPEAR);
52-
LOGGER.info("{} manufactured {}",blacksmith,weapon);
54+
LOGGER.info(MANUFACTURED,blacksmith,weapon);
5355
weapon =blacksmith.manufactureWeapon(WeaponType.AXE);
54-
LOGGER.info("{} manufactured {}",blacksmith,weapon);
56+
LOGGER.info(MANUFACTURED,blacksmith,weapon);
5557

5658
blacksmith =newElfBlacksmith();
5759
weapon =blacksmith.manufactureWeapon(WeaponType.SPEAR);
58-
LOGGER.info("{} manufactured {}",blacksmith,weapon);
60+
LOGGER.info(MANUFACTURED,blacksmith,weapon);
5961
weapon =blacksmith.manufactureWeapon(WeaponType.AXE);
60-
LOGGER.info("{} manufactured {}",blacksmith,weapon);
62+
LOGGER.info(MANUFACTURED,blacksmith,weapon);
6163
}
6264
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp