<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _parseline(line):
 """ Parse a line of Java properties file. :param line: A string to parse, must not start with ' ', '#' or '!' (comment) :return: A tuple of (key, value), both key and value may be None (None, '') ('aaa', '') ('aaa', '') ('aaa', '') ('url', 'http://localhost') ('calendar.japanese.type', 'LocalGregorianCalendar') """

    pair = re.split(r"(?:\s+)?(?:(?<!\\)[=:])", line.strip(), 1)
    key = pair[0].rstrip()

    if len(pair) < 2:
        LOGGER.warning("Invalid line found: %s", line)
        return (key or None, '')

    return (key, pair[1].strip())