Skip to content

Commit

Permalink
Update to Tika 1.24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sberyozkin committed Oct 7, 2020
1 parent 56dd01a commit 80da637
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
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;
}

}

0 comments on commit 80da637

Please sign in to comment.