Java generic methods lexer is wrong.

Issue #771 resolved
Anonymous created an issue

Simply put, try and have these two methods in an interface; {{{


public void hello(); public Map<String> helloTwo(); }}}

Comments (2)

  1. Markus Holtermann

    I came across this issue today too. The simplest solution would be to add < and > to the regarding regular expression:

    (r'^(\s*(?:[a-zA-Z_][a-zA-Z0-9_\.\[\]]*\s+)+?)' # return arguments
    (r'^(\s*(?:[a-zA-Z_][a-zA-Z0-9_\.\[\]\<\>]*\s+)+?)' # return arguments

    This, obviously, does not take care of correct syntax, hence public Map<<<String> helloTwo(); would be marked correctly, even if it is wrong.

  2. Log in to comment