File tree Expand file tree Collapse file tree
tooling/conga-aem-maven-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/maven/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import java .util .List ;
3333import java .util .Map ;
3434import java .util .Set ;
35+ import java .util .stream .Collectors ;
3536
3637import org .apache .commons .lang3 .CharEncoding ;
3738import org .apache .commons .lang3 .StringUtils ;
@@ -103,10 +104,15 @@ public Set<String> getCloudManagerTarget(File nodeDir) {
103104 Object targetValue = MapExpander .getDeep (config , "cloudManager.target" );
104105 if (targetValue != null ) {
105106 if (targetValue instanceof String ) {
106- targets .add ((String )targetValue );
107+ String target = (String )targetValue ;
108+ if (!StringUtils .isBlank (target )) {
109+ targets .add (target );
110+ }
107111 }
108112 else if (targetValue instanceof List ) {
109- targets .addAll ((List <String >)targetValue );
113+ targets .addAll (((List <String >)targetValue ).stream ()
114+ .filter (target -> !StringUtils .isBlank (target ))
115+ .collect (Collectors .toList ()));
110116 }
111117 else {
112118 throw new RuntimeException ("Invalid cloudManager.target value: " + targetValue );
You can’t perform that action at this time.
0 commit comments