# HG changeset patch # User Sascha L. Teichmann # Date 1350429139 -7200 # Node ID 2b4f78ccfbaa93c687090f26d44853a1cb01b7e1 # Parent debd1a706469f3e7f3b84f35e6ef251d846184ee Made DoubleUtil.explode() more robust against invalid result array sizes. diff -r debd1a706469 -r 2b4f78ccfbaa flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Oct 16 18:52:11 2012 +0200 +++ b/flys-artifacts/ChangeLog Wed Oct 17 01:12:19 2012 +0200 @@ -1,3 +1,10 @@ +2012-10-17 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/utils/DoubleUtil.java(explode): + Return empty double array if we are up to create a negative + result array. This should fix some problems in + "Fixierungsanalyse/Auslagerung von Wasserspiegellagen". + 2012-10-16 Björn Ricks * doc/conf/default-themes.xml, diff -r debd1a706469 -r 2b4f78ccfbaa flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java --- a/flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java Tue Oct 16 18:52:11 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java Wed Oct 17 01:12:19 2012 +0200 @@ -43,6 +43,10 @@ double tmp = diff / step; int num = (int)Math.abs(Math.ceil(tmp)) + 1; + if (num < 1) { + return new double[0]; + } + double [] values = new double[num]; if (from > to) {