"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/main/java/org/apache/logging/log4j/core/net/SslSocketManager.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

SslSocketManager.java  (apache-log4j-2.11.1-src):SslSocketManager.java  (apache-log4j-2.11.2-src)
skipping to change at line 160 skipping to change at line 160
} else { } else {
socketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault(); socketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
} }
return socketFactory; return socketFactory;
} }
private static class SslSocketManagerFactory extends TcpSocketManagerFactory <SslSocketManager, SslFactoryData> { private static class SslSocketManagerFactory extends TcpSocketManagerFactory <SslSocketManager, SslFactoryData> {
@Override @Override
SslSocketManager createManager(final String name, OutputStream os, Socke t socket, InetAddress inetAddress, SslSocketManager createManager(final String name, final OutputStream os, final Socket socket, final InetAddress inetAddress,
final SslFactoryData data) { final SslFactoryData data) {
return new SslSocketManager(name, os, socket, data.sslConfiguration, inetAddress, data.host, data.port, return new SslSocketManager(name, os, socket, data.sslConfiguration, inetAddress, data.host, data.port,
data.connectTimeoutMillis, data.reconnectDelayMillis, data.i mmediateFail, data.layout, data.bufferSize, data.connectTimeoutMillis, data.reconnectDelayMillis, data.i mmediateFail, data.layout, data.bufferSize,
data.socketOptions); data.socketOptions);
} }
@Override @Override
Socket createSocket(final SslFactoryData data) throws IOException { Socket createSocket(final SslFactoryData data) throws IOException {
return SslSocketManager.createSocket(data.host, data.port, data.conn ectTimeoutMillis, data.sslConfiguration, return SslSocketManager.createSocket(data.host, data.port, data.conn ectTimeoutMillis, data.sslConfiguration,
data.socketOptions); data.socketOptions);
} }
} }
static Socket createSocket(final String host, int port, int connectTimeoutMi static Socket createSocket(final String host, final int port, final int conn
llis, ectTimeoutMillis,
final SslConfiguration sslConfiguration, SocketOptions socketOptions final SslConfiguration sslConfiguration, final SocketOptions socketO
) throws IOException { ptions) throws IOException {
final SSLSocketFactory socketFactory = createSslSocketFactory(sslConfigu ration); final SSLSocketFactory socketFactory = createSslSocketFactory(sslConfigu ration);
final SSLSocket socket = (SSLSocket) socketFactory.createSocket(); final SSLSocket socket = (SSLSocket) socketFactory.createSocket();
if (socketOptions != null) { if (socketOptions != null) {
// Not sure which options must be applied before or after the connec t() call. // Not sure which options must be applied before or after the connec t() call.
socketOptions.apply(socket); socketOptions.apply(socket);
} }
socket.connect(new InetSocketAddress(host, port), connectTimeoutMillis); socket.connect(new InetSocketAddress(host, port), connectTimeoutMillis);
if (socketOptions != null) { if (socketOptions != null) {
// Not sure which options must be applied before or after the connec t() call. // Not sure which options must be applied before or after the connec t() call.
socketOptions.apply(socket); socketOptions.apply(socket);
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)