Menu

#360 Fails to parse annotation's fields with default value

open
nobody
5
2015-06-10
2014-12-27
Juan Sotuyo
No

ctags fails to properly identify the name of a field within a Java annotation if it has a default vaule. It works just fine when no default is present.

This is the obtained output for a failing scenario. The declaration is parsed properly, but the reported field name is not. A is found where message is expected

�   src/main/java/com/monits/commons/validation/UploadedFile.java   /^    String message() default "{constraints.uploadedfile}";$/;"    f   interface:UploadedFile

Discussion

  • elchampo

    elchampo - 2015-01-08

    I've attached a patch for this issue. It's been tested with the reference file Test/bug1777340.java and also in the open source library https://github.com/Monits/monits-commons (where the case reported above can be found).

     
  • Masatake YAMATO

    Masatake YAMATO - 2015-05-12

    Interesting.
    Could you give a pull request for https://github.com/fishman/ctags ?

     
  • Juan Sotuyo

    Juan Sotuyo - 2015-05-19
     
  • Masatake YAMATO

    Masatake YAMATO - 2015-06-10

    Fixed in universal-ctags.

     

Log in to post a comment.