docs: @SuppressWarnings("unchecked")
      protected boolean processSpecTopicInjections(final BuildData buildData, final ITopicNode topicNode,
              final DocBookXMLPreProcessor xmlPreProcessor) {
          final BaseTopicWrapper<?> topic = topicNode.getTopic();
          final Document doc = topicNode.getXMLDocument();
          final boolean useFixedUrls = buildData.isUseFixedUrls();
          boolean valid = true;
  
          // Process the injection points
          if (buildData.getInjectionOptions().isInjectionAllowed()) {
  
              final ArrayList<String> customInjectionIds = new ArrayList<String>();
  
              if (topicNode instanceof SpecTopic) {
                  final SpecTopic specTopic = (SpecTopic) topicNode;
                  xmlPreProcessor.processPrevRelationshipInjections(specTopic, doc, useFixedUrls);
                  xmlPreProcessor.processNextRelationshipInjections(specTopic, doc, useFixedUrls);
  
                  // Front Matter topics are injected later as they need to be grouped
                  if (topicNode.getTopicType() != TopicType.INITIAL_CONTENT) {
                      xmlPreProcessor.processPrerequisiteInjections(specTopic, doc, useFixedUrls);
                      xmlPreProcessor.processLinkListRelationshipInjections(specTopic, doc, useFixedUrls);
                      xmlPreProcessor.processSeeAlsoInjections(specTopic, doc, useFixedUrls);
                  }
              }
  
              // Process the topics XML and insert the injection links
              final List<String> customInjectionErrors = xmlPreProcessor.processInjections(buildData.getContentSpec(), topicNode,
                      customInjectionIds, doc, buildData.getBuildOptions(), buildData.getBuildDatabase(), useFixedUrls);
  
              // Check if the app should be shutdown
              if (isShuttingDown.get()) {
                  return false;
              }
  
              // Handle any errors that occurred while processing the injections
              valid = processSpecTopicInjectionErrors(buildData, topic, customInjectionErrors);
          }
  
          return valid;
      }