code: public static ModuleId fromString(String moduleId) throws IllegalArgumentException {
          if (moduleId == null) {
              throw new IllegalArgumentException("Module Id String is null");
          }
          if (moduleId.length() == 0) {
              throw new IllegalArgumentException("Empty Module Id String");
          }
  
          final int c1 = moduleId.lastIndexOf(MODULE_VERSION_SEPARATOR);
          final String name;
          final String version;
          if (c1 != -1) {
              name = moduleId.substring(0, c1);
              version = moduleId.substring(c1 + 1);
          } else {
              name = moduleId;
              version = DEFAULT_VERSION;
          }
  
          return new ModuleId(name, version);
      }
docs: Parse a module id from a string.
  If a version identifier cannot be extracted, the version identifier will
  be set to "" (empty string).
  
  @param moduleId the id string
  @return the module identifier
  @throws IllegalArgumentException if the format of the module specification is invalid or it is {@code null}