浏览代码

Updated to use Spring Assert class.

Luke Taylor 20 年之前
父节点
当前提交
e755687a19

+ 2 - 3
core/src/main/java/org/acegisecurity/providers/x509/populator/DaoX509AuthoritiesPopulator.java

@@ -22,6 +22,7 @@ import net.sf.acegisecurity.providers.dao.AuthenticationDao;
 import net.sf.acegisecurity.providers.x509.X509AuthoritiesPopulator;
 
 import org.springframework.beans.factory.InitializingBean;
+import org.springframework.util.Assert;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.oro.text.regex.*;
@@ -93,9 +94,7 @@ public class DaoX509AuthoritiesPopulator implements X509AuthoritiesPopulator,
     }
 
     public void afterPropertiesSet() throws Exception {
-        if (this.authenticationDao == null) {
-            throw new IllegalArgumentException("An authenticationDao must be set");
-        }
+        Assert.notNull(authenticationDao, "An authenticationDao must be set");
 
         Perl5Compiler compiler = new Perl5Compiler();