You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by sebb <se...@gmail.com> on 2012/09/02 12:55:55 UTC

Re: svn commit: r1379847 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java

On 1 September 2012 22:02,  <pm...@apache.org> 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() {
>
>

Re: svn commit: r1379847 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java

Posted by sebb <se...@gmail.com>.
On 2 September 2012 13:15, Philippe Mouawad <ph...@gmail.com> 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 <se...@gmail.com> wrote:
>
>> On 1 September 2012 22:02,  <pm...@apache.org> 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.

Re: svn commit: r1379847 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java

Posted by Philippe Mouawad <ph...@gmail.com>.
Good catch.
I reverted it, but I think it should be changed.

On Sun, Sep 2, 2012 at 12:55 PM, sebb <se...@gmail.com> wrote:

> On 1 September 2012 22:02,  <pm...@apache.org> 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.