comparison flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java @ 3313:1a9ab048573a

Prevent nasty NPE. flys-artifacts/trunk@5002 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 13 Jul 2012 19:01:03 +0000
parents 62c9bcef0680
children 13855a555d3b
comparison
equal deleted inserted replaced
3312:41a7b171bd59 3313:1a9ab048573a
472 ? Formatter.getWaterlevelW(context).format(value) : null; 472 ? Formatter.getWaterlevelW(context).format(value) : null;
473 } 473 }
474 474
475 long startTime = System.currentTimeMillis(); 475 long startTime = System.currentTimeMillis();
476 476
477 String colDesc = FLYSUtils.getNamedMainValue((WINFOArtifact)flys, 477 String colDesc = desc;
478 wqkms.getRawValue()); 478 if (flys instanceof WINFOArtifact) {
479 if (wqkms != null && wqkms.getRawValue() != null) {
480 WINFOArtifact winfo = (WINFOArtifact) flys;
481 colDesc = FLYSUtils.getNamedMainValue(winfo, wqkms.getRawValue());
482 }
483 }
479 484
480 for (int i = 0; i < size; i ++) { 485 for (int i = 0; i < size; i ++) {
481 result = wqkms.get(i, result); 486 result = wqkms.get(i, result);
482 487
483 if (atGauge) { 488 if (atGauge) {

http://dive4elements.wald.intevation.org