Removed unnecessary null check in StringSerializer
Removed unnecessary null check
if (encodingValue != null && encodingValue instanceof String)
null instanceof String returns false hence replaced the check with
if (encodingValue instanceof String)
Author: Sagar Chavan
Reviewers: Guozhang Wang
Closes from sagarchavan3172/trunk
@@ -34,7 +34,7 @@ public class StringSerializer implements Serializer<String> {
Object encodingValue = configs.get(propertyName);
if (encodingValue == null)
encodingValue = configs.get("serializer.encoding");
- if (encodingValue != null && encodingValue instanceof String)
+ if (encodingValue instanceof String)
encoding = (String) encodingValue;
}
