Fix deprecated methods
This commit is contained in:
parent
b38e0c7b60
commit
0f8f190428
@ -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);
|
||||
|
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user