Missing Javadoc (actually I forgot to add it when I've fixed the pull ^_^; ).

I would also put the ```if ...else if ... else``` part of the method in a separate method called updateRevision so that we avoid the duplication in the other saveDocument method