comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java @ 3836:06c76de19b51

Fix NullPointerException Check if array is null before accessing its length property. flys-client/trunk@5545 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Fri, 21 Sep 2012 07:59:25 +0000
parents 1fae113b93fd
children 360e22afb98b
comparison
equal deleted inserted replaced
3835:11d74b9d428a 3836:06c76de19b51
98 * @param values The double values. 98 * @param values The double values.
99 */ 99 */
100 public void setValues(double[] values) { 100 public void setValues(double[] values) {
101 NumberFormat f = NumberFormat.getDecimalFormat(); 101 NumberFormat f = NumberFormat.getDecimalFormat();
102 102
103 if(values.length == 0) { 103 if(values == null || values.length == 0) {
104 ti.clearValue(); 104 ti.clearValue();
105 return; 105 return;
106 } 106 }
107 StringBuilder text = new StringBuilder(); 107 StringBuilder text = new StringBuilder();
108 boolean firstItem = true; 108 boolean firstItem = true;

http://dive4elements.wald.intevation.org