1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-08-13 16:53:51 -04:00

Fix bug 2797272: Add disable update check

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@580 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-06-09 19:50:13 +00:00
parent 3b2d225412
commit d8eaa3bc0c

View File

@ -117,7 +117,7 @@ public class DavGateway {
String currentVersion = getCurrentVersion(); String currentVersion = getCurrentVersion();
DavGatewayTray.info(new BundleMessage("LOG_DAVMAIL_GATEWAY_LISTENING", DavGatewayTray.info(new BundleMessage("LOG_DAVMAIL_GATEWAY_LISTENING",
currentVersion==null?"":currentVersion, messages)); currentVersion == null ? "" : currentVersion, messages));
if (!errorMessages.isEmpty()) { if (!errorMessages.isEmpty()) {
DavGatewayTray.error(new BundleMessage("LOG_MESSAGE", errorMessages)); DavGatewayTray.error(new BundleMessage("LOG_MESSAGE", errorMessages));
} }
@ -152,6 +152,7 @@ public class DavGateway {
public static String getReleasedVersion() { public static String getReleasedVersion() {
String version = null; String version = null;
if (!Settings.getBooleanProperty("davmail.disableUpdateCheck")) {
BufferedReader versionReader = null; BufferedReader versionReader = null;
HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(); HttpClient httpClient = DavGatewayHttpClientFacade.getInstance();
GetMethod getMethod = new GetMethod(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT); GetMethod getMethod = new GetMethod(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT);
@ -174,6 +175,7 @@ public class DavGateway {
} }
getMethod.releaseConnection(); getMethod.releaseConnection();
} }
}
return version; return version;
} }
} }