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 2018/09/21 20:40:12 UTC
[tika] branch branch_1x updated: TIKA-2731 via jkakvas. This closes
250.
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
The following commit(s) were added to refs/heads/branch_1x by this push:
new f6c38ef TIKA-2731 via jkakvas. This closes 250.
f6c38ef is described below
commit f6c38efc9eefa1b872bd64ad2f25e363919121da
Author: TALLISON <ta...@apache.org>
AuthorDate: Fri Sep 21 16:39:50 2018 -0400
TIKA-2731 via jkakvas. This closes 250.
---
.../src/main/java/org/apache/tika/utils/XMLReaderUtils.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java b/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
index 0069a9a..4ccdad4 100644
--- a/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
+++ b/tika-core/src/main/java/org/apache/tika/utils/XMLReaderUtils.java
@@ -80,14 +80,13 @@ public class XMLReaderUtils implements Serializable {
private static int MAX_ENTITY_EXPANSIONS = determineMaxEntityExpansions();
private static int determineMaxEntityExpansions() {
- Properties properties = System.getProperties();
- if (properties != null && properties.containsKey(JAXP_ENTITY_EXPANSION_LIMIT_KEY)) {
+ String expansionLimit = System.getProperty(JAXP_ENTITY_EXPANSION_LIMIT_KEY);
+ if (expansionLimit != null) {
try {
- return Integer.parseInt(properties.getProperty(JAXP_ENTITY_EXPANSION_LIMIT_KEY));
+ return Integer.parseInt(expansionLimit);
} catch (NumberFormatException e) {
- LOG.log(Level.WARNING, "Couldn't parse an integer for the entity expansion limit:"+
- properties.getProperty(JAXP_ENTITY_EXPANSION_LIMIT_KEY)+
- "; backing off to default: "+DEFAULT_MAX_ENTITY_EXPANSIONS);
+ LOG.log(Level.WARNING, "Couldn't parse an integer for the entity expansion limit:" + expansionLimit +
+ "; backing off to default: " + DEFAULT_MAX_ENTITY_EXPANSIONS);
}
}
return DEFAULT_MAX_ENTITY_EXPANSIONS;