()
| 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 | } |
no test coverage detected