return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, "Space not found", null);
}
if (this.space == null || "".equals(this.space)) {
JSONObject space = spaces.getJSONObject(0);
target.setSpace(new Space().setCFJSON(space));
} else {
for (int i = 0; i < spaces.length(); i++) {
JSONObject spaceJSON = spaces.getJSONObject(i);
if ((!isGuid && space.equals(spaceJSON.getJSONObject("entity").getString("name"))) || (isGuid && space.equals(spaceJSON.getJSONObject("metadata").getString("guid")))) {
target.setSpace(new Space().setCFJSON(spaceJSON));
break;
}
}
}