}
@SuppressWarnings("unchecked")
private MultivaluedMap<String, String> getParameters(UriInfo info) {
MultivaluedMap<String, String> parameters = info.getQueryParameters();
ApplicationContextImpl context = (ApplicationContextImpl) info;
Type formType = MultivaluedMapImpl.class.getGenericInterfaces()[0];
MediaType contentType = context.getHttpHeaders().getMediaType();
if (contentType == null) {
contentType = MediaType.APPLICATION_FORM_URLENCODED_TYPE;
}
MultivaluedMap<String, String> form = new MultivaluedMapImpl();
try {
MessageBodyReader reader = context.getProviders().getMessageBodyReader(MultivaluedMap.class, formType, null,
contentType);
if (reader != null) {
form = (MultivaluedMap<String, String>) reader.readFrom(MultivaluedMap.class, formType, null, contentType,
context.getHttpHeaders().getRequestHeaders(), context.getContainerRequest().getEntityStream());
}
} catch (IllegalStateException e) {
if (log.isTraceEnabled()) {
log.trace(e.getMessage(), e);
}