diff --git a/native/src/main/java/io/ballerina/stdlib/http/api/client/actions/HttpClientAction.java b/native/src/main/java/io/ballerina/stdlib/http/api/client/actions/HttpClientAction.java index 7ebce261df..7533bb6208 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/api/client/actions/HttpClientAction.java +++ b/native/src/main/java/io/ballerina/stdlib/http/api/client/actions/HttpClientAction.java @@ -328,9 +328,7 @@ private static String constructQueryString(BMap params) { */ private static Map getQueryNameMapping(BMap params) { Map annotationValues = new HashMap<>(); - if (!(params.getType() instanceof RecordType queryRecord)) { - return annotationValues; - } + RecordType queryRecord = (RecordType) params.getType(); BMap queryFields = queryRecord.getAnnotations(); for (Map.Entry qField: queryFields.entrySet()) {