Permalink
Browse files

Instead of using initCause() when re-throwing exceptions, it leads to…

… better stacktraces if a simple constructor-argument is used

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1568614 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
poi-benchmark committed Feb 15, 2014
1 parent 8d6b1f1 commit 023fa18794e967e34030aff7241186efbb2dafd9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java
@@ -66,7 +66,7 @@ public EncryptionInfo(DirectoryNode dir) throws IOException {
try {
eib = getBuilder(encryptionMode);
} catch (Exception e) {
- throw (IOException)new IOException().initCause(e);
+ throw new IOException(e);
}
eib.initialize(this, dis);

0 comments on commit 023fa18

Please sign in to comment.