private static Map < String , String > getActors ( GitRequest pr ) { Map < String , String > actors = new HashMap <> ( ) ; if ( ! StringUtils . isEmpty ( pr . getMergeAuthorLDAPDN ( ) ) ) { actors . put ( pr . getMergeAuthor ( ) , pr . getMergeAuthorLDAPDN ( ) ) ; } Optional . ofNullable ( pr . getCommits ( ) ) . orElse ( Collections . emptyList ( ) ) . stream ( ) . filter ( c -> ! StringUtils . isEmpty ( c . getScmAuthorLDAPDN ( ) ) ) . forEach ( c -> actors . put ( c . getScmAuthor ( ) , c . getScmAuthorLDAPDN ( ) ) ) ; Optional . ofNullable ( pr . getComments ( ) ) . orElse ( Collections . emptyList ( ) ) . stream ( ) . filter ( c -> ! StringUtils . isEmpty ( c . getUserLDAPDN ( ) ) ) . forEach ( c -> actors . put ( c . getUser ( ) , c . getUserLDAPDN ( ) ) ) ; Optional . ofNullable ( pr . getReviews ( ) ) . orElse ( Collections . emptyList ( ) ) . stream ( ) . filter ( r -> ! StringUtils . isEmpty ( r . getAuthorLDAPDN ( ) ) ) . forEach ( r -> actors . put ( r . getAuthor ( ) , r . getAuthorLDAPDN ( ) ) ) ; return actors ; }
Get all the actors associated with this user . s