this could be done in less lines:

if (filterSpec.contains("=")) {
  String[] tuple = filterSpec.split("=", 2);
  return createFilter(tuple[0], new FilterFactoryParams(description, tuple[1]);
} else {
  return createFilter(filterSpec, new FilterFactoryParams(description));
}