Added proper handle of null additional info

This commit is contained in:
Volodymyr Babak 2021-08-02 13:44:11 +03:00
parent e05e681bd9
commit 94cf676d97

View File

@ -37,8 +37,10 @@ public class RelationMsgConstructor {
.setToIdMSB(entityRelation.getTo().getId().getMostSignificantBits()) .setToIdMSB(entityRelation.getTo().getId().getMostSignificantBits())
.setToIdLSB(entityRelation.getTo().getId().getLeastSignificantBits()) .setToIdLSB(entityRelation.getTo().getId().getLeastSignificantBits())
.setToEntityType(entityRelation.getTo().getEntityType().name()) .setToEntityType(entityRelation.getTo().getEntityType().name())
.setType(entityRelation.getType()) .setType(entityRelation.getType());
.setAdditionalInfo(JacksonUtil.toString(entityRelation.getAdditionalInfo())); if (entityRelation.getAdditionalInfo() != null) {
builder.setAdditionalInfo(JacksonUtil.toString(entityRelation.getAdditionalInfo()));
}
if (entityRelation.getTypeGroup() != null) { if (entityRelation.getTypeGroup() != null) {
builder.setTypeGroup(getStringValue(entityRelation.getTypeGroup().name())); builder.setTypeGroup(getStringValue(entityRelation.getTypeGroup().name()));
} }