MCPcopy Create free account
hub / github.com/XUANXUQAQ/File-Engine / isLatest

Method isLatest

src/main/java/file/engine/MainClass.java:283–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281 }
282
283 private static boolean isLatest() {
284 //检测是否为最新版本
285 try {
286 Map<String, Object> info = AllConfigs.getInstance().getUpdateInfo();
287 if (info != null && !info.isEmpty()) {
288 String latestVersion = (String) info.get("version");
289 if (Double.parseDouble(latestVersion) > Double.parseDouble(Constants.version) || IsPreview.isPreview()) {
290 return false;
291 }
292 }
293 } catch (IOException e) {
294 log.error("error: {}", e.getMessage(), e);
295 }
296 return true;
297 }
298}

Callers 1

checkVersionMethod · 0.95

Calls 5

getInstanceMethod · 0.95
isPreviewMethod · 0.95
getUpdateInfoMethod · 0.80
getMethod · 0.80
getMessageMethod · 0.80

Tested by

no test coverage detected