Skip to content

Commit

Permalink
Make functionNullability property consistent in ResolvedFunction
Browse files Browse the repository at this point in the history
The mismatch of "nullability" and "functionNullability" could cause
failure of JSON deserialization for ResolvedFunction
  • Loading branch information
weiatwork authored and findepi committed Apr 25, 2023
1 parent 98f3281 commit 5fd9e65
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public ResolvedFunction(
@JsonProperty("id") FunctionId functionId,
@JsonProperty("functionKind") FunctionKind functionKind,
@JsonProperty("deterministic") boolean deterministic,
@JsonProperty("nullability") FunctionNullability functionNullability,
@JsonProperty("functionNullability") FunctionNullability functionNullability,
@JsonProperty("typeDependencies") Map<TypeSignature, Type> typeDependencies,
@JsonProperty("functionDependencies") Set<ResolvedFunction> functionDependencies)
{
Expand All @@ -85,7 +85,7 @@ public ResolvedFunction(
this.functionId = requireNonNull(functionId, "functionId is null");
this.functionKind = requireNonNull(functionKind, "functionKind is null");
this.deterministic = deterministic;
this.functionNullability = requireNonNull(functionNullability, "nullability is null");
this.functionNullability = requireNonNull(functionNullability, "functionNullability is null");
this.typeDependencies = ImmutableMap.copyOf(requireNonNull(typeDependencies, "typeDependencies is null"));
this.functionDependencies = ImmutableSet.copyOf(requireNonNull(functionDependencies, "functionDependencies is null"));
checkArgument(functionNullability.getArgumentNullable().size() == signature.getArgumentTypes().size(), "signature and functionNullability must have same argument count");
Expand Down

0 comments on commit 5fd9e65

Please sign in to comment.