docs: public synchronized static void addVirtualHost(final VirtualHostConfig oldConfig, final VirtualHostConfig newConfig) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
              Tr.event(tc, "Add virtual host: " + newConfig.getVirtualHost(), oldConfig, newConfig, defaultHost.get(), alternateHostSelector.get());
          }
  
          // If the "default/catch-all-ness" of the host was modified,
          // the virtual host was removed before calling this method.
          if (newConfig.isDefaultHost()) {
              defaultHost = StaticValue.mutateStaticValue(defaultHost, new Callable<VirtualHostConfig>() {
                  @Override
                  public VirtualHostConfig call() {
                      return newConfig;
                  }
              });
  
              if (alternateHostSelector.get() != null) {
                  alternateHostSelector.get().alternateAddDefaultHost(newConfig);
              } else {
                  // notify default host of  active listeners
                  for (HttpEndpointImpl e : HttpEndpointList.getInstance()) {
                      int ePort = e.getListeningHttpPort();
                      if (ePort > 0) {
                          defaultHost.get().listenerStarted(e, e.getResolvedHostName(), ePort, false);
                      }
  
                      ePort = e.getListeningSecureHttpPort();
                      if (ePort > 0) {
                          defaultHost.get().listenerStarted(e, e.getResolvedHostName(), ePort, true);
                      }
  
                  }
              }
          } else {
              if (alternateHostSelector.get() == null) {
                  alternateHostSelector = StaticValue.mutateStaticValue(alternateHostSelector, new Callable<AlternateHostSelector>() {
                      @Override
                      public AlternateHostSelector call() throws Exception {
                          return new AlternateHostSelector();
                      }
  
                  });
              }
              AlternateHostSelector current = alternateHostSelector.get();
              // Figure out which host aliases should be removed
              List<HostAlias> toRemove = new ArrayList<HostAlias>(oldConfig.getHostAliases());
              toRemove.removeAll(newConfig.getHostAliases());
  
              if (!toRemove.isEmpty()) {
                  current.alternateRemoveVirtualHost(oldConfig, toRemove);
              }
  
              current.alternateAddVirtualHost(newConfig);
          }
      }