mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 12:58:37 +00:00
* #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve checkstyle issues * remove FileSelectorJFrame.java to resolve checkstyle issue * remove FileSelectorJFrame.java to resolve checkstyle issue * remove FileSelectorJFrame.java to resolve checkstyle issue * add refactored file with correct filename to resolve checkstyle issue * add the test data * change filenames from JFrame to Jframe for checkstyle * fix code smell from sonar report * add new testcases to improve the test coverage * remove code smell
This commit is contained in:
@@ -26,7 +26,6 @@ package com.iluwatar.activeobject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -58,7 +57,7 @@ public class App implements Runnable {
|
||||
public void run() {
|
||||
List<ActiveCreature> creatures = new ArrayList<>();
|
||||
try {
|
||||
for (int i = 0;i < NUM_CREATURES;i++) {
|
||||
for (int i = 0; i < NUM_CREATURES; i++) {
|
||||
creatures.add(new Orc(Orc.class.getSimpleName() + i));
|
||||
creatures.get(i).eat();
|
||||
creatures.get(i).roam();
|
||||
@@ -68,7 +67,7 @@ public class App implements Runnable {
|
||||
logger.error(e.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
} finally {
|
||||
for (int i = 0;i < NUM_CREATURES;i++) {
|
||||
for (int i = 0; i < NUM_CREATURES; i++) {
|
||||
creatures.get(i).kill(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user