code: private static List<String> getFilesSafeForUninstall(AddOn addOn, Set<AddOn> installedAddOns) {
          if (addOn.getFiles() == null || addOn.getFiles().isEmpty()) {
              return Collections.emptyList();
          }
  
          List<String> files = new ArrayList<>(addOn.getFiles());
          installedAddOns.forEach(installedAddOn -> {
              if (installedAddOn == addOn) {
                  return;
              }
  
              List<String> addOnFiles = installedAddOn.getFiles();
              if (addOnFiles == null || addOnFiles.isEmpty()) {
                  return;
              }
  
              files.removeAll(addOnFiles);
          });
          return files;
      }
docs: Gets the files of the given add-on that can be safely uninstalled, that is, are not in use/declared by other add-ons.
  
  @param addOn the add-on whose files should be uninstalled.
  @param installedAddOns the add-ons currently installed.
  @return the files that can be safely uninstalled.