From 0060368e0aaa43e63613f342c3e8bc549292c181 Mon Sep 17 00:00:00 2001 From: Selim Eser <2211482@stud.hs-mannheim.de> Date: Sun, 16 Jun 2024 21:42:41 +0200 Subject: [PATCH] search method comparison logic fixed --- src/main/java/de/hs_mannheim/domain/System.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hs_mannheim/domain/System.java b/src/main/java/de/hs_mannheim/domain/System.java index 1bb68a8..9118362 100644 --- a/src/main/java/de/hs_mannheim/domain/System.java +++ b/src/main/java/de/hs_mannheim/domain/System.java @@ -279,7 +279,8 @@ public class System { String line; while ((line = reader.readLine()) != null && zip_set.size() < 200) { line = line.replace("\"", ""); - if (line.split(";")[0].contains(hometown_or_zip) || line.split(";")[1].contains(hometown_or_zip)) + if (line.split(";")[0].toUpperCase().startsWith(hometown_or_zip.toUpperCase()) + || line.split(";")[1].toUpperCase().startsWith(hometown_or_zip.toUpperCase())) zip_set.add(line); } } catch (Exception e) {