Jim Ma created CXF-8933: --------------------------- Summary: Add doPrivileged block to ProxyFactoryProxySelector.select() in HttpClientHTTPConduit Key: CXF-8933 URL: https://issues.apache.org/jira/browse/CXF-8933 Project: CXF Issue Type: Improvement Components: Transports Affects Versions: 4.0.3 Reporter: Jim Ma Assignee: Jim Ma Fix For: 4.0.4
Then the security manager is enabled, there is AccessControlException thrown from HttpClientHTTPConduit. {code:java} Caused by: java.security.AccessControlException: Permission check failed (permission "("java.net.NetPermission" "getProxySelector")" at java.base/java.net.ProxySelector.getDefault(ProxySelector.java:96) at org.apache.cxf.impl//org.apache.cxf.transport.http.HttpClientHTTPConduit$ProxyFactoryProxySelector.select(HttpClientHTTPConduit.java:330) at java.net.http/jdk.internal.net.http.HttpRequestImpl.retrieveProxy(HttpRequestImpl.java:287) at java.net.http/jdk.internal.net.http.HttpRequestImpl.<init>(HttpRequestImpl.java:133) at java.net.http/jdk.internal.net.http.HttpClientImpl.sendAsync(HttpClientImpl.java:603) at java.net.http/jdk.internal.net.http.HttpClientImpl.sendAsync(HttpClientImpl.java:586) at java.net.http/jdk.internal.net.http.HttpClientImpl.sendAsync(HttpClientImpl.java:578) at java.net.http/jdk.internal.net.http.HttpClientFacade.sendAsync(HttpClientFacade.java:129) at org.apache.cxf.impl//org.apache.cxf.transport.http.HttpClientHTTPConduit$HttpClientWrappedOutputStream.setProtocolHeaders(HttpClientHTTPConduit.java:534) at org.apache.cxf.impl//org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1373) at org.apache.cxf.impl//org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1409) {code} We need another doPrivileged block to fix this. -- This message was sent by Atlassian Jira (v8.20.10#820010)