}
return null;
}
private String removeOptionals(String uri, List optionals) {
Iterator i = optionals.iterator();
while (i.hasNext()) {
String param = (String) i.next();
uri = StringUtils.replaceAll(uri, param + "={" + param + "}", "");
}
// remove duplicate &
uri = StringUtils.replaceAll(uri, "&&", "&");
uri = StringUtils.replaceAll(uri, "?&", "?");