Skip to content

Commit

Permalink
fix: immutability in some more classes (MINOR) (#4179)
Browse files Browse the repository at this point in the history
  • Loading branch information
agavra authored Dec 20, 2019
1 parent c239990 commit cbd3bab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit cbd3bab

Please sign in to comment.