File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
clickhouse-http-client/src/main/java/com/clickhouse/client/http Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ private HttpURLConnection dispatchProxy(ClickHouseProxyType proxyType) throws IO
108108 HttpURLConnection newConn = null ;
109109 ClickHouseConfig c = config ;
110110
111- switch (proxyType . toString () ) {
112- case " HTTP" :
111+ switch (proxyType ) {
112+ case HTTP :
113113 if ( c .getProxyHostName () == "" || c .getProxyPort () == -1 ) {
114114 log .error ("config for HTTP proxy is invalid hostname [%s] port [%d]" , c .getProxyHostName (), c .getProxyPort ());
115115 throw new RuntimeException (String .format ("config for HTTP proxy is invalid hostname [%s] port [%d]" , c .getProxyHostName (), c .getProxyPort ()));
@@ -118,10 +118,10 @@ private HttpURLConnection dispatchProxy(ClickHouseProxyType proxyType) throws IO
118118 = new Proxy (Proxy .Type .HTTP , new InetSocketAddress (c .getProxyHostName (), c .getProxyPort ()));
119119 newConn = (HttpURLConnection ) new URL (url ).openConnection (webProxy );
120120 break ;
121- case " DIRECT" :
121+ case DIRECT :
122122 newConn = (HttpURLConnection ) new URL (url ).openConnection (Proxy .NO_PROXY );
123123 break ;
124- case " SOCKS" :
124+ case SOCKS :
125125 if ( c .getProxyHostName () == "" || c .getProxyPort () == -1 ) {
126126 log .error ("config for HTTP proxy is invalid hostname [%s] port [%d]" , c .getProxyHostName (), c .getProxyPort ());
127127 throw new RuntimeException (String .format ("config for HTTP proxy is invalid hostname [%s] port [%d]" , c .getProxyHostName (), c .getProxyPort ()));
You can’t perform that action at this time.
0 commit comments