michaeljmarshall opened a new issue, #19155: URL: https://github.com/apache/pulsar/issues/19155
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Motivation The equality check on the following line does not return true based on my testing from a couple years ago :) (I meant to open this issue a while ago, but I just found the reference today, and since the less than optimal code is present, now is as good a time as ever.) https://github.com/apache/pulsar/blob/82feb13949e9387098e93d0484e1c0f622b7e0d5/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1346 The problem comes in how the two `offloadPolicies` are instantiated. Reading through the code may reveal the issue. I discovered it by running through the code with a debugger. Then, I noticed that certain fields evaluate to `null` while others are `""` depending on how they the policy object is initialized. ### Solution Fix how the objects are initialized. ### Alternatives Fix how the object equality is checked. This could have unintended consequences. Correcting how the objects are deserialized seems like the better approach to me. ### Anything else? I will try to submit a PR, but I might not have time. ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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]
