Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java @ 1012:388e709224ec
Fixed potential NPE in collection monitor
flys-artifacts/trunk@2458 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 03 Aug 2011 08:25:28 +0000 |
parents | b81626b10cb7 |
children | 9a1a3080ad98 |
comparison
equal
deleted
inserted
replaced
1011:aca3b46160cb | 1012:388e709224ec |
---|---|
68 public static String[] extractOutputNames( | 68 public static String[] extractOutputNames( |
69 FLYSArtifact flys, | 69 FLYSArtifact flys, |
70 CallContext context) | 70 CallContext context) |
71 { | 71 { |
72 List<Output> outs = flys.getCurrentOutputs(context); | 72 List<Output> outs = flys.getCurrentOutputs(context); |
73 String[] names = new String[outs.size()]; | |
74 | 73 |
75 for (int i = 0, num = outs != null ? outs.size() : 0; i < num; i++) { | 74 int num = outs == null ? 0 : outs.size(); |
75 | |
76 String[] names = new String[num]; | |
77 | |
78 for (int i = 0; i < num; i++) { | |
76 names[i] = outs.get(i).getName(); | 79 names[i] = outs.get(i).getName(); |
77 } | 80 } |
78 | 81 |
79 return names; | 82 return names; |
80 } | 83 } |