Menu

#301 Java method calls incorrectly classified as definitions

open
nobody
None
5
2011-01-03
2011-01-03
No

If I run ctags with --java-kinds=+l, it frequently recognizes Java method calls as method definitions.

Example Java file (Test.java):

public class Test {
void f() {
synchronized (this) {
notifyAll();
}
}
}

Run "ctags --java-kinds=+l Test.java" and see the following tags:

Test Test.java /^public class Test {$/;" c
f Test.java /^ void f() {$/;" m class:Test
notifyAll Test.java /^ notifyAll();$/;" m

The last one (notifyAll) shouldn't have been there, since it's not a definition.

For more examples, see the attached file FileLogFormatter.java (taken from OpenGrok - http://www.opensolaris.org/os/project/opengrok/\), in which ctags --java-kinds=+l incorrectly reports method definitions at line number 56, 62, 65, 67, 69, 71, 76 and 77.

Discussion

  • Knut Anders Hatlen

     
  • Knut Anders Hatlen

    This bug may be related to 2726391.

    The problem is also tracked in the OpenGrok bug tracker: https://defect.opensolaris.org/bz/show_bug.cgi?id=14924

     

Log in to post a comment.