Skip to content
Snippets Groups Projects
Commit bbae462d authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Removed print statements

parent ff145246
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,6 @@ public class FileHandlingSelectedBudget {
*/
public static String readSelectedBudget(String fileDestination) throws IOException {
System.out.println("Reading current file: " + fileDestination
+ selectedBudgetFileType);
try (BufferedReader br = new BufferedReader(new FileReader(fileDestination
+ selectedBudgetFileType))) {
return br.readLine();
......@@ -53,7 +50,6 @@ public class FileHandlingSelectedBudget {
try (BufferedWriter bw = new BufferedWriter(new FileWriter(fileDestination
+ selectedBudgetFileType))) {
bw.write(budgetName);
System.out.println("-----Budget name: " + budgetName);
} catch (IOException ex) {
throw new IOException("Error writing to file: " + "SelectedBudget.current");
}
......@@ -67,8 +63,6 @@ public class FileHandlingSelectedBudget {
* @throws IOException if an input or output exception occurred.
*/
public static void clearSelectedBudget(String fileDestination) throws IOException {
System.out.println("Clearing current file from: " + fileDestination
+ selectedBudgetFileType);
try (BufferedWriter bw = new BufferedWriter(new FileWriter(fileDestination
+ selectedBudgetFileType))) {
bw.write("");
......@@ -99,9 +93,7 @@ public class FileHandlingSelectedBudget {
* @return True, if a directory is successfully created. Else, returns false.
*/
public static boolean createBudgetDirectory(String budgetId) {
System.out.println("Creating directory: " + budgetId);
File f = new File(budgetId);
//f.mkdirs();
return f.mkdirs();
}
......@@ -116,7 +108,6 @@ public class FileHandlingSelectedBudget {
*/
public static boolean deleteBudgetDirectory(String budgetDestination) {
File targetDirectory = new File(budgetDestination);
System.out.println("Deleting directory:" + targetDirectory.getPath());
String[] entries = targetDirectory.list();
assert entries != null;
......@@ -171,8 +162,6 @@ public class FileHandlingSelectedBudget {
*/
public static boolean createNewBudgetFile(String budgetDestination, String budgetFileTitle)
throws IOException {
System.out.println("Budget filePath: " + budgetDestination + "/" + budgetFileTitle
+ budgetFileType);
File budgetFile = new File(
budgetDestination + "/" + budgetFileTitle + budgetFileType);
return budgetFile.createNewFile();
......
......@@ -100,7 +100,6 @@ public class FileHandler {
* @return A recipe register object read from file.
*/
public static RecipeRegister readRecipeRegister(String fileDestination) throws IOException {
System.out.println(fileDestination);
File file = new File(fileDestination + fileType);
//TODO: Provide 'starter' for recipes
......@@ -118,7 +117,6 @@ public class FileHandler {
}
}
} catch (FileNotFoundException e) {
System.out.println("The file was not found.");
return null;
}
return register;
......@@ -137,7 +135,6 @@ public class FileHandler {
public static Recipe readRecipe(String fileDestination) {
Scanner sc = new Scanner(fileDestination);
System.out.println(fileDestination);
Recipe recipe;
String instructions = "None";
String recipeName = sc.nextLine().strip();
......@@ -183,7 +180,6 @@ public class FileHandler {
public static void writeIngredientsAtHand(IngredientsAtHand ingredientsAtHand,
String fileDestination) throws IOException {
StringBuilder sb = new StringBuilder();
System.out.println("Write IAH: " + fileDestination + fileType);
try (FileWriter fileWriter = new FileWriter(fileDestination + fileType)) {
if (ingredientsAtHand == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment