Skip to content

Commit

Permalink
Fix instructions to be nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
codepitbull committed Dec 11, 2024
1 parent 68b3e80 commit cf5ba56
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.hivemq.persistence.mappings.fieldmapping.FieldMapping;
import io.swagger.v3.oas.annotations.media.Schema;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Objects;
Expand All @@ -32,7 +33,7 @@ public class FieldMappingModel {
private final @NotNull List<InstructionModel> instructions;

public FieldMappingModel(
@JsonProperty(value = "instructions") final @NotNull List<InstructionModel> instructions) {
@JsonProperty(value = "instructions") final @Nullable List<InstructionModel> instructions) {
this.instructions = Objects.requireNonNullElse(instructions, List.of());
}

Expand Down

0 comments on commit cf5ba56

Please sign in to comment.