title: Treemap get throws NullPointerException
body: <p>Follwing is my java class TestEntry.java</p>
  
  <pre><code>private void initializemapTest()
      {
          eventMap = new TreeMap&lt;String,String&gt;();
  
          //Put some value into eventMap
  
          mapTest = new TreeMap&lt;String, String&gt;( new Comparator&lt;String&gt;()
          {
              public int compare( String key1, String key2 )
              {
                 if( key1 == null )
                  {
                      if( key2 == null )
                      {
                          return 0;
                      }
                      else
                      {
                          return 1;
                      }
                  }
                  else
                  {
                      if( key2 == null )
                      {
                          return -1;
                      }
                      else
                      {
                          return key1.compareTo( key2 );
                      }
                  }
              }
          } );
  
          for( String s : eventMap.keySet() )
          {
              mapTest.put( eventMap.get( s ), s );   //Error at this line
          }
  
      }
  </code></pre>
  
  <p>As per my knowledge eventMap doesnot allow null values, hence keyset of eventMap does not have any null values,
   if value of any key in eventMap is null, while i try to put it in mapTest, it shoukd not throw any null pointer exception, because its respective comparator allows null values</p>
  
  <p>But why am i getting this exception</p>
  
  <pre><code>       java.lang.NullPointerException
          at java.util.TreeMap.cmp(TreeMap.java:1911)
          at java.util.TreeMap.get(TreeMap.java:1835)
          at kidiho.sa.client.reports.ReportEntry.initializemapTest(TestEntry.java:22)
  </code></pre>