This is an automated email from the ASF dual-hosted git repository. tilman pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tika.git
commit 0e68f22993be31b560a37cbd9cca9896c947b632 Author: Tilman Hausherr <til...@apache.org> AuthorDate: Sat Aug 10 14:26:56 2024 +0200 TIKA-4290: replace deprecated; use convention --- .../java/org/apache/tika/parser/code/SourceCodeParser.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-code-module/src/main/java/org/apache/tika/parser/code/SourceCodeParser.java b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-code-module/src/main/java/org/apache/tika/parser/code/SourceCodeParser.java index 65452b5d1..a3d2a4b48 100644 --- a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-code-module/src/main/java/org/apache/tika/parser/code/SourceCodeParser.java +++ b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-code-module/src/main/java/org/apache/tika/parser/code/SourceCodeParser.java @@ -16,9 +16,9 @@ */ package org.apache.tika.parser.code; -import static com.uwyn.jhighlight.renderer.XhtmlRendererFactory.CPP; -import static com.uwyn.jhighlight.renderer.XhtmlRendererFactory.GROOVY; -import static com.uwyn.jhighlight.renderer.XhtmlRendererFactory.JAVA; +import static org.codelibs.jhighlight.renderer.XhtmlRendererFactory.CPP; +import static org.codelibs.jhighlight.renderer.XhtmlRendererFactory.GROOVY; +import static org.codelibs.jhighlight.renderer.XhtmlRendererFactory.JAVA; import java.io.IOException; import java.io.InputStream; @@ -30,11 +30,11 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.uwyn.jhighlight.renderer.Renderer; -import com.uwyn.jhighlight.renderer.XhtmlRendererFactory; import org.apache.commons.io.input.CloseShieldInputStream; import org.ccil.cowan.tagsoup.HTMLSchema; import org.ccil.cowan.tagsoup.Schema; +import org.codelibs.jhighlight.renderer.Renderer; +import org.codelibs.jhighlight.renderer.XhtmlRendererFactory; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -59,7 +59,7 @@ public class SourceCodeParser extends AbstractEncodingDetectorParser { private static final long serialVersionUID = -4543476498190054160L; - private static final Pattern authorPattern = Pattern.compile("(?im)@author (.*) *$"); + private static final Pattern AUTHORPATTERN = Pattern.compile("(?im)@author (.*) *$"); private static final Map<MediaType, String> TYPES_TO_RENDERER = new HashMap<MediaType, String>() { @@ -139,7 +139,7 @@ public class SourceCodeParser extends AbstractEncodingDetectorParser { private String parserAuthor(String line) { - Matcher m = authorPattern.matcher(line); + Matcher m = AUTHORPATTERN.matcher(line); if (m.find()) { return m.group(1).trim(); }