File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
spring-modulith-docs/src/main/java/org/springframework/modulith/docs Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -210,18 +210,12 @@ public String renderPublishedEvents(ApplicationModule module) {
210210
211211 public String renderEventsListenedTo (ApplicationModule module ) {
212212
213- var builder = new StringBuilder ();
214-
215- module .getSpringBeans ().stream ()
213+ return module .getSpringBeans ().stream ()
216214 .map (SpringBean ::toArchitecturallyEvidentType )
217215 .filter (ArchitecturallyEvidentType ::isEventListener )
218- .forEach (it -> {
219- it .getReferenceMethods ()
220- .map (method -> renderReferenceMethod (method , 0 ))
221- .forEach (builder ::append );
222- });
223-
224- return builder .toString ();
216+ .flatMap (ArchitecturallyEvidentType ::getReferenceMethods )
217+ .map (it -> renderReferenceMethod (it , 0 ))
218+ .collect (Collectors .joining (System .lineSeparator ()));
225219 }
226220
227221 public String renderConfigurationProperties (List <ModuleProperty > properties ) {
You can’t perform that action at this time.
0 commit comments