Commit 9a74354a authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Use the trimmed line on the matchers

parent 3617ba1a
Pipeline #5874 passed with stage
in 2 minutes and 55 seconds
...@@ -271,9 +271,10 @@ class RuleImportService : IntentService("RuleImportService") { ...@@ -271,9 +271,10 @@ class RuleImportService : IntentService("RuleImportService") {
var ruleCount = 0 var ruleCount = 0
val sourceId = source.id val sourceId = source.id
BufferedReader(InputStreamReader(stream)).useLines { lines -> BufferedReader(InputStreamReader(stream)).useLines { lines ->
lines.forEach { line -> lines.forEach { _line ->
val line = _line.trim()
if (!isAborted) { if (!isAborted) {
if (parsers.isNotEmpty() && !line.trim().startsWith("#") && !line.trim().startsWith("!") && !line.isBlank()) { if (parsers.isNotEmpty() && !line.startsWith("#") && !line.startsWith("!") && !line.isBlank()) {
lineCount++ lineCount++
val iterator = parsers.iterator() val iterator = parsers.iterator()
for ((matcher, hosts) in iterator) { for ((matcher, hosts) in iterator) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment