Skip to content

Commit fb776cc

Browse files
committed
Reverting the change made for test only
1 parent 8483e3f commit fb776cc

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/main/scala/za/co/absa/statusboard/utils/RegexMatcher.scala

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,6 @@
1616

1717
package za.co.absa.statusboard.utils
1818

19-
import org.slf4j.LoggerFactory
20-
2119
case class RegexMatcher(regex: String) {
22-
private val logger = LoggerFactory.getLogger(getClass)
23-
24-
def unapply(s: String): Boolean = {
25-
// Added logging + an additional branch (empty regex) to influence Jacoco coverage metrics.
26-
if (regex.trim.isEmpty) { // New branch likely uncovered by existing tests
27-
logger.warn("Empty regex supplied to RegexMatcher. Input='{}' - returning false", s)
28-
false
29-
} else {
30-
val matched = s.matches(regex)
31-
if (matched) {
32-
logger.debug("Regex '{}' matched input '{}'", regex, s)
33-
} else if (logger.isTraceEnabled) {
34-
logger.trace("Regex '{}' did not match input '{}'", regex, s)
35-
}
36-
matched
37-
}
38-
}
20+
def unapply(s: String): Boolean = s.matches(regex)
3921
}

0 commit comments

Comments
 (0)