gemmellr commented on code in PR #4385: URL: https://github.com/apache/activemq-artemis/pull/4385#discussion_r1121653905
########## artemis-commons/src/main/java/org/apache/activemq/artemis/utils/NetworkUtil.java: ########## @@ -0,0 +1,84 @@ +/** + * 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 + * <p> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p> + * 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. + */ + +package org.apache.activemq.artemis.utils; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +/** + * This is a wrapper class of some InetAddress methods + * so we can mock them with static values in test environment + */ +public class NetworkUtil { + + public static final InetAddressWrapper[] EMPTY_ADDRESSES = {}; + public static TestMode testMode = null; Review Comment: If its only comparing their IPs if the two hostnames were already decided to be different like it appears, then it seems like its just reduced to essentially the same situation we changed qpid-jms to stop getting into anymore. Thats where it was comparing the resolved IPs of two actually-different hostname values, found them to resolve to the same IP, and so then decided those two different things were really goign to the same place and so it de-duped them...but in reality the different hostnames values really meant it would actually lead to connection to two different things, hosted behind the same gateway IP and port thanks to TLS SNI. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
