code: URL tryGetRootUrlForEapContext(Enumeration<URL> rootUrls) {
          boolean containsEapSpecificUrl = false;
          boolean containsWebInfClassesUrl = false;
          URL webInfClassesUrl = null;
          while (rootUrls.hasMoreElements()) {
              URL url = rootUrls.nextElement();
              if (isEapSpecificUrl(url)) {
                  containsEapSpecificUrl = true;
              } else if (url.toString().endsWith(WEB_INF_CLASSES_URL_SUFFIX)) {
                  containsWebInfClassesUrl = true;
                  webInfClassesUrl = url;
              }
          }
          if (containsEapSpecificUrl && containsWebInfClassesUrl) {
              return webInfClassesUrl;
          } else {
              return null;
          }
      }
docs: This is a HACK for web applications deployed to EAP/WildFly which are using kie-spring.
  
  The method tries to figure out the root URL based on the provided URL enumeration. It covers (at least) the
  following two use cases:
  1) kie-spring deployed together (bundled) with Spring webapp (inside WEB-INF/lib)
  2) kie-spring deployed as EAP module + Spring webapp depending on that module
  
  First of all it tries to determine if it is running on EAP, based on EAP specific resource URL. If that is the
  case it looks for the "WEB-INF/classes" dir and return that as an VFS URL (vfs:/...). Later on, this URL
  needs to be translated to a real filesystem path. This is one by {@link ClasspathKieProject#fixURLFromKProjectPath(URL)}
  
  @param rootUrls Classpath root URLs
  @return NULL is case the code is not running on EAP, otherwise root URL of the webapp context (that is webapp's WEB-INF/classes)