Skip to content

Commit

Permalink
#28338 adding a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jdotcms committed May 1, 2024
1 parent da11f11 commit 9b2dcf3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -132,7 +133,9 @@ public List<Contentlet> hydrate() {
*/
private Contentlet copy(final Contentlet contentlet) {
final Contentlet newContentlet = new Contentlet();
newContentlet.getMap().putAll(Try.of(contentlet::getMap).getOrElse(Map.of()));
if (Objects.nonNull(contentlet)) {
newContentlet.getMap().putAll(Try.of(contentlet::getMap).getOrElse(Map.of()));
}
return newContentlet;
}

Expand Down

0 comments on commit 9b2dcf3

Please sign in to comment.