Skip to content

Commit

Permalink
Add javadoc for nullable service methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzhinsky committed Oct 19, 2023
1 parent 20f116b commit 81efd60
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private void specifyResponseWay(MethodSpec.Builder methodBuilder) {
} else {
if (!returnType.isPrimitive() && method.getContainingFile().doUseNullabilityAnnotation(false)) {
if (method.ifNotFoundBehavior() == Options.IfNotFound.NULLIFY) {
methodBuilder.addJavadoc("Null result is converted to Status.NOT_FOUND");
methodBuilder.addAnnotation(context.configuration().nullableAnnotationClass());
} else {
methodBuilder.addAnnotation(context.configuration().nonnullAnnotationClass());
Expand Down

0 comments on commit 81efd60

Please sign in to comment.