code: private String stripExtension(String moduleName) {
          if ( moduleName.endsWith(".war") || moduleName.endsWith(".jar") ) {
              return moduleName.substring(0, moduleName.length() - 4);
          }
          return moduleName;
      }
docs: Strip the extension from a module name.
  
  Remove only ".war" or ".jar", and only if these are present in lower case.
  
  The module name is as obtained from an application descriptor, or from a web
  extension override, or from module information.  Module names are usually,
  but not always, simple file names.  Module names can be relative paths.
  
  @param moduleName The module name to strip.
  
  @return The module name with its extension removed.