diff --git a/vertx-gaia/vertx-ams/pom.xml b/vertx-gaia/vertx-ams/pom.xml index 7dfc27aafee2c5dfbc92f3649b3ea93c8710b79e..71569ddfaedfbb54764794dc0f37a1c80e813bb2 100644 --- a/vertx-gaia/vertx-ams/pom.xml +++ b/vertx-gaia/vertx-ams/pom.xml @@ -92,5 +92,9 @@ io.netty netty-buffer + + cn.vertxup + vertx-co + \ No newline at end of file diff --git a/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java b/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java index 2a4bd8b482263b077063e2ab861b9de1e105996d..b5190ec87a836a355139113f8a44ff907d435354 100644 --- a/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java +++ b/vertx-gaia/vertx-ams/src/main/java/io/horizon/atom/app/KDatabase.java @@ -12,6 +12,7 @@ import io.horizon.specification.typed.TJson; import io.horizon.uca.log.Annal; import io.horizon.util.HUt; import io.vertx.core.json.JsonObject; +import io.vertx.up.commune.config.Database; import java.io.Serializable; import java.sql.DriverManager; @@ -230,11 +231,11 @@ public class KDatabase implements Serializable, TCopy, TJson { @Override @SuppressWarnings("unchecked") - public CHILD copy() { + public Database copy() { final JsonObject json = this.toJson().copy(); - final KDatabase database = new KDatabase(); + final Database database = new Database(); database.fromJson(json); - return (CHILD) database; + return database; } @Override diff --git a/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java b/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java index 449e286935fb8ea43773208b44c0c03a5a5fa1a5..0c6e229b3b2d2dac2d7297c958398cee3e0608fd 100644 --- a/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java +++ b/vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/config/Database.java @@ -65,7 +65,7 @@ public class Database extends KDatabase { if (Objects.isNull(DATABASE)) { DATABASE = getDatabase(DsSource.PRIMARY, "jooq", CURRENT); } - return (Database) DATABASE.copy(); + return DATABASE.copy(); } public static Database getHistory() {