[AB-207] fixing command being disabled, if its part of a channel group, but the given channel is not part of that channel group

fixing null pointer in channel group created listener
fixing connection string in config deploy tool
This commit is contained in:
Sheldan
2021-03-23 22:08:08 +01:00
parent 92b8e1dd8b
commit 2b3b0f42c4
4 changed files with 95 additions and 4 deletions

View File

@@ -33,9 +33,13 @@ public class ChannelGroupCommandServiceBean implements ChannelGroupCommandServic
return false;
}
}
// empty -> no groups, command enabled
// not empty -> has groups, command is disabled in all
return allChannelGroupsOfCommand.isEmpty();
/*
if we are here this means either:
the command has no channel groups assigned -> enabled
the command has one or more channel group and is enabled in these ones -> enabled
the command has a channel group with channels (and it might be enabled/disabled, does not matter), but the given channel is not part of that group -> ok
*/
return true;
}
@Override

View File

@@ -25,6 +25,7 @@ public class AsyncChannelGroupCreatedListenerManager {
@TransactionalEventListener
public void executeListener(ChannelGroupCreatedListenerModel createdGroup){
if(listener == null) return;
listener.forEach(asyncChannelGroupCreatedListener ->
listenerService.executeListener(asyncChannelGroupCreatedListener, createdGroup, channelGroupCreatedExecutor)
);