public boolean addToList(String propertyName, String value) {
        final Lock writeLock = readWriteLock.writeLock();
        writeLock.lock();
        try {
            List<String> properties = getProperties(propertyName, true);
            boolean propertyWasAdded = properties.add(value);
            if (propertyWasAdded) {
                setProperties(propertyName, properties);
            }
            return propertyWasAdded;
        } finally {
            writeLock.unlock();
        }
    }
Adds the given value to the list of values represented by the property name.
The property is created if it did not already exist.

@param propertyName The name of the property list to change
@param value The value to be added to the list
@return True if the value was added to the list; false if the value was already present
xmppserver/src/main/java/org/jivesoftware/util/XMLProperties.java