docs: @SuppressWarnings("unchecked")
      private void doPopulateDatabasePass(final BuildData buildData) throws BuildProcessingException {
          log.info("Doing " + buildData.getBuildLocale() + " Populate Database Pass");
  
          final ContentSpec contentSpec = buildData.getContentSpec();
          final Map<String, BaseTopicWrapper<?>> topics = new HashMap<String, BaseTopicWrapper<?>>();
          if (buildData.isTranslationBuild()) {
              //Translations should reference an existing historical topic with the fixed urls set, so we assume this to be the case
              populateTranslatedTopicDatabase(buildData, topics);
          } else {
              populateDatabaseTopics(buildData, topics);
          }
  
          // Check if the app should be shutdown
          if (isShuttingDown.get()) {
              return;
          }
  
          // Add all the levels to the database
          DocBookBuildUtilities.addLevelsToDatabase(buildData.getBuildDatabase(), contentSpec.getBaseLevel());
  
          // Check if the app should be shutdown
          if (isShuttingDown.get()) {
              return;
          }
  
          // Process the topics to make sure they are valid
          doTopicPass(buildData, topics);
      }