< prev index next >

src/share/classes/javax/rmi/ssl/SslRMIServerSocketFactory.java

Print this page
rev 1388 : 6600143: Remove another 450 unnecessary casts
Reviewed-by: alanb, iris, lmalvent, bristor, peterjones, darcy, wetmore

*** 110,122 **** throws IllegalArgumentException { // Initialize the configuration parameters. // this.enabledCipherSuites = enabledCipherSuites == null ? ! null : (String[]) enabledCipherSuites.clone(); this.enabledProtocols = enabledProtocols == null ? ! null : (String[]) enabledProtocols.clone(); this.needClientAuth = needClientAuth; // Force the initialization of the default at construction time, // rather than delaying it to the first time createServerSocket() // is called. --- 110,122 ---- throws IllegalArgumentException { // Initialize the configuration parameters. // this.enabledCipherSuites = enabledCipherSuites == null ? ! null : enabledCipherSuites.clone(); this.enabledProtocols = enabledProtocols == null ? ! null : enabledProtocols.clone(); this.needClientAuth = needClientAuth; // Force the initialization of the default at construction time, // rather than delaying it to the first time createServerSocket() // is called.
*** 138,154 **** // are supported by the underlying SSL/TLS implementation and if // true create lists from arrays. // if (this.enabledCipherSuites != null) { sslSocket.setEnabledCipherSuites(this.enabledCipherSuites); ! enabledCipherSuitesList = ! Arrays.asList((String[]) this.enabledCipherSuites); } if (this.enabledProtocols != null) { sslSocket.setEnabledProtocols(this.enabledProtocols); ! enabledProtocolsList = ! Arrays.asList((String[]) this.enabledProtocols); } } /** * <p>Returns the names of the cipher suites enabled on SSL --- 138,152 ---- // are supported by the underlying SSL/TLS implementation and if // true create lists from arrays. // if (this.enabledCipherSuites != null) { sslSocket.setEnabledCipherSuites(this.enabledCipherSuites); ! enabledCipherSuitesList = Arrays.asList(this.enabledCipherSuites); } if (this.enabledProtocols != null) { sslSocket.setEnabledProtocols(this.enabledProtocols); ! enabledProtocolsList = Arrays.asList(this.enabledProtocols); } } /** * <p>Returns the names of the cipher suites enabled on SSL
*** 160,170 **** * * @see SSLSocket#setEnabledCipherSuites */ public final String[] getEnabledCipherSuites() { return enabledCipherSuites == null ? ! null : (String[]) enabledCipherSuites.clone(); } /** * <p>Returns the names of the protocol versions enabled on SSL * connections accepted by server sockets created by this factory, --- 158,168 ---- * * @see SSLSocket#setEnabledCipherSuites */ public final String[] getEnabledCipherSuites() { return enabledCipherSuites == null ? ! null : enabledCipherSuites.clone(); } /** * <p>Returns the names of the protocol versions enabled on SSL * connections accepted by server sockets created by this factory,
*** 176,186 **** * * @see SSLSocket#setEnabledProtocols */ public final String[] getEnabledProtocols() { return enabledProtocols == null ? ! null : (String[]) enabledProtocols.clone(); } /** * <p>Returns <code>true</code> if client authentication is * required on SSL connections accepted by server sockets created --- 174,184 ---- * * @see SSLSocket#setEnabledProtocols */ public final String[] getEnabledProtocols() { return enabledProtocols == null ? ! null : enabledProtocols.clone(); } /** * <p>Returns <code>true</code> if client authentication is * required on SSL connections accepted by server sockets created
*** 283,306 **** // if ((enabledCipherSuites == null && that.enabledCipherSuites != null) || (enabledCipherSuites != null && that.enabledCipherSuites == null)) return false; if (enabledCipherSuites != null && that.enabledCipherSuites != null) { ! List thatEnabledCipherSuitesList = ! Arrays.asList((String[]) that.enabledCipherSuites); if (!enabledCipherSuitesList.equals(thatEnabledCipherSuitesList)) return false; } // enabledProtocols // if ((enabledProtocols == null && that.enabledProtocols != null) || (enabledProtocols != null && that.enabledProtocols == null)) return false; if (enabledProtocols != null && that.enabledProtocols != null) { ! List thatEnabledProtocolsList = ! Arrays.asList((String[]) that.enabledProtocols); if (!enabledProtocolsList.equals(thatEnabledProtocolsList)) return false; } return true; --- 281,304 ---- // if ((enabledCipherSuites == null && that.enabledCipherSuites != null) || (enabledCipherSuites != null && that.enabledCipherSuites == null)) return false; if (enabledCipherSuites != null && that.enabledCipherSuites != null) { ! List<String> thatEnabledCipherSuitesList = ! Arrays.asList(that.enabledCipherSuites); if (!enabledCipherSuitesList.equals(thatEnabledCipherSuitesList)) return false; } // enabledProtocols // if ((enabledProtocols == null && that.enabledProtocols != null) || (enabledProtocols != null && that.enabledProtocols == null)) return false; if (enabledProtocols != null && that.enabledProtocols != null) { ! List<String> thatEnabledProtocolsList = ! Arrays.asList(that.enabledProtocols); if (!enabledProtocolsList.equals(thatEnabledProtocolsList)) return false; } return true;
*** 341,352 **** } private final String[] enabledCipherSuites; private final String[] enabledProtocols; private final boolean needClientAuth; ! private List enabledCipherSuitesList; ! private List enabledProtocolsList; // private static class ForwardingServerSocket extends ServerSocket { // private final ServerSocket ss; // ForwardingServerSocket(ServerSocket ss) throws IOException { // super(); --- 339,350 ---- } private final String[] enabledCipherSuites; private final String[] enabledProtocols; private final boolean needClientAuth; ! private List<String> enabledCipherSuitesList; ! private List<String> enabledProtocolsList; // private static class ForwardingServerSocket extends ServerSocket { // private final ServerSocket ss; // ForwardingServerSocket(ServerSocket ss) throws IOException { // super();
< prev index next >