congbobo184 commented on a change in pull request #11856:
URL: https://github.com/apache/pulsar/pull/11856#discussion_r698967046



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -545,8 +545,11 @@ public void recordAddLatency(long latency, TimeUnit unit) {
 
     protected void setSchemaCompatibilityStrategy (Policies policies) {
         if (policies.schema_compatibility_strategy == 
SchemaCompatibilityStrategy.UNDEFINED) {
-            schemaCompatibilityStrategy = 
SchemaCompatibilityStrategy.fromAutoUpdatePolicy(
-                    policies.schema_auto_update_compatibility_strategy);
+            schemaCompatibilityStrategy = 
SchemaCompatibilityStrategy.valueOf(brokerService.pulsar()
+                    .getConfig().getSchemaCompatibilityStrategy());
+            if (schemaCompatibilityStrategy == 
SchemaCompatibilityStrategy.UNDEFINED) {

Review comment:
       Because it compares enums, we don't need to use equals




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to