[cleanup][broker] Remove the unused method internalGetList from PersistentTopicsBase
@@ -154,40 +154,6 @@ public class PersistentTopicsBase extends AdminResource {
private static final String DEPRECATED_CLIENT_VERSION_PREFIX = "Pulsar-CPP-v";
private static final Version LEAST_SUPPORTED_CLIENT_VERSION_PREFIX = Version.forIntegers(1, 21);
- protected List<String> internalGetList(Optional<String> bundle) {
- validateNamespaceOperation(namespaceName, NamespaceOperation.GET_TOPICS);
-
- // Validate that namespace exists, throws 404 if it doesn't exist
- try {
- if (!namespaceResources().namespaceExists(namespaceName)) {
- throw new RestException(Status.NOT_FOUND, "Namespace does not exist");
- }
- } catch (RestException re) {
- throw re;
- } catch (Exception e) {
- log.error("[{}] Failed to get topic list {}", clientAppId(), namespaceName, e);
- throw new RestException(e);
- }
-
- try {
- List<String> topics = topicResources().listPersistentTopicsAsync(namespaceName).join();
- return topics.stream().filter(topic -> {
- if (isTransactionInternalName(TopicName.get(topic))) {
- return false;
- }
- if (bundle.isPresent()) {
- NamespaceBundle b = pulsar().getNamespaceService().getNamespaceBundleFactory()
- .getBundle(TopicName.get(topic));
- return b != null && bundle.get().equals(b.getBundleRange());
- }
- return true;
- }).collect(Collectors.toList());
- } catch (Exception e) {
- log.error("[{}] Failed to get topics list for namespace {}", clientAppId(), namespaceName, e);
- throw new RestException(e);
- }
- }
-
protected CompletableFuture<List<String>> internalGetListAsync(Optional<String> bundle) {
return validateNamespaceOperationAsync(namespaceName, NamespaceOperation.GET_TOPICS)
.thenCompose(__ -> namespaceResources().namespaceExistsAsync(namespaceName))
