Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from xenit-eu/enterprise-npe
Browse files Browse the repository at this point in the history
fix qualifier NPE on Alfresco Enterprise project generation
  • Loading branch information
driesdeproost authored Jul 15, 2021
2 parents c0991b0 + d305106 commit 4d4a888
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import io.spring.initializr.generator.project.ProjectDescription;
import io.spring.initializr.generator.version.Version;
import io.spring.initializr.generator.version.Version.Qualifier;
import org.springframework.util.StringUtils;

public class InLogicArtifactSelectorImpl implements AlfrescoVersionArtifactSelector {

Expand Down Expand Up @@ -54,7 +56,11 @@ public String getAlfrescoDockerImage() {
}

private boolean isCommunity() {
return projectDescription.getPlatformVersion().getQualifier().getId().matches("[a-g]*");
Qualifier qualifier = projectDescription.getPlatformVersion().getQualifier();
if (StringUtils.isEmpty(qualifier)) {
return false;
}
return qualifier.getId().matches("[a-g]*");
}

private boolean isSixOrAbove() {
Expand Down

0 comments on commit 4d4a888

Please sign in to comment.