class ProxyHelper {

   static boolean isHostMatchesNonProxyHostsPattern( String host, String nonProxyHostsPattern )
   {
       boolean matches = true;
       if ( StringUtils.isNotBlank( nonProxyHostsPattern ) )
       {
           try
           {
               matches = host.matches( nonProxyHostsPattern );
           }
           catch ( PatternSyntaxException e )
           {
               String message = String.format( "Invalid pattern for non-proxy hosts: '%s'", nonProxyHostsPattern );
               log.warn( message, e );
               matches = false;
           }
       }
       String format = "isHostMatchesNonProxyHostsPattern( host = '{}', nonProxyHostsPattern = '{}' ): {}";
       log.debug( format, host, nonProxyHostsPattern, matches );
       return matches;
   }

   private  ProxyHelper(  );

}