Skip to content

Commit

Permalink
[3.0] remove duplicate catch block (#8750)
Browse files Browse the repository at this point in the history
* remove duplicate catch block

* remove duplicate catch block
  • Loading branch information
wangchengming666 committed Sep 10, 2021
1 parent 1dfb114 commit b1ebfe8
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.dubbo.rpc.cluster.router.tag;

import java.net.UnknownHostException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -85,10 +84,10 @@ public synchronized void process(ConfigChangedEvent event) {

@Override
public <T> BitList<Invoker<T>> route(BitList<Invoker<T>> invokers, RouterCache<T> cache, URL url,
Invocation invocation) throws RpcException {
Invocation invocation) throws RpcException {


final TagRouterRule tagRouterRuleCopy = (TagRouterRule)cache.getAddrMetadata();
final TagRouterRule tagRouterRuleCopy = (TagRouterRule) cache.getAddrMetadata();

String tag = StringUtils.isEmpty(invocation.getAttachment(TAG_KEY)) ? url.getParameter(TAG_KEY) :
invocation.getAttachment(TAG_KEY);
Expand Down Expand Up @@ -209,8 +208,6 @@ private boolean checkAddressMatch(List<String> addresses, String host, int port)
if ((ANYHOST_VALUE + ":" + port).equals(address)) {
return true;
}
} catch (UnknownHostException e) {
logger.error("The format of ip address is invalid in tag route. Address :" + address, e);
} catch (Exception e) {
logger.error("The format of ip address is invalid in tag route. Address :" + address, e);
}
Expand Down

0 comments on commit b1ebfe8

Please sign in to comment.