Fix '@Encode' TCK test. Fixed tests and added a check for empty parameter name
@@ -1037,7 +1037,9 @@ public final class JAXRSUtils {
if (mt == null || mt.isCompatible(MediaType.APPLICATION_FORM_URLENCODED_TYPE)) {
InputStream entityStream = copyAndGetEntityStream(m);
String body = FormUtils.readBody(entityStream, enc);
- FormUtils.populateMapFromStringOrHttpRequest(params, m, body, enc, false);
+ // Do not decode unless the key is empty value, fe @FormParam("")
+ FormUtils.populateMapFromStringOrHttpRequest(params, m, body, enc,
+ StringUtils.isEmpty(key) ? decode : false);
} else {
if ("multipart".equalsIgnoreCase(mt.getType())
&& MediaType.MULTIPART_FORM_DATA_TYPE.isCompatible(mt)) {
