code: @Override
      public InstalledExtension getInstalledExtension(String feature, String namespace)
      {
          InstalledFeature installedFeature = getInstalledFeatureFromCache(feature, namespace);
  
          if (installedFeature != null) {
              if (installedFeature.root.extension != null) {
                  return installedFeature.root.extension;
              }
  
              return installedFeature.root.invalidExtensions.isEmpty() ? null
                  : installedFeature.root.invalidExtensions.iterator().next();
          }
  
          return null;
      }
docs: InstalledExtensionRepository