diff --git a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskExecutionInfoService.java b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskExecutionInfoService.java index ca504b3d89..8cb83fbc7e 100644 --- a/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskExecutionInfoService.java +++ b/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskExecutionInfoService.java @@ -47,6 +47,7 @@ import org.springframework.cloud.deployer.spi.core.AppDeploymentRequest; import org.springframework.core.io.Resource; import org.springframework.util.Assert; +import org.springframework.util.StringUtils; /** * Default implementation of the {@link DefaultTaskExecutionInfoService} interface. @@ -268,7 +269,11 @@ private void extractNames(TaskNode taskNode, Set result) { logger.debug("subTask:{}:{}:{}:{}", subTask.getName(), subTask.getTaskName(), subTask.getLabel(), subTask); TaskDefinition subTaskDefinition = taskDefinitionRepository.findByTaskName(subTask.getName()); if (subTaskDefinition != null) { - result.add(subTaskDefinition.getRegisteredAppName() + "," + subTask.getLabel()); + if(StringUtils.hasText(subTask.getLabel())) { + result.add(subTaskDefinition.getRegisteredAppName() + "," + subTask.getLabel()); + } else { + result.add(subTaskDefinition.getRegisteredAppName()); + } TaskParser subTaskParser = new TaskParser(subTaskDefinition.getTaskName(), subTaskDefinition.getDslText(), true, true); TaskNode subTaskNode = subTaskParser.parse(); if (subTaskNode != null && subTaskNode.getTaskApp() != null) { @@ -276,7 +281,7 @@ private void extractNames(TaskNode taskNode, Set result) { logger.debug("subSubTask:{}:{}:{}:{}", subSubTask.getName(), subSubTask.getTaskName(), subSubTask.getLabel(), subSubTask); TaskDefinition subSubTaskDefinition = taskDefinitionRepository.findByTaskName(subSubTask.getName()); if (subSubTaskDefinition != null) { - if (!subTask.getLabel().contains("$")) { + if (subSubTask.getLabel() != null && !subTask.getLabel().contains("$")) { result.add(subSubTaskDefinition.getRegisteredAppName() + "," + subSubTask.getLabel()); } else { result.add(subSubTaskDefinition.getRegisteredAppName()); diff --git a/spring-cloud-skipper/spring-cloud-skipper-server-core/src/main/java/org/springframework/cloud/skipper/server/controller/support/ResourcesAssembler.java b/spring-cloud-skipper/spring-cloud-skipper-server-core/src/main/java/org/springframework/cloud/skipper/server/controller/support/ResourcesAssembler.java index 30fd279b3e..2719b67321 100644 --- a/spring-cloud-skipper/spring-cloud-skipper-server-core/src/main/java/org/springframework/cloud/skipper/server/controller/support/ResourcesAssembler.java +++ b/spring-cloud-skipper/spring-cloud-skipper-server-core/src/main/java/org/springframework/cloud/skipper/server/controller/support/ResourcesAssembler.java @@ -21,18 +21,18 @@ import org.springframework.hateoas.server.RepresentationModelAssembler; /** - * Analogous to {@link ResourceAssembler} but for resource collections. + * Analogous to {@link RepresentationModelAssembler} but for resource collections. * * @author Greg Turnquist */ -public interface ResourcesAssembler { +public interface ResourcesAssembler> { /** * Converts all given entities into resources and wraps the collection as a resource as well. * * @see RepresentationModelAssembler#toModel(Object) * @param entities must not be {@literal null}. - * @return {@link Resources} containing {@link EntityModel} of {@code T}. + * @return {@link CollectionModel} containing {@link RepresentationModel} of {@code T}. */ CollectionModel toCollectionModel(Iterable entities); }