title: Undocumented String.compareTo(null) NPE?
body: <p>The following little test throws an NPE:</p>
  
  <pre><code>public class Test {
  
      public static void  main(String[] args) {
  
          String a = "a";
          String b = null;
  
          System.out.println(a.compareTo(b));
  
      }
  
  }
  </code></pre>
  
  <p>Yet, the Javadoc of <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html#compareTo%28java.lang.String%29">compareTo()</a> does not mention that the parameter cannot be <code>null</code>. This is strange, since Javadocs usually mentions when parameters cannot be <code>null</code>.</p>
  
  <p>Is this just a glitch in the documentation or is there a more fundamental reason/twist I am missing? </p>