code: def parse_java_version(cls, version):
      
      conversion = {str(i): '1.{}'.format(i) for i in cls.SUPPORTED_CONVERSION_VERSIONS}
      if str(version) in conversion:
        return Revision.lenient(conversion[str(version)])
  
      if not hasattr(version, 'components'):
        version = Revision.lenient(version)
      if len(version.components) <= 2:
        return version
      return Revision(*version.components[:2])
docs: Parses the java version (given a string or Revision object).
  
      Handles java version-isms, converting things like '7' -> '1.7' appropriately.
  
      Truncates input versions down to just the major and minor numbers (eg, 1.6), ignoring extra
      versioning information after the second number.
  
      :param version: the input version, given as a string or Revision object.
      :return: the parsed and cleaned version, suitable as a javac -source or -target argument.
      :rtype: Revision