public V put(K key, V value) {

        if ((key != null) && (value != null)) {
            return m_internalMap.put(key, value);
        }
        Exception e = new Exception();
        try {
            // we want to print a stack trace when null is used as a key/value
            throw e;
        } catch (Exception e2) {
            e = e2;
        }
        if (key == null) {
            LOG.warn("Invalid null key in map", e);
            return null;
        }
        if (value == null) {
            LOG.warn("Invalid null value in map", e);
            return m_internalMap.remove(key);
        }
        return null;
    }
public V put ( K key , V value ) { if ( ( key != null ) && ( value != null ) ) { return m_internalMap . put ( key , value ) ; } Exception e = new Exception ( ) ; try { throw e ; } catch ( Exception e2 ) { e = e2 ; } if ( key == null ) { LOG . warn ( "Invalid null key in map" , e ) ; return null ; } if ( value == null ) { LOG . warn ( "Invalid null value in map" , e ) ; return m_internalMap . remove ( key ) ; } return null ; }
Sets the given map value for the given key, unless either of them is null.<p>

If the value is null,

@param key the key
@param value the value

@return the old value

@see java.util.Map#put(java.lang.Object, java.lang.Object)