Problems on createSocket method

Hi, I’m trying to compile Smack, but there is an error on XMPPConnection.

(void proceedTLSReceived() throws Exception) Line 799: socket = context.getSocketFactory().createSocket(plain,plain.getInetAddress().getHostName(), plain.getPort(), true);

On javax.net.SocketFactory class there is no overload to createSocket with a socket as parameter.

What I am doing wrong?