title: When to use @Contract("null -> fail") and when to use @NotNull
body: <p>With the IntelliJ Annotations, it's possible to declare a failure of a function in case of a method parameter being null in two different ways (and combining them, that makes three in total):</p>
  
  <p>I can use a <code>@NotNull</code> annotation on the method parameter to declare that the parameter should never be null.</p>
  
  <pre class="lang-java prettyprint-override"><code>@NotNull
  public static String doSomething(@NotNull CharSequence parameter) throws NullPointerException {
      return String.format("This is the value: %s, of type %s",
              Objects.requireNonNull(parameter),
              parameter.getClass().getName());
  }
  </code></pre>
  
  <p>Alternatively, I can use a <code>@Contract("null -&gt; fail")</code> annotation, which declares that if the first parameter is null, the method will throw an exception.</p>
  
  <pre class="lang-java prettyprint-override"><code>@NotNull
  @Contract("null -&gt; fail")
  public static String doSomething(CharSequence parameter) throws NullPointerException {
      return String.format("This is the value: %s, of type %s",
              Objects.requireNonNull(parameter),
              parameter.getClass().getName());
  }
  </code></pre>
  
  <p>Lastly, I can even use both and nothing in my IntelliJ IDEA 14.1.4 is complaining:</p>
  
  <pre class="lang-java prettyprint-override"><code>@NotNull
  @Contract("null -&gt; fail")
  public static String doSomething(@NotNull CharSequence parameter) throws NullPointerException {
      return String.format("This is the value: %s, of type %s",
              Objects.requireNonNull(parameter),
              parameter.getClass().getName());
  }
  </code></pre>
  
  <p>Which of these three cases is the best to use?</p>