docs: private File extractEntry(ArtifactEntry inputEntry, File outputDir) throws IOException {
          if ( !FileUtils.ensureDirExists(outputDir) ) {
              throw new IOException("Extraction directory could not be created [ " + outputDir.getAbsolutePath() + " ]");
          }
  
          File outputFile = new File( outputDir, inputEntry.getName() );
          String outputPath = getCanonicalPath(outputFile); // throws IOException
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled() ) {
              Tr.debug(tc, "Extraction: [ " + outputPath + " ]");
          }
  
          ExtractionGuard extractionGuard = placeExtractionGuard(outputPath);
  
          // If we are secondary, wait for the primary to complete, then
          // verify and use the primary extraction.
  
          if ( !extractionGuard.isPrimary ) {
              if ( !extractionGuard.waitForCompletion() ) {
                  // Tr.warning(tc, "Secondary extraction timeout [ " + outputPath + " ]");
                  Tr.warning(tc, "extract.secondary.timeout", outputPath);
                  throw new IOException("Secondary extraction timeout [ " + outputPath + " ]");
  
              } else {
                  if ( !FileUtils.fileExists(outputFile) ) {
                      // Tr.warning(tc, "Failed secondary extraction [ " + outputPath + " ]");
                      Tr.warning(tc, "extract.secondary.failed", outputPath);
                      throw new IOException("Failed secondary extraction [ " + outputPath + " ]");
                  } else if ( !FileUtils.fileIsFile(outputFile) ) {
                      // Tr.warning(tc, "Secondary extraction did not create a simple file [ " + outputPath + " ]");
                      Tr.warning(tc, "extract.secondary.notfile", outputPath);
                      throw new IOException("Secondary extraction did not create a simple file [ " + outputPath + " ]");
  
                  } else {
                      if ( isModified(inputEntry, outputFile) ) {
                          // Tr.warning(tc, "Secondary extraction inconsistent times [ " + outputPath + " ]");
                          Tr.warning(tc, "extract.secondary.inconsistent", outputPath);
                      } else {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled() ) {
                              Tr.debug(tc, "Secondary extraction: [ " + outputPath + " ]");
                          }
                      }
                      return outputFile;
                  }
              }
          }
  
          // Otherwise, we are primary: Try to use any prior extraction.  If we can't,
          // remove it, and do the extraction.  Then unblock any secondary extractions
          // waiting on us.
  
          try {
              boolean doRemove;
              boolean doExtract;
              String extractCase;
  
              if ( FileUtils.fileExists(outputFile) ) {
                  if ( FileUtils.fileIsFile(outputFile) ) {
                      if ( !isModified(inputEntry, outputFile) ) {
                          doRemove = false;
                          doExtract = false;
                          extractCase = "Normal: Prior extraction is up to date";
                      } else {
                          doRemove = true;
                          doExtract = true;
                          extractCase = "Normal: Prior extraction is out of date";
                      }
                  } else if ( FileUtils.fileIsDirectory(outputFile) ) {
                      doRemove = true;
                      doExtract = true;
                      extractCase = "Abnormal: Prior extraction is a directory";
                      Tr.warning(tc, "extract.primary.directory", outputPath);
                  } else {
                      doRemove = true;
                      doExtract = true;
                      extractCase = "Abnormal: Prior extraction is untyped";
                      Tr.warning(tc, "extract.primary.untyped", outputPath);
                  }
              } else {
                  doRemove = false;
                  doExtract = true;
                  extractCase = "Normal: No prior extraction";
              }
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled() ) {
                  Tr.debug(tc, "Primary extraction: [ " + outputPath + " ] (" + extractCase + ")");
              }
  
              long extractStart = (COLLECT_TIMINGS ? System.nanoTime() : -1L);
  
              if ( doRemove ) {
                  deleteAll(outputFile);
              }
  
              if ( doExtract ) {
                  transfer(inputEntry, outputFile);
                  setLastModified(inputEntry, outputFile, outputPath);
              }
  
              if ( COLLECT_TIMINGS ) {
                  record(Timings.EXTRACT_TIME, extractStart, System.nanoTime(), null, EXTRACT_FREQUENCY);
              }
              
              return outputFile;
  
          } finally {
              releaseExtractionGuard(extractionGuard);
          }
      }