Skip to content

Commit 120351c

Browse files
author
dtschentscher
committed
fix conga-aem-maven-plugin:package-install: java.lang.Integer cannot be cast to java.lang.String
when generated model.yaml contains: roles: - role: aem-cms files: - path: packages/aem-cms-author-replicationagents.zip postProcessors: [aem-contentpackage, aem-contentpackage-properties] aemContentPackageProperties: version: 1
1 parent 89d74cb commit 120351c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tooling/conga-aem-maven-plugin/src/main/java/io/wcm/devops/conga/plugins/aem/maven/model/ContentPackageFile.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.Collections;
2929
import java.util.List;
3030
import java.util.Map;
31+
import java.util.Objects;
3132

3233
import io.wcm.devops.conga.plugins.aem.postprocessor.ContentPackagePropertiesPostProcessor;
3334

@@ -66,10 +67,10 @@ public final class ContentPackageFile {
6667
if (contentPackageProperties == null) {
6768
throw new IllegalArgumentException(ContentPackagePropertiesPostProcessor.MODEL_OPTIONS_PROPERTY + " missing.");
6869
}
69-
this.name = (String)contentPackageProperties.get(NAME_NAME);
70-
this.group = (String)contentPackageProperties.get(NAME_GROUP);
71-
this.version = (String)contentPackageProperties.get(NAME_VERSION);
72-
this.packageType = (String)contentPackageProperties.get(NAME_PACKAGE_TYPE);
70+
this.name = Objects.toString(contentPackageProperties.get(NAME_NAME), null);
71+
this.group = Objects.toString(contentPackageProperties.get(NAME_GROUP), null);
72+
this.version = Objects.toString(contentPackageProperties.get(NAME_VERSION), null);
73+
this.packageType = Objects.toString(contentPackageProperties.get(NAME_PACKAGE_TYPE), null);
7374

7475
this.variants = getVariants(roleData);
7576
}

0 commit comments

Comments
 (0)