From 3ef293dbc1ea6ca725754a1372f0d07fe36b6a6a Mon Sep 17 00:00:00 2001 From: Jamil Nimeh Date: Fri, 2 Oct 2015 11:14:31 -0700 Subject: [PATCH] 8138704: CertStatusReqItemV2 should not implement StatusRequest interface Sets class to have proper inheritance and reduces visibility of length and send methods. Reviewed-by: mullan --- .../classes/sun/security/ssl/CertStatusReqItemV2.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java index b031651b71c..1f4ee77c92f 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java @@ -49,7 +49,7 @@ import javax.net.ssl.SSLException; * enum { ocsp(1), ocsp_multi(2), (255) } CertificateStatusType; */ -final class CertStatusReqItemV2 implements StatusRequest { +final class CertStatusReqItemV2 { private final StatusRequestType statReqType; private final StatusRequest request; @@ -144,8 +144,7 @@ final class CertStatusReqItemV2 implements StatusRequest { * * @return the encoded length of this {@code CertStatusReqItemV2} */ - @Override - public int length() { + int length() { // The length is the the status type (1 byte) + the request length // field (2 bytes) + the StatusRequest data length. return request.length() + 3; @@ -159,8 +158,7 @@ final class CertStatusReqItemV2 implements StatusRequest { * * @throws IOException if any errors occur during the encoding process */ - @Override - public void send(HandshakeOutStream s) throws IOException { + void send(HandshakeOutStream s) throws IOException { s.putInt8(statReqType.id); s.putInt16(request.length()); request.send(s);