diff --git a/library/src/main/java/com/nucleocore/library/database/utils/DataEntry.java b/library/src/main/java/com/nucleocore/library/database/utils/DataEntry.java index 5c13c66..224b086 100644 --- a/library/src/main/java/com/nucleocore/library/database/utils/DataEntry.java +++ b/library/src/main/java/com/nucleocore/library/database/utils/DataEntry.java @@ -128,10 +128,10 @@ public boolean equals(Object obj) { } return super.equals(obj); } - public static Object cast(DataEntry dataEntry, Class clazz) throws JsonProcessingException { + public static Object cast(DataEntry dataEntry, Class clazz) throws JsonProcessingException { return new ObjectMapper().readValue(new ObjectMapper().writeValueAsString(dataEntry), clazz); } - public Object cast(Class clazz) throws JsonProcessingException { + public Object cast(Class clazz) throws JsonProcessingException { return new ObjectMapper().readValue(new ObjectMapper().writeValueAsString(this), clazz); } }