* @return
*/
protected T initialize(T service) {
if (service instanceof ServiceInfoImpl) {
// initialize all collections to
ServiceInfoImpl impl = (ServiceInfoImpl) service;
if (impl.getClientProperties() == null) {
impl.setClientProperties(new HashMap());
}
if (impl.getExceptionFormats() == null) {
impl.setExceptionFormats(new ArrayList());
}
if (impl.getKeywords() == null) {
impl.setKeywords(new ArrayList());
}
if (impl.getMetadata() == null) {
impl.setMetadata(new MetadataMap());
}
if (impl.getVersions() == null) {
impl.setVersions(new ArrayList());
}
}
return service;
}