Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 1175:e6b513495281
Prepared FLYSArtifactCollection to live without Artifacts.
flys-artifacts/trunk@2760 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 15 Sep 2011 15:00:23 +0000 |
parents | 2d60a875e28c |
children | 16c74ca3586e |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Thu Sep 15 14:58:36 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Thu Sep 15 15:00:23 2011 +0000 @@ -99,13 +99,15 @@ collection.appendChild(doc.importNode(newAttr, true)); - for (String uuid: aUUIDs) { - try { - artifacts.appendChild( - buildArtifactNode(db, uuid, context, ec)); - } - catch (ArtifactDatabaseException dbe) { - log.warn(dbe, dbe); + if (aUUIDs != null) { + for (String uuid: aUUIDs) { + try { + artifacts.appendChild( + buildArtifactNode(db, uuid, context, ec)); + } + catch (ArtifactDatabaseException dbe) { + log.warn(dbe, dbe); + } } } } @@ -313,12 +315,14 @@ AttributeParser aParser = new AttributeParser(); OutputParser oParser = new OutputParser(db, context); - for (String uuid: items) { - try { - oParser.parse(uuid); - } - catch (ArtifactDatabaseException ade) { - log.warn(ade, ade); + if (items != null) { + for (String uuid: items) { + try { + oParser.parse(uuid); + } + catch (ArtifactDatabaseException ade) { + log.warn(ade, ade); + } } }