Might a fix a NPE when loading Players from Flatfile database

This commit is contained in:
Florian CUNY 2018-06-03 16:04:45 +02:00
parent 884df8f07d
commit 433efcf6c0

View File

@ -55,15 +55,14 @@ public class BSBDatabase<T> {
* @return the object or null if it cannot be loaded
*/
public T loadObject(String uniqueId) {
T result = null;
try {
return handler.loadObject(uniqueId);
result = handler.loadObject(uniqueId);
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException
| ClassNotFoundException | IntrospectionException e) {
logger.severe(() -> "Could not load object from database! " + e.getMessage());
}
return null;
return result;
}
/**