geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r105956 - geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas
Date Sat, 20 Nov 2004 08:57:01 GMT
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;
     }
 

Mime
View raw message