garydgregory commented on a change in pull request #113: TLS improvements
URL: 
https://github.com/apache/httpcomponents-core/pull/113#discussion_r264050303
 
 

 ##########
 File path: 
httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsSupport.java
 ##########
 @@ -0,0 +1,62 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.hc.core5.http.nio.ssl;
+
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLParameters;
+
+import org.apache.hc.core5.http.ssl.TLS;
+import org.apache.hc.core5.http.ssl.TlsCiphers;
+import org.apache.hc.core5.net.NamedEndpoint;
+import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
+
+/**
+ * HTTP/1.1 TLS support methods
+ *
+ * @since 5.0
+ */
+public final class TlsSupport {
 
 Review comment:
   Hi @ok2c ,
   
   Since the class operates on our `SSLSessionInitializer` in a focused manner, 
one alternative would be to use a (Java 8, I know) default method in that 
interface. I know Java 8 is a separate discussion but I really do not see what 
we gain by keeping support for a dead stale version of Java like 7.
   
   The alternative, since the method returns a new `SSLSessionInitializer` is 
to create a `SSLSessionInitializer*Factory*` which also makes it clear that you 
are getting a *new* `SSLSessionInitializer` as opposed to the one you passed 
in. I would even go as far as to claim that the current code is quite 
misleading because the current method name would indicate to some that what you 
are initializing is the method's argument, but that is not in fact what takes 
place.
   
   Thank you for considering... ;-)
   Gary
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to