aboutsummaryrefslogtreecommitdiffstats
path: root/ooxml/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2021-04-06 06:10:19 +0000
committerDominik Stadler <centic@apache.org>2021-04-06 06:10:19 +0000
commit51b04fc690cbeb8859aca8ad049bb8aea94db0dd (patch)
treeb34876cfb022908a853527acf2a35eefaaa73b6b /ooxml/src
parent9e792f89a2d299e9de0c96c8a6398b32929b2042 (diff)
downloadpoi-51b04fc690cbeb8859aca8ad049bb8aea94db0dd.tar.gz
poi-51b04fc690cbeb8859aca8ad049bb8aea94db0dd.zip
Apply some IDE suggestions, improve exception message, add some JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888415 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'ooxml/src')
-rw-r--r--ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java b/ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
index 5b356843c8..143e958749 100644
--- a/ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
+++ b/ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
@@ -79,7 +79,7 @@ public abstract class ContentTypeManager {
/**
* Default content type tree. <Extension, ContentType>
*/
- private TreeMap<String, String> defaultContentType;
+ private final TreeMap<String, String> defaultContentType;
/**
* Override content type tree.
@@ -286,7 +286,7 @@ public abstract class ContentTypeManager {
throw new IllegalArgumentException("contentType");
}
- return (this.defaultContentType.containsValue(contentType) ||
+ return (this.defaultContentType.containsValue(contentType) ||
(this.overrideContentType != null && this.overrideContentType.containsValue(contentType)));
}
@@ -353,9 +353,9 @@ public abstract class ContentTypeManager {
*/
if (this.container != null && this.container.getPart(partName) != null) {
throw new OpenXML4JRuntimeException(
- "Rule M2.4 exception : Part \'"
+ "Rule M2.4 exception : Part '"
+ partName
- + "\' not found - this error should NEVER happen!\n"
+ + "' not found - this error should NEVER happen!\n"
+ "Check that your code is closing the open resources in the correct order prior to filing a bug report.\n"
+ "If you can provide the triggering file, then please raise a bug at https://bz.apache.org/bugzilla/enter_bug.cgi?product=POI and attach the file that triggers it, thanks!");
}