Merge pull request #267 from bsinno/fix_concurrency_on_UI_causes_NullpointerException

Fix concurrency on ui causes nullpointer exception
This commit is contained in:
Michael Hirsch
2016-08-09 11:51:14 +02:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -250,6 +250,7 @@ public abstract class AbstractTagToken<T extends BaseEntity> implements Serializ
protected void removeTokenItem(final Long tokenId, final String name) {
tokenField.removeToken(tokenId);
tagDetails.remove(tokenId);
setContainerPropertValues(tokenId, name, tokensAdded.get(tokenId).getColor());
}

View File

@@ -96,6 +96,7 @@ public class TargetBulkTokenTags extends AbstractTargetTagToken {
@Override
protected void populateContainer() {
container.removeAllItems();
tagDetails.clear();
for (final TargetTag tag : tagManagement.findAllTargetTags()) {
setContainerPropertValues(tag.getId(), tag.getName(), tag.getColour());
}