Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Tika 1.24.1 #12506

Merged
merged 1 commit into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<zookeeper.version>3.5.7</zookeeper.version>
<!-- Scala is used by Kafka so we need to choose a compatible version -->
<scala.version>2.12.9</scala.version>
<tika.version>1.22</tika.version>
<tika.version>1.24.1</tika.version>
<ooxml-schemas.version>1.4</ooxml-schemas.version>
<aws-lambda-java.version>1.2.1</aws-lambda-java.version>
<aws-lambda-java-events.version>3.3.1</aws-lambda-java-events.version>
Expand Down Expand Up @@ -2476,6 +2476,10 @@
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<version>${tika.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ public void testUnresolvableCustomAbbreviation() throws Exception {

@Test
public void testAllSupportedParserNames() throws Exception {
assertEquals(69, getParserNames(null, null).size());
assertEquals(72, getParserNames(null, null).size());
}

@Test
public void testSupportedParserNamesWithTikaConfigPath() throws Exception {
Set<String> names = getParserNames("tika-config.xml", "pdf");
assertEquals(69, names.size());
assertEquals(72, names.size());
}

@Test
Expand Down
5 changes: 5 additions & 0 deletions extensions/tika/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
<groupId>org.jboss.logging</groupId>
<artifactId>commons-logging-jboss-logging</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package io.quarkus.tika.graalvm;

@com.oracle.svm.core.annotate.Substitute
@com.oracle.svm.core.annotate.TargetClass(className = "org.apache.poi.poifs.nio.CleanerUtil")
public final class CleanerNotSupportedSubstitution {

/**
* <code>true</code>, if this platform supports unmapping mmapped files.
*/
public static final boolean UNMAP_SUPPORTED = false;

/**
* if {@link #UNMAP_SUPPORTED} is {@code false}, this contains the reason
* why unmapping is not supported.
*/
public static final String UNMAP_NOT_SUPPORTED_REASON = "Not supported on GraalVM native-image";

private static final org.apache.poi.poifs.nio.CleanerUtil.BufferCleaner CLEANER = null;

/**
* Reference to a BufferCleaner that does unmapping.
*
* @return {@code null} if not supported.
*/
public static org.apache.poi.poifs.nio.CleanerUtil.BufferCleaner getCleaner() {
return CLEANER;
}

}