List of usage examples for org.springframework.util Assert notNull
public static void notNull(@Nullable Object object, Supplier<String> messageSupplier)
From source file:org.springmodules.validation.util.condition.string.RegExpStringCondition.java
/** * Constructs a new RegExpStringCondition with a given regular expression that the checkCalendar text will be checked * against./* ww w. j ava2s .com*/ * * @param regexp The given regular expression. */ public RegExpStringCondition(String regexp) { Assert.notNull(regexp, "The given regular expression cannot be null"); this.pattern = Pattern.compile(regexp); }
From source file:at.porscheinformatik.common.spring.web.extended.expression.CdnExpressionHandler.java
public CdnExpressionHandler(ApplicationConfiguration config, CdnConfig cdnConfig) { super();/*from w w w . j a va 2 s .c o m*/ Assert.notNull(config, "ApplicationConfiguration is required"); Assert.notNull(cdnConfig, "CdnConfiguration is required"); this.config = config; this.cdnConfig = cdnConfig; }
From source file:org.dayatang.querychannel.impl.QueryChannelServiceImpl.java
public QueryChannelServiceImpl(EntityRepository repository) { Assert.notNull(repository, "Repository must set!"); this.repository = repository; }
From source file:org.oncoblocks.centromere.web.exceptions.RestException.java
public RestException(HttpStatus status, Integer code, String message, String developerMessage, String moreInfoUrl) {// ww w. j a va 2s. c o m Assert.notNull(status, "HttpStatus argument cannot be null."); this.status = status; this.code = code; this.message = message; this.developerMessage = developerMessage; this.moreInfoUrl = moreInfoUrl; }
From source file:org.vbossica.azurebox.blob.CloudBlobClientFactoryBean.java
@Override public void afterPropertiesSet() throws Exception { Assert.notNull(storageAccount, "storageAccount must be set!"); }
From source file:org.cleverbus.core.common.asynch.msg.MsgPriorityComparator.java
@Override public int compare(Exchange ex1, Exchange ex2) { Message msg1 = ex1.getIn().getBody(Message.class); Message msg2 = ex2.getIn().getBody(Message.class); Assert.notNull(msg1, "msg1 must not be null"); Assert.notNull(msg2, "msg2 must not be null"); return ((Integer) msg1.getProcessingPriority()).compareTo(msg2.getProcessingPriority()); }
From source file:org.hdiv.config.annotation.RuleRegistration.java
public RuleRegistration acceptedPattern(String acceptedPattern) { Assert.notNull(acceptedPattern, "Accepted pattern is required"); this.validation.setAcceptedPattern(acceptedPattern); return this; }
From source file:org.springmodules.validation.util.condition.common.AbstractCompoundCondition.java
/** * Constructs a new AbstractCompoundCondition with the given array of conditions. * * @param conditions The conditions this condition is compound from. *///from w ww . j ava 2 s. c o m public AbstractCompoundCondition(Condition[] conditions) { Assert.notNull(conditions, "Compound condition cannot accept null as conditions"); this.conditions = conditions; }
From source file:com.vmware.demo.sgf.tests.LuceneFactoryTest.java
@Test public void createRepository() { Assert.notNull(repo, "Repo cannot be null"); }
From source file:org.cloudfoundry.tools.io.virtual.VirtualFile.java
/** * Package scope constructor, files should only be accessed via the {@link VirtualFolder}, * /*from w w w .j a v a 2 s . c o m*/ * @param store the file store */ VirtualFile(VirtualFileStore store) { Assert.notNull(store, "Store must not be null"); this.store = store; }