eXist-db/exist — pull request #343 by adamretter (2014-09-29 13:47:12+00:00)
Title: Fix code formatting

I have fixed the code formatting of these files so that they are finally consistent and much more readable.
I have also done minor minor refactoring to reduce code duplication by using some Java 7 features such as generic diamonds and multi-exception catch blocks. No real changes to the code behaviour!