code: public void updateMessageListForHandler(String msgIds, String handlerId) {
          if (msgIds == null) {
              return; // Should never happen, but avoid NPEs
          }
  
          String[] msgStr = msgIds.split(",");
          ArrayList<String> newMsgList = new ArrayList<String>(Arrays.asList(msgStr));
          newMsgList.remove(""); // Ignore blank value
  
          // Get the list of existing handlers mapped to this message ID.
          ArrayList<String> prevMsgList = previousHandlerMessageMap.get(handlerId);
          {
              if (prevMsgList == null) {
                  prevMsgList = new ArrayList<String>();
              }
          }
  
          if (prevMsgList.equals(newMsgList)) {
              return; // No change = nothing to do here, skip issuing message
          }
  
          getMessageRouter(); // Ensure router is not null
  
          // Check for new messages and add them to the list for the handler
          ArrayList<String> addedMsgs = new ArrayList<String>(newMsgList);
          addedMsgs.removeAll(prevMsgList);
  
          for (String msgId : addedMsgs) {
              msgRouter.addMsgToLogHandler(msgId, handlerId);
          }
  
          // Check for removed messages and remove them from the list for the handler
          ArrayList<String> removedMsgs = new ArrayList<String>(prevMsgList);
          removedMsgs.removeAll(newMsgList);
  
          for (String msgId : removedMsgs) {
              msgRouter.removeMsgFromLogHandler(msgId, handlerId);
          }
  
          // Save the new map for the next config change
          previousHandlerMessageMap.put(handlerId, newMsgList);
  
          // Notify that there was a change in this handler's messages
          String setOfIds = "";
          for (String msg : newMsgList) {
              if (!setOfIds.equals("")) {
                  setOfIds = setOfIds.concat(" ");
              }
              setOfIds = setOfIds.concat(msg);
          }
          Tr.info(tc, "MSG_ROUTER_UPDATED", new Object[] { handlerId, setOfIds });
      }
docs: Compare the incoming list of message IDs to be associated with the given handler,
  adding and removing as needed to match the new config.
  
  @param msgIds
  @param handlerId