Fix deprecated methods

This commit is contained in:
Marc Baloup 2020-03-31 02:15:26 +02:00
parent b38e0c7b60
commit 0f8f190428
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ public final class ORM {
try {
tables.add(elemClass);
Log.debug("[ORM] Start Init SQL table "+elemClass.getSimpleName());
E instance = elemClass.newInstance();
E instance = elemClass.getConstructor().newInstance();
String tableName = instance.tableName();
tableNames.put(elemClass, tableName);
if (!tableExistInDB(tableName)) createTable(instance);

View File

@ -51,7 +51,7 @@ public class SQLElementList<E extends SQLElement<E>> extends ArrayList<E> {
Class<E> elemClass = field.getSQLElementType();
try {
E emptyElement = elemClass.newInstance();
E emptyElement = elemClass.getConstructor().newInstance();
emptyElement.set(field, value, false);
} catch (Exception e) {
throw new IllegalArgumentException("Illegal field or value or can't instanciante an empty instance of "