Mostly javadoc, and also some fixes there and there

This commit is contained in:
2022-08-10 03:04:12 +02:00
parent f976350ee1
commit 54bc8ab99a
42 changed files with 1671 additions and 733 deletions

View File

@@ -14,6 +14,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
import fr.pandacube.lib.reflect.Reflect;
import fr.pandacube.lib.util.Log;
/**
@@ -576,7 +577,7 @@ public final class DB {
@SuppressWarnings("unchecked")
private static <E extends SQLElement<E>> E getElementInstance(ResultSet set, Class<E> elemClass) throws DBException {
try {
E instance = elemClass.getConstructor(int.class).newInstance(set.getInt("id"));
E instance = Reflect.ofClass(elemClass).constructor(int.class).instanciate(set.getInt("id"));
int fieldCount = set.getMetaData().getColumnCount();