Skip to content

Commit

Permalink
TIKA-4290: replace deprecated, add override
Browse files Browse the repository at this point in the history
  • Loading branch information
THausherr committed Aug 10, 2024
1 parent 16fd1f4 commit 9838502
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ private static MediaType getMediaType(CompressorInputStream stream) {
}


@Override
public Set<MediaType> getSupportedTypes(ParseContext context) {
return SUPPORTED_TYPES;
}

@Override
public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
ParseContext context) throws IOException, SAXException, TikaException {
// At the end we want to close the compression stream to release
Expand Down Expand Up @@ -217,7 +219,7 @@ public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
name.endsWith(".zlib") || name.endsWith(".pack") || name.endsWith(".br")) {
name = name.substring(0, name.lastIndexOf("."));
} else if (name.length() > 0) {
name = GzipUtils.getUncompressedFilename(name);
name = GzipUtils.getUncompressedFileName(name);
}
entrydata.set(TikaCoreProperties.RESOURCE_NAME_KEY, name);
}
Expand Down

0 comments on commit 9838502

Please sign in to comment.