Removing the requirement to provide the default realm name explicitly. By default in absence of any explicitly defined realm name it would be assumed to be 'default'
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1458705 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java b/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java
index 828e5c4..25a294f 100644
--- a/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java
+++ b/jaas/src/main/java/org/apache/felix/jaas/internal/ConfigSpiOsgi.java
@@ -72,6 +72,8 @@
private final Logger log;
+ private static final String DEFAULT_REALM_NAME = "default";
+
@Property
private static final String JAAS_DEFAULT_REALM_NAME = "jaas.defaultRealmName";
private String defaultRealmName;
@@ -260,12 +262,7 @@
return;
}
String newDefaultRealmName = Util.toString(
- properties.get(JAAS_DEFAULT_REALM_NAME), null);
- if (newDefaultRealmName == null)
- {
- throw new IllegalArgumentException(
- "Default JAAS realm name must be specified");
- }
+ properties.get(JAAS_DEFAULT_REALM_NAME), DEFAULT_REALM_NAME);
if (!newDefaultRealmName.equals(defaultRealmName))
{