docs: @SuppressWarnings("unchecked")
      public void removeExtensionFactory(ExtensionFactory factory) {
          synchronized (lock) {
              if (initialized && !destroyed) {
                  if (null == extensionFactories) {
                      extensionFactories = new ArrayList();
                  }
                  extensionFactories.remove(factory);
                  initializeExtensionProcessors(extensionFactories);
              } else {
                  if (extensionFactories!=null) {
                      extensionFactories.remove(factory);
                  }
              }
          }
      }