This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 78e8a2a Check for nullness of SchemaInfo (#3064)
78e8a2a is described below
commit 78e8a2a410747ef6f9a121453cbea449f68cdb71
Author: Sanjeev Kulkarni <[email protected]>
AuthorDate: Mon Nov 26 18:31:31 2018 -0800
Check for nullness of SchemaInfo (#3064)
### Motivation
Functions using CustomSerde depend on SerdeSchema which returns a null
SchemaInfo. The ConsumerImpl needs to check if its null before accessing it.
---
.../src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
index 1a9cedc..76c4f53 100644
---
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
+++
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
@@ -543,7 +543,7 @@ public class ConsumerImpl<T> extends ConsumerBase<T>
implements ConnectionHandle
}
SchemaInfo si = schema.getSchemaInfo();
- if (SchemaType.BYTES == si.getType()) {
+ if (si != null && SchemaType.BYTES == si.getType()) {
// don't set schema for Schema.BYTES
si = null;
}