Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void emitJavadocWithParameters(CodeBlock javadoc, Iterable<ParameterSpec>
builder.add("\n");
}
emitTagNewline = false;
builder.add("@param $L $L", parameterSpec.name(), parameterSpec.javadoc());
builder.add("@param $L $L\n", parameterSpec.name(), parameterSpec.javadoc());
}
}
emitJavadoc(builder.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,10 @@ private void getTaco(double money) {
public void withParameterJavaDoc() {
MethodSpec methodSpec = MethodSpec.methodBuilder("getTaco")
.addParameter(ParameterSpec.builder(TypeName.DOUBLE, "money")
.addJavadoc("the amount required to buy the taco.\n")
.addJavadoc("the amount required to buy the taco.")
.build())
.addParameter(ParameterSpec.builder(TypeName.INT, "count")
.addJavadoc("the number of Tacos to buy.\n")
.addJavadoc("the number of Tacos to buy.")
.build())
.addJavadoc("Gets the best Taco money can buy.\n")
.build();
Expand All @@ -358,10 +358,10 @@ void getTaco(double money, int count) {
public void withParameterJavaDocAndWithoutMethodJavadoc() {
MethodSpec methodSpec = MethodSpec.methodBuilder("getTaco")
.addParameter(ParameterSpec.builder(TypeName.DOUBLE, "money")
.addJavadoc("the amount required to buy the taco.\n")
.addJavadoc("the amount required to buy the taco.")
.build())
.addParameter(ParameterSpec.builder(TypeName.INT, "count")
.addJavadoc("the number of Tacos to buy.\n")
.addJavadoc("the number of Tacos to buy.")
.build())
.build();
assertThat(methodSpec.toString())
Expand Down