From fb08f3a88c9b324e63a3db3ce54f81d441f1f953 Mon Sep 17 00:00:00 2001 From: Martin Ledvinka Date: Mon, 14 Oct 2024 16:08:36 +0200 Subject: [PATCH] Minor log addition to UnconfirmedTermOccurrenceRemover. --- .../document/html/UnconfirmedTermOccurrenceRemover.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/cz/cvut/kbss/termit/service/document/html/UnconfirmedTermOccurrenceRemover.java b/src/main/java/cz/cvut/kbss/termit/service/document/html/UnconfirmedTermOccurrenceRemover.java index 60baf9437..1292e0d68 100644 --- a/src/main/java/cz/cvut/kbss/termit/service/document/html/UnconfirmedTermOccurrenceRemover.java +++ b/src/main/java/cz/cvut/kbss/termit/service/document/html/UnconfirmedTermOccurrenceRemover.java @@ -3,10 +3,13 @@ import cz.cvut.kbss.termit.exception.FileContentProcessingException; import cz.cvut.kbss.termit.util.TypeAwareByteArrayResource; import cz.cvut.kbss.termit.util.TypeAwareResource; +import jakarta.annotation.Nonnull; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Node; import org.jsoup.select.Elements; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; @@ -19,6 +22,7 @@ */ public class UnconfirmedTermOccurrenceRemover { + private static final Logger LOG = LoggerFactory.getLogger(UnconfirmedTermOccurrenceRemover.class); /** * Removes unconfirmed term occurrences from the specified input. @@ -31,7 +35,8 @@ public class UnconfirmedTermOccurrenceRemover { * @param input Input to process * @return Processed content */ - public TypeAwareResource removeUnconfirmedOccurrences(TypeAwareResource input) { + public TypeAwareResource removeUnconfirmedOccurrences(@Nonnull TypeAwareResource input) { + LOG.trace("Removing unconfirmed occurrences from file {}.", input.getFilename()); try { final Document doc = Jsoup.parse(input.getInputStream(), StandardCharsets.UTF_8.name(), ""); doc.outputSettings().prettyPrint(false);