|
|
@@ -64,18 +64,18 @@ public class ListenTask {
|
|
|
List<Master> masters = new ArrayList<>();
|
|
|
List<Master> all = new ArrayList<>();
|
|
|
try {
|
|
|
- String resultStr = restTemplate.getForObject(getUrl() + "/v1/master/list?cloudEnabled=true", String.class);
|
|
|
String allStr = restTemplate.getForObject(getUrl() + "/v1/master/list", String.class);
|
|
|
- ResultListWrap<Master> result = JSON.parseObject(resultStr, new TypeReference<ResultListWrap<Master>>(Master.class) {
|
|
|
- });
|
|
|
ResultListWrap<Master> allList = JSON.parseObject(allStr, new TypeReference<ResultListWrap<Master>>(Master.class) {
|
|
|
});
|
|
|
- if (result.isSuccess()) {
|
|
|
- masters = result.getContent();
|
|
|
- }
|
|
|
if (allList.isSuccess()) {
|
|
|
all = allList.getContent();
|
|
|
}
|
|
|
+ String resultStr = restTemplate.getForObject(getUrl() + "/v1/master/list?cloudEnabled=true", String.class);
|
|
|
+ ResultListWrap<Master> result = JSON.parseObject(resultStr, new TypeReference<ResultListWrap<Master>>(Master.class) {
|
|
|
+ });
|
|
|
+ if (result.isSuccess()) {
|
|
|
+ masters = result.getContent();
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
} finally {
|