changeset 3494:4825950acf1e

Avoid NullPointerException if user authetication is deactivated. If user Authentication is deactivated all rivers are returned. flys-client/trunk@5210 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 15 Aug 2012 14:20:19 +0000
parents e703555f8da1
children e1ac8f5a2139
files flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Wed Aug 15 12:56:07 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Wed Aug 15 14:20:19 2012 +0000
@@ -91,7 +91,7 @@
                 String name = XMLUtils.xpathString(
                     tmp, "@art:name", ArtifactNamespaceContext.INSTANCE);
 
-                if (user.canUseFeature("river:" + name)) {
+                if (user == null || user.canUseFeature("river:" + name)) {
                     theRivers.add(new DefaultRiver(name));
                     rcount++;
                 }

http://dive4elements.wald.intevation.org