修复nodeid溢出问题

This commit is contained in:
redkale
2023-12-28 19:41:21 +08:00
parent 83dd4da4ec
commit 46d2629fca
6 changed files with 10 additions and 6 deletions

View File

@@ -272,8 +272,8 @@ public final class Application {
this.resourceFactory.register(RESNAME_APP_NAME, String.class, this.name);
this.resourceFactory.register(RESNAME_APP_NODEID, String.class, this.nodeid);
if (Utility.isNumeric(this.nodeid)) {
this.resourceFactory.register(RESNAME_APP_NODEID, int.class, Integer.parseInt(this.nodeid));
if (Utility.isNumeric(this.nodeid)) { //兼容旧类型
this.resourceFactory.register(RESNAME_APP_NODEID, int.class, Math.abs(((Long) Long.parseLong(this.nodeid)).intValue()));
}
this.resourceFactory.register(RESNAME_APP_TIME, long.class, this.startTime);