Browse Source

Refactored Class and Test File

dev
Adem Berber 2 years ago
parent
commit
e8f46e214a
  1. 12
      projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java

12
projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Games.java

@ -34,8 +34,6 @@ public class Games {
while (resultSet.next()) { while (resultSet.next()) {
String gameName = resultSet.getString("Game_Name"); String gameName = resultSet.getString("Game_Name");
result += gameName + ", "; result += gameName + ", ";
} }
@ -687,8 +685,6 @@ public class Games {
boolean spikeChun = false; boolean spikeChun = false;
boolean bandaiNamco = false; boolean bandaiNamco = false;
boolean activision = false; boolean activision = false;
boolean whileSwitchOne = true;
boolean whileSwitchTwo = true;
try { try {
Connection connection = DriverManager.getConnection(databaseURL); Connection connection = DriverManager.getConnection(databaseURL);
@ -701,8 +697,8 @@ public class Games {
String gamePublisherJp = resultSet.getString("Game_Publisher_JP"); String gamePublisherJp = resultSet.getString("Game_Publisher_JP");
String gamePublisherNa = resultSet.getString("Game_Publisher_NA"); String gamePublisherNa = resultSet.getString("Game_Publisher_NA");
while (whileSwitchOne) {
while (whileSwitchTwo) {
while (true) {
while (true) {
if (sega && gamePublisherEu.equals("Sega")) { if (sega && gamePublisherEu.equals("Sega")) {
break; break;
} else if (atlus && gamePublisherEu.equals("Atlus")) { } else if (atlus && gamePublisherEu.equals("Atlus")) {
@ -846,8 +842,6 @@ public class Games {
result += gamePublisherNa + ", "; result += gamePublisherNa + ", ";
} }
statement.close(); statement.close();
connection.close(); connection.close();
@ -1016,7 +1010,7 @@ public class Games {
if (gameReleaseAu == null) { if (gameReleaseAu == null) {
result += gameName + ", ";
result += gameName + ", ";
} }
} }

Loading…
Cancel
Save