Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuvindu committed May 9, 2024
1 parent a4d9890 commit 67082db
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class ArrayDeserializer extends Deserializer {

public ArrayDeserializer(Schema schema, Type type) {
super(schema, type);
super(type, schema);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,16 @@ public abstract class Deserializer {
private final Type type;

public Deserializer() {
this.schema = null;
this.type = null;
this(null);
}

public Deserializer(Type type) {
this.schema = null;
this.type = TypeUtils.getReferredType(type);
this(type, null);
}

public Deserializer(Schema schema, Type type) {
this.schema = new Schema.Parser().parse(schema.toString());
this.type = TypeUtils.getReferredType(type);
public Deserializer(Type type, Schema schema) {
this.schema = schema == null ? null : new Schema.Parser().parse(schema.toString());
this.type = type == null ? null : TypeUtils.getReferredType(type);
}

public Schema getSchema() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class FixedDeserializer extends Deserializer {

public FixedDeserializer(Schema schema, Type type) {
super(schema, type);
super(type, schema);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public class MapDeserializer extends Deserializer {

public MapDeserializer(Schema schema, Type type) {
super(schema, type);
super(type, schema);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class PrimitiveDeserializer extends Deserializer {

public PrimitiveDeserializer(Schema schema, Type type) {
super(schema, type);
super(type, schema);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class RecordDeserializer extends Deserializer {

public RecordDeserializer(Schema schema, Type type) {
super(schema, type);
super(type, schema);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class UnionDeserializer extends Deserializer {

public UnionDeserializer(Schema schema, Type type) {
super(schema, type);
super(type, schema);
}

@Override
Expand Down

0 comments on commit 67082db

Please sign in to comment.