org.springframework.util.Assert



API Populatity

22 Client projects

Project Jasig/cas in file ....org.jasig.cas.services.RegisteredServiceImpl.java (2010-09-23)
@@ -21,6 +21,7 @@ import org.hibernate.annotations.CollectionOfElements;
 import org.hibernate.annotations.IndexColumn;
 import org.jasig.cas.authentication.principal.Service;
 import org.springframework.util.AntPathMatcher;
+import org.springframework.util.Assert;
 import org.springframework.util.PathMatcher;
 
 /**
@@ -159,6 +160,7 @@ public class RegisteredServiceImpl
     }
 
     public void setAllowedAttributes(final List<String> allowedAttributes) {
+        Assert.notNull(allowedAttributes, "allowedAttributes cannot be null.");
         this.allowedAttributes = allowedAttributes;
     }
 
Project SpringSource/spring-framework in file ...ngframework.jdbc.core.simple.AbstractJdbcCall.java (2010-05-12)
@@ -34,6 +34,7 @@ import org.springframework.jdbc.core.RowMapper;
 import org.springframework.jdbc.core.SqlParameter;
 import org.springframework.jdbc.core.metadata.CallMetaDataContext;
 import org.springframework.jdbc.core.namedparam.SqlParameterSource;
+import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
 
 /**
@@ -203,6 +204,7 @@ public abstract class AbstractJdbcCall {
 	 * @param parameter the {@link SqlParameter} to add
 	 */
 	public void addDeclaredParameter(SqlParameter parameter) {
+		Assert.notNull(parameter, "The supplied parameter must not be null");
 		if (!StringUtils.hasText(parameter.getName())) {
 			throw new InvalidDataAccessApiUsageException(
 					"You must specify a parameter name when declaring parameters for \"" + getProcedureName() + "\"");
Project SpringSource/spring-framework in file ...ramework.jca.work.jboss.JBossWorkManagerUtils.java (2010-01-07)
@@ -23,6 +23,8 @@ import javax.management.ObjectName;
 import javax.naming.InitialContext;
 import javax.resource.spi.work.WorkManager;
 
+import org.springframework.util.Assert;
+
 /**
  * Utility class for obtaining the JBoss JCA WorkManager,
  * typically for use in web applications.
@@ -55,6 +57,7 @@ public abstract class JBossWorkManagerUtils {
 	 * @see org.jboss.resource.work.JBossWorkManagerMBean
 	 */
 	public static WorkManager getWorkManager(String mbeanName) {
+		Assert.hasLength(mbeanName, "JBossWorkManagerMBean name must not be empty");
 		try {
 			Class<?> mbeanClass = JBossWorkManagerUtils.class.getClassLoader().loadClass(JBOSS_WORK_MANAGER_MBEAN_CLASS_NAME);
 			InitialContext jndiContext = new InitialContext();