This rule flags the add method on the java.util.TreeSet class and the put method on the java.util.TreeMap class because their behavior has changed.
According to Java SE 7 and JDK 7 Compatibility documentation, the first attempt to insert a null object into empty TreeSet and TreeMap objects using the add() or put() methods now throws a java.lang.NullPointerException . In the previous implementation of the JDK, the first insertion of a null object using the add() or put() methods did not throw this exception. Attempting to insert a null to a non-empty TreeSet or TreeMap using these methods continues to fail with java.lang.NullPointerException as it did in previous JDK releases.
For additional information, see the Java 7 APIs: