Fixed nullpointer in DMF dispatcher. (#617)

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-12-20 08:04:23 +01:00
committed by GitHub
parent 5d774dc70a
commit 617b2fb17c
3 changed files with 11 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ import org.springframework.cloud.bus.ServiceMatcher;
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.data.domain.PageRequest;
import org.springframework.util.CollectionUtils;
import com.google.common.collect.Maps;
@@ -278,7 +279,10 @@ public class AmqpMessageDispatcherService extends BaseAmqpService {
amqpSoftwareModule.setModuleType(entry.getKey().getType().getKey());
amqpSoftwareModule.setModuleVersion(entry.getKey().getVersion());
amqpSoftwareModule.setArtifacts(convertArtifacts(target, entry.getKey().getArtifacts()));
amqpSoftwareModule.setMetadata(convertMetadata(entry.getValue()));
if (!CollectionUtils.isEmpty(entry.getValue())) {
amqpSoftwareModule.setMetadata(convertMetadata(entry.getValue()));
}
return amqpSoftwareModule;
}

View File

@@ -0,0 +1,3 @@
ALTER TABLE sp_target CHANGE COLUMN update_status update_status integer not null;
ALTER TABLE sp_rollout CHANGE COLUMN action_type action_type integer not null;
ALTER TABLE sp_action CHANGE COLUMN action_type action_type integer not null;

View File

@@ -0,0 +1,3 @@
ALTER TABLE sp_target CHANGE COLUMN update_status update_status integer not null;
ALTER TABLE sp_rollout CHANGE COLUMN action_type action_type integer not null;
ALTER TABLE sp_action CHANGE COLUMN action_type action_type integer not null;