Fix java method parsing (add support for throws keyword).