标签:
org.springframework.core.io.support.EncodedResource中 public EncodedResource(Resource resource, String encoding) { Assert.notNull("Resource is required"); this.resource = resource; this.encoding = encoding; }
Assert.notNull("Resource is required");
Assert.notNull(resource,"Resource is required");
/** * Assert that an object is not <code>null</code> . * <pre class="code">Assert.notNull(clazz, "The class must not be null");</pre> * @param object the object to check * @param message the exception message to use if the assertion fails * @throws IllegalArgumentException if the object is <code>null</code> */ public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } }
标签:
原文地址:http://www.cnblogs.com/mingforyou/p/4518984.html