Fix deprecated methods
This commit is contained in:
parent
b38e0c7b60
commit
0f8f190428
@ -45,7 +45,7 @@ public final class ORM {
|
|||||||
try {
|
try {
|
||||||
tables.add(elemClass);
|
tables.add(elemClass);
|
||||||
Log.debug("[ORM] Start Init SQL table "+elemClass.getSimpleName());
|
Log.debug("[ORM] Start Init SQL table "+elemClass.getSimpleName());
|
||||||
E instance = elemClass.newInstance();
|
E instance = elemClass.getConstructor().newInstance();
|
||||||
String tableName = instance.tableName();
|
String tableName = instance.tableName();
|
||||||
tableNames.put(elemClass, tableName);
|
tableNames.put(elemClass, tableName);
|
||||||
if (!tableExistInDB(tableName)) createTable(instance);
|
if (!tableExistInDB(tableName)) createTable(instance);
|
||||||
|
@ -51,7 +51,7 @@ public class SQLElementList<E extends SQLElement<E>> extends ArrayList<E> {
|
|||||||
|
|
||||||
Class<E> elemClass = field.getSQLElementType();
|
Class<E> elemClass = field.getSQLElementType();
|
||||||
try {
|
try {
|
||||||
E emptyElement = elemClass.newInstance();
|
E emptyElement = elemClass.getConstructor().newInstance();
|
||||||
emptyElement.set(field, value, false);
|
emptyElement.set(field, value, false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalArgumentException("Illegal field or value or can't instanciante an empty instance of "
|
throw new IllegalArgumentException("Illegal field or value or can't instanciante an empty instance of "
|
||||||
|
Loading…
Reference in New Issue
Block a user