From e95dc5f0c8d8fe5320e0b1a09ed935ebabfe8395 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 26 Nov 2020 06:36:16 +0100 Subject: [PATCH] Fixed bad format property line management. --- src/fr/devinsy/statoolinfos/checker/PropertyChecker.java | 2 +- src/fr/devinsy/statoolinfos/properties/PathPropertyUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java index d9ca373..2bbd368 100644 --- a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java +++ b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java @@ -208,7 +208,7 @@ public class PropertyChecker { String line = iterator.next(); - if ((!StringUtils.isBlank(line)) && (!line.startsWith("#"))) + if ((!StringUtils.isBlank(line)) && (!line.startsWith("#")) && (line.contains("="))) { String[] tokens = line.split("=", 2); PathProperty property = new PathProperty(tokens[0].trim(), tokens[1].trim()); diff --git a/src/fr/devinsy/statoolinfos/properties/PathPropertyUtils.java b/src/fr/devinsy/statoolinfos/properties/PathPropertyUtils.java index a2dbbd1..67f857e 100644 --- a/src/fr/devinsy/statoolinfos/properties/PathPropertyUtils.java +++ b/src/fr/devinsy/statoolinfos/properties/PathPropertyUtils.java @@ -235,7 +235,7 @@ public class PathPropertyUtils ended = true; result = null; } - else if ((StringUtils.isNotBlank(line)) && (!line.startsWith("#"))) + else if ((StringUtils.isNotBlank(line)) && (!line.startsWith("#")) && (line.contains("="))) { ended = true; result = line;