docs: protected void processLAandLI(File archive, RepositoryResourceWritable resource,
                                    String LAHeader, String LIHeader) throws IOException, RepositoryException {
          if (LAHeader == null && LIHeader == null) {
              return;
          }
  
          // cdpj This is the code prior to the temporary workaround (see below)
  //        if (resource.getLicenseType() == LicenseType.UNSPECIFIED) {
  //            if (LAHeader == null || LIHeader != null) {
  //                throw new RepositoryException(
  //                                "New licenseTerms require LA and no LI. "
  //                                                + archive.getCanonicalPath());
  //
  //                throw new RepositoryException("New licenseTerms require LA. "
  //                                              + archive.getCanonicalPath());
  //
  //            }
          // cdpj code prior to temporary workaround ends
  
          // cdpj Temporary workaround - make the uploader tolerate an asset
          // have licenseType == UNSPECIFIED and also has LI files. This is
          // because we had to ship the 8.5.5.5 extended.jar with LI files in
          // order to work around a restriction in the self-unzipping installer.
          // Once we have fixed the self-unzip installer (work item 163695), we
          // need to revert the code to its state before this temporary fix.
          if (resource.getLicenseType() == LicenseType.UNSPECIFIED || overrideLicenseToNonSpecified) {
              if (LAHeader == null) {
                  throw new RepositoryException("New licenseTerms require LA. "
                                                + archive.getCanonicalPath());
              }
              // cdpj Temporary workaround ends
          } else {
              if ((LAHeader == null && LIHeader != null)
                  || (LAHeader != null && LIHeader == null)) {
                  System.err.println("LA/LI Problem with archive" + archive.getCanonicalPath());
                  System.err.println("LAHeader = " + LAHeader);
                  System.err.println("LIHeader = " + LIHeader);
                  System.err.println("Both must be specified if either are present. Processing aborted.");
                  throw new RepositoryException("Problem in processLAandLI uploading " + archive.getCanonicalPath());
              }
          }
  
          try (FileSystem archiveFS = FileSystems.newFileSystem(archive.toPath(), null)) {
              // Somewhere to put the unpacked license files.
              Path tempDir = Files.createTempDirectory("unpackedEsa");
              tempDir.toFile().deleteOnExit();
  
              if (LAHeader != null) {
                  String laPrefix = LAHeader.substring(LAHeader.lastIndexOf("/") + 1) + "_";
                  Collection<Path> laPaths = findFiles(archiveFS, LAHeader);
                  for (Path laPath : laPaths) {
                      String localeText = laPath.getFileName().toString().substring(laPrefix.length());
                      if (isLocale(localeText)) {
                          // the file path contains LAHeader, and ends with a locale, so add the file as a licence
                          Path temp = tempDir.resolve(laPath.getFileName().toString());
                          File tempFile = temp.toFile();
                          tempFile.deleteOnExit();
                          Files.copy(laPath, temp, StandardCopyOption.REPLACE_EXISTING);
                          resource.addLicenseAgreement(tempFile, RepositoryCommonUtils.localeForString(localeText));
                      }
                  }
              }
  
              if (LIHeader != null) {
                  String liPrefix = LIHeader.substring(LIHeader.lastIndexOf("/") + 1) + "_";
                  Collection<Path> liPaths = findFiles(archiveFS, LIHeader);
                  for (Path liPath : liPaths) {
                      String localeText = liPath.getFileName().toString().substring(liPrefix.length());
                      if (isLocale(localeText)) {
                          // the file path contains LIHeader, and ends with a locale, so add the file as a licence
                          Path temp = tempDir.resolve(liPath.getFileName().toString());
                          File tempFile = temp.toFile();
                          tempFile.deleteOnExit();
                          Files.copy(liPath, temp, StandardCopyOption.REPLACE_EXISTING);
                          resource.addLicenseInformation(tempFile, RepositoryCommonUtils.localeForString(localeText));
                      }
                  }
              }
          }
      }