Skip to content

Commit

Permalink
Check if the fragment doesnot already have a name
Browse files Browse the repository at this point in the history
  • Loading branch information
pmf-test committed Mar 15, 2024
1 parent c4ee9d4 commit b082aab
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ public void create(PlatformMode platformMode, KubernetesListBuilder builder) {
builder.accept(new TypedVisitor<ObjectMetaBuilder>() {
@Override
public void visit(ObjectMetaBuilder resource) {
if (StringUtils.isNotBlank(configuredName)) {
resource.withName(configuredName);
} else if (StringUtils.isBlank(resource.getName())) {
resource.withName(defaultName);
if(StringUtils.isBlank(resource.getName())) {
if (StringUtils.isNotBlank(configuredName)) {
resource.withName(configuredName);
} else {
resource.withName(defaultName);
}
}
}
});
Expand Down

0 comments on commit b082aab

Please sign in to comment.