You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2022/09/27 14:09:12 UTC

[httpcomponents-client] branch master updated (bb67e4c0b -> 70654ae48)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git


    from bb67e4c0b Don't make loops and anonymous methods so verbose by using Java 8 features
     new 3eb8c11af Use Objects.toString() instead of String type cast
     new 70654ae48 Register the standard GitHub page for a Code of Conduct with a link to the Apache Code of Conduct

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/test/resources/log4j2.xml => CODE_OF_CONDUCT.md  | 16 ++--------------
 .../apache/hc/client5/http/ssl/TlsSessionValidator.java  |  5 +++--
 2 files changed, 5 insertions(+), 16 deletions(-)
 copy httpclient5-win/src/test/resources/log4j2.xml => CODE_OF_CONDUCT.md (66%)


[httpcomponents-client] 02/02: Register the standard GitHub page for a Code of Conduct with a link to the Apache Code of Conduct

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git

commit 70654ae4817b9a180dae2ea650f096bd6ad34371
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Sep 27 10:09:08 2022 -0400

    Register the standard GitHub page for a Code of Conduct with a link to
    the Apache Code of Conduct
---
 CODE_OF_CONDUCT.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..3ed501501
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,17 @@
+<!---
+ 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.
+-->
+The Apache code of conduct page is [https://www.apache.org/foundation/policies/conduct.html](https://www.apache.org/foundation/policies/conduct.html).


[httpcomponents-client] 01/02: Use Objects.toString() instead of String type cast

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git

commit 3eb8c11af6210b08df987306e8a50f53150ddab1
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Sep 27 08:36:19 2022 -0400

    Use Objects.toString() instead of String type cast
---
 .../java/org/apache/hc/client5/http/ssl/TlsSessionValidator.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/TlsSessionValidator.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/TlsSessionValidator.java
index 99d110e60..76541ff46 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/TlsSessionValidator.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/TlsSessionValidator.java
@@ -32,6 +32,7 @@ import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Objects;
 
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLException;
@@ -73,7 +74,7 @@ final class TlsSessionValidator {
                         final List<String> altNames = new ArrayList<>();
                         for (final List<?> aC : altNames1) {
                             if (!aC.isEmpty()) {
-                                altNames.add((String) aC.get(1));
+                                altNames.add(Objects.toString(aC.get(1), null));
                             }
                         }
                         log.debug(" peer alternative names: {}", altNames);
@@ -86,7 +87,7 @@ final class TlsSessionValidator {
                         final List<String> altNames = new ArrayList<>();
                         for (final List<?> aC : altNames2) {
                             if (!aC.isEmpty()) {
-                                altNames.add((String) aC.get(1));
+                                altNames.add(Objects.toString(aC.get(1), null));
                             }
                         }
                         log.debug(" issuer alternative names: {}", altNames);