8297065: DerOutputStream operations should not throw IOExceptions

Reviewed-by: mullan, valeriep
This commit is contained in:
Weijun Wang 2022-11-29 12:57:46 +00:00
parent d83a07b72c
commit 2deb318c9f
109 changed files with 725 additions and 1112 deletions

View file

@ -25,7 +25,6 @@
package sun.security.util;
import java.io.IOException;
import java.math.BigInteger;
import java.security.spec.ECParameterSpec;
import java.security.spec.ECPoint;
@ -59,11 +58,7 @@ public final class NamedCurve extends ECParameterSpec {
this.oid = ko.value();
DerOutputStream out = new DerOutputStream();
try {
out.putOID(ObjectIdentifier.of(ko));
} catch (IOException e) {
throw new RuntimeException("Internal error", e);
}
out.putOID(ObjectIdentifier.of(ko));
encoded = out.toByteArray();
}