mengding / jofc2

Automatically exported from code.google.com/p/jofc2
GNU Lesser General Public License v3.0
0 stars 0 forks source link

jofc2 not correctly handling step in range function #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I am running Gallery application from ofc4j against jofc2 jar and 
scatter.groovy has y.setRange(-2, 2); x.setRange(-2, 2);

What is the expected output? What do you see instead?
In ofc4j there was no error with this. with jofc you get null pointer 
exception:

java.lang.NullPointerException
    at jofc2.model.axis.Axis.setRange(Axis.java:111)
    at jofc2.model.axis.Axis.setRange(Axis.java:116)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9)

What version of the product are you using? On what operating system?
svn trunk, windows

Please provide any additional information below.
a workaround is to add the step: i.e:
y.setRange(-2, 2,1); x.setRange(-2, 2,1);

Original issue reported on code.google.com by garp...@gmail.com on 21 Mar 2009 at 2:45

GoogleCodeExporter commented 9 years ago
i've have the same problem. 
line 111 in Axis class calls "doubleValue()" on a possibly null Number.
fix was just committed.

Original comment by david.rapin on 26 Apr 2009 at 5:54