File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/com/axway/apim/openapi/validator Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 11package com .axway .apim .openapi .validator ;
22
3+ import java .io .UnsupportedEncodingException ;
34import java .net .URI ;
45import java .net .URLDecoder ;
56import java .nio .charset .StandardCharsets ;
@@ -224,7 +225,14 @@ public Collection<String> getQueryParameterValues(String name) {
224225 if (queryParams ==null ) return Collections .emptyList ();
225226 ArrayList <String > values = queryParams .getHeaderValues (name );
226227 if (decodeQueryParams ) {
227- values .replaceAll (headerValue -> URLDecoder .decode (headerValue , StandardCharsets .UTF_8 ));
228+ values .replaceAll (headerValue -> {
229+ try {
230+ return URLDecoder .decode (headerValue , StandardCharsets .UTF_8 .toString ());
231+ } catch (UnsupportedEncodingException e ) {
232+ Utils .traceMessage ("Error decoding headerValue: " + headerValue + ". Error: " + e .getMessage (), TraceLevel .ERROR );
233+ return headerValue ;
234+ }
235+ });
228236 }
229237 return (Collection <String >) ((values == null ) ? Collections .emptyList () : values );
230238 }
You can’t perform that action at this time.
0 commit comments