From e94c45422b1075a6de517756f80a9aad1f1412fc Mon Sep 17 00:00:00 2001 From: Jack-Is-2048 <101245336+Jack-Is-2048@users.noreply.github.com> Date: Tue, 29 Mar 2022 21:22:15 +1100 Subject: [PATCH] Fixed Customer Validate method --- .../com/csit314/roadSideAssistance/Customer/Customer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/csit314/roadSideAssistance/Customer/Customer.java b/src/main/java/com/csit314/roadSideAssistance/Customer/Customer.java index b52b7bb..53cd84d 100644 --- a/src/main/java/com/csit314/roadSideAssistance/Customer/Customer.java +++ b/src/main/java/com/csit314/roadSideAssistance/Customer/Customer.java @@ -91,9 +91,9 @@ public String toString() { } public boolean validateCustomer() { - if (name == "" || email == "" || dob.isBefore(LocalDate.of(1920, Month.JANUARY, 1))) { + if (name.equals("") || email.equals("") || dob.isBefore(LocalDate.of(1920, Month.JANUARY, 1))) { return false; } return true; } -} +} \ No newline at end of file