Browse Source

bug fix

master
XiaXiang 7 years ago
parent
commit
9dc3b0c778
  1. 2
      designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java
  2. 2
      designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java
  3. 2
      designer/src/com/fr/design/mainframe/alphafine/search/manager/RecommendSearchManager.java

2
designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java

@ -58,11 +58,11 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
String result;
String url = AlphaFineConstants.DOCUMENT_SEARCH_URL + searchText + "-1";
HttpClient httpClient = new HttpClient(url);
httpClient.setTimeout(5000);
httpClient.asGet();
if (!httpClient.isServerAlive()) {
return getNoConnectList();
}
httpClient.setTimeout(5000);
result = httpClient.getResponseText();
AlphaFineHelper.checkCancel();
try {

2
designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java

@ -93,11 +93,11 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
String encodedKey = URLEncoder.encode(searchText, "UTF-8");
String url = AlphaFineConstants.PLUGIN_SEARCH_URL + "?keyword=" + encodedKey;
HttpClient httpClient = new HttpClient(url);
httpClient.setTimeout(5000);
httpClient.asGet();
if (!httpClient.isServerAlive()) {
return getNoConnectList();
}
httpClient.setTimeout(5000);
result = httpClient.getResponseText();
AlphaFineHelper.checkCancel();
JSONObject jsonObject = new JSONObject(result);

2
designer/src/com/fr/design/mainframe/alphafine/search/manager/RecommendSearchManager.java

@ -44,10 +44,10 @@ public class RecommendSearchManager implements AlphaFineSearchProcessor {
String result;
HttpClient httpClient = new HttpClient(AlphaFineConstants.SEARCHAPI + CodeUtils.cjkEncode(searchText));
httpClient.asGet();
httpClient.setTimeout(5000);
if (!httpClient.isServerAlive()) {
return getNoConnectList();
}
httpClient.setTimeout(5000);
result = httpClient.getResponseText();
AlphaFineHelper.checkCancel();
try {

Loading…
Cancel
Save