Skip to content

Commit 91fcaf5

Browse files
committed
updated to use newer Exceptions method.
1 parent fca6d71 commit 91fcaf5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

core/src/main/java/org/bouncycastle/crypto/util/DerUtil.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.bouncycastle.asn1.ASN1Primitive;
77
import org.bouncycastle.asn1.DEROctetString;
88
import org.bouncycastle.util.Arrays;
9+
import org.bouncycastle.util.Exceptions;
910

1011
class DerUtil
1112
{
@@ -27,13 +28,7 @@ static byte[] toByteArray(ASN1Primitive primitive)
2728
}
2829
catch (final IOException e)
2930
{
30-
throw new IllegalStateException("Cannot get encoding: " + e.getMessage())
31-
{
32-
public Throwable getCause()
33-
{
34-
return e;
35-
}
36-
};
31+
throw Exceptions.illegalStateException("Cannot get encoding: " + e.getMessage(), e)
3732
}
3833
}
3934
}

0 commit comments

Comments
 (0)