try {
key = StringUtil.trimWhitespace(URLDecoder.decode(key, "UTF-8"));
value = StringUtil.trimWhitespace(URLDecoder.decode(value, "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw new ConfigException(e);
}
if (!StringUtil.isEmpty(key) && session != null && session.acceptOption(key)) {
options.put(key, value);
} else {
if (newQuery.length() > 0) {
newQuery.append("&");
}
newQuery.append(token);
}
}
}
String newQueryStr = newQuery.length() > 0 ? newQuery.toString() : "";
try {
this.uri = new URI(replace(uri.toString(), query, newQueryStr));
} catch (URISyntaxException e) {
throw new ConfigException(e);
}
this.options = options;
}