From a264f7c3c361430a9b04ac02f45396a339dc12c6 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sat, 15 Feb 2014 10:43:58 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java b/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java index 6e5c913a3b..25f9b01e15 100644 --- a/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java +++ b/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java @@ -66,7 +66,7 @@ public class EncryptionInfo { try { eib = getBuilder(encryptionMode); } catch (Exception e) { - throw (IOException)new IOException().initCause(e); + throw new IOException(e); } eib.initialize(this, dis);