Check that {@code x} is not null, raising
{@link NullCheckException} iff {@code x == null}.

@param <T>     The type of values
@param x       An arbitrary value
@param message A descriptive message describing the value

@return {@code x}
495324
@SuppressWarnings("null")
  public static
  @NonNull
  <T> T notNull(
    final @Nullable T x,
    final @NonNull String message)
  {
    if (x == null) {
      final StringBuilder text = new StringBuilder(32 + message.length());
      text.append("Expression evaluated to null: ");
      text.append(message);
      throw new NullCheckException(text.toString());
    }
    return x;
  }
251441
public static Boolean assertFalse(Boolean value, String message) {
        if (Boolean.valueOf(value))
            throw new IllegalStateException(message);
        return value;
    }
691860
public void javacWarning(String message, Throwable t) {
		messager.printMessage(Diagnostic.Kind.WARNING, message + (t == null ? "" : (": " + t)));
	}
851090
public static <E> E notNull(E obj, String msg) {
        if (obj == null) {
            throw (msg == null) ? new NullPointerException() : new NullPointerException(msg);
        }
        return obj;
    }
90210
public static void assertNull(String message, Object o) {
        if (o == null) {
            pass(message);
        } else {
            fail(message, "'" + o + "' is not null");
        }
    }
957022
@SuppressWarnings("unchecked")
	public static <T extends Message> T copy(final T message) {
		return message == null ? null : (T) message.copy();
	}
61800
public final Boolean evaluateBoolean( Message message ) throws JMSException
    {
        Object value = evaluate(message);
        if (value == null)
            return null;
        
        if (value instanceof Boolean)
            return (Boolean)value;
        
        throw new FFMQException("Expected a boolean but got : "+value.toString(),"INVALID_SELECTOR_EXPRESSION");
    }
564527
protected static String message(Object message)
  {
    if(message == null) {
      return null;
    }
    if(!(message instanceof Throwable)) {
      return message.toString();
    }

    Throwable t = (Throwable)message;
    if(t.getCause() == null) {
      return t.toString();
    }

    int nestingLevel = 0;
    StringBuilder sb = new StringBuilder();
    for(;;) {
      sb.append(t.getClass().getName());
      sb.append(":");
      sb.append(" ");
      if(++nestingLevel == 8) {
        sb.append("...");
        break;
      }
      if(t.getCause() == null) {
        String s = t.getMessage();
        if(s == null) {
          t.getClass().getCanonicalName();
        }
        sb.append(s);
        break;
      }
      t = t.getCause();
    }
    return sb.toString();
  }
90917
public static void assertFalse(boolean condition, String message) {
		if (imp != null && condition) {
			imp.assertFailed(message);
		}
	}
568648
protected final void assertNotNull(String message, Object obj) {
		if (getLog().isDebugEnabled()) {
			getLog().debug(
					"\t(" //$NON-NLS-1$
					+	getLogType(obj)
					+	") " //$NON-NLS-1$
					+	message
					+	" = " //$NON-NLS-1$
					+	obj);
		}
		if (obj == null) {
			throw new AssertionError("assertNotNull: " + message); //$NON-NLS-1$
		}
	}
398966
public static <T> T checkNotNull(T value) throws NullPointerException {
    if (value == null) {
      throw new NullPointerException();
    }
    return value;
  }
983992
public void setMessage(String message) {
        requireArgument(message != null && !message.isEmpty(), "Message cannot be null or empty.");
        this.message = message;
    }
1126486
@Nonnull
  public static Error fail(@Nullable final String message) {
    final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "failed"));
    MetaErrorListeners.fireError("Asserion error", error);
    if (true) {
      throw error;
    }
    return error;
  }
493885
static void assertNotNull(String message, Object nonNullObject)
    {
        if(nonNullObject == null)
        {
            System.err.println(message);
        }
    }
747686
public <T> T[] noNullElements(final T[] array, final String message) {
        notNull(array);
        final int index = indexOfNullElement(array);
        if (index != -1) {
            fail(String.format(message, index));
        }

        return array;
    }
459334
public static Boolean assertTrue(Boolean value, String message) {
        if (!Boolean.valueOf(value))
            throw new IllegalArgumentException(message);
        return value;
    }
895947
private void validateMessageForNull(Message msg) throws MessageFormatException {

        // if the supplied message is null, throw a jms MessageFormatException.
        if (msg == null) {
            throw (MessageFormatException) JmsErrorUtils.newThrowable(
                                                                      MessageFormatException.class,
                                                                      "INVALID_VALUE_CWSIA0068",
                                                                      new Object[] { "message", null },
                                                                      tc);
        }
    }