New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: multiple initializers get same id. #9418
Comments
In the HTML output I don't see the we see that there is still no mention of and in the detailed section as: so it looks like the name is not caught at all. You also mentioned:
|
Some questions Regarding the static initializers, to get some specifications a bit clearer:
|
No, I think none of the statements is true. I am not sure how Java handles it internally in the final result, but I know how Doxygen used to handle it and I think it is much the same as how Java's compiler's AST represents it.
In such examples, the docstrings should be ignored (and I think that is the way how Doxygen already does it). It would be like having docstrings for local variables like inside a method. Neither Javadoc nor Doxygen supports this. In general, Java initializers are like methods that run at class initialization time. Maybe my example was misleading because I only put declarations in there. There can actually be arbitrary code; it is not just a declarative section. The main issue is really that multiple initializers get the same ID. Everything else in this example works as expected. I noticed that Doxygen does not always create an
The An example with non-static initializers is simply the OP-example with the word
|
Describe the bug
Processing Java code
results in the following xml snippet:
Note that the initializers get the same id. I think they should have different ids and this causes problems for me because it violates the natural assumption that ids should be unique. Note that Doxygen indeed does distinguish the members internally as is proven by the doc text. OTOH, the second location entry is wrong again. Also note that for some reason, no initializer sections are created in xml for this example.
The same issue occurs if there are two instance initializers, i.e. without
static
. It does not occur if there is one instance initializer and one static.Expected behavior
I expect that the resulting code snippet would use distinct and unique ids for the two members and that correct initializer and location xml entries are generated.
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_multiple_initializers.zip
Version
Tested with doxygen release 1.9.3.1:
Unfortunately, I am currently not able to build newer doxygen versions.
lsb_release -a
:Additional context
TBH I did not check for duplicates. Please excuse if this is a known issue.
Also, as mentioned above, I am currently not able to build recent doxygen versions. Please excuse if the issue is already fixed.
The text was updated successfully, but these errors were encountered: