Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: immutability in some more classes (MINOR) #4179

Merged
merged 1 commit into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.kafka.connect.data.ConnectSchema;
import org.apache.kafka.connect.data.Schema;

@Immutable
Expand Down Expand Up @@ -239,14 +240,14 @@ public String toString() {
@Immutable
public static final class SchemaArgumentSpec extends BaseArgumentSpec {

private final Schema schema;
private final ConnectSchema schema;

SchemaArgumentSpec(
String name,
Schema schema
) {
super(name, Schema.class);
this.schema = requireNonNull(schema, "schema");
this.schema = (ConnectSchema) requireNonNull(schema, "schema").schema();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public int hashCode() {
return Objects.hash(fields);
}

@Immutable
public static class Field {
private final String name;
private final Expression value;
Expand Down