-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56dd01a
commit 80da637
Showing
4 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...s/tika/runtime/src/main/java/io/quarkus/tika/graalvm/CleanerNotSupportedSubstitution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |