8000 Java: argument annotation remains in xml output · Issue #9118 · doxygen/doxygen · GitHub
[go: up one dir, main page]

Skip to content
Java: argument annotation remains in xml output #9118
@Stewori

Description

@Stewori

Describe the bug
Processing Java code

class Test {
    void a(@SuppressWarnings("unused") int arg) {}
}

results in the following xml snippet:

...
      <memberdef kind="function" id="classTest_1afebca10a87ae805fe13cc3dcf1064683" prot="package" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>void Test.a</definition>
        <argsstring>(@SuppressWarnings(&quot;unused&quot;) int arg)</argsstring>
        <name>a</name>
        <qualifiedname>Test.a</qualifiedname>
        <param>
          <type>@SuppressWarnings(&quot;unused&quot;) int</type>
          <declname>arg</declname>
        </param>
...

Note the remaining annotation @SuppressWarnings. This is inconsistent with the usual behavior of Doxygen to strip annotations away. Further, it adds garbage to the param type.

Expected behavior
I expect that the resulting code snippet would be as follows:

...
      <memberdef kind="function" id="classTest_1afebca10a87ae805fe13cc3dcf1064683" prot="package" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>void Test.a</definition>
        <argsstring>(int arg)</argsstring>
        <name>a</name>
        <qualifiedname>Test.a</qualifiedname>
        <param>
          <type>int</type>
          <declname>arg</declname>
        </param>
...

To Reproduce
Find a Java file and doxygen config attached. The issue is demonstrated like mentioned above.
After running doxygen on the example, the files in the subfolder xml contain the snippet shown above.
issue_arg_annotation.zip

Version
Tested with doxygen clone from 2022-02-12:

/blah/doxygen/build/bin/doxygen -v
1.9.4 (5e664a014e6fa3149bdc807e4a55399020a012da)

lsb_release -a:

LSB Version:	core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:	LinuxMint
Description:	Linux Mint 18 Sarah
Release:	18
Codename:	sarah

(yes I know a system update is overdue...)

Additional context
TBH I did not check for duplicates. Please excuse if this is a known issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0