code: public static Version resolveVersion(MinecraftDirectory minecraftDir, String version) throws IOException {
  		Objects.requireNonNull(minecraftDir);
  		Objects.requireNonNull(version);
  
  		if (doesVersionExist(minecraftDir, version)) {
  			try {
  				return getVersionParser().parseVersion(resolveVersionHierarchy(version, minecraftDir), PlatformDescription.current());
  			} catch (JSONException e) {
  				throw new IOException("Couldn't parse version json: " + version, e);
  			}
  		} else {
  			return null;
  		}
  	}
docs: Resolves the version.
  
  @param minecraftDir the minecraft directory
  @param version the version name
  @return the version object, or null if the version does not exist
  @throws IOException if an I/O error has occurred during resolving version
  @throws NullPointerException if
  <code>minecraftDir==null || version==null</code>