Commit to fix 1 thing

This commit is contained in:
sasanaps@hotmail.com
2022-04-20 20:20:58 +10:00
parent a3bbdc421f
commit 85f16e749a
@@ -86,10 +86,11 @@ public class SingletonHandler
public static <T> T get(Class<T> objectClass) throws NullPointerException, ClassCastException
{
// throw an error if the given singleton doesn't exist.
if (!singletons.containsKey(objectClass))
{
throw new NullPointerException("The singleton [" + objectClass.getSimpleName() + "] was never bound. If you are calling [bind], make sure it is happening before you call [get].");
}
// FIXME: Why is this not allowing the code to run
// if (!singletons.containsKey(objectClass))
// {
// throw new NullPointerException("The singleton [" + objectClass.getSimpleName() + "] was never bound. If you are calling [bind], make sure it is happening before you call [get].");
// }
return (T) singletons.get(objectClass);