nodece commented on code in PR #21429:
URL: https://github.com/apache/pulsar/pull/21429#discussion_r1371435671
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataSubscription.java:
##########
@@ -71,4 +71,8 @@ public boolean hasSubscription() {
public String getSubscription() {
return subscription;
}
+
+ public AuthenticationDataSource getAuthData() {
Review Comment:
Why not you check the authData in the constructor or override methods?
```
@Override
public boolean hasDataFromTls() {
return authData != null && authData.hasDataFromTls();
}
```
We should avoid type checking.
```
(authData instanceof AuthenticationDataSubscription &&
((AuthenticationDataSubscription) authData).getAuthData() == null)
```
--
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]