Commit 77e436c
authored
Handle the STRICT host name verifier explicitly (CodeQL java/missing-case-in-switch) (#244)
AsyncHttpClientProvider switched on the HostnameVerifier option but only had a
case for ALLOW_ALL, relying on a pre-initialised DefaultHostnameVerifier to cover
STRICT. Give the switch a default branch that assigns the strict verifier, the
same shape already used by SyncHttpClientProvider.
Behaviour is unchanged - STRICT still maps to DefaultHostnameVerifier - but the
switch now covers every enum value and the two client providers are consistent.1 parent 5f436d0 commit 77e436c
1 file changed
Lines changed: 6 additions & 1 deletion
File tree
- commons/http-framework/client-apache-async/src/main/java/org/forgerock/http/apache/async
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
0 commit comments