On 2 September 2012 13:15, Philippe Mouawad <[email protected]> wrote: > Good catch. > I reverted it, but I think it should be changed.
Quite likely, but the calling code needs to be carefully evaluated to check whether it treats null and empty arrays differently. > On Sun, Sep 2, 2012 at 12:55 PM, sebb <[email protected]> wrote: > >> On 1 September 2012 22:02, <[email protected]> wrote: >> > Author: pmouawad >> > Date: Sat Sep 1 21:02:59 2012 >> > New Revision: 1379847 >> > >> > URL: http://svn.apache.org/viewvc?rev=1379847&view=rev >> > Log: >> > method returning arrays should return empty array instead of null >> >> Ideally yes, but it depends on how the API was originally designed and >> used. >> >> In this case it looks as though the API was expected to return null, >> so the change may need to be reverted - or the calling code may need >> to be modified. >> >> Further investigation is needed to ensure that the change is complete. >> >> > Modified: >> > >> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java >> > >> > Modified: >> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java >> > URL: >> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java?rev=1379847&r1=1379846&r2=1379847&view=diff >> > >> ============================================================================== >> > --- >> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java >> (original) >> > +++ >> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java >> Sat Sep 1 21:02:59 2012 >> > @@ -466,7 +466,7 @@ public class StatGraphVisualizer extends >> > } >> > return data; >> > } >> > - return null; >> > + return new double[0][0]; >> > } >> > >> > public String[] getAxisLabels() { >> > @@ -478,7 +478,7 @@ public class StatGraphVisualizer extends >> > } >> > return labels; >> > } >> > - return null; >> > + return new String[0]; >> > } >> > >> > private String[] getLegendLabels() { >> > >> > >> > > > > -- > Cordialement. > Philippe Mouawad.
