Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Dec 3, 2023
1 parent 5be2759 commit 68e52e2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ final class GeneratedAnnotation {
AnnotationSpec define() {
return AnnotationSpec.builder(Generated.class)
.addMember("value", CodeBlock.of("$S", JbockProcessor.class.getCanonicalName()))
.addMember("comments", CodeBlock.of("$S", "https://github.com/jbock-java/jbock " +
Objects.toString(getClass().getPackage().getImplementationVersion(), "")))
.addMember("comments", CodeBlock.of("$S", getComments()))
.build();
}

private String getComments() {
String version = Objects.toString(getClass().getPackage().getImplementationVersion(), "");
return "https://github.com/jbock-java/jbock" + (version.isEmpty() ? "" : " " + version);
}
}

0 comments on commit 68e52e2

Please sign in to comment.