[Minor] added DBC check for empty realm name
This commit is contained in:
parent
a90b8abf20
commit
8767f8c953
|
@ -20,6 +20,7 @@ import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import ch.eitchnet.utils.dbc.DBC;
|
||||||
import li.strolch.agent.api.ComponentContainer;
|
import li.strolch.agent.api.ComponentContainer;
|
||||||
import li.strolch.agent.api.ElementMapHandler;
|
import li.strolch.agent.api.ElementMapHandler;
|
||||||
import li.strolch.agent.api.StrolchComponent;
|
import li.strolch.agent.api.StrolchComponent;
|
||||||
|
@ -53,6 +54,7 @@ public abstract class AbstractElementMapHandler extends StrolchComponent impleme
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StrolchRealm getRealm(String realm) {
|
public StrolchRealm getRealm(String realm) {
|
||||||
|
DBC.PRE.assertNotEmpty("Realm name must be set!", realm);
|
||||||
StrolchRealm strolchRealm = this.realms.get(realm);
|
StrolchRealm strolchRealm = this.realms.get(realm);
|
||||||
if (strolchRealm == null) {
|
if (strolchRealm == null) {
|
||||||
String msg = "No realm is configured with the name {0}"; //$NON-NLS-1$
|
String msg = "No realm is configured with the name {0}"; //$NON-NLS-1$
|
||||||
|
|
Loading…
Reference in New Issue