提交 b7790c5a 编写于 作者: L lytscu

V3 modify revert

上级 ab36a1bb
......@@ -200,15 +200,7 @@ public class MongoDBMethodInterceptor implements InstanceMethodsAroundIntercepto
public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
Cluster cluster = (Cluster)allArguments[0];
StringBuilder peers = new StringBuilder();
List<ServerDescription> servers;
try {
cluster.getDescription().getClass().getMethod("getServerDescriptions", null);
servers = cluster.getDescription().getServerDescriptions();
} catch (NoSuchMethodException e) {
servers = cluster.getDescription().getAny();
}
for (ServerDescription description : servers) {
for (ServerDescription description : cluster.getDescription().getServerDescriptions()) {
ServerAddress address = description.getAddress();
peers.append(address.getHost() + ":" + address.getPort() + ";");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册