Skip to content
Snippets Groups Projects
Verified Commit e650b2b1 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'dev' into f-fix-pam-pw

parents 273c1973 56ec76a9
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ import caosdb.server.utils.ServerMessages;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
......@@ -72,12 +73,14 @@ public class UserSources extends HashMap<String, UserSource> {
@SuppressWarnings("unchecked")
final Class<? extends UserSource> clazz =
(Class<? extends UserSource>) Class.forName(className);
this.put(clazz.newInstance());
} catch (final ClassNotFoundException e) {
logger.error("LOAD_USER_SOURCE", e);
} catch (final InstantiationException e) {
logger.error("LOAD_USER_SOURCE", e);
} catch (final IllegalAccessException e) {
this.put(clazz.getDeclaredConstructor().newInstance());
} catch (IllegalArgumentException
| InvocationTargetException
| NoSuchMethodException
| SecurityException
| ClassNotFoundException
| InstantiationException
| IllegalAccessException e) {
logger.error("LOAD_USER_SOURCE", e);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment