diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index 0e6312fbbd0..c02ae2c765e 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -725,13 +725,13 @@ private MethodDeclaration convertMethodDecl(JCMethodDecl javac, ASTNode parent) } } - if( retType != null ) { + if( retType != null || isConstructor) { if( this.ast.apiLevel != AST.JLS2_INTERNAL) { res.setReturnType2(retType); } else { res.internalSetReturnType(retType); } - } + } javac.getParameters().stream().map(this::convertVariableDeclaration).forEach(res.parameters()::add);