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) {
210
210
211
211
public String renderEventsListenedTo (ApplicationModule module ) {
212
212
213
- var builder = new StringBuilder ();
214
-
215
- module .getSpringBeans ().stream ()
213
+ return module .getSpringBeans ().stream ()
216
214
.map (SpringBean ::toArchitecturallyEvidentType )
217
215
.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 ()));
225
219
}
226
220
227
221
public String renderConfigurationProperties (List <ModuleProperty > properties ) {
You can’t perform that action at this time.
0 commit comments