Skip to content

Commit

Permalink
Remove unused internal method parameter
Browse files Browse the repository at this point in the history
The getSSLSocketFactory(...) method was being passed a boolean
value for whether or not to trust all certificates. That value
is not being used as the method instead goes directly to the
connection options via jdbcUrl.getOptions(). This patch removes
the unused parameter from the method and single invocation.
  • Loading branch information
sehrope committed Aug 8, 2015
1 parent faff539 commit 95f6f7c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -189,7 +189,7 @@ public class MySQLProtocol implements Protocol {

private InputStream localInfileInputStream;

private SSLSocketFactory getSSLSocketFactory(boolean trustServerCertificate) throws QueryException
private SSLSocketFactory getSSLSocketFactory() throws QueryException
{
if (!jdbcUrl.getOptions().trustServerCertificate
&& jdbcUrl.getOptions().serverSslCert == null) {
Expand Down Expand Up @@ -341,7 +341,7 @@ private void connect(String host, int port) throws QueryException, IOException{
AbbreviatedMySQLClientAuthPacket amcap = new AbbreviatedMySQLClientAuthPacket(capabilities);
amcap.send(writer);

SSLSocketFactory f = getSSLSocketFactory(jdbcUrl.getOptions().trustServerCertificate);
SSLSocketFactory f = getSSLSocketFactory();
SSLSocket sslSocket = (SSLSocket)f.createSocket(socket,
socket.getInetAddress().getHostAddress(), socket.getPort(), true);

Expand Down

0 comments on commit 95f6f7c

Please sign in to comment.