Skip to content

Commit ebf5740

Browse files
committed
Fix Parser.parseConstructor to correctly get the constructor name
as the class name (instead of "<init>" as it's obtained if called constructorDoc.getSimpleName()) Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
1 parent c1e24e0 commit ebf5740

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/github/markusbernhardt/xmldoclet

1 file changed

+1
-1
lines changed

src/main/java/com/github/markusbernhardt/xmldoclet/Parser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ protected Class parseClass(final TypeElement classDoc) {
426426
protected Constructor parseConstructor(final ExecutableElement constructorDoc) {
427427
final Constructor constructorNode = objectFactory.createConstructor();
428428

429-
constructorNode.setName(constructorDoc.getSimpleName().toString());
429+
constructorNode.setName(constructorDoc.getEnclosingElement().getSimpleName().toString());
430430
constructorNode.setQualified(constructorDoc.getSimpleName().toString());
431431
final String comment = getJavaDoc(constructorDoc);
432432
if (!comment.isEmpty()) {

0 commit comments

Comments
 (0)