Skip to content

Commit

Permalink
Use compact record constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Nov 2, 2024
1 parent b3cb9a1 commit d71b9e3
Showing 1 changed file with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ public sealed interface ArgumentValue
public record DescriptorArgumentValue(Optional<Descriptor> descriptor)
implements ArgumentValue
{
public DescriptorArgumentValue(Optional<Descriptor> descriptor)
public DescriptorArgumentValue
{
this.descriptor = requireNonNull(descriptor, "descriptor is null");
requireNonNull(descriptor, "descriptor is null");
}

public static DescriptorArgumentValue descriptorArgument(Descriptor descriptor)
Expand All @@ -264,20 +264,10 @@ public record TableArgumentValue(
Set<String> passThroughSymbols)
implements ArgumentValue
{
public TableArgumentValue(
int sourceIndex,
boolean rowSemantics,
boolean pruneWhenEmpty,
boolean passThroughColumns,
Optional<ExpectedValueProvider<DataOrganizationSpecification>> specification,
Set<String> passThroughSymbols)
public TableArgumentValue
{
this.sourceIndex = sourceIndex;
this.rowSemantics = rowSemantics;
this.pruneWhenEmpty = pruneWhenEmpty;
this.passThroughColumns = passThroughColumns;
this.specification = requireNonNull(specification, "specification is null");
this.passThroughSymbols = ImmutableSet.copyOf(passThroughSymbols);
requireNonNull(specification, "specification is null");
passThroughSymbols = ImmutableSet.copyOf(passThroughSymbols);
}

public static class Builder
Expand Down

0 comments on commit d71b9e3

Please sign in to comment.