Skip to content

Commit

Permalink
fix Schema.Validate
Browse files Browse the repository at this point in the history
  • Loading branch information
dao-jun committed Oct 21, 2023
1 parent 4f04914 commit fe5f290
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pulsar/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (js *JSONSchema) Decode(data []byte, v interface{}) error {
}

func (js *JSONSchema) Validate(message []byte) error {
return js.Decode(message, nil)
return nil
}

func (js *JSONSchema) GetSchemaInfo() *SchemaInfo {
Expand Down Expand Up @@ -229,7 +229,7 @@ func (ps *ProtoSchema) Decode(data []byte, v interface{}) error {
}

func (ps *ProtoSchema) Validate(message []byte) error {
return ps.Decode(message, nil)
return nil
}

func (ps *ProtoSchema) GetSchemaInfo() *SchemaInfo {
Expand Down Expand Up @@ -307,7 +307,7 @@ func (ps *ProtoNativeSchema) Decode(data []byte, v interface{}) error {
}

func (ps *ProtoNativeSchema) Validate(message []byte) error {
return ps.Decode(message, nil)
return nil
}

func (ps *ProtoNativeSchema) GetSchemaInfo() *SchemaInfo {
Expand Down Expand Up @@ -379,7 +379,7 @@ func (as *AvroSchema) Decode(data []byte, v interface{}) error {
}

func (as *AvroSchema) Validate(message []byte) error {
return as.Decode(message, nil)
return nil
}

func (as *AvroSchema) GetSchemaInfo() *SchemaInfo {
Expand Down Expand Up @@ -478,7 +478,7 @@ func (bs *BytesSchema) Decode(data []byte, v interface{}) error {
}

func (bs *BytesSchema) Validate(message []byte) error {
return bs.Decode(message, nil)
return nil
}

func (bs *BytesSchema) GetSchemaInfo() *SchemaInfo {
Expand Down

0 comments on commit fe5f290

Please sign in to comment.