From 7ed50f6d9ff1e34fab57dbf1d925a187c5cd6ef8 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 11 Nov 2021 14:45:36 +0100 Subject: [PATCH] changes in TextLogik.java --- src/TextLogik.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/TextLogik.java b/src/TextLogik.java index 74e5ffa..38a6aea 100644 --- a/src/TextLogik.java +++ b/src/TextLogik.java @@ -69,11 +69,10 @@ public class TextLogik { break; case "REPLACE": if (command.length == 1){ - text.replace(TextInput.getTextInput(), TextInput.getTextInput()); + checkIfSuccess(text.replace(TextInput.getTextInput(), TextInput.getTextInput())); }else if(isNumeric(command[1])) { int line = Integer.parseInt(command[1]); - - text.replace(line, TextInput.getTextInput(), TextInput.getTextInput()); + checkIfSuccess(text.replace(line, TextInput.getTextInput(), TextInput.getTextInput())); }else { textOutput.errorInvalidCommand(); }