From a6ddce2ee10dce30c4ac8542a27b114dbd3a4b85 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 10 Nov 2022 19:24:19 +0100 Subject: [PATCH] Fixed bad category list building. --- src/fr/devinsy/statoolinfos/core/Category.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/core/Category.java b/src/fr/devinsy/statoolinfos/core/Category.java index 1b7e565..5170bd2 100644 --- a/src/fr/devinsy/statoolinfos/core/Category.java +++ b/src/fr/devinsy/statoolinfos/core/Category.java @@ -128,14 +128,7 @@ public class Category { boolean result; - if (this.softwares.containsIgnoreCase(service.getSoftwareName())) - { - result = true; - } - else - { - result = false; - } + result = matchesSoftware(service.getSoftwareName()); // return result; @@ -161,10 +154,10 @@ public class Category { if (iterator.hasNext()) { - String source1 = iterator.next(); - String source2 = StringUtils.stripAccents(source1).replaceAll("[\\W\\s]", ""); + String source = iterator.next(); + source = StringUtils.stripAccents(source).replaceAll("[\\W\\s]", ""); - if (StringUtils.equalsIgnoreCase(target, source2)) + if (StringUtils.equalsIgnoreCase(target, source)) { ended = true; result = true;