aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2020-11-01 09:21:16 +0000
committerDominik Stadler <centic@apache.org>2020-11-01 09:21:16 +0000
commit5226ed80dd87ca47e3f97798e974b4235ad3ba75 (patch)
treecb73f455bd873d58f9747721d9a5f44f47f89565 /src/java
parenta080d2b0983c7b385e331a620fd5867741f3b7d6 (diff)
downloadpoi-5226ed80dd87ca47e3f97798e974b4235ad3ba75.tar.gz
poi-5226ed80dd87ca47e3f97798e974b4235ad3ba75.zip
Improve error messages on missing Factory-implementations, fix Sonar issues and IDE warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883035 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/extractor/ExtractorFactory.java6
-rw-r--r--src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/java/org/apache/poi/extractor/ExtractorFactory.java b/src/java/org/apache/poi/extractor/ExtractorFactory.java
index a908a73085..0833535189 100644
--- a/src/java/org/apache/poi/extractor/ExtractorFactory.java
+++ b/src/java/org/apache/poi/extractor/ExtractorFactory.java
@@ -307,8 +307,10 @@ public final class ExtractorFactory {
}
}
}
- throw new IOException("Your InputStream was neither an OLE2 stream, nor an OOXML stream " +
- "or you haven't provide the poi-ooxml*.jar and/or poi-scratchpad*.jar in the classpath/modulepath - FileMagic: "+fm);
+ throw new IOException(
+ "Your InputStream was neither an OLE2 stream, nor an OOXML stream " +
+ "or you haven't provide the poi-ooxml*.jar and/or poi-scratchpad*.jar in the classpath/modulepath - FileMagic: " + fm +
+ ", providers: " + Singleton.INSTANCE.provider);
}
public static void addProvider(ExtractorProvider provider){
diff --git a/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java b/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java
index c0f376f65f..b730731f7c 100644
--- a/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java
+++ b/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java
@@ -296,7 +296,8 @@ public final class WorkbookFactory {
}
}
throw new IOException("Your InputStream was neither an OLE2 stream, nor an OOXML stream " +
- "or you haven't provide the poi-ooxml*.jar in the classpath/modulepath - FileMagic: "+fm);
+ "or you haven't provide the poi-ooxml*.jar in the classpath/modulepath - FileMagic: " + fm +
+ ", having providers: " + Singleton.INSTANCE.provider);
}
public static void addProvider(WorkbookProvider provider){