You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2004/11/20 09:57:01 UTC
svn commit: r105956 - geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas
Author: ammulder
Date: Sat Nov 20 00:57:00 2004
New Revision: 105956
Modified:
geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
Log:
Explicitly prevent you from using the same configuration name as realm
name (since there's already a configuration using the realm name and
if you want that you don't need one of these!)
Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java Sat Nov 20 00:57:00 2004
@@ -43,6 +43,12 @@
public ServerRealmConfigurationEntry(String applicationConfigName, String realmName, Kernel kernel) {
this.applicationConfigName = applicationConfigName;
this.realmName = realmName;
+ if(applicationConfigName == null || realmName == null) {
+ throw new IllegalArgumentException("applicationConfigName and realmName are required");
+ }
+ if(applicationConfigName.equals(realmName)) {
+ throw new IllegalArgumentException("applicationConfigName must be different than realmName (there's an automatic entry using the same name as the realm name, so you don't need a ServerRealmConfigurationEntry if you're just going to use that!)");
+ }
this.kernel = kernel;
}