eclipse-archived / antenna

SW360 Antenna project
Other
22 stars 19 forks source link

Oheger bosch/http/#630 improve proxy handling #631

Closed oheger-bosch closed 3 years ago

oheger-bosch commented 3 years ago

Issue 630

The documentation of the proxy settings for the HTTP support library was slightly incorrect. Due to defaults applied by the underlying OkHttpClient, the default ProxySelector of the JVM was used rather than a direct Internet connection when the constant ProxySettings.noProxy() was specified.

This PR updates the documentation accordingly and makes this behaviour more explicit by introducing a new method ProxySettings.defaultProxySelector(). As the latter is now the default when creating a new HTTP client, there are no behavioural changes. However, users can now actually specify that they want to circumvent any proxy.

Request Reviewer

@neubs-bsi @bs-ondem

Type of Change

Mention one of the following:
bug fix | new feature | improvements | documentation update | CI | Other

Type of change:
improvements / documentation update

How Has This Been Tested?

Test cases have been added for the new methods of ProxySettings. The tests for the proxy configuration applied by HttpClientFactoryImpl have been extended. A run with the Compliance Tool was triggered to manually check that there are no undesired side effects.

Checklist

Must:

Optional: (delete if not applicable)

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

97.1% 97.1% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_275) you have used to run this analysis is deprecated and we will stop accepting it accepting it soon.Please update to at least Java 11. Read more here