Protect against NPE when glom.document.locale is not in config.
authorBen Konrath <ben@bagu.org>
Wed, 21 Dec 2011 17:23:07 +0000 (18:23 +0100)
committerBen Konrath <ben@bagu.org>
Wed, 21 Dec 2011 17:23:07 +0000 (18:23 +0100)
commit4b293e2a21dc935e4a8da60e577c3e29b84d2783
treed38de8bc40de5175f6d7875f999de6e2ad53facf
parent3286a69f6bccfdf7684d631185c76bf98829abb6
Protect against NPE when glom.document.locale is not in config.

This patch protects against an NPE when glom.document.locale is not in
the config file. This NPE will also happen if glom.document.locale is
commented out.

The patch also updates the error message to display the class name when
the getMessage() returns null. This was happening when the NPE was
thrown and I had "Configuration Error: null". If an NPE is encountered
with this patch, "Configuration Error: NullPointerException " will be
displayed.

This commit closes this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=666669

* src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java:
ChangeLog
src/main/java/org/glom/web/server/OnlineGlomServiceImpl.java