Cleanup unnecessary try/catch blocks
@@ -915,17 +915,9 @@ public static void readFully(byte[] buf, InputStream input)
}
public static ProtocolVersion readVersion(byte[] buf, int offset)
- throws IOException
- {
- try
{
return ProtocolVersion.get(buf[offset] & 0xFF, buf[offset + 1] & 0xFF);
}
- catch (RuntimeException e)
- {
- throw new TlsFatalAlert(AlertDescription.decode_error, e);
- }
- }
public static ProtocolVersion readVersion(InputStream input)
throws IOException
@@ -937,15 +929,8 @@ public static ProtocolVersion readVersion(InputStream input)
throw new EOFException();
}
- try
- {
return ProtocolVersion.get(i1, i2);
}
- catch (RuntimeException e)
- {
- throw new TlsFatalAlert(AlertDescription.decode_error, e);
- }
- }
public static ASN1Primitive readASN1Object(byte[] encoding) throws IOException
{
