code: private void populateTopics(String[] topics) {
          for (String t : topics) {
              // Clean up leading and trailing white space as appropriate
              t = t.trim();
  
              // Ignore topics that start or end with a '/'
              if (t.startsWith("/") || t.endsWith("/") || t.contains("//") || t.isEmpty()) {
                  continue;
              }
  
              // Validate subscribe permission per section 113.10.2
              checkTopicSubscribePermission(t);
  
              if (t.equals("*")) {
                  wildcardTopics.add("");
              } else if (t.endsWith("/*")) {
                  wildcardTopics.add(t.substring(0, t.length() - 1));
              } else {
                  discreteTopics.add(t);
              }
          }
      }
docs: Parse the topic specifications into the appropriate lists.
  
  @param topics
  the topics the handler is interested in