# HG changeset patch # User Felix Wolfsteller # Date 1342206063 0 # Node ID 1a9ab048573aa39d6280d1d8731e0b72ad9d49ab # Parent 41a7b171bd5914d0731b272a67b2bddb02e6644d Prevent nasty NPE. flys-artifacts/trunk@5002 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 41a7b171bd59 -r 1a9ab048573a flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Fri Jul 13 16:11:13 2012 +0000 +++ b/flys-artifacts/ChangeLog Fri Jul 13 19:01:03 2012 +0000 @@ -1,3 +1,8 @@ +2012-07-13 Felix Wolfsteller + + * src/main/java/de/intevation/flys/exports/WaterlevelExporter.java: + Prevent nasty NPE (hidden by autobox). + 2012-07-13 Sascha L. Teichmann * src/main/java/de/intevation/flys/exports/sq/SQRelationGenerator.java: diff -r 41a7b171bd59 -r 1a9ab048573a flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java Fri Jul 13 16:11:13 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java Fri Jul 13 19:01:03 2012 +0000 @@ -474,8 +474,13 @@ long startTime = System.currentTimeMillis(); - String colDesc = FLYSUtils.getNamedMainValue((WINFOArtifact)flys, - wqkms.getRawValue()); + String colDesc = desc; + if (flys instanceof WINFOArtifact) { + if (wqkms != null && wqkms.getRawValue() != null) { + WINFOArtifact winfo = (WINFOArtifact) flys; + colDesc = FLYSUtils.getNamedMainValue(winfo, wqkms.getRawValue()); + } + } for (int i = 0; i < size; i ++) { result = wqkms.get(i, result);