@SuppressWarnings("squid:S1149") private ServiceRegistration registerService(String id, Resource config) { Hashtable<String, Object> props = new Hashtable<String, Object>(); props.put(SERVICE_OWNER_KEY, getClass().getCanonicalName()); props.put(CONFIGURATION_ID_KEY, id); ServiceRegistration serviceRegistration = registerServiceObject(config, props); registeredServices.put(id, serviceRegistration); log.debug("Automatic Package Replication job {} successfully updated with service {}", id, serviceRegistration.getReference().getProperty(Constants.SERVICE_ID)); return serviceRegistration; }