codelipenghui commented on a change in pull request #9630:
URL: https://github.com/apache/pulsar/pull/9630#discussion_r579319787
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -1129,8 +1129,7 @@ protected boolean
verifyLocalBufferIsNotCorrupted(OpSendMsg op) {
}
return true;
} else {
- log.warn("[{}] Failed while casting {} into ByteBufPair",
producerName,
- (op.cmd == null ? null : op.cmd.getClass().getName()));
+ log.warn("[{}] Failed while casting {} into ByteBufPair",
producerName, null);
Review comment:
This will cause the log always print casting null?
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/conf/ClientConfigurationData.java
##########
@@ -49,7 +49,7 @@
private transient ServiceUrlProvider serviceUrlProvider;
@JsonIgnore
- private Authentication authentication = AuthenticationDisabled.INSTANCE;
+ private Authentication authentication;
Review comment:
Why need to remove the default value?
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroReader.java
##########
@@ -66,7 +66,7 @@ public GenericAvroReader(Schema writerSchema, Schema
readerSchema, byte[] schema
this.reader = new GenericDatumReader<>(writerSchema, readerSchema);
}
this.byteArrayOutputStream = new ByteArrayOutputStream();
- this.encoder =
EncoderFactory.get().binaryEncoder(this.byteArrayOutputStream, encoder);
+ this.encoder =
EncoderFactory.get().binaryEncoder(this.byteArrayOutputStream, null);
Review comment:
Use null will avoid reusing the encode?
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroWriter.java
##########
@@ -37,7 +37,7 @@
public GenericAvroWriter(Schema schema) {
this.writer = new GenericDatumWriter<>(schema);
this.byteArrayOutputStream = new ByteArrayOutputStream();
- this.encoder =
EncoderFactory.get().binaryEncoder(this.byteArrayOutputStream, encoder);
+ this.encoder =
EncoderFactory.get().binaryEncoder(this.byteArrayOutputStream, null);
Review comment:
Same as the above comment.
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/writer/AvroWriter.java
##########
@@ -40,7 +40,7 @@ public AvroWriter(Schema schema) {
public AvroWriter(Schema schema, boolean jsr310ConversionEnabled) {
this.byteArrayOutputStream = new ByteArrayOutputStream();
- this.encoder =
EncoderFactory.get().binaryEncoder(this.byteArrayOutputStream, this.encoder);
+ this.encoder =
EncoderFactory.get().binaryEncoder(this.byteArrayOutputStream, null);
Review comment:
Same as the above comment
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]