diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-23 09:28:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-23 09:31:05 +0200 |
commit | f126d7fb8fca4a1ae1e88afe99a0229b50e944d1 (patch) | |
tree | c0b1c5f18aaf56bdf077bb8057a407e15f0f6634 /swext | |
parent | c39a9240c550e9a3f403b5a08ec6e09ab204ebfe (diff) |
cid#1327459 BC: Bad casts of object references
Change-Id: Ibf80ea0a0f1afbd8269c79d7a7f6f0703567df94
Diffstat (limited to 'swext')
-rw-r--r-- | swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java b/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java index 5419fba2d024..edd2e104d968 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java @@ -175,11 +175,11 @@ class LoggingProtocolSocketFactory extends SSLSocketFactory private static class LogSocket extends SSLSocket { - private SSLSocket m_Socket; + private final SSLSocket m_Socket; - public LogSocket(Socket socket) + public LogSocket(SSLSocket socket) { - m_Socket = (SSLSocket) socket; + m_Socket = socket; } private static class LogStream extends java.io.FilterOutputStream @@ -272,35 +272,35 @@ class LoggingProtocolSocketFactory extends SSLSocketFactory public Socket createSocket(InetAddress address, int port) throws IOException { - return new LogSocket(((SSLSocketFactory) SSLSocketFactory.getDefault()).createSocket(address, port)); + return new LogSocket((SSLSocket) SSLSocketFactory.getDefault().createSocket(address, port)); } @Override public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException { - return new LogSocket(((SSLSocketFactory) SSLSocketFactory.getDefault()).createSocket(address, port, localAddress, localPort)); + return new LogSocket((SSLSocket) SSLSocketFactory.getDefault().createSocket(address, port, localAddress, localPort)); } @Override public Socket createSocket( String sHost, int nPort, InetAddress clientHost, int clientPort ) throws IOException, UnknownHostException { - return new LogSocket(((SSLSocketFactory) SSLSocketFactory.getDefault()).createSocket(sHost, nPort, clientHost, clientPort)); + return new LogSocket((SSLSocket) SSLSocketFactory.getDefault().createSocket(sHost, nPort, clientHost, clientPort)); } @Override public Socket createSocket( String sHost, int nPort ) throws IOException, UnknownHostException { - return new LogSocket(((SSLSocketFactory) SSLSocketFactory.getDefault()).createSocket(sHost, nPort)); + return new LogSocket((SSLSocket) SSLSocketFactory.getDefault().createSocket(sHost, nPort)); } @Override public Socket createSocket( Socket aSocket, String sHost, int nPort, boolean bAutoClose ) throws IOException { - return new LogSocket(((SSLSocketFactory) SSLSocketFactory.getDefault()).createSocket(aSocket, sHost, nPort, bAutoClose)); + return new LogSocket((SSLSocket) ((SSLSocketFactory) SSLSocketFactory.getDefault()).createSocket(aSocket, sHost, nPort, bAutoClose)); } @Override |