Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 3608:53aa395a29e0
FLYSArtifactCollection: Prevent another NPE. Removed dead code.
flys-artifacts/trunk@5237 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 22 Aug 2012 13:47:26 +0000 |
parents | 2b308a5d5281 |
children | a5f65e8983be |
comparison
equal
deleted
inserted
replaced
3607:e0f54fab55d3 | 3608:53aa395a29e0 |
---|---|
452 { | 452 { |
453 Document doc = XMLUtils.newDocument(); | 453 Document doc = XMLUtils.newDocument(); |
454 | 454 |
455 FLYSContext flysContext = FLYSUtils.getFlysContext(context); | 455 FLYSContext flysContext = FLYSUtils.getFlysContext(context); |
456 StateEngine engine = (StateEngine) flysContext.get( | 456 StateEngine engine = (StateEngine) flysContext.get( |
457 FLYSContext.STATE_ENGINE_KEY); | 457 FLYSContext.STATE_ENGINE_KEY); |
458 | |
459 if (engine == null) { | |
460 log.error("buildOutAttributes: engine == null"); | |
461 return null; | |
462 } | |
458 | 463 |
459 FLYSArtifact masterArtifact = getMasterArtifact(context); | 464 FLYSArtifact masterArtifact = getMasterArtifact(context); |
460 | 465 |
461 if(masterArtifact == null) { | 466 if (masterArtifact == null) { |
462 log.debug("buildOutAttributes: masterArtifact == null"); | 467 log.debug("buildOutAttributes: masterArtifact == null"); |
463 return null; | 468 return null; |
464 } | 469 } |
465 | |
466 // FIXME: ec is not used? | |
467 XMLUtils.ElementCreator ec = new XMLUtils.ElementCreator( | |
468 doc, | |
469 ArtifactNamespaceContext.NAMESPACE_URI, | |
470 ArtifactNamespaceContext.NAMESPACE_PREFIX); | |
471 | 470 |
472 OutputParser oParser = new OutputParser(db, context); | 471 OutputParser oParser = new OutputParser(db, context); |
473 | 472 |
474 if (uuids != null) { | 473 if (uuids != null) { |
475 for (String uuid: uuids) { | 474 for (String uuid: uuids) { |
481 } | 480 } |
482 } | 481 } |
483 } | 482 } |
484 | 483 |
485 aParser.parse(); | 484 aParser.parse(); |
486 | |
487 if(engine == null) { | |
488 log.debug("buildOutAttributes: engine == null"); | |
489 } | |
490 | 485 |
491 AttributeWriter aWriter = new AttributeWriter( | 486 AttributeWriter aWriter = new AttributeWriter( |
492 db, | 487 db, |
493 aParser.getCollectionAttribute(), | 488 aParser.getCollectionAttribute(), |
494 aParser.getOuts(), | 489 aParser.getOuts(), |