Skip to content

Commit

Permalink
Optimize TopicsImpl fix made in apache#13434 (apache#13436)
Browse files Browse the repository at this point in the history
- align with recent refactoring apache#13388
  • Loading branch information
lhotari authored Dec 21, 2021
1 parent 636d5b4 commit 2690a2b
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.ws.rs.client.Entity;
Expand Down Expand Up @@ -520,16 +517,7 @@ public void failed(Throwable throwable) {

@Override
public Map<Integer, MessageId> terminatePartitionedTopic(String topic) throws PulsarAdminException {
try {
return terminatePartitionedTopicAsync(topic).get(this.readTimeoutMs, TimeUnit.MILLISECONDS);
} catch (ExecutionException e) {
throw (PulsarAdminException) e.getCause();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new PulsarAdminException(e);
} catch (TimeoutException e) {
throw new PulsarAdminException.TimeoutException(e);
}
return sync(() -> terminatePartitionedTopicAsync(topic));
}

@Override
Expand Down

0 comments on commit 2690a2b

Please sign in to comment.