comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 4024:62d99de39a8d

Avoid NPE if no attribute outs are present
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 04 Oct 2012 13:59:03 +0200
parents 3aec5a42696a
children 975f608dd254
comparison
equal deleted inserted replaced
4023:e064e781d255 4024:62d99de39a8d
372 Document oldAttrs = getAttribute(); 372 Document oldAttrs = getAttribute();
373 AttributeParser parser = new AttributeParser(oldAttrs); 373 AttributeParser parser = new AttributeParser(oldAttrs);
374 CollectionAttribute cAttr = parser.getCollectionAttribute(); 374 CollectionAttribute cAttr = parser.getCollectionAttribute();
375 375
376 Output output = cAttr.getOutput(name); 376 Output output = cAttr.getOutput(name);
377 Settings settings = output.getSettings(); 377 Settings settings = null;
378 if (output != null) {
379 settings = output.getSettings();
380 }
378 381
379 generator.init(format, out, context); 382 generator.init(format, out, context);
380 generator.setSettings(settings); 383 generator.setSettings(settings);
381 generator.setCollection(this); 384 generator.setCollection(this);
382 prepareMasterArtifact(generator, context); 385 prepareMasterArtifact(generator, context);

http://dive4elements.wald.intevation.org