Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.cdi.util;

An helper class providing useful assertion methods.

Author(s):
Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI
 
 public final class Contracts {
   
Disable instantiation.
   private Contracts() {
   }

   
Asserts that the given parameter is not null.

Parameters:
param the parameter to check.
message the exception message used if the parameter to check is null.
Throws:
java.lang.NullPointerException if the given parameter is null.
   public static void assertNotNull(Object paramString message) {
      if (param == null) {
         throw new NullPointerException(message);
      }
   }
New to GrepCode? Check out our FAQ X