You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2020/09/09 14:01:20 UTC
[tika] 01/06: Tika-3141 -- add empty environment variable handle
(#334)
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git
commit fd1926dd95d592afb6dce1b0da885f94482ce137
Author: Lee <55...@users.noreply.github.com>
AuthorDate: Wed Sep 9 21:22:06 2020 +0800
Tika-3141 -- add empty environment variable handle (#334)
---
tika-core/src/main/java/org/apache/tika/config/TikaConfig.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java b/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
index 18b3add..3499cc2 100644
--- a/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
+++ b/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
@@ -248,11 +248,11 @@ public class TikaConfig {
public TikaConfig() throws TikaException, IOException {
String config = System.getProperty("tika.config");
- if (config == null) {
+ if (config == null || config.trim().equals("")) {
config = System.getenv("TIKA_CONFIG");
}
- if (config == null) {
+ if (config == null || config.trim().equals("")) {
this.serviceLoader = new ServiceLoader();
this.mimeTypes = getDefaultMimeTypes(getContextClassLoader());
this.encodingDetector = getDefaultEncodingDetector(serviceLoader);