try {
service = Services.valueOf(serviceName);
}
catch (IllegalArgumentException ex) {
throw new ObjectNotFoundException("Root service name: " + serviceName);
}
catch (NullPointerException np) {
throw new ObjectNotFoundException("Root service name: null");
}
if (componentName != null) {
Components component;
try {
component = Components.valueOf(componentName);
if (!ArrayUtils.contains(service.getComponents(), component))
throw new ObjectNotFoundException("No component name: " + componentName + "in service: " + serviceName);
}
catch (IllegalArgumentException ex) {
throw new ObjectNotFoundException("Component name: " + componentName);
}
response = Collections.singleton(new RootServiceComponentResponse(component.toString(),
getComponentVersion(componentName, null),
getComponentProperties(componentName)));
} else {