Skip to content
Snippets Groups Projects
Commit 606e441b authored by Rohith Kumar Shanmuganathan's avatar Rohith Kumar Shanmuganathan
Browse files

Update LogRead.java

parent 8c6970d9
No related branches found
No related tags found
No related merge requests found
......@@ -26,15 +26,15 @@ class LogRead {
execute(cmd);
} catch (Throwable e) {
if (e.getMessage() != null && e.getMessage().equals("integrity violation")) {
System.out.println(e.getMessage());
System.out.print(e.getMessage());
} else {
System.out.println("invalid");
System.out.print("invalid");
}
System.exit(255);
}
System.exit(0); // 255 for error, 0 success
}
System.out.println("invalid");
System.out.print("invalid");
System.exit(255);
}
......@@ -113,7 +113,7 @@ class LogRead {
for (String p : employees) {
res.append(p).append(",");
}
System.out.println(res.substring(0, res.length() - 1));
System.out.print(res.substring(0, res.length() - 1));
}
// Prints all guests found in the gallery
if (guests.size() > 0) {
......@@ -122,7 +122,7 @@ class LogRead {
for (String p : guests) {
res.append(p).append(",");
}
System.out.println(res.substring(0, res.length() - 1));
System.out.print(res.substring(0, res.length() - 1));
}
//Sorts the rooms the guests are in and prints them to the console
......@@ -136,7 +136,7 @@ class LogRead {
names.append(p.getName()).append(",");
}
names = new StringBuilder(names.substring(0, names.length() - 1));
System.out.println(sortedRoomNumbers.get(i) + ": " + names);
System.out.print(sortedRoomNumbers.get(i) + ": " + names);
}
}
......@@ -168,7 +168,7 @@ class LogRead {
}
if (visitedRooms.size() > 0) {
System.out.println(data.substring(0, data.length() - 1));
System.out.print(data.substring(0, data.length() - 1));
}
}
......@@ -217,7 +217,7 @@ class LogRead {
}
}
System.out.println(finalValue);
System.out.print(finalValue);
}
/**
......@@ -280,7 +280,7 @@ class LogRead {
for (Integer room : result) {
data.append(room).append(",");
}
System.out.println(data.substring(0, data.length() - 1));
System.out.print(data.substring(0, data.length() - 1));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment