*/
public void start() {
fetcher = new UpdateInfoFetcher();
+ fetcher.setName("UpdateInfoFetcher");
fetcher.setDaemon(true);
fetcher.start();
}
}
-
+
/**
* Parse the data received from the server.
*
reader = new BufferedReader(r);
}
-
+
String version = null;
ArrayList<ComparablePair<Integer, String>> updates =
new ArrayList<ComparablePair<Integer, String>>();
}
-
+
/**
* An asynchronous task that fetches and parses the update info.
*
String contentType = connection.getContentType();
if (contentType == null ||
- contentType.toLowerCase().indexOf(Communicator.UPDATE_INFO_CONTENT_TYPE) < 0) {
+ contentType.toLowerCase(Locale.ENGLISH).indexOf(Communicator.UPDATE_INFO_CONTENT_TYPE) < 0) {
// Unknown response type
log.warn("Unknown Content-type received:" + contentType);
return;
return;
}
-
+
info = new UpdateInfo(version, updates);
log.info("Found update: " + info);
} finally {